ATLAS Offline Software
Loading...
Searching...
No Matches
RunWorkflowTests_Run4.py
Go to the documentation of this file.
1#!/usr/bin/env python
2# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
4from sys import exit
5
6from WorkflowTestRunner.ScriptUtils import setup_logger, setup_parser, get_test_setup, \
7 run_tests, run_checks, run_summary
8from WorkflowTestRunner.StandardTests import DerivationTest, GenerationTest, PileUpTest, QTest, SimulationTest
9from WorkflowTestRunner.Test import WorkflowRun, WorkflowType
10from AthenaConfiguration.TestDefaults import defaultGeometryTags, defaultConditionsTags
11
12def main():
13 name = "RunUpgradeTests"
14 run = WorkflowRun.Run4
15
16 # Setup the environment
17 log = setup_logger(name)
18 parser = setup_parser()
19 options = parser.parse_args()
20 setup = get_test_setup(name, options, log)
21
22 # Define which tests to run
23 tests_to_run = []
24 if options.generation:
25 dsid = "421356" if not options.dsid else options.dsid
26 if "inputEVNT_PreFile" in options.extra_args:
27 tests_to_run.append(GenerationTest(f"gen{dsid}", run, WorkflowType.Generation, ["afterburn"], setup, options.extra_args))
28 else:
29 tests_to_run.append(GenerationTest(f"gen{dsid}", run, WorkflowType.Generation, ["generate"], setup, options.extra_args))
30 elif options.simulation:
31 tests_to_run.append(SimulationTest("s3761", run, WorkflowType.FullSim, ["EVNTtoHITS"], setup, f"--geometryVersion {defaultGeometryTags.RUN4} --conditionsTag default:{defaultConditionsTags.RUN4_MC} {options.extra_args}") )
32 elif options.overlay:
33 log.error("Overlay not supported yet")
34 exit(1)
35 elif options.pileup:
36 if setup.parallel_execution:
37 log.error("Parallel execution not supported for pile-up workflow")
38 exit(1)
39 if not options.workflow or options.workflow is WorkflowType.PileUpPresampling:
40 tests_to_run.append(PileUpTest("d1920", run, WorkflowType.PileUpPresampling, ["HITtoRDO"], setup, f"--geometryVersion {defaultGeometryTags.RUN4} --conditionsTag default:{defaultConditionsTags.RUN4_MC} {options.extra_args} --digiSteeringConf StandardInTimeOnlyTruth"))
41 if not options.workflow or options.workflow is WorkflowType.MCPileUpReco:
42 tests_to_run.append(QTest("q456", run, WorkflowType.MCPileUpReco, ["Overlay", "RAWtoALL"], setup, options.extra_args))
43 elif options.reco:
44 tests_to_run.append(QTest("q447", run, WorkflowType.MCReco, ["HITtoRDO", "RDOtoRDOTrigger", "RAWtoALL"], setup, f"--geometryVersion {defaultGeometryTags.RUN4} --conditionsTag default:{defaultConditionsTags.RUN4_MC} --steering doRDO_TRIG {options.extra_args}"))
45 elif options.derivation:
46 test_id = "MC_PHYS" if not options.ami_tag else options.ami_tag
47 test_id = f"{test_id}_{run.value}"
48 tests_to_run.append(DerivationTest(test_id, run, WorkflowType.Derivation, ["Derivation"], setup, options.extra_args))
49 else:
50 if setup.parallel_execution:
51 log.error("Parallel execution not supported for the default Phase-II workflow")
52 exit(1)
53 tests_to_run.append(SimulationTest("s3761", run, WorkflowType.FullSim, ["EVNTtoHITS"], setup, f"--geometryVersion {defaultGeometryTags.RUN4} {options.extra_args}"))
54 tests_to_run.append(QTest("q447", run, WorkflowType.MCReco, ["HITtoRDO", "RAWtoALL"], setup, f"--geometryVersion {defaultGeometryTags.RUN4} --inputHITSFile ../run_s3761/myHITS.pool.root {options.extra_args}"))
55
56 # Define which perfomance checks to run
57 # TODO: standard performance checks do not work, disable for now
58 # performance_checks = get_standard_performance_checks(setup)
59 performance_checks = []
60
61 # Define and run jobs
62 run_tests(setup, tests_to_run)
63
64 # Run post-processing checks
65 all_passed = run_checks(setup, tests_to_run, performance_checks)
66
67 # final report
68 run_summary(setup, tests_to_run, all_passed)
69
70
71if __name__ == "__main__":
72 main()
void run_tests()