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