STEER/TFndRunConfiguration.h

00001 // @(#)fROOT/STEER:$Name:  $:$Id: TFndRunConfiguration.h,v 1.8 2007/09/05 11:09:42 Diego_Faso Exp $
00002 // Revision Author: Diego Faso <mailto:faso@to.infn.it>, 2005/06/24
00003 // Original Author: P. Cerello <mailto:cerello@to.infn.it>, 2000
00004 
00005 #ifndef FROOT_TFndRunConfiguration
00006 #define FROOT_TFndRunConfiguration
00007 
00009 //                                                  //
00010 //               TFndRunConfiguration               //
00011 //                                                  //
00012 // Class for run configuration options definition   //
00013 //                                                  //
00015 
00016 #include <TObject.h>
00017 #include "FROOT.h"
00018 
00019 using namespace FROOT;
00020 
00021 class TFndRunConfiguration : public TObject {
00022 
00023  protected:
00024   Int_t fDebugLevel;
00025   Int_t fDebugRawLevel;
00026 
00027   Bool_t fGeb2hdtUsingGUI;
00028   Int_t  fGeb2hdtUpdateEvGap;
00029 
00030   Bool_t fMustFillMonitor[D_STB+1]; // used by geb2hdt
00031   Bool_t fMustSaveHdt; // used by geb2hdt
00032 
00033   // tof
00034   Bool_t fTofPedestalSubtraction;
00035   Bool_t fTofZeroTimeSubtraction;
00036   Bool_t fTofChargeEqualisation;
00037   // lmd
00038   Bool_t fLmdPedestalSubtraction;
00039   Bool_t fLmdZeroTimeSubtraction;
00040   Bool_t fLmdChargeEqualisation;
00041 
00042   // Default values for histograms (binning/X-range)
00043   Float_t fAdcRange[K_N_FND_MON_DETECTORS][2]; // [detector][ADC_histo_start,ADC_histo_stop]
00044   Int_t fAdcBins[K_N_FND_MON_DETECTORS];       // [detector]
00045   Float_t fTdcRange[K_N_FND_MON_DETECTORS][2]; // [detector][ADC_histo_start,ADC_histo_stop]
00046   Int_t fTdcBins[K_N_FND_MON_DETECTORS];       // [detector]
00047 
00048  private:
00049  void SetDefaults();
00050 
00051  public:
00052 
00053   TFndRunConfiguration();
00054   ~TFndRunConfiguration();
00055 
00056   void SetDebugLevel(Int_t debug_lev) { fDebugLevel = debug_lev; }
00057   void SetDebugRawLevel(Int_t debug_raw_lev) { fDebugRawLevel = debug_raw_lev; }
00058   Int_t Debug() { return fDebugLevel; }
00059   Int_t DebugRaw() { return fDebugRawLevel; }
00060 
00061   Bool_t Geb2hdtUsingGUI() { return fGeb2hdtUsingGUI; }
00062   void SetGeb2hdtUsingGUI(const Bool_t &val) { fGeb2hdtUsingGUI = val; }
00063 
00064   Int_t Geb2hdtUpdateEvGap() { return fGeb2hdtUpdateEvGap; }
00065   void SetGeb2hdtUpdateEvGap(const Int_t &val) { fGeb2hdtUpdateEvGap = val; }
00066   
00067   Bool_t GetMustFillMonitor(Int_t det_id) { return fMustFillMonitor[det_id]; }
00068   Bool_t GetMustFillMonitor(EFndMonDetectors det_id) { return fMustFillMonitor[(Int_t)det_id]; }
00069   void SetMustFillMonitor(EFndMonDetectors det_id,const Bool_t &val) { fMustFillMonitor[(Int_t)det_id] = val; }
00070 
00071   Bool_t GetMustSaveHdt() { return fMustSaveHdt; }
00072   void SetMustSaveHdt(const Bool_t &val) { fMustSaveHdt = val; }
00073 
00074   //fGeb2hdtUpdateEvGap
00075 
00076   // Histograms default setup (bins/range)
00077   void SetAdcRange(Int_t detector,Int_t bins,Float_t x_low,Float_t x_hi);
00078   void SetTdcRange(Int_t detector,Int_t bins,Float_t x_low,Float_t x_hi);
00079   void GetAdcRange(Int_t detector,Int_t &bins,Float_t &x_low,Float_t &x_hi);
00080   void GetTdcRange(Int_t detector,Int_t &bins,Float_t &x_low,Float_t &x_hi);
00081 
00082   // tof
00083   void SetTofPedestalSubtraction(Bool_t enable) { fTofPedestalSubtraction = enable; }
00084   void SetTofZeroTimeSubtraction(Bool_t enable) { fTofZeroTimeSubtraction = enable; }
00085   void SetTofChargeEqualisation(Bool_t enable)  { fTofChargeEqualisation  = enable; }
00086 
00087   Bool_t TofPedestalSubtraction() { return fTofPedestalSubtraction; }
00088   Bool_t TofZeroTimeSubtraction() { return fTofZeroTimeSubtraction; }
00089   Bool_t TofChargeEqualisation()  { return fTofChargeEqualisation; }
00090 
00091   // lmd
00092   void SetLmdPedestalSubtraction(Bool_t enable) { fLmdPedestalSubtraction = enable; }
00093   void SetLmdZeroTimeSubtraction(Bool_t enable) { fLmdZeroTimeSubtraction = enable; }
00094   void SetLmdChargeEqualisation(Bool_t enable)  { fLmdChargeEqualisation = enable; }
00095 
00096   Bool_t LmdPedestalSubtraction() { return fLmdPedestalSubtraction; }
00097   Bool_t LmdZeroTimeSubtraction() { return fLmdZeroTimeSubtraction; }
00098   Bool_t LmdChargeEqualisation()  { return fLmdChargeEqualisation; }
00099 
00100   void Print(Option_t * = 0) const;     // Print the current run configuration (overload of TObject method)
00101   ClassDef(TFndRunConfiguration,1)
00102     };
00103  
00104 #endif // FROOT_TFndRunConfiguration

Generated on Tue Oct 16 15:40:48 2007 by  doxygen 1.5.2