Add schema evolution rules for vector<Float_t> to vector<Double_t> change#129
Open
cmargalejo wants to merge 3 commits into
Open
Add schema evolution rules for vector<Float_t> to vector<Double_t> change#129cmargalejo wants to merge 3 commits into
cmargalejo wants to merge 3 commits into
Conversation
…ange fSignalTime and fSignalCharge changed from vector<Float_t> to vector<Double_t> in ClassDef version 4 (PR#109) without schema evolution rules. Reading older files misinterprets the 4-byte float payload as 8-byte doubles, which leads to huge bogus allocations (detectorlib#125). These #pragma read rules give ROOT an explicit conversion for on-disk versions <= 3. They can only take effect when the input file contains the StreamerInfo of the on-disk class version. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
for more information, see https://pre-commit.ci
The validation workflows cache the build with key BRANCH_NAME-sha, so a re-run cannot pick up the restG4 fix (rest-for-physics/restG4#148); only a new commit invalidates the cache.
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.
fSignalTimeandfSignalChargechanged fromvector<Float_t>tovector<Double_t>in ClassDef version 4 (#109) without schema evolution rules. These#pragma readrules give ROOT an explicit conversion for on-disk versions ≤ 3.Important caveat: the rules can only fire when the input file contains the StreamerInfo of the on-disk class version. Files produced by restManager lack them due to the bug fixed in rest-for-physics/framework#567, so this is insurance for files written after that fix — it has no effect on existing legacy files (see #125; those are recoverable with the tool in rest-for-physics/framework#566).