CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes

stor::DQMEventStore< EventType, ConnectionType, StateMachineType > Class Template Reference

#include <DQMEventStore.h>

List of all members.

Public Member Functions

void addDQMEvent (EventType const &)
void clear ()
bool doProcessCompletedTopLevelFolders ()
 DQMEventStore (xdaq::ApplicationDescriptor *, DQMEventQueueCollectionPtr, DQMEventMonitorCollection &, ConnectionType *, size_t(ConnectionType::*getExpectedUpdatesCount)() const, StateMachineType *, void(StateMachineType::*moveToFailedState)(xcept::Exception &), AlarmHandlerPtr)
bool empty ()
void moveToFailedState (xcept::Exception &sentinelException)
void purge ()
void setParameters (DQMProcessingParams const &)
 ~DQMEventStore ()

Private Types

typedef std::map< DQMKey,
DQMTopLevelFolderPtr
DQMTopLevelFolderMap

Private Member Functions

void addDQMEventToReadyToServe (EventType const &)
void addDQMEventToStore (EventType const &)
 DQMEventStore (DQMEventStore const &)
template<>
DQMEventMsgView getDQMEventView (I2OChain const &dqmEvent)
DQMEventMsgView getDQMEventView (EventType const &)
bool getNextReadyTopLevelFolder (DQMTopLevelFolderPtr &)
bool handleNextCompletedTopLevelFolder ()
DQMTopLevelFolderPtr makeDQMTopLevelFolder (EventType const &)
DQMEventStoreoperator= (DQMEventStore const &)
void stopProcessingCompletedTopLevelFolders ()

Static Private Member Functions

static void processCompletedTopLevelFolders (void *arg)

Private Attributes

AlarmHandlerPtr alarmHandler_
xdaq::ApplicationDescriptor * appDescriptor_
TThread * completedFolderThread_
ConnectionType * connectionType_
DQMEventMonitorCollectiondqmEventMonColl_
DQMEventQueueCollectionPtr dqmEventQueueCollection_
DQMProcessingParams dqmParams_
size_t(ConnectionType::* getExpectedUpdatesCount_ )() const
void(StateMachineType::* moveToFailedState_ )(xcept::Exception &)
bool processCompletedTopLevelFolders_
StateMachineType * stateMachineType_
DQMTopLevelFolderMap store_
std::vector< unsigned char > tempEventArea_

Static Private Attributes

static boost::mutex storeMutex_

Detailed Description

template<class EventType, class ConnectionType, class StateMachineType>
class stor::DQMEventStore< EventType, ConnectionType, StateMachineType >

Stores and collates DQM events Note that this code is not thread safe as it uses a class wide temporary buffer to convert I2OChains into DQMEventMsgViews.

Author:
mommsen
Revision:
1.14
Date:
2012/04/20 10:48:18

Definition at line 42 of file DQMEventStore.h.


Member Typedef Documentation

template<class EventType, class ConnectionType, class StateMachineType>
typedef std::map<DQMKey, DQMTopLevelFolderPtr> stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::DQMTopLevelFolderMap [private]

Definition at line 121 of file DQMEventStore.h.


Constructor & Destructor Documentation

template<class EventType, class ConnectionType, class StateMachineType>
stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::DQMEventStore ( xdaq::ApplicationDescriptor *  ,
DQMEventQueueCollectionPtr  ,
DQMEventMonitorCollection ,
ConnectionType *  ,
size_t(ConnectionType::*)() const  getExpectedUpdatesCount,
StateMachineType *  ,
void(StateMachineType::*)(xcept::Exception &)  moveToFailedState,
AlarmHandlerPtr   
)
template<class EventType, class ConnectionType, class StateMachineType>
stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::~DQMEventStore ( )
template<class EventType, class ConnectionType, class StateMachineType>
stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::DQMEventStore ( DQMEventStore< EventType, ConnectionType, StateMachineType > const &  ) [private]

Member Function Documentation

template<class EventType, class ConnectionType, class StateMachineType>
void stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::addDQMEvent ( EventType const &  )

Adds the DQM event found in EventType to the store. If a matching DQMEventRecord is found, the histograms are added unless collateDQM is false.

Referenced by stor::DQMEventProcessor::processNextDQMEvent().

template<class EventType, class ConnectionType, class StateMachineType>
void stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::addDQMEventToReadyToServe ( EventType const &  ) [private]
template<class EventType, class ConnectionType, class StateMachineType>
void stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::addDQMEventToStore ( EventType const &  ) [private]
template<class EventType, class ConnectionType, class StateMachineType>
void stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::clear ( )

