Skip to content
Snippets Groups Projects
Commit a88489f8 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'mces-firstevent' into 'main'

Add Exec.FirstEvent flag and configure McEventSelector for 64-bit events

See merge request atlas/athena!70690
parents 7b138a91 bfc0c5ff
No related branches found
Tags nightly/main/2024-03-14T2001
No related merge requests found
......@@ -24,8 +24,9 @@ def initConfigFlags():
from AthenaCommon.Constants import INFO
acf.addFlag('Exec.OutputLevel', INFO, help='Global OutputLevel')
acf.addFlag('Exec.PrintAlgsSequence', False, help='print algorithm sequence in ApplicationMgr')
acf.addFlag('Exec.MaxEvents', -1, help='number of events to proceess (-1 for all)')
acf.addFlag('Exec.SkipEvents', 0, help='number of events to skip')
acf.addFlag('Exec.MaxEvents', -1, type=int, help='number of events to proceess (-1 for all)')
acf.addFlag('Exec.SkipEvents', 0, type=int, help='number of events to skip')
acf.addFlag('Exec.FirstEvent', 1, type=int, help='first event number when not reading from input file')
acf.addFlag('Exec.DebugStage', '', help='attach debugger at stage: conf, init, exec, fini')
acf.addFlag('Exec.Interactive', "", help='interactive prompt at stage: init, exec')
acf.addFlag('Exec.FPE', 0, help='FPE check mode: -2 (no FPE check), -1 (abort with core-dump), 0 (FPE Auditor w/o stack-tace) , >0 (number of stack-traces printed by the job)')
......
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
......@@ -15,6 +15,14 @@ def McEventSelectorCfg(flags, **kwargs):
if flags.Input.TimeStamps:
kwargs.setdefault("InitialTimeStamp", flags.Input.TimeStamps[0])
if flags.Exec.FirstEvent <= 0:
raise ValueError("FirstEvent must be a positive, non-zero integer")
kwargs.setdefault("FirstEvent", flags.Exec.FirstEvent)
# we use 64-bit numbers by default now
kwargs.setdefault("EventsPerRun", int(2**63 - 1)) # sys.maxint on a 64-bit machine
evSel = CompFactory.McEventSelector("EventSelector", **kwargs)
cfg.addService(evSel)
cfg.setAppProperty("EvtSel", evSel.getFullJobOptName())
......
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