 |
Belle II Software
release-05-02-19
|
12 #include <tracking/trackFindingCDC/varsets/BaseVarSet.h>
14 #include <tracking/trackFindingCDC/utilities/Relation.h>
15 #include <tracking/trackFindingCDC/utilities/MayBePtr.h>
26 namespace TrackFindingCDC {
28 template <
class ABaseVarSet>
29 class RelationVarSet :
public BaseVarSet<Relation<const typename ABaseVarSet::Object> > {
32 using Super = BaseVarSet<Relation<const typename ABaseVarSet::Object> >;
36 using BaseObject =
typename ABaseVarSet::Object;
56 return firstExtracted and secondExtracted;
69 std::vector<Named<Float_t*>>
getNamedVariables(
const std::string& prefix)
override
73 result.insert(result.end(), extend.begin(), extend.end());
81 MayBePtr<Float_t>
find(
const std::string& varName)
override
86 std::string varNameWithoutPrefix = varName.substr(
m_firstPrefix.size());
87 MayBePtr<Float_t> found =
m_firstVarSet.find(varNameWithoutPrefix);
88 if (found)
return found;
94 std::string varNameWithoutPrefix = varName.substr(
m_secondPrefix.size());
95 MayBePtr<Float_t> found =
m_secondVarSet.find(varNameWithoutPrefix);
96 if (found)
return found;
Type for two related objects.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
void initialize() override
Receive and dispatch signal before the start of the event processing.
MayBePtr< Float_t > find(const std::string &varName) override
Pointer to the variable with the given name.
std::vector< Named< Float_t * > > getNamedVariables()
Getter for the named references to the individual variables.
typename ABaseVarSet::Object BaseObject
Object type from which the variables shall be extracted.
Abstract base class for different kinds of events.
std::string m_firstPrefix
Prefix for all variable in the variable set of the first element of the pair.
ABaseVarSet m_secondVarSet
VarSet for the second element of the set.
BaseVarSet< Relation< const typename ABaseVarSet::Object > > Super
Type of the base class.
void initialize() override
Initialize the variable set before event processing.
std::string m_secondPrefix
Prefix for all variable in the variable set of the second element of the pair.
bool extract(const Relation< const BaseObject > *obj) override
Main method that extracts the variable values from the complex object.
ABaseVarSet m_firstVarSet
VarSet for the first element of the set.