BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/TrigEvent/TrigEvent-00-01-02/TrigEvent/TrigData.h
Go to the documentation of this file.
1#ifndef EVENT_TRIG_DATA_H
2#define EVENT_TRIG_DATA_H
3
4#include <stdint.h> //uint32_t
5#include <string>
6
7#include "GaudiKernel/DataObject.h"
8
9extern const CLID& CLID_TrigData;
10
11//Trigger data struction for physics analysis
12class TrigData : public DataObject {
13public:
14 //constructor 1
16 //constructor 2
17 TrigData(int window, int timing, const int* trigCond, const int* trigChan, bool preScale);
18 //destructor
19 virtual ~TrigData() {}
20
21 virtual const CLID& clID() const { return TrigData::classID(); }
22 static const CLID& classID() { return CLID_TrigData; }
23
24 void setTrigCondition(int i, int j) { m_trigcond[i] = j; }
25 void setTrigCondition(const int* cond) { for(int i = 0; i < 48; i++) m_trigcond[i] = cond[i]; }
26 void setTrigChannel( int i, int j) { m_trigChan[i] = j; }
27 void setTrigChannel(const int* chan) { for(int i = 0; i < 16; i++) m_trigChan[i] = chan[i]; }
28 void setTimeWindow( int i ) { m_timeWindow = i; }
29 void setTimingType( int i ) { m_Timing = i; }
30 void setPreScale( bool i ) { m_preScale = i; }
31
32 const std::string getTrigCondName(int i) const { return s_CONDITIONS[i]; }
33 const int getTrigCondition(int i) const { return m_trigcond[i]; }
34 const int* getTrigCondition() const { return m_trigcond; }
35 const int getTrigChannel(int i) const { return m_trigChan[i]; }
36 const int* getTrigChannel() const { return m_trigChan; }
37 const int getTimeWindow() const { return m_timeWindow; }
38 const int getTimingType() const { return m_Timing; }
39 const bool getPreScale() const { return m_preScale; }
40
41 void print() const;
42
43private:
44 int m_trigcond[48]; //Trigger conditions from 0 to 47
45 int m_trigChan[16]; //Trigger channel from 0 to 15
46 int m_timeWindow; //The time window of trigger system
47 int m_Timing; //Time type, 0: No timing 1: TOF 2: MDC 3: EMC
48 bool m_preScale; //PreScale for bhabha events
49
50 static const std::string s_CONDITIONS[48]; //The name of each trigger condition
51};
52
53#endif // EVENT_TRIG_DATA_H
const CLID & CLID_TrigData
Definition: EventModel.cxx:280
const CLID & CLID_TrigData
Definition: EventModel.cxx:280
void print() const
Definition: TrigData.cxx:68
const std::string getTrigCondName(int i) const