Conversation
This fixes a problem in how the o2-sim driver judges the hit merger's exit code. - The condition `!= 0 || != 128` is always true, so every normal merger exit was reported as an error. - It now reads `!= 0 && != 128`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes the generator cache of the o2-sim primary server so that it skips external kinematics, as its comment intends. - The condition `!= "extkin" || != "extkinO2"` is always true, so extkin generators were cached too. - A service-mode reconfiguration with a new kinematics file then reused the old generator and file. - The condition now uses `&&`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes the info thread of the o2-sim primary server for requests of unexpected size. - After the error reply the thread still read the request and could send a second reply on the REP socket. - It now continues to the next request after the error reply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes how the hit merger advances to the next event while flushing. - The skip paths advanced the event counter but then carried on with the current event. - With --noemptyevents, an event without hits was written when the next event was already complete, and that next event was then skipped. - An event without buffered info dereferenced the end iterator. - The loop now iterates over flushable event IDs and every skip path is a plain continue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes a memory leak in the hit merger and makes its merge flag thread-safe. - cleanEvent was empty, so the decoded SubEventInfo objects of every event were never freed. - The MC tracks and track references of events dropped by --noemptyevents were never freed either. - cleanEvent now owns the release of all three buffers; the merge functions no longer delete. - Buffer entries are emptied rather than erased, since erasing from a tbb::concurrent_unordered_map is not safe while the receiving thread inserts. - handleSimData keeps the event id and event count as values, since a merge thread may free the event info. - mergingInProgress is shared by two threads and is now std::atomic<bool>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes the hit merger when it runs without disc output. - The kinematics and MC-header file and tree pointers were never initialised. - With --noDiscOutput they stayed garbage, and the merge tested them as if they were valid trees. - They are now initialised to nullptr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This fixes the order in which a parallel o2-sim worker finalizes and sends the hits of an event. - Detectors ran FinishEvent after SendData, while serial o2-sim (FairMCApplication) runs it before filling the output. - TRD sorts its hits in FinishEvent, and PHOS and CPV sort them and sum duplicates. - With TMessage transport their hits were written unsorted and, for PHOS and CPV, with duplicates. - With shared memory the merger read the buffers while the worker rewrote them, so TRD output differed between the two transports. - FinishEvent now runs for all detectors before SendData, and EndOfEvent after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
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.
A few stability fixes for o2-sim found by general review of Claude code.