#include <ParameterSet.h>
Public Types | |
using | ps_atom_t = fhicl::detail::ps_atom_t |
using | ps_sequence_t = fhicl::detail::ps_sequence_t |
using | annot_t = std::unordered_map< std::string, std::string > |
Public Member Functions | |
bool | is_empty () const |
ParameterSetID | id () const |
std::string | to_string () const |
std::string | to_compact_string () const |
std::string | to_indented_string () const |
std::string | to_indented_string (unsigned initial_indent_level) const |
std::string | to_indented_string (unsigned initial_indent_level, bool annotate) const |
std::string | to_indented_string (unsigned initial_indent_level, detail::print_mode pm) const |
std::vector< std::string > | get_names () const |
std::vector< std::string > | get_pset_names () const |
std::vector< std::string > | get_all_keys () const |
bool | has_key (std::string const &key) const |
bool | is_key_to_table (std::string const &key) const |
bool | is_key_to_sequence (std::string const &key) const |
bool | is_key_to_atom (std::string const &key) const |
template<class T > | |
std::optional< T > | get_if_present (std::string const &key) const |
template<class T , class Via > | |
std::optional< T > | get_if_present (std::string const &key, T convert(Via const &)) const |
template<class T > | |
bool | get_if_present (std::string const &key, T &value) const |
template<class T , class Via > | |
bool | get_if_present (std::string const &key, T &value, T convert(Via const &)) const |
template<class T > | |
T | get (std::string const &key) const |
template<class T , class Via > | |
T | get (std::string const &key, T convert(Via const &)) const |
template<class T > | |
T | get (std::string const &key, T const &default_value) const |
template<class T , class Via > | |
T | get (std::string const &key, T const &default_value, T convert(Via const &)) const |
std::string | get_src_info (std::string const &key) const |
void | walk (ParameterSetWalker &psw) const |
void | put (std::string const &key) |
template<class T > | |
void | put (std::string const &key, T const &value) |
void | put_or_replace (std::string const &key) |
template<class T > | |
void | put_or_replace (std::string const &key, T const &value) |
template<class T > | |
void | put_or_replace_compatible (std::string const &key, T const &value) |
bool | erase (std::string const &key) |
bool | operator== (ParameterSet const &other) const |
bool | operator!= (ParameterSet const &other) const |
template<> | |
void | put (std::string const &key, fhicl::extended_value const &value) |
Static Public Member Functions | |
static ParameterSet | make (intermediate_table const &tbl) |
static ParameterSet | make (extended_value const &xval) |
static ParameterSet | make (std::string const &str) |
static ParameterSet | make (std::string const &filename, cet::filepath_maker &maker) |
Private Types | |
using | map_t = std::map< std::string, std::any > |
using | map_iter_t = map_t::const_iterator |
Private Member Functions | |
void | insert_ (std::string const &key, std::any const &value) |
void | insert_or_replace_ (std::string const &key, std::any const &value) |
void | insert_or_replace_compatible_ (std::string const &key, std::any const &value) |
std::string | to_string_ (bool compact=false) const |
std::string | stringify_ (std::any const &a, bool compact=false) const |
bool | key_is_type_ (std::string const &key, std::function< bool(std::any const &)> func) const |
template<class T > | |
std::optional< T > | get_one_ (std::string const &key) const |
bool | find_one_ (std::string const &key) const |
std::optional< ParameterSet > | descend_ (std::vector< std::string > const &names) const |
Private Attributes | |
map_t | mapping_ |
annot_t | srcMapping_ |
ParameterSetID | id_ |
Definition at line 36 of file ParameterSet.h.
using fhicl::ParameterSet::annot_t = std::unordered_map<std::string, std::string> |
Definition at line 40 of file ParameterSet.h.
|
private |
Definition at line 123 of file ParameterSet.h.
|
private |
Definition at line 122 of file ParameterSet.h.
Definition at line 38 of file ParameterSet.h.
Definition at line 39 of file ParameterSet.h.
|
private |
Definition at line 223 of file ParameterSet.cc.
bool ParameterSet::erase | ( | std::string const & | key | ) |
Definition at line 338 of file ParameterSet.cc.
|
private |
Definition at line 209 of file ParameterSet.cc.
T fhicl::ParameterSet::get | ( | std::string const & | key | ) | const |
Definition at line 271 of file ParameterSet.h.
T fhicl::ParameterSet::get | ( | std::string const & | key, |
T | convertVia const & | ||
) | const |
Definition at line 279 of file ParameterSet.h.
T fhicl::ParameterSet::get | ( | std::string const & | key, |
T const & | default_value | ||
) | const |
Definition at line 287 of file ParameterSet.h.
T fhicl::ParameterSet::get | ( | std::string const & | key, |
T const & | default_value, | ||
T | convertVia const & | ||
) | const |
Definition at line 295 of file ParameterSet.h.
Definition at line 201 of file ParameterSet.cc.
std::optional< T > fhicl::ParameterSet::get_if_present | ( | std::string const & | key | ) | const |
Definition at line 224 of file ParameterSet.h.
std::optional< T > fhicl::ParameterSet::get_if_present | ( | std::string const & | key, |
T | convertVia const & | ||
) | const |
Definition at line 235 of file ParameterSet.h.
bool fhicl::ParameterSet::get_if_present | ( | std::string const & | key, |
T & | value | ||
) | const |
Definition at line 247 of file ParameterSet.h.
bool fhicl::ParameterSet::get_if_present | ( | std::string const & | key, |
T & | value, | ||
T | convertVia const & | ||
) | const |
Definition at line 258 of file ParameterSet.h.
Definition at line 179 of file ParameterSet.cc.
|
private |
Definition at line 321 of file ParameterSet.h.
Definition at line 189 of file ParameterSet.cc.
std::string ParameterSet::get_src_info | ( | std::string const & | key | ) | const |
Definition at line 257 of file ParameterSet.cc.
bool ParameterSet::has_key | ( | std::string const & | key | ) | const |
Definition at line 247 of file ParameterSet.cc.
ParameterSetID ParameterSet::id | ( | ) | const |
Definition at line 153 of file ParameterSet.cc.
|
private |
Definition at line 290 of file ParameterSet.cc.
|
private |
Definition at line 300 of file ParameterSet.cc.
|
private |
Definition at line 308 of file ParameterSet.cc.
bool ParameterSet::is_empty | ( | ) | const |
Definition at line 147 of file ParameterSet.cc.
|
inline |
Definition at line 177 of file ParameterSet.h.
|
inline |
Definition at line 171 of file ParameterSet.h.
|
inline |
Definition at line 165 of file ParameterSet.h.
|
private |
Definition at line 346 of file ParameterSet.cc.
|
static |
Definition at line 68 of file ParameterSet.cc.
|
static |
Definition at line 81 of file ParameterSet.cc.
|
static |
Definition at line 98 of file ParameterSet.cc.
|
static |
Definition at line 107 of file ParameterSet.cc.
|
inline |
Definition at line 312 of file ParameterSet.h.
|
inline |
Definition at line 306 of file ParameterSet.h.
void ParameterSet::put | ( | std::string const & | key | ) |
Definition at line 266 of file ParameterSet.cc.
void fhicl::ParameterSet::put | ( | std::string const & | key, |
T const & | value | ||
) |
Definition at line 186 of file ParameterSet.h.
void fhicl::ParameterSet::put | ( | std::string const & | key, |
fhicl::extended_value const & | value | ||
) |
Definition at line 409 of file ParameterSet.cc.
void ParameterSet::put_or_replace | ( | std::string const & | key | ) |
Definition at line 272 of file ParameterSet.cc.
void fhicl::ParameterSet::put_or_replace | ( | std::string const & | key, |
T const & | value | ||
) |
Definition at line 197 of file ParameterSet.h.
void fhicl::ParameterSet::put_or_replace_compatible | ( | std::string const & | key, |
T const & | value | ||
) |
Definition at line 209 of file ParameterSet.h.
Definition at line 117 of file ParameterSet.cc.
|
inline |
Definition at line 159 of file ParameterSet.h.
string ParameterSet::to_indented_string | ( | ) | const |
Definition at line 466 of file ParameterSet.cc.
string ParameterSet::to_indented_string | ( | unsigned | initial_indent_level | ) | const |
Definition at line 472 of file ParameterSet.cc.
Definition at line 478 of file ParameterSet.cc.
string ParameterSet::to_indented_string | ( | unsigned | initial_indent_level, |
detail::print_mode | pm | ||
) | const |
Definition at line 488 of file ParameterSet.cc.
|
inline |
Definition at line 153 of file ParameterSet.h.
Definition at line 162 of file ParameterSet.cc.
void ParameterSet::walk | ( | ParameterSetWalker & | psw | ) | const |
Definition at line 423 of file ParameterSet.cc.
|
mutableprivate |
Definition at line 127 of file ParameterSet.h.
|
private |
Definition at line 125 of file ParameterSet.h.
|
private |
Definition at line 126 of file ParameterSet.h.