Belle II Software
release-08-01-10
|
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. More... | |
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. More... | |
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 | |
constexpr static int | named (const char *name) |
Static getter for the index from the name. More... | |
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.
|
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.