File indexing completed on 2024-05-31 04:19:41
0001 #ifndef IOPool_Streamer_MsgHeader_h
0002 #define IOPool_Streamer_MsgHeader_h
0003
0004 #include "IOPool/Streamer/interface/MsgTools.h"
0005
0006 namespace edm::streamer {
0007 struct Header {
0008 Header(uint32 code, uint32 size) : code_(code) { convert(size, size_); }
0009
0010 uint8 code_;
0011 char_uint32 size_;
0012
0013
0014 enum Codes {
0015 INVALID = 0,
0016 INIT = 1,
0017 EVENT = 2,
0018 DONE = 3,
0019 HEADER_REQUEST = 5,
0020 EVENT_REQUEST = 6,
0021 CONS_REG_REQUEST = 7,
0022 CONS_REG_RESPONSE = 8,
0023 DQM_INIT = 9,
0024 DQM_EVENT = 10,
0025 DQMEVENT_REQUEST = 11,
0026 INIT_SET = 12,
0027 NEW_INIT_AVAILABLE = 13,
0028 ERROR_EVENT = 14,
0029 FILE_CLOSE_REQUEST = 15,
0030 SPARE1 = 16,
0031 SPARE2 = 17,
0032 PADDING = 255
0033 };
0034 };
0035
0036
0037 class HeaderView {
0038 public:
0039 HeaderView(void* buf) {
0040 Header* h = (Header*)buf;
0041 code_ = h->code_;
0042 size_ = convert32(h->size_);
0043 }
0044
0045 uint32 code() const { return code_; }
0046 uint32 size() const { return size_; }
0047
0048 private:
0049 uint32 code_;
0050 uint32 size_;
0051 };
0052 }
0053 #endif