Belle II Software development
|
Store event, run, and experiment numbers. More...
#include <EventMetaData.h>
Public Types | |
enum | EventErrorFlag { c_B2LinkPacketCRCError = 0x1 , c_B2LinkEventCRCError = 0x2 , c_HLTCrash = 0x4 , c_ReconstructionAbort = 0x8 , c_HLTDiscard = 0x10 } |
bit-flag format of m_error_flag More... | |
Public Member Functions | |
EventMetaData (unsigned int event=1, int run=0, int experiment=0) | |
Constructor. | |
~EventMetaData () | |
Destructor. | |
void | setEvent (unsigned int event) |
Event Setter. | |
void | setRun (int run) |
Run Setter. | |
void | setSubrun (int subrun) |
Sub run Setter. | |
void | setExperiment (int experiment) |
Experiment Setter. | |
void | setProduction (int production) |
Production Setter. | |
void | setTime (unsigned long long int time) |
Time Setter. | |
void | setEndOfData () |
Marks the end of the data processing. | |
void | setEndOfRun (unsigned int experimentNumber, unsigned int runNumber) |
Marks the end of the current run. | |
bool | isEndOfData () const |
is end-of-data set? (see setEndOfData()). | |
bool | isEndOfRun () const |
is end-of-run set? (see setEndOfRun()). | |
void | setParentLfn (const std::string &parent) |
Parent LFN Setter. | |
void | setGeneratedWeight (double weight) |
Generated Weight Setter. | |
void | setErrorFlag (unsigned int errorFlag) |
Set Error Flag. | |
void | addErrorFlag (EventErrorFlag errorFlag) |
Add Error Flag. | |
unsigned int | getErrorFlag () const |
Get error flag. | |
unsigned int | getEvent () const |
Event Getter. | |
int | getRun () const |
Run Getter. | |
int | getSubrun () const |
Sub run Getter. | |
int | getExperiment () const |
Experiment Getter. | |
int | getProduction () const |
Production Getter. | |
unsigned long long int | getTime () const |
Time Getter. | |
const std::string & | getParentLfn () const |
Return LFN of the current parent file, or an empty string if not set. | |
double | getGeneratedWeight () const |
Generated Weight Getter. | |
bool | operator== (const EventMetaData &eventMetaData) const |
Comparison Operator. | |
bool | operator!= (const EventMetaData &eventMetaData) const |
Comparison Operator. | |
Private Member Functions | |
ClassDef (EventMetaData, 4) | |
Store event number, run number, and experiment number. | |
Private Attributes | |
unsigned int | m_event |
Event number ('normal' data has values > 0). | |
int | m_run |
Run number (usually > 0, run-independent MC has run == 0). | |
int | m_subrun |
Sub-run number, increases indicate recovery from DAQ-internal trouble without change to detector constants. | |
int | m_experiment |
Experiment number. | |
int | m_production |
Unique identifier of the production of the event. | |
unsigned long long int | m_time |
Time in ns since epoch (1970-01-01). | |
std::string | m_parentLfn |
LFN of the parent file. | |
double | m_generatedWeight |
Generated weight. | |
unsigned int | m_errorFlag |
Indicator of error conditions during data taking, ORed combination of EventErrorFlag values. | |
Store event, run, and experiment numbers.
(see member variable doc for detailed description)
An object of this type is registered by e.g. EventInfoSetter for newly generated data, and updated with proper values for each event. Alternatively it can also be read from file.
This object is used for controlling the event-flow, e.g. via changing run-numbers or setEndOfData() (see also EventProcessor).
See BELLE2-NOTE-TE-2015-028: Event, File, and Dataset Metadata for a detailed definition. Available at: https://docs.belle2.org/record/287?ln=en
Definition at line 33 of file EventMetaData.h.
enum EventErrorFlag |
bit-flag format of m_error_flag
Definition at line 43 of file EventMetaData.h.
|
explicit |
Constructor.
Definition at line 15 of file EventMetaData.cc.
|
inline |
|
inline |
Add Error Flag.
errorFlag | a bit flag for an error event. |
Definition at line 133 of file EventMetaData.h.
|
inline |
|
inline |
Event Getter.
Definition at line 145 of file EventMetaData.h.
|
inline |
Experiment Getter.
Definition at line 164 of file EventMetaData.h.
|
inline |
Generated Weight Getter.
Definition at line 186 of file EventMetaData.h.
|
inline |
Return LFN of the current parent file, or an empty string if not set.
Definition at line 180 of file EventMetaData.h.
|
inline |
Production Getter.
Definition at line 170 of file EventMetaData.h.
|
inline |
|
inline |
Sub run Getter.
Definition at line 158 of file EventMetaData.h.
|
inline |
Time Getter.
Definition at line 176 of file EventMetaData.h.
bool isEndOfData | ( | ) | const |
is end-of-data set? (see setEndOfData()).
Definition at line 34 of file EventMetaData.cc.
bool isEndOfRun | ( | ) | const |
is end-of-run set? (see setEndOfRun()).
Definition at line 46 of file EventMetaData.cc.
|
inline |
Comparison Operator.
eventMetaData | The event meta data to compare with. |
Definition at line 200 of file EventMetaData.h.
bool operator== | ( | const EventMetaData & | eventMetaData | ) | const |
Comparison Operator.
eventMetaData | The event meta data to compare with. |
Definition at line 51 of file EventMetaData.cc.
void setEndOfData | ( | ) |
Marks the end of the data processing.
Can be used by any module to safely halt event processing. After this is set on StoreObjPtr<EventMetaData> and your event() function returns, no further modules in the path will be called and normal cleanup will be done (i.e. endRun(), terminate()).
Using this will produce a warning that your module stopped execution early, so you might want to add an explanatory message of your own.
Definition at line 27 of file EventMetaData.cc.
void setEndOfRun | ( | unsigned int | experimentNumber, |
unsigned int | runNumber | ||
) |
Marks the end of the current run.
Is only used and understood in special HLT processing.
Can only be used by the first ZMQ input module.
Definition at line 39 of file EventMetaData.cc.
|
inline |
Set Error Flag.
errorFlag | a bit flag for an error event. |
Definition at line 127 of file EventMetaData.h.
|
inline |
Event Setter.
event | The current event number. |
Definition at line 55 of file EventMetaData.h.
|
inline |
Experiment Setter.
experiment | The number of the current experiment. |
Definition at line 73 of file EventMetaData.h.
|
inline |
Generated Weight Setter.
weight | The weight produced by the event generator |
Definition at line 121 of file EventMetaData.h.
|
inline |
Parent LFN Setter.
parent | The LFN of the current parent file. |
Definition at line 115 of file EventMetaData.h.
|
inline |
Production Setter.
production | The integer identifier of the production. |
Definition at line 79 of file EventMetaData.h.
|
inline |
Run Setter.
run | The number of the current run. |
Definition at line 61 of file EventMetaData.h.
|
inline |
Sub run Setter.
subrun | The number of the current sub run. |
Definition at line 67 of file EventMetaData.h.
|
inline |
Time Setter.
time | The time when the event was recorded. |
Definition at line 85 of file EventMetaData.h.
|
private |
Indicator of error conditions during data taking, ORed combination of EventErrorFlag values.
Definition at line 213 of file EventMetaData.h.
|
private |
|
private |
Experiment number.
(valid values: [0, 1023], run-independent MC has exp == 0)
Definition at line 207 of file EventMetaData.h.
|
private |
|
private |
LFN of the parent file.
Definition at line 211 of file EventMetaData.h.
|
private |
|
private |
Run number (usually > 0, run-independent MC has run == 0).
Definition at line 205 of file EventMetaData.h.
|
private |
Sub-run number, increases indicate recovery from DAQ-internal trouble without change to detector constants.
Not supposed to be used by offline analysis.
Definition at line 206 of file EventMetaData.h.
|
private |