Skip to content

Please consider the following formatting changes to #15705 - #58

Closed
alibuild wants to merge 6 commits into
sawenzel:sawenzel/colcontext-empty-tffrom
alibuild:alibot-cleanup-15705
Closed

Please consider the following formatting changes to #15705#58
alibuild wants to merge 6 commits into
sawenzel:sawenzel/colcontext-empty-tffrom
alibuild:alibot-cleanup-15705

Conversation

@alibuild

Copy link
Copy Markdown

Your PR AliceO2Group#15705 cannot be merged as is. You should either run clang-format yourself and update the pull request, or merge this PR in yours.
You can find the AliceO2 coding conventions at https://github.com/AliceO2Group/CodingGuidelines.

@alibuild
alibuild requested a review from sawenzel as a code owner August 21, 2026 12:39
@alibuild
alibuild force-pushed the alibot-cleanup-15705 branch from 5275995 to eb2f166 Compare August 21, 2026 16:47
sawenzel and others added 5 commits August 24, 2026 11:44
This fixes a problem in the timeframe index structure of the collision
context and adds a unit test.

- getTimeFrameBoundaries closed only one timeframe per collision, so a
  timeframe without collisions was left out of the index structure
  entirely and the collisions after it were assigned to the wrong
  timeframe.
- The number of extracted per-timeframe contexts was therefore the number
  of non-empty timeframes, not the number of timeframes asked for, and
  the last tf<N>/collisioncontext.root could be missing.
- The scan now closes every timeframe a collision skips over and pads the
  result to the number of timeframes the caller asks for, so entry i always
  describes orbits [start + i*orbitsPerTF, start + (i+1)*orbitsPerTF).
- applyMaxCollisionFilter keeps an empty timeframe empty when it re-indexes,
  and extractSingleTimeframe returns a valid empty context for it.
- o2-steer-colcontexttool passes the number of timeframes it asked for,
  reports timeframes that came out empty together with the mean number of
  collisions per timeframe implied by the interaction rate, and refuses to
  continue when --noEmptyTF was requested.

https://its.cern.ch/jira/browse/O2-7132

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This fixes a problem in GenTPCLoopers::setFlatGas when the collision
context of a timeframe is empty.

- A timeframe holds no collision whenever the interaction rate is low
  enough, and the generator called exit(1) on it.
- The extent of the timeframe now comes from HBFUtils in that case, which
  is where it is defined, instead of from the last collision.
- With a single collision in the timeframe the mean interaction spacing
  was divided by zero; it is now taken from the interaction rate stored in
  the collision context.

https://its.cern.ch/jira/browse/O2-7132

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This fixes a segmentation fault in MCHDPLDigitizerTask when the collision
context of a timeframe is empty.

- The noise-only signal range was taken from eventRecords.front() and
  eventRecords.back(), which is undefined behaviour on an empty vector.
- A timeframe holds no collision whenever the interaction rate is low.
- The range now comes from HBFUtils in that case, so the noise covers the
  timeframe that is actually being digitised.

https://its.cern.ch/jira/browse/O2-7132

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This fixes the TPC digit writer producing a file without a tree when a
timeframe holds no collision.

- The custom close callback only called TFile::Close inside "if (entries >
  0)", and never called TFile::Write, so with nothing to write the tree
  never reached the file.
- The result was a 942 byte file with no o2sim tree, and every reader of it
  failed on a missing branch rather than on an empty tree.
- Each branch is now filled once with the empty default object it is bound
  to, so the file is an ordinary timeframe that happens to contain no digit
  and the readers downstream stay on their normal path.
- The tree is written explicitly, the way RootTreeWriter's own close does.

https://its.cern.ch/jira/browse/O2-7132

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This fixes the digit file of a timeframe without collisions carrying a label
branch of the wrong type.

- The MC label branch is declared as std::vector<char> and only becomes an
  IOMCTruthContainerView when a fill remaps it.
- With no collision nothing is filled, the branch keeps the raw type, and a
  reader binding IOMCTruthContainerView gets a class mismatch from
  SetBranchAddress rather than an empty tree.
- The close callback now writes one empty entry in every branch, remapping
  the label branch on the way, so the file has the same shape as an ordinary
  timeframe that happens to contain nothing.

https://its.cern.ch/jira/browse/O2-7132

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sawenzel
sawenzel force-pushed the sawenzel/colcontext-empty-tf branch from 6d91a54 to 41757d6 Compare August 24, 2026 11:15
@alibuild
alibuild force-pushed the alibot-cleanup-15705 branch from eb2f166 to bb0d882 Compare August 24, 2026 11:16
@sawenzel
sawenzel force-pushed the sawenzel/colcontext-empty-tf branch from 41757d6 to 3f49e82 Compare August 24, 2026 11:28
@alibuild alibuild closed this Aug 24, 2026
@alibuild
alibuild deleted the alibot-cleanup-15705 branch August 24, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants