Belle II Software  release-05-01-25
DQMHistAnalyserCheckRefHistoFile.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 import basf2 as b2
5 import sys
6 argv = sys.argv
7 
8 # Set the log level to show only error and fatal messages
9 b2.set_log_level(b2.LogLevel.ERROR)
10 b2.set_log_level(b2.LogLevel.INFO)
11 # set_log_level(LogLevel.DEBUG)
12 
13 # Create main path
14 main = b2.create_path()
15 
16 # Modules
17 input = b2.register_module('DQMHistAnalysisInput')
18 input.param('HistMemoryPath', argv[1])
19 input.param('AutoCanvas', False)
20 main.add_module(input)
21 
22 checker = b2.register_module('DQMHistComparitor')
23 checker.param('HistoList', [
24  ['FirstDet/h_HitXPositionCh01', 'ref/FirstDet/h_HitXPositionCh01', 'xdet/test1', '100', '0.9', '0.6', 'test1'],
25  ['FirstDet/h_HitYPositionCh01', 'ref/FirstDet/h_HitYPositionCh01', 'ydet/test2', '100', '0.9', '0.6', 'test2'],
26  ['SecondDet/h_HitCh01', 'ref/SecondDet/h_HitCh01', 'test3', '100', '0.9', '0.6', 'test3']
27 ]
28 )
29 main.add_module(checker)
30 
31 
32 output = b2.register_module('DQMHistAnalysisOutputRelayMsg')
33 # check that port fit your root canvas server
34 output.param('Port', 9192)
35 main.add_module(output)
36 
37 # Process all events
38 b2.process(main)