Belle II Software  release-05-01-25
RootToHepEvt.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
9 
10 import basf2
11 
12 # Set the global log level
13 basf2.set_log_level(basf2.LogLevel.INFO)
14 
15 main = basf2.create_path()
16 
17 # Register the input module
18 myinput = basf2.register_module('RootInput')
19 myinput.param('inputFileName', './input.root')
20 
21 # Register the output module
22 myoutput = basf2.register_module('HepevtOutput')
23 myoutput.param('OutputFilename', './output.hepevt')
24 
25 # Register the Progress module and the Python histogram module
26 myprogress = basf2.register_module('Progress')
27 
28 main.add_module(myprogress)
29 main.add_module(myinput)
30 main.add_module(myoutput)
31 main.add_module("PrintMCParticles", logLevel=basf2.LogLevel.DEBUG, onlyPrimaries=False)
32 
33 # generate events
34 basf2.process(main)
35 
36 # show call statistics
37 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25