Changeset 9337 for trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
- Timestamp:
- 02/15/09 13:47:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc
r8354 r9337 89 89 // -------------------------------------------------------------------------- 90 90 // 91 // Check for the run type. Return kTRUE if it is a MC run or if there92 // is no MC run header (old camera files) kFALSE in case of a different93 // run type94 //95 Bool_t MMcCalibrationUpdate::CheckRunType(MParList *pList) const96 {97 const MRawRunHeader *run = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader"));98 if (!run)99 {100 *fLog << warn << dbginf << "Warning - cannot check file type, MRawRunHeader not found." << endl;101 return kTRUE;102 }103 104 return run->IsMonteCarloRun();105 }106 107 // --------------------------------------------------------------------------108 //109 91 // Make sure, that there is an MCalibrationCam Object in the Parameter List. 110 92 // … … 150 132 Bool_t MMcCalibrationUpdate::ReInit(MParList *pList) 151 133 { 134 const MRawRunHeader *run = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader")); 135 if (!run) 136 { 137 *fLog << warn << dbginf << "Warning - cannot check file type, MRawRunHeader not found." << endl; 138 return kTRUE; 139 } 140 152 141 // 153 142 // If it is no MC file skip this function... 154 143 // 155 144 fGeom = 0; 156 if ( !CheckRunType(pList))145 if (run->IsMonteCarloRun()) 157 146 { 158 147 *fLog << inf << "This is no MC file... skipping." << endl; 159 148 return kTRUE; 160 149 } 150 151 const MMcRunHeader* mcrunh = (MMcRunHeader*) pList->FindObject(AddSerialNumber("MMcRunHeader")); 152 if (!mcrunh) 153 { 154 *fLog << err << AddSerialNumber("MMcRunHeader") << " not found... aborting." << endl; 155 return kFALSE; 156 } 157 158 if (mcrunh->IsCeres()) 159 { 160 *fLog << inf; 161 *fLog << "This is a ceres file... skipping." << endl; 162 *fLog << " MCalibrationChargeCam (calibration constants), MCalibrationQECam (avg quantum efficiency)" << endl; 163 *fLog << " and MPedPhotCam (randomly extracted pedestal) not updated." << endl; 164 return kTRUE; 165 } 161 166 162 167 // … … 174 179 { 175 180 *fLog << err << AddSerialNumber("MMcFadcHeader") << " not found... aborting." << endl; 176 return kFALSE;177 }178 179 MMcRunHeader* mcrunh = (MMcRunHeader*) pList->FindObject(AddSerialNumber("MMcRunHeader"));180 if (!mcrunh)181 {182 *fLog << err << AddSerialNumber("MMcRunHeader") << " not found... aborting." << endl;183 181 return kFALSE; 184 182 }
Note:
See TracChangeset
for help on using the changeset viewer.