Belle II Software development
check_hlt_path.py
1
8
9'''
10Check if the path returned by the relevant HLT functions is changed. The test fails if:
11- a new module is added to the path
12- a new parameter is added to a module
13- the default value of a parameter is modified
14If the test fails, it's enough to reproduce the logfile and commit it.
15'''
16
17import basf2 as b2
18import b2test_utils as b2tu
19from softwaretrigger import constants
20from softwaretrigger.processing import add_hlt_processing, add_hlt_passthrough
21
22
23b2tu.configure_logging_for_tests()
24
25# This checks the path used by beam_reco_monitor
26b2.B2INFO('basf2 path for beam_reco_monitor:')
27main_monitor = b2.Path()
28add_hlt_processing(main_monitor, run_type=constants.RunTypes.beam,
29 softwaretrigger_mode=constants.SoftwareTriggerModes.monitor)
30b2.print_path(path=main_monitor, defaults=True)
31
32# This checks the path used by beam_reco_filter
33b2.B2INFO('basf2 path for beam_reco_filter:')
34main_filter = b2.Path()
35add_hlt_processing(main_filter, run_type=constants.RunTypes.beam,
36 softwaretrigger_mode=constants.SoftwareTriggerModes.filter)
37b2.print_path(path=main_filter, defaults=True)
38
39# This checks the path used by passthrough
40b2.B2INFO('basf2 path for passthrough:')
41main_pass = b2.Path()
42add_hlt_passthrough(main_pass)
43b2.print_path(path=main_pass)