CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/EventFilter/StorageManager/interface/EventDistributor.h

Go to the documentation of this file.
00001 // $Id: EventDistributor.h,v 1.8 2011/03/07 15:31:31 mommsen Exp $
00003 
00004 #ifndef EventFilter_StorageManager_EventDistributor_h
00005 #define EventFilter_StorageManager_EventDistributor_h
00006 
00007 #include "EventFilter/StorageManager/interface/DQMEventConsumerRegistrationInfo.h"
00008 #include "EventFilter/StorageManager/interface/EventConsumerRegistrationInfo.h"
00009 #include "EventFilter/StorageManager/interface/ErrorStreamConfigurationInfo.h"
00010 #include "EventFilter/StorageManager/interface/EventQueueCollection.h"
00011 #include "EventFilter/StorageManager/interface/EventStreamConfigurationInfo.h"
00012 #include "EventFilter/StorageManager/interface/SharedResources.h"
00013 
00014 #include "boost/shared_ptr.hpp"
00015 
00016 
00017 namespace stor {
00018 
00019   class DataSenderMonitorCollection;
00020   class DQMEventSelector;
00021   class ErrorStreamConfigurationInfo;
00022   class ErrorStreamSelector;
00023   class EventConsumerSelector;
00024   class EventStreamConfigurationInfo;
00025   class EventStreamSelector;
00026   class I2OChain;
00027   class QueueID;
00028   class StatisticsReporter;
00029 
00030 
00044   class EventDistributor
00045   {
00046   public:
00047 
00048     EventDistributor(SharedResourcesPtr sr);
00049 
00050     ~EventDistributor();
00051 
00055     void addEventToRelevantQueues( I2OChain& );
00056 
00061     const bool full() const;
00062 
00066     void registerEventConsumer( const EventConsRegPtr );
00067 
00071     void registerDQMEventConsumer( const DQMEventConsRegPtr );
00072 
00076     void registerEventStreams( const EvtStrConfigListPtr );
00077 
00081     void registerErrorStreams( const ErrStrConfigListPtr );
00082 
00086     void clearStreams();
00087 
00091     unsigned int configuredStreamCount() const;
00092 
00096     unsigned int initializedStreamCount() const;
00097 
00101     void clearConsumers();
00102 
00106     unsigned int configuredConsumerCount() const;
00107 
00111     unsigned int initializedConsumerCount() const;
00112 
00116     void checkForStaleConsumers();
00117 
00118   private:
00119 
00120     void tagCompleteEventForQueues( I2OChain& );
00121 
00122     SharedResourcesPtr sharedResources_;
00123 
00124     typedef boost::shared_ptr<EventStreamSelector> EvtSelPtr;
00125     typedef std::set<EvtSelPtr, utils::ptrComp<EventStreamSelector> > EvtSelList;
00126     EvtSelList eventStreamSelectors_;
00127 
00128     typedef boost::shared_ptr<DQMEventSelector> DQMEvtSelPtr;
00129     typedef std::set<DQMEvtSelPtr, utils::ptrComp<DQMEventSelector> > DQMEvtSelList;
00130     DQMEvtSelList dqmEventSelectors_;
00131 
00132     typedef boost::shared_ptr<ErrorStreamSelector> ErrSelPtr;
00133     typedef std::set<ErrSelPtr, utils::ptrComp<ErrorStreamSelector> > ErrSelList;
00134     ErrSelList errorStreamSelectors_;
00135 
00136     typedef boost::shared_ptr<EventConsumerSelector> ConsSelPtr;
00137     typedef std::set<ConsSelPtr, utils::ptrComp<EventConsumerSelector> > ConsSelList;
00138     ConsSelList eventConsumerSelectors_;
00139 
00140   };
00141   
00142 } // namespace stor
00143 
00144 #endif // EventFilter_StorageManager_EventDistributor_h 
00145 
00146