Public Member Functions | Private Member Functions | Private Attributes | List of all members
fhicl::detail::ParameterBase Class Referenceabstract

#include "/cvmfs/nova.opensciencegrid.org/externals/fhiclcpp/v4_06_10/source/fhiclcpp/types/detail/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< bool > fhicl::Atom< double > fhicl::Atom< EventNumber_t > fhicl::Atom< float > fhicl::Atom< int > fhicl::Atom< int64_t > fhicl::Atom< size_t > fhicl::Atom< std::int64_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< EventNumber_t > fhicl::OptionalAtom< RunNumber_t > fhicl::OptionalAtom< std::string > fhicl::OptionalAtom< SubRunNumber_t > fhicl::DelegatedParameter fhicl::OptionalDelegatedParameter fhicl::OptionalSequence< T, N > fhicl::OptionalSequence< T,-1ull > fhicl::OptionalTuple< TYPES > fhicl::Sequence< T, N > fhicl::Sequence< T,-1ull > fhicl::Tuple< TYPES > fhicl::OptionalSequence< Table< T >< art::RootInputFileSequence::Config::SecondaryFile > > fhicl::OptionalTuple< ARGS... > fhicl::Sequence< double > fhicl::Sequence< int > fhicl::Sequence< std::string > fhicl::Sequence< string > fhicl::OptionalTable< T > fhicl::Table< T, KeysToIgnore > fhicl::OptionalTable< art::ClosingCriteria::art::TFileService::Config > fhicl::Table< art::ClosingCriteria::art::RootOutput::Config > fhicl::Table< art::EDAnalyzer::Table::FullConfig< UserConfig >, KeysToIgnore_t > fhicl::Table< art::MemoryTracker::Config::DBoutput > fhicl::Table< art::ProducerTable::FullConfig< UserConfig, ImplicitConfig >, KeysToIgnore_t > fhicl::Table< art::TimeTracker::Config::DBoutput > fhicl::Table< art::ToolConfigTable::FullConfig< UserConfig >, KeysToIgnore_t > fhicl::Table< calib::calib::ShapeTableParams > fhicl::Table< mf::service::ELdestination::MsgFormatSettings::mf::service::ELdestination::Config > fhicl::Table< rsim::GainParams > fhicl::Table< T > fhicl::Table< T, fhicl::KeysToIgnore >

Public Member Functions

std::string key () const
 
std::string name () const
 
std::string comment () const
 
bool has_default () const
 
bool is_optional () const
 
bool is_conditional () const
 
par_type parameter_type () const
 
bool should_use () const
 
 ParameterBase (Name const &name, Comment const &comment, par_style const vt, par_type const type, std::function< bool()> maybeUse=AlwaysUse())
 
virtual ~ParameterBase ()=default
 
void set_value (fhicl::ParameterSet const &ps, bool trimParents)
 
void set_par_style (par_style const vt)
 
void set_key (std::string const &key)
 

Private Member Functions

virtual void do_set_value (fhicl::ParameterSet const &, bool trimParents)=0
 

Private Attributes

ParameterMetadata mdata_
 
std::function< bool()> maybeUse_
 

Detailed Description

Definition at line 41 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() 
)
inline

Definition at line 84 of file ParameterBase.h.

References comment(), maybeUse_, name(), and ~ParameterBase().

89  : mdata_{name, comment, vt, type}, maybeUse_{maybeUse}
90  {}
std::function< bool()> maybeUse_
std::string name() const
Definition: ParameterBase.h:49
std::string comment() const
Definition: ParameterBase.h:54
virtual fhicl::detail::ParameterBase::~ParameterBase ( )
virtualdefault

Referenced by ParameterBase().

Member Function Documentation

std::string fhicl::detail::ParameterBase::comment ( ) const
inline
virtual void fhicl::detail::ParameterBase::do_set_value ( fhicl::ParameterSet const &  ,
bool  trimParents 
)
privatepure virtual

