Skip to content
Snippets Groups Projects
Commit 3fd21bbe authored by Stewart Martin-Haugh's avatar Stewart Martin-Haugh
Browse files

Move evtMax and skipEvents options to Execution, so they work in interactive jobs

parent e3052f48
No related branches found
No related tags found
No related merge requests found
...@@ -85,6 +85,17 @@ else: ...@@ -85,6 +85,17 @@ else:
import AthenaMP.PyComps as _amppy import AthenaMP.PyComps as _amppy
svcMgr += _amppy.MpEvtLoopMgr(NWorkers=opts.nprocs) svcMgr += _amppy.MpEvtLoopMgr(NWorkers=opts.nprocs)
#if EvtMax and SkipEvents are set, use them
from AthenaCommon.AthenaCommonFlags import jobproperties as jps
if jps.AthenaCommonFlags.EvtMax.statusOn:
theApp.EvtMax = jps.AthenaCommonFlags.EvtMax()
if jps.AthenaCommonFlags.SkipEvents.statusOn:
if hasattr(svcMgr,"EventSelector"):
svcMgr.EventSelector.SkipEvents = jps.AthenaCommonFlags.SkipEvents()
else:
_msg.warning('No EventSelector in svcMgr, not skipping events')
## in batch, run as many events as requested, otherwise explain ## in batch, run as many events as requested, otherwise explain
if opts.run_batch: if opts.run_batch:
## enable or not athena-mp ## enable or not athena-mp
......
...@@ -8,14 +8,6 @@ ...@@ -8,14 +8,6 @@
# athena.py <myJobOptions.py> runbatch.py # athena.py <myJobOptions.py> runbatch.py
try: try:
#if EvtMax and SkipEvents are set, use them
from AthenaCommon.AthenaCommonFlags import jobproperties as jps
if jps.AthenaCommonFlags.EvtMax.statusOn:
theApp.EvtMax = jps.AthenaCommonFlags.EvtMax()
if jps.AthenaCommonFlags.SkipEvents.statusOn:
if hasattr(svcMgr,"EventSelector"):
svcMgr.EventSelector.SkipEvents = jps.AthenaCommonFlags.SkipEvents()
theApp.run() # runs until theApp.EvtMax events reached theApp.run() # runs until theApp.EvtMax events reached
from AthenaCommon.Debugging import hookDebugger,DbgStage from AthenaCommon.Debugging import hookDebugger,DbgStage
if DbgStage.value == "fini": if DbgStage.value == "fini":
......
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