Belle II Software light-2406-ragdoll
EventMetaData.cc
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
9#include <framework/dataobjects/EventMetaData.h>
10
11#include <climits>
12
13using namespace Belle2;
14
15EventMetaData::EventMetaData(unsigned int event, int run, int experiment):
16 m_event(event),
17 m_run(run),
18 m_subrun(0),
19 m_experiment(experiment),
20 m_production(0),
21 m_time(0),
22 m_parentLfn(""),
23 m_generatedWeight(1.0),
24 m_errorFlag(0)
25{}
26
28{
29 m_event = UINT_MAX;
30 m_run = INT_MAX;
31 m_experiment = INT_MAX;
32}
33
35{
36 return (m_event == UINT_MAX and m_run == INT_MAX and m_experiment == INT_MAX);
37}
38
39void EventMetaData::setEndOfRun(unsigned int experimentNumber, unsigned int runNumber)
40{
41 m_event = UINT_MAX;
42 m_experiment = experimentNumber;
43 m_run = runNumber;
44}
45
47{
48 return not isEndOfData() and (m_event == UINT_MAX);
49}
50
51bool EventMetaData::operator== (const EventMetaData& eventMetaData) const
52{
53 return ((m_event == eventMetaData.getEvent()) &&
54 (m_run == eventMetaData.getRun()) &&
55 (m_experiment == eventMetaData.getExperiment()));
56}
Store event, run, and experiment numbers.
Definition: EventMetaData.h:33
void setEndOfRun(unsigned int experimentNumber, unsigned int runNumber)
Marks the end of the current run.
void setEndOfData()
Marks the end of the data processing.
int getRun() const
Run Getter.
bool operator==(const EventMetaData &eventMetaData) const
Comparison Operator.
unsigned int getEvent() const
Event Getter.
bool isEndOfRun() const
is end-of-run set? (see setEndOfRun()).
int m_experiment
Experiment number.
unsigned int m_event
Event number ('normal' data has values > 0).
int getExperiment() const
Experiment Getter.
EventMetaData(unsigned int event=1, int run=0, int experiment=0)
Constructor.
bool isEndOfData() const
is end-of-data set? (see setEndOfData()).
int m_run
Run number (usually > 0, run-independent MC has run == 0).
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24