CMS 3D CMS Logo

InitMessage.h
Go to the documentation of this file.
1 
33 #ifndef IOPool_Streamer_InitMessage_h
34 #define IOPool_Streamer_InitMessage_h
35 
38 
39 struct Version
40 {
42  { std::copy(pset,pset+sizeof(pset_id_),&pset_id_[0]); }
43 
44  uint8 protocol_; // version of the protocol
45  unsigned char pset_id_[16]; // parameter set ID
46 };
47 
48 struct InitHeader
49 {
50  InitHeader(const Header& h, uint32 run, const Version& v,
51  uint32 init_header_size=0, uint32 event_header_size=0):
52  header_(h),version_(v)
53  {
54  convert(run,run_);
55  convert(init_header_size, init_header_size_);
56  convert(event_header_size, event_header_size_);
57  }
58 
64 };
65 
67 {
68 public:
69 
70  InitMsgView(void* buf);
71 
72  uint32 code() const { return head_.code(); }
73  uint32 size() const { return head_.size(); }
74  uint8* startAddress() const { return buf_; }
75 
76  uint32 run() const;
77  uint32 protocolVersion() const;
78  void pset(uint8* put_here) const;
79  std::string releaseTag() const;
80  std::string processName() const;
81  std::string outputModuleLabel() const;
82  uint32 outputModuleId() const { return outputModuleId_; }
83 
84  void hltTriggerNames(Strings& save_here) const;
85  void hltTriggerSelections(Strings& save_here) const;
86  void l1TriggerNames(Strings& save_here) const;
87 
88  uint32 get_hlt_bit_cnt() const { return hlt_trig_count_; }
89  uint32 get_l1_bit_cnt() const { return l1_trig_count_; }
90 
91  // needed for streamer file
92  uint32 descLength() const { return desc_len_; }
93  const uint8* descData() const { return desc_start_; }
94  uint32 headerSize() const {return desc_start_-buf_;}
95  uint32 eventHeaderSize() const;
96  uint32 adler32_chksum() const {return adler32_chksum_;}
97  std::string hostName() const;
98  uint32 hostName_len() const {return host_name_len_;}
99 
100 private:
103 
104  uint8* release_start_; // points to the string
106 
107  uint8* processName_start_; // points to the string
109 
110  uint8* outputModuleLabel_start_; // points to the string
113 
114  uint8* hlt_trig_start_; // points to the string
115  uint32 hlt_trig_count_; // number of strings
116  uint32 hlt_trig_len_; // length of strings character array only
117  uint8* hlt_select_start_; // points to the string
118  uint32 hlt_select_count_; // number of strings
119  uint32 hlt_select_len_; // length of strings character array only
120  uint8* l1_trig_start_; // points to the string
121  uint32 l1_trig_count_; // number of strings
122  uint32 l1_trig_len_; // length of strings character array only
126 
127  // does not need to be present in the message sent over the network,
128  // but is needed for the index file
129  uint8* desc_start_; // point to the bytes
131 };
132 
133 #endif
Header header_
Definition: InitMessage.h:59
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
uint32 hostName_len() const
Definition: InitMessage.h:98
def copy(args, dbName)
const uint8 * descData() const
Definition: InitMessage.h:93
InitHeader(const Header &h, uint32 run, const Version &v, uint32 init_header_size=0, uint32 event_header_size=0)
Definition: InitMessage.h:50
std::vector< std::string > Strings
Definition: MsgTools.h:18
char_uint32 event_header_size_
Definition: InitMessage.h:63
uint32 hlt_select_count_
Definition: InitMessage.h:118
uint8 protocol_
Definition: InitMessage.h:44
uint8 * startAddress() const
Definition: InitMessage.h:74
uint32 release_len_
Definition: InitMessage.h:105
uint8 * desc_start_
Definition: InitMessage.h:129
uint32 hlt_trig_len_
Definition: InitMessage.h:116
uint32 adler32_chksum() const
Definition: InitMessage.h:96
uint32 desc_len_
Definition: InitMessage.h:130
unsigned char pset_id_[16]
Definition: InitMessage.h:45
uint32 l1_trig_len_
Definition: InitMessage.h:122
HeaderView head_
Definition: InitMessage.h:102
uint8 * l1_trig_start_
Definition: InitMessage.h:120
Version version_
Definition: InitMessage.h:60
uint32 outputModuleLabel_len_
Definition: InitMessage.h:111
def convert(infile, ofile)
uint8 * outputModuleLabel_start_
Definition: InitMessage.h:110
uint8 * release_start_
Definition: InitMessage.h:104
Version(const uint8 *pset)
Definition: InitMessage.h:41
unsigned int uint32
Definition: MsgTools.h:13
uint32 host_name_len_
Definition: InitMessage.h:125
unsigned char char_uint32[sizeof(uint32)]
Definition: MsgTools.h:16
uint32 processName_len_
Definition: InitMessage.h:108
uint32 headerSize() const
Definition: InitMessage.h:94
uint32 outputModuleId_
Definition: InitMessage.h:112
uint8 * hlt_trig_start_
Definition: InitMessage.h:114
char_uint32 run_
Definition: InitMessage.h:61
uint8 * host_name_start_
Definition: InitMessage.h:124
uint8 * hlt_select_start_
Definition: InitMessage.h:117
unsigned char uint8
Definition: MsgTools.h:11
uint32 outputModuleId() const
Definition: InitMessage.h:82
uint32 code() const
Definition: InitMessage.h:72
uint8 * buf_
Definition: InitMessage.h:101
uint32 get_hlt_bit_cnt() const
Definition: InitMessage.h:88
uint32 size() const
Definition: InitMessage.h:73
uint32 adler32_chksum_
Definition: InitMessage.h:123
uint32 hlt_trig_count_
Definition: InitMessage.h:115
uint32 descLength() const
Definition: InitMessage.h:92
uint8 * processName_start_
Definition: InitMessage.h:107
uint32 get_l1_bit_cnt() const
Definition: InitMessage.h:89
uint32 l1_trig_count_
Definition: InitMessage.h:121
char_uint32 init_header_size_
Definition: InitMessage.h:62
uint32 hlt_select_len_
Definition: InitMessage.h:119