Belle II Software development
FindletStoreArrayInput< TWrappedFindlet > Class Template Referenceabstract

Findlet which can wrap another Findlet and forward the contents of a StoreArray to the wrapped findlet. More...

#include <FindletStoreArrayInput.h>

Inheritance diagram for FindletStoreArrayInput< TWrappedFindlet >:
Findlet<> CompositeProcessingSignalListener ProcessingSignalListener

Public Types

using DataStoreInputTypePtrType = typename std::tuple_element<0, typename TWrappedFindlet::IOTypes>::type
 this will be something like RecoTrack const * , so string the pointer
 
using DataStoreInputTypeRefType = typename std::remove_pointer<DataStoreInputTypePtrType>::type
 same as reference
 
using IOTypes
 Types that should be served to apply on invocation.
 
using IOTypes
 Types that should be served to apply on invocation.
 
using IOVectors
 Vector types that should be served to apply on invocation.
 
using IOVectors
 Vector types that should be served to apply on invocation.
 

Public Member Functions

 FindletStoreArrayInput ()
 Create a new instance of the module.
 
void exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) override final
 Expose the parameters to a module.
 
std::string getDescription () override final
 Short description of the findlet.
 
void beginEvent () override final
 Clear the local cache of the store array input for each new event.
 
void apply () override final
 timing extraction for this findlet
 
virtual void apply (ToVector< AIOTypes > &... ioVectors)=0
 Main function executing the algorithm.
 
void initialize () override
 Receive and dispatch signal before the start of the event processing.
 
void beginRun () override
 Receive and dispatch signal for the beginning of a new run.
 
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 Types

using ToVector
 Short hand for ToRangeImpl.
 
using ToVector
 Short hand for ToRangeImpl.
 

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 = TrackFindingCDC::Findlet<>
 Type of the base class.
 

Private Attributes

TrackFindingCDC::StoreArrayLoader< DataStoreInputTypeRefTypem_storeArrayLoader
 This class will transfer the content of the StoreArrey into a std::vector for each event The std::vector is used as input for the wrapped findlet.
 
TWrappedFindlet m_wrappedFindlet
 Instance of the wrapped findlet.
 
std::vector< DataStoreInputTypePtrTypem_storeArrayInput
 as member to keep vector memory allocated from event to event
 
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
 References to subordinary signal processing listener contained in this findlet.
 
bool m_initialized
 Flag to keep track whether initialization happened before.
 
bool m_terminated
 Flag to keep track whether termination happened before.
 
std::string m_initializedAs
 Name of the type during initialisation.
 

Detailed Description

template<class TWrappedFindlet>
class Belle2::TrackFindingCDC::FindletStoreArrayInput< TWrappedFindlet >

Findlet which can wrap another Findlet and forward the contents of a StoreArray to the wrapped findlet.

This simplifies development of findlets who can either be used stand-alone (with input from a StoreArray) or within a more complex findlet chain with input from, for example, an std::vector. For an example, see the TrackTimeExtractionModule

Internally, this class uses the StoreArrayLoader to transfer the pointers from a StoreArray to an std::vector for each event.

Definition at line 33 of file FindletStoreArrayInput.h.

Member Typedef Documentation

◆ DataStoreInputTypePtrType

template<class TWrappedFindlet>
using DataStoreInputTypePtrType = typename std::tuple_element<0, typename TWrappedFindlet::IOTypes>::type

this will be something like RecoTrack const * , so string the pointer

Definition at line 42 of file FindletStoreArrayInput.h.

◆ DataStoreInputTypeRefType

template<class TWrappedFindlet>
using DataStoreInputTypeRefType = typename std::remove_pointer<DataStoreInputTypePtrType>::type

same as reference

Definition at line 44 of file FindletStoreArrayInput.h.

◆ IOTypes [1/2]

using IOTypes
inherited

Types that should be served to apply on invocation.

Definition at line 30 of file Findlet.h.

◆ IOTypes [2/2]

using IOTypes
inherited

Types that should be served to apply on invocation.

Definition at line 30 of file Findlet.h.

◆ IOVectors [1/2]

using IOVectors
inherited

Vector types that should be served to apply on invocation.

Definition at line 53 of file Findlet.h.

◆ IOVectors [2/2]

using IOVectors
inherited

Vector types that should be served to apply on invocation.

Definition at line 53 of file Findlet.h.

◆ Super

template<class TWrappedFindlet>
using Super = TrackFindingCDC::Findlet<>
private

Type of the base class.

Definition at line 37 of file FindletStoreArrayInput.h.

◆ ToVector [1/2]

using ToVector
protectedinherited

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

◆ ToVector [2/2]

using ToVector
protectedinherited

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ FindletStoreArrayInput()

template<class TWrappedFindlet>
FindletStoreArrayInput ( )
inline

Create a new instance of the module.

Definition at line 47 of file FindletStoreArrayInput.h.

47 : Super()
48 {
49 addProcessingSignalListener(&m_storeArrayLoader);
50 addProcessingSignalListener(&m_wrappedFindlet);
51 }

Member Function Documentation

◆ addProcessingSignalListener()

