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

Public Member Functions

def __init__ (self)
 
def event (self)
 

Public Attributes

 evt
 

Detailed Description

Print some random numbers to check reproducibility

Definition at line 17 of file steering.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Make sure we can run in multiple processes

Definition at line 20 of file steering.py.

20 def __init__(self):
21 """Make sure we can run in multiple processes"""
22 super().__init__()
23 self.set_property_flags(basf2.ModulePropFlags.PARALLELPROCESSINGCERTIFIED)
24 self.evt = ROOT.Belle2.PyStoreObj("EventMetaData")
25

Member Function Documentation

◆ event()

def event (   self)
Print the first 5 random numbers

Definition at line 26 of file steering.py.

26 def event(self):
27 """Print the first 5 random numbers"""
28 numbers = [f"First 5 random values in event({self.evt.getExperiment()}, {self.evt.getRun()}, {self.evt.getEvent()}):"]
29 numbers += ["%08x" % ROOT.gRandom.Integer(0xffffffff) for i in range(5)]
30 basf2.B2INFO(" ".join(numbers))
31
32

Member Data Documentation

◆ evt

evt

Definition at line 24 of file steering.py.


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