![]() |
LArSoft
v09_93_00
Liquid Argon Software toolkit - https://larsoft.org/
|
FHiCL objects representing geometry classes as configuration parameters. More...
Classes | |
| struct | IDConfig |
| Type of ID configuration structure (requires specialization) More... | |
| struct | IDConfig< geo::CryostatID > |
Configuration structure for validated geo::CryostatID parameter. More... | |
| struct | IDConfig< geo::OpDetID > |
Configuration structure for validated geo::OpDetID parameter. More... | |
| struct | IDConfig< geo::PlaneID > |
Configuration structure for validated geo::PlaneID parameter. More... | |
| struct | IDConfig< geo::TPCID > |
Configuration structure for validated geo::TPCID parameter. More... | |
| struct | IDConfig< geo::WireID > |
Configuration structure for validated geo::PlaneID parameter. More... | |
| struct | IDConfig< readout::ROPID > |
Configuration structure for validated readout::ROPID parameter. More... | |
| struct | IDConfig< readout::TPCsetID > |
Configuration structure for validated readout::TPCsetID parameter. More... | |
| struct | IDparameterTraits |
| Traits for ID parameter objects. More... | |
| struct | IDparameterTraits< geo::fhicl::IDparameter< ID > > |
| struct | IDparameterTraits< geo::fhicl::IDsequence< ID > > |
| struct | IDparameterTraits< geo::fhicl::OptionalID< ID > > |
| struct | IDparameterTraits< geo::fhicl::OptionalIDsequence< ID > > |
| struct | ValidIDConfig |
| Helper class holding the ID validity flag. More... | |
Typedefs | |
| template<typename IDtype > | |
| using | IDparameter = ::fhicl::Table< IDConfig< IDtype >> |
| Member type of validated ID parameter. More... | |
| template<typename IDtype > | |
| using | OptionalID = ::fhicl::OptionalTable< IDConfig< IDtype >> |
| Member type of optional validated ID parameter. More... | |
| template<typename IDtype > | |
| using | IDsequence = ::fhicl::Sequence< IDparameter< IDtype >> |
| Member type of sequence of ID parameters. More... | |
| template<typename IDtype > | |
| using | OptionalIDsequence = ::fhicl::OptionalSequence< IDparameter< IDtype >> |
| Member type of optional sequence of ID parameters. More... | |
| using | CryostatID = IDparameter< geo::CryostatID > |
Member type of validated geo::CryostatID parameter. More... | |
| using | OptionalCryostatID = OptionalID< geo::CryostatID > |
Member type of optional validated geo::CryostatID parameter. More... | |
| using | CryostatIDsequence = IDsequence< geo::CryostatID > |
Member type of sequence of geo::CryostatID parameters. More... | |
| using | OptionalCryostatIDsequence = OptionalIDsequence< geo::CryostatID > |
Member type of optional sequence of geo::CryostatID parameters. More... | |
| using | TPCID = IDparameter< geo::TPCID > |
Member type of validated geo::TPCID parameter. More... | |
| using | OptionalTPCID = OptionalID< geo::TPCID > |
Member type of optional validated geo::TPCID parameter. More... | |
| using | TPCIDsequence = IDsequence< geo::TPCID > |
Member type of sequence of geo::TPCID parameters. More... | |
| using | OptionalTPCIDsequence = OptionalIDsequence< geo::TPCID > |
Member type of optional sequence of geo::TPCID parameters. More... | |
| using | OpDetID = IDparameter< geo::OpDetID > |
Member type of validated geo::OpDetID parameter. More... | |
| using | OptionalOpDetID = OptionalID< geo::OpDetID > |
Member type of optional validated geo::OpDetID parameter. More... | |
| using | OpDetIDsequence = IDsequence< geo::OpDetID > |
Member type of sequence of geo::OpDetID parameters. More... | |
| using | OptionalOpDetIDsequence = OptionalIDsequence< geo::OpDetID > |
Member type of optional sequence of geo::OpDetID parameters. More... | |
| using | PlaneID = IDparameter< geo::PlaneID > |
Member type of validated geo::PlaneID parameter. More... | |
| using | OptionalPlaneID = OptionalID< geo::PlaneID > |
Member type of optional validated geo::PlaneID parameter. More... | |
| using | PlaneIDsequence = IDsequence< geo::PlaneID > |
Member type of sequence of geo::PlaneID parameters. More... | |
| using | OptionalPlaneIDsequence = OptionalIDsequence< geo::PlaneID > |
Member type of optional sequence of geo::PlaneID parameters. More... | |
| using | WireID = IDparameter< geo::WireID > |
Member type of validated geo::WireID parameter. More... | |
| using | OptionalWireID = OptionalID< geo::WireID > |
Member type of optional validated geo::WireID parameter. More... | |
| using | WireIDsequence = IDsequence< geo::WireID > |
Member type of sequence of geo::WireID parameters. More... | |
| using | OptionalWireIDsequence = OptionalIDsequence< geo::WireID > |
Member type of optional sequence of geo::WireID parameters. More... | |
| template<typename IDparam > | |
| using | IDof = typename IDparameterTraits< IDparam >::ID_t |
| Type of ID of the specified ID FHiCL parameter object/. More... | |
Functions | |
| template<typename SrcID , typename ID = SrcID> | |
| ID | readID (IDparameter< SrcID > const &atom) |
| Returns an ID extracted from the specified ID atom. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| ID | readParameter (IDparameter< SrcID > const &atom) |
| Returns an ID extracted from the specified ID atom. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::optional< ID > | readOptionalID (OptionalID< SrcID > const &atom) |
| Returns an ID extracted from the specified optional ID atom. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::optional< ID > | readParameter (OptionalID< SrcID > const &atom) |
| Returns an ID extracted from the specified optional ID atom. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| ID | readOptionalID (OptionalID< SrcID > const &atom, ID const &defValue) |
| Returns an ID extracted from the specified optional ID atom. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| ID | readOptionalID (OptionalID< SrcID > const &atom, ID &&defValue) |
| Returns an ID extracted from the specified optional ID atom. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| ID | readParameter (OptionalID< SrcID > const &atom, ID const &defValue) |
| Returns an ID extracted from the specified optional ID atom. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| ID | readParameter (OptionalID< SrcID > const &atom, ID &&defValue) |
| Returns an ID extracted from the specified optional ID atom. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::vector< ID > | readIDsequence (IDsequence< SrcID > const &seq) |
| Returns a vector of IDs extracted from the specified ID sequence. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::vector< ID > | readParameter (IDsequence< SrcID > const &seq) |
| Returns a vector of IDs extracted from the specified ID sequence. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::optional< std::vector< ID > > | readOptionalIDsequence (OptionalIDsequence< SrcID > const &seq) |
| Returns a vector of IDs extracted from the specified optional ID sequence. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::optional< std::vector< ID > > | readParameter (OptionalIDsequence< SrcID > const &seq) |
| Returns a vector of IDs extracted from the specified optional ID sequence. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::vector< ID > | readOptionalIDsequence (OptionalIDsequence< SrcID > const &seq, std::vector< ID > const &defValue) |
| Returns a vector of IDs extracted from the specified optional ID sequence, or a default value. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::vector< ID > | readOptionalIDsequence (OptionalIDsequence< SrcID > const &seq, std::vector< ID > &&defValue) |
| Returns a vector of IDs extracted from the specified optional ID sequence, or a default value. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::vector< ID > | readParameter (OptionalIDsequence< SrcID > const &seq, std::vector< ID > const &defValue) |
| Returns a vector of IDs extracted from the specified optional ID sequence, or a default value. More... | |
| template<typename SrcID , typename ID = SrcID> | |
| std::vector< ID > | readParameter (OptionalIDsequence< SrcID > const &seq, std::vector< ID > &&defValue) |
| Returns a vector of IDs extracted from the specified optional ID sequence, or a default value. More... | |
FHiCL objects representing geometry classes as configuration parameters.
| using geo::fhicl::CryostatID = typedef IDparameter<geo::CryostatID> |
Member type of validated geo::CryostatID parameter.
Definition at line 270 of file geo_types_fhicl.h.
| using geo::fhicl::CryostatIDsequence = typedef IDsequence<geo::CryostatID> |
Member type of sequence of geo::CryostatID parameters.
Definition at line 276 of file geo_types_fhicl.h.
| using geo::fhicl::IDof = typedef typename IDparameterTraits<IDparam>::ID_t |
Type of ID of the specified ID FHiCL parameter object/.
Definition at line 217 of file geo_types_fhicl.h.
| using geo::fhicl::IDparameter = typedef ::fhicl::Table<IDConfig<IDtype>> |
Member type of validated ID parameter.
Definition at line 238 of file geo_types_fhicl.h.
| using geo::fhicl::IDsequence = typedef ::fhicl::Sequence<IDparameter<IDtype>> |
Member type of sequence of ID parameters.
Definition at line 246 of file geo_types_fhicl.h.
| using geo::fhicl::OpDetID = typedef IDparameter<geo::OpDetID> |
Member type of validated geo::OpDetID parameter.
Definition at line 327 of file geo_types_fhicl.h.
| using geo::fhicl::OpDetIDsequence = typedef IDsequence<geo::OpDetID> |
Member type of sequence of geo::OpDetID parameters.
Definition at line 333 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalCryostatID = typedef OptionalID<geo::CryostatID> |
Member type of optional validated geo::CryostatID parameter.
Definition at line 273 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalCryostatIDsequence = typedef OptionalIDsequence<geo::CryostatID> |
Member type of optional sequence of geo::CryostatID parameters.
Definition at line 279 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalID = typedef ::fhicl::OptionalTable<IDConfig<IDtype>> |
Member type of optional validated ID parameter.
Definition at line 242 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalIDsequence = typedef ::fhicl::OptionalSequence<IDparameter<IDtype>> |
Member type of optional sequence of ID parameters.
Definition at line 250 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalOpDetID = typedef OptionalID<geo::OpDetID> |
Member type of optional validated geo::OpDetID parameter.
Definition at line 330 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalOpDetIDsequence = typedef OptionalIDsequence<geo::OpDetID> |
Member type of optional sequence of geo::OpDetID parameters.
Definition at line 336 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalPlaneID = typedef OptionalID<geo::PlaneID> |
Member type of optional validated geo::PlaneID parameter.
Definition at line 358 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalPlaneIDsequence = typedef OptionalIDsequence<geo::PlaneID> |
Member type of optional sequence of geo::PlaneID parameters.
Definition at line 364 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalTPCID = typedef OptionalID<geo::TPCID> |
Member type of optional validated geo::TPCID parameter.
Definition at line 301 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalTPCIDsequence = typedef OptionalIDsequence<geo::TPCID> |
Member type of optional sequence of geo::TPCID parameters.
Definition at line 307 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalWireID = typedef OptionalID<geo::WireID> |
Member type of optional validated geo::WireID parameter.
Definition at line 386 of file geo_types_fhicl.h.
| using geo::fhicl::OptionalWireIDsequence = typedef OptionalIDsequence<geo::WireID> |
Member type of optional sequence of geo::WireID parameters.
Definition at line 392 of file geo_types_fhicl.h.
| using geo::fhicl::PlaneID = typedef IDparameter<geo::PlaneID> |
Member type of validated geo::PlaneID parameter.
Definition at line 355 of file geo_types_fhicl.h.
| using geo::fhicl::PlaneIDsequence = typedef IDsequence<geo::PlaneID> |
Member type of sequence of geo::PlaneID parameters.
Definition at line 361 of file geo_types_fhicl.h.
| using geo::fhicl::TPCID = typedef IDparameter<geo::TPCID> |
Member type of validated geo::TPCID parameter.
Definition at line 298 of file geo_types_fhicl.h.
| using geo::fhicl::TPCIDsequence = typedef IDsequence<geo::TPCID> |
Member type of sequence of geo::TPCID parameters.
Definition at line 304 of file geo_types_fhicl.h.
| using geo::fhicl::WireID = typedef IDparameter<geo::WireID> |
Member type of validated geo::WireID parameter.
Definition at line 383 of file geo_types_fhicl.h.
| using geo::fhicl::WireIDsequence = typedef IDsequence<geo::WireID> |
Member type of sequence of geo::WireID parameters.
Definition at line 389 of file geo_types_fhicl.h.
| ID geo::fhicl::readID | ( | IDparameter< SrcID > const & | atom | ) |
Returns an ID extracted from the specified ID atom.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| atom | the ID atom parameter to convert |
ID object converted from atomThis function is trivial and provided mostly for uniformity of interface. In the standard usage is equivalent to using the atom directly:
has newInterface() and classicInterface() completely equivalent. Note however that because of inplementation details, config().TPC() (classic interface) does not return a geo::TPCID object, but a different, implementation dependent object that is converted upon assignment. This implies that the following variables may have different types, and the new interface is the one guaranteeing the right type:
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 757 of file geo_types_fhicl.h.
| std::vector< ID > geo::fhicl::readIDsequence | ( | IDsequence< SrcID > const & | seq | ) |
Returns a vector of IDs extracted from the specified ID sequence.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| seq | the sequence of ID parameters to convert |
ID objects converted from seq parameter valuesThis function returns the value of the specified FHiCL sequence object (fhicl::Sequence). It supports both fixed and variable size sequences, but it always returns a STL vector as a result.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
(note that the argument is just config().TPCs, not config().TPCs()).
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 788 of file geo_types_fhicl.h.
References n, and fhicl::detail::SequenceBase::size().
Referenced by readParameter().
| std::optional< ID > geo::fhicl::readOptionalID | ( | OptionalID< SrcID > const & | atom | ) |
Returns an ID extracted from the specified optional ID atom.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| atom | the optional ID atom parameter to convert |
ID object converted from atom, or no value if omittedThe return type of this function is of type std::optional. This function returns the value of the specified FHiCL optional atom (fhicl::OptionalAtom). If the parameter was omitted, no value is returned.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
(note that the argument is just config().RefTPC, not config().RefTPC()).
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 764 of file geo_types_fhicl.h.
Referenced by readOptionalID(), and readParameter().
| ID geo::fhicl::readOptionalID | ( | OptionalID< SrcID > const & | atom, |
| ID const & | defValue | ||
| ) |
Returns an ID extracted from the specified optional ID atom.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| atom | the optional ID atom parameter to convert |
| defValue | a value to use if the parameter was omitted |
ID object converted from atom, or defValue if omittedThis function returns the value of the specified FHiCL optional atom (fhicl::OptionalAtom). If the parameter was omitted, the defValue is copied or moved depending on the function.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
will set fRefTPC to C:0 T:0 TPC ID if refTPC was omitted from the configuration (note that the argument is just config().RefTPC, not config().RefTPC()).
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 774 of file geo_types_fhicl.h.
References readOptionalID().
| ID geo::fhicl::readOptionalID | ( | OptionalID< SrcID > const & | atom, |
| ID && | defValue | ||
| ) |
Returns an ID extracted from the specified optional ID atom.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| atom | the optional ID atom parameter to convert |
| defValue | a value to use if the parameter was omitted |
ID object converted from atom, or defValue if omittedThis function returns the value of the specified FHiCL optional atom (fhicl::OptionalAtom). If the parameter was omitted, the defValue is copied or moved depending on the function.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
will set fRefTPC to C:0 T:0 TPC ID if refTPC was omitted from the configuration (note that the argument is just config().RefTPC, not config().RefTPC()).
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 781 of file geo_types_fhicl.h.
References readOptionalID().
| std::optional< std::vector< ID > > geo::fhicl::readOptionalIDsequence | ( | OptionalIDsequence< SrcID > const & | seq | ) |
Returns a vector of IDs extracted from the specified optional ID sequence.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| seq | the optional sequence of ID parameters to convert |
ID objects converted from seq parameter values, or no value if the parameter was omittedThis function returns the value of the specified FHiCL optional sequence object (fhicl::OptionalSequence). It supports both fixed and variable size optional sequences, but it always returns an optional STL vector as a result.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
(note that the argument is just config().TPCs, not config().TPCs()). If instead a "default value" needs to be provided, the data member is simply:
and the value can be assigned via the standard std::optional interface:
(in this case the default value is an empty collection of TPC IDs) or using a different overload of readOptionalIDsequence():
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 802 of file geo_types_fhicl.h.
References fhicl::detail::SequenceBase::size(), and util::values().
Referenced by readOptionalIDsequence(), and readParameter().
| std::vector< ID > geo::fhicl::readOptionalIDsequence | ( | OptionalIDsequence< SrcID > const & | seq, |
| std::vector< ID > const & | defValue | ||
| ) |
Returns a vector of IDs extracted from the specified optional ID sequence, or a default value.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| seq | the optional sequence of ID parameters to convert |
| defValue | value to be returned if the optional parameter was omitted |
ID objects converted either from seq parameter values or from defValueThis function is based on readOptionalIDsequence(IDsequence const&). The operating mode is the same, but if the value is not available from the parameters, a copy of defValue is returned, or defValue content is moved into the returned value.
Definition at line 819 of file geo_types_fhicl.h.
References readOptionalIDsequence().
| std::vector< ID > geo::fhicl::readOptionalIDsequence | ( | OptionalIDsequence< SrcID > const & | seq, |
| std::vector< ID > && | defValue | ||
| ) |
Returns a vector of IDs extracted from the specified optional ID sequence, or a default value.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| seq | the optional sequence of ID parameters to convert |
| defValue | value to be returned if the optional parameter was omitted |
ID objects converted either from seq parameter values or from defValueThis function is based on readOptionalIDsequence(IDsequence const&). The operating mode is the same, but if the value is not available from the parameters, a copy of defValue is returned, or defValue content is moved into the returned value.
Definition at line 829 of file geo_types_fhicl.h.
References readOptionalIDsequence().
| ID geo::fhicl::readParameter | ( | IDparameter< SrcID > const & | atom | ) |
Returns an ID extracted from the specified ID atom.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| atom | the ID atom parameter to convert |
ID object converted from atomThis function is trivial and provided mostly for uniformity of interface. In the standard usage is equivalent to using the atom directly:
has newInterface() and classicInterface() completely equivalent. Note however that because of inplementation details, config().TPC() (classic interface) does not return a geo::TPCID object, but a different, implementation dependent object that is converted upon assignment. This implies that the following variables may have different types, and the new interface is the one guaranteeing the right type:
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 448 of file geo_types_fhicl.h.
References readOptionalID().
| std::optional<ID> geo::fhicl::readParameter | ( | OptionalID< SrcID > const & | atom | ) |
Returns an ID extracted from the specified optional ID atom.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| atom | the optional ID atom parameter to convert |
ID object converted from atom, or no value if omittedThe return type of this function is of type std::optional. This function returns the value of the specified FHiCL optional atom (fhicl::OptionalAtom). If the parameter was omitted, no value is returned.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
(note that the argument is just config().RefTPC, not config().RefTPC()).
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 495 of file geo_types_fhicl.h.
References readOptionalID().
| ID geo::fhicl::readParameter | ( | OptionalID< SrcID > const & | atom, |
| ID const & | defValue | ||
| ) |
Returns an ID extracted from the specified optional ID atom.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| atom | the optional ID atom parameter to convert |
| defValue | a value to use if the parameter was omitted |
ID object converted from atom, or defValue if omittedThis function returns the value of the specified FHiCL optional atom (fhicl::OptionalAtom). If the parameter was omitted, the defValue is copied or moved depending on the function.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
will set fRefTPC to C:0 T:0 TPC ID if refTPC was omitted from the configuration (note that the argument is just config().RefTPC, not config().RefTPC()).
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 546 of file geo_types_fhicl.h.
| ID geo::fhicl::readParameter | ( | OptionalID< SrcID > const & | atom, |
| ID && | defValue | ||
| ) |
Returns an ID extracted from the specified optional ID atom.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| atom | the optional ID atom parameter to convert |
| defValue | a value to use if the parameter was omitted |
ID object converted from atom, or defValue if omittedThis function returns the value of the specified FHiCL optional atom (fhicl::OptionalAtom). If the parameter was omitted, the defValue is copied or moved depending on the function.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
will set fRefTPC to C:0 T:0 TPC ID if refTPC was omitted from the configuration (note that the argument is just config().RefTPC, not config().RefTPC()).
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 552 of file geo_types_fhicl.h.
References readIDsequence().
| std::vector<ID> geo::fhicl::readParameter | ( | IDsequence< SrcID > const & | seq | ) |
Returns a vector of IDs extracted from the specified ID sequence.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| seq | the sequence of ID parameters to convert |
ID objects converted from seq parameter valuesThis function returns the value of the specified FHiCL sequence object (fhicl::Sequence). It supports both fixed and variable size sequences, but it always returns a STL vector as a result.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
(note that the argument is just config().TPCs, not config().TPCs()).
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 597 of file geo_types_fhicl.h.
References readOptionalIDsequence().
| std::optional<std::vector<ID> > geo::fhicl::readParameter | ( | OptionalIDsequence< SrcID > const & | seq | ) |
Returns a vector of IDs extracted from the specified optional ID sequence.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| seq | the optional sequence of ID parameters to convert |
ID objects converted from seq parameter values, or no value if the parameter was omittedThis function returns the value of the specified FHiCL optional sequence object (fhicl::OptionalSequence). It supports both fixed and variable size optional sequences, but it always returns an optional STL vector as a result.
Example of usage: the configuration object Config and the data member to store the configuration parameter value are defined in a class as:
The constructor of that class should have an entry in the initializer list like:
(note that the argument is just config().TPCs, not config().TPCs()). If instead a "default value" needs to be provided, the data member is simply:
and the value can be assigned via the standard std::optional interface:
(in this case the default value is an empty collection of TPC IDs) or using a different overload of readOptionalIDsequence():
ID is provided as an added bonus to choose which type to convert the configuration parameters into, and it's not enforced to be a ID type at all. Definition at line 661 of file geo_types_fhicl.h.
References readOptionalIDsequence().
| std::vector<ID> geo::fhicl::readParameter | ( | OptionalIDsequence< SrcID > const & | seq, |
| std::vector< ID > const & | defValue | ||
| ) |
Returns a vector of IDs extracted from the specified optional ID sequence, or a default value.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| seq | the optional sequence of ID parameters to convert |
| defValue | value to be returned if the optional parameter was omitted |
ID objects converted either from seq parameter values or from defValueThis function is based on readOptionalIDsequence(IDsequence const&). The operating mode is the same, but if the value is not available from the parameters, a copy of defValue is returned, or defValue content is moved into the returned value.
Definition at line 692 of file geo_types_fhicl.h.
| std::vector<ID> geo::fhicl::readParameter | ( | OptionalIDsequence< SrcID > const & | seq, |
| std::vector< ID > && | defValue | ||
| ) |
Returns a vector of IDs extracted from the specified optional ID sequence, or a default value.
| SrcID | type of the ID read by the FHiCL parameter |
| ID | type of the returned ID (default: same as SrcID) |
| seq | the optional sequence of ID parameters to convert |
| defValue | value to be returned if the optional parameter was omitted |
ID objects converted either from seq parameter values or from defValueThis function is based on readOptionalIDsequence(IDsequence const&). The operating mode is the same, but if the value is not available from the parameters, a copy of defValue is returned, or defValue content is moved into the returned value.
Definition at line 699 of file geo_types_fhicl.h.