CMS 3D CMS Logo

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 ModuleTypeResolverBase;
17 
18  class Factory {
19  public:
20  typedef std::map<std::string, edm::propagate_const<std::unique_ptr<Maker>>> MakerMap;
21 
22  ~Factory();
23 
24  static Factory const* get();
25 
26  //This function is not const-thread safe
27  std::shared_ptr<maker::ModuleHolder> makeModule(const MakeModuleParams&,
29  signalslot::Signal<void(const ModuleDescription&)>& pre,
30  signalslot::Signal<void(const ModuleDescription&)>& post) const;
31 
32  std::shared_ptr<maker::ModuleHolder> makeReplacementModule(const edm::ParameterSet&) const;
33 
34  private:
35  Factory();
37  static Factory const singleInstance_;
38  //It is not safe to create modules across threads
40  };
41 
42 } // namespace edm
43 #endif
#define CMS_SA_ALLOW
std::shared_ptr< maker::ModuleHolder > makeReplacementModule(const edm::ParameterSet &) const
Definition: Factory.cc:49
Maker * findMaker(const MakeModuleParams &p, const ModuleTypeResolverBase *) const
Definition: Factory.cc:23
std::map< std::string, edm::propagate_const< std::unique_ptr< Maker > > > MakerMap
Definition: Factory.h:20
static Factory const singleInstance_
Definition: Factory.h:37
HLT enums.
std::shared_ptr< maker::ModuleHolder > makeModule(const MakeModuleParams &, const ModuleTypeResolverBase *, signalslot::Signal< void(const ModuleDescription &)> &pre, signalslot::Signal< void(const ModuleDescription &)> &post) const
Definition: Factory.cc:39
MakerMap makers_
Definition: Factory.h:39