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