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] Inconsistent prints from some RooStats classes #17429

Open
VanyaBelyaev opened this issue Jan 15, 2025 · 2 comments
Open

[RF] Inconsistent prints from some RooStats classes #17429

VanyaBelyaev opened this issue Jan 15, 2025 · 2 comments

Comments

@VanyaBelyaev
Copy link

Explain what you would like to see improved and how.

some RooStats classes, e.g. RooStats::AsymptoticCalculator perform prints using all three printing ways within O(10) lines, e.g.

  1. printf
  2. std::cout
  3. oocoutP

As result, it makes impossible to control the output verbosity.
Would it be possible to convert all std::cout and printf into ROOT/RooFit prints ?

ROOT version

6.35/1
I am using LCG dev3 nightly build from cvmfs

Installation method

cvmfs, LCG dev3 nightly slot

Operating system

Linux, lxplus.cern.ch

Additional context

No response

@guitargeek guitargeek changed the title Inconsistent prints from some RooStats classes [RF] Inconsistent prints from some RooStats classes Jan 17, 2025
@guitargeek
Copy link
Contributor

Hi @VanyaBelyaev!

It's quite hard to tell what the concrete action to address this issue is. I have refactored the code already such that it only uses either RooFit logging of std::cout. With git grep "std::cout" in roofit/roostats, one can see that there about 200 std::couts in RooStats. That's quite a lot, and not all RooStats classes are used much so I don't think it's necessarily worth addressing migrating all these (although it also doesn't harm I guess...). Or you mean we should only make sure that each class is either consistently using RooFit logging or std::cout? You mean we should only update the AsymptoticCalculator or also more or even all RooStats classes?

Another question is: which message topic should be used? Should we add a new MsgTopic::RooStats and migrate all the std::cout to that? There is already MsgTopic::HistFactory.

So what is in your opinion the right action to address this issue?

@VanyaBelyaev
Copy link
Author

hI @guitargeek

Thank you for addressing the issue.
I would say that the ideal solution will be to migrate all printf and std::cout to RooFit logging.
In reality, I thnk it is ok to fix

  1. all printf (there are no too manyof them)
  2. std::cout for the most "popular" classes line AsymptoticCalculator

As for the topic for RooFit logging topic,I do not have a strong opinion. Separate MsgTopic::RooStats looks attractive.

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

No branches or pull requests

2 participants