Belle II Software development
FindletStoreArrayInput.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <tracking/trackFindingCDC/findlets/base/Findlet.h>
11#include <tracking/trackFindingCDC/findlets/base/StoreArrayLoader.h>
12
13#include <type_traits>
14
15namespace Belle2 {
20 namespace TrackFindingCDC {
21
32 template <class TWrappedFindlet>
34
35 private:
38
39 public:
40
42 using DataStoreInputTypePtrType = typename std::tuple_element<0, typename TWrappedFindlet::IOTypes>::type;
44 using DataStoreInputTypeRefType = typename std::remove_pointer<DataStoreInputTypePtrType>::type;
45
48 {
51 }
52
54 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override final
55 {
56 Super::exposeParameters(moduleParamList, prefix);
57
58 m_storeArrayLoader.exposeParameters(moduleParamList, prefix);
59 m_wrappedFindlet.exposeParameters(moduleParamList, prefix);
60 }
61
63 std::string getDescription() override final
64 {
65 return m_wrappedFindlet.getDescription();
66 }
67
69 void beginEvent() override final
70 {
72 m_storeArrayInput.clear();
73 }
74
76 void apply() override final
77 {
80 }
81
82 private:
83
87
89 TWrappedFindlet m_wrappedFindlet;
90
92 std::vector<DataStoreInputTypePtrType> m_storeArrayInput;
93 };
94 }
96}
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
Findlet which can wrap another Findlet and forward the contents of a StoreArray to the wrapped findle...
std::vector< DataStoreInputTypePtrType > m_storeArrayInput
as member to keep vector memory allocated from event to event
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.
typename std::remove_pointer< DataStoreInputTypePtrType >::type DataStoreInputTypeRefType
same as reference
TrackFindingCDC::StoreArrayLoader< DataStoreInputTypeRefType > m_storeArrayLoader
This class will transfer the content of the StoreArrey into a std::vector for each event The std::vec...
FindletStoreArrayInput()
Create a new instance of the module.
TWrappedFindlet m_wrappedFindlet
Instance of the wrapped findlet.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override final
Expose the parameters to a module.
typename std::tuple_element< 0, typename TWrappedFindlet::IOTypes >::type DataStoreInputTypePtrType
this will be something like RecoTrack const * , so string the pointer
void apply() override final
timing extraction for this findlet
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition: Findlet.h:26
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Forward prefixed parameters of this findlet to the module parameter list.
Definition: Findlet.h:69
Helper findlet to allow combined findlets to import data from the DataStore.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters to a module.
void apply(std::vector< IOType * > &output) final
Loads the items from the DataStore.
Abstract base class for different kinds of events.