10#include <tracking/trackFindingCDC/varsets/BaseVarSet.h>
12#include <tracking/trackFindingCDC/varsets/FixedSizeNamedFloatTuple.h>
24 namespace TrackFindingCDC {
35 template<
class AVarNames>
48 static const size_t nVars = AVarNames::nVars;
64 MayBePtr<Float_t>
find(
const std::string& varName)
override
78 constexpr static int named(
const char* name)
80 return index<nVars>(AVarNames::getName, name);
87 static_assert(I <
nVars,
"Requested variable index exceeds number of variables.");
95 static_assert(I <
nVars,
"Requested variable index exceeds number of variables.");
100 template<
typename AFloat>
118 if (not std::isfinite(value)) {
119 m_value = std::copysign(std::numeric_limits<AFloat>::max(), value);
132 static_assert(I <
nVars,
"Requested variable index exceeds number of variables.");
Generic class that generates some named float values from a given object.
AObject Object
Object type from which variables shall be extracted.
Generic class that contains a fixed number of named float values.
Generic class that generates some named float values from a given object.
AssignFinite< Float_t > finitevar()
Reference getter for the value of the ith variable. Transforms non-finite values to finite value.
static constexpr int named(const char *name)
Getter for the index from the name.
Float_t & var()
Reference getter for the value of the ith variable. Static version.
typename Super::Object Object
static const size_t nVars
Float_t get() const
Getter for the value of the ith variable. Static version.
FixedSizeNamedFloatTuple< PXDResultVarNames > m_variables
std::vector< Named< Float_t * > > getNamedVariables(const std::string &prefix) override
Getter for the named references to the individual variables Base implementation returns empty vector.
BaseVarSet< typename PXDResultVarNames::Object > Super
MayBePtr< Float_t > find(const std::string &varName) override
Pointer to the variable with the given name.
Abstract base class for different kinds of events.
void operator=(const AFloat value)
Assign value replacing infinite values with the maximum value possible.
AssignFinite(AFloat &value)
Setup the assignment to a variable.
AFloat & m_value
Reference to the variable to be assigned.