ATLAS Offline Software
JetConfigFlags.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.AthConfigFlags import AthConfigFlags
4 from AthenaConfiguration.Enums import HIMode
5 from JetRecConfig.StandardJetContext import createJetContextFlags
6 
7 
9  flags = AthConfigFlags()
10 
11  flags.addFlag("Jet.doUpstreamDependencies", False)
12  flags.addFlag("Jet.WriteToAOD",
13  lambda prevFlags: prevFlags.Reco.HIMode in [HIMode.HI,HIMode.UPC,HIMode.HIP] )
14  flags.addFlag("Jet.useCalibJetThreshold", True)
15 
16  flags.addFlagsCategory("Jet.Context",createJetContextFlags)
17 
18  # strictMode will cause jobs to crash if inputs are missing. This
19  # is disabled by default in production code because inputs
20  # sometimes go missing for good reasons in production.
21  flags.addFlag("Jet.strictMode", _useStrictMode)
22  return flags
23 
24 
25 # specific flag defaults
26 #
27 def _useStrictMode(flags):
28  """Strict mode is disabled by default in production jobs, but
29  enabled otherwise
30  """
31  return not any([
32  flags.Output.doWriteESD,
33  flags.Output.doWriteAOD,
34  flags.Output.doWriteDAOD,
35  flags.Output.doWriteEVNT,
36  flags.Output.doWriteEVNT_TR,
37  flags.Output.doWriteBS,
38  flags.Output.doWriteRDO,
39  flags.Output.doWriteRDO_SGNL,
40  flags.Output.HISTFileName,
41  ])
python.JetConfigFlags.createJetConfigFlags
def createJetConfigFlags()
Definition: JetConfigFlags.py:8
python.JetConfigFlags._useStrictMode
def _useStrictMode(flags)
Definition: JetConfigFlags.py:27