MC-RECO: Ability to process empty timeframes (Part 2) - #15714
Open
sawenzel wants to merge 2 commits into
Open
Conversation
sawenzel
requested review from
a team,
afurs,
andreasmolander,
arossi81,
bazinski,
coppedis,
davidrohr,
f3sch,
fcolamar,
fgrosa,
fprino,
gvolpe79,
jotwinow,
kharlov,
mconcas,
mcoquet642,
njacazio,
noferini,
peressounko,
sahilupadhyaya92,
shahor02,
wiechula and
wille10
as code owners
August 24, 2026 11:45
This fixes a crash in the ITS, MFT, MCH and MID digit readers when the digit tree of a timeframe has no entry. - A timeframe holds no collision at all whenever the interaction rate is low enough, and the digitiser then writes a valid tree with zero entries. - The ITS/MFT reader guarded this with an assert, which is compiled out of every production build because ENABLE_CASSERT defaults to OFF, and then dereferenced branch addresses that GetEntry had not filled. - The MCH and MID readers threw on the failed TTreeReader::Next(). - All four now send empty output and end the stream. - The two asserts in the ITS/MFT connectTree become real errors for the same reason. https://its.cern.ch/jira/browse/O2-7132 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This replaces a disabled assert with a real check in 36 ROOT-tree reader specs, so that a timeframe whose tree has no entry ends the stream instead of reading past the end. - Every one of them carried the same two lines: assert(ent < mTree->GetEntries()) with the comment "this should not happen", followed by mTree->GetEntry(ent). - ENABLE_CASSERT defaults to OFF, so the assert is compiled out of every production build and the reader then publishes branch addresses that GetEntry never filled. - A timeframe holds no collision whenever the interaction rate is low enough, which is when the trees come out empty. - The readers now end the stream, which the consumers downstream already handle. - Detectors/Upgrades/ALICE3/IOTOF is left alone: it has no ControlService. https://its.cern.ch/jira/browse/O2-7132 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
sawenzel
force-pushed
the
sawenzel/empty-timeframe-readers
branch
from
August 24, 2026 11:48
dabbfd9 to
dc8f978
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows reconstruction to handle empty-timeframes sanely instead of crashing.