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 = std::tuple< AIOTypes... >
 Types that should be served to apply on invokation.
 
using IOVectors = std::tuple< std::vector< AIOTypes >... >
 Vector types that should be served to apply on invokation.
 

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 = typename ToVectorImpl< T >::Type
 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 = 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 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

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

using DataStoreInputTypeRefType = typename std::remove_pointer<DataStoreInputTypePtrType>::type

same as reference

Definition at line 44 of file FindletStoreArrayInput.h.

◆ IOTypes

using IOTypes = std::tuple<AIOTypes...>
inherited

Types that should be served to apply on invokation.

Definition at line 30 of file Findlet.h.

◆ IOVectors

using IOVectors = std::tuple< std::vector<AIOTypes>... >
inherited

Vector types that should be served to apply on invokation.

Definition at line 53 of file Findlet.h.

◆ Super

using Super = TrackFindingCDC::Findlet<>
private

Type of the base class.

Definition at line 37 of file FindletStoreArrayInput.h.

◆ ToVector

using ToVector = typename ToVectorImpl<T>::Type
protectedinherited

Short hand for ToRangeImpl.

Definition at line 49 of file Findlet.h.

Constructor & Destructor Documentation

◆ FindletStoreArrayInput()

Create a new instance of the module.

Definition at line 47 of file FindletStoreArrayInput.h.

47 : Super()
48 {
51 }
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
TrackFindingCDC::Findlet<> Super
Type of the base class.
TrackFindingCDC::StoreArrayLoader< DataStoreInputTypeRefType > m_storeArrayLoader
This class will transfer the content of the StoreArrey into a std::vector for each event The std::vec...
TWrappedFindlet m_wrappedFindlet
Instance of the wrapped findlet.

Member Function Documentation

◆ addProcessingSignalListener()

void addProcessingSignalListener ( ProcessingSignalListener psl)
protectedinherited

Register a processing signal listener to be notified.

Definition at line 55 of file CompositeProcessingSignalListener.cc.

56{
58}
std::vector< ProcessingSignalListener * > m_subordinaryProcessingSignalListeners
References to subordinary signal processing listener contained in this findlet.

◆ apply()

void apply ( )
inlinefinaloverride

timing extraction for this findlet

Definition at line 76 of file FindletStoreArrayInput.h.

77 {
80 }
std::vector< DataStoreInputTypePtrType > m_storeArrayInput
as member to keep vector memory allocated from event to event
void apply(std::vector< IOType * > &output) final
Loads the items from the DataStore.

◆ beginEvent()

void beginEvent ( )
inlinefinaloverridevirtual

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

Reimplemented from ProcessingSignalListener.

Definition at line 69 of file FindletStoreArrayInput.h.

70 {
72 m_storeArrayInput.clear();
73 }
void beginEvent() override
Receive and dispatch signal for the start of a new event.

◆ beginRun()

void beginRun ( )
overridevirtualinherited

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

Reimplemented from ProcessingSignalListener.

Reimplemented in LayerRelationFilter< AFilter >, FourHitFilter, QualityIndicatorFilter, ThreeHitFilter, TwoHitVirtualIPFilter, TwoHitVirtualIPQIFilter, RecoTrackStorer, ROIFinder, SpacePointLoaderAndPreparer, and TrackCandidateResultRefiner.

Definition at line 23 of file CompositeProcessingSignalListener.cc.

24{
27 psl->beginRun();
28 }
29}
Interface for an algorithm part that needs to receive the module processing signals.
virtual void beginRun()
Receive signal for the beginning of a new run.

◆ endRun()

void endRun ( )
overridevirtualinherited

Receive and dispatch signal for the end of the run.

Reimplemented from ProcessingSignalListener.

Definition at line 39 of file CompositeProcessingSignalListener.cc.

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

◆ exposeParameters()

void exposeParameters ( ModuleParamList moduleParamList,
const std::string &  prefix 
)
inlinefinaloverridevirtual

Expose the parameters to a module.

Reimplemented from Findlet<>.

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 }
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Forward prefixed parameters of this findlet to the module parameter list.
Definition: Findlet.h:69
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters to a module.

◆ getDescription()

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 60 of file CompositeProcessingSignalListener.cc.

61{
63}

◆ initialize()

void initialize ( )
overridevirtualinherited

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

Reimplemented from ProcessingSignalListener.

Reimplemented in UnionVarSet< AObject >, UnionVarSet< Object >, VariadicUnionVarSet< AVarSets >, ResultStorer< Belle2::CKFToPXDResult >, ResultStorer< Belle2::CKFToSVDResult >, BaseEventTimeExtractor< RecoTrack * >, BaseEventTimeExtractor< TrackFindingCDC::CDCWireHit & >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::HyperHough >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::QuadraticLegendre >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::Z0TanLambdaLegendre >, OnVarSet< Filter< ATruthVarSet::Object > >, OnVarSet< Filter< AVarSet::Object > >, OnVarSet< BaseFacetFilter >, OnVarSet< BaseFacetRelationFilter >, OnVarSet< BaseAxialSegmentPairFilter >, OnVarSet< BaseSegmentRelationFilter >, OnVarSet< BaseTrackRelationFilter >, OnVarSet< BaseSegmentPairRelationFilter >, MCSymmetric< BaseAxialSegmentPairFilter >, MCSymmetric< BaseFacetFilter >, MCSymmetric< BaseFacetRelationFilter >, MCSymmetric< BaseSegmentPairFilter >, MCSymmetric< BaseSegmentPairRelationFilter >, MCSymmetric< BaseSegmentRelationFilter >, MCSymmetric< BaseSegmentTripleFilter >, MCSymmetric< BaseSegmentTripleRelationFilter >, MCSymmetric< BaseTrackRelationFilter >, StoreArrayLoader< const Belle2::SpacePoint >, StoreArrayLoader< DataStoreInputTypeRefType >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCFacet >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCWireHit, true >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegment2D >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCTrack >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentPair >, StoreVectorSwapper< Belle2::TrackFindingCDC::CDCSegmentTriple >, RelationVarSet< ABaseVarSet >, QualityIndicatorFilter, TwoHitVirtualIPQIFilter, MultiHoughSpaceFastInterceptFinder, RawTrackCandCleaner< AHit >, RawTrackCandCleaner< Belle2::vxdHoughTracking::VXDHoughState >, RecoTrackStorer, ROIFinder, SingleHoughSpaceFastInterceptFinder, SpacePointLoaderAndPreparer, TrackCandidateOverlapResolver, and TrackCandidateResultRefiner.

Definition at line 15 of file CompositeProcessingSignalListener.cc.

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

◆ terminate()

void terminate ( )
overridevirtualinherited

Receive and dispatch Signal for termination of the event processing.

Reimplemented from ProcessingSignalListener.

Reimplemented in StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::HyperHough >, StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::QuadraticLegendre >, and StereoHitTrackQuadTreeMatcher< Belle2::TrackFindingCDC::Z0TanLambdaLegendre >.

Definition at line 47 of file CompositeProcessingSignalListener.cc.

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

Member Data Documentation

◆ m_initialized

bool m_initialized = false
privateinherited

Flag to keep track whether initialization happend 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

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

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 52 of file CompositeProcessingSignalListener.h.

◆ m_terminated

bool m_terminated = false
privateinherited

Flag to keep track whether termination happend before.

Definition at line 55 of file ProcessingSignalListener.h.

◆ m_wrappedFindlet

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: