CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ParameterAdapter.h
Go to the documentation of this file.
1 #ifndef UtilAlgos_ParameterAdapter_h
2 #define UtilAlgos_ParameterAdapter_h
3 
5 
6 namespace reco {
7  namespace modules {
8 
9  template<typename S>
10  struct ParameterAdapter {
11  static S make(const edm::ParameterSet & cfg) {
12  return S(cfg);
13  }
14  };
15 
16  template<typename S>
17  S make(const edm::ParameterSet & cfg) {
18  return ParameterAdapter<S>::make(cfg);
19  }
20 
21  }
22 }
23 
24 #define NOPARAMETER_ADAPTER(TYPE) \
25 namespace reco { \
26  namespace modules { \
27  struct ParameterAdapter<TYPE> { \
28  static TYPE make(const edm::ParameterSet & cfg) { \
29  return TYPE(); \
30  } \
31  }; \
32  } \
33 }
34 
35 #endif
S make(const edm::ParameterSet &cfg)
static S make(const edm::ParameterSet &cfg)