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 {
9  { convert(size,size_); }
10 
11  uint8 code_; // type of the message
12  char_uint32 size_; // of entire message including all headers
13 
14  // 20-Jul-2006, KAB: added enumeration for message types
15  enum Codes { INVALID = 0, INIT = 1, EVENT = 2, DONE = 3, // EOFRECORD = 4 is no longer used
20  FILE_CLOSE_REQUEST = 15, SPARE1 = 16, SPARE2 = 17 };
21 };
22 
23 // as we need to see it
25 {
26 public:
27  HeaderView(void* buf)
28  {
29  Header* h = (Header*)buf;
30  code_ = h->code_;
31  size_ = convert32(h->size_);
32  }
33 
34  uint32 code() const { return code_; }
35  uint32 size() const { return size_; }
36 private:
39 };
40 
41 #endif
size
Write out results.
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
uint32 code() const
Definition: MsgHeader.h:34
uint32 code_
Definition: MsgHeader.h:37
HeaderView(void *buf)
Definition: MsgHeader.h:27
def convert(infile, ofile)
unsigned int uint32
Definition: MsgTools.h:13
unsigned char char_uint32[sizeof(uint32)]
Definition: MsgTools.h:16
uint8 code_
Definition: MsgHeader.h:11
char_uint32 size_
Definition: MsgHeader.h:12
uint32 size() const
Definition: MsgHeader.h:35
uint32 convert32(char_uint32 v)
Definition: MsgTools.h:30
unsigned char uint8
Definition: MsgTools.h:11
uint32 size_
Definition: MsgHeader.h:38
Header(uint32 code, uint32 size)
Definition: MsgHeader.h:8