BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/RawDataCnv/RawDataCnv-00-05-04/RawDataCnv/EventManagement/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>
6#include "RawDataCnv/Util/BufferHolder.h"
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 void addReEtfDigi(uint32_t* digi, uint32_t size) {
75 m_bufEtfDigi.addBuffer(digi, size);
76 }
77 void addReEtsDigi(uint32_t* digi, uint32_t size) {
78 m_bufEtsDigi.addBuffer(digi, size);
79 }
80
81 // add MC data
82 void addMcParticle(uint32_t* buf, uint32_t size) {
83 m_bufMcPar.addBuffer(buf, size);
84 }
85
86 // should be replaced in future
87 void setReMdcTruth(int_vector& ReMdcTruth) { m_ReMdcTruth = ReMdcTruth; }
88 void setReEmcTruth(int_vector& ReEmcTruth) { m_ReEmcTruth = ReEmcTruth; }
89 void setReTofTruth(int_vector& ReTofTruth) { m_ReTofTruth = ReTofTruth; }
90 void setReMucTruth(int_vector& ReMucTruth) { m_ReMucTruth = ReMucTruth; }
91
92 //visitor
93 const RawEventHeader& eventHeader() const { return m_eventHeader; }
94
95 const BufferHolder& getMdcBuf() const { return m_bufMdcDigi; }
96 const BufferHolder& getTofBuf() const { return m_bufTofDigi; }
97 const BufferHolder& getEmcBuf() const { return m_bufEmcDigi; }
98 const BufferHolder& getMucBuf() const { return m_bufMucDigi; }
99 const BufferHolder& getGTDBuf() const { return m_bufTrigGTD; }
100 const BufferHolder& getZddBuf() const { return m_bufZddDigi; }
101 const BufferHolder& getHltBuf() const { return m_bufHltRaw; }
102 const BufferHolder& getEtfBuf() const { return m_bufEtfDigi; }
103 const BufferHolder& getEtsBuf() const { return m_bufEtsDigi; }
104
105 const BufferHolder& getMcParBuf() const { return m_bufMcPar; }
106
107 // should be replaced in future
108 const int_vector& getMdcTruth() const { return m_ReMdcTruth; }
109 const int_vector& getEmcTruth() const { return m_ReEmcTruth; }
110 const int_vector& getTofTruth() const { return m_ReTofTruth; }
111 const int_vector& getMucTruth() const { return m_ReMucTruth; }
112
113private:
114 RawEventHeader m_eventHeader;
115
116 // real data
117 BufferHolder m_bufMdcDigi;
118 BufferHolder m_bufTofDigi;
119 BufferHolder m_bufEmcDigi;
120 BufferHolder m_bufMucDigi;
121 BufferHolder m_bufTrigGTD;
122 BufferHolder m_bufZddDigi;
123 BufferHolder m_bufHltRaw;
124 BufferHolder m_bufEtfDigi;
125 BufferHolder m_bufEtsDigi;
126
127 // mc data
128 BufferHolder m_bufMcPar;
129
130 // should be replaced in future
131 int_vector m_ReMdcTruth;
132 int_vector m_ReEmcTruth;
133 int_vector m_ReTofTruth;
134 int_vector m_ReMucTruth;
135};
136
137#endif // _RAWEVENT_h_
Double_t time
void addBuffer(uint32_t *buffer, uint32_t size)
RAWEVENT()
Definition: RAWEVENT.cxx:3
void reset()
Definition: RAWEVENT.cxx:6