Belle II Software  release-08-01-10
Binary2Root.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 
25 
26 import basf2 as b2
27 
28 # Set the log level to show only error and fatal messages
29 b2.set_log_level(b2.LogLevel.ERROR)
30 # set_log_level(LogLevel.INFO)
31 
32 # input
33 input = b2.register_module('DeSerializerFILE')
34 # input.param('inputFileName', 'cdc_10kHz_newFEEformat_131206.dat')
35 # input.param('inputFileName', 'RUN20131206170859.dat')
36 input.param('inputFileName',
37  '/home/usr/yamadas/work/svddummy/RUN19880101061243_wAPVheaderdetection.dat'
38  )
39 # input.param('inputFileName', '/home/usr/yamadas/work/svddummy/RUN19880101060100_woAPVheaderdetection.dat')
40 # input.param('inputFileName', '/home/usr/yamadas/work/svddummy/RUN19880101143745_transparent.dat')
41 
42 input.param('inputRepetitionTimes', 0)
43 
44 # output
45 # output = register_module('PrintDataTemplate')
46 # output = register_module('Root2Binary')
47 
48 # dump
49 dump = b2.register_module('RootOutput')
50 dump.param('outputFileName', 'temp.root')
51 
52 # Create main path
53 main = b2.create_path()
54 
55 # Add modules to main path
56 main.add_module(input)
57 # main.add_module(output)
58 main.add_module(dump)
59 
60 # Process all events
61 b2.process(main)