void addProcessingSignalListener ( ProcessingSignalListener * psl)
protectedinherited

Register a processing signal listener to be notified.

Definition at line 53 of file CompositeProcessingSignalListener.cc.

56{
58}
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition Findlet.h:26

◆ apply()

template<class TWrappedFindlet>
void apply ( )
inlinefinaloverride

timing extraction for this findlet

Definition at line 76 of file FindletStoreArrayInput.h.

77 {
78 m_storeArrayLoader.apply(m_storeArrayInput);
79 m_wrappedFindlet.apply(m_storeArrayInput);
80 }

◆ beginEvent()

template<class TWrappedFindlet>
void beginEvent ( )
inlinefinaloverridevirtual

Clear the local cache of the store array input for each new event.

Reimplemented from CompositeProcessingSignalListener.

Definition at line 69 of file FindletStoreArrayInput.h.

70 {
71 Super::beginEvent();
72 m_storeArrayInput.clear();
73 }

◆ beginRun()

void beginRun ( )
overrideinherited

Receive and dispatch signal for the beginning of a new run.

Definition at line 33 of file CompositeProcessingSignalListener.cc.

24{
27 psl->beginRun();
28 }
29}
void beginRun() override
Receive and dispatch signal for the beginning of a new run.
virtual void beginRun()
Receive signal for the beginning of a new run.

◆ endRun()

void endRun ( )
overrideinherited

Receive and dispatch signal for the end of the run.

Definition at line 39 of file CompositeProcessingSignalListener.cc.

40{
42 psl->endRun();
43 }
45}
void endRun() override
Receive and dispatch signal for the end of the run.
virtual void endRun()
Receive signal for the end of the run.

◆ exposeParameters()

template<class TWrappedFindlet>
void exposeParameters ( ModuleParamList * moduleParamList,
const std::string & prefix )
inlinefinaloverridevirtual

Expose the parameters to a module.

Reimplemented from CompositeProcessingSignalListener.

Definition at line 54 of file FindletStoreArrayInput.h.

55 {
56 Super::exposeParameters(moduleParamList, prefix);
57
58 m_storeArrayLoader.exposeParameters(moduleParamList, prefix);
59 m_wrappedFindlet.exposeParameters(moduleParamList, prefix);
60 }

◆ getDescription()

template<class TWrappedFindlet>
std::string getDescription ( )
inlinefinaloverridevirtual

Short description of the findlet.

Reimplemented from Findlet<>.

Definition at line 63 of file FindletStoreArrayInput.h.

64 {
65 return m_wrappedFindlet.getDescription();
66 }

◆ getNProcessingSignalListener()

int getNProcessingSignalListener ( )
protectedinherited

Get the number of currently registered listeners.

Definition at line 56 of file CompositeProcessingSignalListener.cc.

61{
63}

◆ initialize()

void initialize ( )
overrideinherited

Receive and dispatch signal before the start of the event processing.

Definition at line 30 of file CompositeProcessingSignalListener.cc.

16{
19 psl->initialize();
20 }
21}
void initialize() override
Receive and dispatch signal before the start of the event processing.
virtual void initialize()
Receive signal before the start of the event processing.

◆ terminate()

void terminate ( )
overrideinherited

Receive and dispatch Signal for termination of the event processing.

Definition at line 42 of file CompositeProcessingSignalListener.cc.

48{
50 psl->terminate();
51 }
53}
void terminate() override
Receive and dispatch Signal for termination of the event processing.
virtual void terminate()
Receive Signal for termination of the event processing.

Member Data Documentation

◆ m_initialized

bool m_initialized
privateinherited

Flag to keep track whether initialization happened before.

Definition at line 52 of file ProcessingSignalListener.h.

◆ m_initializedAs

std::string m_initializedAs
privateinherited

Name of the type during initialisation.

Definition at line 58 of file ProcessingSignalListener.h.

◆ m_storeArrayInput

template<class TWrappedFindlet>
std::vector<DataStoreInputTypePtrType> m_storeArrayInput
private

as member to keep vector memory allocated from event to event

Definition at line 92 of file FindletStoreArrayInput.h.

◆ m_storeArrayLoader

template<class TWrappedFindlet>
TrackFindingCDC::StoreArrayLoader<DataStoreInputTypeRefType> m_storeArrayLoader
private

This class will transfer the content of the StoreArrey into a std::vector for each event The std::vector is used as input for the wrapped findlet.

Definition at line 86 of file FindletStoreArrayInput.h.

◆ m_subordinaryProcessingSignalListeners

std::vector<ProcessingSignalListener*> m_subordinaryProcessingSignalListeners
privateinherited

References to subordinary signal processing listener contained in this findlet.

Definition at line 60 of file CompositeProcessingSignalListener.h.

◆ m_terminated

bool m_terminated
privateinherited

Flag to keep track whether termination happened before.

Definition at line 55 of file ProcessingSignalListener.h.

◆ m_wrappedFindlet

template<class TWrappedFindlet>
TWrappedFindlet m_wrappedFindlet
private

Instance of the wrapped findlet.

Definition at line 89 of file FindletStoreArrayInput.h.


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