Belle II Software development
PrintEventRate.py
1#!/usr/bin/env python3
2
3
10
11
24
25import basf2 as b2
26import sys
27
28# Set the log level to show only error and fatal messages
29# set_log_level(LogLevel.ERROR)
30b2.set_log_level(b2.LogLevel.INFO)
31
32# input
33argvs = sys.argv
34input = b2.register_module('SeqRootInput')
35input.param('fileNameIsPattern', True)
36# input.param('fileNameIsPattern', False )
37# input.param('inputFileName', '/x02/data/e0000r000554.sroot')
38# input.param('inputFileName', '/rawdata/disk01/storage/0001/03218/cosmic.0001.03218.HLT1.f%05d.sroot')
39input.param('inputFileName', argvs[1])
40
41
42# rate
43rate = b2.register_module('PrintEventRate')
44rate.param('PrintInterval', 60)
45# unpack = register_module('CDCUnpacker')
46
47dump = b2.register_module('RootOutput')
48prog = b2.register_module('Progress')
49
50# Create main path
51main = b2.create_path()
52
53# Add modules to main path
54main.add_module(input)
55# main.add_module(output)
56main.add_module(rate)
57# main.add_module(dump)
58# main.add_module(unpack)
59# main.add_module(prog)
60
61# Process all events
62b2.process(main)