Go to the documentation of this file.00001 #ifndef UtilAlgos_ParameterAdapter_h
00002 #define UtilAlgos_ParameterAdapter_h
00003
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005
00006 namespace reco {
00007 namespace modules {
00008
00009 template<typename S>
00010 struct ParameterAdapter {
00011 static S make(const edm::ParameterSet & cfg) {
00012 return S(cfg);
00013 }
00014 };
00015
00016 template<typename S>
00017 S make(const edm::ParameterSet & cfg) {
00018 return ParameterAdapter<S>::make(cfg);
00019 }
00020
00021 }
00022 }
00023
00024 #define NOPARAMETER_ADAPTER(TYPE) \
00025 namespace reco { \
00026 namespace modules { \
00027 struct ParameterAdapter<TYPE> { \
00028 static TYPE make(const edm::ParameterSet & cfg) { \
00029 return TYPE(); \
00030 } \
00031 }; \
00032 } \
00033 }
00034
00035 #endif