CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WorkerRegistry.h
Go to the documentation of this file.
1 #ifndef Framework_WorkerRegistry_h
2 #define Framework_WorkerRegistry_h
3 
12 #include "boost/shared_ptr.hpp"
13 #include "boost/utility.hpp"
14 
15 #include <map>
16 #include <string>
17 
18 
19 namespace edm {
20 
21  class Worker;
22  class ActivityRegistry;
23  struct WorkerParams;
24 
33  class WorkerRegistry : private boost::noncopyable {
34 
35  public:
36 
37  explicit WorkerRegistry(boost::shared_ptr<ActivityRegistry> areg);
39 
41 
44  Worker* getWorker(WorkerParams const& p, std::string const& moduleLabel);
45  void clear();
46 
47  private:
49  typedef std::map<std::string, boost::shared_ptr<Worker> > WorkerMap;
50 
53  boost::shared_ptr<ActivityRegistry> actReg_;
54 
55  }; // WorkerRegistry
56 
57 
58 } // edm
59 
60 
61 #endif
WorkerRegistry(boost::shared_ptr< ActivityRegistry > areg)
boost::shared_ptr< ActivityRegistry > actReg_
WorkerMap m_workerMap
internal map of registered workers (owned).
Worker * getWorker(WorkerParams const &p, std::string const &moduleLabel)
Retrieve the particular instance of the worker.
std::map< std::string, boost::shared_ptr< Worker > > WorkerMap
the container of workers