Belle II Software  release-05-02-19
Convert.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 import os
5 import basf2
6 from b2biiConversion import convertBelleMdstToBelleIIMdst
7 
8 os.environ['PGUSER'] = 'g0db'
9 
10 main = basf2.create_path()
11 
12 # add all modules necessary to read and convert the mdst file
13 inputfile = basf2.find_file('b2bii_input_evtgen_exp_07_BptoD0pip-D0toKpipi0-0.mdst', 'examples', False)
14 convertBelleMdstToBelleIIMdst(inputfile, applySkim=True, path=main)
15 
16 # Store the converted Belle II dataobjects in ROOT
17 output = basf2.register_module('RootOutput')
18 output.param('outputFileName', 'B2BII_Convert_Example.mdst.root')
19 main.add_module(output)
20 
21 # progress
22 main.add_module('Progress')
23 
24 basf2.process(main)
25 
26 # Print call statistics
27 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25