Belle II Software  release-08-01-10
dqm_ipmon_test.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 
13 import basf2 as b2
14 import b2test_utils as b2tu
15 
16 with b2tu.clean_working_directory():
17  # Set the log level to show only error and fatal messages
18  # b2.set_log_level(b2.LogLevel.ERROR)
19  # b2.set_log_level(b2.LogLevel.INFO)
20  b2.set_log_level(b2.LogLevel.DEBUG)
21  b2.set_debug_level(20)
22 
23  configs = [b2.find_file("dqm/tests/ipmon.json")]
24 
25  # Create main path
26  main = b2.create_path()
27 
28  # Modules
29  main.add_module('DQMHistAnalysisEpicsEnable') # enable EPICS output
30  main.add_module('DQMHistAnalysisInputTest', Events=30, ConfigFiles=configs)
31  main.add_module('DQMHistAnalysisIP', HistoDirectory="test", HistoName="ip_x", MonitorPrefix="ip", PVName="TEST:IP:X:")
32  main.add_module('DQMHistAnalysisIP', HistoDirectory="test", HistoName="ip_y", MonitorPrefix="ip", PVName="TEST:IP:Y:")
33  main.add_module('DQMHistAnalysisIP', HistoDirectory="test", HistoName="ip_z", MonitorPrefix="ip", PVName="TEST:IP:Z:")
34  main.add_module('DQMHistAnalysisEpicsOutput') # flush EPICS output
35 
36  # Process all events
37  b2.process(main)