Ignore:
Timestamp:
08/24/04 18:15:29 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msignal
Files:
14 edited

Legend:

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

    r4340 r4723  
    282282  out << ");" << endl;
    283283}
     284
     285void MExtractFixedWindow::Print(Option_t *o) const
     286{
     287    *fLog << all;
     288    *fLog << GetDescriptor() << ":" << endl;
     289    MExtractor::Print(o);
     290}
  • trunk/MagicSoft/Mars/msignal/MExtractFixedWindow.h

    r4340 r4723  
    3333
    3434  void SetRange(Byte_t hifirst=0, Byte_t hilast=0, Byte_t lofirst=0, Byte_t lolast=0);
     35
     36  void Print(Option_t *o="") const;
    3537 
    36   ClassDef(MExtractFixedWindow, 0) // Signal Extractor for a fixed extraction window
     38  ClassDef(MExtractFixedWindow, 1) // Signal Extractor for a fixed extraction window
    3739};
    3840
  • trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.cc

    r4722 r4723  
    520520    return rc;
    521521}
     522
     523void MExtractFixedWindowPeakSearch::Print(Option_t *o) const
     524{
     525    *fLog << all;
     526    *fLog << GetDescriptor() << ":" << endl;
     527    *fLog << " Windows: Hi-Gain=" << (int)fHiGainWindowSize << "  Lo-Gain=" << (int)fLoGainWindowSize;
     528    *fLog << "  Peak-Search=" << (int)fPeakSearchWindowSize << endl;
     529    *fLog << " Offset From Window: " << (int)fOffsetFromWindow << endl;
     530    *fLog << " Lo-Gain peak Shift: " << (int)fLoGainPeakShift << endl;
     531    MExtractor::Print(o);
     532}
  • trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.h

    r4722 r4723  
    4545
    4646    void SetLoGainPeakShift(Byte_t shift=fgLoGainPeakShift) { fLoGainPeakShift = shift; }
    47    
    48     ClassDef(MExtractFixedWindowPeakSearch, 0) // Signal Extractor for fixed size trigger-corrected extraction window
     47
     48    void Print(Option_t *o="") const;
     49
     50    ClassDef(MExtractFixedWindowPeakSearch, 1) // Signal Extractor for fixed size trigger-corrected extraction window
    4951};
    5052
  • trunk/MagicSoft/Mars/msignal/MExtractSlidingWindow.h

    r4340 r4723  
    3232                     Byte_t windowl=fgLoGainWindowSize);
    3333
    34   ClassDef(MExtractSlidingWindow, 0) // Signal Extractor for sliding extraction window
     34  ClassDef(MExtractSlidingWindow, 1) // Signal Extractor for sliding extraction window
    3535};
    3636
  • trunk/MagicSoft/Mars/msignal/MExtractTime.cc

    r4608 r4723  
    6969
    7070using namespace std;
     71
    7172const Float_t MExtractTime::fgOffsetLoGain = 1.51;   // 5 ns
     73
    7274// --------------------------------------------------------------------------
    7375//
     
    8385//
    8486MExtractTime::MExtractTime(const char *name, const char *title)
    85   : fArrTime(NULL), fNamePedContainer("MPedestalCam")
     87  : fArrTime(NULL)
    8688{
    8789
     
    108110Int_t MExtractTime::PreProcess(MParList *pList)
    109111{
    110 
    111112  fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData"));
    112113  if (!fRawEvt)
     
    129130 
    130131
    131   fPedestals = (MPedestalCam*)pList->FindObject( AddSerialNumber(fNamePedContainer), "MPedestalCam");
     132  fPedestals = (MPedestalCam*)pList->FindObject( AddSerialNumber(fNamePedestalCam), "MPedestalCam");
    132133  if (!fPedestals)
    133134    {
     
    214215}
    215216
     217// --------------------------------------------------------------------------
     218//
     219// In addition to the resources of the base-class MExtractor:
     220//   MJPedestal.MExtractor.OffsetLoGain: 1.51
     221//
     222Int_t MExtractTime::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     223{
     224    Bool_t rc = kFALSE;
     225
     226    if (IsEnvDefined(env, prefix, "OffsetLoGain", print))
     227    {
     228        fOffsetLoGain = GetEnvValue(env, prefix, "OffsetLoGain", fOffsetLoGain);
     229        rc = kTRUE;
     230    }
     231
     232    rc = MExtractor::ReadEnv(env, prefix, print) ? kTRUE : rc;
     233
     234    return rc;
     235}
     236
     237void MExtractTime::Print(Option_t *o) const
     238{
     239    *fLog << all;
     240    if (IsA()==MExtractTime::Class())
     241        *fLog << GetDescriptor() << ":" << endl;
     242    *fLog << " Offset Lo-Gain=" << fOffsetLoGain << endl;
     243    MExtractor::Print(o);
     244}
  • trunk/MagicSoft/Mars/msignal/MExtractTime.h

    r4586 r4723  
    88class MPedestalPix;
    99class MArrivalTimeCam;
     10
    1011class MExtractTime : public MExtractor
    1112{
    12  
     13private:
    1314  static const Float_t fgOffsetLoGain;  // Default for fOffsetLoGain (now set to 1.51 (= 5ns)
    1415
     16  Int_t  PreProcess(MParList *pList);
     17  Bool_t ReInit(MParList *pList);
     18  Int_t  Process();
     19
    1520protected:
     21  Float_t fOffsetLoGain;     // Offset of the low-gain signal w.r.t. the High-Gain slices
    1622
    17   Float_t fOffsetLoGain;                // Offset of the low-gain signal w.r.t. the High-Gain slices
    18 
    19   MArrivalTimeCam *fArrTime;            // Container with the photons arrival times
    20   TString fNamePedContainer; // name of the 'MPedestalCam' container
     23  MArrivalTimeCam *fArrTime; //! Container with the photons arrival times
    2124 
    22 
    23   virtual Int_t PreProcess(MParList *pList);
    24   virtual Bool_t ReInit(MParList *pList);
    25   virtual Int_t Process();
    26 
    2725  virtual void FindTimeHiGain(Byte_t *firstused, Float_t &time, Float_t &dtime,
    2826                              Byte_t &sat, const MPedestalPix &ped) const;
     
    3028                              Byte_t &sat, const MPedestalPix &ped) const;
    3129
     30  Int_t  ReadEnv(const TEnv &env, TString prefix, Bool_t print);
     31
    3232public:
    33 
    3433  MExtractTime(const char *name=NULL, const char *title=NULL);
    3534
    3635  void SetOffsetLoGain( const Float_t f=fgOffsetLoGain) { fOffsetLoGain = f; }
    37   void SetNamePedContainer(const char *name)    { fNamePedContainer = name; }
    3836
    39  
    40   ClassDef(MExtractTime, 0)   // Arrival Time Extractor Base Class
     37  void Print(Option_t *o) const;
     38
     39  ClassDef(MExtractTime, 1)   // Arrival Time Extractor Base Class
    4140};
    4241
    4342#endif
    44 
    45 
    46 
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h

    r4260 r4723  
    99class MExtractTimeAndCharge : public MExtractTime
    1010{
     11private:
     12  Int_t  PreProcess(MParList *pList);
     13  Bool_t ReInit(MParList *pList);
     14  Int_t  Process();
     15
    1116protected:
    12 
    13   virtual Int_t PreProcess(MParList *pList);
    14   virtual Bool_t ReInit(MParList *pList);
    15   virtual Int_t Process();
    16 
    1717  virtual void FindTimeAndChargeHiGain(Byte_t *firstused, Byte_t *logain, Float_t &sum, Float_t &dsum,
    1818                                       Float_t &time, Float_t &dtime,
  • trunk/MagicSoft/Mars/msignal/MExtractTimeFastSpline.h

    r4284 r4723  
    77
    88class MPedestalPix;
     9
    910class MExtractTimeFastSpline : public MExtractTime
    1011{
    11 
     12private:
    1213  static const Byte_t  fgHiGainFirst;    // Default for fHiGainFirst  (now set to: 2)
    1314  static const Byte_t  fgHiGainLast;     // Default for fHiGainLast   (now set to: 14)
  • trunk/MagicSoft/Mars/msignal/MExtractTimeHighestIntegral.cc

    r4722 r4723  
    324324        SetWindowSize(hw, lw);
    325325
    326     rc = MExtractor::ReadEnv(env, prefix, print) ? kTRUE : rc;
     326    rc = MExtractTime::ReadEnv(env, prefix, print) ? kTRUE : rc;
    327327
    328328    return rc;
    329329}
     330
     331void MExtractTimeHighestIntegral::Print(Option_t *o) const
     332{
     333    *fLog << all;
     334    *fLog << GetDescriptor() << ":" << endl;
     335    *fLog << " Windows: Hi-Gain=" << (int)fHiGainWindowSize << "  Lo-Gain=" << (int)fLoGainWindowSize << endl;
     336    MExtractTime::Print(o);
     337}
  • trunk/MagicSoft/Mars/msignal/MExtractTimeHighestIntegral.h

    r4722 r4723  
    99{
    1010private:
    11 
    1211  static const Byte_t fgHiGainFirst;
    1312  static const Byte_t fgHiGainLast;
     
    3433                     Byte_t windowl=fgLoGainWindowSize);
    3534
    36   ClassDef(MExtractTimeHighestIntegral, 0) // Task to Extract the Arrival Times As the mean time of the fWindowSize time slices
     35  void Print(Option_t *o="") const;
     36
     37  ClassDef(MExtractTimeHighestIntegral, 1) // Task to Extract the Arrival Times As the mean time of the fWindowSize time slices
    3738};
    3839
  • trunk/MagicSoft/Mars/msignal/MExtractTimeSpline.h

    r3943 r4723  
    77
    88class MPedestalPix;
     9
    910class MExtractTimeSpline : public MExtractTime
    1011{
    11 
     12private:
    1213  static const Byte_t fgHiGainFirst;
    1314  static const Byte_t fgHiGainLast;
  • trunk/MagicSoft/Mars/msignal/MExtractor.cc

    r4615 r4723  
    4242//   setup file. For more information see ReadEnv and MEvtLoop::ReadEnv
    4343//
     44//
     45// IMPORTANT: For all classes you derive from MExtractor make sure that:
     46//    - Print() is correctly implemented
     47//    - Clone() works
     48//    - Class Version number != 0 and the I/O works PERFECTLY
     49//    - only data members which are necessary for the setup (not the ones
     50//      created in PreProcess and Process) are written
     51//    - the version number is maintained!
     52//
     53//
    4454// Input Containers:
    4555//   MRawEvtData
     
    7585
    7686const Byte_t  MExtractor::fgSaturationLimit  = 254;
    77 const TString MExtractor::fgNamePedContainer = "MPedestalCam";
     87const TString MExtractor::fgNamePedestalCam = "MPedestalCam";
     88
    7889// --------------------------------------------------------------------------
    7990//
     
    8495// - all variables to 0
    8596// - fSaturationLimit to fgSaturationLimit
    86 // - fNamePedContainer to fgNamePedContainer
     97// - fNamePedestalCam to fgNamePedestalCam
    8798//
    8899// Call:
     
    98109    AddToBranchList("MRawEvtData.*");
    99110
    100     SetNamePedContainer();
     111    SetNamePedestalCam();
    101112    SetRange();
    102113    SetSaturationLimit();
     
    141152   
    142153
     154    fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedestalCam), "MPedestalCam");
     155    if (!fPedestals)
     156    {
     157        *fLog << err << AddSerialNumber("MPedestalCam") << " not found... aborting" << endl;
     158        return kFALSE;
     159    }
     160
    143161    fSignals = (MExtractedSignalCam*)pList->FindCreateObj(AddSerialNumber("MExtractedSignalCam"));
    144162    if (!fSignals)
    145163        return kFALSE;
    146 
    147     fPedestals = (MPedestalCam*)pList->FindObject(AddSerialNumber(fNamePedContainer), "MPedestalCam");
    148     if (!fPedestals)
    149     {
    150         *fLog << err << AddSerialNumber("MPedestalCam") << " not found... aborting" << endl;
    151         return kFALSE;
    152     }
    153164
    154165    return kTRUE;
     
    363374    return rc;
    364375}
     376
     377void MExtractor::Print(Option_t *o) const
     378{
     379    *fLog << all;
     380
     381    if (IsA()==MExtractor::Class())
     382        *fLog << GetDescriptor() << ":" << endl;
     383
     384    *fLog << " Hi Gain Range:  " << (int)fHiGainFirst << " " << (int)fHiGainLast << endl;
     385    *fLog << " Lo Gain Range:  " << (int)fLoGainFirst << " " << (int)fLoGainLast << endl;
     386    *fLog << " Saturation Lim: " << (int)fSaturationLimit << endl;
     387}
  • trunk/MagicSoft/Mars/msignal/MExtractor.h

    r4615 r4723  
    2525
    2626  static const Byte_t  fgSaturationLimit;  //! Default for fSaturationLimit (now set to: 254)
    27   static const TString fgNamePedContainer; //! "MPedestalCam"
     27  static const TString fgNamePedestalCam; //! "MPedestalCam"
    2828 
    2929  MPedestalCam        *fPedestals;         //! Pedestals of all pixels in the camera
    30   MExtractedSignalCam *fSignals;           //  Extracted signal of all pixels in the camera
     30  MExtractedSignalCam *fSignals;           //! Extracted signal of all pixels in the camera
    3131                                       
    3232  MRawEvtData         *fRawEvt;            //! Raw event data (time slices)
     
    4747                                           
    4848  Byte_t   fSaturationLimit;               // Highest FADC slice value until being declared saturated
    49   TString  fNamePedContainer;              // Name of the 'MPedestalCam' container
     49  TString  fNamePedestalCam;              // Name of the 'MPedestalCam' container
    5050 
    5151  virtual void FindSignalHiGain(Byte_t *firstused, Byte_t *lowgain, Float_t &sum, Byte_t &sat) const { }
     
    5959
    6060public:
    61 
    6261  MExtractor(const char *name=NULL, const char *title=NULL);
    6362 
     
    7271
    7372  void SetSaturationLimit  ( Byte_t       lim=fgSaturationLimit        ) { fSaturationLimit  = lim;  }
    74   void SetNamePedContainer ( const char *name=fgNamePedContainer.Data()) { fNamePedContainer = name; }
    75  
    76   ClassDef(MExtractor, 0) // Signal Extractor Base Class
     73  void SetNamePedestalCam ( const char *name=fgNamePedestalCam.Data()) { fNamePedestalCam = name; }
     74
     75  void Print(Option_t *o="") const;
     76
     77  ClassDef(MExtractor, 1) // Signal Extractor Base Class
    7778};
    7879
Note: See TracChangeset for help on using the changeset viewer.