Changeset 534 in Sophya for trunk/Poubelle/archTOI.old/formepulse.cc
- Timestamp:
- Nov 1, 1999, 10:59:29 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Poubelle/archTOI.old/formepulse.cc
r394 r534 2 2 #include <fstream.h> 3 3 4 // D. Yvon, CE Saclay, DAPNIA/SPP, 08/99 4 5 5 6 #include <math.h> … … 13 14 #include "ssthardware.h" 14 15 15 16 16 #define LTab (2048) 17 #define LSave ( 128)17 #define LSave (256) 18 18 #define Tpas (5.e-4) 19 19 //float PulseOptOrigin=LTab/16.*Tpas; … … 22 22 //#define DYTestRun 23 23 24 24 /* 25 FormePulse::FormePulse() { 26 gainElec=0.; 27 FullwidthHalfMax=0; 28 ShapeArr=new double[LSave]; 29 for(int i=0; i<LSave; i++) ShapeArr[i]=0.; 30 } 31 */ 25 32 26 33 FormePulse::FormePulse(TransFuncElec TF) { … … 129 136 for(int i=0; i<LSave; i++) ShapeArr[i]=PulseInReel[i]/Max; 130 137 131 #ifdef DYTestRun138 //#ifdef DYTestRun 132 139 //On ecrit le resultat dans un fichier 133 140 char s2[32]="Resultatfiltrage.txt"; … … 139 146 140 147 dlout<<"Impulsion courant de: "<<SSTFPulseCourant<<" Ampères"<<endl; 141 dlout<<"Maximum d'amplitude: "<<max<< " Volts"<<endl; 142 dlout<<" gain chaine preampli: "<<gainElec<<endl<<endl; 148 dlout<<"Maximum d'amplitude: "<<Max<< " Volts"<<endl; 149 dlout<<" gain chaine preampli: "<<gainElec<<endl; 150 dlout<<"largueur a mi hauteur: "<<FullwidthHalfMax<<endl<<endl; 143 151 dlout<<"Temps"<<"\tPartie Reelle"<<endl; 144 152 … … 146 154 dlout<<k*Tpas<<"\t"<<ShapeArr[k]<<endl; 147 155 } 148 #endif156 //#endif 149 157 150 158 … … 163 171 return *this; 164 172 } 165 173 166 174 FormePulse::~FormePulse() { 167 175 delete[] ShapeArr; … … 174 182 175 183 double FormePulse::PulseShape(double temps) { 184 double returnValue; 176 185 int ientier=(int)(temps/Tpas); 177 double returnValue;178 186 if (ientier<0) returnValue=0.; 179 else if (ientier>=LSave) returnValue= ShapeArr[ 127];187 else if (ientier>=LSave) returnValue= ShapeArr[LSave-1]; 180 188 else { 181 189 double Min=ShapeArr[ientier]; … … 193 201 //en secondes 194 202 return returnVal; 203 // return returnVal=30.e-3; //Gros BUGG!!!!! 195 204 } 196 205
Note:
See TracChangeset
for help on using the changeset viewer.