 |
Belle II Software
release-05-02-19
|
10 #include <framework/modules/core/IoVDependentConditionModule.h>
11 #include <framework/core/ModuleParam.templateDetails.h>
19 setDescription(
"Module which sets its return value based on the fact, if the event is in the given "
20 "run/exp interval or not. If you set the maximal value of experiment and run to -1, "
21 "there will be no upper limit for the interval. If you only set the maximal run to -1, "
22 "there is no upper limit on the run number.");
23 setPropertyFlags(Module::EModulePropFlags::c_ParallelProcessingCertified);
25 addParam(
"iovList", m_iovList,
"The list of IoV to test in the format [(min exp, min run, max exp, max run), ...]."
26 "If multiple IoVs are given, their union will be checked against the event's IoV.");
33 B2ASSERT(
"You did not specify any IoVs to test!", not
m_iovList.empty());
34 for (
const auto& iovAsTuple :
m_iovList) {
35 double minimalExpNumber, minimalRunNumber, maximalExpNumber, maximalRunNumber;
36 std::tie(minimalExpNumber, minimalRunNumber, maximalExpNumber, maximalRunNumber) = iovAsTuple;
37 const IntervalOfValidity iovToCheck(minimalExpNumber, minimalRunNumber, maximalExpNumber, maximalRunNumber);
39 B2ASSERT(
"One of the specified interval of exp/run is empty. This is probably not what you want!",
40 not iovToCheck.
empty());
A class that describes the interval of experiments/runs for which an object in the database is valid.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
std::vector< std::tuple< int, int, int, int > > m_iovList
Parameter for the input iov list.
void beginRun() override
Set the m_conditionIsMet according to the new run.
Abstract base class for different kinds of events.
std::vector< IntervalOfValidity > m_iovsToCheck
Returns true if in this IoV.
void setReturnValue(int value)
Sets the return value for this module as integer.
StoreObjPtr< EventMetaData > m_eventMetaData
Storage for the event meta data.
Module which sets its return value based on the fact, if the event is in the given run/exp interval o...
bool m_conditionIsMet
Internal condition: true if run/exp is in IoV.
void initialize() override
Require the event meta data and turn the minimal/maximal exp/runs to an IoV.
bool empty() const
Function that checks whether the validity interval is empty.
void event() override
Returns true, if the event is in the given IoV.