[v624][RF] Handle nullptr or empty norm set ambiguity in RooAbsReal::getVal#8372
Merged
guitargeek merged 2 commits intoroot-project:v6-24-00-patchesfrom Jun 8, 2021
Merged
Conversation
|
Starting build on |
The downsteam code, -- like RooAddPdf::getValV for example -- assume that a nullptr is passed when no normalization is requested. The case of an empty norm set is not handled correctly in RooAddPdf::getValV, leading to wrong results. However, some calling code passes an empty norm set to RooAbsReal::getVal instead of a `nullptr` in an attempt to disable normalization. This commit suggests to solve this ambiguity at the highest possible level: right at the beginning of RooAbsReal::getVal. If the normalization set is empty, the pointer pointing to it will be set to `nullptr`. This fixes issue root-project#8307.
|
Build failed on windows10/cxx14. Errors:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #8364.
The downsteam code, -- like RooAddPdf::getValV for example -- assume
that a nullptr is passed when no normalization is requested. The case of
an empty norm set is not handled correctly in RooAddPdf::getValV,
leading to wrong results.
However, some calling code passes an empty norm set to
RooAbsReal::getVal instead of a
nullptrin an attempt to disablenormalization.
This commit suggests to solve this ambiguity at the highest possible
level: right at the beginning of RooAbsReal::getVal. If the
normalization set is empty, the pointer pointing to it will be set to
nullptr.This fixes issue #8307.
To give some context: the code in RooAddPdf that doesn't handle the ambiguity correctly was introduced in f6d1543, which was also backported to 6.24. Hence, a backport to 6.24 is necessary also for this PR.