Belle II Software development
081_module.py
1#!/usr/bin/env python3
2
3import basf2 as b2
4
5
6class 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
15main = b2.Path()
16
17# set to generate 10 dummy events
18main.add_module("EventInfoSetter", evtNumList=[10])
19
20# and add our module
21main.add_module(MinModule())
22
23# run the path
24b2.process(main)