#include <PMTconfigurationExtractor.h>
Public Types | |
using | ConfigurationData_t = sbn::PMTconfiguration |
Static Public Member Functions | |
Utility | |
static fhicl::ParameterSet | convertConfigurationDocuments (fhicl::ParameterSet const &container, std::string const &configListKey, std::initializer_list< std::regex const > components) |
Returns a parameter set with the content of configuration_documents key from container . More... | |
template<typename RBegin , typename REnd > | |
static bool | matchKey (std::string const &key, RBegin rbegin, REnd rend) |
Interface | |
static bool | mayHaveConfiguration (fhicl::ParameterSet const &pset) |
Returns whether pset may contain the needed configuration. More... | |
ConfigurationData_t | extract (fhicl::ParameterSet const &config) const |
Extracts all supported PMT configuration from config . More... | |
ConfigurationData_t | finalize (ConfigurationData_t config) const |
Finalizes the content of config and returns it. More... | |
Definition at line 63 of file PMTconfigurationExtractor.h.
Definition at line 67 of file PMTconfigurationExtractor.h.
|
static |
Returns a parameter set with the content of configuration_documents
key from container
.
container | parameter set including a table with key configListKey |
configListKey | name of the key in container with the configuration |
components | keys to be converted (as regular expressions) |
The configuration_documents
element of container
is processed: for each of its keys which match at least one of the components
regular expression patterns (std::regex_match()
), the associated string value is parsed with FHiCL parser, and the result is set as a FHiCL table in the output parameter set. For example, if the components
are { std::regex{".*pmt.*"}, std::regex{".*trigger.*"} }
, the returned value is a parameter set that may have keys like icaruspmtee01
, icaruspmtew02
, icarustrigger
etc., each one with a FHiCL table as `value.
Definition at line 23 of file PMTconfigurationExtractor.cxx.
ConfigurationData_t icarus::PMTconfigurationExtractorBase::extract | ( | fhicl::ParameterSet const & | config | ) | const |
Extracts all supported PMT configuration from config
.
config | a FHiCL parameter set with component configuration |
All PMT-related configuration that is known to this code is extracted and returned.
This function is undefined here: it must be overridden.
|
inline |
Finalizes the content of config
and returns it.
Definition at line 92 of file PMTconfigurationExtractor.h.
|
static |
Returns whether key
matches at least one of the regular expressions in the [ rbegin
, rend
[ range.
Definition at line 483 of file PMTconfigurationExtractor.h.
|
inlinestatic |
Returns whether pset
may contain the needed configuration.
Definition at line 74 of file PMTconfigurationExtractor.h.