Belle II Software development
SVDUnpackerTest.py
1#!/usr/bin/env python3
2
3
10
11
18
19import basf2 as b2
20
21numEvents = 1
22
23# show warnings during processing
24b2.set_log_level(b2.LogLevel.DEBUG)
25
26# Register modules
27
28eventinfosetter = b2.register_module('EventInfoSetter')
29eventinfosetter.param('expList', [0])
30eventinfosetter.param('runList', [1])
31eventinfosetter.param('evtNumList', [numEvents])
32
33eventinfoprinter = b2.register_module('EventInfoPrinter')
34gearbox = b2.register_module('Gearbox')
35
36geometry = b2.register_module('Geometry')
37geometry.param('components', ['MagneticField', 'PXD', 'SVD'])
38
39svdUnpacker = b2.register_module('SVDUnpacker')
40svdUnpacker.param('rawSVDListName', 'inputList')
41svdUnpacker.param('svdShaperDigitListName', 'outputList')
42# svdUnpacker.param('dataFileName','RUN19880101063811.dat')
43# svdUnpacker.param('dataFileName','coded')
44
45# ============================================================================
46# Do the simulation
47
48main = b2.create_path()
49main.add_module(eventinfosetter)
50main.add_module(eventinfoprinter)
51main.add_module(gearbox)
52main.add_module(geometry)
53main.add_module(svdUnpacker)
54
55# Process events
56b2.process(main)
57
58# Print call statistics
59print(b2.statistics)