Belle II Software
light-2406-ragdoll
EventMetaData.h
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
#pragma once
10
11
#include <TObject.h>
12
13
#include <string>
14
15
namespace
Belle2
{
33
class
EventMetaData
:
public
TObject {
34
public
:
35
37
explicit
EventMetaData
(
unsigned
int
event = 1,
int
run = 0,
int
experiment = 0);
38
40
~EventMetaData
() {}
41
43
enum
EventErrorFlag
{
44
c_B2LinkPacketCRCError
= 0x1,
45
c_B2LinkEventCRCError
= 0x2,
46
c_HLTCrash
= 0x4,
47
c_ReconstructionAbort
= 0x8,
48
c_HLTDiscard
= 0x10,
49
};
50
55
void
setEvent
(
unsigned
int
event) {
m_event
= event; }
56
61
void
setRun
(
int
run) {
m_run
= run; }
62
67
void
setSubrun
(
int
subrun) {
m_subrun
= subrun; }
68
73
void
setExperiment
(
int
experiment) {
m_experiment
= experiment; }
74
79
void
setProduction
(
int
production) {
m_production
= production; }
80
85
void
setTime
(
unsigned
long
long
int
time) {
m_time
= time; }
86
97
void
setEndOfData
();
98
103
void
setEndOfRun
(
unsigned
int
experimentNumber,
unsigned
int
runNumber);
104
106
bool
isEndOfData
()
const
;
107
109
bool
isEndOfRun
()
const
;
110
115
void
setParentLfn
(
const
std::string& parent) {
m_parentLfn
= parent; }
116
121
void
setGeneratedWeight
(
double
weight) {
m_generatedWeight
= weight; }
122
127
void
setErrorFlag
(
unsigned
int
errorFlag) {
m_errorFlag
= errorFlag; }
128
133
void
addErrorFlag
(
EventErrorFlag
errorFlag) {
m_errorFlag
|= errorFlag; }
134
139
unsigned
int
getErrorFlag
()
const
{
return
m_errorFlag
; }
140
145
unsigned
int
getEvent
()
const
{
return
m_event
; }
146
151
int
getRun
()
const
{
return
m_run
; }
152
158
int
getSubrun
()
const
{
return
m_subrun
; }
159
164
int
getExperiment
()
const
{
return
m_experiment
; }
165
170
int
getProduction
()
const
{
return
m_production
; }
171
176
unsigned
long
long
int
getTime
()
const
{
return
m_time
; }
177
180
const
std::string&
getParentLfn
()
const
{
return
m_parentLfn
; }
181
186
double
getGeneratedWeight
()
const
{
return
m_generatedWeight
; }
187
193
bool
operator==
(
const
EventMetaData
& eventMetaData)
const
;
194
200
bool
operator!=
(
const
EventMetaData
& eventMetaData)
const
{
return
!(*
this
== eventMetaData); }
201
202
203
private
:
204
unsigned
int
m_event
;
205
int
m_run
;
206
int
m_subrun
;
207
int
m_experiment
;
209
int
m_production
;
210
unsigned
long
long
int
m_time
;
211
std::string
m_parentLfn
;
212
double
m_generatedWeight
;
213
unsigned
int
m_errorFlag
;
215
ClassDef
(
EventMetaData
, 4);
216
};
//class
218
}
// namespace Belle2
Belle2::EventMetaData
Store event, run, and experiment numbers.
Definition:
EventMetaData.h:33
Belle2::EventMetaData::setEvent
void setEvent(unsigned int event)
Event Setter.
Definition:
EventMetaData.h:55
Belle2::EventMetaData::getGeneratedWeight
double getGeneratedWeight() const
Generated Weight Getter.
Definition:
EventMetaData.h:186
Belle2::EventMetaData::m_subrun
int m_subrun
Sub-run number, increases indicate recovery from DAQ-internal trouble without change to detector cons...
Definition:
EventMetaData.h:206
Belle2::EventMetaData::~EventMetaData
~EventMetaData()
Destructor.
Definition:
EventMetaData.h:40
Belle2::EventMetaData::setExperiment
void setExperiment(int experiment)
Experiment Setter.
Definition:
EventMetaData.h:73
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::ClassDef
ClassDef(EventMetaData, 4)
Store event number, run number, and experiment number.
Belle2::EventMetaData::operator!=
bool operator!=(const EventMetaData &eventMetaData) const
Comparison Operator.
Definition:
EventMetaData.h:200
Belle2::EventMetaData::getParentLfn
const std::string & getParentLfn() const
Return LFN of the current parent file, or an empty string if not set.
Definition:
EventMetaData.h:180
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::setGeneratedWeight
void setGeneratedWeight(double weight)
Generated Weight Setter.
Definition:
EventMetaData.h:121
Belle2::EventMetaData::m_generatedWeight
double m_generatedWeight
Generated weight.
Definition:
EventMetaData.h:212
Belle2::EventMetaData::getSubrun
int getSubrun() const
Sub run Getter.
Definition:
EventMetaData.h:158
Belle2::EventMetaData::getEvent
unsigned int getEvent() const
Event Getter.
Definition:
EventMetaData.h:145
Belle2::EventMetaData::EventErrorFlag
EventErrorFlag
bit-flag format of m_error_flag
Definition:
EventMetaData.h:43
Belle2::EventMetaData::c_B2LinkPacketCRCError
@ c_B2LinkPacketCRCError
Belle2link CRC error is detected in the event.
Definition:
EventMetaData.h:44
Belle2::EventMetaData::c_HLTCrash
@ c_HLTCrash
The HLT reconstruction crashed in this event or the event before.
Definition:
EventMetaData.h:46
Belle2::EventMetaData::c_ReconstructionAbort
@ c_ReconstructionAbort
The event was not reconstructed, e.g.
Definition:
EventMetaData.h:47
Belle2::EventMetaData::c_B2LinkEventCRCError
@ c_B2LinkEventCRCError
HSLB_COPPER CRC error is detected in the event.
Definition:
EventMetaData.h:45
Belle2::EventMetaData::c_HLTDiscard
@ c_HLTDiscard
The HLT discarded the event and only metadata is kept.
Definition:
EventMetaData.h:48
Belle2::EventMetaData::getProduction
int getProduction() const
Production Getter.
Definition:
EventMetaData.h:170
Belle2::EventMetaData::isEndOfRun
bool isEndOfRun() const
is end-of-run set? (see setEndOfRun()).
Definition:
EventMetaData.cc:46
Belle2::EventMetaData::setErrorFlag
void setErrorFlag(unsigned int errorFlag)
Set Error Flag.
Definition:
EventMetaData.h:127
Belle2::EventMetaData::setProduction
void setProduction(int production)
Production Setter.
Definition:
EventMetaData.h:79
Belle2::EventMetaData::m_parentLfn
std::string m_parentLfn
LFN of the parent file.
Definition:
EventMetaData.h:211
Belle2::EventMetaData::setRun
void setRun(int run)
Run Setter.
Definition:
EventMetaData.h:61
Belle2::EventMetaData::m_production
int m_production
Unique identifier of the production of the event.
Definition:
EventMetaData.h:209
Belle2::EventMetaData::m_time
unsigned long long int m_time
Time in ns since epoch (1970-01-01).
Definition:
EventMetaData.h:210
Belle2::EventMetaData::setParentLfn
void setParentLfn(const std::string &parent)
Parent LFN Setter.
Definition:
EventMetaData.h:115
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::setTime
void setTime(unsigned long long int time)
Time Setter.
Definition:
EventMetaData.h:85
Belle2::EventMetaData::getExperiment
int getExperiment() const
Experiment Getter.
Definition:
EventMetaData.h:164
Belle2::EventMetaData::getTime
unsigned long long int getTime() const
Time Getter.
Definition:
EventMetaData.h:176
Belle2::EventMetaData::addErrorFlag
void addErrorFlag(EventErrorFlag errorFlag)
Add Error Flag.
Definition:
EventMetaData.h:133
Belle2::EventMetaData::getErrorFlag
unsigned int getErrorFlag() const
Get error flag.
Definition:
EventMetaData.h:139
Belle2::EventMetaData::isEndOfData
bool isEndOfData() const
is end-of-data set? (see setEndOfData()).
Definition:
EventMetaData.cc:34
Belle2::EventMetaData::m_errorFlag
unsigned int m_errorFlag
Indicator of error conditions during data taking, ORed combination of EventErrorFlag values.
Definition:
EventMetaData.h:213
Belle2::EventMetaData::m_run
int m_run
Run number (usually > 0, run-independent MC has run == 0).
Definition:
EventMetaData.h:205
Belle2::EventMetaData::setSubrun
void setSubrun(int subrun)
Sub run Setter.
Definition:
EventMetaData.h:67
Belle2
Abstract base class for different kinds of events.
Definition:
ClusterUtils.h:24
framework
dataobjects
include
EventMetaData.h
Generated on Tue Jul 9 2024 23:28:21 for Belle II Software by
1.9.6