Belle II Software  release-05-01-25
VariadicUnionVarSet< AVarSets > Class Template Reference

Class that accomodates many variable sets and presents them as on set of variables. More...

#include <VariadicUnionVarSet.h>

Inheritance diagram for VariadicUnionVarSet< AVarSets >:
Collaboration diagram for VariadicUnionVarSet< AVarSets >:

Public Types

using Object = typename Super::Object
 Object type from which variables shall be extracted.
 

Public Member Functions

 VariadicUnionVarSet ()
 Create the union variable set.
 
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. More...
 
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.
 
MayBePtr< Float_t > find (const std::string &varName) override
 Pointer to the variable with the given name. More...
 
virtual bool extract (const Object *obj __attribute__((unused)))
 Main method that extracts the variable values from the complex object. More...
 
bool extract (const Object &obj)
 Method for extraction from an object instead of a pointer.
 
virtual std::vector< Named< Float_t * > > getNamedVariables (const std::string &prefix __attribute__((unused)))
 Getter for the named references to the individual variables Base implementaton returns empty vector. More...
 
std::vector< Named< Float_t * > > getNamedVariables ()
 Getter for the named references to the individual variables.
 
std::map< std::string, Float_t > getNamedValues (const std::string &prefix) const
 Getter for a map of names to float values. More...
 
std::map< std::string, Float_t > getNamedValues () const
 Getter for a map of names to float values.
 
void beginRun () override
 Receive and dispatch signal for the beginning of a new run.
 
void beginEvent () override
 Receive and dispatch signal for the start of a new event.
 
void endRun () override
 Receive and dispatch signal for the end of the run.
 
void terminate () override
 Receive and dispatch Signal for termination of the event processing.
 

Protected Member Functions

void addProcessingSignalListener (ProcessingSignalListener *psl)
 Register a processing signal listener to be notified.
 
int getNProcessingSignalListener ()
 Get the number of currently registered listeners.
 

Private Types

using Super = BaseVarSet< typename FirstType< AVarSets... >::Object >
 Type of the super class.
 
using ContainedVarSet = BaseVarSet< Object >
 Type of the contained variable sets.
 

Private Attributes

UnionVarSet< Objectm_multiVarSet
 Container for the multiple variable sets.
 
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
 References to subordinary signal processing listener contained in this findlet.
 
bool m_initialized = false
 Flag to keep track whether initialization happend before.
 
bool m_terminated = false
 Flag to keep track whether termination happend before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Detailed Description

template<class... AVarSets>
class Belle2::TrackFindingCDC::VariadicUnionVarSet< AVarSets >

Class that accomodates many variable sets and presents them as on set of variables.

In contrast to the UnionVarSet the individual VarSets are given as variadic template parameters.

Dummy implementation based on UnionVarSet. The UnionVarSet can be optimized and leverage that the types of all nested variable sets are known at compile time.

Definition at line 47 of file VariadicUnionVarSet.h.

Member Function Documentation

◆ extract() [1/2]

virtual bool extract ( const Object *obj  __attribute__(unused))
inlinevirtualinherited

Main method that extracts the variable values from the complex object.

Returns
Indication whether the extraction could be completed successfully. Base implementation returns always true.

Definition at line 58 of file BaseVarSet.h.

◆ extract() [2/2]

bool extract ( const Object obj)
inlinefinal

Main method that extracts the variable values from the complex object.

Returns
Indication whether the extraction could be completed successfully.

Definition at line 82 of file VariadicUnionVarSet.h.

◆ find()

MayBePtr<Float_t> find ( const std::string &  varName)
inlineoverridevirtual

Pointer to the variable with the given name.

Returns nullptr if not found.

Reimplemented from BaseVarSet< FirstType< AVarSets... >::Object >.

Definition at line 102 of file VariadicUnionVarSet.h.

◆ getNamedValues()

std::map<std::string, Float_t> getNamedValues ( const std::string &  prefix) const
inlineinherited

Getter for a map of names to float values.

Parameters
prefixName prefix to apply to all variable names.

Definition at line 90 of file BaseVarSet.h.

◆ getNamedVariables()

virtual std::vector<Named<Float_t*> > getNamedVariables ( const std::string &prefix  __attribute__(unused))
inlinevirtualinherited

Getter for the named references to the individual variables Base implementaton returns empty vector.

Parameters
prefixName prefix to apply to all variable names.

Definition at line 74 of file BaseVarSet.h.


The documentation for this class was generated from the following file: