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 
14 #include <map>
15 #include <string>
16 
17 
18 namespace edm {
19 
20  class Worker;
21  class ActivityRegistry;
22  struct WorkerParams;
23 
33 
34  public:
35 
36  explicit WorkerRegistry(boost::shared_ptr<ActivityRegistry> areg);
38 
39  WorkerRegistry(WorkerRegistry const&) = delete; // Disallow copying and moving
40  WorkerRegistry& operator=(WorkerRegistry const&) = delete; // Disallow copying and moving
41 
43 
46  Worker* getWorker(WorkerParams const& p, std::string const& moduleLabel);
47  void clear();
48 
49  private:
51  typedef std::map<std::string, boost::shared_ptr<Worker> > WorkerMap;
52 
55  boost::shared_ptr<ActivityRegistry> actReg_;
56 
57  }; // WorkerRegistry
58 
59 
60 } // edm
61 
62 
63 #endif
WorkerRegistry(boost::shared_ptr< ActivityRegistry > areg)
boost::shared_ptr< ActivityRegistry > actReg_
WorkerRegistry & operator=(WorkerRegistry const &)=delete
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