LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
fhicl::Table< T, KeysToIgnore > Class Template Reference

#include "type_traits.h"

Inheritance diagram for fhicl::Table< T, KeysToIgnore >:
fhicl::detail::TableBase fhicl::detail::RegisterIfTableMember fhicl::detail::ParameterBase

Classes

struct  Impl
 

Public Types

using default_type = T
 
using value_type = T
 

Public Member Functions

template<typename... TCARGS>
 Table (Name &&name, TCARGS &&...tcargs)
 
template<typename... TCARGS>
 Table (Name &&name, Comment &&comment, TCARGS &&...tcargs)
 
template<typename... TCARGS>
 Table (Name &&name, Comment &&comment, MaybeUseFunction maybeUse, TCARGS &&...tcargs)
 
template<typename K = KeysToIgnore, typename = std::enable_if_t<tt::is_callable<K>::value>>
 Table (ParameterSet const &pset)
 
template<typename K = KeysToIgnore, typename = std::enable_if_t<!tt::is_callable<K>::value>>
 Table (ParameterSet const &pset, std::set< std::string > const &keysToIgnore={})
 
auto const & operator() () const
 
ParameterSet const & get_PSet () const
 
void validate_ParameterSet (ParameterSet const &pset, std::set< std::string > const &keysToIgnore={})
 
void print_allowed_configuration (std::ostream &os, std::string const &tab=std::string(3, ' ')) const
 
std::vector< cet::exempt_ptr< ParameterBase > > const & members () const
 
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
 
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 Types

using members_t = std::vector< cet::exempt_ptr< ParameterBase >>
 

Private Member Functions

 Table (ParameterSet const &, std::set< std::string > const &, Impl)
 
void maybe_implicitly_default ()
 
members_t const & get_members () const override
 
void do_set_value (fhicl::ParameterSet const &pset, bool const trimParents) override
 

Private Attributes

std::shared_ptr< T > value_ {std::make_shared<T>()}
 
ParameterSet pset_ {}
 
members_t members_
 

Detailed Description

template<typename T, typename KeysToIgnore = void>
class fhicl::Table< T, KeysToIgnore >

Definition at line 30 of file type_traits.h.

Member Typedef Documentation

template<typename T, typename KeysToIgnore = void>
using fhicl::Table< T, KeysToIgnore >::default_type = T

Definition at line 83 of file Table.h.

template<typename T, typename KeysToIgnore = void>
using fhicl::Table< T, KeysToIgnore >::members_t = std::vector<cet::exempt_ptr<ParameterBase>>
private

Definition at line 87 of file Table.h.

template<typename T, typename KeysToIgnore = void>
using fhicl::Table< T, KeysToIgnore >::value_type = T

Definition at line 84 of file Table.h.

Constructor & Destructor Documentation

template<typename T, typename KeysToIgnore = void>
template<typename... TCARGS>
fhicl::Table< T, KeysToIgnore >::Table ( Name &&  name,
TCARGS &&...  tcargs 
)
explicit
template<typename T, typename KeysToIgnore = void>
template<typename... TCARGS>
fhicl::Table< T, KeysToIgnore >::Table ( Name &&  name,
Comment &&  comment,
TCARGS &&...  tcargs 
)
explicit
template<typename T, typename KeysToIgnore = void>
template<typename... TCARGS>
fhicl::Table< T, KeysToIgnore >::Table ( Name &&  name,
Comment &&  comment,
MaybeUseFunction  maybeUse,
TCARGS &&...  tcargs 
)
explicit
template<typename T, typename KeysToIgnore = void>
template<typename K = KeysToIgnore, typename = std::enable_if_t<tt::is_callable<K>::value>>
fhicl::Table< T, KeysToIgnore >::Table ( ParameterSet const &  pset)
template<typename T, typename KeysToIgnore = void>
template<typename K = KeysToIgnore, typename = std::enable_if_t<!tt::is_callable<K>::value>>
fhicl::Table< T, KeysToIgnore >::Table ( ParameterSet const &  pset,
std::set< std::string > const &  keysToIgnore = {} 
)
template<typename T, typename KeysToIgnore = void>
fhicl::Table< T, KeysToIgnore >::Table ( ParameterSet const &  ,
std::set< std::string > const &  ,
Impl   
)
private

Member Function Documentation

