Changeset 6752 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 03/04/05 16:59:58 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6731 r6752 122 122 // - fIsRelTimesUpdate to kFALSE 123 123 // - fIsHiLoCalibration to kFALSE 124 // - fIsModifiedExtractWin to kTRUE 124 125 // - fPulsePosCheck to kTRUE 125 126 // 126 127 MJCalibrateSignal::MJCalibrateSignal(const char *name, const char *title) 127 : fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE), fIsHiLoCalibration(kFALSE) 128 : fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE), 129 fIsHiLoCalibration(kFALSE), fIsModifiedExtractWin(kTRUE) 128 130 { 129 131 fName = name ? name : "MJCalibrateSignal"; … … 207 209 cont.Add(&cam); 208 210 return ReadContainer(cont); 211 } 212 213 Bool_t MJCalibrateSignal::ReadExtractorCosmics(MExtractor* &ext1) const 214 { 215 216 const TString fname = Form("pedy%08d.root",fSequence.GetSequence()); 217 218 *fLog << inf << "Reading from file: " << fname << endl; 219 220 TFile file(fname, "READ"); 221 if (!file.IsOpen()) 222 { 223 *fLog << warn << "Could not find or open file " << fname << endl; 224 return kFALSE; 225 } 226 227 TObject *o = file.Get("ExtractSignal"); 228 if (o && !o->InheritsFrom(MExtractor::Class())) 229 { 230 *fLog << err << dbginf << "ERROR - ExtractSignal read from " << fname << " doesn't inherit from MExtractor!" << endl; 231 return kFALSE; 232 } 233 if (o) 234 { 235 delete ext1; 236 ext1 = (MExtractor*)o->Clone(); 237 } 238 else 239 *fLog << warn << "No signal extractor found in " << fname << endl; 240 241 file.Close(); 242 return kTRUE; 209 243 } 210 244 … … 222 256 SetRelTimesUpdate(GetEnv("RelTimesUpdate", fIsRelTimesUpdate)); 223 257 SetHiLoCalibration(GetEnv("HiLoCalibration", fIsHiLoCalibration)); 258 SetModifiedExtractWin(GetEnv("ModifiedExtractWin", fIsModifiedExtractWin)); 224 259 225 260 return MJCalib::CheckEnvLocal(); … … 339 374 *fLog << endl; 340 375 extractor3 = (MExtractor*)extractor1->Clone(); 376 341 377 } 342 378 else … … 356 392 else 357 393 *fLog << inf << "No Camera geometry found using default <MGeomCamMagic>" << endl; 394 395 if (fIsModifiedExtractWin) 396 if (!ReadExtractorCosmics(extractor1)) 397 *fLog << warn << "No extraction window update for signal extractor found" << endl; 358 398 359 399 // This is necessary for the case in which it is not in the files -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
r6699 r6752 26 26 Bool_t fIsRelTimesUpdate; // Choose to update relative times from interlaced 27 27 Bool_t fIsHiLoCalibration; // Choose to calibrate the high-gain vs. low-gains 28 Bool_t fIsModifiedExtractWin; // Choose to use the modified extraction window from pulse position 28 29 29 30 Bool_t CheckEnvLocal(); … … 34 35 Bool_t ReadCalibration(TObjArray &o, MBadPixelsCam &bpix, 35 36 MExtractor* &ext1, MExtractor* &ext2, TString &geom) const; 37 Bool_t ReadExtractorCosmics(MExtractor* &ext1) const; 36 38 37 39 const char* GetInputFileName() const; … … 47 49 void SetRelTimesUpdate ( const Bool_t b=kTRUE ) { fIsRelTimesUpdate = b; } 48 50 void SetHiLoCalibration( const Bool_t b=kTRUE ) { fIsHiLoCalibration = b; } 51 void SetModifiedExtractWin( const Bool_t b=kTRUE ) { fIsModifiedExtractWin = b; } 49 52 50 53 // void SetInputCal ( MRunIter *iter ) { fCruns = iter; }
Note:
See TracChangeset
for help on using the changeset viewer.