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