12 """Fully configured _preload test for given menu"""
15 input_file = Input.get_input(
'data').paths[0]
16 first_event = eformat.istream(input_file)[0]
17 run = first_event.run_no()
18 lb = first_event.lumi_block()
22 with suppress(FileNotFoundError):
23 os.remove(
'raw._0001.data')
25 ex_rm = PyStep.PyStep(cleanup)
28 ex_bs = ExecStep.ExecStep(
'create_bs')
31 ex_bs.executable =
'trigbs_modifyEvent.py'
32 ex_bs.args =
'-n 50 --runNumber 999999 --incLB 6 --firstLB 4 --eventsPerLB=3 -o raw %s' % input_file
35 ex_dump = ExecStep.ExecStep(
'dump-config')
36 ex_dump.type =
'athenaHLT'
37 ex_dump.job_options =
'TriggerJobOpts.runHLT'
38 ex_dump.input =
'data'
39 ex_dump.args =
'-M --dump-config-exit'
40 ex_dump.args += f
' -C "from TriggerJobOpts import PostExec; PostExec.forceConditions({run},{lb})"'
41 ex_dump.flags = [f
'Trigger.triggerMenuSetup="{menu}"',
42 'Trigger.doLVL1=True']
43 ex_dump.perfmon =
False
49 with open(
'HLTJobOptions.json')
as f:
52 cfg[
'properties'][
'IOVDbSvc'][
'Folders'] = cfg[
'properties'][
'IOVDbSvc'][
'Folders'].
replace(
53 '/TRIGGER/HLT/PrescaleKey',f
'/TRIGGER/HLT/PrescaleKey<forceRunNumber>{run}</forceRunNumber>')
55 with open(
'HLTJobOptions.fixPS.json',
'w')
as f:
58 ex_fix = PyStep.PyStep(fix_json)
61 ex = ExecStep.ExecStep(
'athenaHLT')
63 ex.executable =
'athenaHLT.py'
65 ex.explicit_input =
True
66 ex.args =
'-M -f ./raw._0001.data'
67 ex.args +=
' -R 999999 -L 999 --sor-time=now --detector-mask=all'
68 ex.args +=
' --imf --threads=1 --concurrent-events=1 --nprocs=1'
69 ex.args +=
' HLTJobOptions.fixPS.json'
74 test.art_type =
'build'
75 test.exec_steps = [ex_rm, ex_bs, ex_dump, ex_fix, ex]
76 test.check_steps = TrigP1TestSteps.default_check_steps_OHMon(test,
'r0000999999_athenaHLT_HLT-Histogramming.root:run_999999/lb_-1')