template<typename T, typename KeysToIgnore = void>
void fhicl::Table< T, KeysToIgnore >::do_set_value ( fhicl::ParameterSet const &  pset,
bool const  trimParents 
)
overrideprivatevirtual
template<typename T, typename KeysToIgnore = void>
members_t const& fhicl::Table< T, KeysToIgnore >::get_members ( ) const
inlineoverrideprivatevirtual

Implements fhicl::detail::TableBase.

Definition at line 100 of file Table.h.

101  {
102  return members_;
103  }
members_t members_
Definition: Table.h:91
template<typename T, typename KeysToIgnore = void>
ParameterSet const& fhicl::Table< T, KeysToIgnore >::get_PSet ( ) const
inline

Definition at line 69 of file Table.h.

Referenced by evgen::ActiveVolumeVertexSampler::ActiveVolumeVertexSampler(), and evgen::MARLEYHelper::MARLEYHelper().

70  {
71  return pset_;
72  }
ParameterSet pset_
Definition: Table.h:90
bool fhicl::detail::ParameterBase::is_conditional ( ) const
inlineinherited
std::string fhicl::detail::ParameterBase::key ( ) const
inlineinherited

Definition at line 44 of file ParameterBase.h.

References fhicl::detail::ParameterMetadata::key(), and fhicl::detail::ParameterBase::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::OptionalSequence< Table< T >< art::RootInputFileSequence::Config::SecondaryFile > >::do_prepare_elements_for_validation(), fhicl::OptionalTuple< ARGS... >::do_prepare_elements_for_validation(), fhicl::OptionalSequence< T,-1ull >::do_prepare_elements_for_validation(), fhicl::detail::ValidateThenSet::enter_sequence(), fhicl::detail::PrintAllowedConfiguration::enter_sequence(), evgen::MARLEYHelper::fhicl_parameter_to_json(), fhicl::detail::SearchAllowedConfiguration::form_absolute(), fhicl::DelegatedParameter::get(), fhicl::OptionalDelegatedParameter::get_if_present(), fhicl::OptionalDelegatedParameter::hasValue(), fhicl::detail::MaybeDisplayParent::is_sequence_element(), fhicl::detail::PrintAllowedConfiguration::maybeReleaseTopLevelParameter(), fhicl::detail::RegisterIfTableMember::RegisterIfTableMember(), and fhicl::detail::PrintAllowedConfiguration::suppressFormat().

45  {
46  return mdata_.key();
47  }
template<typename T, typename KeysToIgnore = void>
void fhicl::Table< T, KeysToIgnore >::maybe_implicitly_default ( )
private
std::vector<cet::exempt_ptr<ParameterBase> > const& fhicl::detail::TableBase::members ( ) const
inlineinherited

Definition at line 24 of file TableBase.h.

References fhicl::detail::TableBase::get_members().

25  {
26  return get_members();
27  }
virtual std::vector< cet::exempt_ptr< ParameterBase > > const & get_members() const =0
template<typename T, typename KeysToIgnore = void>
auto const& fhicl::Table< T, KeysToIgnore >::operator() ( ) const
inline

Definition at line 63 of file Table.h.

64  {
65  return *value_;
66  }
std::shared_ptr< T > value_
Definition: Table.h:89
template<typename T, typename KeysToIgnore = void>
void fhicl::Table< T, KeysToIgnore >::print_allowed_configuration ( std::ostream &  os,
std::string const &  tab = std::string(3, ' ') 
) const
void fhicl::detail::ParameterBase::set_key ( std::string const &  key)
inlineinherited
void fhicl::detail::ParameterBase::set_par_style ( par_style const  vt)
inlineinherited
void fhicl::detail::ParameterBase::set_value ( fhicl::ParameterSet const &  ps,
bool  trimParents 
)
inlineinherited

Definition at line 96 of file ParameterBase.h.

References fhicl::detail::ParameterBase::do_set_value().

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

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
inlineinherited
template<typename T, typename KeysToIgnore = void>
void fhicl::Table< T, KeysToIgnore >::validate_ParameterSet ( ParameterSet const &  pset,
std::set< std::string > const &  keysToIgnore = {} 
)

Member Data Documentation

template<typename T, typename KeysToIgnore = void>
members_t fhicl::Table< T, KeysToIgnore >::members_
private
template<typename T, typename KeysToIgnore = void>
ParameterSet fhicl::Table< T, KeysToIgnore >::pset_ {}
private
template<typename T, typename KeysToIgnore = void>
std::shared_ptr<T> fhicl::Table< T, KeysToIgnore >::value_ {std::make_shared<T>()}
private

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