CMS 3D CMS Logo

evf::FUShmRecoCell Class Reference

#include <EventFilter/ShmBuffer/interface/FUShmRecoCell.h>

List of all members.

Public Member Functions

void clear ()
unsigned int eventSize () const
unsigned int evtNumber () const
unsigned int fuGuid () const
unsigned int fuProcessId () const
 FUShmRecoCell (unsigned int payloadSize)
unsigned int index () const
void initialize (unsigned int index)
unsigned int outModId () const
unsigned char * payloadAddr () const
unsigned int payloadSize () const
unsigned int rawCellIndex () const
unsigned int runNumber () const
unsigned int type () const
void writeErrorEvent (unsigned int rawCellIndex, unsigned int runNumber, unsigned int evtNumber, unsigned int fuProcessId, unsigned char *data, unsigned int dataSize)
void writeEventData (unsigned int rawCellIndex, unsigned int runNumber, unsigned int evtNumber, unsigned int outModId, unsigned int fuProcessId, unsigned int fuGuid, unsigned char *data, unsigned int dataSize)
void writeInitMsg (unsigned int outModId, unsigned int fuProcessId, unsigned int fuGuid, unsigned char *data, unsigned int dataSize)
 ~FUShmRecoCell ()

Static Public Member Functions

static unsigned int size (unsigned int payloadSize)

Private Attributes

unsigned int eventSize_
unsigned int evtNumber_
unsigned int fuGuid_
unsigned int fuProcessId_
unsigned int index_
unsigned int outModId_
unsigned int payloadOffset_
unsigned int payloadSize_
unsigned int rawCellIndex_
unsigned int runNumber_
unsigned int type_


Detailed Description

Definition at line 7 of file FUShmRecoCell.h.


Constructor & Destructor Documentation

FUShmRecoCell::FUShmRecoCell ( unsigned int  payloadSize  ) 

Definition at line 25 of file FUShmRecoCell.cc.

References payloadAddr(), payloadOffset_, and payloadSize_.

00026   : payloadSize_(payloadSize)
00027 {
00028   payloadOffset_=sizeof(FUShmRecoCell);
00029   void* payloadAddr=(void*)((unsigned int)this+payloadOffset_);
00030   new (payloadAddr) unsigned char[payloadSize_];
00031 }

FUShmRecoCell::~FUShmRecoCell (  ) 

Definition at line 35 of file FUShmRecoCell.cc.

00036 {
00037 
00038 }


Member Function Documentation

void FUShmRecoCell::clear ( void   ) 

Definition at line 62 of file FUShmRecoCell.cc.

References eventSize_, and rawCellIndex_.

Referenced by evf::FUShmBuffer::discardRecoCell(), initialize(), and evf::FUShmBuffer::writeRecoEmptyEvent().

00063 {
00064   eventSize_=0;
00065   rawCellIndex_=0xffffffff;
00066 }

unsigned int evf::FUShmRecoCell::eventSize (  )  const [inline]

Definition at line 33 of file FUShmRecoCell.h.

References eventSize_.

Referenced by evf::FUResourceTable::sendData().

00033 { return eventSize_; }

unsigned int evf::FUShmRecoCell::evtNumber (  )  const [inline]

Definition at line 25 of file FUShmRecoCell.h.

References evtNumber_.

Referenced by evf::FUResourceTable::sendData().

00025 { return evtNumber_; }

unsigned int evf::FUShmRecoCell::fuGuid (  )  const [inline]

Definition at line 28 of file FUShmRecoCell.h.

References fuGuid_.

Referenced by evf::FUResourceTable::sendData().

00028 { return fuGuid_; }

unsigned int evf::FUShmRecoCell::fuProcessId (  )  const [inline]

Definition at line 27 of file FUShmRecoCell.h.

References fuProcessId_.

Referenced by evf::FUResourceTable::sendData().

00027 { return fuProcessId_; }

unsigned int evf::FUShmRecoCell::index (  )  const [inline]

Definition at line 22 of file FUShmRecoCell.h.

References index_.

Referenced by evf::FUResourceTable::sendData().

00022 { return index_; }

void FUShmRecoCell::initialize ( unsigned int  index  ) 

Definition at line 46 of file FUShmRecoCell.cc.

References clear(), and index_.

Referenced by evf::FUShmBuffer::initialize().

00047 {
00048   index_=index;
00049   clear();
00050 }

