Belle II Software development
dqm_ipmon_test.py
1#!/usr/bin/env python3
2
3
10
11
12import basf2 as b2
13import b2test_utils as b2tu
14
15with b2tu.clean_working_directory():
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 b2.set_log_level(b2.LogLevel.DEBUG)
20 b2.set_debug_level(20)
21
22 configs = [b2.find_file("dqm/tests/ipmon.json")]
23
24 # Create main path
25 main = b2.create_path()
26
27 # Modules
28 main.add_module('DQMHistAnalysisEpicsEnable') # enable EPICS output
29 main.add_module('DQMHistAnalysisInputTest', Events=30, ConfigFiles=configs)
30 main.add_module(
31 'DQMHistAnalysisPeak',
32 HistoDirectory="test",
33 HistoName="ip_x",
34 MonitorObjectName="ip",
35 MonitorPrefix="ip",
36 PVName="TEST:IP:X:")
37 main.add_module(
38 'DQMHistAnalysisPeak',
39 HistoDirectory="test",
40 HistoName="ip_y",
41 MonitorObjectName="ip",
42 MonitorPrefix="ip",
43 PVName="TEST:IP:Y:")
44 main.add_module(
45 'DQMHistAnalysisPeak',
46 HistoDirectory="test",
47 HistoName="ip_z",
48 MonitorObjectName="ip",
49 MonitorPrefix="ip",
50 PVName="TEST:IP:Z:")
51 main.add_module('DQMHistAnalysisEpicsOutput') # flush EPICS output
52
53 # Process all events
54 b2.process(main)