Changeset 12673
- Timestamp:
- 12/01/11 08:41:37 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/fpeak_cfd.C
r12521 r12673 104 104 float threshold = 5.0, 105 105 int verbosityLevel = 1, // different verbosity levels can be implemented here 106 bool ProduceGraphic = true106 bool ProduceGraphic = false 107 107 ) 108 108 { … … 176 176 // Loops over Every Event and Pixel 177 177 //----------------------------------------------------------------------------- 178 cout << "Processing Events in total: " << nevents << endl; 179 178 180 for ( int ev = firstevent; ev < firstevent + nevents; ev++) { 179 181 // Get an Event --> consists of 1440 Pixel ...erm....data … … 182 184 for ( int pix = firstpixel; pix < firstpixel+npixel; pix++ ){ 183 185 if (verbosityLevel > 0){ 184 if (pix == firstpixel){ 185 cout << "Processing Event: " << CurrentEventID << "/" << nevents << endl; 186 if ( pix == (firstpixel + npixel - 1) ) { 187 if (ev == firstevent) { 188 printf ("%06d done", CurrentEventID); 189 fflush(stdout); 190 } else { 191 printf ("\b\b\b\b\b\b\b\b\b\b\b%06d done", CurrentEventID); 192 fflush(stdout); 193 } 186 194 } 187 195 } 188 196 197 if ((pix+1)%9==0){ 198 applyDrsCalibration( Ameas,pix,12,60, 199 Offset, Gain, TriggerOffset, 200 RegionOfInterest, AllPixelDataVector, StartCellVector); 201 }else{ 189 202 applyDrsCalibration( Ameas,pix,12,12, 190 203 Offset, Gain, TriggerOffset, 191 204 RegionOfInterest, AllPixelDataVector, StartCellVector); 205 } 192 206 193 207 // finds spikes in the raw data, and interpolates the value … … 301 315 break; 302 316 } // end of loop over pixels 317 318 cout << "Event processing done." << endl; 319 303 320 if (ProduceGraphic){ 304 321 TCanvas * cSpektrum; … … 310 327 cSpektrum->Update(); 311 328 } 312 SaveHistograms( OutRootFileName ); 329 if ( strlen(OutRootFileName) != 0){ 330 SaveHistograms( OutRootFileName ); 331 } 313 332 return( 0 ); 314 333 }
Note:
See TracChangeset
for help on using the changeset viewer.