CMS 3D CMS Logo

evf::FUShmDqmCell Class Reference

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

List of all members.

Public Member Functions

void clear ()
unsigned int eventSize () const
unsigned int evtAtUpdate () const
unsigned int folderId () const
unsigned int fuGuid () const
unsigned int fuProcessId () const
 FUShmDqmCell (unsigned int payloadSize)
unsigned int index () const
void initialize (unsigned int index)
unsigned char * payloadAddr () const
unsigned int payloadSize () const
unsigned int runNumber () const
void writeData (unsigned int runNumber, unsigned int evtAtUpdate, unsigned int folderId, unsigned int fuProcessId, unsigned int fuGuid, unsigned char *data, unsigned int dataSize)
 ~FUShmDqmCell ()

Static Public Member Functions

static unsigned int size (unsigned int payloadSize)

Private Attributes

unsigned int eventSize_
unsigned int evtAtUpdate_
unsigned int folderId_
unsigned int fuGuid_
unsigned int fuProcessId_
unsigned int index_
unsigned int payloadOffset_
unsigned int payloadSize_
unsigned int runNumber_


Detailed Description

Definition at line 7 of file FUShmDqmCell.h.


Constructor & Destructor Documentation

FUShmDqmCell::FUShmDqmCell ( unsigned int  payloadSize  ) 

Definition at line 25 of file FUShmDqmCell.cc.

References payloadAddr(), payloadOffset_, and payloadSize_.

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

FUShmDqmCell::~FUShmDqmCell (  ) 

Definition at line 35 of file FUShmDqmCell.cc.

00036 {
00037 
00038 }


Member Function Documentation

void FUShmDqmCell::clear ( void   ) 

Definition at line 62 of file FUShmDqmCell.cc.

References eventSize_.

Referenced by evf::FUShmBuffer::discardDqmCell(), initialize(), and evf::FUShmBuffer::writeDqmEmptyEvent().

00063 {
00064   eventSize_=0;
00065 }

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

Definition at line 31 of file FUShmDqmCell.h.

References eventSize_.

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

00031 { return eventSize_; }

unsigned int evf::FUShmDqmCell::evtAtUpdate (  )  const [inline]

Definition at line 24 of file FUShmDqmCell.h.

References evtAtUpdate_.

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

00024 { return evtAtUpdate_; }

unsigned int evf::FUShmDqmCell::folderId (  )  const [inline]

Definition at line 25 of file FUShmDqmCell.h.

References folderId_.

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

00025 { return folderId_; }

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

Definition at line 27 of file FUShmDqmCell.h.

References fuGuid_.

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

00027 { return fuGuid_; }

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

Definition at line 26 of file FUShmDqmCell.h.

References fuProcessId_.

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

00026 { return fuProcessId_; }

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

Definition at line 22 of file FUShmDqmCell.h.

References index_.

Referenced by evf::FUShmBuffer::finishReadingDqmCell(), and evf::FUResourceTable::sendDqm().

00022 { return index_; }

void FUShmDqmCell::initialize ( unsigned int  index  ) 

Definition at line 46 of file FUShmDqmCell.cc.

References clear(), and index_.

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

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

unsigned char * FUShmDqmCell::payloadAddr (  )  const

Definition at line 54 of file FUShmDqmCell.cc.

References payloadOffset_, and HLT_VtxMuL3::result.

Referenced by FUShmDqmCell(), evf::FUResourceTable::sendDqm(), and writeData().

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

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

Definition at line 29 of file FUShmDqmCell.h.

References payloadSize_.

00029 { return payloadSize_; }

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

Definition at line 23 of file FUShmDqmCell.h.

References runNumber_.

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

00023 { return runNumber_; }

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

Definition at line 97 of file FUShmDqmCell.cc.

00098 {
00099   return sizeof(FUShmDqmCell)+sizeof(unsigned char)*payloadSize;
00100 }

void FUShmDqmCell::writeData ( unsigned int  runNumber,
unsigned int  evtAtUpdate,
unsigned int  folderId,
unsigned int  fuProcessId,
unsigned int  fuGuid,
unsigned char *  data,
unsigned int  dataSize 
)

Definition at line 69 of file FUShmDqmCell.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), eventSize_, evtAtUpdate_, folderId_, fuGuid_, fuProcessId_, payloadAddr(), payloadSize_, and runNumber_.

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

00076 {
00077   if (eventSize_!=0)
00078     cout<<"FUShmDqmCell::writeData WARNING: overwriting data!"<<endl;
00079   
00080   if (dataSize>payloadSize_) {
00081     cout<<"FUShmDqmCell::writeData ERROR: data does not fit!"<<endl;
00082     return;
00083   }
00084   
00085   runNumber_  =runNumber;
00086   evtAtUpdate_=evtAtUpdate;
00087   folderId_   =folderId;
00088   fuProcessId_=fuProcessId;
00089   fuGuid_     =fuGuid;
00090   unsigned char* targetAddr=payloadAddr();
00091   memcpy(targetAddr,data,dataSize);
00092   eventSize_=dataSize;
00093 }


Member Data Documentation

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

Definition at line 62 of file FUShmDqmCell.h.

Referenced by clear(), eventSize(), and writeData().

unsigned int evf::FUShmDqmCell::evtAtUpdate_ [private]

Definition at line 56 of file FUShmDqmCell.h.

Referenced by evtAtUpdate(), and writeData().

unsigned int evf::FUShmDqmCell::folderId_ [private]

Definition at line 57 of file FUShmDqmCell.h.

Referenced by folderId(), and writeData().

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

Definition at line 59 of file FUShmDqmCell.h.

Referenced by fuGuid(), and writeData().

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

Definition at line 58 of file FUShmDqmCell.h.

Referenced by fuProcessId(), and writeData().

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

Definition at line 54 of file FUShmDqmCell.h.

Referenced by index(), and initialize().

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

Definition at line 61 of file FUShmDqmCell.h.

Referenced by FUShmDqmCell(), and payloadAddr().

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

Definition at line 60 of file FUShmDqmCell.h.

Referenced by FUShmDqmCell(), payloadSize(), and writeData().

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

Definition at line 55 of file FUShmDqmCell.h.

Referenced by runNumber(), and writeData().


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