Changeset 5242 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
10/12/04 13:50:46 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msignal
Files:
2 edited

Legend:

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

    r5241 r5242  
    7373using namespace std;
    7474
     75const Float_t MExtractTimeAndCharge::fgLoGainStartShift = -2.8;
     76// --------------------------------------------------------------------------
     77//
     78// Default constructor.
     79//
     80// Sets:
     81// - fLoGainStartShift to fgLoGainStartShift+fgOffsetLoGain
     82//
     83MExtractTimeAndCharge::MExtractTimeAndCharge(const char *name, const char *title)
     84{
     85
     86  fName  = name  ? name  : "MExtractTimeAndCharge";
     87  fTitle = title ? title : "Base class for signal and time extractors";
     88 
     89  SetLoGainStartShift();
     90}
     91
    7592// --------------------------------------------------------------------------
    7693//
     
    191208        {
    192209          fLoGainFirstSave = fLoGainFirst;
    193           fLoGainFirst     = (Int_t)(timehi+fOffsetLoGain-3.);
     210          fLoGainFirst     = (Int_t)(timehi+fLoGainStartShift);
    194211          fLoGainFirst     = fLoGainFirst < fLoGainFirstSave ? fLoGainFirstSave : fLoGainFirst;
    195212         
     
    223240}
    224241
     242// --------------------------------------------------------------------------
     243//
     244// In addition to the resources of the base-class MExtractor:
     245//   MJPedestal.MExtractor.LoGainStartShift: -2.8
     246//
     247Int_t MExtractTimeAndCharge::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
     248{
     249    Bool_t rc = kFALSE;
     250
     251    if (IsEnvDefined(env, prefix, "LoGainStartShift", print))
     252    {
     253        fLoGainStartShift = GetEnvValue(env, prefix, "LoGainStartShift", fLoGainStartShift);
     254        rc = kTRUE;
     255    }
     256
     257
     258    return MExtractTime::ReadEnv(env, prefix, print) ? kTRUE : rc;
     259}
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h

    r5240 r5242  
    1111private:
    1212
    13   Byte_t fLoGainFirstSave;            // First Low-Gain FADC slice obtained by position of high-gain signal
    14 
     13  static const Float_t fgLoGainStartShift; // Default for fLoGainStartShift (now set to: -2.8)
     14 
     15  Byte_t  fLoGainFirstSave;        // Temporary variable to store the original position of low-gain start slice
     16  Float_t fLoGainStartShift;      // Shift to start searching the low-gain signal obtained from the high-gain times.
     17 
    1518protected:
    1619
     
    2629                                       Byte_t &sat, const MPedestalPix &ped, const Bool_t abflag);
    2730
     31  Int_t  ReadEnv(const TEnv &env, TString prefix, Bool_t print);
     32 
    2833public:
    2934
     35  MExtractTimeAndCharge(const char *name=NULL, const char *title=NULL);
     36 
     37  void SetLoGainStartShift( const Float_t f=fgLoGainStartShift )  { fLoGainStartShift = f + fOffsetLoGain;  }
     38 
    3039  ClassDef(MExtractTimeAndCharge, 0)   // Time And Charge Extractor Base Class
    3140};
Note: See TracChangeset for help on using the changeset viewer.