CMS 3D CMS Logo

FRDEventMessage.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_FRDEventMessage_h
2 #define IOPool_Streamer_FRDEventMessage_h
3 
71 
72 #include <array>
73 
82 };
83 
91 };
92 
102 };
103 
112 };
113 
119 };
120 
124 };
125 
127 
128 constexpr size_t FRDHeaderMaxVersion = 6;
129 constexpr std::array<uint32, FRDHeaderMaxVersion + 1> FRDHeaderVersionSize{{0,
130  2 * sizeof(uint32),
131  (4 + 1024) * sizeof(uint32),
132  7 * sizeof(uint32),
133  8 * sizeof(uint32),
134  6 * sizeof(uint32),
135  6 * sizeof(uint32)}};
136 
138 public:
139  FRDEventMsgView(void* buf);
140 
141  uint8* startAddress() const { return buf_; }
142  void* payload() const { return payload_; }
143  uint32 size() const { return size_; }
144 
145  uint16 version() const { return version_; }
146  uint16 flags() const { return flags_; }
147  uint32 run() const { return run_; }
148  uint32 lumi() const { return lumi_; }
149  uint64 event() const { return event_; }
150  uint32 eventSize() const { return eventSize_; }
151  uint32 paddingSize() const { return paddingSize_; }
152  uint32 adler32() const { return adler32_; }
153  uint32 crc32c() const { return crc32c_; }
154 
155  bool isRealData() const { return !(flags_ & FRDEVENT_MASK_ISGENDATA); }
156 
157 private:
159  void* payload_;
170 };
171 
172 #endif
uint32 adler32() const
uint32 size() const
uint32 paddingSize() const
uint8 * startAddress() const
constexpr size_t FRDHeaderMaxVersion
uint16 flags() const
FRDEventMsgView(void *buf)
bool isRealData() const
uint32 run() const
uint32 crc32c() const
uint32 eventSize() const
uint64 event() const
unsigned short uint16
Definition: MsgTools.h:12
unsigned int uint32
Definition: MsgTools.h:13
unsigned long long uint64
Definition: MsgTools.h:14
void * payload() const
unsigned char uint8
Definition: MsgTools.h:11
const uint16 FRDEVENT_MASK_ISGENDATA
uint32 lumi() const
constexpr std::array< uint32, FRDHeaderMaxVersion+1 > FRDHeaderVersionSize
uint16 version() const