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