From cf198778e0adee9e1ff724d3bcd5c862877d3d01 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Wed, 15 Jan 2020 17:54:35 +0000
Subject: [PATCH] Move central MT trigger configuration from TrigUpgradeTest to
 TriggerJobOpts

---
 .../RegSelSvcTest/share/testRegSelSvc.py      |   4 +-
 .../TrigTransform/scripts/TrigMT_reco_tf.py   |   2 +-
 .../TrigTransform/scripts/Trig_reco_tf.py     |   2 +-
 .../TrigEFMissingET/doc/METMenuSequences.md   |   4 +-
 .../share/test_ROBRequestAlgo.py              |   2 +-
 .../share/testDataAccessService.py            |   6 +-
 .../L1Decoder/share/testL1Decoder.py          |   4 +-
 .../test/test_trigP1_EmptyMenu_build.py       |   2 +-
 .../test_trigP1_EmptyMenu_forkAndMT_build.py  |   2 +-
 .../test_trigP1_FullMenu_ROSRate_build.py     |   2 +-
 .../test/test_trigP1_FullMenu_build.py        |   2 +-
 .../test_trigP1_FullMenu_decodeBS_build.py    |   2 +-
 .../test_trigP1_FullMenu_decodeBS_grid.py     |   2 +-
 .../test/test_trigP1_FullMenu_fork_build.py   |   2 +-
 .../test/test_trigP1_FullMenu_grid.py         |   2 +-
 .../test_trigP1_FullMenu_preloadTest_build.py |   2 +-
 .../test/test_trigP1_SliceJet_fork_build.py   |   2 +-
 .../test/test_trigP1_v1Cosmic_ID_build.py     |   2 +-
 .../test/test_trigP1_v1Cosmic_build.py        |   2 +-
 .../test/test_trigP1_v1Cosmic_muons_build.py  |   2 +-
 ...st_trigP1_v1Dev_configConsistency_build.py |   2 +-
 .../test/test_trigP1_v1PhysP1_T0Mon_build.py  |   2 +-
 .../test/test_trigP1_v1PhysP1_T0Mon_grid.py   |   2 +-
 .../test/test_trigP1_v1PhysP1_build.py        |   2 +-
 .../test/test_trigP1_v1PhysP1_grid.py         |   2 +-
 .../test/test_trigP1_v1Phys_ROSRate_build.py  |   2 +-
 .../TrigUpgradeTest/share/Calo.py             |   8 +-
 .../TrigUpgradeTest/share/CaloRinger.py       |   7 +-
 .../TrigUpgradeTest/share/IDCalo.py           |   6 +-
 .../TrigUpgradeTest/share/MinBias.py          |   6 +-
 .../TrigUpgradeTest/share/PEBDSTest.py        |   4 +-
 .../TrigUpgradeTest/share/egammaRinger.py     |   4 +-
 .../TrigUpgradeTest/share/full_menu.py        |  83 --
 .../TrigUpgradeTest/share/full_menu_cf.py     |   6 +-
 .../TrigUpgradeTest/share/photon.withViews.py |   6 +-
 .../TrigUpgradeTest/share/simpleJetJob.py     |   7 +-
 .../TrigUpgradeTest/share/testHLT_MT.py       | 572 ----------
 .../test/test_trigUpgr_decodeBS_build.py      |   2 +-
 .../test/test_trigUpgr_empty_menu_build.sh    |   2 +-
 .../test/test_trigUpgr_empty_menu_mc_build.sh |   2 +-
 .../test/test_trigUpgr_full_menu_build.sh     |   2 +-
 .../test_trigUpgr_full_menu_deps_build.py     |   2 +-
 .../test/test_trigUpgr_full_menu_grid.sh      |   2 +-
 .../test/test_trigUpgr_full_menu_mc_build.sh  |   2 +-
 .../test/test_trigUpgr_full_menu_mc_grid.sh   |   2 +-
 .../test_trigUpgr_full_menu_reverse_build.sh  |   2 +-
 .../test/test_trigUpgr_py_full_menu_build.py  |   2 +-
 .../test/test_trigUpgr_slice_bjet_build.sh    |   2 +-
 .../test_trigUpgr_slice_bphysics_build.sh     |   2 +-
 .../test/test_trigUpgr_slice_egamma_build.sh  |   2 +-
 .../test/test_trigUpgr_slice_jet_build.sh     |   2 +-
 .../test/test_trigUpgr_slice_met_build.sh     |   2 +-
 .../test/test_trigUpgr_slice_met_mc_build.sh  |   2 +-
 .../test/test_trigUpgr_slice_minbias_build.sh |   2 +-
 .../test/test_trigUpgr_slice_mu_build.sh      |   2 +-
 .../test/test_trigUpgr_slice_mu_mc_build.sh   |   2 +-
 .../test/test_trigUpgr_slice_mu_mc_grid.sh    |   2 +-
 .../test/test_trigUpgr_slice_tau_build.sh     |   2 +-
 .../share/testAthenaTrigRDO_standalone.py     |   2 +-
 .../exec_athena_art_trigger_validation.sh     |   2 +-
 .../test/test_trig_data_v1Cosmic_build.py     |   2 +-
 .../test/test_trig_data_v1Cosmic_grid.py      |   2 +-
 .../test/test_trig_data_v1Dev_build.py        |   2 +-
 .../test/test_trig_data_v1Dev_grid.py         |   2 +-
 .../test_trig_data_v1Dev_writeBS_build.py     |   2 +-
 .../test/test_trig_data_v1Dev_writeBS_grid.py |   2 +-
 .../test/test_trig_mc_v1Dev_build.py          |   2 +-
 .../test/test_trig_mc_v1Dev_grid.py           |   2 +-
 .../test_trig_mc_v1Dev_slice_bjet_build.py    |   2 +-
 .../test_trig_mc_v1Dev_slice_bjet_grid.py     |   2 +-
 ...test_trig_mc_v1Dev_slice_bphysics_build.py |   2 +-
 .../test_trig_mc_v1Dev_slice_bphysics_grid.py |   2 +-
 ...t_trig_mc_v1Dev_slice_bphysicsexo_build.py |   2 +-
 ...st_trig_mc_v1Dev_slice_bphysicsexo_grid.py |   2 +-
 .../test_trig_mc_v1Dev_slice_egamma_build.py  |   2 +-
 .../test_trig_mc_v1Dev_slice_egamma_grid.py   |   2 +-
 .../test_trig_mc_v1Dev_slice_jet_build.py     |   2 +-
 .../test/test_trig_mc_v1Dev_slice_jet_grid.py |   2 +-
 .../test_trig_mc_v1Dev_slice_met_build.py     |   2 +-
 .../test/test_trig_mc_v1Dev_slice_met_grid.py |   2 +-
 .../test_trig_mc_v1Dev_slice_muon_build.py    |   2 +-
 .../test_trig_mc_v1Dev_slice_muon_grid.py     |   2 +-
 ...ig_mc_v1Dev_slice_reproducibility_build.py |   2 +-
 .../test_trig_mc_v1Dev_slice_tau_build.py     |   2 +-
 .../test/test_trig_mc_v1Dev_slice_tau_grid.py |   2 +-
 .../test/test_trig_mc_v1Dev_writeBS_build.py  |   2 +-
 .../test/test_trig_mc_v1Dev_writeBS_grid.py   |   2 +-
 .../test/test_trig_mc_v1MC_build.py           |   2 +-
 .../test/test_trig_mc_v1MC_grid.py            |   2 +-
 .../test/test_trig_mc_v1PhysP1_build.py       |   2 +-
 .../test/test_trig_mc_v1PhysP1_grid.py        |   2 +-
 .../test/test_trig_mc_v1Phys_build.py         |   2 +-
 .../test/test_trig_mc_v1Phys_grid.py          |   2 +-
 .../TriggerJobOpts/share/runHLT_standalone.py | 988 +++++++++---------
 .../share/runHLT_standalone_run2.py           | 563 ++++++++++
 .../TriggerMenuMT/scripts/generateMenuMT.py   |   6 +-
 .../TriggerMenuMT/share/generateMT.py         |   6 +-
 97 files changed, 1217 insertions(+), 1229 deletions(-)
 delete mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/full_menu.py
 delete mode 100644 Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
 mode change 100755 => 100644 Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
 create mode 100755 Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_run2.py

diff --git a/DetectorDescription/RegSelSvcTest/share/testRegSelSvc.py b/DetectorDescription/RegSelSvcTest/share/testRegSelSvc.py
index 38e13464423..129a336f680 100644
--- a/DetectorDescription/RegSelSvcTest/share/testRegSelSvc.py
+++ b/DetectorDescription/RegSelSvcTest/share/testRegSelSvc.py
@@ -2,7 +2,9 @@
 # please import configurables yourself instead.
 
 doEmptyMenu = True
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 from RegSelSvcTest.RegSelSvcTestConf import RegSelTestAlg
 from AthenaCommon.AppMgr import athAlgSeq
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/scripts/TrigMT_reco_tf.py b/HLT/Trigger/TrigTransforms/TrigTransform/scripts/TrigMT_reco_tf.py
index 188330c12d3..b56ad6eae7b 100755
--- a/HLT/Trigger/TrigTransforms/TrigTransform/scripts/TrigMT_reco_tf.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/scripts/TrigMT_reco_tf.py
@@ -46,7 +46,7 @@ def getTransform():
     #BSRDOtoRAW is new option for trigger transform
     #runs primarily using athenaHLT
     #literalRunargs used for when running with athena
