CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Attributes
edm::EventMsg Class Reference

#include <Messages.h>

Inheritance diagram for edm::EventMsg:
edm::MsgCode

Classes

struct  EventMsgHeader
 

Public Member Functions

void * data () const
 
int dataSize () const
 
 EventMsg (MsgCode &mc)
 
 EventMsg (void *buffer, int size=0)
 
 EventMsg (void *buffer, int size, edm::EventNumber_t e, edm::RunNumber_t r, int which_seg, int total_segs)
 
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)
 
- Public Member Functions inherited from edm::MsgCode
int codeSize () const
 
Codes getCode () const
 
 MsgCode (void *buffer, int size)
 
 MsgCode (void *buffer)
 
 MsgCode (void *buffer, Codes c)
 
 MsgCode (void *buffer, int size, Codes c)
 
void * payload () const
 
int payloadSize () const
 
void setCode (Codes c)
 
int totalSize () const
 

Private Attributes

int data_size_
 
edm::EventNumber_t event_num_
 
EventMsgHeaderhead_
 
edm::RunNumber_t run_num_
 
int total_segs_
 
int which_seg_
 

Additional Inherited Members

- Public Types inherited from edm::MsgCode
enum  Codes { INVALID = 0, INIT = 1, EVENT = 2, DONE = 3 }
 

Detailed Description

Definition at line 121 of file Messages.h.

Constructor & Destructor Documentation

edm::EventMsg::EventMsg ( MsgCode mc)
inline

Definition at line 134 of file Messages.h.

134  :
135  MsgCode(mc),
136  head_((EventMsgHeader*)MsgCode::payload()),
142  { }
MsgCode(void *buffer, int size)
Definition: Messages.h:64
void * payload() const
Definition: Messages.h:94
int data_size_
Definition: Messages.h:248
int which_seg_
Definition: Messages.h:244
int total_segs_
Definition: Messages.h:245
edm::RunNumber_t getRunNumber() const
Definition: Messages.h:224
int getDataSize() const
Definition: Messages.h:182
int getTotalSegs() const
Definition: Messages.h:202
edm::EventNumber_t event_num_
Definition: Messages.h:246
edm::EventNumber_t getEventNumber() const
Definition: Messages.h:212
int getWhichSeg() const
Definition: Messages.h:192
edm::RunNumber_t run_num_
Definition: Messages.h:247
EventMsgHeader * head_
Definition: Messages.h:243
edm::EventMsg::EventMsg ( void *  buffer,
int  size = 0 
)
inlineexplicit

Definition at line 145 of file Messages.h.

145  :
146  MsgCode(buffer,size),
147  head_((EventMsgHeader*)MsgCode::payload()),
153  { }
MsgCode(void *buffer, int size)
Definition: Messages.h:64
void * payload() const
Definition: Messages.h:94
int data_size_
Definition: Messages.h:248
int which_seg_
Definition: Messages.h:244
int total_segs_
Definition: Messages.h:245
edm::RunNumber_t getRunNumber() const
Definition: Messages.h:224
int getDataSize() const
Definition: Messages.h:182
int getTotalSegs() const
Definition: Messages.h:202
edm::EventNumber_t event_num_
Definition: Messages.h:246
edm::EventNumber_t getEventNumber() const
Definition: Messages.h:212
int getWhichSeg() const
Definition: Messages.h:192
edm::RunNumber_t run_num_
Definition: Messages.h:247
EventMsgHeader * head_
Definition: Messages.h:243
tuple size
Write out results.
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().

