Belle II Software  release-08-01-10
async_display.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 # example steering file to produce events and show them in the display
13 # without stopping the simulation.
14 # event data is buffered in shared memory, previous events may be overwritten
15 # once the buffer is full.
16 
17 import basf2 as b2
18 from simulation import add_simulation
19 from reconstruction import add_reconstruction
20 
21 main = b2.create_path()
22 
23 # add modules to paths
24 main.add_module('EventInfoSetter', evtNumList=[5000])
25 main.add_module('ProgressBar')
26 main.add_module('EvtGenInput')
27 add_simulation(main)
28 add_reconstruction(main)
29 
30 main.add_module('AsyncDisplay', discardOldEvents=True)
31 
32 b2.process(main)
33 print(b2.statistics)