Belle II Software  release-05-02-19
BaseEventTimeExtractor.dcl.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: 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 
14 #include <framework/datastore/StoreObjPtr.h>
15 #include <framework/dataobjects/EventT0.h>
16 
17 namespace Belle2 {
22  template<class ... AIOTypes>
24  class BaseEventTimeExtractor : public TrackFindingCDC::Findlet<AIOTypes...> {
25 
26  private:
28  using Super = TrackFindingCDC::Findlet<AIOTypes...>;
29 
30  public:
32  bool wasSuccessful() const;
33 
35  virtual void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) override;
36 
38  virtual void initialize() override;
39 
41  virtual void beginEvent() override;
42 
43  protected:
45  void resetEventT0() const;
46 
49 
51  bool m_wasSuccessful = false;
52 
53  private:
56 
58  boost::optional<EventT0::EventT0Component> m_eventT0Before;
59  };
61 }
Belle2::BaseEventTimeExtractor::Super
TrackFindingCDC::Findlet< AIOTypes... > Super
Type of the base class.
Definition: BaseEventTimeExtractor.dcl.h:36
Belle2::BaseEventTimeExtractor::initialize
virtual void initialize() override
Initialize the event t0 store obj ptr.
Definition: BaseEventTimeExtractor.icc.h:48
Belle2::BaseEventTimeExtractor::m_eventT0Before
boost::optional< EventT0::EventT0Component > m_eventT0Before
Storage for the event t0 before this module ran.
Definition: BaseEventTimeExtractor.dcl.h:66
Belle2::BaseEventTimeExtractor::m_eventT0
StoreObjPtr< EventT0 > m_eventT0
Pointer to the storage of the eventwise T0 estimation in the data store.
Definition: BaseEventTimeExtractor.dcl.h:56
Belle2::BaseEventTimeExtractor::m_param_overwriteExistingEstimation
bool m_param_overwriteExistingEstimation
Parameter if it is fine to overwrite the current EventT0.
Definition: BaseEventTimeExtractor.dcl.h:63
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::BaseEventTimeExtractor::m_wasSuccessful
bool m_wasSuccessful
Variable to show that the execution was successful.
Definition: BaseEventTimeExtractor.dcl.h:59
Belle2::BaseEventTimeExtractor::wasSuccessful
bool wasSuccessful() const
Returns true if the last run t0 extraction was successful.
Definition: BaseEventTimeExtractor.icc.h:31
Belle2::BaseEventTimeExtractor::exposeParameters
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose our parameters to the super module.
Definition: BaseEventTimeExtractor.icc.h:37
Belle2::BaseEventTimeExtractor::beginEvent
virtual void beginEvent() override
Create the event t0 store obj ptr.
Definition: BaseEventTimeExtractor.icc.h:55
Belle2::BaseEventTimeExtractor::resetEventT0
void resetEventT0() const
Reset the t0 value to cached value if it exists or clear it otherwise.
Definition: BaseEventTimeExtractor.icc.h:69
Belle2::ModuleParamList
The Module parameter list class.
Definition: ModuleParamList.h:46