-    executorSet.add(trigRecoExecutor(name = 'BSRDOtoRAW', skeletonFile = 'TrigUpgradeTest/full_menu.py',
+    executorSet.add(trigRecoExecutor(name = 'BSRDOtoRAW', skeletonFile = 'TriggerJobOpts/runHLT_standalone.py',
                                      exe = 'athenaHLT.py',
                                      substep = 'b2r', tryDropAndReload = False,
                                      inData = ['BS_RDO', 'RDO'], outData = ['BS', 'HIST_HLTMON','HIST_DEBUGSTREAMMON'], 
diff --git a/HLT/Trigger/TrigTransforms/TrigTransform/scripts/Trig_reco_tf.py b/HLT/Trigger/TrigTransforms/TrigTransform/scripts/Trig_reco_tf.py
index fd14361b9e7..2793b4d5cf7 100755
--- a/HLT/Trigger/TrigTransforms/TrigTransform/scripts/Trig_reco_tf.py
+++ b/HLT/Trigger/TrigTransforms/TrigTransform/scripts/Trig_reco_tf.py
@@ -46,7 +46,7 @@ def getTransform():
     #BSRDOtoRAW is new option for trigger transform
     #runs primarily using athenaHLT
     #literalRunargs used for when running with athena
-    executorSet.add(trigRecoExecutor(name = 'BSRDOtoRAW', skeletonFile = 'TrigUpgradeTest/full_menu.py',
+    executorSet.add(trigRecoExecutor(name = 'BSRDOtoRAW', skeletonFile = 'TriggerJobOpts/runHLT_standalone.py',
                                      exe = 'setsid athenaHLT.py', 
                                      # setsid is needed to fix the process-group id of child processes to be the same as mother process; discussed in https://its.cern.ch/jira/browse/ATR-20513 
                                      substep = 'b2r', tryDropAndReload = False,
diff --git a/Trigger/TrigAlgorithms/TrigEFMissingET/doc/METMenuSequences.md b/Trigger/TrigAlgorithms/TrigEFMissingET/doc/METMenuSequences.md
index 85942a71072..54dd7c3d373 100644
--- a/Trigger/TrigAlgorithms/TrigEFMissingET/doc/METMenuSequences.md
+++ b/Trigger/TrigAlgorithms/TrigEFMissingET/doc/METMenuSequences.md
@@ -13,7 +13,7 @@ However the core ideas should still be valid throughout Run-3.
 ## InputMaker, reco, and hypo
 
 ```python
-include("TrigUpgradeTest/testHLT_MT.py")
+include("TriggerJobOpts/runHLT_standalone.py")
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
@@ -52,7 +52,7 @@ topSequence.L1Decoder.Chains="HLTChains"
 
 ```python 
 
-include("TrigUpgradeTest/testHLT_MT.py")
+include("TriggerJobOpts/runHLT_standalone.py")
 
 METalgorithm = "cell" # or tc, mht, pufit
 
diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/share/test_ROBRequestAlgo.py b/Trigger/TrigAlgorithms/TrigGenericAlgs/share/test_ROBRequestAlgo.py
index 8af1890c2c1..1894f05ab96 100644
--- a/Trigger/TrigAlgorithms/TrigGenericAlgs/share/test_ROBRequestAlgo.py
+++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/share/test_ROBRequestAlgo.py
@@ -2,7 +2,7 @@
 # Job options to test ROBRequestAlgo
 #
 
-include('TriggerJobOpts/runHLT_standalone.py')
+include('TriggerJobOpts/runHLT_standalone_run2.py')
 
 from TrigGenericAlgs.test_roblist import robs
 from TrigGenericAlgs.test_rosmap import ros_rob_map
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py
index 8c57957616f..77db9d229e7 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/share/testDataAccessService.py
@@ -1,9 +1,11 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
 doEmptyMenu=True
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/Trigger/TrigSteer/L1Decoder/share/testL1Decoder.py b/Trigger/TrigSteer/L1Decoder/share/testL1Decoder.py
index 680a1363e97..ccab99250e5 100644
--- a/Trigger/TrigSteer/L1Decoder/share/testL1Decoder.py
+++ b/Trigger/TrigSteer/L1Decoder/share/testL1Decoder.py
@@ -1,6 +1,8 @@
 from __future__ import print_function
 
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 
 from AthenaCommon.AlgSequence import AlgSequence
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_build.py
index 0111047bc38..2f5ef52bb2e 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.args = '-c "doEmptyMenu=True;BFieldAutoConfig=False;"'
 
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_forkAndMT_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_forkAndMT_build.py
index 626b31a2407..05063ed8a01 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_forkAndMT_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_EmptyMenu_forkAndMT_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.forks = 2
 ex.threads = 2
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_ROSRate_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_ROSRate_build.py
index 184276e2d64..8e9fce4150d 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_ROSRate_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_ROSRate_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps, Step
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.args = '--ros2rob /cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/ATLASros2rob2018-r22format.py'
 
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_build.py
index 93d7e3d582e..619f76f2645 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 
 test = Test.Test()
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_decodeBS_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_decodeBS_build.py
index 498142b3cf8..5a3ed7f9e5e 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_decodeBS_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_decodeBS_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 writeBS = ExecStep.ExecStep("WriteBS")
 writeBS.type = 'athenaHLT'
-writeBS.job_options = 'TrigUpgradeTest/full_menu.py'
+writeBS.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 writeBS.input = 'data'
 writeBS.args = '-o output'
 
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_decodeBS_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_decodeBS_grid.py
index 1b35b1dd5ca..f5d6d688b32 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_decodeBS_grid.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_decodeBS_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 writeBS = ExecStep.ExecStep("WriteBS")
 writeBS.type = 'athenaHLT'
-writeBS.job_options = 'TrigUpgradeTest/full_menu.py'
+writeBS.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 writeBS.input = 'data'
 writeBS.args = '-o output'
 
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_fork_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_fork_build.py
index b04d72fb4b7..021ac4898f5 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_fork_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_fork_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.forks = 8
 ex.threads = 1
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_grid.py
index bc127599cc5..457d8c0eced 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_grid.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 
 test = Test.Test()
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_preloadTest_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_preloadTest_build.py
index 49854fd6f1a..787be41a0d7 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_preloadTest_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_FullMenu_preloadTest_build.py
@@ -33,7 +33,7 @@ sor = AthHLT.get_sor_params(run)['SORTime']
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = ''
 ex.explicit_input = True
 ex.args = '-f ./raw._0001.data -C "from AthenaCommon.AppMgr import ServiceMgr; ServiceMgr.HltEventLoopMgr.forceRunNumber=%d; ServiceMgr.HltEventLoopMgr.forceStartOfRunTime=%d" -R 999999 --sor-time=now --detector-mask=all' % (run, sor)
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_SliceJet_fork_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_SliceJet_fork_build.py
index 0e05679a248..05a23f9f85f 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_SliceJet_fork_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_SliceJet_fork_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.forks = 2
 ex.threads = 1
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_ID_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_ID_build.py
index d33662915d0..5c414c69d37 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_ID_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_ID_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data_cos_IDCosmic'
 ex.max_events = 100
 ex.args = '-c "setMenu=\'Cosmic_pp_run3_v1\';"'
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_build.py
index 3c25a933877..a3336183cac 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data_cos'
 ex.max_events = 100
 ex.args = '-c "setMenu=\'Cosmic_pp_run3_v1\';"'
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_muons_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_muons_build.py
index 7ead84e0b65..33e493e29b1 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_muons_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Cosmic_muons_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data_cos_CosmicMuons'
 ex.max_events = 100
 ex.args = '-c "setMenu=\'Cosmic_pp_run3_v1\';"'
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_configConsistency_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_configConsistency_build.py
index 4c4f2bcc028..ec2d04de00a 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_configConsistency_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Dev_configConsistency_build.py
@@ -13,7 +13,7 @@ def make_exec_steps(nforks, nthreads, nslots):
     # Step dumping athenaHLT config
     ex = ExecStep.ExecStep('Config.'+id_str)
     ex.type = 'athenaHLT'
-    ex.job_options = 'TrigUpgradeTest/full_menu.py'
+    ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
     ex.input = 'data'
     ex.forks = nforks
     ex.threads = nthreads
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py
index c0f16d24fbc..5196ef7383a 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering.Input import get_input
 # HLT step (BS->BS)
 hlt = ExecStep.ExecStep()
 hlt.type = 'athenaHLT'
-hlt.job_options = 'TrigUpgradeTest/full_menu.py'
+hlt.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 hlt.input = 'data'
 hlt.args = '-c "setMenu=\'PhysicsP1_pp_run3_v1\';"'
 hlt.args += ' -o output'
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py
index 69c2fd169be..152be7838a8 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_T0Mon_grid.py
@@ -19,7 +19,7 @@ from TrigValTools.TrigValSteering.Input import get_input
 # HLT step (BS->BS)
 hlt = ExecStep.ExecStep()
 hlt.type = 'athenaHLT'
-hlt.job_options = 'TrigUpgradeTest/full_menu.py'
+hlt.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 hlt.input = 'data'
 hlt.args = '-c "setMenu=\'PhysicsP1_pp_run3_v1\';"'
 hlt.args += ' -o output'
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_build.py
index 78e7233a7dd..913e30b28de 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.args = '-c "setMenu=\'PhysicsP1_pp_run3_v1\';"'
 
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_grid.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_grid.py
index df94e11dfa7..19eebfc42f1 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_grid.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1PhysP1_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.args = '-c "setMenu=\'PhysicsP1_pp_run3_v1\';"'
 
diff --git a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Phys_ROSRate_build.py b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Phys_ROSRate_build.py
index b27841e7eb0..0498ee8d70a 100755
--- a/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Phys_ROSRate_build.py
+++ b/Trigger/TrigValidation/TrigP1Test/test/test_trigP1_v1Phys_ROSRate_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps, Step
 
 ex = ExecStep.ExecStep()
 ex.type = 'athenaHLT'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.max_events = 200
 ex.args = '-c "setMenu=\'Physics_pp_run3_v1\';"'
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/Calo.py b/Trigger/TrigValidation/TrigUpgradeTest/share/Calo.py
index 3f62d93b723..d6914b2aa65 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/Calo.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/Calo.py
@@ -1,13 +1,15 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
 if not 'doHLTCaloTopo' in dir() :
   doHLTCaloTopo=True
 if not 'doL2Egamma' in dir():
   doL2Egamma=True
-createHLTMenuExternally=True  
-include("TrigUpgradeTest/testHLT_MT.py")
+createHLTMenuExternally=True
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py b/Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py
index 41602cd0881..e91bcdfa326 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/CaloRinger.py
@@ -1,13 +1,14 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
 if not 'doHLTCaloTopo' in dir() :
   doHLTCaloTopo=True
 if not 'doL2Egamma' in dir():
   doL2Egamma=True
-
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py b/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py
index 99221adc7be..61fb3634ee5 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/IDCalo.py
@@ -1,8 +1,10 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/MinBias.py b/Trigger/TrigValidation/TrigUpgradeTest/share/MinBias.py
index 22cdf231f81..f15c8668496 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/MinBias.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/MinBias.py
@@ -1,8 +1,10 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 createHLTMenuExternally=True
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 from TrigUpgradeTest.TestUtils import makeChain
 from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponents import ChainStep
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/PEBDSTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/PEBDSTest.py
index 4b151a272db..b9348ad2204 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/PEBDSTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/PEBDSTest.py
@@ -1,5 +1,5 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
 '''
@@ -147,7 +147,7 @@ TriggerFlags.EgammaSlice.setAll()
 TriggerFlags.MuonSlice.setAll()
 
 # Set up everything to run HLT
-include('TrigUpgradeTest/testHLT_MT.py')
+include('TriggerJobOpts/runHLT_standalone.py')
 
 # Generate the menu
 menu = GenerateMenuMT()
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py
index 98e44982c8e..9db33913147 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egammaRinger.py
@@ -7,7 +7,9 @@ from AthenaCommon.CFElements import seqAND
 from ViewAlgs.ViewAlgsConf import EventViewCreatorAlgorithm
 
 
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 isData = False
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu.py b/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu.py
deleted file mode 100644
index 43e3ba23fd3..00000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-#
-
-##################################################################
-# Pre-setup
-##################################################################
-from AthenaCommon.Logging import logging
-__log = logging.getLogger('full_menu')
-
-##################################################################
-# Include the common configuration
-##################################################################
-include("TrigUpgradeTest/testHLT_MT.py")
-
-##################################################################
-# Generate the menu
-##################################################################
-from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT import GenerateMenuMT
-menu = GenerateMenuMT()
-
-def signaturesToGenerate():
-    TriggerFlags.Slices_all_setOff()
-    for sig in opt.enabledSignatures:
-        eval(sig)    
-        
-menu.overwriteSignaturesWith(signaturesToGenerate)
-allChainConfigs = menu.generateMT()
-
-##########################################
-# Debugging for view cross-dependencies
-##########################################
-if opt.reverseViews or opt.filterViews:
-    from TriggerJobOpts.TriggerConfig import collectViewMakers
-    viewMakers = collectViewMakers( topSequence )
-    theFilter = []
-    if opt.filterViews:
-        theFilter = [ "Cache", "EventInfo", "HLT_EFHistoPrmVtx" ]
-    for alg in viewMakers:
-        alg.ReverseViewsDebug = opt.reverseViews
-        alg.FallThroughFilter = theFilter
-
-##########################################
-# Configure trigger output using parts of the NewJO configuration
-# in a somewhat hacky way
-##########################################
-from TriggerJobOpts.TriggerConfig import collectHypos, collectFilters, collectDecisionObjects, triggerOutputCfg, collectHypoDecisionObjects
-from AthenaCommon.CFElements import findAlgorithm,findSubSequence
-hypos = collectHypos(findSubSequence(topSequence, "HLTAllSteps"))
-filters = collectFilters(findSubSequence(topSequence, "HLTAllSteps"))
-
-# find DecisionSummaryMakerAlg
-summaryMakerAlg = findAlgorithm(topSequence, "DecisionSummaryMakerAlg")
-if not summaryMakerAlg:
-    __log.warning("Failed to find DecisionSummaryMakerAlg")
-
-# try to find L1Decoder
-l1decoder = findAlgorithm(topSequence,'L1Decoder')
-if not l1decoder:
-    l1decoder = findAlgorithm(topSequence,'L1EmulationTest')
-if l1decoder and summaryMakerAlg:
-    decObj = collectDecisionObjects( hypos, filters, l1decoder, summaryMakerAlg )
-    decObjHypoOut = collectHypoDecisionObjects(hypos, inputs=False, outputs=True)
-    __log.debug("Decision Objects to write to output [hack method - should be replaced with triggerRunCfg()]")
-    __log.debug(decObj)
-else:
-    __log.warning("Failed to find L1Decoder or DecisionSummaryMakerAlg, cannot determine Decision names for output configuration")
-    decObj = []
-    decObjHypoOut = []
-
-
-from AthenaConfiguration.AllConfigFlags import ConfigFlags
-from AthenaCommon.Configurable import Configurable
-Configurable.configurableRun3Behavior+=1
-acc, edmSet = triggerOutputCfg(ConfigFlags, decObj, decObjHypoOut, summaryMakerAlg)
-Configurable.configurableRun3Behavior-=1
-acc.appendToGlobals()
-
-##########################################
-# Print top sequence for debugging
-##########################################
-from AthenaCommon.AlgSequence import dumpSequence, AthSequencer
-dumpSequence(topSequence)
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_cf.py b/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_cf.py
index 64379bb207e..33e60eecdb2 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_cf.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/full_menu_cf.py
@@ -1,12 +1,14 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
 from AthenaCommon.Logging import logging
 __log = logging.getLogger('full_menu')
 
 createHLTMenuExternally=True # menu will be build up explicitly here 
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 ##########################################
 # menu
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py
index f0b0bb7d0e9..ae7b2636702 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/photon.withViews.py
@@ -1,8 +1,10 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 testChains = ["HLT_g5_etcut"]
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py b/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py
index d5d763823ef..a1daadf68de 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py
@@ -1,8 +1,9 @@
 #
-#  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
-
-include("TrigUpgradeTest/testHLT_MT.py")
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")
 
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
deleted file mode 100644
index 184e5562a21..00000000000
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py
+++ /dev/null
@@ -1,572 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-################################################################################
-# TrigUpgradeTest/testHLT_MT.py
-#
-#   Job options for trigger MT tests to be used as first include
-#   in signature specific job options. Example:
-#
-#      include('TrigUpgradeTest/testHLT_MT.py')
-#      ... your job options ...
-#
-# Several flags are supported on the command line to steer these job options.
-# See below for a complete list of all flags and their default value. If used
-# in athena.py the auto-configuration is used to setup most flags correctly.
-#
-# Additional "modifiers" can be specified by using
-#   -c "myModifier=True/False"
-# Existing modifiers can be found in "TriggerJobOpts/python/Modifiers.py"
-#
-class opt:
-    setupForMC       = None           # force MC setup
-    setMenu          = 'LS2_v1'
-    setDetDescr      = None           # force geometry tag
-    setGlobalTag     = None           # force global conditions tag
-    useCONDBR2       = True           # if False, use run-1 conditions DB
-    condOverride     = {}             # overwrite conditions folder tags e.g. '{"Folder1":"Tag1", "Folder2":"Tag2"}'
-    doHLT            = True           # run HLT?
-    doID             = True           # TriggerFlags.doID
-    doCalo           = True           # TriggerFlags.doCalo
-    doMuon           = True           # TriggerFlags.doMuon
-    doDBConfig       = None           # dump trigger configuration
-    trigBase         = None           # file name for trigger config dump
-    enableCostD3PD   = False          # enable cost monitoring
-    doWriteRDOTrigger = False         # Write out RDOTrigger?
-    doWriteBS        = True           # Write out BS?
-    doL1Unpacking    = True           # decode L1 data in input file if True, else setup emulation
-    doL1Sim          = False          # (re)run L1 simulation
-    isOnline         = True           # isOnline flag
-    doEmptyMenu      = False          # Disable all chains, except those re-enabled by specific slices
-    createHLTMenuExternally = False   # Set to True if the menu is build manually outside testHLT_MT.py
-    endJobAfterGenerate = False       # Finish job after menu generation
-    failIfNoProxy     = False         # Sets the SGInputLoader.FailIfNoProxy property
-    decodeLegacyL1 = True             # Decode L1 RoIs from legacy L1 systems through RoIBResult for HLT seeding
-    decodePhaseIL1 = False            # Decode L1 RoIs from Run-3 L1 systems through L1TriggerResult for HLT seeding
-#Individual slice flags
-    doEgammaSlice     = True
-    doMuonSlice       = True
-    doMinBiasSlice    = True
-    doJetSlice        = True
-    doMETSlice        = True
-    doBjetSlice       = True
-    doTauSlice        = True
-    doCombinedSlice   = True
-    doBphysicsSlice   = True
-    doStreamingSlice  = True
-    doMonitorSlice    = True
-    doBeamspotSlice   = True
-    reverseViews      = False
-    filterViews       = False
-    enabledSignatures = []
-    disabledSignatures = []
-
-
-#
-################################################################################
-from TriggerJobOpts.TriggerFlags import TriggerFlags
-from AthenaCommon.AppMgr import theApp, ServiceMgr as svcMgr
-from AthenaCommon.Logging import logging
-log = logging.getLogger('testHLT_MT.py')
-
-#-------------------------------------------------------------
-# Setup options
-#-------------------------------------------------------------
-log.info('Setup options:')
-defaultOptions = [a for a in dir(opt) if not a.startswith('__')]
-for option in defaultOptions:
-    if option in globals():
-        setattr(opt, option, globals()[option])
-        print(' %20s = %s' % (option, getattr(opt, option)))
-    else:        
-        print(' %20s = (Default) %s' % (option, getattr(opt, option)))
-
-
-import re
-
-sliceRe = re.compile("^do.*Slice")
-slices = [a for a in dir(opt) if sliceRe.match(a)]
-if opt.doEmptyMenu is True:
-    log.info("Disabling all slices")
-    for s in slices:
-        if s in globals():
-            log.info("re-enabling %s ", s)
-            setattr(opt, s, globals()[s])
-        else:
-            setattr(opt, s, False)
-else:
-    for s in slices:
-        setattr(opt, s, True)
-
-# Setting the TriggerFlags.XXXSlice to use in TriggerMenuMT
-# This is temporary and will be re-worked for after M3.5
-for s in slices:
-    signature = s[2:].replace('Slice', '')
-
-    if eval('opt.'+s) is True:
-        enabledSig = 'TriggerFlags.'+signature+'Slice.setAll()'
-        opt.enabledSignatures.append( enabledSig )
-    else:
-        disabledSig = 'TriggerFlags.'+signature+'Slice.setAll()'
-        opt.disabledSignatures.append( disabledSig )
-
-#-------------------------------------------------------------
-# Setting Global Flags
-#-------------------------------------------------------------
-from AthenaCommon.GlobalFlags import globalflags
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-from AthenaCommon.BeamFlags import jobproperties
-import TriggerJobOpts.Modifiers
-
-# Auto-configuration for athena
-if len(athenaCommonFlags.FilesInput())>0:
-    import PyUtils.AthFile as athFile
-    af = athFile.fopen(athenaCommonFlags.FilesInput()[0])
-    globalflags.InputFormat = 'bytestream' if af.fileinfos['file_type']=='bs' else 'pool'
-    globalflags.DataSource = 'data' if af.fileinfos['evt_type'][0]=='IS_DATA' else 'geant4'
-    # Set isOnline=False for MC inputs unless specified in the options
-    if globalflags.DataSource() != 'data' and 'isOnline' not in globals():
-        log.info("Setting isOnline = False for MC input")
-        opt.isOnline = False
-    # Set geometry and conditions tags
-    if opt.setDetDescr is None:
-        opt.setDetDescr = af.fileinfos.get('geometry',None)
-    if opt.setGlobalTag is None:
-        opt.setGlobalTag = af.fileinfos.get('conditions_tag',None) or \
-            (TriggerFlags.OnlineCondTag() if opt.isOnline else 'CONDBR2-BLKPA-2018-13')
-    TriggerJobOpts.Modifiers._run_number = af.fileinfos['run_number'][0]
-
-else:   # athenaHLT
-    globalflags.InputFormat = 'bytestream'
-    globalflags.DataSource = 'data' if not opt.setupForMC else 'data'
-    if '_run_number' not in dir():
-        import PyUtils.AthFile as athFile
-        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-        af = athFile.fopen(athenaCommonFlags.BSRDOInput()[0])
-        _run_number = af.run_number[0]
-
-    TriggerJobOpts.Modifiers._run_number = _run_number   # noqa, set by athenaHLT
-
-    from RecExConfig.RecFlags import rec
-    rec.RunNumber =_run_number
-    del _run_number
-
-
-# Set final Cond/Geo tag based on input file, command line or default
-globalflags.DetDescrVersion = opt.setDetDescr or TriggerFlags.OnlineGeoTag()
-globalflags.ConditionsTag = opt.setGlobalTag or TriggerFlags.OnlineCondTag()
-
-# Other defaults
-jobproperties.Beam.beamType = 'collisions'
-jobproperties.Beam.bunchSpacing = 25
-globalflags.DatabaseInstance='CONDBR2' if opt.useCONDBR2 else 'COMP200'
-athenaCommonFlags.isOnline.set_Value_and_Lock(opt.isOnline)
-
-log.info('Configured the following global flags:')
-globalflags.print_JobProperties()
-
-# Set default doL1Sim option depending on input type (if not set explicitly)
-if 'doL1Sim' not in globals():
-    opt.doL1Sim = globalflags.DataSource != 'data'
-    log.info('Setting default doL1Sim=%s because globalflags.DataSource=%s', opt.doL1Sim, globalflags.DataSource())
-
-#-------------------------------------------------------------
-# Transfer flags into TriggerFlags
-#-------------------------------------------------------------
-
-# To turn off HLT for athena running
-TriggerFlags.doHLT = bool(opt.doHLT)
-    
-# To extract the Trigger configuration
-TriggerFlags.Online.doDBConfig = bool(opt.doDBConfig)
-if opt.trigBase is not None:
-    TriggerFlags.Online.doDBConfigBaseName = opt.trigBase
-
-# Setup list of modifiers
-# Common modifiers for MC and data
-setModifiers = ['noLArCalibFolders',
-                'ForceMuonDataType',
-                'useNewRPCCabling',
-                'enableCostMonitoring',
-                #'enableCoherentPS',
-                'useOracle',
-                'enableHotIDMasking',
-                'openThresholdRPCCabling',
-]
-
-if globalflags.DataSource.is_geant4():  # MC modifiers
-    setModifiers += ['BFieldFromDCS']
-else:           # More data modifiers
-    setModifiers += ['allowCOOLUpdates',
-                     'BFieldAutoConfig',
-                     'useHLTMuonAlign',
-                     #Check for beamspot quality flag
-                     'UseBeamSpotFlagForBjet',
-                     'UseParamFromDataForBjet',
-                     #Use online luminosity
-                     'useOnlineLumi',
-                     #for running with real data
-                     'DisableMdtT0Fit',
-                     #Setup mufast tuning for data
-                     'UseLUTFromDataForMufast',
-                     'UseRPCTimeDelayFromDataForMufast',
-                     #Set muComb/muIso Backextrapolator tuned for real data
-                     'UseBackExtrapolatorDataForMuIso',
-                     #Monitoring for L1 muon group
-                     #'muCTPicheck',
-                     #Monitoring L1Topo at ROB level
-                     #'L1TopoCheck',
-                     'forceTileRODMap',
-    ]
-
-#make some more common trig cost operations easier to setup
-if opt.enableCostD3PD:
-    enableCostMonitoring = True # This goes without saying!
-    enableCostForCAF = True # This sets the cost mon to monitor every event and always export the data.
-
-
-TriggerFlags.doID = opt.doID
-TriggerFlags.doMuon = opt.doMuon
-TriggerFlags.doCalo = opt.doCalo
-
-#-------------------------------------------------------------
-# Modifiers
-#-------------------------------------------------------------
-modifierList=[]
-from TrigConfigSvc.TrigConfMetaData import TrigConfMetaData
-meta = TrigConfMetaData()
-    
-for mod in dir(TriggerJobOpts.Modifiers):
-    if not hasattr(getattr(TriggerJobOpts.Modifiers,mod),'preSetup'): continue
-    if mod in dir():  #allow turning on and off modifiers by variable of same name
-        if globals()[mod]:
-            if mod not in setModifiers:
-                setModifiers+=[mod]
-        else:
-            if mod in setModifiers: setModifiers.remove(mod)
-    if mod in setModifiers:
-        modifierList+=[getattr(TriggerJobOpts.Modifiers,mod)()]
-        meta.Modifiers += [mod]    # store in trig conf meta data
-        setModifiers.remove(mod)
-
-if setModifiers:
-    log.error('Unknown modifier(s): '+str(setModifiers))
-
-
-# never include this
-include.block("RecExCond/RecExCommon_flags.py")
-
-#-------------------------------------------------------------
-# Setting DetFlags
-#-------------------------------------------------------------
-if globalflags.InputFormat.is_bytestream():
-    TriggerFlags.doLVL1 = False
-
-from AthenaCommon.DetFlags import DetFlags
-if TriggerFlags.doLVL1():
-    DetFlags.detdescr.all_setOn()
-if TriggerFlags.doID():
-    DetFlags.detdescr.ID_setOn()
-    DetFlags.makeRIO.ID_setOn()
-else:
-    DetFlags.ID_setOff()
-if TriggerFlags.doMuon():
-    DetFlags.detdescr.Muon_setOn()
-    DetFlags.makeRIO.all_setOn()
-else:
-    DetFlags.Muon_setOff()
-if TriggerFlags.doCalo():
-    DetFlags.detdescr.Calo_setOn()
-    from LArConditionsCommon.LArCondFlags import larCondFlags
-    larCondFlags.LoadElecCalib.set_Value_and_Lock(False)
-    from TrigT2CaloCommon.CaloDef import setMinimalCaloSetup
-    setMinimalCaloSetup()
-else:
-    DetFlags.Calo_setOff()
-
-DetFlags.Print()
-
-# RecEx flags
-from RecExConfig.RecFlags import rec
-rec.doWriteESD = False
-rec.doWriteAOD = False
-rec.doWriteTAG = False
-rec.doESD = False
-rec.doAOD = False
-rec.doTruth = False
-
-#-------------------------------------------------------------
-# Apply modifiers
-#-------------------------------------------------------------
-for mod in modifierList:
-    mod.preSetup()
-
-#--------------------------------------------------------------
-# Conditions setup.
-#--------------------------------------------------------------
-from IOVDbSvc.CondDB import conddb #This import will also set up CondInputLoader
-conddb.setGlobalTag(globalflags.ConditionsTag())
-
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-#--------------------------------------------------------------
-# Increase scheduler checks and verbosity
-#--------------------------------------------------------------
-from AthenaCommon.AlgScheduler import AlgScheduler
-AlgScheduler.CheckDependencies( True )
-AlgScheduler.ShowControlFlow( True )
-AlgScheduler.ShowDataDependencies( True )
-AlgScheduler.EnableVerboseViews( True )
-
-#--------------------------------------------------------------
-# Set the FailIfNoProxy property of SGInputLoader
-#--------------------------------------------------------------
-if not hasattr(topSequence,"SGInputLoader"):
-    log.error('Cannot set FailIfNoProxy property because SGInputLoader not found in topSequence')
-    theApp.exit(1)
-topSequence.SGInputLoader.FailIfNoProxy = opt.failIfNoProxy
-
-
-#--------------------------------------------------------------
-# Event Info setup
-#--------------------------------------------------------------
-# If no xAOD::EventInfo is found in a POOL file, schedule conversion from old EventInfo
-if globalflags.InputFormat.is_pool():
-    from RecExConfig.ObjKeyStore import objKeyStore
-    from PyUtils.MetaReaderPeeker import convert_itemList
-    objKeyStore.addManyTypesInputFile(convert_itemList(layout='#join'))
-    if ( not objKeyStore.isInInput("xAOD::EventInfo") ) and ( not hasattr(topSequence, "xAODMaker::EventInfoCnvAlg") ):
-        from xAODEventInfoCnv.xAODEventInfoCnvAlgDefault import xAODEventInfoCnvAlgDefault
-        xAODEventInfoCnvAlgDefault(sequence=topSequence)
-
-# ----------------------------------------------------------------
-# Detector geometry 
-# ----------------------------------------------------------------
-# Always enable AtlasFieldSvc
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.BField_setOn()
-include ("RecExCond/AllDet_detDescr.py")
-
-from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
-svcMgr += RegSelSvcDefault()
-
-if TriggerFlags.doID():
-    include( "InDetRecExample/InDetRecCabling.py" )
-
-if TriggerFlags.doCalo():
-    from TrigT2CaloCommon.TrigT2CaloCommonConfig import TrigDataAccess
-    svcMgr.ToolSvc += TrigDataAccess()
-    if globalflags.InputFormat.is_pool():
-        TriggerFlags.doTransientByteStream = True # enable transient BS if TrigDataAccess is used with pool data
-
-if TriggerFlags.doMuon():
-    TriggerFlags.MuonSlice.doTrigMuonConfig=True
-    import MuonCnvExample.MuonCablingConfig  # noqa: F401
-    import MuonRecExample.MuonReadCalib      # noqa: F401
-    if globalflags.InputFormat.is_pool():
-        include( "MuonByteStreamCnvTest/jobOptions_MuonRDOToDigit.py" )
-
-    include ("MuonRecExample/MuonRecLoadTools.py")
-
-# ----------------------------------------------------------------
-# Pool input
-# ----------------------------------------------------------------
-if globalflags.InputFormat.is_pool():
-    import AthenaPoolCnvSvc.ReadAthenaPool   # noqa
-    svcMgr.AthenaPoolCnvSvc.PoolAttributes = [ "DEFAULT_BUFFERSIZE = '2048'" ]
-    svcMgr.PoolSvc.AttemptCatalogPatch=True
-    # enable transient BS 
-    if TriggerFlags.doTransientByteStream():
-        log.info("setting up transient BS")
-        include( "TriggerJobOpts/jobOfragment_TransBS_standalone.py" )
-     
-# ----------------------------------------------------------------
-# ByteStream input
-# ----------------------------------------------------------------
-elif globalflags.InputFormat.is_bytestream():
-
-    # This is only needed running athena (as opposed to athenaHLT)
-    if not hasattr(svcMgr,"ByteStreamCnvSvc"):
-        from ByteStreamCnvSvc import ReadByteStream   # noqa
-        # Define the input
-        svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.FilesInput()
-        theApp.ExtSvc += [ "ByteStreamCnvSvc"]
-
-    # Online specific setup of BS converters
-    include( "TriggerJobOpts/jobOfragment_ReadBS_standalone.py" )    
-
-
-# ---------------------------------------------------------------
-# Trigger config
-# ---------------------------------------------------------------
-TriggerFlags.triggerMenuSetup = opt.setMenu
-TriggerFlags.readLVL1configFromXML = True
-TriggerFlags.outputLVL1configFile = None
-
-from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu
-l1JsonFile = generateL1Menu()
-
-from TrigConfigSvc.TrigConfigSvcCfg import getL1ConfigSvc
-svcMgr += getL1ConfigSvc()
-
-
-# ---------------------------------------------------------------
-# Level 1 simulation
-# ---------------------------------------------------------------
-if opt.doL1Sim:
-    from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationSequence
-    topSequence += Lvl1SimulationSequence()
-
-
-# ---------------------------------------------------------------
-# HLT prep: RoIBResult and L1Decoder
-# ---------------------------------------------------------------
-if opt.doL1Unpacking:
-    if globalflags.InputFormat.is_bytestream():
-        # Create inputs for L1Decoder from ByteStream
-        from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup
-        L1ByteStreamDecodersRecExSetup(
-            enableRun2L1=opt.decodeLegacyL1,
-            enableRun3L1=opt.decodePhaseIL1)
-    if globalflags.InputFormat.is_bytestream() or opt.doL1Sim:
-        from L1Decoder.L1DecoderConfig import L1Decoder
-        l1decoder = L1Decoder("L1Decoder")
-        if not opt.decodeLegacyL1:
-            l1decoder.RoIBResult = ""
-        if not opt.decodePhaseIL1:
-            l1decoder.L1TriggerResult = ""
-        topSequence += l1decoder
-    else:
-        from TrigUpgradeTest.TestUtils import L1EmulationTest
-        topSequence += L1EmulationTest()
-
-
-# ---------------------------------------------------------------
-# HLT generation
-# ---------------------------------------------------------------
-
-if not opt.createHLTMenuExternally:
-
-    from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT import GenerateMenuMT
-    menu = GenerateMenuMT()
-
-    # define the function that enable the signatures
-    def signaturesToGenerate():
-        TriggerFlags.Slices_all_setOff()
-        for sig in opt.enabledSignatures:
-            eval(sig)
-
-    menu.overwriteSignaturesWith(signaturesToGenerate)
-
-    # generating the HLT structure requires 
-    # the L1Decoder to be defined in the topSequence
-    menu.generateMT()
-
-    if opt.endJobAfterGenerate:
-        import sys
-        sys.exit(0)
-
-
-
-from TrigConfigSvc.TrigConfigSvcCfg import getHLTConfigSvc, setupHLTPrescaleCondAlg
-svcMgr += getHLTConfigSvc()
-setupHLTPrescaleCondAlg()
-
-if not opt.createHLTMenuExternally:
-    # the generation of the prescale set file from the menu (with all prescales set to 1)
-    # is not really needed. If no file is provided all chains are either enabled or disabled,
-    # depending on the property L1Decoder.PrescalingTool.KeepUnknownChains being True or False
-    from TrigConfigSvc.TrigConfigSvcCfg import createHLTPrescalesFileFromMenu
-    createHLTPrescalesFileFromMenu()
-
-
-
-# ---------------------------------------------------------------
-# ID conditions
-# ---------------------------------------------------------------
-
-if TriggerFlags.doID:
-    from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
-    InDetTrigFlags.doPixelClusterSplitting = False
-  
-    # PixelLorentzAngleSvc and SCTLorentzAngleSvc
-    from AthenaCommon.Include import include
-    include("InDetRecExample/InDetRecConditionsAccess.py")
-
-
-# ---------------------------------------------------------------
-# Monitoring
-# ---------------------------------------------------------------
-if not hasattr(svcMgr, 'THistSvc'):
-    from GaudiSvc.GaudiSvcConf import THistSvc
-    svcMgr += THistSvc()
-if hasattr(svcMgr.THistSvc, "Output"):
-    from TriggerJobOpts.HLTTriggerGetter import setTHistSvcOutput
-    setTHistSvcOutput(svcMgr.THistSvc.Output)
-
-#-------------------------------------------------------------
-# Apply modifiers
-#-------------------------------------------------------------
-for mod in modifierList:
-    mod.postSetup()
-
-#-------------------------------------------------------------
-# Conditions overrides
-#-------------------------------------------------------------    
-if len(opt.condOverride)>0:
-    for folder,tag in opt.condOverride.iteritems():
-        log.warning('Overriding folder %s with tag %s', folder, tag)
-        conddb.addOverride(folder,tag)
-
-if svcMgr.MessageSvc.OutputLevel<INFO:
-    from AthenaCommon.JobProperties import jobproperties
-    jobproperties.print_JobProperties('tree&value')
-    print(svcMgr)
-
-#-------------------------------------------------------------
-# Use parts of NewJO
-#-------------------------------------------------------------
-from AthenaCommon.Configurable import Configurable
-Configurable.configurableRun3Behavior+=1
-from TriggerJobOpts.TriggerConfig import triggerIDCCacheCreatorsCfg
-from AthenaConfiguration.AllConfigFlags import ConfigFlags
-# Output flags
-isPartition = len(ConfigFlags.Trigger.Online.partitionName) > 0
-if opt.doWriteRDOTrigger:
-    if isPartition:
-        log.error('Cannot use doWriteRDOTrigger in athenaHLT or partition')
-        theApp.exit(1)
-    rec.doWriteRDO = False  # RecExCommon flag
-    ConfigFlags.Output.doWriteRDO = True  # new JO flag
-    ConfigFlags.Output.RDOFileName = 'RDO_TRIG.pool.root'  # new JO flag
-if opt.doWriteBS:
-    rec.doWriteBS = True  # RecExCommon flag
-    TriggerFlags.writeBS = True  # RecExCommon flag
-    ConfigFlags.Output.doWriteBS = True  # new JO flag
-    ConfigFlags.Trigger.writeBS = True  # new JO flag
-
-# ID Cache Creators
-ConfigFlags.lock()
-triggerIDCCacheCreatorsCfg(ConfigFlags).appendToGlobals()
-Configurable.configurableRun3Behavior-=1
-
-#-------------------------------------------------------------
-# Non-ComponentAccumulator Cost Monitoring
-#-------------------------------------------------------------
-
-from AthenaCommon.AppMgr import ServiceMgr
-from TrigCostMonitorMT.TrigCostMonitorMTConf import TrigCostMTAuditor, TrigCostMTSvc
-
-# This should be temporary, it is doing the same job as TrigCostMonitorMTConfig but without using a ComponentAccumulator
-if ConfigFlags.Trigger.CostMonitoring.doCostMonitoring:
-    trigCostService = TrigCostMTSvc()
-    trigCostService.MonitorAllEvents = ConfigFlags.Trigger.CostMonitoring.monitorAllEvents
-    trigCostService.SaveHashes = True # This option will go away once the TrigConfigSvc is fully up & running
-    ServiceMgr += trigCostService
-    #
-    ServiceMgr.AuditorSvc += TrigCostMTAuditor()
-    theApp.AuditAlgorithms=True
-
-#-------------------------------------------------------------
-# Disable overly verbose and problematic ChronoStatSvc print-out
-#-------------------------------------------------------------
-include("TriggerTest/disableChronoStatSvcPrintout.py")
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_decodeBS_build.py b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_decodeBS_build.py
index efa41ca4b87..0d97978f1c5 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_decodeBS_build.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_decodeBS_build.py
@@ -8,7 +8,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 writeBS = ExecStep.ExecStep("WriteBS")
 writeBS.type = 'athena'
-writeBS.job_options = 'TrigUpgradeTest/full_menu.py'
+writeBS.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 writeBS.input = 'data'
 writeBS.args = '-c "isOnline=True;doWriteBS=True;doWriteRDOTrigger=False;"'
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_empty_menu_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_empty_menu_build.sh
index 3138b6fec16..92e98188c76 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_empty_menu_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_empty_menu_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=2
 export SLOTS=2
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export EXTRA="isOnline=True;doEmptyMenu=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
 # This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_empty_menu_mc_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_empty_menu_mc_build.sh
index 448c69cad24..1b5297ee639 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_empty_menu_mc_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_empty_menu_mc_build.sh
@@ -9,7 +9,7 @@ export EVENTS=20
 export THREADS=1
 export SLOTS=1
 export INPUT="ttbar"
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export EXTRA="doL1Sim=True;doEmptyMenu=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
 # This test doesn't produce any output useful for RegTest, so do a dummy reference comparison
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_build.sh
index 8b0922b0f14..64d4050404f 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="isOnline=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_deps_build.py b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_deps_build.py
index bf7faa76309..ad2580bde19 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_deps_build.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_deps_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.args = '-c "isOnline=True;doWriteBS=False;doWriteRDOTrigger=True;failIfNoProxy=True;"'
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_grid.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_grid.sh
index b31b3536613..9746f300736 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_grid.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_grid.sh
@@ -17,7 +17,7 @@
 export EVENTS=1000
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_mc_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_mc_build.sh
index fc9e2c8c2ca..f7c1c83e77b 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_mc_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_mc_build.sh
@@ -9,7 +9,7 @@ export EVENTS=20
 export THREADS=1
 export SLOTS=1
 export INPUT="ttbar"
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doL1Sim=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_mc_grid.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_mc_grid.sh
index c354bfc6164..74b03d63b05 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_mc_grid.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_mc_grid.sh
@@ -18,7 +18,7 @@ export INPUT="ttbar"
 export EVENTS=1000
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doL1Sim=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_reverse_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_reverse_build.sh
index e83a1f154ae..835a1867d41 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_reverse_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_full_menu_reverse_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="isOnline=True;reverseViews=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_py_full_menu_build.py b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_py_full_menu_build.py
index 5044adcb250..58ca2512eac 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_py_full_menu_build.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_py_full_menu_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.args = '-c "isOnline=True;doWriteBS=False;doWriteRDOTrigger=True;"'
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bjet_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bjet_build.sh
index f484210efab..60cee551bb0 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bjet_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bjet_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doBjetSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bphysics_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bphysics_build.sh
index 90030a7eec4..7faf47f5285 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bphysics_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_bphysics_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doBphysicsSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_egamma_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_egamma_build.sh
index a7561fe931b..b7b9602ecb9 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_egamma_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_egamma_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doEgammaSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_jet_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_jet_build.sh
index 527c051e38c..a7e2942bfa3 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_jet_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_jet_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="isOnline=True;doEmptyMenu=True;doJetSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_build.sh
index ae2858c7ba2..9761b373952 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doMETSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_mc_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_mc_build.sh
index 7f4f1852906..e4014dc5b92 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_mc_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_met_mc_build.sh
@@ -9,7 +9,7 @@ export EVENTS=20
 export THREADS=1
 export SLOTS=1
 export INPUT="ttbar"
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doL1Sim=True;doEmptyMenu=True;doMETSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_minbias_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_minbias_build.sh
index 415e3b1081e..06505360ffc 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_minbias_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_minbias_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doMinBiasSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_build.sh
index 683861f8ca1..dd267222db0 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doMuonSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_mc_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_mc_build.sh
index 4c85c316b93..00e3eebdea7 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_mc_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_mc_build.sh
@@ -9,7 +9,7 @@ export EVENTS=20
 export THREADS=1
 export SLOTS=1
 export INPUT="ttbar"
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doL1Sim=True;doEmptyMenu=True;doMuonSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_mc_grid.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_mc_grid.sh
index 44c8101bf70..aea52bbc44c 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_mc_grid.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_mu_mc_grid.sh
@@ -18,7 +18,7 @@ export EVENTS=1000
 export THREADS=1
 export SLOTS=1
 export INPUT="ttbar"
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doL1Sim=True;doEmptyMenu=True;doMuonSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_tau_build.sh b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_tau_build.sh
index c2d8a283002..3ed7dcecd69 100755
--- a/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_tau_build.sh
+++ b/Trigger/TrigValidation/TrigUpgradeTest/test/test_trigUpgr_slice_tau_build.sh
@@ -8,7 +8,7 @@
 export EVENTS=20
 export THREADS=1
 export SLOTS=1
-export JOBOPTION="TrigUpgradeTest/full_menu.py"
+export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
 export REGTESTEXP="TriggerSummaryStep.*HLT_.*|TriggerMonitorFinal.*HLT_.*|TrigSignatureMoniMT.*HLT_.*"
 export EXTRA="doEmptyMenu=True;doTauSlice=True;doWriteBS=False;doWriteRDOTrigger=True;"
 
diff --git a/Trigger/TrigValidation/TriggerTest/share/testAthenaTrigRDO_standalone.py b/Trigger/TrigValidation/TriggerTest/share/testAthenaTrigRDO_standalone.py
index db3557ee08b..b64ef95a8d1 100644
--- a/Trigger/TrigValidation/TriggerTest/share/testAthenaTrigRDO_standalone.py
+++ b/Trigger/TrigValidation/TriggerTest/share/testAthenaTrigRDO_standalone.py
@@ -15,7 +15,7 @@ if not ('EvtMax' in dir()):
 
 ReadBS=False
 
-include("TriggerJobOpts/runHLT_standalone.py")
+include("TriggerJobOpts/runHLT_standalone_run2.py")
 
 MessageSvc.Format = "% F%48W%S%7W%R%T %0W%M"
 
diff --git a/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh b/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh
index 30a6a0730a6..3256fc2418a 100755
--- a/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh
+++ b/Trigger/TrigValidation/TriggerTest/test/exec_athena_art_trigger_validation.sh
@@ -14,7 +14,7 @@ fi
 
 if [ -z ${JOBOPTION} ]; then
   if [[ $INPUT == "data" ]]; then
-    export JOBOPTION="TriggerJobOpts/runHLT_standalone.py"
+    export JOBOPTION="TriggerJobOpts/runHLT_standalone_run2.py"
   else
     export JOBOPTION="TriggerTest/testCommonSliceAthenaTrigRDO.py"
   fi
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_build.py
index a7630da03ac..a9bc9cd5c33 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data_cos'
 ex.threads = 1
 ex.args = '-c "setMenu=\'Cosmic_pp_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_grid.py
index 01d0977f22e..4ba89ba44a8 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Cosmic_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data_cos'
 ex.threads = 1
 ex.args = '-c "setMenu=\'Cosmic_pp_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py
index 322c1114597..e0be38810f8 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_grid.py
index 478a4d58510..7c8cd170f64 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_build.py
index f282f92d9ad..ca22e03efd4 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_grid.py
index 3e5270da247..c30b911a3e5 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_data_v1Dev_writeBS_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'data'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_build.py
index e9199577937..162f8bb5141 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_grid.py
index 632f6bbbe66..8c5968fe9b3 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_build.py
index 8585267ecc9..d6fca0ae3d6 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_grid.py
index ff7eac6c847..e2c01b0ce29 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bjet_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_build.py
index d452b9217dd..93c54b07d4c 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'bphysics'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_grid.py
index 41a285a0171..2f888dcfb97 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysics_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'bphysics'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_build.py
index ea4b430d3b9..7ce089158bf 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'mubphysics'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_grid.py
index 6a70be835db..3a055200153 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_bphysicsexo_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'mubphysics'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_build.py
index d00f5eb2931..2e3e91888e5 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_grid.py
index e47a0f1a896..f558beb3afb 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_egamma_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_build.py
index 0381e93ef9c..a55912a125c 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_grid.py
index 3df8048125b..1611dcface3 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_jet_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_build.py
index e76b8266dd3..ce79b125d92 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_grid.py
index 7927c7f65e6..92e8d0991bf 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_met_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_build.py
index 87ebe2df6cb..7579bdf1286 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_grid.py
index 8d39257fcd0..0600e8cb69a 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_muon_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_reproducibility_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_reproducibility_build.py
index 62306cebe85..c6a11a4fea2 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_reproducibility_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_reproducibility_build.py
@@ -14,7 +14,7 @@ import six
 Common.trigvalsteering_logging_level = logging.DEBUG
 ex = ExecStep.ExecStep('FullMenu')
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_build.py
index 313e8bd4f2d..6903a4818a0 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_grid.py
index 07156f012a0..13ff3f4770b 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_slice_tau_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_build.py
index 1413a98837a..597ae164854 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_grid.py
index 383cb3d5a66..ba165362a36 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Dev_writeBS_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 # LS2_v1 soon to be renamed to Dev_pp_run3_v1
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_build.py
index 9bbf564f0b5..5f49e42321c 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 ex.args = '-c "setMenu=\'MC_pp_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_grid.py
index 92ddfa87ad5..0eaba53d790 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1MC_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 ex.args = '-c "setMenu=\'MC_pp_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_build.py
index b96b2741d3e..fa358776cca 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 ex.args = '-c "setMenu=\'PhysicsP1_pp_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_grid.py
index 5e58db655f2..8c654fe68c6 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1PhysP1_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 ex.args = '-c "setMenu=\'PhysicsP1_pp_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_build.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_build.py
index 71129adb612..0ab72dab239 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_build.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_build.py
@@ -10,7 +10,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 ex.args = '-c "setMenu=\'Physics_pp_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
diff --git a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_grid.py b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_grid.py
index 6a554479bce..92eb3e42f21 100755
--- a/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_grid.py
+++ b/Trigger/TrigValidation/TriggerTest/test/test_trig_mc_v1Phys_grid.py
@@ -20,7 +20,7 @@ from TrigValTools.TrigValSteering import Test, ExecStep, CheckSteps
 
 ex = ExecStep.ExecStep()
 ex.type = 'athena'
-ex.job_options = 'TrigUpgradeTest/full_menu.py'
+ex.job_options = 'TriggerJobOpts/runHLT_standalone.py'
 ex.input = 'ttbar'
 ex.threads = 1
 ex.args = '-c "setMenu=\'Physics_pp_run3_v1\';doWriteBS=False;doWriteRDOTrigger=True;"'
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
old mode 100755
new mode 100644
index 21e2ac7a8de..d0277360b86
--- a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone.py
@@ -1,305 +1,239 @@
-##############################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+################################################################################
 # TriggerJobOpts/runHLT_standalone.py
 #
-#   jobOption file to run HLT standalone (independant of RecExCommon)
+#   Job options to run HLT standalone in AthenaMT
 #
-# Input could be Pool/RDO or BS
+#   The file can be used as an include in other JO:
+#      include('TriggerJobOpts/runHLT_standalone.py')
+#   or directly to run the HLT:
+#      athena --threads=1 --filesInput=input.pool.root TriggerJobOpts/runHLT_standalone.py
 #
-# Input file: (athena only)
-#   Pool: set by "PoolRDOInput"
-#   BS:   set by "BSRDOInput"
+# Several flags are supported on the command line to steer these job options, for example
+# by adding -c "setMenu='MC_pp_run3_v1'". See below for a complete list of all flags and their default
+# value. If used in athena.py the auto-configuration is used to setup most flags correctly.
 #
-# L1Topo/L1 configuration are fixed
-#   set by "setLVL1XML" 
+# Additional "modifiers" can be specified by using
+#   -c "myModifier=True/False"
+# Existing modifiers can be found in "TriggerJobOpts/python/Modifiers.py"
 #
-# HLT configuration uses Python configuration
-#   set by "setMenu" (can also include prescales)
-#   if used for MC, one needs to set "setupForMC" to True
-#   Individual slices can be run by doing "test<sliceName>=True"
-#   Individual signatures can be removed/added putting them in
-#     "removeSignatures" and "addSignatures"
-#     e.g. "addSignatures={'MuonSlice': ['mu6_ef']}"
-#
-# HLT configuration from existing XML file
-#   set by "setHLTXML"
-#
-# Geometry and conditions
-#   CommisDB         set by "useCOMCONDDB"
-#   Geometry         set by "setDetDescr"
-#   Conditions       set by "setGlobalTag"
-#   Folder overrides set by condOverride='{"Folder1":"Tag1", "Folder2":"Tag2"}'
-#
-# Special modifiers
-#   Currently certain options needs to be modified depending on the type of data
-#   Good defaults are provided for running on physics MC and cosmics Data
-#   Change by specifying list in "setModifiers" or turn modifiers on/off
-#    by doing "myModifier=True/False"
-#   Existing modifiers can be found in "TriggerJobOpts/python/Modifiers.py"
-#
-# Predefined setups
-#   certain menu configurations can be run just by doing
-#     testPhysicsV6=True or
-#     testMCV6=True or
-#     testPhysicsV6MC=True
-#   Note that for the addition of "MC" option. This is used for getting the MC setup.
-#
-# Usage:
-#  
-#   run with athenaHLT:
-#      athenaHLT -f input.data -c testPhysicsV6=True -l DEBUG -n 25 TriggerJobOpts/runHLT_standalone.py
-#      or with multiple files
-#      athenaHLT -f "['input1.data','input2.data']" -c testPhysicsV6=True -n 25 TriggerJobOpts/runHLT_standalone.py
-#      or, for writing BS output:
-#      athenaHLT -f input.data -c testPhysicsV6=True -n 25 -o outBS TriggerJobOpts/runHLT_standalone.py
-#      or, with online THistSvc
-#      athenaHLT -M -l DEBUG -c testPhysicsV6=True -n 25 TriggerJobOpts/runHLT_standalone.py
-#
-#   run with athena:
-#      BS input: athena.py -c "testPhysicsV6=True;BSRDOInput=['raw.data']" TriggerJobOpts/runHLT_standalone.py
-#      RDO input: athena.py -c "testPhysicsV6=True;PoolRDOInput=['file.pool.root']" TriggerJobOpts/runHLT_standalone.py
-#
-# Select slice(s) to test:
-#   set one or more of the following flags to True in the jo:
-#      testEgamma, testMuon, testTau, testJet, testBjet, testMET, testBphysics
-#    e.g.:
-#      athenaHLT -f input.data -l DEBUG -n 25 -c "testTau=True;testPhysicsV6=True" TriggerJobOpts/runHLT_standalone.py
+class opt:
+    setupForMC       = None           # force MC setup
+    setMenu          = 'LS2_v1'
+    setDetDescr      = None           # force geometry tag
+    setGlobalTag     = None           # force global conditions tag
+    useCONDBR2       = True           # if False, use run-1 conditions DB
+    condOverride     = {}             # overwrite conditions folder tags e.g. '{"Folder1":"Tag1", "Folder2":"Tag2"}'
+    doHLT            = True           # run HLT?
+    doID             = True           # TriggerFlags.doID
+    doCalo           = True           # TriggerFlags.doCalo
+    doMuon           = True           # TriggerFlags.doMuon
+    doDBConfig       = None           # dump trigger configuration
+    trigBase         = None           # file name for trigger config dump
+    enableCostD3PD   = False          # enable cost monitoring
+    doWriteRDOTrigger = False         # Write out RDOTrigger?
+    doWriteBS        = True           # Write out BS?
+    doL1Unpacking    = True           # decode L1 data in input file if True, else setup emulation
+    doL1Sim          = False          # (re)run L1 simulation
+    isOnline         = True           # isOnline flag
+    doEmptyMenu      = False          # Disable all chains, except those re-enabled by specific slices
+    createHLTMenuExternally = False   # Set to True if the menu is build manually outside runHLT_standalone.py
+    endJobAfterGenerate = False       # Finish job after menu generation
+    failIfNoProxy     = False         # Sets the SGInputLoader.FailIfNoProxy property
+    decodeLegacyL1 = True             # Decode L1 RoIs from legacy L1 systems through RoIBResult for HLT seeding
+    decodePhaseIL1 = False            # Decode L1 RoIs from Run-3 L1 systems through L1TriggerResult for HLT seeding
+#Individual slice flags
+    doEgammaSlice     = True
+    doMuonSlice       = True
+    doMinBiasSlice    = True
+    doJetSlice        = True
+    doMETSlice        = True
+    doBjetSlice       = True
+    doTauSlice        = True
+    doCombinedSlice   = True
+    doBphysicsSlice   = True
+    doStreamingSlice  = True
+    doMonitorSlice    = True
+    doBeamspotSlice   = True
+    reverseViews      = False
+    filterViews       = False
+    enabledSignatures = []
+    disabledSignatures = []
+
+
 #
-#===========================================================================================
+################################################################################
+from TriggerJobOpts.TriggerFlags import TriggerFlags
+from AthenaCommon.AppMgr import theApp, ServiceMgr as svcMgr
 from AthenaCommon.Logging import logging
 log = logging.getLogger('runHLT_standalone.py')
 
-#predefined menu setups accessible using 'test<NAME>[MC]=True' commandline
-menuMap={
-         #Run-3 preparation menu
-         'LS2V1':           ('LS2_v1',                  'TriggerMenuXML/LVL1config_LS2_v1.xml'),         
-
-         #2018 menus:       menu name                   L1 xml file
-         'HIV5':            ('Physics_HI_v5',           'TriggerMenuXML/LVL1config_Physics_HI_v5.xml'),
-         'MCHIV5':          ('MC_HI_v5',                'TriggerMenuXML/LVL1config_Physics_HI_v5.xml'),
-
-         #2017 menus:       menu name                   L1 xml file
-         'PhysicsV7':       ('Physics_pp_v7',           'TriggerMenuXML/LVL1config_Physics_pp_v7.xml'),
-         'MCV7':            ('MC_pp_v7',                'TriggerMenuXML/LVL1config_MC_pp_v7.xml'),
-
-         #2016 menus:       menu name                   L1 xml file
-         'PhysicsV6':       ('Physics_pp_v6',           'TriggerMenuXML/LVL1config_Physics_pp_v6.xml'),
-         'MCV6':            ('MC_pp_v6',                'TriggerMenuXML/LVL1config_MC_pp_v6.xml'),
-         'HIV4':            ('Physics_HI_v4',           'TriggerMenuXML/LVL1config_Physics_HI_v4.xml'),
-         'MCHIV4':          ('MC_HI_v4',                'TriggerMenuXML/LVL1config_Physics_HI_v4.xml'),
-
-         #2015 menus:       menu name                   L1 xml file
-         'PhysicsV5':       ('Physics_pp_v5',           'TriggerMenuXML/LVL1config_Physics_pp_v5.xml'),
-         'MCV5':            ('MC_pp_v5',                'TriggerMenuXML/LVL1config_MC_pp_v5.xml'),
-         'LS1V1':           ('LS1_v1',                  'TriggerMenuXML/LVL1config_Physics_pp_v4.xml'),
-         'DC14':            ('DC14',                    ''),
-         'HIV3':            ('Physics_HI_v3',           'TriggerMenuXML/LVL1config_Physics_HI_v3.xml'),
-         'MCHIV3':          ('MC_HI_v3',                'TriggerMenuXML/LVL1config_Physics_HI_v3.xml'),
-
-         #2012 menus:       menu name                   L1 xml file
-         'PhysicsV4':       ('Physics_pp_v4',           'TriggerMenuXML/LVL1config_Physics_pp_v4.xml'),
-         'MCV4':            ('MC_pp_v4',                'TriggerMenuXML/LVL1config_Physics_pp_v4.xml'),
-         'L1V4':            ('L1_pp_v4',                'TriggerMenuXML/LVL1config_L1_pp_v4.xml'),
-         'ALFAV2':          ('L1_alfa_v2',              'TriggerMenuXML/LVL1config_L1_alfa_v2.xml'),
-         'HIV2':            ('Physics_HI_v2',           'TriggerMenuXML/LVL1config_Physics_HI_v2.xml'),
-         'MCHIV2':          ('MC_HI_v2',                'TriggerMenuXML/LVL1config_Physics_HI_v2.xml'),
-
-         #2011 menus:          menu name                      L1 xml file
-         'CosmicPPV2':      ('Physics_pp_v2_cosmics_prescale',           'TriggerMenuXML/LVL1config_Physics_pp_v2.xml'),
-         'PhysicsV2':       ('Physics_pp_v2',           'TriggerMenuXML/LVL1config_Physics_pp_v2.xml'),
-         'MCV2':            ('MC_pp_v2',                'TriggerMenuXML/LVL1config_MC_pp_v2.xml'),
-         'L1V2':            ('L1_pp_v2',                'TriggerMenuXML/LVL1config_L1_pp_v2.xml'),
-         'HIV1':            ('Physics_HI_v1',           'TriggerMenuXML/LVL1config_Physics_HI_v1.xml'),
-         'MCHIV1':          ('MC_HI_v1',                'TriggerMenuXML/LVL1config_Physics_HI_v1.xml'),
-         'PhysicsV3':       ('Physics_pp_v3',           'TriggerMenuXML/LVL1config_Physics_pp_v3.xml'),
-         'MCV3':            ('MC_pp_v3',                'TriggerMenuXML/LVL1config_Physics_pp_v3.xml'),
-         'L1V3':            ('L1_pp_v3',                'TriggerMenuXML/LVL1config_L1_pp_v3.xml'),
-         'ALFAV1':          ('L1_alfa_v1',              'TriggerMenuXML/LVL1config_L1_alfa_v1.xml'),
-         
-         #2010 menus:          menu name                      L1 xml file
-         'InitialBeamV2':   ('InitialBeam_v2',          'TriggerMenuXML/LVL1config_InitialBeam_v2.xml'),
-         'MCInitialBeamV2': ('MC_InitialBeam_v2',       'TriggerMenuXML/LVL1config_InitialBeam_v2.xml'),
-         'CosmicV2':        ('Cosmic_v2',               'TriggerMenuXML/LVL1config_InitialBeam_v2.xml'),
-
-         'InitialBeamV3':   ('InitialBeam_v3',          'TriggerMenuXML/LVL1config_InitialBeam_v3.xml'),
-         'MCInitialBeamV3': ('MC_InitialBeam_v3',       'TriggerMenuXML/LVL1config_InitialBeam_v3.xml'),
-         'CosmicV3':        ('Cosmic_v3',               'TriggerMenuXML/LVL1config_InitialBeam_v3.xml'),
-
-         'PhysicsV1':       ('Physics_pp_v1',           'TriggerMenuXML/LVL1config_Physics_pp_v1.xml'),
-         'MCV1':            ('MC_pp_v1',                'TriggerMenuXML/LVL1config_Physics_pp_v1.xml'),
-         'CosmicPPV1':      ('Physics_pp_v1_cosmics_prescale','TriggerMenuXML/LVL1config_Physics_pp_v1.xml'),
-
-         #Upgrade menus:       menu name                   L1 xml file
-         'MCPhaseII':       ('MC_PhaseII',           'TriggerMenuXML/LVL1config_MC_PhaseII.xml'),
-}
-
-# Useful in job options beyond our control to always run the latest menu via 'testCurrentMenu=True'
-menuMap['CurrentMenu'] = menuMap['PhysicsV7']
-
-newMenuSetup=0
-for name in menuMap:
-    for key in ['','MC']:
-        if ('test'+name+key in dir()):
-            newMenuSetup+=1
-            setMenu=menuMap[name][0]
-            setLVL1XML=menuMap[name][1]
-            if len(menuMap[name])<=2:
-                # topo menu xml derived from l1 menu name
-                setL1TopoXML=menuMap[name][1].replace("/LVL1","/L1Topo")
-            else:
-                # topo menu xml explicitly given
-                setL1TopoXML=menuMap[name][2]
-                
-            if 'setupForMC' not in dir():
-                setupForMC=(key=='MC')
-                print 'Setting setupForMC = ',setupForMC
-
-if 'setupForMC' not in dir():
-    setupForMC=False
-
-if newMenuSetup>1:
-    log.fatal('More than one menu requested')
-    import sys
-    sys.exit(1)
-if newMenuSetup==0 and not ('setMenu' in dir()):
-    log.fatal('No trigger menu specified, use e.g. testPhysicsV6=True')
-    import sys
-    sys.exit(1)
-
-#setup options for standalone configurations
-
-defaultOptions={ 
-    'setMenu'          : setMenu,
-    'setupForMC'       : setupForMC,
-    'setLVL1XML'       : 'TriggerMenuXML',
-    'setL1TopoXML'     : 'TriggerMenuXML',
-    'setHLTXML'        : None,
-    'removeSignatures' : {},
-    'addSignatures'    : {},
-    'setDetDescr'      : None,
-    'setGlobalTag'     : None,
-    'useCONDBR2'       : True,
-    'condOverride'     : {},
-    'emptyMenu'        : False,
-    'PoolRDOInput'     : None,
-    'BSRDOInput'       : None,
-    'OutputLevel'      : INFO,
-    'HLTOutputLevel'   : INFO,
-    'EvtMax'           : -1,
-    'SkipEvents'       :  0,
-}
+#-------------------------------------------------------------
+# Setup options
+#-------------------------------------------------------------
+log.info('Setup options:')
+defaultOptions = [a for a in dir(opt) if not a.startswith('__')]
+for option in defaultOptions:
+    if option in globals():
+        setattr(opt, option, globals()[option])
+        print(' %20s = %s' % (option, getattr(opt, option)))
+    else:        
+        print(' %20s = (Default) %s' % (option, getattr(opt, option)))
+
+
+import re
+
+sliceRe = re.compile("^do.*Slice")
+slices = [a for a in dir(opt) if sliceRe.match(a)]
+if opt.doEmptyMenu is True:
+    log.info("Disabling all slices")
+    for s in slices:
+        if s in globals():
+            log.info("re-enabling %s ", s)
+            setattr(opt, s, globals()[s])
+        else:
+            setattr(opt, s, False)
+else:
+    for s in slices:
+        setattr(opt, s, True)
+
+# Setting the TriggerFlags.XXXSlice to use in TriggerMenuMT
+# This is temporary and will be re-worked for after M3.5
+for s in slices:
+    signature = s[2:].replace('Slice', '')
 
+    if eval('opt.'+s) is True:
+        enabledSig = 'TriggerFlags.'+signature+'Slice.setAll()'
+        opt.enabledSignatures.append( enabledSig )
+    else:
+        disabledSig = 'TriggerFlags.'+signature+'Slice.setAll()'
+        opt.disabledSignatures.append( disabledSig )
+
+#-------------------------------------------------------------
+# Setting Global Flags
+#-------------------------------------------------------------
+from AthenaCommon.GlobalFlags import globalflags
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+from AthenaCommon.BeamFlags import jobproperties
+import TriggerJobOpts.Modifiers
+
+# Auto-configuration for athena
+if len(athenaCommonFlags.FilesInput())>0:
+    import PyUtils.AthFile as athFile
+    af = athFile.fopen(athenaCommonFlags.FilesInput()[0])
+    globalflags.InputFormat = 'bytestream' if af.fileinfos['file_type']=='bs' else 'pool'
+    globalflags.DataSource = 'data' if af.fileinfos['evt_type'][0]=='IS_DATA' else 'geant4'
+    # Set isOnline=False for MC inputs unless specified in the options
+    if globalflags.DataSource() != 'data' and 'isOnline' not in globals():
+        log.info("Setting isOnline = False for MC input")
+        opt.isOnline = False
+    # Set geometry and conditions tags
+    if opt.setDetDescr is None:
+        opt.setDetDescr = af.fileinfos.get('geometry',None)
+    if opt.setGlobalTag is None:
+        opt.setGlobalTag = af.fileinfos.get('conditions_tag',None) or \
+            (TriggerFlags.OnlineCondTag() if opt.isOnline else 'CONDBR2-BLKPA-2018-13')
+    TriggerJobOpts.Modifiers._run_number = af.fileinfos['run_number'][0]
+
+else:   # athenaHLT
+    globalflags.InputFormat = 'bytestream'
+    globalflags.DataSource = 'data' if not opt.setupForMC else 'data'
+    if '_run_number' not in dir():
+        import PyUtils.AthFile as athFile
+        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+        af = athFile.fopen(athenaCommonFlags.BSRDOInput()[0])
+        _run_number = af.run_number[0]
+
+    TriggerJobOpts.Modifiers._run_number = _run_number   # noqa, set by athenaHLT
+
+    from RecExConfig.RecFlags import rec
+    rec.RunNumber =_run_number
+    del _run_number
+
+
+# Set final Cond/Geo tag based on input file, command line or default
+globalflags.DetDescrVersion = opt.setDetDescr or TriggerFlags.OnlineGeoTag()
+globalflags.ConditionsTag = opt.setGlobalTag or TriggerFlags.OnlineCondTag()
+
+# Other defaults
+jobproperties.Beam.beamType = 'collisions'
+jobproperties.Beam.bunchSpacing = 25
+globalflags.DatabaseInstance='CONDBR2' if opt.useCONDBR2 else 'COMP200'
+athenaCommonFlags.isOnline.set_Value_and_Lock(opt.isOnline)
+
+log.info('Configured the following global flags:')
+globalflags.print_JobProperties()
+
+# Set default doL1Sim option depending on input type (if not set explicitly)
+if 'doL1Sim' not in globals():
+    opt.doL1Sim = globalflags.DataSource != 'data'
+    log.info('Setting default doL1Sim=%s because globalflags.DataSource=%s', opt.doL1Sim, globalflags.DataSource())
 
 #-------------------------------------------------------------
 # Transfer flags into TriggerFlags
 #-------------------------------------------------------------
-from TriggerJobOpts.TriggerFlags import TriggerFlags
 
 # To turn off HLT for athena running
-TriggerFlags.doHLT = True
-if 'doHLT' in dir():
-    TriggerFlags.doHLT = bool(doHLT)
-    del doHLT
+TriggerFlags.doHLT = bool(opt.doHLT)
     
 # To extract the Trigger configuration
-if "doDBConfig" in dir():
-    TriggerFlags.Online.doDBConfig = bool(doDBConfig)
-    del doDBConfig
-if "trigBase" in dir():
-    TriggerFlags.Online.doDBConfigBaseName = trigBase
-    del trigBase
-
-
-#set geometry and conditions
-if setupForMC:   # for MC
-    defaultOptions['useCOMCONDDB']=False
-else:            # for data
-    defaultOptions['useCOMCONDDB']=True
-    defaultOptions['setDetDescr']=TriggerFlags.OnlineGeoTag()
-    defaultOptions['setGlobalTag']=TriggerFlags.OnlineCondTag()
+TriggerFlags.Online.doDBConfig = bool(opt.doDBConfig)
+if opt.trigBase is not None:
+    TriggerFlags.Online.doDBConfigBaseName = opt.trigBase
 
 # Setup list of modifiers
-defaultOptions['setModifiers']=[#Common modifiers for MC and data
-                                'noLArCalibFolders',
-                                'ForceMuonDataType',
-                                'useNewRPCCabling',
-                                'enableCostMonitoring', 
-                                'enableCoherentPS',
-                                'useOracle',
-                                'detailedErrorStreams',
-                                'optimizeChainOrder',    
-                                'enableHotIDMasking',
-                                'openThresholdRPCCabling',
-                                #special streaming setup
-                                #'enable7BitL1TTStreaming',
+# Common modifiers for MC and data
+setModifiers = ['noLArCalibFolders',
+                'ForceMuonDataType',
+                'useNewRPCCabling',
+                'enableCostMonitoring',
+                #'enableCoherentPS',
+                'useOracle',
+                'enableHotIDMasking',
+                'openThresholdRPCCabling',
 ]
 
-if setupForMC:  # MC modifiers
-    defaultOptions['setModifiers']+=['BFieldFromDCS']
+if globalflags.DataSource.is_geant4():  # MC modifiers
+    setModifiers += ['BFieldFromDCS']
 else:           # More data modifiers
-    defaultOptions['setModifiers']+=[
-                                'allowCOOLUpdates',
-                                'useHLTMuonAlign',
-                                #Check for beamspot quality flag
-                                'UseBeamSpotFlagForBjet',
-                                'UseParamFromDataForBjet',
-                                #Use online luminosity
-                                'useOnlineLumi',
-                                #for running with real data
-                                'DisableMdtT0Fit',
-                                #Setup mufast tuning for data
-                                'UseLUTFromDataForMufast',
-                                'UseRPCTimeDelayFromDataForMufast',
-                                #Set muComb/muIso Backextrapolator tuned for real data
-                                'UseBackExtrapolatorDataForMuIso',
-                                #Monitoring for L1 muon group
-                                'muCTPicheck',
-                                #Monitoring L1Topo at ROB level
-                                'L1TopoCheck',
-                                'forceTileRODMap',
-                                #for tests with data:
-                                #'ignoreErrorStream', #nothing goes to debug stream
-                                #'inclusiveErrorStream', #errors go to both debug and physics streams
-                                #'ignoreL1Vetos',  #also run L2 prescaled and disabled L1 items
-                                #'disablePixels',
-                                #'disableSCTBarrel',
-                                'useDynamicAlignFolders',
-                                'enableALFAMon',
+    setModifiers += ['allowCOOLUpdates',
+                     'BFieldAutoConfig',
+                     'useHLTMuonAlign',
+                     #Check for beamspot quality flag
+                     'UseBeamSpotFlagForBjet',
+                     'UseParamFromDataForBjet',
+                     #Use online luminosity
+                     'useOnlineLumi',
+                     #for running with real data
+                     'DisableMdtT0Fit',
+                     #Setup mufast tuning for data
+                     'UseLUTFromDataForMufast',
+                     'UseRPCTimeDelayFromDataForMufast',
+                     #Set muComb/muIso Backextrapolator tuned for real data
+                     'UseBackExtrapolatorDataForMuIso',
+                     #Monitoring for L1 muon group
+                     #'muCTPicheck',
+                     #Monitoring L1Topo at ROB level
+                     #'L1TopoCheck',
+                     'forceTileRODMap',
     ]
 
 #make some more common trig cost operations easier to setup
-if 'enableCostD3PD' in dir() or 'enableRateD3PD' in dir():
+if opt.enableCostD3PD:
     enableCostMonitoring = True # This goes without saying!
     enableCostForCAF = True # This sets the cost mon to monitor every event and always export the data.
 
-#-------------------------------------------------------------
-# Setup options
-#-------------------------------------------------------------
-log.info('Setup options:')
-for option in defaultOptions:
-    if option in dir():
-        print ' %20s = %s' % (option,str(globals()[option]))
-    else:
-        globals()[option]=defaultOptions[option]
-        print ' %20s = (Default) %s' % (option,str(globals()[option]))
 
-#we don't want anything further on to depend on these flags
-del newMenuSetup
-del setupForMC
+TriggerFlags.doID = opt.doID
+TriggerFlags.doMuon = opt.doMuon
+TriggerFlags.doCalo = opt.doCalo
 
 #-------------------------------------------------------------
 # Modifiers
 #-------------------------------------------------------------
-
 modifierList=[]
-import TriggerJobOpts.Modifiers
-if '_run_number' in dir(): TriggerJobOpts.Modifiers._run_number = _run_number
-
-try:  # Temporary backwards compatible hack
-    from TrigConfigSvc.TrigConfMetaData import TrigConfMetaData
-    meta = TrigConfMetaData()
-except:
-    log.warning("TrigConfigSvc.TrigConfMetaData not available in this release")
-    meta = None
+from TrigConfigSvc.TrigConfMetaData import TrigConfMetaData
+meta = TrigConfMetaData()
     
 for mod in dir(TriggerJobOpts.Modifiers):
     if not hasattr(getattr(TriggerJobOpts.Modifiers,mod),'preSetup'): continue
@@ -311,153 +245,45 @@ for mod in dir(TriggerJobOpts.Modifiers):
             if mod in setModifiers: setModifiers.remove(mod)
     if mod in setModifiers:
         modifierList+=[getattr(TriggerJobOpts.Modifiers,mod)()]
-        if meta: meta.Modifiers += [mod]    # store in trig conf meta data
+        meta.Modifiers += [mod]    # store in trig conf meta data
         setModifiers.remove(mod)
 
 if setModifiers:
     log.error('Unknown modifier(s): '+str(setModifiers))
 
 
-#-------------------------------------------------------------
-# Setting TriggerFlags
-#-------------------------------------------------------------
+# never include this
 include.block("RecExCond/RecExCommon_flags.py")
-log = logging.getLogger('runHLT_standalone.py')
-
-TriggerFlags.doHLTpersistency=False
-TriggerFlags.writeBS=True
-TriggerFlags.abortOnConfigurationError=True
-
-TriggerFlags.triggerMenuSetup=setMenu
-
-def stripPrescales(menu):
-    import re
-    m = re.match('(.*v\d(?:_primaries)?).*', menu)
-    return m.groups()[0] if m else menu
-
-# L1 Topo
-if setL1TopoXML=='TriggerMenuXML':    
-    setL1TopoXML='TriggerMenuXML/L1Topoconfig_'+stripPrescales(setMenu)+'.xml'
-TriggerFlags.inputL1TopoConfigFile   = setL1TopoXML
-TriggerFlags.readL1TopoConfigFromXML = True
-TriggerFlags.outputL1TopoConfigFile  = None
-
-# LVL1 config
-if setLVL1XML=='TriggerMenuXML':
-    setLVL1XML='TriggerMenuXML/LVL1config_'+stripPrescales(setMenu)+'.xml'
-TriggerFlags.inputLVL1configFile=setLVL1XML
-TriggerFlags.readLVL1configFromXML=True
-TriggerFlags.outputLVL1configFile=None
-
-# HLT config
-TriggerFlags.enableMonitoring = ['Online']
-TriggerFlags.readHLTconfigFromXML=False
-if setHLTXML!=None:
-    TriggerFlags.readHLTconfigFromXML=True
-    TriggerFlags.inputHLTconfigFile = setHLTXML
-
-log.info("Trigger xml files L1Topo : in = %s , out = %s (read from XML = %s)" % (TriggerFlags.inputL1TopoConfigFile(), TriggerFlags.outputL1TopoConfigFile(), TriggerFlags.readL1TopoConfigFromXML() ) )
-log.info("Trigger xml files LVL1   : in = %s , out = %s (read from XML = %s)" % (TriggerFlags.inputLVL1configFile(),   TriggerFlags.outputLVL1configFile(), TriggerFlags.readLVL1configFromXML() ) )
-log.info("Trigger xml files HLT    : in = %s , out = %s (read from XML = %s)" % (TriggerFlags.inputHLTconfigFile(),    TriggerFlags.outputHLTconfigFile(), TriggerFlags.readHLTconfigFromXML() ) )
-
-
-
-# define a unique HLT configuration xml when running in a partition
-import os
-if "TDAQ_PARTITION" in os.environ:
-    from TriggerJobOpts import Utils
-    ident = Utils.uniqueFileName()
-    TriggerFlags.outputHLTconfigFile ="outputHLTconfig_%s.xml" % ident
-    TriggerFlags.inputHLTconfigFile  ="outputHLTconfig_%s.xml" % ident
-
-### detector flags - we always run with everything on now
-TriggerFlags.doID=True
-TriggerFlags.doMuon=True
-TriggerFlags.doCalo=True
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-athenaCommonFlags.isOnline = True
-
-#TriggerFlags.CosmicSlice.testCosmic=False #Makes cosmic slice more quiet by default
 
 #-------------------------------------------------------------
-# Setting Global Flags
+# Setting DetFlags
 #-------------------------------------------------------------
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.InputFormat='bytestream'  # default for athenaMT/PT
-
-# Input format and file for athena running
-if BSRDOInput!=None:
-    globalflags.InputFormat='bytestream'
-    if type(BSRDOInput)==type(''):
-        athenaCommonFlags.BSRDOInput=[BSRDOInput]
-    else:
-        athenaCommonFlags.BSRDOInput=BSRDOInput
-    athenaCommonFlags.FilesInput = athenaCommonFlags.BSRDOInput()
-elif PoolRDOInput!=None:    
-    globalflags.InputFormat='pool'
-    if type(PoolRDOInput)==type(''):
-        athenaCommonFlags.PoolRDOInput=[PoolRDOInput]
-    else:
-        athenaCommonFlags.PoolRDOInput=PoolRDOInput
-    athenaCommonFlags.FilesInput = athenaCommonFlags.PoolRDOInput()
-
-# Conditions and geometry tag
-if globalflags.InputFormat.is_pool() and (setDetDescr==None or setGlobalTag==None):
-    import PyUtils.AthFile as athFile
-    af = athFile.fopen(athenaCommonFlags.PoolRDOInput()[0])
-    if setDetDescr==None:
-        setDetDescr=af.fileinfos.get('geometry',None)
-        log.info('Geometry tag not specified. Setting from file meta data: setDetDescr="%s"' % setDetDescr)
-    if setGlobalTag==None:
-        setGlobalTag=af.fileinfos.get('conditions_tag',None)
-        log.info('Global conditions tag not specified. Setting from file meta data: setGlobalTag="%s"' % setGlobalTag)
-
-if setDetDescr==None:
-    raise RuntimeError('No geometry tag specified. Please use "setDetDescr" to set it.')
-if setGlobalTag==None:
-    raise RuntimeError('No global conditions tag specified. Please use "setGlobalTag" to set it.')
-
-if useCOMCONDDB:
-    globalflags.DetGeo='commis'
-    globalflags.DataSource='data'
-    if useCONDBR2:
-        if hasattr(globalflags,'DatabaseInstance'):
-            globalflags.DatabaseInstance='CONDBR2'
-        else:
-            log.error('This release does not support the use of CONDBR2')
-    else:
-        if hasattr(globalflags,'DatabaseInstance'):
-            globalflags.DatabaseInstance='COMP200'
+if globalflags.InputFormat.is_bytestream():
+    TriggerFlags.doLVL1 = False
+
+from AthenaCommon.DetFlags import DetFlags
+if TriggerFlags.doLVL1():
+    DetFlags.detdescr.all_setOn()
+if TriggerFlags.doID():
+    DetFlags.detdescr.ID_setOn()
+    DetFlags.makeRIO.ID_setOn()
 else:
-    globalflags.DetGeo='atlas'
-    globalflags.DataSource='geant4'
-        
-globalflags.DetDescrVersion=setDetDescr
-globalflags.Luminosity='zero'
-globalflags.ConditionsTag=setGlobalTag
-
-from AthenaCommon.BeamFlags import jobproperties
-if ('Cosmic' in setMenu) or ('LS1_v1' in setMenu):
-    jobproperties.Beam.beamType = 'cosmics'
+    DetFlags.ID_setOff()
+if TriggerFlags.doMuon():
+    DetFlags.detdescr.Muon_setOn()
+    DetFlags.makeRIO.all_setOn()
 else:
-    jobproperties.Beam.beamType = 'collisions'
-
-if globalflags.InputFormat=='bytestream':
-    if '_run_number' not in dir():
-        import PyUtils.AthFile as athFile
-        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-        af = athFile.fopen(athenaCommonFlags.BSRDOInput()[0])
-        _run_number = af.run_number[0]
-
-    from RecExConfig.RecFlags import rec
-    rec.RunNumber =_run_number
-
-    if _run_number>=276073:       #start of periodD1, 25ns bunch spacing 
-        jobproperties.Beam.bunchSpacing=25
-        log.info('Bunch spacing set to %dns for a bytestream input. It can be overriden by BunchSpacing50ns=True'
-                 % jobproperties.Beam.bunchSpacing())
+    DetFlags.Muon_setOff()
+if TriggerFlags.doCalo():
+    DetFlags.detdescr.Calo_setOn()
+    from LArConditionsCommon.LArCondFlags import larCondFlags
+    larCondFlags.LoadElecCalib.set_Value_and_Lock(False)
+    from TrigT2CaloCommon.CaloDef import setMinimalCaloSetup
+    setMinimalCaloSetup()
+else:
+    DetFlags.Calo_setOff()
 
+DetFlags.Print()
 
 # RecEx flags
 from RecExConfig.RecFlags import rec
@@ -468,79 +294,217 @@ rec.doESD = False
 rec.doAOD = False
 rec.doTruth = False
 
-#-------------------------------------------------------------
-# Menu
-#  - allow to run individual slices by simply doing testSliceName=True
-#  - for more detailed control use "addSignatures" and "removeSignatures" directly
-#-------------------------------------------------------------
-sliceList=[]
-slicesToRun=[]
-for prop in dir(TriggerFlags):
-    if prop[-5:]=='Slice':
-        sliceName=prop
-        sliceList+=[sliceName]
-        if dir().count('test'+sliceName[:-5]) and globals()['test'+sliceName[:-5]]:
-            slicesToRun+=[sliceName]
-
-if slicesToRun or emptyMenu:
-    slicesToDisable=set(sliceList).difference(slicesToRun)
-    #make a list of slices to disable once the menu has been setup
-    for slice in slicesToDisable:
-        removeSignatures[slice]='ALL'
-else:
-    slicesToRun=['All']
-
 #-------------------------------------------------------------
 # Apply modifiers
 #-------------------------------------------------------------
 for mod in modifierList:
     mod.preSetup()
 
+#--------------------------------------------------------------
+# Conditions setup.
+#--------------------------------------------------------------
+from IOVDbSvc.CondDB import conddb #This import will also set up CondInputLoader
+conddb.setGlobalTag(globalflags.ConditionsTag())
+
+from AthenaCommon.AlgSequence import AlgSequence
+topSequence = AlgSequence()
+
+#--------------------------------------------------------------
+# Increase scheduler checks and verbosity
+#--------------------------------------------------------------
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.CheckDependencies( True )
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
+AlgScheduler.EnableVerboseViews( True )
+
+#--------------------------------------------------------------
+# Set the FailIfNoProxy property of SGInputLoader
+#--------------------------------------------------------------
+if not hasattr(topSequence,"SGInputLoader"):
+    log.error('Cannot set FailIfNoProxy property because SGInputLoader not found in topSequence')
+    theApp.exit(1)
+topSequence.SGInputLoader.FailIfNoProxy = opt.failIfNoProxy
+
+
+#--------------------------------------------------------------
+# Event Info setup
+#--------------------------------------------------------------
+# If no xAOD::EventInfo is found in a POOL file, schedule conversion from old EventInfo
+if globalflags.InputFormat.is_pool():
+    from RecExConfig.ObjKeyStore import objKeyStore
+    from PyUtils.MetaReaderPeeker import convert_itemList
+    objKeyStore.addManyTypesInputFile(convert_itemList(layout='#join'))
+    if ( not objKeyStore.isInInput("xAOD::EventInfo") ) and ( not hasattr(topSequence, "xAODMaker::EventInfoCnvAlg") ):
+        from xAODEventInfoCnv.xAODEventInfoCnvAlgDefault import xAODEventInfoCnvAlgDefault
+        xAODEventInfoCnvAlgDefault(sequence=topSequence)
 
-# should maybe implement the actual filter with regular expressions for added flexibility 
-def enableDisableChains():
-    # this functions is called in menu generations after the
-    # default signatures have been setup according to choice of menu
-    for s in sliceList:
-        slice=getattr(TriggerFlags,s)
-        if s in removeSignatures:
-            remove=removeSignatures[s]
-            log.warn('Disabling '+str(remove)+' of '+s)
-            if remove=='ALL':
-                signatures_all = slice.signatures.get_Value()  # Save the chain definitions
-                slice.signatures.set_Value([])                 # Remove all chains
-            else:
-                slice.disableSignatures(remove)
-        if s in addSignatures:
-            add=addSignatures[s]            
-            slice.enableSignatures([sig for sig in signatures_all if sig[0] in add])
-            log.info('Enabled '+str(add)+' in '+s)
-
-
-from TriggerMenu.menu.GenerateMenu import GenerateMenu
+# ----------------------------------------------------------------
+# Detector geometry 
+# ----------------------------------------------------------------
+# Always enable AtlasFieldSvc
+from AthenaCommon.DetFlags import DetFlags
+DetFlags.BField_setOn()
+include ("RecExCond/AllDet_detDescr.py")
 
-GenerateMenu.overwriteSignaturesWith(enableDisableChains)
+from RegionSelector.RegSelSvcDefault import RegSelSvcDefault
+svcMgr += RegSelSvcDefault()
 
+if TriggerFlags.doID():
+    include( "InDetRecExample/InDetRecCabling.py" )
 
-log.info("=============== Running slices: ===============")
-for s in slicesToRun:
-    log.info(s)
-log.info("===============================================")
+if TriggerFlags.doCalo():
+    from TrigT2CaloCommon.TrigT2CaloCommonConfig import TrigDataAccess
+    svcMgr.ToolSvc += TrigDataAccess()
+    if globalflags.InputFormat.is_pool():
+        TriggerFlags.doTransientByteStream = True # enable transient BS if TrigDataAccess is used with pool data
 
+if TriggerFlags.doMuon():
+    TriggerFlags.MuonSlice.doTrigMuonConfig=True
+    import MuonCnvExample.MuonCablingConfig  # noqa: F401
+    import MuonRecExample.MuonReadCalib      # noqa: F401
+    if globalflags.InputFormat.is_pool():
+        include( "MuonByteStreamCnvTest/jobOptions_MuonRDOToDigit.py" )
 
-#-------------------------------------------------------------
-# Setup trigger
-#-------------------------------------------------------------
-include("TriggerJobOpts/Trigger_topOptions_standalone.py")
-log = logging.getLogger('runHLT_standalone.py')
+    include ("MuonRecExample/MuonRecLoadTools.py")
 
 # ----------------------------------------------------------------
-# Number of events to be processed - for athena
+# Pool input
 # ----------------------------------------------------------------
-theApp.EvtMax = EvtMax
-if hasattr(svcMgr,"EventSelector"):
-    svcMgr.EventSelector.SkipEvents = SkipEvents 
-    
+if globalflags.InputFormat.is_pool():
+    import AthenaPoolCnvSvc.ReadAthenaPool   # noqa
+    svcMgr.AthenaPoolCnvSvc.PoolAttributes = [ "DEFAULT_BUFFERSIZE = '2048'" ]
+    svcMgr.PoolSvc.AttemptCatalogPatch=True
+    # enable transient BS 
+    if TriggerFlags.doTransientByteStream():
+        log.info("setting up transient BS")
+        include( "TriggerJobOpts/jobOfragment_TransBS_standalone.py" )
+     
+# ----------------------------------------------------------------
+# ByteStream input
+# ----------------------------------------------------------------
+elif globalflags.InputFormat.is_bytestream():
+
+    # This is only needed running athena (as opposed to athenaHLT)
+    if not hasattr(svcMgr,"ByteStreamCnvSvc"):
+        from ByteStreamCnvSvc import ReadByteStream   # noqa
+        # Define the input
+        svcMgr.ByteStreamInputSvc.FullFileName = athenaCommonFlags.FilesInput()
+        theApp.ExtSvc += [ "ByteStreamCnvSvc"]
+
+    # Online specific setup of BS converters
+    include( "TriggerJobOpts/jobOfragment_ReadBS_standalone.py" )    
+
+
+# ---------------------------------------------------------------
+# Trigger config
+# ---------------------------------------------------------------
+TriggerFlags.triggerMenuSetup = opt.setMenu
+TriggerFlags.readLVL1configFromXML = True
+TriggerFlags.outputLVL1configFile = None
+
+from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu
+l1JsonFile = generateL1Menu()
+
+from TrigConfigSvc.TrigConfigSvcCfg import getL1ConfigSvc
+svcMgr += getL1ConfigSvc()
+
+
+# ---------------------------------------------------------------
+# Level 1 simulation
+# ---------------------------------------------------------------
+if opt.doL1Sim:
+    from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationSequence
+    topSequence += Lvl1SimulationSequence()
+
+
+# ---------------------------------------------------------------
+# HLT prep: RoIBResult and L1Decoder
+# ---------------------------------------------------------------
+l1decoder = None
+if opt.doL1Unpacking:
+    if globalflags.InputFormat.is_bytestream():
+        # Create inputs for L1Decoder from ByteStream
+        from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup
+        L1ByteStreamDecodersRecExSetup(
+            enableRun2L1=opt.decodeLegacyL1,
+            enableRun3L1=opt.decodePhaseIL1)
+    if globalflags.InputFormat.is_bytestream() or opt.doL1Sim:
+        from L1Decoder.L1DecoderConfig import L1Decoder
+        l1decoder = L1Decoder("L1Decoder")
+        if not opt.decodeLegacyL1:
+            l1decoder.RoIBResult = ""
+        if not opt.decodePhaseIL1:
+            l1decoder.L1TriggerResult = ""
+        topSequence += l1decoder
+    else:
+        from TrigUpgradeTest.TestUtils import L1EmulationTest
+        topSequence += L1EmulationTest()
+
+
+# ---------------------------------------------------------------
+# HLT generation
+# ---------------------------------------------------------------
+
+if not opt.createHLTMenuExternally:
+
+    from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT import GenerateMenuMT
+    menu = GenerateMenuMT()
+
+    # define the function that enable the signatures
+    def signaturesToGenerate():
+        TriggerFlags.Slices_all_setOff()
+        for sig in opt.enabledSignatures:
+            eval(sig)
+
+    menu.overwriteSignaturesWith(signaturesToGenerate)
+
+    # generating the HLT structure requires 
+    # the L1Decoder to be defined in the topSequence
+    menu.generateMT()
+
+    if opt.endJobAfterGenerate:
+        import sys
+        sys.exit(0)
+
+
+
+from TrigConfigSvc.TrigConfigSvcCfg import getHLTConfigSvc, setupHLTPrescaleCondAlg
+svcMgr += getHLTConfigSvc()
+setupHLTPrescaleCondAlg()
+
+if not opt.createHLTMenuExternally:
+    # the generation of the prescale set file from the menu (with all prescales set to 1)
+    # is not really needed. If no file is provided all chains are either enabled or disabled,
+    # depending on the property L1Decoder.PrescalingTool.KeepUnknownChains being True or False
+    from TrigConfigSvc.TrigConfigSvcCfg import createHLTPrescalesFileFromMenu
+    createHLTPrescalesFileFromMenu()
+
+
+
+# ---------------------------------------------------------------
+# ID conditions
+# ---------------------------------------------------------------
+
+if TriggerFlags.doID:
+    from InDetTrigRecExample.InDetTrigFlags import InDetTrigFlags
+    InDetTrigFlags.doPixelClusterSplitting = False
+  
+    # PixelLorentzAngleSvc and SCTLorentzAngleSvc
+    from AthenaCommon.Include import include
+    include("InDetRecExample/InDetRecConditionsAccess.py")
+
+
+# ---------------------------------------------------------------
+# Monitoring
+# ---------------------------------------------------------------
+if not hasattr(svcMgr, 'THistSvc'):
+    from GaudiSvc.GaudiSvcConf import THistSvc
+    svcMgr += THistSvc()
+if hasattr(svcMgr.THistSvc, "Output"):
+    from TriggerJobOpts.HLTTriggerGetter import setTHistSvcOutput
+    setTHistSvcOutput(svcMgr.THistSvc.Output)
+
 #-------------------------------------------------------------
 # Apply modifiers
 #-------------------------------------------------------------
@@ -550,14 +514,106 @@ for mod in modifierList:
 #-------------------------------------------------------------
 # Conditions overrides
 #-------------------------------------------------------------    
-if len(condOverride)>0:
-    from IOVDbSvc.CondDB import conddb    
-    for folder,tag in condOverride.iteritems():
-        log.warn('Overriding folder %s with tag %s' % (folder,tag))
+if len(opt.condOverride)>0:
+    for folder,tag in opt.condOverride.iteritems():
+        log.warning('Overriding folder %s with tag %s', folder, tag)
         conddb.addOverride(folder,tag)
-                
-if not TriggerFlags.Online.doValidation():  # Suppress this printout in ATN tests
+
+if svcMgr.MessageSvc.OutputLevel<INFO:
     from AthenaCommon.JobProperties import jobproperties
     jobproperties.print_JobProperties('tree&value')
-    print AlgSequence
-    print ServiceMgr
+    print(svcMgr)
+
+#-------------------------------------------------------------
+# Use parts of NewJO
+#-------------------------------------------------------------
+from AthenaCommon.Configurable import Configurable
+Configurable.configurableRun3Behavior+=1
+from TriggerJobOpts.TriggerConfig import triggerIDCCacheCreatorsCfg
+from AthenaConfiguration.AllConfigFlags import ConfigFlags
+
+# Output flags
+isPartition = len(ConfigFlags.Trigger.Online.partitionName) > 0
+if opt.doWriteRDOTrigger:
+    if isPartition:
+        log.error('Cannot use doWriteRDOTrigger in athenaHLT or partition')
+        theApp.exit(1)
+    rec.doWriteRDO = False  # RecExCommon flag
+    ConfigFlags.Output.doWriteRDO = True  # new JO flag
+    ConfigFlags.Output.RDOFileName = 'RDO_TRIG.pool.root'  # new JO flag
+if opt.doWriteBS:
+    rec.doWriteBS = True  # RecExCommon flag
+    TriggerFlags.writeBS = True  # RecExCommon flag
+    ConfigFlags.Output.doWriteBS = True  # new JO flag
+    ConfigFlags.Trigger.writeBS = True  # new JO flag
+
+# ID Cache Creators
+ConfigFlags.lock()
+triggerIDCCacheCreatorsCfg(ConfigFlags).appendToGlobals()
+Configurable.configurableRun3Behavior-=1
+
+# Trigger output
+if opt.doWriteBS or opt.doWriteRDOTrigger:
+    from TriggerJobOpts.TriggerConfig import collectHypos, collectFilters, collectDecisionObjects, collectHypoDecisionObjects, triggerOutputCfg
+    from AthenaCommon.CFElements import findAlgorithm,findSubSequence
+    hypos = collectHypos(findSubSequence(topSequence, "HLTAllSteps"))
+    filters = collectFilters(findSubSequence(topSequence, "HLTAllSteps"))
+
+    summaryMakerAlg = findAlgorithm(topSequence, "DecisionSummaryMakerAlg")
+    if not summaryMakerAlg:
+        log.warning("Failed to find DecisionSummaryMakerAlg")
+
+    if l1decoder and summaryMakerAlg:
+        decObj = collectDecisionObjects( hypos, filters, l1decoder, summaryMakerAlg )
+        decObjHypoOut = collectHypoDecisionObjects(hypos, inputs=False, outputs=True)
+        log.debug("Decision Objects to write to output [hack method - should be replaced with triggerRunCfg()]")
+        log.debug(decObj)
+    else:
+        log.warning("Failed to find L1Decoder or DecisionSummaryMakerAlg, cannot determine Decision names for output configuration")
+        decObj = []
+        decObjHypoOut = []
+
+    Configurable.configurableRun3Behavior+=1
+    acc, edmSet = triggerOutputCfg(ConfigFlags, decObj, decObjHypoOut, summaryMakerAlg)
+    Configurable.configurableRun3Behavior-=1
+    acc.appendToGlobals()
+
+#-------------------------------------------------------------
+# Non-ComponentAccumulator Cost Monitoring
+#-------------------------------------------------------------
+from AthenaCommon.AppMgr import ServiceMgr
+from TrigCostMonitorMT.TrigCostMonitorMTConf import TrigCostMTAuditor, TrigCostMTSvc
+
+# This should be temporary, it is doing the same job as TrigCostMonitorMTConfig but without using a ComponentAccumulator
+if ConfigFlags.Trigger.CostMonitoring.doCostMonitoring:
+    trigCostService = TrigCostMTSvc()
+    trigCostService.MonitorAllEvents = ConfigFlags.Trigger.CostMonitoring.monitorAllEvents
+    trigCostService.SaveHashes = True # This option will go away once the TrigConfigSvc is fully up & running
+    ServiceMgr += trigCostService
+    #
+    ServiceMgr.AuditorSvc += TrigCostMTAuditor()
+    theApp.AuditAlgorithms=True
+
+#-------------------------------------------------------------
+# Debugging for view cross-dependencies
+#-------------------------------------------------------------
+if opt.reverseViews or opt.filterViews:
+    from TriggerJobOpts.TriggerConfig import collectViewMakers
+    viewMakers = collectViewMakers( topSequence )
+    theFilter = []
+    if opt.filterViews:
+        theFilter = [ "Cache", "EventInfo", "HLT_EFHistoPrmVtx" ]
+    for alg in viewMakers:
+        alg.ReverseViewsDebug = opt.reverseViews
+        alg.FallThroughFilter = theFilter
+
+#-------------------------------------------------------------
+# Disable overly verbose and problematic ChronoStatSvc print-out
+#-------------------------------------------------------------
+include("TriggerTest/disableChronoStatSvcPrintout.py")
+
+#-------------------------------------------------------------
+# Print top sequence
+#-------------------------------------------------------------
+from AthenaCommon.AlgSequence import dumpSequence
+dumpSequence(topSequence)
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_run2.py b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_run2.py
new file mode 100755
index 00000000000..21e2ac7a8de
--- /dev/null
+++ b/Trigger/TriggerCommon/TriggerJobOpts/share/runHLT_standalone_run2.py
@@ -0,0 +1,563 @@
+##############################################################
+# TriggerJobOpts/runHLT_standalone.py
+#
+#   jobOption file to run HLT standalone (independant of RecExCommon)
+#
+# Input could be Pool/RDO or BS
+#
+# Input file: (athena only)
+#   Pool: set by "PoolRDOInput"
+#   BS:   set by "BSRDOInput"
+#
+# L1Topo/L1 configuration are fixed
+#   set by "setLVL1XML" 
+#
+# HLT configuration uses Python configuration
+#   set by "setMenu" (can also include prescales)
+#   if used for MC, one needs to set "setupForMC" to True
+#   Individual slices can be run by doing "test<sliceName>=True"
+#   Individual signatures can be removed/added putting them in
+#     "removeSignatures" and "addSignatures"
+#     e.g. "addSignatures={'MuonSlice': ['mu6_ef']}"
+#
+# HLT configuration from existing XML file
+#   set by "setHLTXML"
+#
+# Geometry and conditions
+#   CommisDB         set by "useCOMCONDDB"
+#   Geometry         set by "setDetDescr"
+#   Conditions       set by "setGlobalTag"
+#   Folder overrides set by condOverride='{"Folder1":"Tag1", "Folder2":"Tag2"}'
+#
+# Special modifiers
+#   Currently certain options needs to be modified depending on the type of data
+#   Good defaults are provided for running on physics MC and cosmics Data
+#   Change by specifying list in "setModifiers" or turn modifiers on/off
+#    by doing "myModifier=True/False"
+#   Existing modifiers can be found in "TriggerJobOpts/python/Modifiers.py"
+#
+# Predefined setups
+#   certain menu configurations can be run just by doing
+#     testPhysicsV6=True or
+#     testMCV6=True or
+#     testPhysicsV6MC=True
+#   Note that for the addition of "MC" option. This is used for getting the MC setup.
+#
+# Usage:
+#  
+#   run with athenaHLT:
+#      athenaHLT -f input.data -c testPhysicsV6=True -l DEBUG -n 25 TriggerJobOpts/runHLT_standalone.py
+#      or with multiple files
+#      athenaHLT -f "['input1.data','input2.data']" -c testPhysicsV6=True -n 25 TriggerJobOpts/runHLT_standalone.py
+#      or, for writing BS output:
+#      athenaHLT -f input.data -c testPhysicsV6=True -n 25 -o outBS TriggerJobOpts/runHLT_standalone.py
+#      or, with online THistSvc
+#      athenaHLT -M -l DEBUG -c testPhysicsV6=True -n 25 TriggerJobOpts/runHLT_standalone.py
+#
+#   run with athena:
+#      BS input: athena.py -c "testPhysicsV6=True;BSRDOInput=['raw.data']" TriggerJobOpts/runHLT_standalone.py
+#      RDO input: athena.py -c "testPhysicsV6=True;PoolRDOInput=['file.pool.root']" TriggerJobOpts/runHLT_standalone.py
+#
+# Select slice(s) to test:
+#   set one or more of the following flags to True in the jo:
+#      testEgamma, testMuon, testTau, testJet, testBjet, testMET, testBphysics
+#    e.g.:
+#      athenaHLT -f input.data -l DEBUG -n 25 -c "testTau=True;testPhysicsV6=True" TriggerJobOpts/runHLT_standalone.py
+#
+#===========================================================================================
+from AthenaCommon.Logging import logging
+log = logging.getLogger('runHLT_standalone.py')
+
+#predefined menu setups accessible using 'test<NAME>[MC]=True' commandline
+menuMap={
+         #Run-3 preparation menu
+         'LS2V1':           ('LS2_v1',                  'TriggerMenuXML/LVL1config_LS2_v1.xml'),         
+
+         #2018 menus:       menu name                   L1 xml file
+         'HIV5':            ('Physics_HI_v5',           'TriggerMenuXML/LVL1config_Physics_HI_v5.xml'),
+         'MCHIV5':          ('MC_HI_v5',                'TriggerMenuXML/LVL1config_Physics_HI_v5.xml'),
+
+         #2017 menus:       menu name                   L1 xml file
+         'PhysicsV7':       ('Physics_pp_v7',           'TriggerMenuXML/LVL1config_Physics_pp_v7.xml'),
+         'MCV7':            ('MC_pp_v7',                'TriggerMenuXML/LVL1config_MC_pp_v7.xml'),
+
+         #2016 menus:       menu name                   L1 xml file
+         'PhysicsV6':       ('Physics_pp_v6',           'TriggerMenuXML/LVL1config_Physics_pp_v6.xml'),
+         'MCV6':            ('MC_pp_v6',                'TriggerMenuXML/LVL1config_MC_pp_v6.xml'),
+         'HIV4':            ('Physics_HI_v4',           'TriggerMenuXML/LVL1config_Physics_HI_v4.xml'),
+         'MCHIV4':          ('MC_HI_v4',                'TriggerMenuXML/LVL1config_Physics_HI_v4.xml'),
+
+         #2015 menus:       menu name                   L1 xml file
+         'PhysicsV5':       ('Physics_pp_v5',           'TriggerMenuXML/LVL1config_Physics_pp_v5.xml'),
+         'MCV5':            ('MC_pp_v5',                'TriggerMenuXML/LVL1config_MC_pp_v5.xml'),
+         'LS1V1':           ('LS1_v1',                  'TriggerMenuXML/LVL1config_Physics_pp_v4.xml'),
+         'DC14':            ('DC14',                    ''),
+         'HIV3':            ('Physics_HI_v3',           'TriggerMenuXML/LVL1config_Physics_HI_v3.xml'),
+         'MCHIV3':          ('MC_HI_v3',                'TriggerMenuXML/LVL1config_Physics_HI_v3.xml'),
+
+         #2012 menus:       menu name                   L1 xml file
+         'PhysicsV4':       ('Physics_pp_v4',           'TriggerMenuXML/LVL1config_Physics_pp_v4.xml'),
+         'MCV4':            ('MC_pp_v4',                'TriggerMenuXML/LVL1config_Physics_pp_v4.xml'),
+         'L1V4':            ('L1_pp_v4',                'TriggerMenuXML/LVL1config_L1_pp_v4.xml'),
+         'ALFAV2':          ('L1_alfa_v2',              'TriggerMenuXML/LVL1config_L1_alfa_v2.xml'),
+         'HIV2':            ('Physics_HI_v2',           'TriggerMenuXML/LVL1config_Physics_HI_v2.xml'),
+         'MCHIV2':          ('MC_HI_v2',                'TriggerMenuXML/LVL1config_Physics_HI_v2.xml'),
+
+         #2011 menus:          menu name                      L1 xml file
+         'CosmicPPV2':      ('Physics_pp_v2_cosmics_prescale',           'TriggerMenuXML/LVL1config_Physics_pp_v2.xml'),
+         'PhysicsV2':       ('Physics_pp_v2',           'TriggerMenuXML/LVL1config_Physics_pp_v2.xml'),
+         'MCV2':            ('MC_pp_v2',                'TriggerMenuXML/LVL1config_MC_pp_v2.xml'),
+         'L1V2':            ('L1_pp_v2',                'TriggerMenuXML/LVL1config_L1_pp_v2.xml'),
+         'HIV1':            ('Physics_HI_v1',           'TriggerMenuXML/LVL1config_Physics_HI_v1.xml'),
+         'MCHIV1':          ('MC_HI_v1',                'TriggerMenuXML/LVL1config_Physics_HI_v1.xml'),
+         'PhysicsV3':       ('Physics_pp_v3',           'TriggerMenuXML/LVL1config_Physics_pp_v3.xml'),
+         'MCV3':            ('MC_pp_v3',                'TriggerMenuXML/LVL1config_Physics_pp_v3.xml'),
+         'L1V3':            ('L1_pp_v3',                'TriggerMenuXML/LVL1config_L1_pp_v3.xml'),
+         'ALFAV1':          ('L1_alfa_v1',              'TriggerMenuXML/LVL1config_L1_alfa_v1.xml'),
+         
+         #2010 menus:          menu name                      L1 xml file
+         'InitialBeamV2':   ('InitialBeam_v2',          'TriggerMenuXML/LVL1config_InitialBeam_v2.xml'),
+         'MCInitialBeamV2': ('MC_InitialBeam_v2',       'TriggerMenuXML/LVL1config_InitialBeam_v2.xml'),
+         'CosmicV2':        ('Cosmic_v2',               'TriggerMenuXML/LVL1config_InitialBeam_v2.xml'),
+
+         'InitialBeamV3':   ('InitialBeam_v3',          'TriggerMenuXML/LVL1config_InitialBeam_v3.xml'),
+         'MCInitialBeamV3': ('MC_InitialBeam_v3',       'TriggerMenuXML/LVL1config_InitialBeam_v3.xml'),
+         'CosmicV3':        ('Cosmic_v3',               'TriggerMenuXML/LVL1config_InitialBeam_v3.xml'),
+
+         'PhysicsV1':       ('Physics_pp_v1',           'TriggerMenuXML/LVL1config_Physics_pp_v1.xml'),
+         'MCV1':            ('MC_pp_v1',                'TriggerMenuXML/LVL1config_Physics_pp_v1.xml'),
+         'CosmicPPV1':      ('Physics_pp_v1_cosmics_prescale','TriggerMenuXML/LVL1config_Physics_pp_v1.xml'),
+
+         #Upgrade menus:       menu name                   L1 xml file
+         'MCPhaseII':       ('MC_PhaseII',           'TriggerMenuXML/LVL1config_MC_PhaseII.xml'),
+}
+
+# Useful in job options beyond our control to always run the latest menu via 'testCurrentMenu=True'
+menuMap['CurrentMenu'] = menuMap['PhysicsV7']
+
+newMenuSetup=0
+for name in menuMap:
+    for key in ['','MC']:
+        if ('test'+name+key in dir()):
+            newMenuSetup+=1
+            setMenu=menuMap[name][0]
+            setLVL1XML=menuMap[name][1]
+            if len(menuMap[name])<=2:
+                # topo menu xml derived from l1 menu name
+                setL1TopoXML=menuMap[name][1].replace("/LVL1","/L1Topo")
+            else:
+                # topo menu xml explicitly given
+                setL1TopoXML=menuMap[name][2]
+                
+            if 'setupForMC' not in dir():
+                setupForMC=(key=='MC')
+                print 'Setting setupForMC = ',setupForMC
+
+if 'setupForMC' not in dir():
+    setupForMC=False
+
+if newMenuSetup>1:
+    log.fatal('More than one menu requested')
+    import sys
+    sys.exit(1)
+if newMenuSetup==0 and not ('setMenu' in dir()):
+    log.fatal('No trigger menu specified, use e.g. testPhysicsV6=True')
+    import sys
+    sys.exit(1)
+
+#setup options for standalone configurations
+
+defaultOptions={ 
+    'setMenu'          : setMenu,
+    'setupForMC'       : setupForMC,
+    'setLVL1XML'       : 'TriggerMenuXML',
+    'setL1TopoXML'     : 'TriggerMenuXML',
+    'setHLTXML'        : None,
+    'removeSignatures' : {},
+    'addSignatures'    : {},
+    'setDetDescr'      : None,
+    'setGlobalTag'     : None,
+    'useCONDBR2'       : True,
+    'condOverride'     : {},
+    'emptyMenu'        : False,
+    'PoolRDOInput'     : None,
+    'BSRDOInput'       : None,
+    'OutputLevel'      : INFO,
+    'HLTOutputLevel'   : INFO,
+    'EvtMax'           : -1,
+    'SkipEvents'       :  0,
+}
+
+
+#-------------------------------------------------------------
+# Transfer flags into TriggerFlags
+#-------------------------------------------------------------
+from TriggerJobOpts.TriggerFlags import TriggerFlags
+
+# To turn off HLT for athena running
+TriggerFlags.doHLT = True
+if 'doHLT' in dir():
+    TriggerFlags.doHLT = bool(doHLT)
+    del doHLT
+    
+# To extract the Trigger configuration
+if "doDBConfig" in dir():
+    TriggerFlags.Online.doDBConfig = bool(doDBConfig)
+    del doDBConfig
+if "trigBase" in dir():
+    TriggerFlags.Online.doDBConfigBaseName = trigBase
+    del trigBase
+
+
+#set geometry and conditions
+if setupForMC:   # for MC
+    defaultOptions['useCOMCONDDB']=False
+else:            # for data
+    defaultOptions['useCOMCONDDB']=True
+    defaultOptions['setDetDescr']=TriggerFlags.OnlineGeoTag()
+    defaultOptions['setGlobalTag']=TriggerFlags.OnlineCondTag()
+
+# Setup list of modifiers
+defaultOptions['setModifiers']=[#Common modifiers for MC and data
+                                'noLArCalibFolders',
+                                'ForceMuonDataType',
+                                'useNewRPCCabling',
+                                'enableCostMonitoring', 
+                                'enableCoherentPS',
+                                'useOracle',
+                                'detailedErrorStreams',
+                                'optimizeChainOrder',    
+                                'enableHotIDMasking',
+                                'openThresholdRPCCabling',
+                                #special streaming setup
+                                #'enable7BitL1TTStreaming',
+]
+
+if setupForMC:  # MC modifiers
+    defaultOptions['setModifiers']+=['BFieldFromDCS']
+else:           # More data modifiers
+    defaultOptions['setModifiers']+=[
+                                'allowCOOLUpdates',
+                                'useHLTMuonAlign',
+                                #Check for beamspot quality flag
+                                'UseBeamSpotFlagForBjet',
+                                'UseParamFromDataForBjet',
+                                #Use online luminosity
+                                'useOnlineLumi',
+                                #for running with real data
+                                'DisableMdtT0Fit',
+                                #Setup mufast tuning for data
+                                'UseLUTFromDataForMufast',
+                                'UseRPCTimeDelayFromDataForMufast',
+                                #Set muComb/muIso Backextrapolator tuned for real data
+                                'UseBackExtrapolatorDataForMuIso',
+                                #Monitoring for L1 muon group
+                                'muCTPicheck',
+                                #Monitoring L1Topo at ROB level
+                                'L1TopoCheck',
+                                'forceTileRODMap',
+                                #for tests with data:
+                                #'ignoreErrorStream', #nothing goes to debug stream
+                                #'inclusiveErrorStream', #errors go to both debug and physics streams
+                                #'ignoreL1Vetos',  #also run L2 prescaled and disabled L1 items
+                                #'disablePixels',
+                                #'disableSCTBarrel',
+                                'useDynamicAlignFolders',
+                                'enableALFAMon',
+    ]
+
+#make some more common trig cost operations easier to setup
+if 'enableCostD3PD' in dir() or 'enableRateD3PD' in dir():
+    enableCostMonitoring = True # This goes without saying!
+    enableCostForCAF = True # This sets the cost mon to monitor every event and always export the data.
+
+#-------------------------------------------------------------
+# Setup options
+#-------------------------------------------------------------
+log.info('Setup options:')
+for option in defaultOptions:
+    if option in dir():
+        print ' %20s = %s' % (option,str(globals()[option]))
+    else:
+        globals()[option]=defaultOptions[option]
+        print ' %20s = (Default) %s' % (option,str(globals()[option]))
+
+#we don't want anything further on to depend on these flags
+del newMenuSetup
+del setupForMC
+
+#-------------------------------------------------------------
+# Modifiers
+#-------------------------------------------------------------
+
+modifierList=[]
+import TriggerJobOpts.Modifiers
+if '_run_number' in dir(): TriggerJobOpts.Modifiers._run_number = _run_number
+
+try:  # Temporary backwards compatible hack
+    from TrigConfigSvc.TrigConfMetaData import TrigConfMetaData
+    meta = TrigConfMetaData()
+except:
+    log.warning("TrigConfigSvc.TrigConfMetaData not available in this release")
+    meta = None
+    
+for mod in dir(TriggerJobOpts.Modifiers):
+    if not hasattr(getattr(TriggerJobOpts.Modifiers,mod),'preSetup'): continue
+    if mod in dir():  #allow turning on and off modifiers by variable of same name
+        if globals()[mod]:
+            if mod not in setModifiers:
+                setModifiers+=[mod]
+        else:
+            if mod in setModifiers: setModifiers.remove(mod)
+    if mod in setModifiers:
+        modifierList+=[getattr(TriggerJobOpts.Modifiers,mod)()]
+        if meta: meta.Modifiers += [mod]    # store in trig conf meta data
+        setModifiers.remove(mod)
+
+if setModifiers:
+    log.error('Unknown modifier(s): '+str(setModifiers))
+
+
+#-------------------------------------------------------------
+# Setting TriggerFlags
+#-------------------------------------------------------------
+include.block("RecExCond/RecExCommon_flags.py")
+log = logging.getLogger('runHLT_standalone.py')
+
+TriggerFlags.doHLTpersistency=False
+TriggerFlags.writeBS=True
+TriggerFlags.abortOnConfigurationError=True
+
+TriggerFlags.triggerMenuSetup=setMenu
+
+def stripPrescales(menu):
+    import re
+    m = re.match('(.*v\d(?:_primaries)?).*', menu)
+    return m.groups()[0] if m else menu
+
+# L1 Topo
+if setL1TopoXML=='TriggerMenuXML':    
+    setL1TopoXML='TriggerMenuXML/L1Topoconfig_'+stripPrescales(setMenu)+'.xml'
+TriggerFlags.inputL1TopoConfigFile   = setL1TopoXML
+TriggerFlags.readL1TopoConfigFromXML = True
+TriggerFlags.outputL1TopoConfigFile  = None
+
+# LVL1 config
+if setLVL1XML=='TriggerMenuXML':
+    setLVL1XML='TriggerMenuXML/LVL1config_'+stripPrescales(setMenu)+'.xml'
+TriggerFlags.inputLVL1configFile=setLVL1XML
+TriggerFlags.readLVL1configFromXML=True
+TriggerFlags.outputLVL1configFile=None
+
+# HLT config
+TriggerFlags.enableMonitoring = ['Online']
+TriggerFlags.readHLTconfigFromXML=False
+if setHLTXML!=None:
+    TriggerFlags.readHLTconfigFromXML=True
+    TriggerFlags.inputHLTconfigFile = setHLTXML
+
+log.info("Trigger xml files L1Topo : in = %s , out = %s (read from XML = %s)" % (TriggerFlags.inputL1TopoConfigFile(), TriggerFlags.outputL1TopoConfigFile(), TriggerFlags.readL1TopoConfigFromXML() ) )
+log.info("Trigger xml files LVL1   : in = %s , out = %s (read from XML = %s)" % (TriggerFlags.inputLVL1configFile(),   TriggerFlags.outputLVL1configFile(), TriggerFlags.readLVL1configFromXML() ) )
+log.info("Trigger xml files HLT    : in = %s , out = %s (read from XML = %s)" % (TriggerFlags.inputHLTconfigFile(),    TriggerFlags.outputHLTconfigFile(), TriggerFlags.readHLTconfigFromXML() ) )
+
+
+
+# define a unique HLT configuration xml when running in a partition
+import os
+if "TDAQ_PARTITION" in os.environ:
+    from TriggerJobOpts import Utils
+    ident = Utils.uniqueFileName()
+    TriggerFlags.outputHLTconfigFile ="outputHLTconfig_%s.xml" % ident
+    TriggerFlags.inputHLTconfigFile  ="outputHLTconfig_%s.xml" % ident
+
+### detector flags - we always run with everything on now
+TriggerFlags.doID=True
+TriggerFlags.doMuon=True
+TriggerFlags.doCalo=True
+
+from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+athenaCommonFlags.isOnline = True
+
+#TriggerFlags.CosmicSlice.testCosmic=False #Makes cosmic slice more quiet by default
+
+#-------------------------------------------------------------
+# Setting Global Flags
+#-------------------------------------------------------------
+from AthenaCommon.GlobalFlags import globalflags
+globalflags.InputFormat='bytestream'  # default for athenaMT/PT
+
+# Input format and file for athena running
+if BSRDOInput!=None:
+    globalflags.InputFormat='bytestream'
+    if type(BSRDOInput)==type(''):
+        athenaCommonFlags.BSRDOInput=[BSRDOInput]
+    else:
+        athenaCommonFlags.BSRDOInput=BSRDOInput
+    athenaCommonFlags.FilesInput = athenaCommonFlags.BSRDOInput()
+elif PoolRDOInput!=None:    
+    globalflags.InputFormat='pool'
+    if type(PoolRDOInput)==type(''):
+        athenaCommonFlags.PoolRDOInput=[PoolRDOInput]
+    else:
+        athenaCommonFlags.PoolRDOInput=PoolRDOInput
+    athenaCommonFlags.FilesInput = athenaCommonFlags.PoolRDOInput()
+
+# Conditions and geometry tag
+if globalflags.InputFormat.is_pool() and (setDetDescr==None or setGlobalTag==None):
+    import PyUtils.AthFile as athFile
+    af = athFile.fopen(athenaCommonFlags.PoolRDOInput()[0])
+    if setDetDescr==None:
+        setDetDescr=af.fileinfos.get('geometry',None)
+        log.info('Geometry tag not specified. Setting from file meta data: setDetDescr="%s"' % setDetDescr)
+    if setGlobalTag==None:
+        setGlobalTag=af.fileinfos.get('conditions_tag',None)
+        log.info('Global conditions tag not specified. Setting from file meta data: setGlobalTag="%s"' % setGlobalTag)
+
+if setDetDescr==None:
+    raise RuntimeError('No geometry tag specified. Please use "setDetDescr" to set it.')
+if setGlobalTag==None:
+    raise RuntimeError('No global conditions tag specified. Please use "setGlobalTag" to set it.')
+
+if useCOMCONDDB:
+    globalflags.DetGeo='commis'
+    globalflags.DataSource='data'
+    if useCONDBR2:
+        if hasattr(globalflags,'DatabaseInstance'):
+            globalflags.DatabaseInstance='CONDBR2'
+        else:
+            log.error('This release does not support the use of CONDBR2')
+    else:
+        if hasattr(globalflags,'DatabaseInstance'):
+            globalflags.DatabaseInstance='COMP200'
+else:
+    globalflags.DetGeo='atlas'
+    globalflags.DataSource='geant4'
+        
+globalflags.DetDescrVersion=setDetDescr
+globalflags.Luminosity='zero'
+globalflags.ConditionsTag=setGlobalTag
+
+from AthenaCommon.BeamFlags import jobproperties
+if ('Cosmic' in setMenu) or ('LS1_v1' in setMenu):
+    jobproperties.Beam.beamType = 'cosmics'
+else:
+    jobproperties.Beam.beamType = 'collisions'
+
+if globalflags.InputFormat=='bytestream':
+    if '_run_number' not in dir():
+        import PyUtils.AthFile as athFile
+        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+        af = athFile.fopen(athenaCommonFlags.BSRDOInput()[0])
+        _run_number = af.run_number[0]
+
+    from RecExConfig.RecFlags import rec
+    rec.RunNumber =_run_number
+
+    if _run_number>=276073:       #start of periodD1, 25ns bunch spacing 
+        jobproperties.Beam.bunchSpacing=25
+        log.info('Bunch spacing set to %dns for a bytestream input. It can be overriden by BunchSpacing50ns=True'
+                 % jobproperties.Beam.bunchSpacing())
+
+
+# RecEx flags
+from RecExConfig.RecFlags import rec
+rec.doWriteESD = False
+rec.doWriteAOD = False
+rec.doWriteTAG = False
+rec.doESD = False
+rec.doAOD = False
+rec.doTruth = False
+
+#-------------------------------------------------------------
+# Menu
+#  - allow to run individual slices by simply doing testSliceName=True
+#  - for more detailed control use "addSignatures" and "removeSignatures" directly
+#-------------------------------------------------------------
+sliceList=[]
+slicesToRun=[]
+for prop in dir(TriggerFlags):
+    if prop[-5:]=='Slice':
+        sliceName=prop
+        sliceList+=[sliceName]
+        if dir().count('test'+sliceName[:-5]) and globals()['test'+sliceName[:-5]]:
+            slicesToRun+=[sliceName]
+
+if slicesToRun or emptyMenu:
+    slicesToDisable=set(sliceList).difference(slicesToRun)
+    #make a list of slices to disable once the menu has been setup
+    for slice in slicesToDisable:
+        removeSignatures[slice]='ALL'
+else:
+    slicesToRun=['All']
+
+#-------------------------------------------------------------
+# Apply modifiers
+#-------------------------------------------------------------
+for mod in modifierList:
+    mod.preSetup()
+
+
+# should maybe implement the actual filter with regular expressions for added flexibility 
+def enableDisableChains():
+    # this functions is called in menu generations after the
+    # default signatures have been setup according to choice of menu
+    for s in sliceList:
+        slice=getattr(TriggerFlags,s)
+        if s in removeSignatures:
+            remove=removeSignatures[s]
+            log.warn('Disabling '+str(remove)+' of '+s)
+            if remove=='ALL':
+                signatures_all = slice.signatures.get_Value()  # Save the chain definitions
+                slice.signatures.set_Value([])                 # Remove all chains
+            else:
+                slice.disableSignatures(remove)
+        if s in addSignatures:
+            add=addSignatures[s]            
+            slice.enableSignatures([sig for sig in signatures_all if sig[0] in add])
+            log.info('Enabled '+str(add)+' in '+s)
+
+
+from TriggerMenu.menu.GenerateMenu import GenerateMenu
+
+GenerateMenu.overwriteSignaturesWith(enableDisableChains)
+
+
+log.info("=============== Running slices: ===============")
+for s in slicesToRun:
+    log.info(s)
+log.info("===============================================")
+
+
+#-------------------------------------------------------------
+# Setup trigger
+#-------------------------------------------------------------
+include("TriggerJobOpts/Trigger_topOptions_standalone.py")
+log = logging.getLogger('runHLT_standalone.py')
+
+# ----------------------------------------------------------------
+# Number of events to be processed - for athena
+# ----------------------------------------------------------------
+theApp.EvtMax = EvtMax
+if hasattr(svcMgr,"EventSelector"):
+    svcMgr.EventSelector.SkipEvents = SkipEvents 
+    
+#-------------------------------------------------------------
+# Apply modifiers
+#-------------------------------------------------------------
+for mod in modifierList:
+    mod.postSetup()
+
+#-------------------------------------------------------------
+# Conditions overrides
+#-------------------------------------------------------------    
+if len(condOverride)>0:
+    from IOVDbSvc.CondDB import conddb    
+    for folder,tag in condOverride.iteritems():
+        log.warn('Overriding folder %s with tag %s' % (folder,tag))
+        conddb.addOverride(folder,tag)
+                
+if not TriggerFlags.Online.doValidation():  # Suppress this printout in ATN tests
+    from AthenaCommon.JobProperties import jobproperties
+    jobproperties.print_JobProperties('tree&value')
+    print AlgSequence
+    print ServiceMgr
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py
index d37c4af5d85..c98b0ae0c8c 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py
@@ -1,7 +1,9 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # import flags
-include("TrigUpgradeTest/testHLT_MT.py")  # noqa: F821
+doWriteRDOTrigger = False
+doWriteBS = False
+include("TriggerJobOpts/runHLT_standalone.py")  # noqa: F821
 
 #################################
 # Configure L1Decoder
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/share/generateMT.py b/Trigger/TriggerCommon/TriggerMenuMT/share/generateMT.py
index eac3b0e4bcb..9f5039fe5a8 100755
--- a/Trigger/TriggerCommon/TriggerMenuMT/share/generateMT.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/share/generateMT.py
@@ -1,8 +1,10 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 setMenu             = "LS2_v1"
+doWriteRDOTrigger   = False
+doWriteBS           = False
 endJobAfterGenerate = False
 from TriggerJobOpts.TriggerFlags import TriggerFlags
 TriggerFlags.generateMenuDiagnostics = True
-include("TrigUpgradeTest/testHLT_MT.py")
+include("TriggerJobOpts/runHLT_standalone.py")
 
-- 
GitLab