Belle II Software  release-06-01-15
TrackingDQM.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 
22 
23 import basf2 as b2
24 import tracking as trk
25 import rawdata as raw
26 import daqdqm.commondqm as cdqm
27 import sys
28 
29 # main
30 main = b2.create_path()
31 
32 # read input rootfile
33 # -> can be overwritten with the -i option
34 main.add_module("RootInput")
35 
36 # register the HistoManager and specify output file
37 main.add_module("HistoManager", histoFileName="TrackingDQM_e" + str(sys.argv[1]) + "r" + str(sys.argv[2]) + ".root")
38 
39 # nee to know geometry to create histograms
40 main.add_module('Gearbox')
41 main.add_module('Geometry')
42 
43 # unpack
44 raw.add_unpackers(main, components=['PXD', 'SVD', 'CDC'])
45 
46 trk.add_tracking_reconstruction(main, components=['PXD', 'SVD', 'CDC'])
47 
48 # add DQM - official way
49 # cdqm.add_common_dqm(main,components=['SVD'], dqm_environment=sys.argv[4])
50 
51 # add DQM - test both modules at once
52 main.add_module('TrackingHLTDQM')
53 main.add_module('TrackingExpressRecoDQM')
54 
55 # == Show progress
56 main.add_module('Progress')
57 
58 b2.print_path(main)
59 
60 # Process events
61 b2.process(main)
62 
63 print(b2.statistics)