10#include <tracking/trackFindingCDC/varsets/BaseVarSet.h>
12#include <tracking/trackFindingCDC/utilities/Named.h>
13#include <tracking/trackFindingCDC/utilities/MayBePtr.h>
24 namespace TrackFindingCDC {
26 template <
class AObject>
44 for (std::unique_ptr<ContainedVarSet>& varSet :
m_varSets) {
61 for (std::unique_ptr<ContainedVarSet>& varSet :
m_varSets) {
62 result &= varSet->extract(obj);
73 std::vector<Named<Float_t*> > result;
74 for (std::unique_ptr<ContainedVarSet>& varSet :
m_varSets) {
75 std::vector<Named<Float_t*> > extend = varSet->getNamedVariables(prefix);
76 result.insert(result.end(), extend.begin(), extend.end());
85 MayBePtr<Float_t>
find(
const std::string& varName)
override
87 for (std::unique_ptr<ContainedVarSet>& varSet :
m_varSets) {
88 MayBePtr<Float_t> found = varSet->find(varName);
89 if (found)
return found;
95 void push_back(std::unique_ptr<ContainedVarSet> varSet)
116 std::vector<std::unique_ptr<ContainedVarSet>>
m_varSets;
Generic class that generates some named float values from a given object.
virtual bool extract(const Object *obj)
Main method that extracts the variable values from the complex object.
void initialize() override
Receive and dispatch signal before the start of the event processing.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Class that accommodates many variable sets and presents them as on set of variables.
std::vector< std::unique_ptr< ContainedVarSet > > m_varSets
Collection of contained variables sets.
size_t size() const
Return the number of currently contained variable sets.
void initialize() final
Initialize all contained variable set before event processing.
bool extract(const Object *obj) final
Main method that extracts the variable values from the complex object.
AObject Object
Object type from which variables shall be extracted.
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.
void push_back(std::unique_ptr< ContainedVarSet > varSet)
Add a variable set to the contained variable sets.
void clear()
Remove all contained variable sets.
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.