00001 // THiDetector.h. 00002 // author JEP. 00003 // brief Heavy-ion detector base-class. 00004 // version 1.2. 00005 // date July 2004. 00006 // 00007 #ifndef THIDETECTOR_H 00008 #define THIDETECTOR_H 00009 00010 #include <vector> 00011 00012 #include "TDetector.h" 00013 #include "THiCalibration.h" 00014 00015 class TSubEvent; 00016 00017 using std::vector; 00018 00019 class THiDetector : public TDetector { 00020 public: 00021 THiDetector(const Char_t * = "", UInt_t = 1); 00022 THiDetector(const THiDetector &); 00023 virtual ~THiDetector(); 00024 THiDetector & operator=(const THiDetector &); 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 virtual Bool_t PlotTimes(TH2F * = 0, const TCutG * = 0, Bool_t = 1) const; 00032 virtual Bool_t PlotEvT(TH2F * = 0, Float_t = 0, 00033 const TCutG * = 0, Bool_t = 1) const; 00034 void SetCalibration(const Char_t * = 0); 00035 void SetDatabase(const Char_t *); 00036 00037 protected: 00042 vector<const TDataItem<UShort_t> *> fAdcs; 00047 vector<const TDataItem<UShort_t> *> fTdcs; 00050 THiCalibration fCalib; 00051 }; 00052 00053 inline void THiDetector::SetCalibration(const Char_t *detectorName) 00054 { 00073 fCalib.FindCalibration(detectorName ? detectorName : GetName()); 00074 } 00075 00076 inline void THiDetector::SetDatabase(const Char_t *database) 00077 { 00083 fCalib.SetDatabase(database); 00084 } 00085 00086 #endif // THiDetector.h