CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ModuleRegistry.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_ModuleRegistry_h
2 #define FWCore_Framework_ModuleRegistry_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : ModuleRegistry
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Fri, 23 Aug 2013 16:21:10 GMT
19 //
20 
21 // system include files
22 #include <map>
23 #include <memory>
24 #include <string>
25 
26 // user include files
29 
30 // forward declarations
31 namespace edm {
32  class ParameterSet;
33  struct MakeModuleParams;
34  class ModuleDescription;
35  class PreallocationConfiguration;
36  namespace maker {
37  class ModuleHolder;
38  }
39 
41  public:
42  std::shared_ptr<maker::ModuleHolder> getModule(MakeModuleParams const& p,
43  std::string const& moduleLabel,
44  signalslot::Signal<void(ModuleDescription const&)>& iPre,
45  signalslot::Signal<void(ModuleDescription const&)>& iPost);
46 
47  maker::ModuleHolder* replaceModule(std::string const& iModuleLabel,
48  edm::ParameterSet const& iPSet,
50 
51  void deleteModule(std::string const& iModuleLabel,
52  signalslot::Signal<void(ModuleDescription const&)>& iPre,
53  signalslot::Signal<void(ModuleDescription const&)>& iPost);
54 
55  template <typename F>
56  void forAllModuleHolders(F iFunc) {
57  for (auto& labelMod : labelToModule_) {
58  maker::ModuleHolder* t = labelMod.second.get();
59  iFunc(t);
60  }
61  }
62 
63  private:
64  std::map<std::string, edm::propagate_const<std::shared_ptr<maker::ModuleHolder>>> labelToModule_;
65  };
66 } // namespace edm
67 
68 #endif
std::shared_ptr< maker::ModuleHolder > getModule(MakeModuleParams const &p, std::string const &moduleLabel, signalslot::Signal< void(ModuleDescription const &)> &iPre, signalslot::Signal< void(ModuleDescription const &)> &iPost)
std::map< std::string, edm::propagate_const< std::shared_ptr< maker::ModuleHolder > > > labelToModule_
void forAllModuleHolders(F iFunc)
maker::ModuleHolder * replaceModule(std::string const &iModuleLabel, edm::ParameterSet const &iPSet, edm::PreallocationConfiguration const &)
void deleteModule(std::string const &iModuleLabel, signalslot::Signal< void(ModuleDescription const &)> &iPre, signalslot::Signal< void(ModuleDescription const &)> &iPost)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163