1 #ifndef fhiclcpp_intermediate_table_h 2 #define fhiclcpp_intermediate_table_h 60 #include <type_traits> 80 bool in_prolog =
false);
83 bool in_prolog =
false);
86 bool in_prolog =
false);
89 std::complex<T>
const& value,
90 bool in_prolog =
false);
93 std::vector<T>
const& value,
94 bool in_prolog =
false);
98 bool in_prolog =
false);
101 bool in_prolog =
false);
103 bool in_prolog =
false);
105 bool in_prolog =
false);
124 std::any
const& value);
145 bool in_prolog =
false);
156 template <
typename T,
typename Enable =
void>
160 template <
typename T>
163 std::is_pointer_v<T>>
::type> {
175 template <
typename U>
179 std::is_pointer_v<std::complex<U>>>
::type> {
188 return std::complex<U>(
r, i);
208 intermediate_table::sequence_t&
211 auto item = table.
locate(key);
212 if (item !=
nullptr) {
213 return std::any_cast<intermediate_table::sequence_t&>(item->value);
216 <<
"Requested non-updatable parameter \"" << key <<
"\" for update.\n";
224 intermediate_table::sequence_t
const&
227 return std::any_cast<intermediate_table::sequence_t
const&>(
247 intermediate_table::table_t&
250 auto item = table.
locate(key);
251 if (item !=
nullptr) {
252 return std::any_cast<intermediate_table::table_t&>(item->value);
255 <<
"Requested non-updatable parameter " << key <<
" for update.\n";
263 intermediate_table::table_t
const&
266 return std::any_cast<intermediate_table::table_t
const&>(
272 template <
typename T>
277 return getter(*
this, key);
291 bool const in_prolog)
299 bool const in_prolog)
304 template <
typename T>
307 std::complex<T>
const&
value,
308 bool const in_prolog)
317 template <
typename T>
320 std::vector<T>
const&
value,
321 bool const in_prolog)
328 for (
auto const& item : value) {
335 template <
typename T>
339 bool const in_prolog)
346 bool const in_prolog)
353 bool const in_prolog)
359 bool const in_prolog)
369 if (located.second) {
370 result = located.first;
379 if (!located.second) {
381 <<
"Requested non-modifiable item \"" << key <<
"\" for update.\n";
383 return *located.first;
ps_atom_t encode(std::string const &)
iter< iterator_tag, const std::pair< const Key, T >> const_iterator
std::pair< std::string, std::string > complex_t
void decode(std::any const &, std::string &)
std::vector< extended_value > sequence_t
shims::map< std::string, extended_value > table_t
fhicl::extended_value::sequence_t sequence_t
std::enable_if<!b, T > disable_if
std::complex< U > operator()(intermediate_table &table, std::string const &key)
iter< iterator_tag, std::pair< const Key, T >> iterator
std::enable_if<!b, T > disable_if
T operator()(intermediate_table &table, std::string const &key)
std::string to_string(ModuleType const mt)
cet::coded_exception< error, detail::translate > exception