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] Off-by-one error in Roofit/Histfactory/HistoToWorkspaceFactoryFast #12704

Closed
CoffeeIntoScience opened this issue Apr 24, 2023 · 1 comment · Fixed by #12707
Closed

[RF] Off-by-one error in Roofit/Histfactory/HistoToWorkspaceFactoryFast #12704

CoffeeIntoScience opened this issue Apr 24, 2023 · 1 comment · Fixed by #12707

Comments

@CoffeeIntoScience
Copy link

There is an error here that was introduced in dc65afe:

if (fObsNameVec.empty() || fObsNameVec.size() >= 3) {
throw hf_exc("HistFactory is limited to 1- to 3-dimensional histograms.");
}

This error should only be thrown when the number of observables is not 1, 2 or 3, but currently fires if the number is equal to 3.

See the change from dc65afe here where the mistake is evident:

dc65afe#diff-42ea09980f1ed2bacde4381f212c35d78be6ddedccf746953dc99d6455525d8aL1256-R1221

The conditional should be
if (fObsNameVec.empty() || fObsNameVec.size() > 3)

@guitargeek guitargeek self-assigned this Apr 25, 2023
@guitargeek guitargeek changed the title Off-by-one error in Roofit/Histfactory/HistoToWorkspaceFactoryFast [RF] Off-by-one error in Roofit/Histfactory/HistoToWorkspaceFactoryFast Apr 25, 2023
@guitargeek guitargeek linked a pull request Apr 25, 2023 that will close this issue
@guitargeek guitargeek added this to Issues in Fixed in 6.30/00 via automation Apr 25, 2023
@guitargeek guitargeek added this to Issues in Fixed in 6.26/12 via automation Apr 25, 2023
@guitargeek guitargeek added this to Issues in Fixed in 6.28/04 via automation Apr 25, 2023
@guitargeek
Copy link
Contributor

Thank you very much for reporting this!

I fixed this for the upcoming 6.30 and for the next patch releases 6.26.12 and 6.28.04 (this bug also affects 6.26).

The 6.28.04 patch release will probably come out this week.

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

Successfully merging a pull request may close this issue.

2 participants