CMS 3D CMS Logo

MsgHeader.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_MsgHeader_h
2 #define IOPool_Streamer_MsgHeader_h
3 
5 // as it is in memory of file
6 struct Header {
7  Header(uint32 code, uint32 size) : code_(code) { convert(size, size_); }
8 
9  uint8 code_; // type of the message
10  char_uint32 size_; // of entire message including all headers
11 
12  // 20-Jul-2006, KAB: added enumeration for message types
13  enum Codes {
14  INVALID = 0,
15  INIT = 1,
16  EVENT = 2,
17  DONE = 3, // EOFRECORD = 4 is no longer used
22  DQM_INIT = 9,
23  DQM_EVENT = 10,
25  INIT_SET = 12,
29  SPARE1 = 16,
30  SPARE2 = 17
31  };
32 };
33 
34 // as we need to see it
35 class HeaderView {
36 public:
37  HeaderView(void* buf) {
38  Header* h = (Header*)buf;
39  code_ = h->code_;
40  size_ = convert32(h->size_);
41  }
42 
43  uint32 code() const { return code_; }
44  uint32 size() const { return size_; }
45 
46 private:
49 };
50 
51 #endif
size
Write out results.
uint32 code_
Definition: MsgHeader.h:47
HeaderView(void *buf)
Definition: MsgHeader.h:37
uint32 size() const
Definition: MsgHeader.h:44
def convert(infile, ofile)
unsigned int uint32
Definition: MsgTools.h:13
unsigned char char_uint32[sizeof(uint32)]
Definition: MsgTools.h:16
uint32 code() const
Definition: MsgHeader.h:43
uint8 code_
Definition: MsgHeader.h:9
char_uint32 size_
Definition: MsgHeader.h:10
uint32 convert32(char_uint32 v)
Definition: MsgTools.h:28
unsigned char uint8
Definition: MsgTools.h:11
uint32 size_
Definition: MsgHeader.h:48
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
Header(uint32 code, uint32 size)
Definition: MsgHeader.h:7