Belle II Software  release-05-02-19
UnionVarSet< AObject > Class Template Reference

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

#include <UnionVarSet.h>

Inheritance diagram for UnionVarSet< AObject >:
Collaboration diagram for UnionVarSet< AObject >:

Public Types

using Object = AObject
 Object type from which variables shall be extracted.
 
using ContainedVarSet = BaseVarSet< Object >
 Type of the contained variable sets.
 

Public Member Functions

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...
 
void push_back (std::unique_ptr< ContainedVarSet > varSet)
 Add a variable set to the contained variable sets.
 
void clear ()
 Remove all contained variable sets.
 
size_t size () const
 Return the number of currently contained variable sets.
 
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< AObject >
 Type of the super class.
 

Private Attributes

std::vector< std::unique_ptr< ContainedVarSet > > m_varSets
 Collection of contained variables 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 AObject>
class Belle2::TrackFindingCDC::UnionVarSet< AObject >

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

Definition at line 37 of file UnionVarSet.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 68 of file UnionVarSet.h.

74  {
75  std::vector<Named<Float_t*> > result;

◆ 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< AObject >.

Definition at line 95 of file UnionVarSet.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: