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>()};
104 template <
typename T>
106 operator<<(std::ostream& os, Table<T>
const&
t)
108 std::ostringstream
config;
109 t.print_allowed_configuration(config);
110 return os << config.str();
126 template <
typename T,
typename KeysToIgnore>
127 template <
typename... TCARGS>
132 template <
typename T,
typename KeysToIgnore>
133 template <
typename... TCARGS>
142 ,
value_{std::make_shared<T>(std::forward<TCARGS>(tcargs)...)}
148 template <
typename T,
typename KeysToIgnore>
149 template <
typename... TCARGS>
159 ,
value_{std::make_shared<T>(std::forward<TCARGS>(tcargs)...)}
165 template <
typename T,
typename KeysToIgnore>
166 template <
typename,
typename>
171 template <
typename T,
typename KeysToIgnore>
172 template <
typename,
typename>
174 std::set<std::string>
const& keysToIgnore)
178 template <
typename T,
typename KeysToIgnore>
180 std::set<std::string>
const& keysToIgnore,
193 template <
typename T,
typename KeysToIgnore>
196 std::set<std::string>
const& keysToIgnore)
211 template <
typename T,
typename KeysToIgnore>
222 template <
typename T,
typename KeysToIgnore>
238 template <
typename T,
typename KeysToIgnore>
242 bool const implicitly_default =
244 return p->has_default() ||
p->is_optional();
246 if (implicitly_default)
void print_allowed_configuration(std::ostream &os, std::string const &tab=std::string(3, ' ')) const
std::string const & name() const
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
ChannelGroupService::Name Name
static void end_of_ctor()
std::function< bool()> AlwaysUse()
#define NO_NESTED_FHICL_TYPES_IN_TABLE
std::string optional_parameter_message(bool const with_comment=true)
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 validate(ParameterSet const &pset, std::set< std::string > const &keysToIgnore={})
#define NO_NESTED_TABLE_FRAGMENTS
std::string const & key() const
auto const & operator()() const
members_t const & get_members() const override
void do_set_value(fhicl::ParameterSet const &pset) 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)
static std::vector< base_ptr > release_members()
void set_par_style(par_style const vt)