Skip to content
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

Merged
merged 2 commits into from
Apr 4, 2023

Conversation

guitargeek
Copy link
Contributor

@guitargeek guitargeek commented Apr 4, 2023

Two changes:

  1. Removes the deprecated RooFit::Format(const char* option, int) command argument
  2. Remove deprecated RooAbsPdf::paramOn() overload that take a formatting string directly
  3. Make it possible to use parameter titles instead of variables in RooAbsPdf::paramOn(), closing the followng JIRA ticket:
    https://sft.its.cern.ch/jira/browse/ROOT-6039

More detail in the commit descriptions.

@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

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`.
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

Copy link
Member

@lmoneta lmoneta left a 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,
Copy link
Member

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 ?

Copy link
Contributor Author

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

Copy link
Member

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.

@github-actions
Copy link

github-actions bot commented Apr 4, 2023

Test Results

         6 files           6 suites   1d 7h 19m 54s ⏱️
  2 426 tests   2 413 ✔️ 0 💤 13
13 335 runs  13 316 ✔️ 0 💤 19

For more details on these failures, see this check.

Results for commit f0289fa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants