Belle II Software light-2406-ragdoll
EvtMetaDataTest Class Reference
Inheritance diagram for EvtMetaDataTest:
Collaboration diagram for EvtMetaDataTest:

Public Member Functions

def __init__ (self)
 
def initialize (self)
 
def beginRun (self)
 
def event (self)
 
def endRun (self)
 
def terminate (self)
 

Detailed Description

Prints EventMetaData objects and stops event processing in event 3.

Definition at line 23 of file evtmetadata.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
constructor.

Definition at line 27 of file evtmetadata.py.

27 def __init__(self):
28 """constructor."""
29
30 # need to call super() _if_ we reimplement the constructor
31 super().__init__()
32 basf2.B2INFO('event\trun\texp')
33

Member Function Documentation

◆ beginRun()

def beginRun (   self)
reimplementation of Module::beginRun().

Definition at line 39 of file evtmetadata.py.

39 def beginRun(self):
40 """reimplementation of Module::beginRun()."""
41
42 basf2.B2INFO('EvtMetaDataTest::beginRun()')
43

◆ endRun()

def endRun (   self)
reimplementation of Module::endRun().

Definition at line 60 of file evtmetadata.py.

60 def endRun(self):
61 """reimplementation of Module::endRun()."""
62
63 basf2.B2INFO('EvtMetaDataTest::endRun()')
64

◆ event()

def event (   self)
reimplementation of Module::event().

Definition at line 44 of file evtmetadata.py.

44 def event(self):
45 """reimplementation of Module::event()."""
46
47 evtmetadata = Belle2.PyStoreObj('EventMetaData')
48
49 if not evtmetadata:
50 basf2.B2ERROR('No EventMetaData found')
51 else:
52 event = evtmetadata.obj().getEvent()
53 run = evtmetadata.obj().getRun()
54 exp = evtmetadata.obj().getExperiment()
55 basf2.B2INFO(f"{event}\t{run}\t{exp}")
56 if event == 4:
57 # stop event processing.
58 evtmetadata.obj().setEndOfData()
59
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67

◆ initialize()

def initialize (   self)
reimplementation of Module::initialize().

Definition at line 34 of file evtmetadata.py.

34 def initialize(self):
35 """reimplementation of Module::initialize()."""
36
37 basf2.B2INFO('EvtMetaDataTest::initialize()')
38

◆ terminate()

def terminate (   self)
reimplementation of Module::terminate().

Definition at line 65 of file evtmetadata.py.

65 def terminate(self):
66 """reimplementation of Module::terminate()."""
67
68 basf2.B2INFO('EvtMetaDataTest::terminate()')
69
70
71# Normal steering file part begins here
72

The documentation for this class was generated from the following file: