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>
43 for (std::unique_ptr<ContainedVarSet>& varSet :
m_varSets)
60 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.
AObject Object
Object type from which variables shall be extracted.
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.
Interface for an algorithm part that needs to receive the module processing signals.
Class that accomodates many variable sets and presents them as on set of variables.
std::vector< std::unique_ptr< ContainedVarSet > > m_varSets
Collection of contained variables sets.
MayBePtr< Float_t > find(const std::string &varName) override
Pointer to the variable with the given name.
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.
void push_back(std::unique_ptr< ContainedVarSet > varSet)
Add a variable set to the contained variable sets.
std::vector< Named< Float_t * > > getNamedVariables(const std::string &prefix) override
Getter for the named references to the individual variables Base implementaton returns empty vector.
void clear()
Remove all contained variable sets.
Abstract base class for different kinds of events.