CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Factory.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_Factory_h
2 #define FWCore_Framework_Factory_h
3 
7 
8 #include <map>
9 #include <string>
10 #include <memory>
14 
15 namespace edm {
16  class Factory {
17  public:
18  typedef std::map<std::string, edm::propagate_const<Maker*>> MakerMap;
19 
20  ~Factory();
21 
22  static Factory const* get();
23 
24  //This function is not const-thread safe
25  std::shared_ptr<maker::ModuleHolder> makeModule(const MakeModuleParams&,
26  signalslot::Signal<void(const ModuleDescription&)>& pre,
27  signalslot::Signal<void(const ModuleDescription&)>& post) const;
28 
29  std::shared_ptr<maker::ModuleHolder> makeReplacementModule(const edm::ParameterSet&) const;
30 
31  private:
32  Factory();
33  Maker* findMaker(const MakeModuleParams& p) const;
34  static Factory const singleInstance_;
35  //It is not safe to create modules across threads
37  };
38 
39 } // namespace edm
40 #endif
#define CMS_SA_ALLOW
std::shared_ptr< maker::ModuleHolder > makeReplacementModule(const edm::ParameterSet &) const
Definition: Factory.cc:65
std::map< std::string, edm::propagate_const< Maker * > > MakerMap
Definition: Factory.h:18
Maker * findMaker(const MakeModuleParams &p) const
Definition: Factory.cc:26
std::shared_ptr< maker::ModuleHolder > makeModule(const MakeModuleParams &, signalslot::Signal< void(const ModuleDescription &)> &pre, signalslot::Signal< void(const ModuleDescription &)> &post) const
Definition: Factory.cc:56
static Factory const singleInstance_
Definition: Factory.h:34
MakerMap makers_
Definition: Factory.h:36