Changeset 5030 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 09/15/04 14:53:06 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrate.cc
r4934 r5030 163 163 if(fCalibrationMode == kBlindPixel && !fQEs->IsBlindPixelMethodValid()) 164 164 { 165 *fLog << warn << GetDescriptor() 166 << "Warning: Blind pixel calibration method not valid, switching to F-factor method" << endl; 165 *fLog << warn << "WARNING - Blind pixel calibration method not valid, switching to F-factor method" << endl; 167 166 fCalibrationMode = kFfactor; 168 167 } … … 170 169 if(fCalibrationMode == kPinDiode && !fQEs->IsPINDiodeMethodValid()) 171 170 { 172 *fLog << warn << GetDescriptor() 173 << "Warning: PIN diode calibration method not valid, switching to F-factor method" << endl; 171 *fLog << warn << "WARNING - PIN diode calibration method not valid, switching to F-factor method" << endl; 174 172 fCalibrationMode = kFfactor; 175 173 } … … 177 175 if(fCalibrationMode == kCombined && !fQEs->IsCombinedMethodValid()) 178 176 { 179 *fLog << warn << GetDescriptor() 180 << "Warning: Combined calibration method not valid, switching to F-factor method" << endl; 177 *fLog << warn << "WARNING - Combined calibration method not valid, switching to F-factor method" << endl; 181 178 fCalibrationMode = kFfactor; 182 179 } … … 201 198 break; 202 199 case kPinDiode: 203 *fLog << err << GetDescriptor() 204 << ": PIN Diode Calibration mode not yet available " << endl; 200 *fLog << err << "PIN Diode Calibration mode not yet available " << endl; 205 201 return kFALSE; 206 202 break; 207 203 case kCombined: 208 *fLog << err << GetDescriptor() 209 << ": Combined Calibration mode not yet available " << endl; 204 *fLog << err << "Combined Calibration mode not yet available " << endl; 210 205 return kFALSE; 211 206 break; 212 207 case kFlatCharge: 213 *fLog << warn << GetDescriptor() 214 << ": WARNING: Flat-fielding charges - only for Keiichi!!" << endl; 208 *fLog << warn << "WARNING - Flat-fielding charges - only for Keiichi!!" << endl; 215 209 break; 216 210 case kDummy: 217 *fLog << warn << GetDescriptor() 218 << ": WARNING: Dummy calibration, no calibration applied!!" << endl; 211 *fLog << warn << "WARNING - Dummy calibration, no calibration applied!!" << endl; 219 212 break; 220 213 case kNone: 221 *fLog << warn << GetDescriptor() 222 << ": WARNING: No calibration applied!!" << endl; 214 *fLog << warn << "WARNING - No calibration applied!!" << endl; 223 215 break; 224 216 default: 225 *fLog << warn << GetDescriptor() 226 << ": WARNING: Calibration mode value (" 227 <<fCalibrationMode<<") not known" << endl; 217 *fLog << warn << "WARNING - Calibration mode value (" <<fCalibrationMode<<") not known" << endl; 228 218 return kFALSE; 229 219 } -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r4766 r5030 356 356 hiloconverr= pix.GetConversionHiLoErr(); 357 357 358 if (fBadPixels) 359 { 360 MBadPixelsPix &bad = (*fBadPixels)[pixidx]; 361 if (bad.IsUnsuitable()) 362 return kFALSE; 363 } 358 if ((*fBadPixels)[pixidx].IsUnsuitable()) 359 return kFALSE; 364 360 365 361 calibConv = pix.GetMeanConvFADC2Phe(); … … 367 363 calibFFactor = pix.GetMeanFFactorFADC2Phot(); 368 364 369 MCalibrationQEPix &qe 365 MCalibrationQEPix &qe = (MCalibrationQEPix&) (*fQEs)[pixidx]; 370 366 371 367 switch(fCalibrationMode) … … 439 435 } 440 436 441 voidMCalibrateData::Calibrate(Bool_t data, Bool_t pedestal) const437 Int_t MCalibrateData::Calibrate(Bool_t data, Bool_t pedestal) const 442 438 { 443 439 if (!data && !pedestal) 444 return ;440 return kTRUE; 445 441 446 442 const UInt_t npix = fSignals->GetSize(); … … 454 450 Float_t calibFFactor; 455 451 452 UInt_t skip = 0; 456 453 for (UInt_t pixidx=0; pixidx<npix; pixidx++) 457 454 { 458 455 if (!GetConversionFactor(pixidx, hiloconv, hiloconverr, 459 456 calibConv, calibConvErr, calibFFactor)) 457 { 458 skip++; 460 459 continue; 460 } 461 461 462 462 if (data) … … 517 517 } 518 518 519 if (skip>npix*0.9) 520 { 521 *fLog << warn << "WARNING - GetConversionFactor has skipped more than 90% of the pixels... skip." << endl; 522 return kCONTINUE; 523 } 524 519 525 if (pedestal) 520 526 fPedPhot->SetReadyToSave(); … … 525 531 fCerPhotEvt->SetReadyToSave(); 526 532 } 533 return kTRUE; 527 534 } 528 535 … … 546 553 */ 547 554 548 Calibrate(fCalibrationMode!=kSkip, TestPedestalFlag(kEvent)); 549 return kTRUE; 555 return Calibrate(fCalibrationMode!=kSkip, TestPedestalFlag(kEvent)); 550 556 } 551 557 -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
r4752 r5030 53 53 TString fNamePedPhotContainer; // name of fPedPhot 54 54 55 voidCalibrate(Bool_t data, Bool_t pedestal) const;55 Int_t Calibrate(Bool_t data, Bool_t pedestal) const; 56 56 57 57 Bool_t GetConversionFactor(UInt_t, Float_t &, Float_t &, Float_t &, Float_t &, Float_t &) const; … … 91 91 void EnablePedestalType(PedestalType_t i) { fPedestalFlag |= i; } 92 92 void SetPedestalFlag(PedestalType_t i=kRun) { fPedestalFlag = i; } 93 Bool_t TestPedestalFlag(PedestalType_t i) const { return fPedestalFlag & i; }93 Bool_t TestPedestalFlag(PedestalType_t i) const { return fPedestalFlag&i ? kTRUE : kFALSE; } 94 94 95 95 void SetCalibrationMode ( CalibrationMode_t calmode=kDefault ) { fCalibrationMode=calmode; } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r5024 r5030 466 466 { 467 467 *fLog << endl; 468 *fLog << warn << GetDescriptor() 469 << ": No MCalibrationBlindCam found... no Blind Pixel method! " << endl; 468 *fLog << warn << "No MCalibrationBlindCam found... no Blind Pixel method! " << endl; 470 469 return kFALSE; 471 470 } … … 492 491 { 493 492 *fLog << endl; 494 *fLog << warn << GetDescriptor() 495 << ": MCalibrationChargePINDiode not found... no PIN Diode method! " << endl; 493 *fLog << "MCalibrationChargePINDiode not found... no PIN Diode method! " << endl; 496 494 } 497 495 -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc
r5020 r5030 66 66 fCams = new TObjArray; 67 67 fCams->SetOwner(); 68 69 } 70 68 } 71 69 72 70 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityRelTimeCam.cc
r5020 r5030 56 56 fName = name ? name : "MCalibrationIntensityRelTimeCam"; 57 57 fTitle = title ? title : "Results of the Intensity Calibration"; 58 58 59 59 InitSize(1); 60 60 }
Note:
See TracChangeset
for help on using the changeset viewer.