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 
8 
9 #include <map>
10 #include <string>
11 #include <memory>
15 
16 namespace edm {
18 
19  class Factory {
20  public:
21  typedef std::map<std::string, edm::propagate_const<Maker*>> MakerMap;
22 
23  ~Factory();
24 
25  static Factory const* get();
26 
27  //This function is not const-thread safe
28  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();
36  Maker* findMaker(const MakeModuleParams& p) const;
37  static Factory const singleInstance_;
38  //It is not safe to create modules across threads
40  };
41 
42 } // namespace edm
43 #endif
edm::Factory
Definition: Factory.h:19
edm::Factory::Factory
Factory()
Definition: Factory.cc:18
PluginFactory.h
edm::Maker
Definition: WorkerMaker.h:22
propagate_const.h
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::Factory::~Factory
~Factory()
Definition: Factory.cc:16
edm::MakeModuleParams
Definition: MakeModuleParams.h:21
WorkerMaker.h
CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
edm::Factory::makeReplacementModule
std::shared_ptr< maker::ModuleHolder > makeReplacementModule(const edm::ParameterSet &) const
Definition: Factory.cc:64
edm::ModuleDescription
Definition: ModuleDescription.h:21
edm::Factory::MakerMap
std::map< std::string, edm::propagate_const< Maker * > > MakerMap
Definition: Factory.h:21
edm::Factory::findMaker
Maker * findMaker(const MakeModuleParams &p) const
Definition: Factory.cc:25
edm::Factory::singleInstance_
static const Factory singleInstance_
Definition: Factory.h:37
edm::ParameterSet
Definition: ParameterSet.h:36
edmplugin::PluginFactory
Definition: PluginFactory.h:34
thread_safety_macros.h
edm::Factory::makeModule
std::shared_ptr< maker::ModuleHolder > makeModule(const MakeModuleParams &, signalslot::Signal< void(const ModuleDescription &)> &pre, signalslot::Signal< void(const ModuleDescription &)> &post) const
Definition: Factory.cc:55
Signal.h
MakeModuleParams.h
edm::Factory::get
static Factory const * get()
Definition: Factory.cc:23
Worker.h
edm::Factory::makers_
MakerMap makers_
Definition: Factory.h:39
edm::signalslot::Signal
Definition: DelayedReader.h:26