Belle II Software development
assert_correct_modules_on_hlt.py
1
8
9# Test for some modules in the current HLT reconstruction path
10
11import basf2
12from softwaretrigger.processing import add_hlt_processing
13
14from softwaretrigger.constants import SoftwareTriggerModes, RunTypes
15
16
17def yield_module_names(path):
18 for m in path.modules():
19 yield m.name()
20 for sub_path in m.get_all_condition_paths():
21 yield from yield_module_names(sub_path)
22
23
24if __name__ == "__main__":
25 path = basf2.create_path()
26 add_hlt_processing(path, run_type=RunTypes.beam, softwaretrigger_mode=SoftwareTriggerModes.filter)
27
28 module_names = list(yield_module_names(path))
29 assert "SoftwareTriggerHLTDQM" in module_names
30 assert "SoftwareTrigger" in module_names
31 assert "Geometry" in module_names
32 assert "Gearbox" in module_names
33 assert "HistoManager" not in module_names