LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
fhicl::detail::ParameterBase Class Referenceabstract

#include "ParameterBase.h"

Inheritance diagram for fhicl::detail::ParameterBase:
fhicl::detail::AtomBase fhicl::detail::DelegateBase fhicl::detail::SequenceBase fhicl::detail::TableBase fhicl::Atom< art::InputTag > fhicl::Atom< art::ScheduleID::size_type > fhicl::Atom< bool > fhicl::Atom< double > fhicl::Atom< float > fhicl::Atom< geo::fhicl::Table::CryostatID_t > fhicl::Atom< geo::fhicl::Table::OpDetID_t > fhicl::Atom< geo::fhicl::Table::PlaneID_t > fhicl::Atom< geo::fhicl::Table::TPCID_t > fhicl::Atom< geo::fhicl::Table::WireID_t > fhicl::Atom< int > fhicl::Atom< int64_t > fhicl::Atom< Path_t::Depth_t > fhicl::Atom< Pedestal_t > fhicl::Atom< raw::ADC_Count_t > fhicl::Atom< raw::ChannelID_t > fhicl::Atom< readout::ROPID::ROPID_t > fhicl::Atom< readout::TPCsetID::TPCsetID_t > fhicl::Atom< seed_t > fhicl::Atom< size_t > fhicl::Atom< std::string > fhicl::Atom< string > fhicl::Atom< uint32_t > fhicl::Atom< unsigned > fhicl::Atom< unsigned int > fhicl::Atom< unsigned long long > fhicl::Atom< T > fhicl::OptionalAtom< T > fhicl::OptionalAtom< bool > fhicl::OptionalAtom< double > fhicl::OptionalAtom< EventNumber_t > fhicl::OptionalAtom< rndm::NuRandomService::seed_t > fhicl::OptionalAtom< RunNumber_t > fhicl::OptionalAtom< std::string > fhicl::OptionalAtom< SubRunNumber_t > fhicl::OptionalAtom< unsigned int > fhicl::DelegatedParameter fhicl::OptionalDelegatedParameter fhicl::OptionalSequence< T, N > fhicl::OptionalSequence< T,-1ull > fhicl::OptionalTuple< T > fhicl::Sequence< T, N > fhicl::Sequence< T,-1ull > fhicl::Tuple< T > fhicl::OptionalSequence< art::InputTag > fhicl::OptionalSequence< double > fhicl::OptionalTuple< ARGS... > fhicl::Sequence< art::InputTag > fhicl::Sequence< double > fhicl::Sequence< double, 3 > fhicl::Sequence< double, 5 > fhicl::Sequence< fhicl::Sequence< double > > fhicl::Sequence< float > fhicl::Sequence< float, 3u > fhicl::Sequence< int > fhicl::Sequence< std::string > fhicl::Sequence< string > fhicl::OptionalTable< T > fhicl::Table< T, KeysToIgnore > fhicl::OptionalTable< art::Scheduler::Config::DebugConfig > fhicl::OptionalTable< Config > fhicl::Table< art::detail::Analyzer::Table::FullConfig< UserConfig >, KeysToIgnore_t > fhicl::Table< art::ProducerTable::FullConfig< UserConfig, ImplicitConfig >, KeysToIgnore_t > fhicl::Table< art::TimeTracker::Config::DBoutput > fhicl::Table< art::ToolConfigTable::FullConfig< Config >, KeysToIgnore_t > fhicl::Table< art::ToolConfigTable::FullConfig< UserConfig >, KeysToIgnore_t > fhicl::Table< calo::calo::CalorimetryAlg::calo::GnocchiCalorimetry::Config > fhicl::Table< calo::CalorimetryAlg::img::DataProviderAlg::Config > fhicl::Table< calo::CalorimetryAlg::nnet::PointIdEffTest::Config > fhicl::Table< cheat::BackTracker::cheat::BackTrackerService::fhiclConfig > fhicl::Table< cheat::ParticleInventory::ParticleInventoryConfig > fhicl::Table< cheat::PhotonBackTracker::cheat::PhotonBackTrackerService::fhiclConfig > fhicl::Table< evgen::evgen::ActiveVolumeVertexSampler::evgen::MarleyGen::Config > fhicl::Table< evgen::evgen::ActiveVolumeVertexSampler::evgen::MarleyTimeGen::Config > fhicl::Table< img::DataProviderAlg::pma::PMAlgTracker::Config > fhicl::Table< mf::service::ELdestination::MsgFormatSettings::mf::service::ELdestination::Config > fhicl::Table< nnet::nnet::PointIdAlg::nnet::EmTrackClusterId2out::Config > fhicl::Table< nnet::nnet::PointIdAlg::nnet::EmTrackClusterId::Config > fhicl::Table< nnet::nnet::PointIdAlg::nnet::EmTrackMichelId::Config > fhicl::Table< nnet::nnet::PointIdAlg::nnet::ParticleDecayId::Config > fhicl::Table< nnet::nnet::TrainingDataAlg::nnet::PointIdTrainingData::Config > fhicl::Table< pma::PMAlgCosmicTagger::trkf::PMAlgTrackMaker::Config > fhicl::Table< pma::PMAlgFitter::trkf::PMAlgTrajFitter::Config > fhicl::Table< pma::PMAlgStitching::trkf::PMAlgTrackMaker::Config > fhicl::Table< pma::PMAlgTracker::trkf::PMAlgTrackMaker::Config > fhicl::Table< pma::PMAlgVertexing::trkf::PMAlgTrackMaker::Config > fhicl::Table< pma::PMAlgVertexing::trkf::PMAlgTrajFitter::Config > fhicl::Table< pma::ProjectionMatchingAlg::trkf::PMAlgTrackMaker::Config > fhicl::Table< pma::ProjectionMatchingAlg::trkf::PMAlgTrajFitter::Config > fhicl::Table< PointIdAlgTools::IPointIdAlg::nnet::EmTrack::Config > fhicl::Table< T > fhicl::Table< T, fhicl::KeysToIgnore > fhicl::Table< trkf::Geometric3DVertexFitter::trkf::VertexFitter::Config > fhicl::Table< trkf::KalmanFilterFinalTrackFitter::trkf::KalmanFilterFinalTrackFitter::Inputs > fhicl::Table< trkf::KalmanFilterFinalTrackFitter::trkf::KalmanFilterFinalTrackFitter::Options > fhicl::Table< trkf::KalmanFilterTrajectoryFitter::trkf::KalmanFilterTrajectoryFitter::Inputs > fhicl::Table< trkf::KalmanFilterTrajectoryFitter::trkf::KalmanFilterTrajectoryFitter::Options > fhicl::Table< trkf::MCSFitProducer::trkf::MCSFitProducer::Inputs > fhicl::Table< trkf::TrackKalmanFitter::trkf::KalmanFilterFinalTrackFitter::Config > fhicl::Table< trkf::TrackKalmanFitter::trkf::KalmanFilterTrajectoryFitter::Config > fhicl::Table< trkf::TrackKalmanFitter::trkmkr::KalmanFilterFitTrackMaker::Config > fhicl::Table< trkf::TrackStatePropagator::trkf::KalmanFilterFinalTrackFitter::Config > fhicl::Table< trkf::TrackStatePropagator::trkf::KalmanFilterTrajectoryFitter::Config > fhicl::Table< trkf::TrackStatePropagator::trkf::VertexFitter::Config > fhicl::Table< trkf::TrackStatePropagator::trkmkr::KalmanFilterFitTrackMaker::Config > fhicl::Table< trkf::TrajectoryMCSFitter::trkf::MCSFitProducer::Config > fhicl::Table< trkf::TrajectoryMCSFitter::trkmkr::KalmanFilterFitTrackMaker::Config > fhicl::Table< trkf::VertexFitter::trkf::VertexFitter::Inputs > fhicl::Table< trkmkr::KalmanFilterFitTrackMaker::trkmkr::KalmanFilterFitTrackMaker::Options >

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_
 

