00001 // TGrDetector.h. 00002 // author JEP. 00003 // brief Gamma-ray detector base-class. 00004 // version 1.2. 00005 // date July 2004. 00006 // 00007 #ifndef TGRDETECTOR_H 00008 #define TGRDETECTOR_H 00009 00010 #include <vector> 00011 00012 #include "TDetector.h" 00013 #include "TGrCalibration.h" 00014 00015 class TSubEvent; 00016 00017 using std::vector; 00018 00019 class TGrDetector : public TDetector { 00020 public: 00021 TGrDetector(const Char_t * = "", UInt_t = 1); 00022 TGrDetector(const TGrDetector &); 00023 virtual ~TGrDetector(); 00024 TGrDetector & operator=(const TGrDetector &); 00025 virtual void Clear(const Char_t * = ""); 00026 virtual void Print(const Char_t * = "") const; 00027 virtual void PrintData() const; 00028 virtual void SetSignals(const TSubEvent &); 00029 virtual void Calibrate(); 00030 virtual Bool_t PlotEnergies(TH2F * = 0, const TCutG * = 0, Bool_t = 1) const; 00031 Bool_t PlotChannels(TH1F * = 0, Int_t = 0, Int_t = 0, Bool_t = 1) const; 00032 void SetCalibration(const Char_t * = 0); 00033 void SetDatabase(const Char_t *); 00034 00035 protected: 00040 vector<const TDataItem<UShort_t> *> fAdcs; 00045 vector<const TDataItem<UShort_t> *> fLeTdcs; 00051 vector<const TDataItem<UShort_t> *> fCfTdcs; 00054 TGrCalibration fCalib; 00055 }; 00056 00057 inline void TGrDetector::SetCalibration(const Char_t *detectorName) 00058 { 00077 fCalib.FindCalibration(detectorName ? detectorName : GetName()); 00078 } 00079 00080 inline void TGrDetector::SetDatabase(const Char_t *database) 00081 { 00087 fCalib.SetDatabase(database); 00088 } 00089 00090 #endif // TGrDetector.h