-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[RF][HS3] Add importers and exporters for RooRealSumFunc and RooHistPdf #10210
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
Conversation
|
Can one of the admins verify this patch? |
157c44d to
98ba13f
Compare
| { | ||
| const RooRealSumFunc *pdf = static_cast<const RooRealSumFunc *>(func); | ||
| elem["type"] << key(); | ||
| auto &samples = elem["samples"]; |
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.
Why is this called samples? This is specific to HistFactory, but in general the functions can also represent things that are not "samples". Can it just be called "functions" without any compatibility issues?
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.
I opted for "samples" rather than "functions" because the structure of the sumpdf with "functions" and "coefficients" is clearly intended to work that way - if you're just adding random stuff, you could also use RooAddition or RooAddPdf
| bool importPdf(RooJSONFactoryWSTool *tool, const JSONNode &p) const override | ||
| { | ||
| std::string name(RooJSONFactoryWSTool::name(p)); | ||
| if (!p.has_child("data")) { |
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.
I only see a data child here. But to fully specify a RooHistPdf, don't you also need the bin boundaries? Where are they stored?
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 bin boundaries are stored in the observables.
|
Hi Carsten, thanks for the PR! LGTM for the code, I only have a few comments about what is stored in the JSON. |
4066314 to
3740d21
Compare
It's better to have the tests in C++, because this is easier to debug in case of failures.
136cd90 to
6bbb1e3
Compare
ea83b99 to
4a0bdf9
Compare
Follow up to 98f6c2f, where `RooStats::FeldmanCousins::SetData()` got removed because it was deprecated. However, it was necessary to keep it because the base class requires it to be implemented.
4a0bdf9 to
5697b79
Compare
|
Starting build on |
|
Build failed on mac12/noimt. Warnings:
And 53 more Failing tests:
|
|
Build failed on ROOT-performance-centos8-multicore/cxx17. Warnings:
And 130 more Failing tests:
|
|
Build failed on ROOT-ubuntu18.04/nortcxxmod. Warnings:
And 60 more Failing tests:
|
|
Build failed on ROOT-ubuntu2004/python3. Warnings:
And 54 more Failing tests:
|
|
Build failed on mac11/cxx14. Warnings:
And 54 more Failing tests:
|
This Pull request:
Adds importers and exporters for RooHistPdf and RooRealSumFunc
Checklist:
This PR fixes #