160  :
161  MsgCode(buffer,size),
162  head_((EventMsgHeader*)MsgCode::payload()),
163  which_seg_(which_seg),
164  total_segs_(total_segs),
165  event_num_(e),
166  run_num_(r),
167  data_size_(payloadSize() - sizeof(EventMsgHeader))
168  {
170  setWhichSeg(which_seg);
171  setTotalSegs(total_segs);
172  setEventNumber(e);
173  setRunNumber(r);
175  }
MsgCode(void *buffer, int size)
Definition: Messages.h:64
void setRunNumber(edm::RunNumber_t r)
Definition: Messages.h:230
void setDataSize(int s)
Definition: Messages.h:187
void * payload() const
Definition: Messages.h:94
void setEventNumber(edm::EventNumber_t e)
Definition: Messages.h:218
void setTotalSegs(int s)
Definition: Messages.h:207
void setCode(Codes c)
Definition: Messages.h:83
int data_size_
Definition: Messages.h:248
int which_seg_
Definition: Messages.h:244
int total_segs_
Definition: Messages.h:245
edm::EventNumber_t event_num_
Definition: Messages.h:246
int payloadSize() const
Definition: Messages.h:95
void setWhichSeg(int s)
Definition: Messages.h:197
edm::RunNumber_t run_num_
Definition: Messages.h:247
EventMsgHeader * head_
Definition: Messages.h:243
tuple size
Write out results.

Member Function Documentation

void* edm::EventMsg::data ( ) const
inline

Definition at line 178 of file Messages.h.

References edm::MsgCode::payload().

Referenced by cuy.FindIssue::__init__().

178 { return (char*)payload() + sizeof(EventMsgHeader); }
void * payload() const
Definition: Messages.h:94
int edm::EventMsg::dataSize ( ) const
inline

Definition at line 180 of file Messages.h.

References data_size_.

180 { return data_size_ + sizeof(EventMsgHeader); }
int data_size_
Definition: Messages.h:248
int edm::EventMsg::getDataSize ( ) const
inline

Definition at line 182 of file Messages.h.

References edm::EventMsg::EventMsgHeader::data_size_, edm::decodeInt(), and head_.

Referenced by msgSize().

183  {
184  return decodeInt(head_->data_size_);
185  }
unsigned char data_size_[4]
Definition: Messages.h:130
unsigned int decodeInt(unsigned char *v)
Definition: Messages.h:33
EventMsgHeader * head_
Definition: Messages.h:243
edm::EventNumber_t edm::EventMsg::getEventNumber ( ) const
inline

Definition at line 212 of file Messages.h.

References edm::decodeInt(), edm::EventMsg::EventMsgHeader::event_num_, and head_.

213  {
214  assert(sizeof(edm::EventNumber_t) == sizeof(int) && "event ID streaming only knows how to work with 4 byte event ID numbers right now");
215  return decodeInt(head_->event_num_);
216  }
unsigned char event_num_[4]
Definition: Messages.h:128
unsigned int EventNumber_t
Definition: EventID.h:30
unsigned int decodeInt(unsigned char *v)
Definition: Messages.h:33
EventMsgHeader * head_
Definition: Messages.h:243
edm::RunNumber_t edm::EventMsg::getRunNumber ( ) const
inline

Definition at line 224 of file Messages.h.

References edm::decodeInt(), head_, and edm::EventMsg::EventMsgHeader::run_num_.

225  {
226  assert(sizeof(edm::EventNumber_t) == sizeof(int) && "event ID streaming only knows how to work with 4 byte event ID numbers right now");
227  return decodeInt(head_->run_num_);
228  }
unsigned int EventNumber_t
Definition: EventID.h:30
unsigned char run_num_[4]
Definition: Messages.h:129
unsigned int decodeInt(unsigned char *v)
Definition: Messages.h:33
EventMsgHeader * head_
Definition: Messages.h:243
int edm::EventMsg::getTotalSegs ( ) const
inline

Definition at line 202 of file Messages.h.

References edm::decodeInt(), head_, and edm::EventMsg::EventMsgHeader::total_segs_.

203  {
204  return decodeInt(head_->total_segs_);
205  }
unsigned char total_segs_[4]
Definition: Messages.h:127
unsigned int decodeInt(unsigned char *v)
Definition: Messages.h:33
EventMsgHeader * head_
Definition: Messages.h:243
int edm::EventMsg::getWhichSeg ( ) const
inline

