Skip to content

Add schema evolution rules for vector<Float_t> to vector<Double_t> change#129

Open
cmargalejo wants to merge 3 commits into
masterfrom
cris_fix_signal_schema_v3_float_to_double
Open

Add schema evolution rules for vector<Float_t> to vector<Double_t> change#129
cmargalejo wants to merge 3 commits into
masterfrom
cris_fix_signal_schema_v3_float_to_double

Conversation

@cmargalejo

@cmargalejo cmargalejo commented Jun 12, 2026

Copy link
Copy Markdown
Member

cmargalejo Ok: 18 Powered by Pull Request Badge

fSignalTime and fSignalCharge changed from vector<Float_t> to vector<Double_t> in ClassDef version 4 (#109) without schema evolution rules. These #pragma read rules 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).

cmargalejo and others added 3 commits June 11, 2026 22:45
…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>
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.
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.

1 participant