#include <EventDistributor.h>
Public Member Functions | |
void | addEventToRelevantQueues (I2OChain &) |
void | checkForStaleConsumers () |
void | clearConsumers () |
void | clearStreams () |
unsigned int | configuredConsumerCount () const |
unsigned int | configuredStreamCount () const |
EventDistributor (SharedResourcesPtr sr) | |
const bool | full () const |
unsigned int | initializedConsumerCount () const |
unsigned int | initializedStreamCount () const |
void | registerDQMEventConsumer (const DQMEventConsRegPtr) |
void | registerErrorStreams (const ErrStrConfigListPtr) |
void | registerEventConsumer (const EventConsRegPtr) |
void | registerEventStreams (const EvtStrConfigListPtr) |
~EventDistributor () | |
Private Types | |
typedef std::set< ConsSelPtr, utils::ptrComp < EventConsumerSelector > > | ConsSelList |
typedef boost::shared_ptr < EventConsumerSelector > | ConsSelPtr |
typedef std::set< DQMEvtSelPtr, utils::ptrComp < DQMEventSelector > > | DQMEvtSelList |
typedef boost::shared_ptr < DQMEventSelector > | DQMEvtSelPtr |
typedef std::set< ErrSelPtr, utils::ptrComp < ErrorStreamSelector > > | ErrSelList |
typedef boost::shared_ptr < ErrorStreamSelector > | ErrSelPtr |
typedef std::set< EvtSelPtr, utils::ptrComp < EventStreamSelector > > | EvtSelList |
typedef boost::shared_ptr < EventStreamSelector > | EvtSelPtr |
Private Member Functions | |
void | tagCompleteEventForQueues (I2OChain &) |
Private Attributes | |
DQMEvtSelList | dqmEventSelectors_ |
ErrSelList | errorStreamSelectors_ |
ConsSelList | eventConsumerSelectors_ |
EvtSelList | eventStreamSelectors_ |
SharedResourcesPtr | sharedResources_ |
Distributes complete events to appropriate queues
It receives complete events in form of I2OChains and distributes it to the appropriate queues by checking the I2O message type and the trigger bits in the event header.
Definition at line 44 of file EventDistributor.h.
|
private |
Definition at line 137 of file EventDistributor.h.
|
private |
Definition at line 136 of file EventDistributor.h.
|
private |
Definition at line 129 of file EventDistributor.h.
|
private |
Definition at line 128 of file EventDistributor.h.
|
private |
Definition at line 133 of file EventDistributor.h.
|
private |
Definition at line 132 of file EventDistributor.h.
|
private |
Definition at line 125 of file EventDistributor.h.
|
private |
Definition at line 124 of file EventDistributor.h.
EventDistributor::EventDistributor | ( | SharedResourcesPtr | sr | ) |
Definition at line 27 of file EventDistributor.cc.
EventDistributor::~EventDistributor | ( | ) |
void EventDistributor::addEventToRelevantQueues | ( | I2OChain & | ioc | ) |
Add the event given as I2OChain to the appropriate queues
Definition at line 38 of file EventDistributor.cc.
References stor::DataSenderMonitorCollection::addFaultyEventSample(), stor::RunMonitorCollection::addUnwantedEvent(), stor::I2OChain::complete(), stor::AlarmHandler::ERROR, Header::EVENT, stor::FragKey::event_, stor::I2OChain::faulty(), stor::I2OChain::faultyBits(), stor::I2OChain::fragmentKey(), stor::I2OChain::hltURL(), I2O_SM_DATA, I2O_SM_ERROR, stor::I2OChain::i2oMessageCode(), stor::I2OChain::isTaggedForAnyEventConsumer(), stor::I2OChain::isTaggedForAnyStream(), stor::I2OChain::messageCode(), lumiQueryAPI::msg, stor::I2OChain::rbBufferId(), sharedResources_, tagCompleteEventForQueues(), and stor::I2OChain::tagForStream().
Referenced by stor::DrainingQueues::processStaleFragments().
void EventDistributor::checkForStaleConsumers | ( | ) |
Updates staleness info for consumers.
Definition at line 361 of file EventDistributor.cc.
References stor::utils::getCurrentTime(), cmsPerfSuiteHarvest::now, and sharedResources_.
void EventDistributor::clearConsumers | ( | ) |
Clears out all existing consumer registrations.
Definition at line 333 of file EventDistributor.cc.
References dqmEventSelectors_, and eventConsumerSelectors_.
Referenced by stor::Running::do_entryActionWork(), and ~EventDistributor().
void EventDistributor::clearStreams | ( | ) |
Clears out all existing event and error streams.
Definition at line 304 of file EventDistributor.cc.
References errorStreamSelectors_, and eventStreamSelectors_.
Referenced by ~EventDistributor().
unsigned int EventDistributor::configuredConsumerCount | ( | ) | const |
Returns the number of consumers that have been configured.
Definition at line 340 of file EventDistributor.cc.
References dqmEventSelectors_, and eventConsumerSelectors_.
unsigned int EventDistributor::configuredStreamCount | ( | ) | const |
Returns the number of streams that have been configured.
Definition at line 311 of file EventDistributor.cc.
References errorStreamSelectors_, and eventStreamSelectors_.
const bool EventDistributor::full | ( | ) | const |
Returns true if no further events can be processed, e.g. the StreamQueue is full
Definition at line 239 of file EventDistributor.cc.
References sharedResources_.
Referenced by stor::DrainingQueues::allQueuesAndWorkersAreEmpty(), stor::FragmentProcessor::processOneFragmentIfPossible(), and stor::DrainingQueues::processStaleFragments().
unsigned int EventDistributor::initializedConsumerCount | ( | ) | const |
Returns the number of consumers that have been configured and initialized.
Definition at line 346 of file EventDistributor.cc.
References eventConsumerSelectors_.
unsigned int EventDistributor::initializedStreamCount | ( | ) | const |
Returns the number of streams that have been configured and initialized.
Definition at line 318 of file EventDistributor.cc.
References eventStreamSelectors_.
void EventDistributor::registerDQMEventConsumer | ( | const DQMEventConsRegPtr | ptr | ) |
Registers a new DQM consumer
Definition at line 274 of file EventDistributor.cc.
References dqmEventSelectors_.
Referenced by stor::DQMEventConsumerRegistrationInfo::do_registerMe().
void EventDistributor::registerErrorStreams | ( | const ErrStrConfigListPtr | cl | ) |
Registers the full set of error event streams.
Definition at line 292 of file EventDistributor.cc.
References errorStreamSelectors_.
Referenced by stor::Running::do_entryActionWork().
void EventDistributor::registerEventConsumer | ( | const EventConsRegPtr | regPtr | ) |
Registers a new consumer
Definition at line 246 of file EventDistributor.cc.
References alignCSCRings::e, and stor::AlarmHandler::ERROR.
Referenced by stor::EventConsumerRegistrationInfo::do_registerMe().
void EventDistributor::registerEventStreams | ( | const EvtStrConfigListPtr | cl | ) |
Registers the full set of event streams.
Definition at line 280 of file EventDistributor.cc.
References eventStreamSelectors_.
Referenced by stor::Running::do_entryActionWork().
|
private |
Definition at line 90 of file EventDistributor.cc.
References stor::DataSenderMonitorCollection::addDQMEventSample(), stor::DataSenderMonitorCollection::addErrorEventSample(), stor::DataSenderMonitorCollection::addEventSample(), stor::DataSenderMonitorCollection::addFaultyEventSample(), stor::DataSenderMonitorCollection::addInitSample(), stor::MonitoredQuantity::addSample(), stor::MonitoredQuantity::addSampleIfLarger(), Header::DQM_EVENT, dqmEventSelectors_, alignCSCRings::e, stor::AlarmHandler::ERROR, Header::ERROR_EVENT, errorStreamSelectors_, Header::EVENT, eventConsumerSelectors_, stor::I2OChain::eventNumber(), eventStreamSelectors_, stor::utils::getCurrentTime(), stor::RunMonitorCollection::getErrorEventIDsReceivedMQ(), stor::RunMonitorCollection::getEventIDsReceivedMQ(), stor::RunMonitorCollection::getLumiSectionsSeenMQ(), stor::RunMonitorCollection::getRunNumbersSeenMQ(), Header::INIT, stor::EventStreamSelector::initialize(), stor::EventConsumerSelector::initialize(), stor::I2OChain::isTaggedForAnyDQMEventConsumer(), stor::I2OChain::lumiSection(), stor::I2OChain::messageCode(), lumiQueryAPI::msg, cmsPerfSuiteHarvest::now, stor::I2OChain::runNumber(), sharedResources_, stor::I2OChain::tagForDQMEventConsumer(), stor::I2OChain::tagForEventConsumer(), and stor::I2OChain::tagForStream().
Referenced by addEventToRelevantQueues().
|
private |
Definition at line 130 of file EventDistributor.h.
Referenced by clearConsumers(), configuredConsumerCount(), registerDQMEventConsumer(), and tagCompleteEventForQueues().
|
private |
Definition at line 134 of file EventDistributor.h.
Referenced by clearStreams(), configuredStreamCount(), registerErrorStreams(), and tagCompleteEventForQueues().
|
private |
Definition at line 138 of file EventDistributor.h.
Referenced by clearConsumers(), configuredConsumerCount(), initializedConsumerCount(), and tagCompleteEventForQueues().
|
private |
Definition at line 126 of file EventDistributor.h.
Referenced by clearStreams(), configuredStreamCount(), initializedStreamCount(), registerEventStreams(), and tagCompleteEventForQueues().
|
private |
Definition at line 122 of file EventDistributor.h.
Referenced by addEventToRelevantQueues(), checkForStaleConsumers(), full(), and tagCompleteEventForQueues().