artdaq_utilities  v1_06_03
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 {
10 inline fhicl::ParameterSet make_pset(std::string const& config_str)
11 {
12 #ifdef SIMPLER_PSET_MAKE
13  return fhicl::ParameterSet::make(config_str);
14 #else
15  fhicl::ParameterSet tmp_pset;
16  fhicl::make_ParameterSet(config_str, tmp_pset);
17  return tmp_pset;
18 #endif
19 }
20 
21 inline fhicl::ParameterSet make_pset(std::string const& config_file, cet::filepath_maker& maker)
22 {
23 #ifdef SIMPLER_PSET_MAKE
24  return fhicl::ParameterSet::make(config_file, maker);
25 #else
26  fhicl::ParameterSet tmp_pset;
27  fhicl::make_ParameterSet(config_file, maker, tmp_pset);
28  return tmp_pset;
29 #endif
30 }
31 } // namespace artdaq
32 
33 #endif // ARTDAQ_MAKE_PARAMETER_SET_HH