unsigned int evf::FUShmRecoCell::outModId (  )  const [inline]

Definition at line 26 of file FUShmRecoCell.h.

References outModId_.

Referenced by evf::FUResourceTable::sendData().

00026 { return outModId_; }

unsigned char * FUShmRecoCell::payloadAddr (  )  const

Definition at line 54 of file FUShmRecoCell.cc.

References payloadOffset_, and HLT_VtxMuL3::result.

Referenced by FUShmRecoCell(), evf::FUResourceTable::sendData(), writeErrorEvent(), writeEventData(), and writeInitMsg().

00055 {
00056   unsigned char* result=(unsigned char*)((unsigned int)this+payloadOffset_);
00057   return result;
00058 }

unsigned int evf::FUShmRecoCell::payloadSize (  )  const [inline]

Definition at line 31 of file FUShmRecoCell.h.

References payloadSize_.

00031 { return payloadSize_; }

unsigned int evf::FUShmRecoCell::rawCellIndex (  )  const [inline]

Definition at line 23 of file FUShmRecoCell.h.

References rawCellIndex_.

Referenced by evf::FUShmBuffer::discardRecoCell(), evf::FUShmBuffer::finishReadingRecoCell(), evf::FUShmBuffer::recoCellToRead(), and evf::FUResourceTable::sendData().

00023 { return rawCellIndex_; }

unsigned int evf::FUShmRecoCell::runNumber (  )  const [inline]

Definition at line 24 of file FUShmRecoCell.h.

References runNumber_.

Referenced by evf::FUResourceTable::sendData().

00024 { return runNumber_; }

unsigned int FUShmRecoCell::size ( unsigned int  payloadSize  )  [static]

Definition at line 158 of file FUShmRecoCell.cc.

00159 {
00160   return sizeof(FUShmRecoCell)+sizeof(unsigned char)*payloadSize;
00161 }

unsigned int evf::FUShmRecoCell::type (  )  const [inline]

Definition at line 29 of file FUShmRecoCell.h.

References type_.

Referenced by evf::FUResourceTable::sendData().

00029 { return type_; }

void FUShmRecoCell::writeErrorEvent ( unsigned int  rawCellIndex,
unsigned int  runNumber,
unsigned int  evtNumber,
unsigned int  fuProcessId,
unsigned char *  data,
unsigned int  dataSize 
)

Definition at line 129 of file FUShmRecoCell.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), eventSize_, evtNumber_, fuGuid_, fuProcessId_, outModId_, payloadAddr(), payloadSize_, rawCellIndex_, runNumber_, and type_.

Referenced by evf::FUShmBuffer::writeErrorEventData().

00135 {
00136   if (eventSize_!=0)
00137     cout<<"FUShmRecoCell::writeEventData() WARNING: overwriting data!"<<endl;
00138   
00139   if (dataSize>payloadSize_) {
00140     cout<<"FUShmRecoCell::writeEventData() ERROR: data does not fit!"<<endl;
00141     return;
00142   }
00143   
00144   rawCellIndex_=rawCellIndex;
00145   runNumber_   =runNumber;
00146   evtNumber_   =evtNumber;
00147   outModId_    =0xffffffff;
00148   fuProcessId_ =fuProcessId;
00149   fuGuid_      =0;
00150   type_        =2;
00151   unsigned char* targetAddr=payloadAddr();
00152   memcpy(targetAddr,data,dataSize);
00153   eventSize_=dataSize;
00154 }

void FUShmRecoCell::writeEventData ( unsigned int  rawCellIndex,
unsigned int  runNumber,
unsigned int  evtNumber,
unsigned int  outModId,
unsigned int  fuProcessId,
unsigned int  fuGuid,
unsigned char *  data,
unsigned int  dataSize 
)

Definition at line 98 of file FUShmRecoCell.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), eventSize_, evtNumber_, fuGuid_, fuProcessId_, outModId_, payloadAddr(), payloadSize_, rawCellIndex_, runNumber_, and type_.

Referenced by evf::FUShmBuffer::writeRecoEventData().

