#include <IOPool/Streamer/interface/Messages.h>
Public Member Functions | |
void * | data () const |
int | dataSize () const |
EventMsg (void *buffer, int size, edm::EventNumber_t e, edm::RunNumber_t r, int which_seg, int total_segs) | |
EventMsg (void *buffer, int size=0) | |
EventMsg (MsgCode &mc) | |
int | getDataSize () const |
edm::EventNumber_t | getEventNumber () const |
edm::RunNumber_t | getRunNumber () const |
int | getTotalSegs () const |
int | getWhichSeg () const |
int | msgSize () const |
void | setDataSize (int s) |
void | setEventNumber (edm::EventNumber_t e) |
void | setRunNumber (edm::RunNumber_t r) |
void | setTotalSegs (int s) |
void | setWhichSeg (int s) |
Private Attributes | |
int | data_size_ |
edm::EventNumber_t | event_num_ |
Header * | head_ |
edm::RunNumber_t | run_num_ |
int | total_segs_ |
int | which_seg_ |
Classes | |
struct | Header |
Definition at line 121 of file Messages.h.
edm::EventMsg::EventMsg | ( | MsgCode & | mc | ) | [inline] |
Definition at line 134 of file Messages.h.
00134 : 00135 MsgCode(mc), 00136 head_((Header*)MsgCode::payload()), 00137 which_seg_(getWhichSeg()), 00138 total_segs_(getTotalSegs()), 00139 event_num_(getEventNumber()), 00140 run_num_(getRunNumber()), 00141 data_size_(getDataSize()) 00142 { }
Definition at line 145 of file Messages.h.
00145 : 00146 MsgCode(buffer,size), 00147 head_((Header*)MsgCode::payload()), 00148 which_seg_(getWhichSeg()), 00149 total_segs_(getTotalSegs()), 00150 event_num_(getEventNumber()), 00151 run_num_(getRunNumber()), 00152 data_size_(getDataSize()) 00153 { }
edm::EventMsg::EventMsg | ( | void * | buffer, | |
int | size, | |||
edm::EventNumber_t | e, | |||
edm::RunNumber_t | r, | |||
int | which_seg, | |||
int | total_segs | |||
) | [inline] |
Definition at line 156 of file Messages.h.
References data_size_, edm::MsgCode::EVENT, edm::MsgCode::setCode(), setDataSize(), setEventNumber(), setRunNumber(), setTotalSegs(), and setWhichSeg().
00160 : 00161 MsgCode(buffer,size), 00162 head_((Header*)MsgCode::payload()), 00163 which_seg_(which_seg), 00164 total_segs_(total_segs), 00165 event_num_(e), 00166 run_num_(r), 00167 data_size_(payloadSize() - sizeof(Header)) 00168 { 00169 setCode(MsgCode::EVENT); 00170 setWhichSeg(which_seg); 00171 setTotalSegs(total_segs); 00172 setEventNumber(e); 00173 setRunNumber(r); 00174 setDataSize(data_size_); 00175 }
Definition at line 178 of file Messages.h.
References edm::MsgCode::payload().
Referenced by stor::ESRingBuffer::push_back().
int edm::EventMsg::dataSize | ( | ) | const [inline] |
Definition at line 180 of file Messages.h.
References data_size_.
00180 { return data_size_ + sizeof(Header); }
int edm::EventMsg::getDataSize | ( | ) | const [inline] |
Definition at line 182 of file Messages.h.
References edm::EventMsg::Header::data_size_, edm::decodeInt(), and head_.
Referenced by msgSize(), and stor::ESRingBuffer::push_back().
00183 { 00184 return decodeInt(head_->data_size_); 00185 }
edm::EventNumber_t edm::EventMsg::getEventNumber | ( | ) | const [inline] |
Definition at line 212 of file Messages.h.
References edm::decodeInt(), edm::EventMsg::Header::event_num_, and head_.
Referenced by stor::ESRingBuffer::pop_front(), and stor::ESRingBuffer::push_back().
00213 { 00214 assert(sizeof(edm::EventNumber_t) == sizeof(int) && "event ID streaming only knows how to work with 4 byte event ID numbers right now"); 00215 return decodeInt(head_->event_num_); 00216 }
edm::RunNumber_t edm::EventMsg::getRunNumber | ( | ) | const [inline] |
Definition at line 224 of file Messages.h.
References edm::decodeInt(), head_, and edm::EventMsg::Header::run_num_.
Referenced by stor::ESRingBuffer::push_back().
00225 { 00226 assert(sizeof(edm::EventNumber_t) == sizeof(int) && "event ID streaming only knows how to work with 4 byte event ID numbers right now"); 00227 return decodeInt(head_->run_num_); 00228 }
int edm::EventMsg::getTotalSegs | ( | ) | const [inline] |
Definition at line 202 of file Messages.h.
References edm::decodeInt(), head_, and edm::EventMsg::Header::total_segs_.
00203 { 00204 return decodeInt(head_->total_segs_); 00205 }
int edm::EventMsg::getWhichSeg | ( | ) | const [inline] |
Definition at line 192 of file Messages.h.
References edm::decodeInt(), head_, and edm::EventMsg::Header::which_seg_.
00193 { 00194 return decodeInt(head_->which_seg_); 00195 }
int edm::EventMsg::msgSize | ( | ) | const [inline] |
Definition at line 237 of file Messages.h.
References edm::MsgCode::codeSize(), and getDataSize().
Referenced by stor::ESRingBuffer::push_back().
00238 { 00239 return codeSize()+sizeof(Header)+getDataSize(); 00240 }
Definition at line 187 of file Messages.h.
References edm::EventMsg::Header::data_size_, edm::encodeInt(), and head_.
Referenced by EventMsg().
00188 { 00189 encodeInt(s,head_->data_size_); 00190 }
void edm::EventMsg::setEventNumber | ( | edm::EventNumber_t | e | ) | [inline] |
Definition at line 218 of file Messages.h.
References edm::encodeInt(), edm::EventMsg::Header::event_num_, and head_.
Referenced by EventMsg().
00219 { 00220 assert(sizeof(edm::RunNumber_t) == sizeof(int) && "run number streaming only knows how to work with 4 byte event ID numbers right now"); 00221 encodeInt(e,head_->event_num_); 00222 }
void edm::EventMsg::setRunNumber | ( | edm::RunNumber_t | r | ) | [inline] |
Definition at line 230 of file Messages.h.
References edm::encodeInt(), head_, and edm::EventMsg::Header::run_num_.
Referenced by EventMsg().
00231 { 00232 assert(sizeof(edm::RunNumber_t) == sizeof(int) && "run number streaming only knows how to work with 4 byte event ID numbers right now"); 00233 return encodeInt(r,head_->run_num_); 00234 }
Definition at line 207 of file Messages.h.
References edm::encodeInt(), head_, and edm::EventMsg::Header::total_segs_.
Referenced by EventMsg().
00208 { 00209 encodeInt(s,head_->total_segs_); 00210 }
Definition at line 197 of file Messages.h.
References edm::encodeInt(), head_, and edm::EventMsg::Header::which_seg_.
Referenced by EventMsg().
00198 { 00199 encodeInt(s,head_->which_seg_); 00200 }
int edm::EventMsg::data_size_ [private] |
edm::EventNumber_t edm::EventMsg::event_num_ [private] |
Definition at line 246 of file Messages.h.
Header* edm::EventMsg::head_ [private] |
Definition at line 243 of file Messages.h.
Referenced by getDataSize(), getEventNumber(), getRunNumber(), getTotalSegs(), getWhichSeg(), setDataSize(), setEventNumber(), setRunNumber(), setTotalSegs(), and setWhichSeg().
edm::RunNumber_t edm::EventMsg::run_num_ [private] |
Definition at line 247 of file Messages.h.
int edm::EventMsg::total_segs_ [private] |
Definition at line 245 of file Messages.h.
int edm::EventMsg::which_seg_ [private] |
Definition at line 244 of file Messages.h.