12import modularAnalysis
as ma
13import b2test_utils
as b2tu
17 (
"software_trigger_cut&filter&1_Estargt1_GeV_cluster_no_other_cluster_Estargt0.3_GeV",
18 "filter 1_Estargt1_GeV_cluster_no_other_cluster_Estargt0.3_GeV"),
19 (
"INVALID_INPUT",
"this is not a valid trigger identifier")
23def check_file(input_file_name, trigger_variables):
24 """Run the check with a quick basf2 printout for the
25 first event in ``input_file_name`` on the validation server
"""
26 input_file = b2tu.require_file(input_file_name, 'validation')
28 ma.inputMdst(input_file, path=pa)
29 ma.printVariableValues(
"", trigger_variables, path=pa)
30 b2tu.safe_process(pa, 1)
34 """Make the string form variable name"""
35 return f
"SoftwareTriggerResult({name})"
39 """Make the string form prescale variable name"""
40 return f
"SoftwareTriggerPrescaling({name})"
43if __name__ ==
"__main__":
46 trigger_variables = [f(lng)
for lng, _
in triggers_to_test
for f
in (swtr, swtp)]
47 trigger_variables += [f(shrt)
for _, shrt
in triggers_to_test
for f
in (swtr, swtp)]
50 b2.set_random_seed(
r"\m/")
51 b2tu.configure_logging_for_tests()
52 check_file(
"mdst16.root", trigger_variables)