Ignore:
Timestamp:
03/05/04 11:45:45 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r3374 r3411  
    168168    }
    169169
    170     const MRawRunHeader *runheader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
    171     if (!runheader)
    172       *fLog << warn << "Warning - cannot check file type, MRawRunHeader not found." << endl;
    173     else
    174       if (runheader->IsMonteCarloRun())
    175           return kTRUE;
    176    
    177170    fCam = (MCalibrationChargeCam*)pList->FindCreateObj("MCalibrationChargeCam");
    178171    if (!fCam)
     
    218211Bool_t MCalibrationChargeCalc::ReInit(MParList *pList )
    219212{
    220     fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
    221     if (!fRunHeader)
     213
     214  fRunHeader = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
     215  if (!fRunHeader)
    222216    {
    223217      *fLog << err << "MRawRunHeader not found... aborting." << endl;
     
    225219    }
    226220
    227     fGeom = (MGeomCam*)pList->FindObject("MGeomCam");
    228     if (!fGeom)
    229     {
    230         *fLog << err << "No MGeomCam found... aborting." << endl;
    231         return kFALSE;
    232     }
    233 
    234     fCam->SetGeomCam(fGeom);
    235 
    236     fNumHiGainSamples =  fSignals->GetNumUsedHiGainFADCSlices();
    237     fNumLoGainSamples =  fSignals->GetNumUsedLoGainFADCSlices();
    238     fSqrtHiGainSamples = TMath::Sqrt((Float_t)fNumHiGainSamples);
    239 
    240     UInt_t npixels = fGeom->GetNumPixels();
    241 
    242     for (UInt_t i=0; i<npixels; i++)
    243     {
    244         MCalibrationChargePix &pix = (*fCam)[i];
    245         pix.DefinePixId(i);
    246 
    247         pix.SetAbsTimeBordersHiGain(fSignals->GetFirstUsedSliceHiGain(),
    248                                     fSignals->GetLastUsedSliceHiGain());
    249         pix.SetAbsTimeBordersLoGain(fSignals->GetFirstUsedSliceLoGain(),
    250                                     fSignals->GetLastUsedSliceLoGain());
    251     }
    252    
    253     if (fExcludedPixelsFile.IsNull())
     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())
    254248        return kTRUE;
    255249
Note: See TracChangeset for help on using the changeset viewer.