- Timestamp:
- 02/03/07 20:04:00 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8295 r8296 37 37 * callisto_DecJan04.rc: 38 38 - set fall- and rise-time for spline artificially to 0.5 39 40 * mhbase/MFillH.cc: 41 - added comments 42 43 * mpedestal/MExtractPedestal.[h,cc], 44 mpedestal/MPedCalcFromLoGain.cc, mpedestal/MPedCalcPedRun.cc: 45 - fixed the range check.In case of the lo-gain extraction 46 the range could infact leak out of the fadc slices 39 47 40 48 -
trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc
r8271 r8296 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.2 4 2007-01-26 21:10:14tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.25 2007-02-03 20:03:35 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 268 268 Bool_t MExtractPedestal::SetExtractWindow(UShort_t windowf, UShort_t windows) 269 269 { 270 271 Bool_t rc = kTRUE; 272 273 const Int_t odd = TMath::Odd(windows); 274 275 if (odd && !fExtractor) 276 { 277 *fLog << warn << GetDescriptor(); 278 *fLog << " - WARNING: Window size in SetExtractWindow has to be even... "; 279 *fLog << " lowering from " << windows << " to "; 280 windows -= 1; 281 *fLog << windows << "!" << endl; 282 rc = kFALSE; 283 } 284 285 if (windows==0) 286 { 287 *fLog << warn << GetDescriptor(); 288 *fLog << " - WARNING: Window size in SetExtractWindow has to be > 0... adjusting to 2!" << endl; 289 windows = 2; 290 rc = kFALSE; 291 } 292 293 fExtractWinSize = windows; 294 fExtractWinFirst = windowf; 295 fExtractWinLast = fExtractWinFirst+fExtractWinSize-1; 296 297 return rc; 270 Bool_t rc = kTRUE; 271 272 if (windows==0) 273 { 274 *fLog << warn << GetDescriptor(); 275 *fLog << " - WARNING: Window size in SetExtractWindow has to be > 0... adjusting to 2!" << endl; 276 windows = 2; 277 rc = kFALSE; 278 } 279 280 fExtractWinSize = windows; 281 fExtractWinFirst = windowf; 282 fExtractWinLast = fExtractWinFirst+fExtractWinSize-1; 283 284 return rc; 298 285 } 299 286 … … 329 316 // Check (and if neccesary: correct) the extraction and check ranges. 330 317 // 331 void MExtractPedestal::CheckExtractionWindow( )318 void MExtractPedestal::CheckExtractionWindow(UInt_t offset) 332 319 { 333 320 // fSignal->GetNumSamples() not yet initialized!!! … … 336 323 if (fCheckWinLast >= num) 337 324 { 338 *fLog << warn << endl;339 *fLog << " Selected CheckWindow [" << fCheckWinFirst << "," << fCheckWinLast;340 *fLog << "] ranges out of range [0," << num-1 << "]." << endl;341 *fLog << " Resettingupper edge." << endl;342 343 fCheckWinLast = num ;344 } 345 346 if ( fExtractWinLast >= num)347 { 348 *fLog << warn << endl;349 *fLog << " Selected ExtractWindow [" << fExtractWinFirst << "," << fExtractWinLast;350 *fLog << "] ranges out of range [0," << num-1 << "]." << endl;351 *fLog << " Resettingupper edge." << endl;352 353 fExtractWinLast = num ;325 *fLog << inf; 326 *fLog << "CheckWindow [" << fCheckWinFirst+offset << "," << fCheckWinLast+offset; 327 *fLog << "] out of range [0," << num-1 << "]... "; 328 *fLog << "reset upper edge." << endl; 329 330 fCheckWinLast = num-1; 331 } 332 333 if (offset+fExtractWinLast >= num) 334 { 335 *fLog << inf; 336 *fLog << "ExtractWindow [" << fExtractWinFirst+offset << "," << fExtractWinLast+offset; 337 *fLog << "] out of range [0," << num-1 << "]... "; 338 *fLog << "reset upper edge." << endl; 339 340 fExtractWinLast = num-offset-1; 354 341 } 355 342 … … 359 346 return; 360 347 361 fExtractWinLast += fExtractWinLast==num-1 ? -1 : +1;362 363 *fLog << warn << endl;364 *fLog << "ExtractionWindow odd... ";365 *fLog << "New extraction window [" << fExtractWinFirst << "," << fExtractWinLast << "]" << endl;348 fExtractWinLast += offset+fExtractWinLast==num-1 ? -1 : +1; 349 350 *fLog << inf; 351 *fLog << "ExtractionWindow odd... set to ["; 352 *fLog << fExtractWinFirst+offset << "," << fExtractWinLast+offset << "]" << endl; 366 353 367 354 fExtractWinSize = fExtractWinLast-fExtractWinFirst+1; … … 582 569 } 583 570 584 CheckExtractionWindow();571 //CheckExtractionWindow(); 585 572 586 573 return kTRUE; -
trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.h
r8151 r8296 101 101 Bool_t CheckVariation(UInt_t idx) const; 102 102 103 void CheckExtractionWindow( );103 void CheckExtractionWindow(UInt_t offset=0); 104 104 105 105 public: -
trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc
r8151 r8296 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.3 4 2006-10-24 07:58:13tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.35 2007-02-03 20:03:35 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 158 158 using namespace std; 159 159 160 const UShort_t MPedCalcFromLoGain::fgExtractWinFirst = 17;161 const UShort_t MPedCalcFromLoGain::fgExtractWinSize = 6;160 const UShort_t MPedCalcFromLoGain::fgExtractWinFirst = 17; 161 const UShort_t MPedCalcFromLoGain::fgExtractWinSize = 6; 162 162 const UInt_t MPedCalcFromLoGain::fgNumDump = 500; 163 163 … … 213 213 if (!MExtractPedestal::ReInit(pList)) 214 214 return kFALSE; 215 216 CheckExtractionWindow(fRunHeader->GetNumSamplesHiGain()); 215 217 216 218 return kTRUE; -
trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc
r8151 r8296 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcPedRun.cc,v 1. 49 2006-10-24 07:58:13tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcPedRun.cc,v 1.50 2007-02-03 20:03:35 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 205 205 return kFALSE; 206 206 207 CheckExtractionWindow(); 208 207 209 // 208 210 // If this is the first ped run, the next run (call to ReInit)
Note:
See TracChangeset
for help on using the changeset viewer.