Belle II Software
development
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
13
using namespace
Belle2
;
14
15
EventMetaData::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
27
void
EventMetaData::setEndOfData
()
28
{
29
m_event
= UINT_MAX;
30
m_run
= INT_MAX;
31
m_experiment
= INT_MAX;
32
}
33
34
bool
EventMetaData::isEndOfData
()
const
35
{
36
return
(
m_event
== UINT_MAX and
m_run
== INT_MAX and
m_experiment
== INT_MAX);
37
}
38
39
void
EventMetaData::setEndOfRun
(
unsigned
int
experimentNumber,
unsigned
int
runNumber)
40
{
41
m_event
= UINT_MAX;
42
m_experiment
= experimentNumber;
43
m_run
= runNumber;
44
}
45
46
bool
EventMetaData::isEndOfRun
()
const
47
{
48
return
not
isEndOfData
() and (
m_event
== UINT_MAX);
49
}
50
51
bool
EventMetaData::operator==
(
const
EventMetaData
& eventMetaData)
const
52
{
53
return
((
m_event
== eventMetaData.
getEvent
()) &&
54
(
m_run
== eventMetaData.
getRun
()) &&
55
(
m_experiment
== eventMetaData.
getExperiment
()));
56
}
Belle2::EventMetaData
Store event, run, and experiment numbers.
Definition:
EventMetaData.h:33
Belle2::EventMetaData::setEndOfRun
void setEndOfRun(unsigned int experimentNumber, unsigned int runNumber)
Marks the end of the current run.
Definition:
EventMetaData.cc:39
Belle2::EventMetaData::setEndOfData
void setEndOfData()
Marks the end of the data processing.
Definition:
EventMetaData.cc:27
Belle2::EventMetaData::getRun
int getRun() const
Run Getter.
Definition:
EventMetaData.h:151
Belle2::EventMetaData::operator==
bool operator==(const EventMetaData &eventMetaData) const
Comparison Operator.
Definition:
EventMetaData.cc:51
Belle2::EventMetaData::getEvent
unsigned int getEvent() const
Event Getter.
Definition:
EventMetaData.h:145
Belle2::EventMetaData::isEndOfRun
bool isEndOfRun() const
is end-of-run set? (see setEndOfRun()).
Definition:
EventMetaData.cc:46
Belle2::EventMetaData::m_experiment
int m_experiment
Experiment number.
Definition:
EventMetaData.h:207
Belle2::EventMetaData::m_event
unsigned int m_event
Event number ('normal' data has values > 0).
Definition:
EventMetaData.h:204
Belle2::EventMetaData::getExperiment
int getExperiment() const
Experiment Getter.
Definition:
EventMetaData.h:164
Belle2::EventMetaData::EventMetaData
EventMetaData(unsigned int event=1, int run=0, int experiment=0)
Constructor.
Definition:
EventMetaData.cc:15
Belle2::EventMetaData::isEndOfData
bool isEndOfData() const
is end-of-data set? (see setEndOfData()).
Definition:
EventMetaData.cc:34
Belle2::EventMetaData::m_run
int m_run
Run number (usually > 0, run-independent MC has run == 0).
Definition:
EventMetaData.h:205
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
framework
dataobjects
src
EventMetaData.cc
Generated on Fri Nov 8 2024 02:37:23 for Belle II Software by
1.9.6