Belle II Software development
DQMHistAnalyserCheckRefHistoFile.py
1#!/usr/bin/env python3
2
3
10
11import basf2 as b2
12import sys
13argv = sys.argv
14
15# Set the log level to show only error and fatal messages
16b2.set_log_level(b2.LogLevel.ERROR)
17b2.set_log_level(b2.LogLevel.INFO)
18# set_log_level(LogLevel.DEBUG)
19
20# Create main path
21main = b2.create_path()
22
23# Modules
24input = b2.register_module('DQMHistAnalysisInput')
25input.param('HistMemoryPath', argv[1])
26main.add_module(input)
27main.add_module("DQMHistAutoCanvas") # Plot all Histo from Input
28
29checker = b2.register_module('DQMHistComparitor')
30checker.param('HistoList', [
31 ['FirstDet/h_HitXPositionCh01', 'ref/FirstDet/h_HitXPositionCh01', 'xdet/test1', '100', '0.9', '0.6', 'test1'],
32 ['FirstDet/h_HitYPositionCh01', 'ref/FirstDet/h_HitYPositionCh01', 'ydet/test2', '100', '0.9', '0.6', 'test2'],
33 ['SecondDet/h_HitCh01', 'ref/SecondDet/h_HitCh01', 'test3', '100', '0.9', '0.6', 'test3']
34]
35)
36main.add_module(checker)
37
38
39output = b2.register_module('DQMHistAnalysisOutputRelayMsg')
40# check that port fit your root canvas server
41output.param('Port', 9192)
42main.add_module(output)
43
44# Process all events
45b2.process(main)