CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/EventFilter/ResourceBroker/interface/RawMsgBuf.h

Go to the documentation of this file.
00001 /*
00002  * Message Buffer for Message Queue
00003  *  - holds an entire FUShmRawCell to transport
00004  *
00005  *  Author: aspataru : aspataru@cern.ch
00006  */
00007 
00008 #ifndef EVENTFILTER_RB_RAW_MSG_BUF_H
00009 #define EVENTFILTER_RB_RAW_MSG_BUF_H
00010 
00011 #include "EventFilter/Utilities/interface/MsgBuf.h"
00012 #include "EventFilter/ShmBuffer/interface/FUShmRawCell.h"
00013 
00014 namespace evf {
00015 
00023 class RawMsgBuf: public MsgBuf {
00024 
00025 public:
00026         RawMsgBuf(unsigned int size, unsigned int type);
00027         virtual ~RawMsgBuf();
00031         void initialise(unsigned int rawCellSize);
00035         FUShmRawCell* rawCell() {
00036                 return (FUShmRawCell*) ptr_->mtext;
00037         }
00041         inline unsigned int usedSize() {
00042                 return theRawCell_->eventSize() + sizeof(long int);
00043         }
00044 
00045 private:
00046         FUShmRawCell* theRawCell_;
00047 
00048         friend class MasterQueue;
00049 };
00050 
00051 }
00052 
00053 #endif