CMS 3D CMS Logo

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

#include <DQMEventMsg.h>

Public Member Functions

unsigned char * dataLocation () const
 
 DQMEventMsg ()
 
 DQMEventMsg (const DQMEventMsgView &)
 
const stor::DQMKeydqmKey () const
 
bool empty () const
 
bool faulty () const
 
const stor::QueueIDsgetDQMEventConsumerTags () const
 
size_t memoryUsed () const
 
void tagForDQMEventConsumers (const stor::QueueIDs &)
 
unsigned long totalDataSize () const
 

Private Types

typedef std::vector< unsigned
char > 
DQMEventMsgBuffer
 

Private Attributes

boost::shared_ptr
< DQMEventMsgBuffer
buf_
 
stor::DQMKey dqmKey_
 
bool faulty_
 
stor::QueueIDs queueIDs_
 

Detailed Description

A class for storing an DQMEventMsgView and providing the basic APIs required for SMPS

Author:
mommsen
Revision:
1.2
Date:
2011/03/07 15:41:54

Definition at line 25 of file DQMEventMsg.h.

Member Typedef Documentation

typedef std::vector<unsigned char> smproxy::DQMEventMsg::DQMEventMsgBuffer
private

Definition at line 74 of file DQMEventMsg.h.

Constructor & Destructor Documentation

smproxy::DQMEventMsg::DQMEventMsg ( )

Definition at line 10 of file DQMEventMsg.cc.

10  :
11  faulty_(true)
12  {}
smproxy::DQMEventMsg::DQMEventMsg ( const DQMEventMsgView dqmEventMsgView)

Definition at line 15 of file DQMEventMsg.cc.

References buf_, filterCSVwithJSON::copy, dqmKey_, stor::DQMKey::lumiSection, DQMEventMsgView::lumiSection(), stor::DQMKey::runNumber, DQMEventMsgView::runNumber(), DQMEventMsgView::size(), DQMEventMsgView::startAddress(), DQMEventMsgView::topFolderName(), and stor::DQMKey::topLevelFolderName.

15  :
16  faulty_(false)
17  {
18  buf_.reset( new DQMEventMsgBuffer(dqmEventMsgView.size()) );
19  std::copy(
20  dqmEventMsgView.startAddress(),
21  dqmEventMsgView.startAddress()+dqmEventMsgView.size(),
22  &(*buf_)[0]
23  );
24  dqmKey_.runNumber = dqmEventMsgView.runNumber();
25  dqmKey_.lumiSection = dqmEventMsgView.lumiSection();
26  dqmKey_.topLevelFolderName = dqmEventMsgView.topFolderName();
27  }
boost::shared_ptr< DQMEventMsgBuffer > buf_
Definition: DQMEventMsg.h:75
std::string topFolderName() const
std::string topLevelFolderName
Definition: DQMKey.h:25
std::vector< unsigned char > DQMEventMsgBuffer
Definition: DQMEventMsg.h:74
uint8 * startAddress() const
uint32_t runNumber
Definition: DQMKey.h:23
uint32 lumiSection() const
uint32_t lumiSection
Definition: DQMKey.h:24
uint32 size() const
uint32 runNumber() const
stor::DQMKey dqmKey_
Definition: DQMEventMsg.h:79

Member Function Documentation

unsigned char * smproxy::DQMEventMsg::dataLocation ( ) const

Returns the start adderess of the event message

Definition at line 60 of file DQMEventMsg.cc.

61  {
62  return &(*buf_)[0];
63  }
const stor::DQMKey & smproxy::DQMEventMsg::dqmKey ( ) const

Return the DQM key corresponding to this message

Definition at line 42 of file DQMEventMsg.cc.

References dqmKey_.

43  {
44  return dqmKey_;
45  }
stor::DQMKey dqmKey_
Definition: DQMEventMsg.h:79
bool smproxy::DQMEventMsg::empty ( void  ) const

Returns true if no event message is managed by *this

Definition at line 66 of file DQMEventMsg.cc.

References buf_.

Referenced by Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

67  {
68  return (buf_.get() == 0);
69  }
boost::shared_ptr< DQMEventMsgBuffer > buf_
Definition: DQMEventMsg.h:75
bool smproxy::DQMEventMsg::faulty ( ) const

Returns true if the event message is faulty

Definition at line 72 of file DQMEventMsg.cc.

References faulty_.

73  {
74  return faulty_;
75  }
const stor::QueueIDs & smproxy::DQMEventMsg::getDQMEventConsumerTags ( ) const

Return the QueueIDs for which the DQM event is tagged

Definition at line 36 of file DQMEventMsg.cc.

References queueIDs_.

37  {
38  return queueIDs_;
39  }
stor::QueueIDs queueIDs_
Definition: DQMEventMsg.h:78
size_t smproxy::DQMEventMsg::memoryUsed ( ) const

Returns the total memory occupied by the event message

Definition at line 48 of file DQMEventMsg.cc.

References buf_.

49  {
50  return sizeof(buf_);
51  }
boost::shared_ptr< DQMEventMsgBuffer > buf_
Definition: DQMEventMsg.h:75
void smproxy::DQMEventMsg::tagForDQMEventConsumers ( const stor::QueueIDs queueIDs)

Tag the DQM event for the passed list of queueIDs

Definition at line 30 of file DQMEventMsg.cc.

References queueIDs_.

31  {
32  queueIDs_ = queueIDs;
33  }
stor::QueueIDs queueIDs_
Definition: DQMEventMsg.h:78
unsigned long smproxy::DQMEventMsg::totalDataSize ( ) const

Returns the size of the event message

Definition at line 54 of file DQMEventMsg.cc.

References buf_.

55  {
56  return buf_->size();
57  }
boost::shared_ptr< DQMEventMsgBuffer > buf_
Definition: DQMEventMsg.h:75

Member Data Documentation

boost::shared_ptr<DQMEventMsgBuffer> smproxy::DQMEventMsg::buf_
private

Definition at line 75 of file DQMEventMsg.h.

Referenced by DQMEventMsg(), empty(), memoryUsed(), and totalDataSize().

stor::DQMKey smproxy::DQMEventMsg::dqmKey_
private

Definition at line 79 of file DQMEventMsg.h.

Referenced by DQMEventMsg(), and dqmKey().

bool smproxy::DQMEventMsg::faulty_
private

Definition at line 76 of file DQMEventMsg.h.

Referenced by faulty().

stor::QueueIDs smproxy::DQMEventMsg::queueIDs_
private

Definition at line 78 of file DQMEventMsg.h.

Referenced by getDQMEventConsumerTags(), and tagForDQMEventConsumers().