Belle II Software  release-08-01-10
trggdl.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 import os
14 
15 # ...suppress messages and warnings during processing...
16 b2.set_log_level(b2.LogLevel.ERROR)
17 b2.set_random_seed(0)
18 
19 # ...Register modules...
20 eventinfosetter = b2.register_module('EventInfoSetter')
21 gdltrg = b2.register_module('TRGGDL')
22 
23 # ...EventInfoSetter...
24 eventinfosetter.param({'evtNumList': [5], 'runList': [1]})
25 
26 # ...EventInfoSetter...
27 gdltrg.param('DebugLevel', 1)
28 gdltrg.param('ConfigFile',
29  os.path.join(os.environ['BELLE2_LOCAL_DIR'],
30  "trg/gdl/data/ftd/0.01/ftd_0.01"))
31 
32 # ...Create paths...
33 main = b2.create_path()
34 
35 # ...Add modules to paths...
36 main.add_module(eventinfosetter)
37 main.add_module(gdltrg)
38 
39 # ...Process events...
40 b2.process(main)
41 
42 # ...Print call statistics...
43 print(b2.statistics)