ATLAS Offline Software
PerfMonConfigHelpers.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 def setPerfmonFlagsFromRunArgs(flags, runArgs):
4  """ A helper function to set perfmon flags from runArgs."""
5 
6  if hasattr(runArgs, 'perfmon') and runArgs.perfmon != 'none':
7  if runArgs.perfmon == 'fastmonmt':
8  flags.PerfMon.doFastMonMT = True
9  elif runArgs.perfmon == 'fullmonmt':
10  flags.PerfMon.doFullMonMT = True
11  else:
12  raise RuntimeError(f"Unknown perfmon type: {runArgs.perfmon}")
13 
14  try:
15  flags.PerfMon.OutputJSON = f"perfmonmt_{runArgs.trfSubstepName}.json"
16  except AttributeError:
17  pass # not a transform
python.PerfMonConfigHelpers.setPerfmonFlagsFromRunArgs
def setPerfmonFlagsFromRunArgs(flags, runArgs)
Definition: PerfMonConfigHelpers.py:3