Ignore:
Timestamp:
10/22/04 15:59:02 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc

    r5242 r5307  
    7474
    7575const Float_t MExtractTimeAndCharge::fgLoGainStartShift = -2.8;
     76
    7677// --------------------------------------------------------------------------
    7778//
     
    8384MExtractTimeAndCharge::MExtractTimeAndCharge(const char *name, const char *title)
    8485{
    85 
    86   fName  = name  ? name  : "MExtractTimeAndCharge";
    87   fTitle = title ? title : "Base class for signal and time extractors";
    88  
    89   SetLoGainStartShift();
     86    fName  = name  ? name  : "MExtractTimeAndCharge";
     87    fTitle = title ? title : "Base class for signal and time extractors";
     88
     89    SetLoGainStartShift();
    9090}
    9191
     
    105105Int_t MExtractTimeAndCharge::PreProcess(MParList *pList)
    106106{
    107 
    108   if (!MExtractTime::PreProcess(pList))
    109     return kFALSE;
    110  
    111   fSignals = (MExtractedSignalCam*)pList->FindCreateObj(AddSerialNumber("MExtractedSignalCam"));
    112   if (!fSignals)
    113     {
    114       *fLog << err << GetDescriptor()
    115             << ": Could not find nor create MExtractedSignalCam,... aborting." << endl;
    116       return kFALSE;
    117     }
    118  
    119  
    120   return kTRUE;
     107    if (!MExtractTime::PreProcess(pList))
     108        return kFALSE;
     109
     110    fSignals = (MExtractedSignalCam*)pList->FindCreateObj(AddSerialNumber("MExtractedSignalCam"));
     111    if (!fSignals)
     112        return kFALSE;
     113
     114    return kTRUE;
    121115}
    122116
     
    132126Bool_t MExtractTimeAndCharge::ReInit(MParList *pList)
    133127{
    134  
    135   MExtractTime::ReInit(pList);
    136 
    137   fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
    138                               fLoGainFirst, fLoGainLast, fNumLoGainSamples);
    139 
    140   *fLog << dec << endl;
    141   *fLog << inf << GetDescriptor() << ": Taking " << fNumHiGainSamples
     128    if (!MExtractTime::ReInit(pList))
     129        return kFALSE;
     130
     131    fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,
     132                                fLoGainFirst, fLoGainLast, fNumLoGainSamples);
     133
     134    *fLog << dec << endl;
     135    *fLog << inf << "Taking " << fNumHiGainSamples
    142136        << " HiGain samples from slice " << (Int_t)fHiGainFirst
    143137        << " to " << (Int_t)(fHiGainLast+fHiLoLast) << " incl" << endl;
    144   *fLog << inf << GetDescriptor() << ": Taking " << fNumLoGainSamples
     138    *fLog << inf << "Taking " << fNumLoGainSamples
    145139        << " LoGain samples from slice " << (Int_t)fLoGainFirst
    146140        << " to " << (Int_t)fLoGainLast << " incl" << endl;
    147141
    148   return kTRUE;
     142    return kTRUE;
    149143}
    150144
     
    258252    return MExtractTime::ReadEnv(env, prefix, print) ? kTRUE : rc;
    259253}
     254
     255void MExtractTimeAndCharge::Print(Option_t *o) const
     256{
     257    *fLog << all;
     258    if (IsA()==MExtractTimeAndCharge::Class())
     259        *fLog << GetDescriptor() << ":" << endl;
     260
     261    *fLog << " LoGainStartShift: " << fLoGainStartShift << endl;
     262    MExtractTime::Print(o);
     263}
Note: See TracChangeset for help on using the changeset viewer.