LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "ParameterBase.h"
Public Member Functions | |
ParameterBase (Name const &name, Comment const &comment, par_style const vt, par_type const type, std::function< bool()> maybeUse=AlwaysUse()) | |
virtual | ~ParameterBase () |
std::string const & | key () const |
std::string const & | name () const |
std::string const & | comment () const |
bool | has_default () const |
bool | is_optional () const |
bool | is_conditional () const |
par_type | parameter_type () const |
bool | should_use () const |
void | set_value (fhicl::ParameterSet const &ps) |
bool | preset_value (fhicl::ParameterSet const &ps) |
void | set_par_style (par_style const vt) |
Private Member Functions | |
virtual bool | do_preset_value (fhicl::ParameterSet const &) |
virtual void | do_set_value (fhicl::ParameterSet const &)=0 |
Private Attributes | |
ParameterMetadata | mdata_ |
std::function< bool()> | maybeUse_ |
Definition at line 36 of file ParameterBase.h.
fhicl::detail::ParameterBase::ParameterBase | ( | Name const & | name, |
Comment const & | comment, | ||
par_style const | vt, | ||
par_type const | type, | ||
std::function< bool()> | maybeUse = AlwaysUse() |
||
) |
Definition at line 46 of file ParameterBase.cc.
References comment(), maybeUse_, name(), and ~ParameterBase().
|
virtualdefault |
Referenced by ParameterBase().
std::string const & fhicl::detail::ParameterBase::comment | ( | ) | const |
Definition at line 16 of file ParameterBase.cc.
References fhicl::detail::ParameterMetadata::comment(), and mdata_.
Referenced by fhicl::Atom< T >::Atom(), fhicl::detail::AtomBase::AtomBase(), fhicl::detail::PrintAllowedConfiguration::before_action(), fhicl::detail::DelegateBase::DelegateBase(), fhicl::DelegatedParameter::DelegatedParameter(), fhicl::OptionalAtom< T >::OptionalAtom(), fhicl::OptionalDelegatedParameter::OptionalDelegatedParameter(), fhicl::OptionalSequence< T, N >::OptionalSequence(), fhicl::OptionalSequence< T,-1ull >::OptionalSequence(), fhicl::OptionalTable< T >::OptionalTable(), fhicl::OptionalTuple< T >::OptionalTuple(), ParameterBase(), fhicl::Sequence< T, N >::Sequence(), fhicl::Sequence< T,-1ull >::Sequence(), fhicl::detail::SequenceBase::SequenceBase(), fhicl::Table< T, KeysToIgnore >::Table(), fhicl::detail::TableBase::TableBase(), and fhicl::Tuple< T >::Tuple().
|
privatevirtual |
Reimplemented in fhicl::Sequence< T,-1ull >, fhicl::OptionalSequence< T,-1ull >, fhicl::Sequence< T, N >, fhicl::Sequence< double >, fhicl::Sequence< std::string >, fhicl::Sequence< float >, fhicl::Sequence< double, 5 >, fhicl::Sequence< int >, fhicl::Sequence< art::InputTag >, fhicl::Sequence< double, 3 >, fhicl::Sequence< string >, fhicl::Sequence< fhicl::Sequence< double > >, fhicl::Sequence< float, 3u >, fhicl::OptionalSequence< T, N >, fhicl::OptionalSequence< double >, and fhicl::OptionalSequence< art::InputTag >.
Definition at line 74 of file ParameterBase.cc.
Referenced by preset_value().
|
privatepure virtual |
Implemented in fhicl::Sequence< T,-1ull >, fhicl::OptionalSequence< T,-1ull >, fhicl::Sequence< T, N >, fhicl::Sequence< double >, fhicl::Sequence< std::string >, fhicl::Sequence< float >, fhicl::Sequence< double, 5 >, fhicl::Sequence< int >, fhicl::Sequence< art::InputTag >, fhicl::Sequence< double, 3 >, fhicl::Sequence< string >, fhicl::Sequence< fhicl::Sequence< double > >, fhicl::Sequence< float, 3u >, fhicl::OptionalTuple< T >, fhicl::OptionalTuple< ARGS... >, fhicl::OptionalSequence< T, N >, fhicl::OptionalSequence< double >, fhicl::OptionalSequence< art::InputTag >, fhicl::Tuple< T >, fhicl::OptionalAtom< T >, fhicl::OptionalAtom< double >, fhicl::OptionalAtom< std::string >, fhicl::OptionalAtom< EventNumber_t >, fhicl::OptionalAtom< unsigned int >, fhicl::OptionalAtom< rndm::NuRandomService::seed_t >, fhicl::OptionalAtom< bool >, fhicl::OptionalAtom< SubRunNumber_t >, fhicl::OptionalAtom< RunNumber_t >, fhicl::Atom< T >, fhicl::Atom< Path_t::Depth_t >, fhicl::Atom< int64_t >, fhicl::Atom< uint32_t >, fhicl::Atom< double >, fhicl::Atom< geo::fhicl::Table::PlaneID_t >, fhicl::Atom< unsigned long long >, fhicl::Atom< std::string >, fhicl::Atom< float >, fhicl::Atom< readout::ROPID::ROPID_t >, fhicl::Atom< raw::ADC_Count_t >, fhicl::Atom< int >, fhicl::Atom< geo::fhicl::Table::TPCID_t >, fhicl::Atom< art::InputTag >, fhicl::Atom< unsigned int >, fhicl::Atom< geo::fhicl::Table::CryostatID_t >, fhicl::Atom< geo::fhicl::Table::WireID_t >, fhicl::Atom< geo::fhicl::Table::OpDetID_t >, fhicl::Atom< seed_t >, fhicl::Atom< string >, fhicl::Atom< size_t >, fhicl::Atom< Pedestal_t >, fhicl::Atom< unsigned >, fhicl::Atom< art::ScheduleID::size_type >, fhicl::Atom< bool >, fhicl::Atom< readout::TPCsetID::TPCsetID_t >, fhicl::Atom< raw::ChannelID_t >, fhicl::OptionalDelegatedParameter, fhicl::detail::TableBase, and fhicl::DelegatedParameter.
Referenced by set_value().
bool fhicl::detail::ParameterBase::has_default | ( | ) | const |
Definition at line 21 of file ParameterBase.cc.
References fhicl::detail::ParameterMetadata::has_default(), and mdata_.
Referenced by fhicl::detail::PrintAllowedConfiguration::after_action(), fhicl::detail::ValidateThenSet::before_action(), fhicl::Atom< T >::do_set_value(), fhicl::detail::PrintAllowedConfiguration::enter_sequence(), fhicl::Atom< T >::get_stringified_value(), and fhicl::TableAs< T, Config >::operator()().
bool fhicl::detail::ParameterBase::is_conditional | ( | ) | const |
Definition at line 31 of file ParameterBase.cc.
References fhicl::detail::ParameterMetadata::is_conditional(), and mdata_.
Referenced by fhicl::detail::PrintAllowedConfiguration::after_action(), and fhicl::detail::PrintAllowedConfiguration::before_action().
bool fhicl::detail::ParameterBase::is_optional | ( | ) | const |
Definition at line 26 of file ParameterBase.cc.
References fhicl::detail::ParameterMetadata::is_optional(), and mdata_.
Referenced by fhicl::detail::PrintAllowedConfiguration::after_action(), fhicl::detail::ValidateThenSet::before_action(), fhicl::detail::PrintAllowedConfiguration::before_action(), and fhicl::detail::TableBase::do_set_value().
std::string const & fhicl::detail::ParameterBase::key | ( | ) | const |
Definition at line 6 of file ParameterBase.cc.
References fhicl::detail::ParameterMetadata::key(), and mdata_.
Referenced by fhicl::detail::PrintAllowedConfiguration::after_action(), fhicl::detail::ValidateThenSet::before_action(), fhicl::detail::PrintAllowedConfiguration::before_action(), fhicl::detail::SearchAllowedConfiguration::before_action(), fhicl::detail::PrintAllowedConfiguration::cacheTopLevelParameter(), detinfo::LArPropertiesStandard::Configure(), fhicl::OptionalTuple< ARGS... >::do_prepare_elements_for_validation(), fhicl::OptionalSequence< art::InputTag >::do_prepare_elements_for_validation(), fhicl::OptionalSequence< T,-1ull >::do_prepare_elements_for_validation(), fhicl::OptionalSequence< T, N >::do_preset_value(), fhicl::OptionalSequence< T,-1ull >::do_preset_value(), fhicl::Atom< T >::do_set_value(), fhicl::OptionalAtom< T >::do_set_value(), fhicl::detail::ValidateThenSet::enter_sequence(), fhicl::detail::PrintAllowedConfiguration::enter_sequence(), fhicl::detail::SearchAllowedConfiguration::form_absolute(), fhicl::DelegatedParameter::get(), fhicl::OptionalDelegatedParameter::get_if_present(), fhicl::OptionalDelegatedParameter::hasValue(), fhicl::detail::MaybeDisplayParent::is_sequence_element(), fhicl::detail::TableBase::maybe_select_pset(), fhicl::detail::PrintAllowedConfiguration::maybeReleaseTopLevelParameter(), fhicl::detail::RegisterIfTableMember::RegisterIfTableMember(), fhicl::detail::TableBase::select_pset(), and fhicl::detail::PrintAllowedConfiguration::suppressFormat().
std::string const & fhicl::detail::ParameterBase::name | ( | ) | const |
Definition at line 11 of file ParameterBase.cc.
References mdata_, and fhicl::detail::ParameterMetadata::name().
Referenced by fhicl::Atom< T >::Atom(), fhicl::detail::AtomBase::AtomBase(), fhicl::detail::DelegateBase::DelegateBase(), fhicl::detail::ValidateThenSet::delegated_parameter(), fhicl::DelegatedParameter::DelegatedParameter(), fhicl::OptionalAtom< T >::OptionalAtom(), fhicl::OptionalDelegatedParameter::OptionalDelegatedParameter(), fhicl::OptionalSequence< T, N >::OptionalSequence(), fhicl::OptionalSequence< T,-1ull >::OptionalSequence(), fhicl::OptionalTable< T >::OptionalTable(), fhicl::OptionalTuple< T >::OptionalTuple(), ParameterBase(), fhicl::Sequence< T, N >::Sequence(), fhicl::Sequence< T,-1ull >::Sequence(), fhicl::detail::SequenceBase::SequenceBase(), fhicl::Table< T, KeysToIgnore >::Table(), fhicl::detail::TableBase::TableBase(), and fhicl::Tuple< T >::Tuple().
par_type fhicl::detail::ParameterBase::parameter_type | ( | ) | const |
Definition at line 36 of file ParameterBase.cc.
References mdata_, and fhicl::detail::ParameterMetadata::type().
Referenced by fhicl::detail::PrintAllowedConfiguration::after_action(), fhicl::detail::ValidateThenSet::before_action(), fhicl::detail::PrintAllowedConfiguration::enter_sequence(), fhicl::detail::SearchAllowedConfiguration::form_absolute(), and fhicl::detail::RegisterIfTableMember::RegisterIfTableMember().
bool fhicl::detail::ParameterBase::preset_value | ( | fhicl::ParameterSet const & | ps | ) |
Definition at line 63 of file ParameterBase.cc.
References do_preset_value().
Referenced by fhicl::detail::ValidateThenSet::before_action().
void fhicl::detail::ParameterBase::set_par_style | ( | par_style const | vt | ) |
Definition at line 68 of file ParameterBase.cc.
References mdata_, and fhicl::detail::ParameterMetadata::set_par_style().
Referenced by fhicl::detail::TableBase::maybe_implicitly_default(), and fhicl::TableAs< T, Config >::TableAs().
void fhicl::detail::ParameterBase::set_value | ( | fhicl::ParameterSet const & | ps | ) |
Definition at line 58 of file ParameterBase.cc.
References do_set_value().
Referenced by fhicl::detail::ValidateThenSet::after_action().
bool fhicl::detail::ParameterBase::should_use | ( | ) | const |
Definition at line 41 of file ParameterBase.cc.
References maybeUse_.
Referenced by fhicl::detail::ValidateThenSet::before_action().
|
private |
Definition at line 64 of file ParameterBase.h.
Referenced by ParameterBase(), and should_use().
|
private |
Definition at line 63 of file ParameterBase.h.
Referenced by comment(), has_default(), is_conditional(), is_optional(), key(), name(), parameter_type(), and set_par_style().