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 <memory>
13 
14 #include <map>
15 #include <string>
16 
18 
19 namespace edm {
20 
21  class Worker;
22  class ActivityRegistry;
23  struct WorkerParams;
24  class ModuleRegistry;
25  class ParameterSet;
26  namespace maker {
27  class ModuleHolder;
28  }
29 
39 
40  public:
41 
42  explicit WorkerRegistry(std::shared_ptr<ActivityRegistry> areg);
43  WorkerRegistry(std::shared_ptr<ActivityRegistry> areg,
44  std::shared_ptr<ModuleRegistry> iModReg);
46 
47  WorkerRegistry(WorkerRegistry const&) = delete; // Disallow copying and moving
48  WorkerRegistry& operator=(WorkerRegistry const&) = delete; // Disallow copying and moving
49 
51 
54  Worker* getWorker(WorkerParams const& p, std::string const& moduleLabel);
55  void clear();
56 
57  private:
59  typedef std::map<std::string, edm::propagate_const<std::shared_ptr<Worker>>> WorkerMap;
60 
62 
65  std::shared_ptr<ActivityRegistry> actReg_; // We do not use propagate_const because the registry itself is mutable.
66 
67  }; // WorkerRegistry
68 
69 
70 } // edm
71 
72 
73 #endif
std::shared_ptr< ActivityRegistry > actReg_
WorkerRegistry(std::shared_ptr< ActivityRegistry > areg)
WorkerRegistry & operator=(WorkerRegistry const &)=delete
WorkerMap m_workerMap
internal map of registered workers (owned).
areg
Definition: Schedule.cc:384
edm::propagate_const< std::shared_ptr< ModuleRegistry > > modRegistry_
std::map< std::string, edm::propagate_const< std::shared_ptr< Worker > > > WorkerMap
the container of workers
Worker * getWorker(WorkerParams const &p, std::string const &moduleLabel)
Retrieve the particular instance of the worker.
The Registry of all workers that where requested Holds all instances of workers. In this implementati...