00001 #ifndef RootEventData_TTrigData_H 00002 #define RootEventData_TTrigData_H 1 00003 00004 #include "TObject.h" 00005 00006 using namespace std; 00007 00008 class TTrigData : public TObject { 00009 00010 public: 00011 00012 TTrigData(); 00013 virtual ~TTrigData(); 00014 00015 void Clear(Option_t *option=""); 00016 00017 void Print(Option_t *option="") const; 00018 00019 //Set 00020 void setTrigCondition(int i, int j) { m_trigcond[i] = j; } 00021 void setTrigCondition(const int* cond) { for(int i = 0; i < 48; i++) m_trigcond[i] = cond[i]; } 00022 void setTrigChannel( int i, int j) { m_trigChan[i] = j; } 00023 void setTrigChannel(const int* chan) { for(int i = 0; i < 16; i++) m_trigChan[i] = chan[i]; } 00024 void setTimeWindow( int i ) { m_timeWindow = i; } 00025 void setTimingType( int i ) { m_Timing = i; } 00026 void setPreScale( bool i ) { m_preScale = i; } 00027 00028 //Get 00029 const int getTrigCondition(int i) const { return m_trigcond[i]; } 00030 const int* getTrigCondition() const { return m_trigcond; } 00031 const int getTrigChannel(int i) const { return m_trigChan[i]; } 00032 const int* getTrigChannel() const { return m_trigChan; } 00033 const int getTimeWindow() const { return m_timeWindow; } 00034 const int getTimingType() const { return m_Timing; } 00035 const bool getPreScale() const { return m_preScale; } 00036 00037 private: 00038 Bool_t m_preScale; //PreScale for bhabha events 00039 Int_t m_trigcond[48]; //Trigger conditions from 0 to 47 00040 Int_t m_trigChan[16]; //Trigger channel from 0 to 15 00041 Int_t m_timeWindow; //The time window of trigger system 00042 Int_t m_Timing; //Time type, 0: No timing 1: TOF 2: MDC 3: EMC 00043 00044 ClassDef(TTrigData, 2) 00045 }; 00046 00047 #endif //TrackRootData_TTrigData_H