Belle II Software  release-08-01-10
Dummy2File.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 
25 
26 import basf2 as b2
27 import sys
28 argvs = sys.argv
29 
30 if 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
35 b2.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 
48 root = b2.register_module('SeqRootInput')
49 # root.param('inputFileName', argvs[2])
50 
51 output = b2.register_module('StorageSerializer')
52 output.param('OutputBufferName', 'OTEST')
53 output.param('OutputBufferSize', 10)
54 output.param('compressionLevel', 0)
55 
56 # Create main path
57 main = b2.create_path()
58 
59 # Add modules to main path
60 # main.add_module(packer)
61 main.add_module(root)
62 # main.add_module(dump)
63 main.add_module(output)
64 
65 # Process all events
66 b2.process(main)