Skip to content
Snippets Groups Projects
Verified Commit 8f10285d authored by Tadej Novak's avatar Tadej Novak
Browse files

Cleanup Input.OverrideRunNumber flag usage in event selector config

parent 9b3dcc13
No related branches found
No related tags found
No related merge requests found
......@@ -31,24 +31,24 @@ def EventSelectorAthenaPoolCfg(flags):
assert DataRunNumber >= 0, (
"flags.Input.OverrideRunNumber was True, but provided DataRunNumber (%d) is negative. "
"Use a real run number from data." % DataRunNumber)
evSel.OverrideRunNumber = flags.Input.OverrideRunNumber
evSel.OverrideRunNumber = True
evSel.RunNumber = DataRunNumber
evSel.FirstLB = FirstLB
evSel.InitialTimeStamp = InitialTimeStamp # Necessary to avoid a crash
if hasattr(evSel, "OverrideRunNumberFromInput"):
evSel.OverrideRunNumberFromInput = flags.Input.OverrideRunNumber
evSel.OverrideRunNumberFromInput = True
if OldRunNumber > 0:
evSel.OldRunNumber = OldRunNumber
elif flags.Common.ProductionStep in [ProductionStep.Simulation, ProductionStep.FastChain]:
# Behaviour for Simulation and FastChain jobs using RunAndLumiOverrideList
from AthenaKernel.EventIdOverrideConfig import getMinMaxRunNumbers, getFirstLumiBlock
minMax = getMinMaxRunNumbers(flags)
evSel.OverrideRunNumber = flags.Input.OverrideRunNumber
evSel.OverrideRunNumber = True
evSel.RunNumber = minMax[0]
evSel.FirstLB = getFirstLumiBlock(flags, minMax[0])
evSel.InitialTimeStamp = flags.IOVDb.RunToTimestampDict.get(minMax[0], 1) # TODO fix repeated configuration
if hasattr(evSel, "OverrideRunNumberFromInput"):
evSel.OverrideRunNumberFromInput = flags.Input.OverrideRunNumber
evSel.OverrideRunNumberFromInput = True
else:
# Behaviour for Digitization jobs using RunAndLumiOverrideList
pass
......
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