diff --git a/scripts/TweakPSet.py b/scripts/TweakPSet.py index 734cb9b8c4..d1a9c3b6f5 100644 --- a/scripts/TweakPSet.py +++ b/scripts/TweakPSet.py @@ -187,6 +187,11 @@ def createScriptLines(opts, pklIn): tweak.addParameter("process.maxEvents.input", f"customTypeCms.untracked.int32({maxEvents})") + # special handling for LHE input files + if opts.lheInputFiles: + tweak.addParameter("process.source.skipEvents", + f"customTypeCms.untracked.uint32({int(opts.firstEvent) - 1})") + if opts.lastEvent: tweak.addParameter("process.source.lastEvent", f"customTypeCms.untracked.uint32({opts.lastEvent})")