Skip to content

Factor the primary request out of the sim worker kernel - #16058

Merged
sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/g4mt-pr5-fetch-chunk
Nov 6, 2026
Merged

sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:swenzel/g4mt-pr5-fetch-chunk

Conversation

@sawenzel

@sawenzel sawenzel commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

This moves the request for a chunk of primaries out of O2SimDevice::Kernel into a new O2SimDevice::fetchChunk. It sends the request, waits for the answer, backs off while the server is busy and decodes the chunk, and reports whether there is work, nothing yet, the end-of-work marker, or nothing more to ask for. Kernel acts on that exactly as before.

The purpose is that a multithreaded Geant4 worker can later request its sub-event the same way a worker process does now.

Note that this is a pure refactor. A seeded o2-sim run (10 Pythia8 pp events, all detectors, Geant4, -j 8) gives identical kinematics and hits compared with dev. In service mode, a second batch submitted through o2-sim-client.py is also identical to dev.

Relates to https://its.cern.ch/jira/browse/O2-7305

Assisted by Claude Code.

This moves the request for a chunk of primaries out of O2SimDevice::Kernel into
O2SimDevice::fetchChunk, without changing the behaviour.

- fetchChunk sends the request, waits for the answer, backs off while the server is busy and decodes the chunk.
- It reports whether there is work, nothing yet, the end-of-work marker, or nothing more to ask for, and Kernel acts on that as before.

This lets a multithreaded Geant4 worker request its work the same way as a worker process does now.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sawenzel
sawenzel requested a review from a team as a code owner November 5, 2026 22:00
@sawenzel
sawenzel merged commit 155565e into AliceO2Group:dev Nov 6, 2026
11 checks passed
@sawenzel
sawenzel deleted the swenzel/g4mt-pr5-fetch-chunk branch November 6, 2026 05:57
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