Skip to content
Snippets Groups Projects
Commit 2ce6444a authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'master-pmonmt-ca-integration-1' into 'master'

SimuJobTransforms: Adding support for PerfMonMT in CA-based simulation jobs

See merge request atlas/athena!47014
parents eecd0b7d 9274fe07
No related branches found
No related tags found
No related merge requests found
......@@ -107,4 +107,9 @@ def CommonSimulationCfg(ConfigFlags, log):
cfg.merge( OutputStreamCfg(ConfigFlags,"EVNT_TR", ItemList=getStreamEVNT_TR_ItemList(ConfigFlags), disableEventTag=True) )
cfg.getEventAlgo("OutputStreamEVNT_TR").AcceptAlgs=AcceptAlgNames
# Add MT-safe PerfMon
if ConfigFlags.PerfMon.doFastMonMT or ConfigFlags.PerfMon.doFullMonMT:
from PerfMonComps.PerfMonCompsConfig import PerfMonMTSvcCfg
cfg.merge(PerfMonMTSvcCfg(ConfigFlags))
return cfg
......@@ -132,6 +132,10 @@ def fromRunArgs(runArgs):
if hasattr(runArgs, 'truthStrategy'):
ConfigFlags.Sim.TruthStrategy = runArgs.truthStrategy
# Setup perfmon flags from runargs
from SimuJobTransforms.SimulationHelpers import setPerfmonFlagsFromRunArgs
setPerfmonFlagsFromRunArgs(ConfigFlags, runArgs)
# Special Configuration preInclude
specialConfigPreInclude(ConfigFlags)
......
......@@ -142,6 +142,10 @@ def fromRunArgs(runArgs):
if hasattr(runArgs, 'truthStrategy'):
ConfigFlags.Sim.TruthStrategy = runArgs.truthStrategy
# Setup perfmon flags from runargs
from SimuJobTransforms.SimulationHelpers import setPerfmonFlagsFromRunArgs
setPerfmonFlagsFromRunArgs(ConfigFlags, runArgs)
# Special Configuration preInclude
specialConfigPreInclude(ConfigFlags)
......
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
def setPerfmonFlagsFromRunArgs(ConfigFlags, runArgs):
""" A helper function to set perfmon flags from runArgs."""
if hasattr(runArgs, 'perfmon') and runArgs.perfmon != 'none':
if runArgs.perfmon == 'fastmonmt':
ConfigFlags.PerfMon.doFastMonMT = True
elif runArgs.perfmon == 'fullmonmt':
ConfigFlags.PerfMon.doFullMonMT = True
else:
raise RuntimeError(f"Unknown perfmon type: {runArgs.perfmon}")
ConfigFlags.PerfMon.OutputJSON = f"perfmonmt_{runArgs.trfSubstepName}.json"
def getDetectorsFromRunArgs(ConfigFlags, runArgs):
"""Generate detector list based on runtime arguments."""
if hasattr(runArgs, 'detectors'):
......
......@@ -191,6 +191,9 @@ def addCommonSimTrfArgs(parser):
parser.add_argument('--truthStrategy',
type=argFactory(argString), metavar='CONFIGNAME',
help='Specify the named group of Truth strategies that the simulation should use. E.g. MC12, MC15aPlus, MC16', group='CommonSim')
parser.add_argument('--perfmon', default=argString('fastmonmt'),
type=argFactory(argString),
help='Enable PerfMon (fastmonmt [default], fullmonmt, or none)', group='CommonSim')
## Add common Simulation/Digitization transform arguments to an argparse ArgumentParser
def addCommonSimDigTrfArgs(parser):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment