CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/EventFilter/StorageManager/interface/DiscardManager.h

Go to the documentation of this file.
00001 // $Id: DiscardManager.h,v 1.7 2011/04/07 08:02:03 mommsen Exp $
00003 
00004 #ifndef EventFilter_StorageManager_DiscardManager_h
00005 #define EventFilter_StorageManager_DiscardManager_h
00006 
00007 #include "xdaq/ApplicationContext.h"
00008 #include "xdaq/ApplicationDescriptor.h"
00009 #include "toolbox/mem/Pool.h"
00010 
00011 #include "boost/shared_ptr.hpp"
00012 
00013 #include <map>
00014 #include <string>
00015 #include <utility>
00016 
00017 
00018 namespace stor {
00019 
00020   class DataSenderMonitorCollection;
00021   class FUProxy;
00022   class I2OChain;
00023 
00024 
00033   class DiscardManager
00034   {
00035   public:
00036 
00037     typedef std::pair<std::string, unsigned int> HLTSenderKey;
00038     typedef boost::shared_ptr<FUProxy> FUProxyPtr;
00039     typedef std::map< HLTSenderKey, boost::shared_ptr<FUProxy> > FUProxyMap;
00040 
00047     DiscardManager
00048     (
00049       xdaq::ApplicationContext*,
00050       xdaq::ApplicationDescriptor*,
00051       DataSenderMonitorCollection&
00052     );
00053 
00057     void configure();
00058 
00083     bool sendDiscardMessage(I2OChain const&);
00084 
00085   private:
00086 
00087     FUProxyPtr getProxyFromCache
00088     (
00089       std::string const& hltClassName,
00090       unsigned int const& hltInstance
00091     );
00092     
00093     FUProxyPtr makeNewFUProxy
00094     (
00095       std::string const& hltClassName,
00096       unsigned int const& hltInstance
00097     );
00098 
00099     xdaq::ApplicationContext* appContext_;
00100     xdaq::ApplicationDescriptor* appDescriptor_;
00101     toolbox::mem::Pool* msgPool_;
00102 
00103     FUProxyMap proxyCache_;
00104 
00105     DataSenderMonitorCollection& dataSenderMonCollection_;
00106   };
00107 
00108   typedef boost::shared_ptr<DiscardManager> DiscardManagerPtr;
00109 
00110 } // namespace stor
00111 
00112 #endif // EventFilter_StorageManager_DiscardManager_h 
00113 
00114