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