Ignore:
Timestamp:
12/15/04 10:25:49 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msignal
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msignal/MArrivalTimeCam.h

    r4274 r5601  
    3232    void Clear(Option_t *o="");
    3333    void SetLogStream(MLog *lg);
     34    void Reset() { Clear(); }
    3435
    3536    void InitSize(const UInt_t i);
  • trunk/MagicSoft/Mars/msignal/MExtractTime.cc

    r5558 r5601  
    110110Int_t MExtractTime::PreProcess(MParList *pList)
    111111{
    112   fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData"));
    113   if (!fRawEvt)
    114     {
    115         *fLog << err << AddSerialNumber("MRawEvtData") << " not found... aborting." << endl;
    116         return kFALSE;
    117     }
    118  
    119   fRunHeader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader"));
    120   if (!fRunHeader)
    121     {
    122       *fLog << err << AddSerialNumber("MRawRunHeader") << " not found... aborting." << endl;
    123       return kFALSE;
    124     }
    125  
    126  
    127112  fArrTime = (MArrivalTimeCam*)pList->FindCreateObj("MArrivalTimeCam",AddSerialNumber(fNameTimeCam));
    128113  if (!fArrTime)
    129114      return kFALSE;
    130115
    131   fPedestals = (MPedestalCam*)pList->FindObject( AddSerialNumber(fNamePedestalCam), "MPedestalCam");
    132   if (!fPedestals)
    133     {
    134       *fLog << err << AddSerialNumber("MPedestalCam") << " not found... aborting" << endl;
    135       return kFALSE;
    136     }
    137  
    138   return kTRUE;
     116  return PreProcessStd(pList);
    139117}
    140118
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc

    r5595 r5601  
    159159Int_t MExtractTimeAndCharge::Process()
    160160{
     161    // This cleaning is nor necessary: It is done automatically by
     162    // Reset() before each execution of the Tasklist (Process())
     163    //  fArrTime->Clear();
     164    //  fSignals->Clear();
    161165
    162166  MRawEvtPixelIter pixel(fRawEvt);
    163   fArrTime->Clear();
    164   fSignals->Clear();
    165167
    166168  while (pixel.Next())
  • trunk/MagicSoft/Mars/msignal/MExtractedSignalCam.h

    r4274 r5601  
    3535    void Clear(Option_t *o="");
    3636    void SetLogStream(MLog *lg);
     37    void Reset() { Clear(); }
    3738
    3839    void InitSize(const UInt_t i);
  • trunk/MagicSoft/Mars/msignal/MExtractor.cc

    r5592 r5601  
    130130}
    131131
     132Int_t MExtractor::PreProcessStd(MParList *pList)
     133{
     134    fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData"));
     135    if (!fRawEvt)
     136    {
     137        *fLog << err << AddSerialNumber("MRawEvtData") << " not found... aborting." << endl;
     138        return kFALSE;
     139    }
     140
     141    fRunHeader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader"));
     142    if (!fRunHeader)
     143    {
     144        *fLog << err << AddSerialNumber("MRawRunHeader") << " not found... aborting." << endl;
     145        return kFALSE;
     146    }
     147
     148
     149    if (fPedestals)
     150        return kTRUE;
     151
     152    fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedestalCam), "MPedestalCam");
     153    if (!fPedestals)
     154    {
     155        *fLog << err << fNamePedestalCam << " not found... aborting" << endl;
     156        return kFALSE;
     157    }
     158
     159    return kTRUE;
     160}
     161
    132162// --------------------------------------------------------------------------
    133163//
     
    144174Int_t MExtractor::PreProcess(MParList *pList)
    145175{
    146 
    147   fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData"));
    148   if (!fRawEvt)
    149     {
    150       *fLog << err << AddSerialNumber("MRawEvtData") << " not found... aborting." << endl;
    151       return kFALSE;
    152     }
    153  
    154   fRunHeader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader"));
    155   if (!fRunHeader)
    156     {
    157       *fLog << err << AddSerialNumber("MRawRunHeader") << " not found... aborting." << endl;
    158       return kFALSE;
    159     }
    160  
    161 
    162   if (!fPedestals)
    163     {
    164       fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedestalCam), "MPedestalCam");
    165       if (!fPedestals)
    166         {
    167           *fLog << err << fNamePedestalCam << " not found... aborting" << endl;
    168           return kFALSE;
    169         }
    170     }
    171  
    172   fSignals = (MExtractedSignalCam*)pList->FindCreateObj("MExtractedSignalCam",AddSerialNumber(fNameSignalCam));
    173   if (!fSignals)
    174       return kFALSE;
    175  
    176   return kTRUE;
     176    fSignals = (MExtractedSignalCam*)pList->FindCreateObj("MExtractedSignalCam",AddSerialNumber(fNameSignalCam));
     177    if (!fSignals)
     178        return kFALSE;
     179
     180    return PreProcessStd(pList);
    177181}
    178182
  • trunk/MagicSoft/Mars/msignal/MExtractor.h

    r5592 r5601  
    6262  virtual void FindSignalLoGain(Byte_t *firstused, Float_t &sum, Byte_t &sat) const { }
    6363 
     64  Int_t   PreProcessStd(MParList *pList);
    6465  Int_t   PreProcess( MParList *pList );
    6566  Bool_t  ReInit    ( MParList *pList );
Note: See TracChangeset for help on using the changeset viewer.