Belle II Software development
|
Generic class that contains a fixed number of named float values. More...
#include <FixedSizeNamedFloatTuple.h>
Public Member Functions | |
size_t | size () const final |
Getter for number of floating point values represented by this class. | |
int | getNameIndex (const char *name) const final |
Getter for the index from a name. | |
std::string | getName (int iValue) const final |
Getter for the ith name. | |
template<int I> | |
void | set (Float_t value) |
Setter for the ith values. Static index version. | |
void | set (int iValue, Float_t value) final |
Setter for the ith value. | |
void | set (const char *name, Float_t value) |
Setter for the value with the given name. | |
template<int I> | |
Float_t | get () const |
Getter for the ith value. Static index version. | |
Float_t | get (int iValue) const final |
Getter for the ith value. | |
Float_t | get (const char *name) const |
Getter for the value with the given name. | |
template<int I> | |
Float_t & | var () |
Reference getter for the ith value. Static index version. | |
Float_t & | operator[] (int iValue) final |
Reference getter for the ith value. | |
Float_t & | operator[] (const char *name) |
Reference getter for the value with the given name. | |
virtual MayBePtr< Float_t > | find (std::string name) |
Getter for a pointer to the value with the given name. | |
std::map< std::string, Float_t > | getNamedValues (std::string prefix="") const |
Getter for a map of all name and value pairs in this tuple. | |
std::vector< Named< Float_t * > > | getNamedVariables (std::string prefix="") |
Getter for named references to the variables in this tuple. | |
Public Attributes | |
Float_t | m_values [nVars] = {} |
Memory for nVars floating point values. | |
Static Protected Member Functions | |
static constexpr int | named (const char *name) |
Static getter for the index from the name. | |
Static Private Attributes | |
static const size_t | nVars = ANames::nVars |
Number of floating point values represented by this class. | |
Generic class that contains a fixed number of named float values.
This object template provides the memory and the names of the float values.
ANames | Class with two contained parameters:
|
Definition at line 98 of file FixedSizeNamedFloatTuple.h.
|
inlinevirtualinherited |
Getter for a pointer to the value with the given name.
Return nullptr if not found.
Definition at line 71 of file NamedFloatTuple.h.
|
inline |
Getter for the ith value. Static index version.
Definition at line 175 of file FixedSizeNamedFloatTuple.h.
|
inline |
Getter for the value with the given name.
Definition at line 192 of file FixedSizeNamedFloatTuple.h.
|
inlinefinalvirtual |
Getter for the ith value.
Implements NamedFloatTuple.
Definition at line 184 of file FixedSizeNamedFloatTuple.h.
|
inlinefinalvirtual |
Getter for the ith name.
Implements NamedFloatTuple.
Definition at line 141 of file FixedSizeNamedFloatTuple.h.
|
inherited |
Getter for a map of all name and value pairs in this tuple.
Definition at line 15 of file NamedFloatTuple.cc.
|
inherited |
Getter for named references to the variables in this tuple.
Definition at line 29 of file NamedFloatTuple.cc.
|
inlinefinalvirtual |
Getter for the index from a name.
Looks through the associated names and returns the right index if found. Returns size() (one after the last element) if not found.
name | Name of the sought part |
Implements NamedFloatTuple.
Definition at line 135 of file FixedSizeNamedFloatTuple.h.
|
inlinestaticconstexprprotected |
Static getter for the index from the name.
Looks through the associated names and returns the right index if found Returns nVars (one after the last element) if not found.
Short hand named spells nice in implementation code.
name | The sough name. |
Definition at line 115 of file FixedSizeNamedFloatTuple.h.
|
inline |
Reference getter for the value with the given name.
Definition at line 216 of file FixedSizeNamedFloatTuple.h.
|
inlinefinalvirtual |
Reference getter for the ith value.
Implements NamedFloatTuple.
Definition at line 208 of file FixedSizeNamedFloatTuple.h.
|
inline |
Setter for the value with the given name.
Definition at line 168 of file FixedSizeNamedFloatTuple.h.
|
inline |
Setter for the ith values. Static index version.
Definition at line 151 of file FixedSizeNamedFloatTuple.h.
|
inlinefinalvirtual |
Setter for the ith value.
Implements NamedFloatTuple.
Definition at line 160 of file FixedSizeNamedFloatTuple.h.
|
inlinefinalvirtual |
Getter for number of floating point values represented by this class.
Implements NamedFloatTuple.
Definition at line 122 of file FixedSizeNamedFloatTuple.h.
|
inline |
Reference getter for the ith value. Static index version.
Definition at line 199 of file FixedSizeNamedFloatTuple.h.
Float_t m_values[nVars] = {} |
Memory for nVars floating point values.
Definition at line 223 of file FixedSizeNamedFloatTuple.h.
|
staticprivate |
Number of floating point values represented by this class.
Definition at line 102 of file FixedSizeNamedFloatTuple.h.