Ignore:
Timestamp:
10/22/04 15:59:02 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msignal
Files:
5 edited

Legend:

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

    r5280 r5307  
    148148Bool_t MExtractTime::ReInit(MParList *pList)
    149149{
    150  
    151   MExtractor::ReInit(pList);
    152 
    153   fArrTime->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fLoGainFirst, fLoGainLast);
    154 
    155   return kTRUE;
    156 }
    157 
    158 
     150    if (!MExtractor::ReInit(pList))
     151        return kFALSE;
     152
     153    fArrTime->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fLoGainFirst, fLoGainLast);
     154
     155    return kTRUE;
     156}
    159157
    160158void MExtractTime::FindTimeHiGain(Byte_t *firstused, Float_t &time, Float_t &dtime,
  • 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}
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h

    r5242 r5307  
    1313  static const Float_t fgLoGainStartShift; // Default for fLoGainStartShift (now set to: -2.8)
    1414 
    15   Byte_t  fLoGainFirstSave;        // Temporary variable to store the original position of low-gain start slice
     15  Byte_t  fLoGainFirstSave;       //! Temporary variable to store the original position of low-gain start slice
    1616  Float_t fLoGainStartShift;      // Shift to start searching the low-gain signal obtained from the high-gain times.
    1717 
     
    3636 
    3737  void SetLoGainStartShift( const Float_t f=fgLoGainStartShift )  { fLoGainStartShift = f + fOffsetLoGain;  }
     38
     39  void Print(Option_t *o) const;
    3840 
    39   ClassDef(MExtractTimeAndCharge, 0)   // Time And Charge Extractor Base Class
     41  ClassDef(MExtractTimeAndCharge, 1)   // Time And Charge Extractor Base Class
    4042};
    4143
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc

    r5298 r5307  
    940940  return kTRUE;
    941941}
     942
     943void MExtractTimeAndChargeDigitalFilter::Print(Option_t *o) const
     944{
     945    *fLog << all;
     946    *fLog << GetDescriptor() << ":" << endl;
     947
     948    *fLog << " Time Shift HiGain:  " << fTimeShiftHiGain << endl;
     949    *fLog << " Time Shift LoGain:  " << fTimeShiftLoGain << endl;
     950    *fLog << " Window Size HiGain: " << fWindowSizeHiGain << endl;
     951    *fLog << " Window Size LoGain: " << fWindowSizeLoGain << endl;
     952    *fLog << " Binning Res HiGain: " << fBinningResolutionHiGain << endl;
     953    *fLog << " Binning Res LoGain: " << fBinningResolutionHiGain << endl;
     954 
     955    MExtractTimeAndCharge::Print(o);
     956}
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.h

    r5298 r5307  
    8686    fSignalStartBinLoGain = sl;
    8787  }
     88
     89  void Print(Option_t *o) const;
    8890 
    8991  ClassDef(MExtractTimeAndChargeDigitalFilter, 1)   // Hendrik's digital filter
Note: See TracChangeset for help on using the changeset viewer.