CMS 3D CMS Logo

Public Member Functions | Private Attributes | Friends

evf::RawMsgBuf Class Reference

#include <RawMsgBuf.h>

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

List of all members.

Public Member Functions

void initialise (unsigned int rawCellSize)
FUShmRawCellrawCell ()
 RawMsgBuf (unsigned int size, unsigned int type)
unsigned int usedSize ()
virtual ~RawMsgBuf ()

Private Attributes

FUShmRawCelltheRawCell_

Friends

class MasterQueue

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.

                                                         :
        MsgBuf(size, type), theRawCell_(0) {

}
RawMsgBuf::~RawMsgBuf ( ) [virtual]

Definition at line 13 of file RawMsgBuf.cc.

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

                      {
        theRawCell_->~FUShmRawCell();
        //delete[] buf_;
}

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().

                                                   {
        // construct the FUShmRawCell at the buffer address
        // the memory is allocated in the super constructor
        theRawCell_ = new (ptr_->mtext) FUShmRawCell(rawCellSize);

}
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().

                                {
                return (FUShmRawCell*) ptr_->mtext;
        }
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().

                                       {
                return theRawCell_->eventSize() + sizeof(long int);
        }

Friends And Related Function Documentation

friend class MasterQueue [friend]

Reimplemented from evf::MsgBuf.

Definition at line 48 of file RawMsgBuf.h.


Member Data Documentation

Definition at line 46 of file RawMsgBuf.h.

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