Belle II Software  release-08-01-10
unpack.py
1 #!/usr/bin/env python3
2 
3 
10 
11 import basf2 as b2
12 import modularAnalysis as ma
13 from rawdata import add_unpackers
14 
15 # Create path
16 main = b2.create_path()
17 
18 # Root input
19 roinput = b2.register_module('RootInput')
20 main.add_module(roinput)
21 
22 # Required setup modules
23 main.add_module("Geometry")
24 
25 add_unpackers(main)
26 
27 ma.printDataStore(path=main)
28 
29 # Output events
30 output = b2.register_module('RootOutput')
31 output.param('outputFileName', "unpacked.root")
32 main.add_module(output)
33 
34 # Process events
35 b2.process(main)
36 print(b2.statistics)