Belle II Software  release-05-01-25
unpack.py
1 # Add the cut module to the pat#!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 import basf2 as b2
5 import modularAnalysis as ma
6 from rawdata import add_unpackers
7 
8 # Create path
9 main = b2.create_path()
10 
11 # Root input
12 roinput = b2.register_module('RootInput')
13 main.add_module(roinput)
14 
15 # Required setup modules
16 ma.loadGearbox(main)
17 main.add_module("Geometry")
18 
19 add_unpackers(main)
20 
21 ma.printDataStore(path=main)
22 
23 # Output events
24 output = b2.register_module('RootOutput')
25 output.param('outputFileName', "unpacked.root")
26 main.add_module(output)
27 
28 # Process events
29 b2.process(main)
30 print(b2.statistics)