00106 {
00107   if (eventSize_!=0)
00108     cout<<"FUShmRecoCell::writeEventData() WARNING: overwriting data!"<<endl;
00109   
00110   if (dataSize>payloadSize_) {
00111     cout<<"FUShmRecoCell::writeEventData() ERROR: data does not fit!"<<endl;
00112     return;
00113   }
00114   
00115   rawCellIndex_=rawCellIndex;
00116   runNumber_   =runNumber;
00117   evtNumber_   =evtNumber;
00118   outModId_    =outModId;
00119   fuProcessId_ =fuProcessId;
00120   fuGuid_      =fuGuid;
00121   type_        =1;
00122   unsigned char* targetAddr=payloadAddr();
00123   memcpy(targetAddr,data,dataSize);
00124   eventSize_=dataSize;
00125 }

void FUShmRecoCell::writeInitMsg ( unsigned int  outModId,
unsigned int  fuProcessId,
unsigned int  fuGuid,
unsigned char *  data,
unsigned int  dataSize 
)

Definition at line 70 of file FUShmRecoCell.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), eventSize_, evtNumber_, fuGuid_, fuProcessId_, outModId_, payloadAddr(), payloadSize_, rawCellIndex_, runNumber_, and type_.

Referenced by evf::FUShmBuffer::writeRecoInitMsg().

00075 {
00076   if (eventSize_!=0)
00077     cout<<"FUShmRecoCell::writeInitMsg() WARNING: overwriting data!"<<endl;
00078   
00079   if (dataSize>payloadSize_) {
00080     cout<<"FUShmRecoCell::writeInitMsg() ERROR: data does not fit!"<<endl;
00081     return;
00082   }
00083   
00084   rawCellIndex_=0xffffffff;
00085   runNumber_   =0xffffffff;
00086   evtNumber_   =0xffffffff;
00087   outModId_    =outModId;
00088   fuProcessId_ =fuProcessId;
00089   fuGuid_      =fuGuid;
00090   type_        =0;
00091   unsigned char* targetAddr=payloadAddr();
00092   memcpy(targetAddr,data,dataSize);
00093   eventSize_=dataSize;
00094 }


Member Data Documentation

unsigned int evf::FUShmRecoCell::eventSize_ [private]

Definition at line 80 of file FUShmRecoCell.h.

Referenced by clear(), eventSize(), writeErrorEvent(), writeEventData(), and writeInitMsg().

unsigned int evf::FUShmRecoCell::evtNumber_ [private]

Definition at line 73 of file FUShmRecoCell.h.

Referenced by evtNumber(), writeErrorEvent(), writeEventData(), and writeInitMsg().

unsigned int evf::FUShmRecoCell::fuGuid_ [private]

Definition at line 76 of file FUShmRecoCell.h.

Referenced by fuGuid(), writeErrorEvent(), writeEventData(), and writeInitMsg().

unsigned int evf::FUShmRecoCell::fuProcessId_ [private]

Definition at line 75 of file FUShmRecoCell.h.

Referenced by fuProcessId(), writeErrorEvent(), writeEventData(), and writeInitMsg().

unsigned int evf::FUShmRecoCell::index_ [private]

Definition at line 70 of file FUShmRecoCell.h.

Referenced by index(), and initialize().

unsigned int evf::FUShmRecoCell::outModId_ [private]

Definition at line 74 of file FUShmRecoCell.h.

Referenced by outModId(), writeErrorEvent(), writeEventData(), and writeInitMsg().

unsigned int evf::FUShmRecoCell::payloadOffset_ [private]

Definition at line 79 of file FUShmRecoCell.h.

Referenced by FUShmRecoCell(), and payloadAddr().

unsigned int evf::FUShmRecoCell::payloadSize_ [private]

Definition at line 78 of file FUShmRecoCell.h.

Referenced by FUShmRecoCell(), payloadSize(), writeErrorEvent(), writeEventData(), and writeInitMsg().

unsigned int evf::FUShmRecoCell::rawCellIndex_ [private]

Definition at line 71 of file FUShmRecoCell.h.

Referenced by clear(), rawCellIndex(), writeErrorEvent(), writeEventData(), and writeInitMsg().

unsigned int evf::FUShmRecoCell::runNumber_ [private]

Definition at line 72 of file FUShmRecoCell.h.

Referenced by runNumber(), writeErrorEvent(), writeEventData(), and writeInitMsg().

unsigned int evf::FUShmRecoCell::type_ [private]

Definition at line 77 of file FUShmRecoCell.h.

Referenced by type(), writeErrorEvent(), writeEventData(), and writeInitMsg().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:46:49 2009 for CMSSW by  doxygen 1.5.4