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