Skip to content

MC-RECO: Ability to process empty timeframes (Part 2) - #15714

Open
sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:sawenzel/empty-timeframe-readers
Open

MC-RECO: Ability to process empty timeframes (Part 2)#15714
sawenzel wants to merge 2 commits into
AliceO2Group:devfrom
sawenzel:sawenzel/empty-timeframe-readers

Conversation

@sawenzel

Copy link
Copy Markdown
Collaborator

Allows reconstruction to handle empty-timeframes sanely instead of crashing.

sawenzel and others added 2 commits August 24, 2026 13:46
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
sawenzel force-pushed the sawenzel/empty-timeframe-readers branch from dabbfd9 to dc8f978 Compare August 24, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant