Belle II Software  release-05-02-19
FindletStoreArrayInput.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015-2016 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Thomas Hauth, Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <tracking/trackFindingCDC/findlets/base/Findlet.h>
13 #include <tracking/trackFindingCDC/findlets/base/StoreArrayLoader.h>
14 
15 #include <type_traits>
16 
17 namespace Belle2 {
22  namespace TrackFindingCDC {
23 
34  template <class TWrappedFindlet>
35  class FindletStoreArrayInput : public TrackFindingCDC::Findlet<> {
36 
37  private:
39  using Super = TrackFindingCDC::Findlet<>;
40 
41  public:
42 
44  using DataStoreInputTypePtrType = typename std::tuple_element<0, typename TWrappedFindlet::IOTypes>::type;
46  using DataStoreInputTypeRefType = typename std::remove_pointer<DataStoreInputTypePtrType>::type;
47 
50  {
53  }
54 
56  void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override final
57  {
58  Super::exposeParameters(moduleParamList, prefix);
59 
60  m_storeArrayLoader.exposeParameters(moduleParamList, prefix);
61  m_wrappedFindlet.exposeParameters(moduleParamList, prefix);
62  }
63 
65  std::string getDescription() override final
66  {
67  return m_wrappedFindlet.getDescription();
68  }
69 
71  void beginEvent() override final
72  {
74  m_storeArrayInput.clear();
75  }
76 
78  void apply() override final
79  {
82  }
83 
84  private:
85 
89 
91  TWrappedFindlet m_wrappedFindlet;
92 
94  std::vector<DataStoreInputTypePtrType> m_storeArrayInput;
95  };
96  }
98 }
Belle2::TrackFindingCDC::FindletStoreArrayInput::FindletStoreArrayInput
FindletStoreArrayInput()
Create a new instance of the module.
Definition: FindletStoreArrayInput.h:57
Belle2::TrackFindingCDC::FindletStoreArrayInput::DataStoreInputTypeRefType
typename std::remove_pointer< DataStoreInputTypePtrType >::type DataStoreInputTypeRefType
same as reference
Definition: FindletStoreArrayInput.h:54
Belle2::TrackFindingCDC::FindletStoreArrayInput::getDescription
std::string getDescription() override final
Short description of the findlet.
Definition: FindletStoreArrayInput.h:73
Belle2::TrackFindingCDC::Findlet<>
Belle2::TrackFindingCDC::FindletStoreArrayInput::DataStoreInputTypePtrType
typename std::tuple_element< 0, typename TWrappedFindlet::IOTypes >::type DataStoreInputTypePtrType
this will be something like RecoTrack const * , so string the pointer
Definition: FindletStoreArrayInput.h:52
Belle2::TrackFindingCDC::StoreArrayLoader::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters to a module.
Definition: StoreArrayLoader.h:72
Belle2::TrackFindingCDC::FindletStoreArrayInput::beginEvent
void beginEvent() override final
Clear the local cache of the store array input for each new event.
Definition: FindletStoreArrayInput.h:79
Belle2::TrackFindingCDC::CompositeProcessingSignalListener::addProcessingSignalListener
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Definition: CompositeProcessingSignalListener.cc:57
Belle2::TrackFindingCDC::StoreArrayLoader::apply
void apply(std::vector< IOType * > &output) final
Loads the items from the DataStore.
Definition: StoreArrayLoader.h:98
Belle2::TrackFindingCDC::FindletStoreArrayInput::m_storeArrayLoader
TrackFindingCDC::StoreArrayLoader< DataStoreInputTypeRefType > m_storeArrayLoader
This class will transfer the content of the StoreArrey into a std::vector for each event The std::vec...
Definition: FindletStoreArrayInput.h:96
Belle2::TrackFindingCDC::FindletStoreArrayInput::m_wrappedFindlet
TWrappedFindlet m_wrappedFindlet
Instance of the wrapped findlet.
Definition: FindletStoreArrayInput.h:99
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TrackFindingCDC::Findlet<>::exposeParameters
virtual void exposeParameters(ModuleParamList *moduleParamList __attribute__((unused)), const std::string &prefix __attribute__((unused)))
Forward prefixed parameters of this findlet to the module parameter list.
Definition: Findlet.h:79
Belle2::TrackFindingCDC::FindletStoreArrayInput::exposeParameters
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override final
Expose the parameters to a module.
Definition: FindletStoreArrayInput.h:64
Belle2::TrackFindingCDC::CompositeProcessingSignalListener::beginEvent
void beginEvent() override
Receive and dispatch signal for the start of a new event.
Definition: CompositeProcessingSignalListener.cc:33
Belle2::TrackFindingCDC::StoreArrayLoader< DataStoreInputTypeRefType >
Belle2::TrackFindingCDC::FindletStoreArrayInput::apply
void apply() override final
timing extraction for this findlet
Definition: FindletStoreArrayInput.h:86
Belle2::ModuleParamList
The Module parameter list class.
Definition: ModuleParamList.h:46
Belle2::TrackFindingCDC::FindletStoreArrayInput::m_storeArrayInput
std::vector< DataStoreInputTypePtrType > m_storeArrayInput
as member to keep vector memory allocated from event to event
Definition: FindletStoreArrayInput.h:102
Belle2::TrackFindingCDC::FindletStoreArrayInput::Super
TrackFindingCDC::Findlet<> Super
Type of the base class.
Definition: FindletStoreArrayInput.h:47