4 #ifndef GeneratorInterface_CepGenInterface_CepGenParametersConverter_h 5 #define GeneratorInterface_CepGenInterface_CepGenParametersConverter_h 9 #include <CepGen/Core/ParametersList.h> 13 ParametersList params;
15 const auto cepgen_param = param ==
"name" ? MODULE_NAME : param;
17 params.set(cepgen_param, iConfig.
getParameter<
bool>(param));
19 params.set(cepgen_param, iConfig.
getParameter<
int>(param));
20 if (iConfig.
existsAs<
unsigned>(param))
21 params.set<
unsigned long long>(cepgen_param, iConfig.
getParameter<
unsigned>(param));
23 params.set(cepgen_param, iConfig.
getParameter<
double>(param));
26 if (iConfig.
existsAs<std::vector<double> >(param)) {
27 const auto& vec = iConfig.
getParameter<std::vector<double> >(param);
29 params.set<Limits>(cepgen_param, Limits{vec.at(0), vec.at(1)});
30 params.set(cepgen_param, iConfig.
getParameter<std::vector<double> >(param));
32 if (iConfig.
existsAs<std::vector<std::string> >(param))
33 params.set(cepgen_param, iConfig.
getParameter<std::vector<std::string> >(param));
T getParameter(std::string const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::vector< std::string > getParameterNames() const
ParametersList fromParameterSet(const edm::ParameterSet &iConfig)