LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::ServiceTable< T > Class Template Reference

#include "ServiceTable.h"

Inheritance diagram for art::ServiceTable< T >:
fhicl::ConfigurationTable

Public Member Functions

 ServiceTable (fhicl::Name &&name)
 
 ServiceTable (fhicl::ParameterSet const &pset)
 
fhicl::ParameterSet const & get_PSet () const
 
void print_allowed_configuration (std::ostream &os, std::string const &prefix) const
 
auto const & operator() () const
 
cet::exempt_ptr< fhicl::detail::ParameterBase const > parameter_base () const
 

Private Member Functions

cet::exempt_ptr< fhicl::detail::ParameterBase const > get_parameter_base () const override
 

Private Attributes

fhicl::Table< T > config_
 

Detailed Description

template<typename T>
class art::ServiceTable< T >

Definition at line 25 of file ServiceTable.h.

Constructor & Destructor Documentation

template<typename T>
art::ServiceTable< T >::ServiceTable ( fhicl::Name &&  name)
inlineexplicit

Definition at line 28 of file ServiceTable.h.

28 : config_{std::move(name)} {}
fhicl::Table< T > config_
Definition: ServiceTable.h:66
template<typename T>
art::ServiceTable< T >::ServiceTable ( fhicl::ParameterSet const &  pset)
inline

Definition at line 30 of file ServiceTable.h.

31  : config_{fhicl::Name{"<service>"}}
32  {
33  std::set<std::string> const keys_to_ignore{"service_type",
34  "service_provider"};
35  config_.validate(pset, keys_to_ignore);
36  }
fhicl::Table< T > config_
Definition: ServiceTable.h:66
void validate(ParameterSet const &pset, std::set< std::string > const &ignorable_keys={})
Definition: TableBase.cc:56

Member Function Documentation

template<typename T>
cet::exempt_ptr<fhicl::detail::ParameterBase const> art::ServiceTable< T >::get_parameter_base ( ) const
inlineoverrideprivatevirtual

Implements fhicl::ConfigurationTable.

Definition at line 60 of file ServiceTable.h.

61  {
62  return &config_;
63  }
fhicl::Table< T > config_
Definition: ServiceTable.h:66
template<typename T>
fhicl::ParameterSet const& art::ServiceTable< T >::get_PSet ( ) const
inline

Definition at line 40 of file ServiceTable.h.

Referenced by detinfo::LArPropertiesServiceStandard::LArPropertiesServiceStandard(), and calib::PhotonCalibratorServiceStandard::PhotonCalibratorServiceStandard().

41  {
42  return config_.get_PSet();
43  }
fhicl::Table< T > config_
Definition: ServiceTable.h:66
ParameterSet const & get_PSet() const
Definition: Table.h:70
template<typename T>
auto const& art::ServiceTable< T >::operator() ( ) const
inline

Definition at line 53 of file ServiceTable.h.

54  {
55  return config_();
56  }
fhicl::Table< T > config_
Definition: ServiceTable.h:66
cet::exempt_ptr<fhicl::detail::ParameterBase const> fhicl::ConfigurationTable::parameter_base ( ) const
inlineinherited

Definition at line 19 of file ConfigurationTable.h.

20  {
21  return get_parameter_base();
22  }
virtual cet::exempt_ptr< fhicl::detail::ParameterBase const > get_parameter_base() const =0
template<typename T>
void art::ServiceTable< T >::print_allowed_configuration ( std::ostream &  os,
std::string const &  prefix 
) const
inline

Definition at line 46 of file ServiceTable.h.

48  {
50  }
fhicl::Table< T > config_
Definition: ServiceTable.h:66
void print_allowed_configuration(std::ostream &os, std::string const &tab=std::string(3, ' ')) const
Definition: TableBase.cc:22

Member Data Documentation

template<typename T>
fhicl::Table<T> art::ServiceTable< T >::config_
private

Definition at line 66 of file ServiceTable.h.


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