Belle II Software  release-06-02-00
mumu_monitor_test.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 
14 import sys
15 argv = sys.argv
16 
17 
18 # Set the log level to show only error and fatal messages
19 # set_log_level(LogLevel.ERROR)
20 b2.set_log_level(b2.LogLevel.INFO)
21 # set_log_level(LogLevel.DEBUG)
22 # set_debug_level(1000)
23 
24 # Create main path
25 main = b2.create_path()
26 
27 # Modules
28 
29 # input root file with DQM histograms
30 inroot = b2.register_module('DQMHistAnalysisInputRootFile')
31 inroot.param('InputRootFile', sys.argv[1])
32 main.add_module(inroot)
33 
34 # add DQM analysis module
35 mirabelle = b2.register_module('DQMHistAnalysisMiraBelle')
36 main.add_module(mirabelle)
37 
38 # output created MonitoringObject to the root file
39 outroot = b2.register_module('DQMHistAnalysisOutputMonObj')
40 outroot.param('ProcID', 'online') # set processing ID
41 main.add_module(outroot)
42 
43 
44 b2.print_path(main)
45 # Process all events
46 b2.process(main)