Belle II Software  release-05-02-19
IoVDependentConditionModule.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 <framework/core/Module.h>
13 #include <framework/database/IntervalOfValidity.h>
14 
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <framework/dataobjects/EventMetaData.h>
17 
18 #include <vector>
19 
20 namespace Belle2 {
25  class IoVDependentConditionModule : public Module {
27  public:
30 
32  void initialize() override;
33 
35  void beginRun() override;
36 
38  void event() override;
39 
40  private:
42  std::vector<IntervalOfValidity> m_iovsToCheck;
43 
45  bool m_conditionIsMet = false;
46 
48  StoreObjPtr<EventMetaData> m_eventMetaData;
49 
51  std::vector<std::tuple<int, int, int, int>> m_iovList;
52  };
53 
55 }
Belle2::IoVDependentConditionModule::IoVDependentConditionModule
IoVDependentConditionModule()
Add the module parameters and the description.
Definition: IoVDependentConditionModule.cc:17
Belle2::IoVDependentConditionModule::m_iovList
std::vector< std::tuple< int, int, int, int > > m_iovList
Parameter for the input iov list.
Definition: IoVDependentConditionModule.h:59
Belle2::IoVDependentConditionModule::beginRun
void beginRun() override
Set the m_conditionIsMet according to the new run.
Definition: IoVDependentConditionModule.cc:47
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::IoVDependentConditionModule::m_iovsToCheck
std::vector< IntervalOfValidity > m_iovsToCheck
Returns true if in this IoV.
Definition: IoVDependentConditionModule.h:50
Belle2::IoVDependentConditionModule::m_eventMetaData
StoreObjPtr< EventMetaData > m_eventMetaData
Storage for the event meta data.
Definition: IoVDependentConditionModule.h:56
Belle2::IoVDependentConditionModule::m_conditionIsMet
bool m_conditionIsMet
Internal condition: true if run/exp is in IoV.
Definition: IoVDependentConditionModule.h:53
Belle2::IoVDependentConditionModule::initialize
void initialize() override
Require the event meta data and turn the minimal/maximal exp/runs to an IoV.
Definition: IoVDependentConditionModule.cc:29
Belle2::IoVDependentConditionModule::event
void event() override
Returns true, if the event is in the given IoV.
Definition: IoVDependentConditionModule.cc:58