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