CMS 3D CMS Logo

edm::InitMsg Class Reference

#include <IOPool/Streamer/interface/Messages.h>

Inheritance diagram for edm::InitMsg:

edm::MsgCode

List of all members.

Public Member Functions

voiddata () const
int dataSize () const
int getDataSize () const
 InitMsg (void *buffer, int size, bool setcode=false)
 InitMsg (MsgCode &m)
int msgSize () const
void setDataSize (int s)

Private Attributes

int data_size_
Headerhead_

Classes

struct  Header


Detailed Description

Definition at line 257 of file Messages.h.


Constructor & Destructor Documentation

edm::InitMsg::InitMsg ( MsgCode m  )  [inline]

Definition at line 265 of file Messages.h.

References data_size_, and setDataSize().

00265                        :
00266       MsgCode(m),
00267       head_((Header*)MsgCode::payload()),
00268       data_size_(payloadSize() - sizeof(Header))
00269     { setDataSize(data_size_); }

edm::InitMsg::InitMsg ( void buffer,
int  size,
bool  setcode = false 
) [inline]

Definition at line 271 of file Messages.h.

References data_size_, getDataSize(), edm::MsgCode::INIT, edm::MsgCode::setCode(), and setDataSize().

00271                                                          :
00272       MsgCode(buffer,size),
00273       head_((Header*)MsgCode::payload()),
00274       data_size_(payloadSize() - sizeof(Header)) // default to full length
00275     {
00276       if(setcode)
00277         {
00278           // for new message
00279           setCode(MsgCode::INIT);
00280           setDataSize(data_size_);
00281         }
00282       else
00283         // for existing message
00284         data_size_ = getDataSize();
00285     }


Member Function Documentation

void* edm::InitMsg::data ( void   )  const [inline]

Definition at line 291 of file Messages.h.

References edm::MsgCode::payload().

Referenced by edm::JobHeaderDecoder::decodeJobHeader().

00291 { return (char*)payload()+sizeof(Header); } 

int edm::InitMsg::dataSize (  )  const [inline]

Definition at line 292 of file Messages.h.

References edm::MsgCode::payloadSize().

00292 { return payloadSize() + sizeof(Header); }

int edm::InitMsg::getDataSize (  )  const [inline]

Definition at line 294 of file Messages.h.

References edm::InitMsg::Header::data_size_, edm::decodeInt(), and head_.

Referenced by edm::JobHeaderDecoder::decodeJobHeader(), InitMsg(), and msgSize().

00295     {
00296       return decodeInt(head_->data_size_);
00297     }

int edm::InitMsg::msgSize (  )  const [inline]

Definition at line 305 of file Messages.h.

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

00306     {
00307       return codeSize()+sizeof(Header)+getDataSize();
00308     }

void edm::InitMsg::setDataSize ( int  s  )  [inline]

Definition at line 299 of file Messages.h.

References edm::InitMsg::Header::data_size_, edm::encodeInt(), and head_.

Referenced by InitMsg().

00300     {
00301       encodeInt(s,head_->data_size_);
00302     }


Member Data Documentation

int edm::InitMsg::data_size_ [private]

Definition at line 312 of file Messages.h.

Referenced by InitMsg().

Header* edm::InitMsg::head_ [private]

Definition at line 311 of file Messages.h.

Referenced by getDataSize(), and setDataSize().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:41:45 2009 for CMSSW by  doxygen 1.5.4