Changeset 6913 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 04/07/05 11:32:22 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCalib.cc
r6777 r6913 54 54 fRuns(NULL) 55 55 { 56 SetUseBlindPixel(kFALSE); 57 SetUsePINDiode(kFALSE); 58 56 59 SetCheckedPixId(); 57 60 } -
trunk/MagicSoft/Mars/mjobs/MJCalib.h
r6777 r6913 32 32 Byte_t fStorage; // Bit-field for chosen storage type 33 33 34 enum Device_t // Possible devices for calibration 35 { 36 kUseBlindPixel, 37 kUsePINDiode 38 }; 39 40 Byte_t fDevices; // Bit-field for used devices for calibration 41 34 42 protected: 35 43 … … 58 66 Bool_t IsUseMC() const { return fDataFlag==kIsUseMC; } 59 67 68 Bool_t IsUseBlindPixel() const { return TESTBIT(fDevices,kUseBlindPixel); } 69 Bool_t IsUsePINDiode () const { return TESTBIT(fDevices,kUsePINDiode); } 70 60 71 void SetUseRawData () { fDataFlag=kIsUseRawData; } 61 72 void SetUseRootData() { fDataFlag=kIsUseRootData; } … … 72 83 void SetPixelCheck ( const Bool_t b=kTRUE ) { fIsPixelCheck = b; } 73 84 void SetPulsePosCheck ( const Bool_t b=kTRUE ) { fIsPulsePosCheck = b; } 74 85 86 void SetUseBlindPixel(const Bool_t b=kTRUE) { b ? SETBIT(fDevices,kUseBlindPixel) : CLRBIT(fDevices,kUseBlindPixel); } 87 void SetUsePINDiode(const Bool_t b=kTRUE) { b ? SETBIT(fDevices,kUsePINDiode) : CLRBIT(fDevices,kUsePINDiode); } 88 75 89 ClassDef(MJCalib, 0) // Base class for calibration jobs 76 90 }; -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6907 r6913 92 92 #include "MTriggerPatternDecode.h" 93 93 #include "MFTriggerPattern.h" 94 #include "MFTriggerLvl1.h" 94 95 #include "MGeomApply.h" 95 96 //#include "MMcPedestalCopy.h" … … 179 180 } 180 181 181 Bool_t MJCalibrateSignal::ReadCalibration(TObjArray &l, MBadPixelsCam &cam, MExtractor* &ext 1, MExtractor* &ext2, TString &geom) const182 Bool_t MJCalibrateSignal::ReadCalibration(TObjArray &l, MBadPixelsCam &cam, MExtractor* &ext2, MExtractor* &ext3, TString &geom) const 182 183 { 183 184 … … 193 194 } 194 195 195 if (!ext1) 196 { 197 TObject *o = file.Get("ExtractSignal"); 198 if (o && !o->InheritsFrom(MExtractor::Class())) 199 { 200 *fLog << err << dbginf << "ERROR - ExtractSignal read from " << fname << " doesn't inherit from MExtractor!" << endl; 201 return kFALSE; 202 } 203 ext1 = o ? (MExtractor*)o->Clone() : NULL; 204 } 205 206 TObject *o = file.Get("ExtractTime"); 196 TObject *o = file.Get("ExtractSignal"); 197 if (o && !o->InheritsFrom(MExtractor::Class())) 198 { 199 *fLog << err << dbginf << "ERROR - ExtractSignal read from " << fname << " doesn't inherit from MExtractor!" << endl; 200 return kFALSE; 201 } 202 ext3 = o ? (MExtractor*)o->Clone() : NULL; 203 204 o = file.Get("ExtractTime"); 207 205 if (o && !o->InheritsFrom(MExtractor::Class())) 208 206 { … … 211 209 } 212 210 ext2 = o ? (MExtractor*)o->Clone() : NULL; 213 if (!ext 1&& !ext2)211 if (!ext3 && !ext2) 214 212 { 215 213 *fLog << err << dbginf << "ERROR - Neither ExtractSignal nor ExrtractTime found in " << fname << "!" << endl; … … 385 383 calibcont.Add(&tmcam); 386 384 387 if (!ReadCalibration(calibcont, badpix, extractor 1, extractor2, geom))385 if (!ReadCalibration(calibcont, badpix, extractor2, extractor3, geom)) 388 386 return kFALSE; 389 387 … … 394 392 *fLog << inf << "No Camera geometry found using default <MGeomCamMagic>" << endl; 395 393 394 if (extractor3) 395 { 396 *fLog << underline << "Signal Extractor found in calibration file" << endl; 397 extractor3->Print(); 398 *fLog << endl; 399 } 400 else 401 *fLog << inf << "No Signal Extractor: ExtractSignal in file." << endl; 402 403 396 404 if (extractor1) 397 405 { 398 *fLog << underline << " Signal Extractor found in calibration file" << endl;406 *fLog << underline << "Modified Signal Extractor set by user." << endl; 399 407 extractor1->Print(); 400 408 *fLog << endl; 401 extractor3 = (MExtractor*)extractor1->Clone();402 409 } 403 410 else 404 *fLog << inf << "No Signal Extractor: ExtractSignal in file." << endl; 411 { 412 *fLog << inf << "No modified Signal Extractor set by user... using ExtractSignal." << endl; 413 extractor1 = extractor3 ? (MExtractor*)extractor3->Clone() : 0; 414 } 405 415 406 416 if (extractor2) … … 455 465 456 466 // Skips empty MC events (Not necessary, but faster!) 457 MContinue contmc("MRawEvtData.GetNumPixels<0.5", "ContEmptyMC"); 467 MFTriggerLvl1 trigmc; 468 MContinue contmc(&trigmc, "ContTrigMC"); 469 contmc.SetInverted(); 458 470 459 471 MPointingPosInterpolate pextr; … … 718 730 pacalc.SetFilter(&fcalib); 719 731 filcam.SetFilter(&fcalib); 720 filtme.SetFilter(&fcalib); 721 filbnd.SetFilter(&fcalib); 722 filpin.SetFilter(&fcalib); 732 filtme.SetFilter(&fcalib); 733 if (IsUseBlindPixel()) 734 filbnd.SetFilter(&fcalib); 735 if (IsUsePINDiode()) 736 filpin.SetFilter(&fcalib); 723 737 chcalc.SetFilter(&fcalib); 724 738 recalc.SetFilter(&fcalib); … … 775 789 tlist.AddToList(read); 776 790 if (IsUseMC()) 791 { 777 792 tlist.AddToList(&writemc); 778 tlist.AddToList(&contmc); 793 tlist.AddToList(&contmc); 794 } 779 795 780 796 if (IsUseRootData()) -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r6906 r6913 198 198 fName = name ? name : "MJCalibration"; 199 199 fTitle = title ? title : "Tool to create the calibration constants for one calibration run"; 200 201 SetUseBlindPixel(kFALSE);202 SetUsePINDiode(kFALSE);203 200 204 201 SetHiLoCalibration(); … … 2105 2102 } 2106 2103 2107 2108 // --------------------------------------------------------------------------2109 //2110 // Set the useage of the Blind Pixel device2111 //2112 void MJCalibration::SetUseBlindPixel(const Bool_t b)2113 {2114 b ? SETBIT(fDevices,kUseBlindPixel) : CLRBIT(fDevices,kUseBlindPixel);2115 }2116 2117 // --------------------------------------------------------------------------2118 //2119 // Set the useage of the PIN Diode device2120 //2121 void MJCalibration::SetUsePINDiode(const Bool_t b)2122 {2123 b ? SETBIT(fDevices,kUsePINDiode) : CLRBIT(fDevices,kUsePINDiode);2124 }2125 2126 2104 /* 2127 2105 Bool_t MJCalibration::WriteEventloop(MEvtLoop &evtloop) const -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r6771 r6913 125 125 Display_t fDisplayType; // Chosen Display type 126 126 127 enum Device_t // Possible devices for calibration128 {129 kUseBlindPixel,130 kUsePINDiode131 };132 133 Byte_t fDevices; // Bit-field for used devices for calibration134 135 127 enum { kRelTimes, kDebug, kIntensity }; // Possible flags 136 128 … … 139 131 TString fGeometry; // Class name geometry 140 132 141 Bool_t IsUseBlindPixel() const { return TESTBIT(fDevices,kUseBlindPixel); }142 Bool_t IsUsePINDiode () const { return TESTBIT(fDevices,kUsePINDiode); }143 144 133 Bool_t IsRelTimes () const { return TESTBIT(fFlags,kRelTimes); } 145 134 Bool_t IsDebug () const { return TESTBIT(fFlags,kDebug); } … … 205 194 void SetIntensity ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kIntensity) : CLRBIT(fFlags,kIntensity); } 206 195 207 // Devices208 void SetUseBlindPixel(const Bool_t b=kTRUE);209 void SetUsePINDiode(const Bool_t b=kTRUE);210 211 196 // Files 212 197 void SetReferenceFile( const TString ref=fgReferenceFile ) { fReferenceFile = ref; }
Note:
See TracChangeset
for help on using the changeset viewer.