Belle II Software development
trackingAbort.py
1# !/usr/bin/env python3
2# -*- coding: utf-8 -*-
3
4
11
12import basf2 as b2
13import sys
14
15mypath = b2.Path()
16inputFile = sys.argv[1]
17outputFile = sys.argv[2]
18
19
20inroot = b2.register_module('DQMHistAnalysisInputRootFile')
21inroot.set_log_level(b2.LogLevel.DEBUG)
22inroot.param('FileList', [inputFile])
23inroot.param('EventInterval', 0)
24inroot.param('EventsList', 0)
25inroot.param('Experiment', 33)
26inroot.param('RunType', 'null')
27mypath.add_module(inroot)
28
29'''
30inroot = b2.register_module('DQMHistAnalysisInput2')
31inroot.param('HistMemoryPath', inputFile)
32mypath.add_module(inroot)
33'''
34dqm = b2.register_module('DQMHistAnalysisTrackingAbort')
35dqm.set_log_level(b2.LogLevel.INFO)
36dqm.param("printCanvas", True)
37mypath.add_module(dqm)
38
39mypath.add_module('DQMHistAnalysisTrackingHLT')
40
41outroot = b2.register_module('DQMHistAnalysisOutputFile')
42outroot.param('SaveHistos', True)
43outroot.param('SaveCanvases', True)
44# outroot.param('HistoFile', outputFile)
45outroot.param('Filename', outputFile)
46outroot.param('OutputFolder', '.')
47mypath.add_module(outroot)
48
49# Process the events
50b2.print_path(mypath)
51b2.process(mypath)
52
53# print out the summary
54print(b2.statistics)