Belle II Software development
raw2mdst.py
1#!/usr/bin/env python3
2
3
10
11import basf2 as b2
12from mdst import add_mdst_output
13from softwaretrigger.constants import SoftwareTriggerModes
14from softwaretrigger.processing import add_hlt_processing
15
16# create path
17main = b2.create_path()
18
19# input
20main.add_module('RootInput')
21
22# gearbox and geometry
23main.add_module('Gearbox')
24main.add_module('Geometry')
25
26# reconstruction
27# No filter is applied in monitoring mode. To enable filtering, use, for example,
28# softwaretrigger_mode=SoftwareTriggerModes.filter
29add_hlt_processing(main, softwaretrigger_mode=SoftwareTriggerModes.monitor, prune_output=False, calcROIs=False)
30
31# mdst output
32add_mdst_output(main)
33
34# process events and print call statistics
35b2.process(main)
36print(b2.statistics)