[RF] Make RooAbsReal
and RooAbsPdf
instantiable
#19490
Open
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.
In some cases, it might happen that a CallFunc wrapper for the
RooAbsReal
orRooAbsPdf
classes is created, which gives compile errors because these classes are virtual.It is however not a big deal to make these classes non-virtual and avoid these errors. The
RooAbsArg::clone()
method should have been overridden anyway sinceRooAbsReal
andRooAbsPdf
already have copy constructors. The only other method that needs to be implemented isRooAbsReal::evaluate()
, which is done as well. The implementation throws an exception, becauseevaluate()
should always be called from derived classes.This is a bit of a hotfix and one can argue that it would be nicer to first understand why these CallFunc wrappers are even created, but this issue needs to be resolved quickly and with minimal changes: the fix also needs to be backported to older ROOT versions and is crucial for the ATLAS Run 2 Higgs combination analysis.
Issue reported on the ROOT forum:
https://root-forum.cern.ch/t/cannot-open-a-rooworkspace-once-it-is-saved-allocating-an-object-of-class-type-error/63954