BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
RAWEVENT.h
Go to the documentation of this file.
1#ifndef _RAWEVENT_h_
2#define _RAWEVENT_h_
3
4#include <stdint.h>
5#include <vector>
7
8class RAWEVENT
9{
10public:
12 {
13 public:
16 void setRunNo(uint32_t runno) { m_run_number = runno; }
17 void setEventNo(uint32_t eventno) { m_event_number = eventno; }
18 void setTime(uint32_t time) { m_time = time; }
19 void setFlag1(uint32_t flag1) { m_flag1 = flag1; }
20 void setFlag2(uint32_t flag2) { m_flag2 = flag2; }
21
22 uint32_t run_number() const { return m_run_number; }
23 uint32_t event_number() const { return m_event_number; }
24 uint32_t time() const { return m_time; }
25 uint32_t event_type() const { return m_event_type; }
26 uint32_t flag1() const { return m_flag1; }
27 uint32_t flag2() const { return m_flag2; }
28
29 private:
30 uint32_t m_run_number;
31 uint32_t m_event_number;
32 uint32_t m_time;
33 uint32_t m_event_type;
34
35 uint32_t m_flag1;
36 uint32_t m_flag2;
37 };
38
39 RAWEVENT();
40 virtual ~RAWEVENT() {}
41
42 typedef std::vector<uint32_t> int_vector;
43
44 //modifier
45 void reset();
46 void setRunNo(uint32_t run_no) { m_eventHeader.setRunNo(run_no); }
47 void setEventNo(uint32_t event_no) { m_eventHeader.setEventNo(event_no); }
48 void setTime(uint32_t time) { m_eventHeader.setTime(time); }
49 void setFlag1(uint32_t flag1) { m_eventHeader.setFlag1(flag1); }
50 void setFlag2(uint32_t flag2) { m_eventHeader.setFlag2(flag2); }
51
52 // add digi
53 void addReMdcDigi(uint32_t* digi, uint32_t size) {
54 m_bufMdcDigi.addBuffer(digi, size);
55 }
56 void addReEmcDigi(uint32_t* digi, uint32_t size) {
57 m_bufEmcDigi.addBuffer(digi, size);
58 }
59 void addReTofDigi(uint32_t* digi, uint32_t size) {
60 m_bufTofDigi.addBuffer(digi, size);
61 }
62 void addReMucDigi(uint32_t* digi, uint32_t size) {
63 m_bufMucDigi.addBuffer(digi, size);
64 }
65 void addReTrigGTD(uint32_t* digi, uint32_t size) {
66 m_bufTrigGTD.addBuffer(digi, size);
67 }
68 void addReHltRaw(uint32_t* digi, uint32_t size) {
69 m_bufHltRaw.addBuffer(digi, size);
70 }
71
72 // add MC data
73 void addMcParticle(uint32_t* buf, uint32_t size) {
74 m_bufMcPar.addBuffer(buf, size);
75 }
76
77 // should be replaced in future
78 void setReMdcTruth(int_vector& ReMdcTruth) { m_ReMdcTruth = ReMdcTruth; }
79 void setReEmcTruth(int_vector& ReEmcTruth) { m_ReEmcTruth = ReEmcTruth; }
80 void setReTofTruth(int_vector& ReTofTruth) { m_ReTofTruth = ReTofTruth; }
81 void setReMucTruth(int_vector& ReMucTruth) { m_ReMucTruth = ReMucTruth; }
82
83 //visitor
84 const RawEventHeader& eventHeader() const { return m_eventHeader; }
85
86 const BufferHolder& getMdcBuf() const { return m_bufMdcDigi; }
87 const BufferHolder& getTofBuf() const { return m_bufTofDigi; }
88 const BufferHolder& getEmcBuf() const { return m_bufEmcDigi; }
89 const BufferHolder& getMucBuf() const { return m_bufMucDigi; }
90 const BufferHolder& getGTDBuf() const { return m_bufTrigGTD; }
91 const BufferHolder& getHltBuf() const { return m_bufHltRaw; }
92
93 const BufferHolder& getMcParBuf() const { return m_bufMcPar; }
94
95 // should be replaced in future
96 const int_vector& getMdcTruth() const { return m_ReMdcTruth; }
97 const int_vector& getEmcTruth() const { return m_ReEmcTruth; }
98 const int_vector& getTofTruth() const { return m_ReTofTruth; }
99 const int_vector& getMucTruth() const { return m_ReMucTruth; }
100
101private:
102 RawEventHeader m_eventHeader;
103
104 // real data
105 BufferHolder m_bufMdcDigi;
106 BufferHolder m_bufTofDigi;
107 BufferHolder m_bufEmcDigi;
108 BufferHolder m_bufMucDigi;
109 BufferHolder m_bufTrigGTD;
110 BufferHolder m_bufHltRaw;
111
112 // mc data
113 BufferHolder m_bufMcPar;
114
115 // should be replaced in future
116 int_vector m_ReMdcTruth;
117 int_vector m_ReEmcTruth;
118 int_vector m_ReTofTruth;
119 int_vector m_ReMucTruth;
120};
121
122#endif // _RAWEVENT_h_
Double_t time
void addBuffer(uint32_t *buffer, uint32_t size)
uint32_t flag2() const
Definition: RAWEVENT.h:27
uint32_t event_type() const
Definition: RAWEVENT.h:25
void setEventNo(uint32_t eventno)
Definition: RAWEVENT.h:17
uint32_t flag1() const
Definition: RAWEVENT.h:26
uint32_t run_number() const
Definition: RAWEVENT.h:22
void setFlag2(uint32_t flag2)
Definition: RAWEVENT.h:20
void setRunNo(uint32_t runno)
Definition: RAWEVENT.h:16
uint32_t event_number() const
Definition: RAWEVENT.h:23
void setFlag1(uint32_t flag1)
Definition: RAWEVENT.h:19
uint32_t time() const
Definition: RAWEVENT.h:24
void setTime(uint32_t time)
Definition: RAWEVENT.h:18
void addReTofDigi(uint32_t *digi, uint32_t size)
Definition: RAWEVENT.h:59
void setFlag1(uint32_t flag1)
Definition: RAWEVENT.h:49
void setRunNo(uint32_t run_no)
Definition: RAWEVENT.h:46
const BufferHolder & getHltBuf() const
Definition: RAWEVENT.h:91
const int_vector & getTofTruth() const
Definition: RAWEVENT.h:98
const BufferHolder & getMcParBuf() const
Definition: RAWEVENT.h:93
std::vector< uint32_t > int_vector
Definition: RAWEVENT.h:42
void setReMdcTruth(int_vector &ReMdcTruth)
Definition: RAWEVENT.h:78
void addReMdcDigi(uint32_t *digi, uint32_t size)
Definition: RAWEVENT.h:53
void addReTrigGTD(uint32_t *digi, uint32_t size)
Definition: RAWEVENT.h:65
const BufferHolder & getEmcBuf() const
Definition: RAWEVENT.h:88
void addReMucDigi(uint32_t *digi, uint32_t size)
Definition: RAWEVENT.h:62
const BufferHolder & getGTDBuf() const
Definition: RAWEVENT.h:90
void addMcParticle(uint32_t *buf, uint32_t size)
Definition: RAWEVENT.h:73
RAWEVENT()
Definition: RAWEVENT.cxx:3
void setReEmcTruth(int_vector &ReEmcTruth)
Definition: RAWEVENT.h:79
const BufferHolder & getMdcBuf() const
Definition: RAWEVENT.h:86
void setReMucTruth(int_vector &ReMucTruth)
Definition: RAWEVENT.h:81
const RawEventHeader & eventHeader() const
Definition: RAWEVENT.h:84
const BufferHolder & getMucBuf() const
Definition: RAWEVENT.h:89
const BufferHolder & getTofBuf() const
Definition: RAWEVENT.h:87
void setTime(uint32_t time)
Definition: RAWEVENT.h:48
const int_vector & getEmcTruth() const
Definition: RAWEVENT.h:97
const int_vector & getMucTruth() const
Definition: RAWEVENT.h:99
virtual ~RAWEVENT()
Definition: RAWEVENT.h:40
const int_vector & getMdcTruth() const
Definition: RAWEVENT.h:96
void setEventNo(uint32_t event_no)
Definition: RAWEVENT.h:47
void setFlag2(uint32_t flag2)
Definition: RAWEVENT.h:50
void addReEmcDigi(uint32_t *digi, uint32_t size)
Definition: RAWEVENT.h:56
void addReHltRaw(uint32_t *digi, uint32_t size)
Definition: RAWEVENT.h:68
void reset()
Definition: RAWEVENT.cxx:6
void setReTofTruth(int_vector &ReTofTruth)
Definition: RAWEVENT.h:80