Allow non-zero starting event or subrun values#1799
Allow non-zero starting event or subrun values#1799michaelmackenzie wants to merge 1 commit intoMu2e:mainfrom
Conversation
|
Hi @michaelmackenzie,
which require these tests: build. @Mu2e/fnalbuild-users, @Mu2e/write have access to CI actions on main. ⌛ The following tests have been triggered for 37942eb: build (Build queue - API unavailable) |
|
☀️ The build tests passed at 37942eb.
N.B. These results were obtained from a build of this Pull Request at 37942eb after being merged into the base branch at 1d1b9f0. For more information, please check the job page here. |
|
Here's my review of PR #1799. I found a significant issue: 🐛 Unsigned Integer Underflow When
|
| Issue | Severity | Location |
|---|---|---|
Off-by-one in firstEventNumber_: First event is firstEventNumber + 1 due to pre-increment ++currentEventNumber_ |
🔴 Bug | Lines 145, 210 |
Unsigned wrap-around for subRunNumber_ initialization is intentional but could benefit from a comment |
🟡 Style | Line 144 |
The off-by-one is the most important finding — if a user configures firstEventNumber: 100, they'll get events starting at 101, which would silently produce incorrect event numbering when splitting subruns across files.
|
📝 The HEAD of |
This will allow making the current PBISequence detector steps file work properly, splitting a single subrun into multiple dts files without duplicate event numbers