CMS 3D CMS Logo

edm::MsgCode Class Reference

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

Inheritance diagram for edm::MsgCode:

edm::EventMsg edm::InitMsg

List of all members.

Public Types

enum  Codes { INVALID = 0, INIT = 1, EVENT = 2, DONE = 3 }

Public Member Functions

int codeSize () const
Codes getCode () const
 MsgCode (void *buffer, int size, Codes c)
 MsgCode (void *buffer, Codes c)
 MsgCode (void *buffer)
 MsgCode (void *buffer, int size)
voidpayload () const
int payloadSize () const
void setCode (Codes c)
int totalSize () const

Private Attributes

unsigned char * buffer_
int size_


Detailed Description

Definition at line 55 of file Messages.h.


Member Enumeration Documentation

enum edm::MsgCode::Codes

Enumerator:
INVALID 
INIT 
EVENT 
DONE 

Definition at line 58 of file Messages.h.

00058 { INVALID = 0, INIT = 1, EVENT = 2, DONE = 3 };


Constructor & Destructor Documentation

edm::MsgCode::MsgCode ( void buffer,
int  size 
) [inline]

Definition at line 64 of file Messages.h.

References size_.

00064                                    :
00065       buffer_((unsigned char*)buffer),size_(size<4?0:size-4)
00066     { assert(size_>=0); } 
    

edm::MsgCode::MsgCode ( void buffer  )  [inline, explicit]

Definition at line 69 of file Messages.h.

00069                                   :
00070       buffer_((unsigned char*)buffer),size_(0)
00071     { } 

edm::MsgCode::MsgCode ( void buffer,
Codes  c 
) [inline]

Definition at line 74 of file Messages.h.

References setCode().

00074                                   :
00075       buffer_((unsigned char*)buffer),size_(0)
00076     { setCode(c); }

edm::MsgCode::MsgCode ( void buffer,
int  size,
Codes  c 
) [inline]

Definition at line 79 of file Messages.h.

References setCode().

00079                                             :
00080       buffer_((unsigned char*)buffer),size_(size-4)
00081     { setCode(c); }


Member Function Documentation

int edm::MsgCode::codeSize (  )  const [inline]

Definition at line 96 of file Messages.h.

Referenced by edm::InitMsg::msgSize(), and edm::EventMsg::msgSize().

00096 { return 4; }

Codes edm::MsgCode::getCode (  )  const [inline]

Definition at line 88 of file Messages.h.

References buffer_, and edm::decodeInt().

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

00089     {
00090       return (Codes)decodeInt(buffer_);
00091     }

void* edm::MsgCode::payload (  )  const [inline]

Definition at line 94 of file Messages.h.

References buffer_.

Referenced by edm::EventMsg::data(), and edm::InitMsg::data().

00094 { return &buffer_[4]; }

int edm::MsgCode::payloadSize (  )  const [inline]

Definition at line 95 of file Messages.h.

References size_.

Referenced by edm::InitMsg::dataSize().

00095 { return size_; }

void edm::MsgCode::setCode ( Codes  c  )  [inline]

Definition at line 83 of file Messages.h.

References buffer_, and edm::encodeInt().

Referenced by edm::EventMsg::EventMsg(), edm::InitMsg::InitMsg(), and MsgCode().

00084     {
00085       encodeInt(c,buffer_);
00086     }

int edm::MsgCode::totalSize (  )  const [inline]

Definition at line 97 of file Messages.h.

References size_.

Referenced by stor::ESRingBuffer::pop_front().

00097 { return size_+4; }


Member Data Documentation

unsigned char* edm::MsgCode::buffer_ [private]

Definition at line 100 of file Messages.h.

Referenced by getCode(), payload(), and setCode().

int edm::MsgCode::size_ [private]

Definition at line 101 of file Messages.h.

Referenced by MsgCode(), payloadSize(), and totalSize().


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