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

[PyROOT] Overloads like foo(bool) foo(double) not correctly resolved #16573

Open
guitargeek opened this issue Oct 2, 2024 · 0 comments
Open

Comments

@guitargeek
Copy link
Contributor

guitargeek commented Oct 2, 2024

Reproducer:

python
>>> import ROOT
>>> ROOT.RooFit.Minos(1).getSet(0).Print("v")
  1) 0x6535abd27b70 RooConstVar:: 1 = 1  "1"

Should be like in C++:

root [1] RooFit::Minos(1).getSet(0)
(const RooArgSet *) nullptr

The function has overloads like this:

RooCmdArg Minos(bool);
RooCmdArg Minos(RooArgSet const&);

The RooArgSet has a constructor RooArgSet(double) which is accidentally taken by PyROOT here, even though the call to Minos(bool) would be correct.

This caused some bad experience for users who tried to enable Minos for all parameters with Minos(1), resulting in nothing happening (Minos was only attempted for this constant "1" parameter, which of course does nothing).

Not a high priority in this case because the workaround is easy: Minos(True). But it's very possible that users are also bitten in other cases by this faulty overload resolution, so we need to fix it.

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