Repository navigation
[RF] Refactor C function binding helper code to avoid duplication - #23751
Open
guitargeek wants to merge 2 commits into
Open
guitargeek wants to merge 2 commits into
guitargeek wants to merge 2 commits into
Conversation
The RooCFunction[1-4]Map classes were four copies of the same class, differing only in the function pointer type. Replace them with a single `RooFit::Detail::CFunctionMap<Func>` template, keeping the old names as alias templates so that `RooCFunctionNRef<...>::fmap().add(...)` keeps working. Argument names are now passed variadically; unnamed arguments still fall back to x, y, z, w. The "registered name or hex address" logic of the RooCFunctionNRef::name() functions is moved into the map as well. No class layout or persisted class name changes. 🤖 Done with the help of AI
The custom `Streamer()` of the RooCFunction[1-4]Ref classes and the `printArgs()` of the RooCFunction[1-4]Binding and PdfBinding classes were identical copies. Implement them once in `RooFit::Detail::streamCFunctionRef()` and `RooFit::Detail::printCFunctionArgs()`. The on-file format is unchanged: files written before this change are read back identically and vice versa. 🤖 Done with the help of AI
Test Results 23 files 23 suites 3d 23h 28m 29s ⏱️ For more details on these failures, see this check. Results for commit 25017ce. |
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.
The RooCFunction classes contain relatively complicated custom streamer code that should better not be be duplicated.
See the commit descriptions for more detail.