Belle II Software  release-08-01-10
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 # main.add_module("DQMHistAutoCanvas") # Plot all Histo from Input not needed
34 
35 # add DQM analysis module
36 mirabelle = b2.register_module('DQMHistAnalysisMiraBelle')
37 main.add_module(mirabelle)
38 
39 # output created MonitoringObject to the root file
40 outroot = b2.register_module('DQMHistAnalysisOutputMonObj')
41 outroot.param('ProcID', 'online') # set processing ID
42 main.add_module(outroot)
43 
44 
45 b2.print_path(main)
46 # Process all events
47 b2.process(main)