CGEM BOSS 6.6.5.i
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 addReZddDigi(uint32_t* digi, uint32_t size) {
69 m_bufZddDigi.addBuffer(digi, size);
70 }
71 void addReHltRaw(uint32_t* digi, uint32_t size) {
72 m_bufHltRaw.addBuffer(digi, size);
73 }
74
75 // add MC data
76 void addMcParticle(uint32_t* buf, uint32_t size) {
77 m_bufMcPar.addBuffer(buf, size);
78 }
79
80 // should be replaced in future
81 void setReMdcTruth(int_vector& ReMdcTruth) { m_ReMdcTruth = ReMdcTruth; }
82 void setReEmcTruth(int_vector& ReEmcTruth) { m_ReEmcTruth = ReEmcTruth; }
83 void setReTofTruth(int_vector& ReTofTruth) { m_ReTofTruth = ReTofTruth; }
84 void setReMucTruth(int_vector& ReMucTruth) { m_ReMucTruth = ReMucTruth; }
85
86 //visitor
87 const RawEventHeader& eventHeader() const { return m_eventHeader; }
88
89 const BufferHolder& getMdcBuf() const { return m_bufMdcDigi; }
90 const BufferHolder& getTofBuf() const { return m_bufTofDigi; }
91 const BufferHolder& getEmcBuf() const { return m_bufEmcDigi; }
92 const BufferHolder& getMucBuf() const { return m_bufMucDigi; }
93 const BufferHolder& getGTDBuf() const { return m_bufTrigGTD; }
94 const BufferHolder& getZddBuf() const { return m_bufZddDigi; }
95 const BufferHolder& getHltBuf() const { return m_bufHltRaw; }
96
97 const BufferHolder& getMcParBuf() const { return m_bufMcPar; }
98
99 // should be replaced in future
100 const int_vector& getMdcTruth() const { return m_ReMdcTruth; }
101 const int_vector& getEmcTruth() const { return m_ReEmcTruth; }
102 const int_vector& getTofTruth() const { return m_ReTofTruth; }
103 const int_vector& getMucTruth() const { return m_ReMucTruth; }
104
105private:
106 RawEventHeader m_eventHeader;
107
108 // real data
109 BufferHolder m_bufMdcDigi;
110 BufferHolder m_bufTofDigi;
111 BufferHolder m_bufEmcDigi;
112 BufferHolder m_bufMucDigi;
113 BufferHolder m_bufTrigGTD;
114 BufferHolder m_bufZddDigi;
115 BufferHolder m_bufHltRaw;
116
117 // mc data
118 BufferHolder m_bufMcPar;
119
120 // should be replaced in future
121 int_vector m_ReMdcTruth;
122 int_vector m_ReEmcTruth;
123 int_vector m_ReTofTruth;
124 int_vector m_ReMucTruth;
125};
126
127#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:95
const int_vector & getTofTruth() const
Definition RAWEVENT.h:102
std::vector< uint32_t > int_vector
Definition RAWEVENT.h:42
const BufferHolder & getMcParBuf() const
Definition RAWEVENT.h:97
void setReMdcTruth(int_vector &ReMdcTruth)
Definition RAWEVENT.h:81
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:91
void addReMucDigi(uint32_t *digi, uint32_t size)
Definition RAWEVENT.h:62
const BufferHolder & getZddBuf() const
Definition RAWEVENT.h:94
const BufferHolder & getGTDBuf() const
Definition RAWEVENT.h:93
void addReZddDigi(uint32_t *digi, uint32_t size)
Definition RAWEVENT.h:68
void addMcParticle(uint32_t *buf, uint32_t size)
Definition RAWEVENT.h:76
void setReEmcTruth(int_vector &ReEmcTruth)
Definition RAWEVENT.h:82
const BufferHolder & getMdcBuf() const
Definition RAWEVENT.h:89
void setReMucTruth(int_vector &ReMucTruth)
Definition RAWEVENT.h:84
const RawEventHeader & eventHeader() const
Definition RAWEVENT.h:87
const BufferHolder & getMucBuf() const
Definition RAWEVENT.h:92
const BufferHolder & getTofBuf() const
Definition RAWEVENT.h:90
void setTime(uint32_t time)
Definition RAWEVENT.h:48
const int_vector & getEmcTruth() const
Definition RAWEVENT.h:101
const int_vector & getMucTruth() const
Definition RAWEVENT.h:103
virtual ~RAWEVENT()
Definition RAWEVENT.h:40
const int_vector & getMdcTruth() const
Definition RAWEVENT.h:100
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:71
void reset()
Definition RAWEVENT.cxx:6
void setReTofTruth(int_vector &ReTofTruth)
Definition RAWEVENT.h:83