CMS 3D CMS Logo

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

#include <FUShmDqmCell.h>

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_.

Referenced by size().

27 {
29  void* payloadAddr=(void*)((unsigned long)this+payloadOffset_);
30  new (payloadAddr) unsigned char[payloadSize_];
31 }
unsigned int payloadOffset_
Definition: FUShmDqmCell.h:61
FUShmDqmCell(unsigned int payloadSize)
Definition: FUShmDqmCell.cc:25
unsigned int payloadSize_
Definition: FUShmDqmCell.h:60
unsigned char * payloadAddr() const
Definition: FUShmDqmCell.cc:54
unsigned int payloadSize() const
Definition: FUShmDqmCell.h:29
FUShmDqmCell::~FUShmDqmCell ( )

Definition at line 35 of file FUShmDqmCell.cc.

Referenced by evf::DQMMsgBuf::~DQMMsgBuf().

36 {
37 
38 }

Member Function Documentation

void FUShmDqmCell::clear ( void  )
unsigned int evf::FUShmDqmCell::eventSize ( ) const
inline
unsigned int evf::FUShmDqmCell::evtAtUpdate ( ) const
inline
unsigned int evf::FUShmDqmCell::folderId ( ) const
inline
unsigned int evf::FUShmDqmCell::fuGuid ( ) const
inline
unsigned int evf::FUShmDqmCell::fuProcessId ( ) const
inline
unsigned int evf::FUShmDqmCell::index ( ) const
inline
void FUShmDqmCell::initialize ( unsigned int  index)

Definition at line 46 of file FUShmDqmCell.cc.

References clear(), index(), and index_.

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

47 {
48  index_=index;
49  clear();
50 }
unsigned int index() const
Definition: FUShmDqmCell.h:22
unsigned int index_
Definition: FUShmDqmCell.h:54
unsigned char * FUShmDqmCell::payloadAddr ( ) const

Definition at line 54 of file FUShmDqmCell.cc.

References payloadOffset_, and query::result.

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

55 {
56  unsigned char* result=(unsigned char*)((unsigned long)this+payloadOffset_);
57  return result;
58 }
unsigned int payloadOffset_
Definition: FUShmDqmCell.h:61
tuple result
Definition: query.py:137
unsigned int evf::FUShmDqmCell::payloadSize ( ) const
inline

Definition at line 29 of file FUShmDqmCell.h.

References payloadSize_.

Referenced by size().

29 { return payloadSize_; }
unsigned int payloadSize_
Definition: FUShmDqmCell.h:60
unsigned int evf::FUShmDqmCell::runNumber ( ) const
inline
unsigned int FUShmDqmCell::size ( unsigned int  payloadSize)
static

Definition at line 97 of file FUShmDqmCell.cc.

References FUShmDqmCell(), and payloadSize().

Referenced by evf::FUShmBuffer::FUShmBuffer(), evf::FUShmBuffer::releaseSharedMemory(), and evf::FUShmBuffer::size().

98 {
99  return sizeof(FUShmDqmCell)+sizeof(unsigned char)*payloadSize;
100 }
FUShmDqmCell(unsigned int payloadSize)
Definition: FUShmDqmCell.cc:25
unsigned int payloadSize() const
Definition: FUShmDqmCell.h:29
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 gather_cfg::cout, eventSize_, evtAtUpdate(), evtAtUpdate_, folderId(), folderId_, fuGuid(), fuGuid_, fuProcessId(), fuProcessId_, payloadAddr(), payloadSize_, runNumber(), and runNumber_.

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

76 {
77  if (eventSize_!=0)
78  cout<<"FUShmDqmCell::writeData WARNING: overwriting data!"<<endl;
79 
80  if (dataSize>payloadSize_) {
81  cout<<"FUShmDqmCell::writeData ERROR: data does not fit!"<<endl;
82  return;
83  }
84 
89  fuGuid_ =fuGuid;
90  unsigned char* targetAddr=payloadAddr();
91  memcpy(targetAddr,data,dataSize);
92  eventSize_=dataSize;
93 }
unsigned int fuGuid_
Definition: FUShmDqmCell.h:59
unsigned int fuGuid() const
Definition: FUShmDqmCell.h:27
unsigned int folderId() const
Definition: FUShmDqmCell.h:25
unsigned int evtAtUpdate() const
Definition: FUShmDqmCell.h:24
unsigned int runNumber_
Definition: FUShmDqmCell.h:55
unsigned int evtAtUpdate_
Definition: FUShmDqmCell.h:56
unsigned int fuProcessId() const
Definition: FUShmDqmCell.h:26
unsigned int runNumber() const
Definition: FUShmDqmCell.h:23
unsigned int payloadSize_
Definition: FUShmDqmCell.h:60
unsigned int eventSize_
Definition: FUShmDqmCell.h:62
unsigned char * payloadAddr() const
Definition: FUShmDqmCell.cc:54
unsigned int fuProcessId_
Definition: FUShmDqmCell.h:58
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
unsigned int folderId_
Definition: FUShmDqmCell.h:57
tuple cout
Definition: gather_cfg.py:121

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