8#include <tracking/trackFindingCDC/varsets/NamedFloatTuple.h>
11using namespace TrackFindingCDC;
17 std::map<std::string, Float_t> namedValues;
18 size_t nVars =
size();
20 for (
size_t iVar = 0; iVar < nVars; ++iVar) {
21 std::string name = prefix +
getName(iVar);
22 Float_t value =
get(iVar);
23 namedValues[name] = value;
31 std::vector<Named<Float_t*> > namedVariables;
33 namedVariables.reserve(nVars);
35 for (
int iVar = 0; iVar < nVars; ++iVar) {
36 std::string name = prefix +
getName(iVar);
38 namedVariables.emplace_back(name, &value);
41 return namedVariables;
std::vector< Named< Float_t * > > getNamedVariables(std::string prefix="")
Getter for named references to the variables in this tuple.
virtual Float_t get(int iValue) const =0
Getter for the value of the ith part.
virtual Float_t & operator[](int iValue)=0
Reference getter for the value of the ith part.
virtual size_t size() const =0
Getter for the number of parts.
virtual std::string getName(int iValue) const =0
Getter for the ith name.
virtual ~NamedFloatTuple()
Marking the destructor virtual since we are using virtual functions.
std::map< std::string, Float_t > getNamedValues(std::string prefix="") const
Getter for a map of all name and value pairs in this tuple.
Abstract base class for different kinds of events.