Belle II Software  release-08-01-10
test_packer_unpacker.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 
14 from simulation import add_simulation
15 
16 numEvents = 10
17 nodeid = 0
18 eventinfosetter = b2.register_module('EventInfoSetter')
19 eventinfosetter.param('expList', [0])
20 eventinfosetter.param('runList', [1])
21 eventinfosetter.param('evtNumList', [numEvents])
22 
23 evtgeninput = b2.register_module('EvtGenInput')
24 
25 rootoutput = b2.register_module('RootOutput')
26 
27 Packer = b2.register_module('SVDPacker')
28 Packer.param('NodeID', nodeid)
29 Packer.param('svdShaperDigitListName', 'SVDShaperDigits')
30 Packer.param('rawSVDListName', 'SVDRaw')
31 
32 unPacker = b2.register_module('SVDUnpacker')
33 unPacker.param('rawSVDListName', 'SVDRaw')
34 unPacker.param('svdShaperDigitListName', 'newSVDShaperDigits')
35 
36 
37 main = b2.create_path()
38 
39 main.add_module(eventinfosetter)
40 main.add_module(evtgeninput)
41 add_simulation(main)
42 # add_reconstruction(main)
43 # main.add_module(rootoutput)
44 main.add_module(Packer)
45 main.add_module(unPacker)
46 
47 b2.process(main)