Implemented in fhicl::Sequence< T,-1ull >, fhicl::OptionalSequence< T,-1ull >, fhicl::OptionalTuple< TYPES >, fhicl::OptionalTuple< ARGS... >, fhicl::Sequence< T, N >, fhicl::Sequence< double >, fhicl::Sequence< std::string >, fhicl::Sequence< int >, fhicl::Sequence< string >, fhicl::Tuple< TYPES >, fhicl::Table< T, KeysToIgnore >, fhicl::Table< art::ProducerTable::FullConfig< UserConfig, ImplicitConfig >, KeysToIgnore_t >, fhicl::Table< art::TimeTracker::Config::DBoutput >, fhicl::Table< art::EDAnalyzer::Table::FullConfig< UserConfig >, KeysToIgnore_t >, fhicl::Table< calib::calib::ShapeTableParams >, fhicl::Table< art::MemoryTracker::Config::DBoutput >, fhicl::Table< T >, fhicl::Table< rsim::GainParams >, fhicl::Table< T, fhicl::KeysToIgnore >, fhicl::Table< art::ToolConfigTable::FullConfig< UserConfig >, KeysToIgnore_t >, fhicl::Table< mf::service::ELdestination::MsgFormatSettings::mf::service::ELdestination::Config >, fhicl::Table< art::ClosingCriteria::art::RootOutput::Config >, fhicl::OptionalSequence< T, N >, fhicl::OptionalTable< T >, fhicl::OptionalTable< art::ClosingCriteria::art::TFileService::Config >, fhicl::OptionalSequence< Table< T >< art::RootInputFileSequence::Config::SecondaryFile > >, fhicl::OptionalAtom< T >, fhicl::OptionalAtom< std::string >, fhicl::OptionalAtom< EventNumber_t >, fhicl::OptionalAtom< bool >, fhicl::OptionalAtom< SubRunNumber_t >, fhicl::OptionalAtom< RunNumber_t >, fhicl::Atom< T >, fhicl::Atom< uint32_t >, fhicl::Atom< int64_t >, fhicl::Atom< double >, fhicl::Atom< unsigned long long >, fhicl::Atom< std::string >, fhicl::Atom< EventNumber_t >, fhicl::Atom< float >, fhicl::Atom< int >, fhicl::Atom< art::InputTag >, fhicl::Atom< unsigned int >, fhicl::Atom< string >, fhicl::Atom< size_t >, fhicl::Atom< unsigned >, fhicl::Atom< bool >, fhicl::Atom< std::int64_t >, fhicl::OptionalDelegatedParameter, and fhicl::DelegatedParameter.

Referenced by set_key(), and set_value().

bool fhicl::detail::ParameterBase::has_default ( ) const
inline

Definition at line 59 of file ParameterBase.h.

References fhicl::detail::ParameterMetadata::has_default(), and mdata_.

60  {
61  return mdata_.has_default();
62  }
bool fhicl::detail::ParameterBase::is_conditional ( ) const
inline

Definition at line 69 of file ParameterBase.h.

References fhicl::detail::ParameterMetadata::is_conditional(), and mdata_.

70  {
71  return mdata_.is_conditional();
72  }
bool fhicl::detail::ParameterBase::is_optional ( ) const
inline

Definition at line 64 of file ParameterBase.h.

References fhicl::detail::ParameterMetadata::is_optional(), and mdata_.

65  {
66  return mdata_.is_optional();
67  }
std::string fhicl::detail::ParameterBase::key ( ) const
inline
std::string fhicl::detail::ParameterBase::name ( ) const
inline
par_type fhicl::detail::ParameterBase::parameter_type ( ) const
inline

Definition at line 74 of file ParameterBase.h.

References mdata_, and fhicl::detail::ParameterMetadata::type().

Referenced by fhicl::detail::RegisterIfTableMember::RegisterIfTableMember().

75  {
76  return mdata_.type();
77  }
void fhicl::detail::ParameterBase::set_key ( std::string const &  key)
inline

Definition at line 106 of file ParameterBase.h.

References do_set_value(), mdata_, and fhicl::detail::ParameterMetadata::set_key().

107  {
108  mdata_.set_key(key);
109  }
void set_key(std::string const &key)
std::string key() const
Definition: ParameterBase.h:44
void fhicl::detail::ParameterBase::set_par_style ( par_style const  vt)
inline

Definition at line 101 of file ParameterBase.h.

References mdata_, and fhicl::detail::ParameterMetadata::set_par_style().

Referenced by art::RootOutput::Config::Config().

102  {
103  mdata_.set_par_style(vt);
104  }
void set_par_style(par_style const vt)
void fhicl::detail::ParameterBase::set_value ( fhicl::ParameterSet const &  ps,
bool  trimParents 
)
inline

Definition at line 96 of file ParameterBase.h.

References do_set_value().

97  {
98  do_set_value(ps, trimParents);
99  }
virtual void do_set_value(fhicl::ParameterSet const &, bool trimParents)=0
bool fhicl::detail::ParameterBase::should_use ( ) const
inline

Definition at line 79 of file ParameterBase.h.

References maybeUse_.

80  {
81  return maybeUse_();
82  }
std::function< bool()> maybeUse_

Member Data Documentation

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

Definition at line 116 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 file: