-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[RF] Improvements to RooAbsPdf::paramOn()
formatting
#12608
Conversation
Starting build on |
The `Format(const char*, int)` command arg for `RooAbsPdf::paramOn()` is long superseeded by `Format(const char*, ...)`, which takes additional command arguments instead of a single additional integer to specify the number of significant digits.
Closes JIRA issue 6039: https://sft.its.cern.ch/jira/browse/ROOT-6039 In the issue, it was suggested to make that the default, but I think this is a too drastic change. People often have long variable titles, and putting these by default in the plot labels might mess up the plots. As a compromise, this commit suggests an easy option to change the behavior of `paramOn()`, just using `T` in the format string instead of `N`.
Starting build on |
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.
LGTM!
Thanks for fixing this old JIRA issue.
I have just a comment the changes in the paramOn
interface
@@ -3190,13 +3152,10 @@ RooPlot* RooAbsPdf::paramOn(RooPlot* frame, const RooAbsData* data, const char * | |||
/// values specify the initial relative position of the text box in the plot frame. | |||
|
|||
RooPlot* RooAbsPdf::paramOn(RooPlot* frame, const RooArgSet& params, bool showConstants, const char *label, |
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.
Here you are changing the paramOn
interface. Can the old one be kept for backward compatibility and mark as deprecated and maybe removed later on ?
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.
This is private
function that is an implementation detail which is called by the public paramOn()
function. So it doesn't matter if the change the interface
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.
Good! I missed it was a private function.
Two changes:
RooFit::Format(const char* option, int)
command argumentRooAbsPdf::paramOn()
overload that take a formatting string directlyRooAbsPdf::paramOn()
, closing the followng JIRA ticket:https://sft.its.cern.ch/jira/browse/ROOT-6039
More detail in the commit descriptions.