-
Notifications
You must be signed in to change notification settings - Fork 10
Update how type information is passed from Phlex to FORM #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (50.98%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #252 +/- ##
==========================================
- Coverage 76.66% 75.21% -1.45%
==========================================
Files 124 124
Lines 2725 2905 +180
Branches 475 510 +35
==========================================
+ Hits 2089 2185 +96
- Misses 442 501 +59
- Partials 194 219 +25
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
knoepfel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@gemmeren @aolivier23 @barnaliy Could you review this PR ? Thanks. |
|
@pcanal : This is a clean improvement - eliminating the manual type map makes the API much simpler. I particularly like the use of DemangleName(). Thanks for doing all this work! |
gemmeren
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Philippe,
no objections, nut FORM will have to support non-ROOT backends, w/o DemangleName...
|
@gemmeren @pcanal @barnaliy Boost has a name demangler that doesn't depend on ROOT. It comes for free with something else phlex is using and seems to work with ROOT. Here's some documentation I quickly found: https://www.boost.org/doc/libs/latest/libs/core/doc/html/core/demangle.html Will take a look at the PR tomorrow if it's not already merged. But sounds like great work! |
aolivier23
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface update looks good.
I think this will work with an eventual RNTuple backend but makes that a little more difficult. We have been using ROOT::RFieldBase::Create() when writing in the prototype, and that doesn't work with std::type_info as of writing. I think I see how to go through two steps using TClass to get a type name string using std::type_info. Or I could fall back to TClassEdit (or Boost) like you do.
std::type_info looks like it will work fine in reading mode. RNTupleReader::GetView() already has a std::type_info interface in the ROOT 6.36 documentation.
Given that ROOT knows about the type via their
std::type_info(and their C++ names) and that we can not lookup astd::type_infofrom anstd::type_index(but the reverse is supported by the C++ standard), we need to pass around thetype_info(otherwise we need to build a map of supported types).This solves #199