19 : mStore{
std::move(store)}
25 return mStore->store().count(
key);
30 return mStore->store().get_child_optional(
key).is_initialized();
35 return mStore->store().count(
key) > 0 && mStore->provenance(
key) !=
"default";
40template <SimpleConfigValueType T>
41T getImpl(boost::property_tree::ptree
const&
tree,
const char*
key)
46template <StringConfigValueType T>
47T getImpl(boost::property_tree::ptree
const&
tree,
const char*
key)
49 return tree.get<std::string>(
key);
54auto getImpl(boost::property_tree::ptree
const&
tree,
const char*
key)
56 return o2::framework::vectorFromBranch<typename T::value_type>(
tree.get_child(
key));
59template <Array2DLike T>
60auto getImpl(boost::property_tree::ptree&
tree,
const char*
key)
62 return array2DFromBranch<typename T::element_t>(
tree.get_child(
key));
65template <LabeledArrayLike T>
66auto getImpl(boost::property_tree::ptree&
tree,
const char*
key)
68 return labeledArrayFromBranch<typename T::element_t>(
tree.get_child(
key));
72template <ConfigValueType T>
76 return getImpl<T>(this->mStore->store(),
key);
77 }
catch (std::exception& e) {
78 throw std::invalid_argument(std::string(
"missing option: ") +
key +
" (" + e.what() +
")");
80 throw std::invalid_argument(std::string(
"error parsing option: ") +
key);
87 mStore->store().put(
key,
val);
88 }
catch (std::exception& e) {
89 throw std::invalid_argument(std::string(
"failed to store an option: ") +
key +
" (" + e.what() +
")");
91 throw std::invalid_argument(std::string(
"failed to store an option: ") +
key);
103 return mStore->specs();
106template int8_t ConfigParamRegistry::get<int8_t>(
const char*
key)
const;
107template short ConfigParamRegistry::get<short>(
const char*
key)
const;
108template int ConfigParamRegistry::get<int>(
const char*
key)
const;
109template long ConfigParamRegistry::get<long>(
const char*
key)
const;
110template long long ConfigParamRegistry::get<long long>(
const char*
key)
const;
111template uint8_t ConfigParamRegistry::get<uint8_t>(
const char*
key)
const;
112template uint16_t ConfigParamRegistry::get<uint16_t>(
const char*
key)
const;
113template unsigned long ConfigParamRegistry::get<unsigned long>(
const char*
key)
const;
114template unsigned long long ConfigParamRegistry::get<unsigned long long>(
const char*
key)
const;
115template unsigned int ConfigParamRegistry::get<unsigned int>(
const char*
key)
const;
121template Array2D<double> ConfigParamRegistry::get<Array2D<double>>(
const char*
key)
const;
122template Array2D<float> ConfigParamRegistry::get<Array2D<float>>(
const char*
key)
const;
123template Array2D<int> ConfigParamRegistry::get<Array2D<int>>(
const char*
key)
const;
124template std::vector<std::string> ConfigParamRegistry::get<std::vector<std::string>>(
const char*
key)
const;
125template std::vector<double> ConfigParamRegistry::get<std::vector<double>>(
const char*
key)
const;
126template std::vector<float> ConfigParamRegistry::get<std::vector<float>>(
const char*
key)
const;
127template std::vector<int> ConfigParamRegistry::get<std::vector<int>>(
const char*
key)
const;
128template float ConfigParamRegistry::get<float>(
const char*
key)
const;
129template double ConfigParamRegistry::get<double>(
const char*
key)
const;
130template std::string ConfigParamRegistry::get<std::string>(
const char*
key)
const;
131template bool ConfigParamRegistry::get<bool>(
const char*
key)
const;
void loadExtra(std::vector< ConfigParamSpec > &extras)
ConfigParamRegistry(std::unique_ptr< ConfigParamStore > store)
bool isDefault(const char *key) const
bool hasOption(const char *key) const
void override(const char *key, ConfigValueType auto const &val) const
bool isSet(const char *key) const
std::vector< ConfigParamSpec > const & specs() const
T get(const char *key) const
Defining PrimaryVertex explicitly as messageable.
Defining DataPointCompositeObject explicitly as copiable.
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))