Belle II Software development
ExtraInfoPathSplitter Class Reference
Inheritance diagram for ExtraInfoPathSplitter:

Public Member Functions

def __init__ (self, event_codes)
 
def initialize (self)
 
def event (self)
 

Public Attributes

 event_codes
 list of event codes
 
 event_extra_info
 PyStoreObj for EventExtraInfo to save event codes.
 

Detailed Description

Helper module to return True if the value from ``eventExtraInfo(EventCode)``
is included in the event_codes parameter.

Parameters:
    event_codes (Iterable): tuple or list of EventCode.

Definition at line 157 of file utils.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  event_codes 
)
Initialize the class
Parameters:
    event_codes (Iterable): tuple or list of EventCode.

Definition at line 166 of file utils.py.

166 def __init__(self, event_codes):
167 """
168 Initialize the class
169 Parameters:
170 event_codes (Iterable): tuple or list of EventCode.
171 """
172 import ROOT # noqa
173 super().__init__()
174
175 self.event_codes = [e.value for e in event_codes]
176
177 self.event_extra_info = ROOT.Belle2.PyStoreObj('EventExtraInfo')
178

Member Function Documentation

◆ event()

def event (   self)
Event method of the module

Definition at line 185 of file utils.py.

185 def event(self):
186 """Event method of the module"""
187 if not self.event_extra_info.hasExtraInfo('EventCode'):
188 B2FATAL('The EventExtraInfo object has no EventCode field registered.')
189 if self.event_extra_info.getExtraInfo('EventCode') in self.event_codes:
190 self.return_value(1)
191 else:
192 self.return_value(0)

◆ initialize()

def initialize (   self)
Initialize module before any events are processed

Definition at line 179 of file utils.py.

179 def initialize(self):
180 """
181 Initialize module before any events are processed
182 """
183 self.event_extra_info.isRequired()
184

Member Data Documentation

◆ event_codes

event_codes

list of event codes

Definition at line 175 of file utils.py.

◆ event_extra_info

event_extra_info

PyStoreObj for EventExtraInfo to save event codes.

Definition at line 177 of file utils.py.


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