File indexing completed on 2025-06-20 01:53:17
0001 #ifndef Framework_WorkerRegistry_h
0002 #define Framework_WorkerRegistry_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <memory>
0013
0014 #include <map>
0015 #include <string>
0016
0017 #include "FWCore/Utilities/interface/propagate_const.h"
0018
0019 namespace edm {
0020
0021 class Worker;
0022 class ActivityRegistry;
0023 struct WorkerParams;
0024 class ModuleRegistry;
0025 class ModuleTypeResolverMaker;
0026 class ParameterSet;
0027 class ExceptionToActionTable;
0028 namespace maker {
0029 class ModuleHolder;
0030 }
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 class WorkerRegistry {
0041 public:
0042 WorkerRegistry(std::shared_ptr<ActivityRegistry> areg, std::shared_ptr<ModuleRegistry> iModReg);
0043 ~WorkerRegistry();
0044
0045 WorkerRegistry(WorkerRegistry&&) = default;
0046 WorkerRegistry(WorkerRegistry const&) = delete;
0047 WorkerRegistry& operator=(WorkerRegistry const&) = delete;
0048
0049
0050
0051
0052
0053 Worker* getWorker(WorkerParams const& p, std::string const& moduleLabel);
0054
0055
0056
0057 Worker const* get(std::string const& moduleLabel) const;
0058
0059
0060 Worker* getWorkerFromExistingModule(std::string const& moduleLabel, ExceptionToActionTable const* actions);
0061
0062
0063 void deleteModule(std::string const& moduleLabel);
0064
0065 void clear();
0066
0067 private:
0068
0069 typedef std::map<std::string, edm::propagate_const<std::shared_ptr<Worker>>> WorkerMap;
0070
0071 edm::propagate_const<std::shared_ptr<ModuleRegistry>> modRegistry_;
0072
0073
0074 WorkerMap m_workerMap;
0075 std::shared_ptr<ActivityRegistry> actReg_;
0076
0077 };
0078
0079 }
0080
0081 #endif