Repository navigation
TPC: fix pair swap when reading CalArray<PadFlags> written by the cus… - #16124
Open
matthias-kleiner wants to merge 1 commit into
Open
matthias-kleiner wants to merge 1 commit into
matthias-kleiner wants to merge 1 commit into
Conversation
…tom streamer The custom member streamer for CalArray<PadFlags>::mData writes the count N/2 followed by N single shorts, but reads N/2 ints and reinterprets each as a pair of flags (the layout written by ROOT < 6.33). Every object written by the streamer itself (ROOT >= 6.33) therefore comes back with each pair of adjacent pads swapped. This affects all IDC_PadStatusMap objects written since the streamer was introduced (e.g. 2026 data, ROOT 6.36.04): the dead channel map used in reconstruction marks the neighbour of an isolated bad pad instead of the pad itself. Objects written with ROOT < 6.33 (e.g. 2025, ROOT 6.32.06) are read correctly. The class version did not change, so the reader now selects the layout by the ROOT version that wrote the buffer (TBuffer::GetVersionOwner(); the current ROOT if the buffer has no file): < 6.33 as before, >= 6.33 N shorts. The writer is unchanged, so existing objects stay readable and no re-upload is needed. Add a ROOT I/O round-trip unit test for CalDet<PadFlags>, which fails with the old reader (349440 of 524160 flags differ) and passes with the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
matthias-kleiner
requested review from
davidrohr,
shahor02 and
wiechula
as code owners
November 14, 2026 10:37
Collaborator
|
Error while checking build/O2/fullCI_slc9 for e4426e4 at 2026-11-14 12:43: Full log here. |
shahor02
approved these changes
Nov 14, 2026
This branch has not been deployed
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.
…tom streamer
The custom member streamer for CalArray::mData writes the count N/2 followed by N single shorts, but reads N/2 ints and reinterprets each as a pair of flags (the layout written by ROOT < 6.33). Every object written by the streamer itself (ROOT >= 6.33) therefore comes back with each pair of adjacent pads swapped. This affects all IDC_PadStatusMap objects written since the streamer was introduced (e.g. 2026 data, ROOT 6.36.04): the dead channel map used in reconstruction marks the neighbour of an isolated bad pad instead of the pad itself. Objects written with ROOT < 6.33 (e.g. 2025, ROOT 6.32.06) are read correctly.
The class version did not change, so the reader now selects the layout by the ROOT version that wrote the buffer (TBuffer::GetVersionOwner(); the current ROOT if the buffer has no file): < 6.33 as before, >= 6.33 N shorts. The writer is unchanged, so existing objects stay readable and no re-upload is needed.
Add a ROOT I/O round-trip unit test for CalDet, which fails with the old reader (349440 of 524160 flags differ) and passes with the new one.