8 #include "EventFilter/SMProxyServer/src/EventRetriever.icc"
11 #include <boost/foreach.hpp>
12 #include <boost/pointer_cast.hpp>
21 stateMachine_(stateMachine),
24 watchDogThread_.reset(
60 ) pair.second->stop();
65 ) pair.second->stop();
75 if ( ! eventConsumer )
return false;
77 DataEventRetrieverMap::const_iterator
pos =
78 dataEventRetrievers_.find(eventConsumer);
79 if ( pos == dataEventRetrievers_.end() )
return false;
81 queueIDs = pos->second->getQueueIDs();
92 if ( ! dqmEventConsumer )
return false;
94 DQMEventRetrieverMap::const_iterator
pos =
95 dqmEventRetrievers_.find(dqmEventConsumer);
96 if ( pos == dqmEventRetrievers_.end() )
return false;
98 queueIDs = pos->second->getQueueIDs();
116 sentinelException, e.what());
121 std::string errorMsg =
"Unknown exception in watch dog";
123 sentinelException, errorMsg);
155 if ( ! eventConsumer )
return false;
172 pos->second->addConsumer( eventConsumer );
184 if ( ! dqmEventConsumer )
return false;
186 DQMEventRetrieverMap::iterator
pos =
201 pos->second->addConsumer( dqmEventConsumer );
214 catch(boost::thread_interrupted)
225 sentinelException, e.what());
230 std::string errorMsg =
"Unknown exception in watch dog";
232 sentinelException, errorMsg);
249 eventQueueCollection->clearStaleQueues(now);
250 dqmEventQueueCollection->clearStaleQueues(now);
TimePoint_t getCurrentTime()
stor::RegistrationQueuePtr registrationQueue_
boost::shared_ptr< RegistrationInfoBase > RegPtr
boost::shared_ptr< DataEventRetriever > DataEventRetrieverPtr
DataEventRetrieverMap dataEventRetrievers_
std::vector< QueueID > QueueIDs
void start(DataRetrieverParams const &)
boost::shared_ptr< stor::EventConsumerRegistrationInfo > EventConsRegPtr
void moveToFailedState(xcept::Exception &e)
DataManager(StateMachine *)
stor::DQMEventQueueCollectionPtr getDQMEventQueueCollection() const
bool addDQMEventConsumer(stor::RegPtr)
boost::shared_ptr< DQMEventQueueCollection > DQMEventQueueCollectionPtr
EventQueueCollectionPtr getEventQueueCollection() const
boost::scoped_ptr< boost::thread > watchDogThread_
boost::posix_time::ptime TimePoint_t
Container::value_type value_type
stor::RegistrationQueuePtr getRegistrationQueue() const
DataRetrieverParams dataRetrieverParams_
bool addEventConsumer(stor::RegPtr)
EventRetriever< stor::EventConsumerRegistrationInfo, EventQueueCollectionPtr > DataEventRetriever
boost::shared_ptr< EventQueueCollection > EventQueueCollectionPtr
boost::scoped_ptr< boost::thread > thread_
DQMEventRetrieverMap dqmEventRetrievers_
bool getQueueIDsFromDQMEventRetrievers(stor::DQMEventConsRegPtr, stor::QueueIDs &) const
const stor::DQMEventConsRegPtr & getRegPtr() const
boost::shared_ptr< DQMEventRetriever > DQMEventRetrieverPtr
volatile bool shutdown_flag
StateMachine * stateMachine_
void checkForStaleConsumers()
EventRetriever< stor::DQMEventConsumerRegistrationInfo, stor::DQMEventQueueCollectionPtr > DQMEventRetriever
bool getQueueIDsFromDataEventRetrievers(stor::EventConsRegPtr, stor::QueueIDs &) const
boost::shared_ptr< stor::DQMEventConsumerRegistrationInfo > DQMEventConsRegPtr