CMS 3D CMS Logo

MakeModuleHelper.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_MakeModuleHelper_h
2 #define FWCore_Framework_MakeModuleHelper_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : MakeModuleHelper
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Sun, 25 Aug 2013 20:54:45 GMT
19 //
20 
21 // system include files
22 #include <memory>
23 // user include files
24 
25 // forward declarations
26 namespace edm {
27  class ParameterSet;
28 
29  template <typename Base>
31  public:
32  MakeModuleHelper() = delete;
33  MakeModuleHelper(const MakeModuleHelper&) = delete; // stop default
34 
35  const MakeModuleHelper& operator=(const MakeModuleHelper&) = delete; // stop default
36 
37  template <typename T>
38  static std::unique_ptr<Base> makeModule(ParameterSet const& pset) {
39  auto module = std::make_unique<T>(pset);
40  return std::unique_ptr<Base>(module.release());
41  }
42  };
43 } // namespace edm
44 
45 #endif
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::MakeModuleHelper::operator=
const MakeModuleHelper & operator=(const MakeModuleHelper &)=delete
edm::MakeModuleHelper
Definition: MakeModuleHelper.h:30
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
edm::MakeModuleHelper::makeModule
static std::unique_ptr< Base > makeModule(ParameterSet const &pset)
Definition: MakeModuleHelper.h:38
edm::MakeModuleHelper::MakeModuleHelper
MakeModuleHelper()=delete
callgraph.module
module
Definition: callgraph.py:61
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27