Skip to content

Commit

Permalink
Fix maxevents (#59)
Browse files Browse the repository at this point in the history
* set maxEvents to the number of events per file

* set maxEvents to the smallest of 500 and nEventsPerInputFile
  • Loading branch information
esseivaju authored Jul 26, 2024
1 parent 14499cf commit 1ffaa77
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/raythena/actors/esworker.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ def modify_job(self, job: PandaJob) -> PandaJob:
else:
cmd = f"{cmd} --jobNumber={job_number} "

maxEvents = min(500, job['nEventsPerInputFile'])
if "--maxEvents=" in cmd:
cmd = re.sub(r"--maxEvents=[0-9]+", f"--maxEvents={maxEvents}", cmd)
else:
cmd = f"{cmd} --maxEvents={maxEvents} "

job["jobPars"] = cmd
return job

Expand Down

0 comments on commit 1ffaa77

Please sign in to comment.