Changeset 6821 for trunk/MagicSoft
- Timestamp:
- 03/15/05 11:32:29 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6820 r6821 21 21 22 22 -*-*- END OF LINE -*-*- 23 2005/03/15 Thomas Bretz 24 25 * mjobs/MJCalibrateSignal.[h,cc]: 26 - added the fExtractor data member 27 - added a destructor deleting it 28 - only read extractor from file if not set by user 29 - user fExtractor as extractor1 30 - do not delete extractor1 if set by user 31 - added member function to set extractor 32 33 * mjobs/MJPedestal.cc: 34 - removed MFEventSelector workaround again 35 - do not write pedy file anymore 36 37 * callisto.cc: 38 - MJCalibrateSignal now takes the signal extractor directly 39 instead of taking the long way round a new file 40 41 * mpedestal/MExtractPedestal.cc: 42 - ReInit extractor correctly. Now the workaround should be 43 really obsolete 44 45 46 23 47 2005/03/14 Thomas Bretz 24 48 -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc
r6820 r6821 126 126 // 127 127 MJCalibrateSignal::MJCalibrateSignal(const char *name, const char *title) 128 : f IsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE),128 : fExtractor(0), fIsInterlaced(kTRUE), fIsRelTimesUpdate(kFALSE), 129 129 fIsModifiedExtractWin(kTRUE) 130 130 { … … 134 134 SetPulsePosCheck(); 135 135 //fCruns = NULL; 136 } 137 138 MJCalibrateSignal::~MJCalibrateSignal() 139 { 140 if (fExtractor) 141 delete fExtractor; 142 } 143 144 void MJCalibrateSignal::SetExtractor(const MExtractor &ext) 145 { 146 if (fExtractor) 147 delete fExtractor; 148 149 fExtractor = (MExtractor*)ext.Clone(); 136 150 } 137 151 … … 180 194 } 181 195 182 TObject *o = file.Get("ExtractSignal"); 183 if (o && !o->InheritsFrom(MExtractor::Class())) 184 { 185 *fLog << err << dbginf << "ERROR - ExtractSignal read from " << fname << " doesn't inherit from MExtractor!" << endl; 186 return kFALSE; 187 } 188 ext1 = o ? (MExtractor*)o->Clone() : NULL; 189 190 o = file.Get("ExtractTime"); 196 if (!ext1) 197 { 198 TObject *o = file.Get("ExtractSignal"); 199 if (o && !o->InheritsFrom(MExtractor::Class())) 200 { 201 *fLog << err << dbginf << "ERROR - ExtractSignal read from " << fname << " doesn't inherit from MExtractor!" << endl; 202 return kFALSE; 203 } 204 ext1 = o ? (MExtractor*)o->Clone() : NULL; 205 } 206 207 TObject *o = file.Get("ExtractTime"); 191 208 if (o && !o->InheritsFrom(MExtractor::Class())) 192 209 { … … 213 230 return ReadContainer(cont); 214 231 } 215 232 /* 216 233 Bool_t MJCalibrateSignal::ReadExtractorCosmics(MExtractor* &ext1) const 217 234 { … … 245 262 return kTRUE; 246 263 } 247 264 */ 248 265 // -------------------------------------------------------------------------- 249 266 // … … 354 371 } 355 372 356 MExtractor *extractor1= 0;373 MExtractor *extractor1=fExtractor; 357 374 MExtractor *extractor2=0; 358 375 MExtractor *extractor3=0; … … 374 391 else 375 392 *fLog << inf << "No Camera geometry found using default <MGeomCamMagic>" << endl; 376 377 if (fIsModifiedExtractWin)378 if (!ReadExtractorCosmics(extractor1))379 *fLog << warn << "No extraction window update for signal extractor found" << endl;380 393 381 394 if (extractor1) … … 537 550 // at the Wuerzburg software meeting 26.01.05 538 551 // 539 #warning Default calibration now in equiv. photo-electrons!540 552 MCalibrateData calib; 541 553 calib.SetSignalType(MCalibrateData::kPhe); … … 800 812 801 813 // make sure owned object are deleted 802 if (extractor1 )814 if (extractor1 && extractor1!=fExtractor) 803 815 delete extractor1; 804 816 if (extractor2) -
trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.h
r6777 r6821 20 20 { 21 21 private: 22 MExtractor *fExtractor; 22 23 23 24 // MRunIter *fCruns; // Calibration run iter 24 25 25 Bool_t fIsInterlaced; // Distinguish interlaced from other calibration 26 26 Bool_t fIsRelTimesUpdate; // Choose to update relative times from interlaced … … 42 42 43 43 MJCalibrateSignal(const char *name=NULL, const char *title=NULL); 44 ~MJCalibrateSignal(); 44 45 45 46 Bool_t ProcessFile(MPedestalCam &camab, MPedestalCam &cam1, MPedestalCam &cam2); … … 50 51 51 52 // void SetInputCal ( MRunIter *iter ) { fCruns = iter; } 52 53 54 void SetExtractor(const MExtractor &ext); 55 53 56 ClassDef(MJCalibrateSignal, 0) // Tool to create a pedestal file (MPedestalCam) 54 57 }; -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r6820 r6821 1046 1046 } 1047 1047 1048 MFEventSelector sel;1049 sel.SetNumSelectEvts(0);1050 1051 if (fExtractor)1052 {1053 fExtractor->SetFilter(&sel);1054 tlist.AddToList(&sel);1055 tlist.AddToList(fExtractor);1056 }1057 1058 1048 MFTriggerPattern fcalib("CalibFilter"); 1059 1049 fcalib.RequireCalibration(); … … 1224 1214 1225 1215 tlist.PrintStatistics(); 1226 1227 fExtractor->SetFilter(0);1228 1216 1229 1217 if (fIsPixelCheck) … … 1302 1290 fExtractor->SetRange(newfirst,newlast+wshigain, 1303 1291 newfirst>0?newfirst-1:newfirst,data->GetNumLoGainSamples()-1); 1304 if (!WriteExtractor())1292 /*if (!WriteExtractor()) 1305 1293 { 1306 1294 *fLog << err << "Could not write the changes to disk, abort... " << endl; 1307 1295 return kFALSE; 1308 } 1296 }*/ 1309 1297 } 1310 1298 else -
trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc
r6502 r6821 442 442 if (fExtractor) 443 443 { 444 if (!fExtractor->ReInit(pList)) 445 return kFALSE; 446 444 447 if (!fExtractor->InitArrays()) 445 448 return kFALSE;
Note:
See TracChangeset
for help on using the changeset viewer.