Changeset 5552 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
12/03/04 10:52:51 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5551 r5552  
    2626     - fixed some warning about a missing return if __REENTRANT is not
    2727       defined (like in MAC OS X)
     28
     29   * mcalib/MCalibrationChargeCalc.[h,cc]:
     30     - added possibility to set fPedestals directly by pointer
     31     - unfolded some Form statements
    2832
    2933
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r5524 r5552  
    354354Int_t MCalibrationChargeCalc::PreProcess(MParList *pList)
    355355{
    356  
    357   fHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
    358   if (!fHeader)
    359     {
    360       *fLog << err << "MRawEvtHeader not found... abort." << endl;
    361       return kFALSE;
    362     }
    363 
    364   //
    365   // Containers that have to be there.
    366   //
    367   fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedestalCam.Data()), "MPedestalCam");
    368   if (!fPedestals)
    369     {
    370       *fLog << err << fNamePedestalCam.Data() << " not found... aborting" << endl;
    371       return kFALSE;
    372     }
    373  
    374   fSignal = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
    375   if (!fSignal)
    376     {
    377       *fLog << err << "MExtractedSignalCam not found... aborting" << endl;
    378       return kFALSE;
    379     }
    380  
    381 
    382   return kTRUE;
     356    fHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader");
     357    if (!fHeader)
     358    {
     359        *fLog << err << "MRawEvtHeader not found... abort." << endl;
     360        return kFALSE;
     361    }
     362
     363    fSignal = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
     364    if (!fSignal)
     365    {
     366        *fLog << err << "MExtractedSignalCam not found... aborting" << endl;
     367        return kFALSE;
     368    }
     369
     370    if (fPedestals)
     371        return kTRUE;
     372
     373    fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedestalCam), "MPedestalCam");
     374    if (!fPedestals)
     375    {
     376        *fLog << err << fNamePedestalCam << " not found... aborting" << endl;
     377        return kFALSE;
     378    }
     379
     380    return kTRUE;
    383381}
    384382
     
    703701Int_t MCalibrationChargeCalc::PostProcess()
    704702{
     703    fPedestals=NULL;
    705704
    706705  if (GetNumExecutions()==0)
    707706    return kFALSE;
    708 
    709   *fLog << endl;
    710707
    711708  if (fPINDiode)
    712709    if (!fPINDiode->IsValid())
    713710      {
    714         *fLog << warn << GetDescriptor()
    715               << ": MCalibrationChargePINDiode is declared not valid... no PIN Diode method! " << endl;
     711        *fLog << warn << "MCalibrationChargePINDiode is declared not valid... no PIN Diode method! " << endl;
    716712        fPINDiode = NULL;
    717713      }
    718 
    719   *fLog << endl;
    720714
    721715  MCalibrationBlindCam  *blindcam  = fIntensBlind   
     
    760754  if (nvalid == 0)
    761755  {
    762       *fLog << err << GetDescriptor() << ": All pixels have non-valid calibration. "
     756      *fLog << err << "All pixels have non-valid calibration. "
    763757            << "Did you forget to fill the histograms "
    764758            << "(filling MHCalibrationChargeCam from MExtractedSignalCam using MFillH) ? " << endl;
    765       *fLog << err << GetDescriptor() << ": Or, maybe, you have used a pedestal run "
     759      *fLog << err << "Or, maybe, you have used a pedestal run "
    766760            << "instead of a calibration run " << endl;
    767761      return kFALSE;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h

    r5515 r5552  
    196196      : CLRBIT(fCheckFlags,kCheckOscillations); }
    197197
    198   void SetDebug             ( const Bool_t  b=kTRUE                    ) { b ? SETBIT(fFlags, kDebug)
    199                                                                              : CLRBIT(fFlags, kDebug); }
     198  void SetDebug             ( const Bool_t  b=kTRUE                    ) { b ? SETBIT(fFlags, kDebug) : CLRBIT(fFlags, kDebug); }
     199
     200  void SetPedestals(MPedestalCam *cam) { fPedestals=cam; }
     201                                                                         
    200202  void SetFFactorErrLimit   ( const Float_t f=fgFFactorErrLimit        ) { fFFactorErrLimit   = f;     }
    201203  void SetLambdaErrLimit    ( const Float_t f=fgLambdaErrLimit         ) { fLambdaErrLimit    = f;     }
Note: See TracChangeset for help on using the changeset viewer.