Belle II Software  release-08-01-10
081_module.py
1 #!/usr/bin/env python3
2 
3 import basf2 as b2
4 
5 
6 class MinModule(b2.Module):
7  """Very minimal class to print Hello World in each event"""
8 
9  def event(self):
10  """Event function, called once for each event"""
11  b2.B2INFO("Hello World!")
12 
13 
14 # create a path
15 main = b2.Path()
16 
17 # set to generate 10 dummy events
18 main.add_module("EventInfoSetter", evtNumList=[10])
19 
20 # and add our module
21 main.add_module(MinModule())
22 
23 # run the path
24 b2.process(main)