Changeset 3411 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 03/05/04 11:45:45 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3374 r3411 168 168 } 169 169 170 const MRawRunHeader *runheader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");171 if (!runheader)172 *fLog << warn << "Warning - cannot check file type, MRawRunHeader not found." << endl;173 else174 if (runheader->IsMonteCarloRun())175 return kTRUE;176 177 170 fCam = (MCalibrationChargeCam*)pList->FindCreateObj("MCalibrationChargeCam"); 178 171 if (!fCam) … … 218 211 Bool_t MCalibrationChargeCalc::ReInit(MParList *pList ) 219 212 { 220 fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 221 if (!fRunHeader) 213 214 fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 215 if (!fRunHeader) 222 216 { 223 217 *fLog << err << "MRawRunHeader not found... aborting." << endl; … … 225 219 } 226 220 227 228 229 { 230 231 232 } 233 234 235 236 237 238 239 240 241 242 243 { 244 245 246 247 248 249 250 251 } 252 253 221 fGeom = (MGeomCam*)pList->FindObject("MGeomCam"); 222 if (!fGeom) 223 { 224 *fLog << err << "No MGeomCam found... aborting." << endl; 225 return kFALSE; 226 } 227 228 fCam->SetGeomCam(fGeom); 229 230 fNumHiGainSamples = fSignals->GetNumUsedHiGainFADCSlices(); 231 fNumLoGainSamples = fSignals->GetNumUsedLoGainFADCSlices(); 232 fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples); 233 234 UInt_t npixels = fGeom->GetNumPixels(); 235 236 for (UInt_t i=0; i<npixels; i++) 237 { 238 MCalibrationChargePix &pix = (*fCam)[i]; 239 pix.DefinePixId(i); 240 241 pix.SetAbsTimeBordersHiGain(fSignals->GetFirstUsedSliceHiGain(), 242 fSignals->GetLastUsedSliceHiGain()); 243 pix.SetAbsTimeBordersLoGain(fSignals->GetFirstUsedSliceLoGain(), 244 fSignals->GetLastUsedSliceLoGain()); 245 } 246 247 if (fExcludedPixelsFile.IsNull()) 254 248 return kTRUE; 255 249
Note:
See TracChangeset
for help on using the changeset viewer.