Definition at line 192 of file Messages.h.

References edm::decodeInt(), head_, and edm::EventMsg::EventMsgHeader::which_seg_.

193  {
194  return decodeInt(head_->which_seg_);
195  }
unsigned char which_seg_[4]
Definition: Messages.h:126
unsigned int decodeInt(unsigned char *v)
Definition: Messages.h:33
EventMsgHeader * head_
Definition: Messages.h:243
int edm::EventMsg::msgSize ( ) const
inline

Definition at line 237 of file Messages.h.

References edm::MsgCode::codeSize(), and getDataSize().

238  {
239  return codeSize()+sizeof(EventMsgHeader)+getDataSize();
240  }
int codeSize() const
Definition: Messages.h:96
int getDataSize() const
Definition: Messages.h:182
void edm::EventMsg::setDataSize ( int  s)
inline

Definition at line 187 of file Messages.h.

References edm::EventMsg::EventMsgHeader::data_size_, edm::encodeInt(), and head_.

Referenced by EventMsg().

188  {
190  }
void encodeInt(unsigned int i, unsigned char *v)
Definition: Messages.h:41
unsigned char data_size_[4]
Definition: Messages.h:130
EventMsgHeader * head_
Definition: Messages.h:243
void edm::EventMsg::setEventNumber ( edm::EventNumber_t  e)
inline

Definition at line 218 of file Messages.h.

References edm::encodeInt(), edm::EventMsg::EventMsgHeader::event_num_, and head_.

Referenced by EventMsg().

219  {
220  assert(sizeof(edm::RunNumber_t) == sizeof(int) && "run number streaming only knows how to work with 4 byte event ID numbers right now");
222  }
unsigned char event_num_[4]
Definition: Messages.h:128
void encodeInt(unsigned int i, unsigned char *v)
Definition: Messages.h:41
EventMsgHeader * head_
Definition: Messages.h:243
unsigned int RunNumber_t
Definition: EventRange.h:32
void edm::EventMsg::setRunNumber ( edm::RunNumber_t  r)
inline

Definition at line 230 of file Messages.h.

References edm::encodeInt(), head_, and edm::EventMsg::EventMsgHeader::run_num_.

Referenced by EventMsg().

231  {
232  assert(sizeof(edm::RunNumber_t) == sizeof(int) && "run number streaming only knows how to work with 4 byte event ID numbers right now");
233  return encodeInt(r,head_->run_num_);
234  }
void encodeInt(unsigned int i, unsigned char *v)
Definition: Messages.h:41
unsigned char run_num_[4]
Definition: Messages.h:129
EventMsgHeader * head_
Definition: Messages.h:243
unsigned int RunNumber_t
Definition: EventRange.h:32
void edm::EventMsg::setTotalSegs ( int  s)
inline

Definition at line 207 of file Messages.h.

References edm::encodeInt(), head_, and edm::EventMsg::EventMsgHeader::total_segs_.

Referenced by EventMsg().

208  {
210  }
unsigned char total_segs_[4]
Definition: Messages.h:127
void encodeInt(unsigned int i, unsigned char *v)
Definition: Messages.h:41
EventMsgHeader * head_
Definition: Messages.h:243
void edm::EventMsg::setWhichSeg ( int  s)
inline

Definition at line 197 of file Messages.h.

References edm::encodeInt(), head_, and edm::EventMsg::EventMsgHeader::which_seg_.

Referenced by EventMsg().

198  {
200  }
void encodeInt(unsigned int i, unsigned char *v)
Definition: Messages.h:41
unsigned char which_seg_[4]
Definition: Messages.h:126
EventMsgHeader * head_
Definition: Messages.h:243

Member Data Documentation

int edm::EventMsg::data_size_
private

Definition at line 248 of file Messages.h.

Referenced by dataSize(), and EventMsg().

edm::EventNumber_t edm::EventMsg::event_num_
private

Definition at line 246 of file Messages.h.

EventMsgHeader* edm::EventMsg::head_
private
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.