CMS 3D CMS Logo

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

#include <RawMsgBuf.h>

Inheritance diagram for evf::RawMsgBuf:
evf::MsgBuf

Public Member Functions

void initialise (unsigned int rawCellSize)
 
FUShmRawCellrawCell ()
 
 RawMsgBuf (unsigned int size, unsigned int type)
 
unsigned int usedSize ()
 
virtual ~RawMsgBuf ()
 
- Public Member Functions inherited from evf::MsgBuf
 MsgBuf ()
 
 MsgBuf (unsigned int size, unsigned int type)
 
 MsgBuf (const MsgBuf &b)
 
size_t msize ()
 
msgbuf * operator-> ()
 
MsgBufoperator= (const MsgBuf &)
 
virtual ~MsgBuf ()
 

Private Attributes

FUShmRawCelltheRawCell_
 

Friends

class MasterQueue
 

Additional Inherited Members

- Protected Attributes inherited from evf::MsgBuf
unsigned char * buf_
 
size_t msize_
 
struct msgbuf * ptr_
 

Detailed Description

Message Buffer for Message Queue, holds an entire FUShmRawCell to transport.

Author:
aspataru

Definition at line 23 of file RawMsgBuf.h.

Constructor & Destructor Documentation

RawMsgBuf::RawMsgBuf ( unsigned int  size,
unsigned int  type 
)

Definition at line 8 of file RawMsgBuf.cc.

8  :
10 
11 }
type
Definition: HCALResponse.h:22
FUShmRawCell * theRawCell_
Definition: RawMsgBuf.h:46
MsgBuf()
Definition: MsgBuf.cc:5
tuple size
Write out results.
RawMsgBuf::~RawMsgBuf ( )
virtual

Definition at line 13 of file RawMsgBuf.cc.

References theRawCell_, and evf::FUShmRawCell::~FUShmRawCell().

13  {
15  //delete[] buf_;
16 }
FUShmRawCell * theRawCell_
Definition: RawMsgBuf.h:46

Member Function Documentation

void RawMsgBuf::initialise ( unsigned int  rawCellSize)

Construct the Raw cell object in-place in the message buffer

Definition at line 18 of file RawMsgBuf.cc.

References evf::MsgBuf::ptr_, and theRawCell_.

Referenced by evf::RawCache::initialise().

18  {
19  // construct the FUShmRawCell at the buffer address
20  // the memory is allocated in the super constructor
21  theRawCell_ = new (ptr_->mtext) FUShmRawCell(rawCellSize);
22 
23 }
struct msgbuf * ptr_
Definition: MsgBuf.h:24
FUShmRawCell * theRawCell_
Definition: RawMsgBuf.h:46
FUShmRawCell* evf::RawMsgBuf::rawCell ( )
inline

Returns a pointer to the Raw cell contained in the message buffer

Definition at line 35 of file RawMsgBuf.h.

References evf::MsgBuf::ptr_.

Referenced by evf::FUResourceQueue::buildResource(), and evf::RawCache::releaseMsg().

35  {
36  return (FUShmRawCell*) ptr_->mtext;
37  }
struct msgbuf * ptr_
Definition: MsgBuf.h:24
unsigned int evf::RawMsgBuf::usedSize ( )
inline

Returns the actually used size in bytes of the buffer.

Definition at line 41 of file RawMsgBuf.h.

References evf::FUShmRawCell::eventSize(), and theRawCell_.

Referenced by evf::FUResourceQueue::buildResource().

41  {
42  return theRawCell_->eventSize() + sizeof(long int);
43  }
FUShmRawCell * theRawCell_
Definition: RawMsgBuf.h:46
unsigned int eventSize() const

Friends And Related Function Documentation

friend class MasterQueue
friend

Definition at line 48 of file RawMsgBuf.h.

Member Data Documentation

FUShmRawCell* evf::RawMsgBuf::theRawCell_
private

Definition at line 46 of file RawMsgBuf.h.

Referenced by initialise(), usedSize(), and ~RawMsgBuf().