Ignore:
Timestamp:
10/20/06 19:26:01 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
3 edited

Legend:

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

    r7829 r8140  
    167167    fIntensConst  = (MCalibrationIntensityConstCam*) pList->FindCreateObj("MCalibrationIntensityConstCam");
    168168
     169    if (!fIntensCharge)
     170        return kFALSE;
     171    if (!fIntensQE)
     172        return kFALSE;
     173    if (!fIntensConst)
     174        return kFALSE;
     175   
     176
    169177    MCalibrationChargeCam *chargeinit = (MCalibrationChargeCam*)pList->FindObject("MCalibrationChargeCam");
    170178    MCalibrationQECam     *qeinit     = (MCalibrationQECam*)    pList->FindObject("MCalibrationQECam");
     
    190198    *fLog << inf << "Found MHCalibrationChargeCam ... " << flush;
    191199
    192     if (!fIntensCharge)
    193       {
    194         *fLog << err << "Could not find nor create MCalibrationIntensityChargeCam abort... " << endl;
    195         return kFALSE;
    196       }
    197    
    198     if (!fIntensQE)
    199       {
    200         *fLog << err << "Could not find nor create MCalibrationIntensityQECam abort... " << endl;
    201         return kFALSE;
    202       }
    203    
    204200    if (!fChargeCalc)
    205201      {
     
    388384  const Int_t runnumber = fRunHeader->GetRunNumber();
    389385
     386  // The "DeleteOldCam" function must not delete the first entry in
     387  // the array because it is a special cam from the MParList. (see above)
     388
    390389  if (fIntensBad)
    391     {
     390  {
     391      *fLog << "MBadPixelsCam...";
     392      MBadPixelsCam *cold = fIntensBad->GetCam();
    392393      fIntensBad->AddToList(Form("MBadPixelsCam%04d",fNumCam),*fGeom);
    393       *fLog << "MBadPixelsCam...";
    394     }
     394      if (cold)
     395          fIntensBad->DeleteOldCam(cold);
     396  }
    395397
    396398  if (fIntensCharge)
    397     {
     399  {
     400        *fLog << "MCalibrationChargeCam...";
    398401        MCalibrationChargeCam *cold = (MCalibrationChargeCam*)fIntensCharge->GetCam();
    399402
     
    404407
    405408        if (cold)
     409        {
    406410            cnew->MergeHiLoConversionFactors(*cold);
    407 
    408       *fLog << "MCalibrationChargeCam...";
    409     }
     411            fIntensCharge->DeleteOldCam(cold);
     412        }
     413  }
     414
    410415  if (fIntensQE)
    411     {
     416  {
     417      *fLog << "MCalibrationQECam...";
     418      MCalibrationCam *cold = fIntensQE->GetCam();
    412419      fIntensQE->AddToList(Form("MCalibrationQECam%04d",fNumCam),*fGeom);
    413420      fIntensQE->GetCam()->SetRunNumber(runnumber);
    414       *fLog << "MCalibrationQECam...";
    415     }
     421      if (cold)
     422          fIntensQE->DeleteOldCam(cold);
     423  }
    416424  if (fIntensBlind)
    417     {
     425  {
     426      *fLog << "MCalibrationBlindCam...";
     427      MCalibrationCam *cold = fIntensBlind->GetCam();
    418428      fIntensBlind->AddToList(Form("MCalibrationBlindCam%04d",fNumCam),*fGeom);
    419429      fIntensBlind->GetCam()->SetRunNumber(runnumber);
    420       *fLog << "MCalibrationBlindCam...";
    421     }
     430      if (cold)
     431          fIntensBlind->DeleteOldCam(cold);
     432  }
    422433
    423434  *fLog << endl;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.cc

    r7804 r8140  
    289289// Get camera with name 'name'
    290290//
     291/*
    291292MCalibrationCam *MCalibrationIntensityCam::GetCam(const char *name)
    292293{
     
    302303  return static_cast<MCalibrationCam*>(fCams->FindObject(name));
    303304}
    304 
     305*/
    305306// --------------------------------------------------------------------------
    306307//
  • trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.h

    r7189 r8140  
    4242  void AddHist(const MHCalibrationCam *cam);
    4343
    44   Int_t CountNumEntries(const MCalibrationCam::PulserColor_t col) const; 
     44  Int_t CountNumEntries(const MCalibrationCam::PulserColor_t col) const;
    4545
    4646  const Int_t GetSize() const  { return fCams->GetSize();  }
     
    5757  const MBadPixelsPix   &GetAverageBadSector ( UInt_t i )  const   { return GetCam()->GetAverageBadSector(i); }
    5858
    59         MCalibrationCam *GetCam              ( Int_t i=-1)       {
    60         return static_cast<MCalibrationCam*>(i==-1 ? fCams->Last() : fCams->At(i)); }
    61   const MCalibrationCam *GetCam              ( Int_t i=-1) const {
    62         return static_cast<MCalibrationCam*>(i==-1 ? fCams->Last() : fCams->At(i)); }
     59  MCalibrationCam *GetCam              ( Int_t i/*=-1*/)       {
     60      return static_cast<MCalibrationCam*>(i==-1 ? fCams->Last() : fCams->At(i)); }
     61  const MCalibrationCam *GetCam              ( Int_t i/*=-1*/) const {
     62      return static_cast<MCalibrationCam*>(i==-1 ? fCams->Last() : fCams->At(i)); }
    6363
    64         MCalibrationCam *GetCam              ( const char *name );
    65   const MCalibrationCam *GetCam              ( const char *name ) const;
     64  MCalibrationCam *GetCam() { return static_cast<MCalibrationCam*>(fCams->Last()); }
     65  const MCalibrationCam *GetCam() const { return static_cast<MCalibrationCam*>(fCams->Last()); }
     66
     67//        MCalibrationCam *GetCam              ( const char *name );
     68//  const MCalibrationCam *GetCam              ( const char *name ) const;
     69
     70  // The "DeleteOldCam" function must not delete the first entry in
     71  // the array because it is a special cam from the MParList. (see above)
     72  void DeleteOldCam(MCalibrationCam *cam) { /* if (fCams->IndexOf(cam)>0) delete fCams->Remove(cam);*/ }
    6673
    6774        MHCalibrationCam *GetHist            ( Int_t i=-1);     
Note: See TracChangeset for help on using the changeset viewer.