Clears all data hold by the DQM event store

Referenced by stor::DQMEventProcessor::processNextDQMEvent().

template<class EventType, class ConnectionType, class StateMachineType>
bool stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::doProcessCompletedTopLevelFolders ( ) [inline]

Definition at line 92 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
bool stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::empty ( void  ) [inline]

Checks if the DQM event store is empty

Definition at line 86 of file DQMEventStore.h.

    { return store_.empty(); }
template<>
DQMEventMsgView stor::DQMEventStore< I2OChain, DataSenderMonitorCollection, AlarmHandler >::getDQMEventView ( I2OChain const &  dqmEvent) [private]

Definition at line 24 of file DQMEventProcessor.cc.

References stor::I2OChain::copyFragmentsIntoBuffer().

  {
    tempEventArea_.clear();
    dqmEvent.copyFragmentsIntoBuffer(tempEventArea_);
    return DQMEventMsgView(&tempEventArea_[0]);
  }
template<class EventType, class ConnectionType, class StateMachineType>
DQMEventMsgView stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::getDQMEventView ( EventType const &  ) [private]
template<class EventType, class ConnectionType, class StateMachineType>
bool stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::getNextReadyTopLevelFolder ( DQMTopLevelFolderPtr ) [private]
template<class EventType, class ConnectionType, class StateMachineType>
bool stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::handleNextCompletedTopLevelFolder ( ) [private]
template<class EventType, class ConnectionType, class StateMachineType>
DQMTopLevelFolderPtr stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::makeDQMTopLevelFolder ( EventType const &  ) [private]
template<class EventType, class ConnectionType, class StateMachineType>
void stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::moveToFailedState ( xcept::Exception sentinelException) [inline]

Definition at line 89 of file DQMEventStore.h.

    { (stateMachineType_->*moveToFailedState_)(sentinelException); }
template<class EventType, class ConnectionType, class StateMachineType>
DQMEventStore& stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::operator= ( DQMEventStore< EventType, ConnectionType, StateMachineType > const &  ) [private]
template<class EventType, class ConnectionType, class StateMachineType>
static void stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::processCompletedTopLevelFolders ( void *  arg) [static, private]
template<class EventType, class ConnectionType, class StateMachineType>
void stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::purge ( )

Process completed top level folders, then clear the DQM event store

Referenced by stor::DQMEventProcessor::endOfRun().

template<class EventType, class ConnectionType, class StateMachineType>
void stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::setParameters ( DQMProcessingParams const &  )

Set the DQMProcessingParams to be used. This clears everything in the store.

Referenced by stor::DQMEventProcessor::processNextDQMEvent().

template<class EventType, class ConnectionType, class StateMachineType>
void stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::stopProcessingCompletedTopLevelFolders ( ) [private]

Member Data Documentation

template<class EventType, class ConnectionType, class StateMachineType>
AlarmHandlerPtr stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::alarmHandler_ [private]

Definition at line 119 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
xdaq::ApplicationDescriptor* stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::appDescriptor_ [private]

Definition at line 111 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
TThread* stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::completedFolderThread_ [private]

Definition at line 125 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
ConnectionType* stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::connectionType_ [private]

Definition at line 115 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
DQMEventMonitorCollection& stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::dqmEventMonColl_ [private]

Definition at line 114 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
DQMEventQueueCollectionPtr stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::dqmEventQueueCollection_ [private]

Definition at line 113 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
DQMProcessingParams stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::dqmParams_ [private]

Definition at line 112 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
size_t(ConnectionType::* stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::getExpectedUpdatesCount_)() const [private]

Definition at line 116 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
void(StateMachineType::* stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::moveToFailedState_)(xcept::Exception &) [private]
template<class EventType, class ConnectionType, class StateMachineType>
bool stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::processCompletedTopLevelFolders_ [private]
template<class EventType, class ConnectionType, class StateMachineType>
StateMachineType* stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::stateMachineType_ [private]
template<class EventType, class ConnectionType, class StateMachineType>
DQMTopLevelFolderMap stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::store_ [private]
template<class EventType, class ConnectionType, class StateMachineType>
boost::mutex stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::storeMutex_ [static, private]

Definition at line 123 of file DQMEventStore.h.

template<class EventType, class ConnectionType, class StateMachineType>
std::vector<unsigned char> stor::DQMEventStore< EventType, ConnectionType, StateMachineType >::tempEventArea_ [private]

Definition at line 128 of file DQMEventStore.h.