artdaq_utilities  v1_07_00
MakeParameterSet.hh
1 #ifndef ARTDAQ_MAKE_PARAMETER_SET_HH
2 #define ARTDAQ_MAKE_PARAMETER_SET_HH
3 
4 #include "fhiclcpp/ParameterSet.h"
5 #ifndef SIMPLER_PSET_MAKE
6 #include "fhiclcpp/make_ParameterSet.h"
7 #endif
8 
9 namespace artdaq {
15 inline fhicl::ParameterSet make_pset(std::string const& config_str)
16 {
17 #ifdef SIMPLER_PSET_MAKE
18  return fhicl::ParameterSet::make(config_str);
19 #else
20  fhicl::ParameterSet tmp_pset;
21  fhicl::make_ParameterSet(config_str, tmp_pset);
22  return tmp_pset;
23 #endif
24 }
25 
32 inline fhicl::ParameterSet make_pset(std::string const& config_file, cet::filepath_maker& maker)
33 {
34 #ifdef SIMPLER_PSET_MAKE
35  return fhicl::ParameterSet::make(config_file, maker);
36 #else
37  fhicl::ParameterSet tmp_pset;
38  fhicl::make_ParameterSet(config_file, maker, tmp_pset);
39  return tmp_pset;
40 #endif
41 }
42 } // namespace artdaq
43 
44 #endif // ARTDAQ_MAKE_PARAMETER_SET_HH
fhicl::ParameterSet make_pset(std::string const &config_str)
Create a fhicl::ParameterSet from a string.