Belle II Software development
Dummy2File.py
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3
4
11
12
25
26import basf2 as b2
27import sys
28argvs = sys.argv
29
30if len(argvs) < 3:
31 print('Usage : DummyDataPacker.py <runno> <maxevents>')
32 sys.exit()
33
34# Set the log level to show only error and fatal messages
35b2.set_log_level(b2.LogLevel.ERROR)
36# set_log_level(LogLevel.INFO)
37
38# input
39# runno = int(argvs[1])
40# max_event = int(argvs[2])
41# packer = register_module('DummyDataPacker')
42# packer.param('RunNumber', runno)
43# packer.param('MaxEventNum', max_event)
44# root = register_module('RootOutput')
45# root.param('outputFileName', argvs[2])
46# dump = register_module('Ds2RawFile')
47
48root = b2.register_module('SeqRootInput')
49# root.param('inputFileName', argvs[2])
50
51output = b2.register_module('StorageSerializer')
52output.param('OutputBufferName', 'OTEST')
53output.param('OutputBufferSize', 10)
54output.param('compressionLevel', 0)
55
56# Create main path
57main = b2.create_path()
58
59# Add modules to main path
60# main.add_module(packer)
61main.add_module(root)
62# main.add_module(dump)
63main.add_module(output)
64
65# Process all events
66b2.process(main)