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

Public Member Functions

def __init__ (self, accepted)
 
def event (self)
 

Public Attributes

 emd
 event metadata
 

Protected Attributes

 _accepted
 list/set of accepted events
 

Detailed Description

Small module to mark all events except for the ones in the given list as
discarded by the HLT

Definition at line 139 of file root_input.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  accepted 
)
Initialize this nice class with the list/set of accepted event
numbers to see. Order not important. All other events will be flagged
as discarded.

Definition at line 145 of file root_input.py.

145 def __init__(self, accepted):
146 """
147 Initialize this nice class with the list/set of accepted event
148 numbers to see. Order not important. All other events will be flagged
149 as discarded.
150 """
151 super().__init__()
152
153 self.emd = Belle2.PyStoreObj('EventMetaData')
154
155 self._accepted = accepted
156
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67

Member Function Documentation

◆ event()

def event (   self)
Set error flag if required

Definition at line 157 of file root_input.py.

157 def event(self):
158 """Set error flag if required"""
159 if self.emd.getEvent() not in self._accepted:
160 error = Belle2.EventMetaData.c_HLTDiscard if self.emd.getEvent() % 2 == 0 else \
161 Belle2.EventMetaData.c_HLTCrash
162 self.emd.addErrorFlag(error)
163
164 main = basf2.Path()

Member Data Documentation

◆ _accepted

_accepted
protected

list/set of accepted events

Definition at line 155 of file root_input.py.

◆ emd

emd

event metadata

Definition at line 153 of file root_input.py.


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