BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/TrigEvent/include/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 ) {
26 for ( int i = 0; i < 48; i++ ) m_trigcond[i] = cond[i];
27 }
28 void setTrigChannel( int i, int j ) { m_trigChan[i] = j; }
29 void setTrigChannel( const int* chan ) {
30 for ( int i = 0; i < 16; i++ ) m_trigChan[i] = chan[i];
31 }
32 void setTimeWindow( int i ) { m_timeWindow = i; }
33 void setTimingType( int i ) { m_Timing = i; }
34 void setPreScale( bool i ) { m_preScale = i; }
35
36 const std::string getTrigCondName( int i ) const { return s_CONDITIONS[i]; }
37 const int getTrigCondition( int i ) const { return m_trigcond[i]; }
38 const int* getTrigCondition() const { return m_trigcond; }
39 const int getTrigChannel( int i ) const { return m_trigChan[i]; }
40 const int* getTrigChannel() const { return m_trigChan; }
41 const int getTimeWindow() const { return m_timeWindow; }
42 const int getTimingType() const { return m_Timing; }
43 const bool getPreScale() const { return m_preScale; }
44
45 void print() const;
46
47private:
48 int m_trigcond[48]; // Trigger conditions from 0 to 47
49 int m_trigChan[16]; // Trigger channel from 0 to 15
50 int m_timeWindow; // The time window of trigger system
51 int m_Timing; // Time type, 0: No timing 1: TOF 2: MDC 3: EMC
52 bool m_preScale; // PreScale for bhabha events
53
54 static const std::string s_CONDITIONS[48]; // The name of each trigger condition
55};
56
57#endif // EVENT_TRIG_DATA_H
const CLID & CLID_TrigData
const CLID & CLID_TrigData
const int getTrigCondition(int i) const
void print() const
Definition TrigData.cxx:65
const int getTrigChannel(int i) const
void setTrigCondition(const int *cond)
const std::string getTrigCondName(int i) const
virtual const CLID & clID() const