1 #ifndef fhiclcpp_types_Table_h 2 #define fhiclcpp_types_Table_h 25 template <
typename T,
typename KeysToIgnore =
void>
26 class Table final :
public detail::TableBase,
27 private detail::RegisterIfTableMember {
37 template <
typename... TCARGS>
39 template <
typename... TCARGS>
41 template <
typename... TCARGS>
44 MaybeUseFunction maybeUse,
49 template <
typename K = KeysToIgnore,
51 Table(ParameterSet
const& pset);
55 template <
typename K = KeysToIgnore,
57 Table(ParameterSet
const& pset,
58 std::set<std::string>
const& keysToIgnore = {});
74 std::set<std::string>
const& keysToIgnore = {});
86 using members_t = std::vector<cet::exempt_ptr<ParameterBase>>;
88 std::shared_ptr<T>
value_{std::make_shared<T>()};
103 bool const trimParents)
override;
106 template <
typename T>
108 operator<<(std::ostream& os, Table<T>
const&
t)
110 std::ostringstream
config;
111 t.print_allowed_configuration(config);
112 return os << config.str();
128 template <
typename T,
typename KeysToIgnore>
129 template <
typename... TCARGS>
134 template <
typename T,
typename KeysToIgnore>
135 template <
typename... TCARGS>
144 ,
value_{std::make_shared<T>(std::forward<TCARGS>(tcargs)...)}
150 template <
typename T,
typename KeysToIgnore>
151 template <
typename... TCARGS>
161 ,
value_{std::make_shared<T>(std::forward<TCARGS>(tcargs)...)}
167 template <
typename T,
typename KeysToIgnore>
168 template <
typename,
typename>
173 template <
typename T,
typename KeysToIgnore>
174 template <
typename,
typename>
176 std::set<std::string>
const& keysToIgnore)
180 template <
typename T,
typename KeysToIgnore>
182 std::set<std::string>
const& keysToIgnore,
195 template <
typename T,
typename KeysToIgnore>
199 std::set<std::string>
const& keysToIgnore)
214 template <
typename T,
typename KeysToIgnore>
225 template <
typename T,
typename KeysToIgnore>
242 template <
typename T,
typename KeysToIgnore>
246 bool const implicitly_default =
248 return p->has_default() ||
p->is_optional();
250 if (implicitly_default)
void print_allowed_configuration(std::ostream &os, std::string const &tab=std::string(3, ' ')) const
std::string const & name() const
static NameStackRegistry & instance()
std::vector< cet::exempt_ptr< ParameterBase >> members_t
trkf::TrackStatePropagator::trkmkr::KalmanFilterFitTrackMaker::Config default_type
#define NO_DELEGATED_PARAMETERS
trkf::TrackStatePropagator::trkmkr::KalmanFilterFitTrackMaker::Config value_type
ParameterSet const & get_PSet() const
static void end_of_ctor()
std::function< bool()> AlwaysUse()
void validate_ParameterSet(ParameterSet const &pset, std::set< std::string > const &keysToIgnore={})
#define NO_NESTED_FHICL_TYPES_IN_TABLE
std::string optional_parameter_message(bool const with_comment=true)
static TableMemberRegistry & instance()
std::string strip_first_containing_name(std::string const &key)
RegisterIfTableMember(ParameterBase *pb)
Table(Name &&name, TCARGS &&...tcargs)
std::vector< cet::exempt_ptr< ParameterBase > > const & members() const
T get(std::string const &key) const
#define NO_STD_CONTAINERS
void do_set_value(fhicl::ParameterSet const &pset, bool const trimParents) override
#define NO_NESTED_TABLE_FRAGMENTS
std::vector< base_ptr > release_members()
std::string const & key() const
auto const & operator()() const
const GenericPointer< typename T::ValueType > T2 value
members_t const & get_members() const override
auto for_all(FwdCont &, Func)
std::shared_ptr< T > value_
void maybe_implicitly_default()
std::string const & comment() const
TableBase(Name const &name, Comment const &comment, par_style const vt, std::function< bool()> maybeUse)
void set_par_style(par_style const vt)