Detailed Description

Definition at line 36 of file ParameterBase.h.

Constructor & Destructor Documentation

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().

51  : mdata_{name, comment, vt, type}, maybeUse_{std::move(maybeUse)}
52  {}
ParameterMetadata mdata_
Definition: ParameterBase.h:63
std::string const & name() const
std::function< bool()> maybeUse_
Definition: ParameterBase.h:64
std::string const & comment() const
fhicl::detail::ParameterBase::~ParameterBase ( )
virtualdefault

Referenced by ParameterBase().

Member Function Documentation

virtual void fhicl::detail::ParameterBase::do_set_value ( fhicl::ParameterSet const &  )
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::is_conditional ( ) const
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().

7  {
8  return mdata_.key();
9  }
ParameterMetadata mdata_
Definition: ParameterBase.h:63
std::string const & key() const
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().

64  {
65  return do_preset_value(ps);
66  }
virtual bool do_preset_value(fhicl::ParameterSet const &)
void fhicl::detail::ParameterBase::set_par_style ( par_style const  vt)
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().

59  {
60  do_set_value(ps);
61  }
virtual void do_set_value(fhicl::ParameterSet const &)=0
bool fhicl::detail::ParameterBase::should_use ( ) const

Definition at line 41 of file ParameterBase.cc.

References maybeUse_.

Referenced by fhicl::detail::ValidateThenSet::before_action().

42  {
43  return maybeUse_();
44  }
std::function< bool()> maybeUse_
Definition: ParameterBase.h:64

Member Data Documentation

std::function<bool()> fhicl::detail::ParameterBase::maybeUse_
private

Definition at line 64 of file ParameterBase.h.

Referenced by ParameterBase(), and should_use().

ParameterMetadata fhicl::detail::ParameterBase::mdata_
private

The documentation for this class was generated from the following files: