Belle II Software light-2406-ragdoll
test_beamspot_and_ip_variables.py
1#!/usr/bin/env python3
2
3
10
11import basf2 as b2
12import modularAnalysis as ma
13import b2test_utils as b2tu
14
15
16def check_file(input_file_name):
17 """Run the check with a quick basf2 printout for the
18 first event in ``input_file_name`` on the validation server"""
19 input_file = b2tu.require_file(input_file_name, 'validation')
20 pa = b2.Path()
21 ma.inputMdst(input_file, path=pa)
22 ma.printVariableValues(
23 "", ["IPX", "IPY", "IPZ", "genIPX", "genIPY", "genIPZ"], path=pa)
24 b2tu.safe_process(pa, 1)
25
26
27if __name__ == "__main__":
28 b2.set_random_seed(":-)")
29 b2tu.configure_logging_for_tests()
30 check_file("mdst14.root")
31 # TODO: update this to check a data event when a suitable file is added