Pr566 slim - #569
Draft
Vindaar wants to merge 5 commits into
Draft
Conversation
… data Add a deliberately narrow restRoot command for TRestDetectorSignal versions 1 through 3, whose time and charge vectors were stored as Float_t before the modern version-4 Double_t schema. A plain-ROOT child process uses replica legacy classes to extract only the affected event branch into a private, source-identified intermediate, avoiding coexistence of old and current dictionaries. Build the result from a byte-for-byte local candidate, open it through the safe writable ROOT handle introduced by the PR 567 base, disable the incompatible signal branch, and use TTree fast cloning to preserve every unaffected branch as raw baskets. Refill only the current detector signal branch, leave unrelated keys in place without deserializing them, and validate source identity, structure, counts, and every converted signal value before atomically publishing a new output. The command rejects unsupported schemas, ROOT URLs, in-place and existing outputs, and mismatched intermediates. It never modifies the original and provides no generic, partial, or rollback modes. Update the detectorlib pin to current v4 code plus the focused opaque-data integration tests.
Add a user guide for the one-command local recovery, its default and explicit output naming, supported v1-v3 scope, provenance, validation, and failure guarantees. Link the command from the REST program inventory and expose it in restRoot help through the implementation commit. Record the developer architecture and the ROOT 6.26/10 fast-clone experiments that determined the process boundary. Explain why legacy extraction runs under plain ROOT, why raw cloning runs only after REST dictionaries are loaded, which unrelated content is preserved opaquely, and why generic CopyTree, ReadObj, or manual key and basket rewriting were rejected.
Record the concrete failure found in the canonical R00236 file: StreamerInfo produces a non-null emulated class for the removed zS2Raw process, yet TKey::ReadObj still segfaults while ROOT attempts to instantiate an abstract compiled base. The narrow recovery avoids that failure by retaining unrelated top-level keys in its initial byte-for-byte copy and never deserializing them. Advance the detectorlib test commit to assert this emulated-class precondition and exercise the shipped leading -l restRoot invocation.
Inspect the split detector-signal branch as soon as TRestRun opens a file. When current v4 dictionaries encounter an on-disk v1-v3 signal schema without its matching StreamerInfo, stop before metadata or event setup and direct the user to the one-time restRoot recovery command. Files carrying valid historical StreamerInfo continue through ROOT's normal schema evolution. Document the fail-fast boundary and the deliberate absence of partial-read support. Hide the recovery option from restRoot help in detector-free builds, and update the detectorlib test fixture to cover unsafe, naturally readable, and recovered legacy files.
for more information, see https://pre-commit.ci
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.
This is a reimplementation of the ideas from PR #566, but in a much more focused and succinct way.
The recovery workflow that is added now fully embraces that it is entirely specific to the
vector<float> -> vector<double>schema change and nothing else. And instead of building a full blown REST ROOT file copy mechanism that iterates a file to copy everything, we now essentially make an opaque copy and only mutate the parts of the file that actually changed.This PR depends on some minor additions to detectorlib for the CI to make sure the changes are actually working as expected. That is PR rest-for-physics/detectorlib#132.
For the moment this also targets the branch of #567, because this code now depends on that. So either way, we should focus on merging 567 first now.
I'll update the description at a later point.