ArtServiceHelper.cxx
Go to the documentation of this file.
4 
6 
8  activityRegistry_{},
11 {
13 }
14 
16 {
17  std::istringstream iss{config};
18  load_services(iss);
19 }
20 
22 {
23  cet::filepath_lookup lookup{"FHICL_FILE_PATH"};
25  (fhicl::parse_document(config, lookup)));
26 }
27 
29 {
30  cet::filepath_lookup lookup{"FHICL_FILE_PATH"};
31  load_services(fhicl::ParameterSet::make(filename, lookup));
32 }
33 
35 {
36  // Make sure each service has a value for the "service_type" parameter
37  fhicl::ParameterSet post_processed_pset;
38  auto const& input = pset.has_key("services") ? pset.get<fhicl::ParameterSet>("services") : pset;
39  auto const service_names = input.get_pset_names();
40  for (auto const& service_name : service_names) {
41  auto service_pset = input.get<fhicl::ParameterSet>(service_name);
42  service_pset.put("service_type", service_name);
43  post_processed_pset.put(service_name, service_pset);
44  }
45 
46  static ArtServiceHelper helper{std::move(post_processed_pset)};
47 }
std::string string
Definition: nybbler.cc:12
static ParameterSet make(intermediate_table const &tbl)
Definition: ParameterSet.cc:68
string filename
Definition: train.py:213
static void load_services(std::string const &config)
art::ActivityRegistry activityRegistry_
static int input(void)
Definition: code.cpp:15695
static Config * config
Definition: config.cpp:1054
def move(depos, offset)
Definition: depos.py:107
T get(std::string const &key) const
Definition: ParameterSet.h:271
bool has_key(std::string const &key) const
art::ServicesManager servicesManager_
intermediate_table parse_document(std::string const &filename, cet::filepath_maker &maker)
Definition: parse.cc:720
ArtServiceHelper(fhicl::ParameterSet &&pset)
art::detail::SharedResources sharedResources_
void put(std::string const &key)