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