Ignore:
Timestamp:
02/02/04 15:31:26 (21 years ago)
Author:
moralejo
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc

    r2782 r3004  
    8989}
    9090
     91
     92
    9193// --------------------------------------------------------------------------
    9294//
    93 // Make sure, that there is an MPedestalCam Object in the Parameter List.
     95// Make sure that there is a MPedestalCam object in the parameter list.
    9496//
    95 Int_t MMcPedestalCopy::PreProcess(MParList *pList)
     97Int_t  MMcPedestalCopy::PreProcess(MParList *pList)
    9698{
    97   //
    98   // If it is no MC file skip this function...
    99   //
    100   if (! CheckRunType(pList))
    101     return kTRUE;
     99  if ( ! pList->FindObject(AddSerialNumber("MPedestalCam")) )
     100    pList->FindCreateObj(AddSerialNumber("MPedestalCam"));
    102101
    103   return pList->FindCreateObj(AddSerialNumber("MPedestalCam")) ? kTRUE : kFALSE;
     102  return kTRUE;
    104103}
    105104
     
    115114    //
    116115    if (!CheckRunType(pList))
     116      {
     117        *fLog << inf << "This is no MC file... skipping." << endl;
    117118        return kTRUE;
     119      }
    118120
    119121    //
     
    128130    }
    129131
    130     MPedestalCam *pedcam = (MPedestalCam*)pList->FindCreateObj(AddSerialNumber("MPedestalCam"));
     132    MPedestalCam *pedcam = (MPedestalCam*)pList->FindObject(AddSerialNumber("MPedestalCam"));
    131133    if (!pedcam)
     134      {
     135        *fLog << err << dbginf << "Cannot create " << AddSerialNumber("MPedestalCam") <<"... Exiting." << endl;
     136
    132137        return kFALSE;
     138      }
    133139
    134140    MMcRunHeader *mcrun = (MMcRunHeader*)pList->FindObject("MMcRunHeader");
Note: See TracChangeset for help on using the changeset viewer.