[RF] More pythonizations for RooAbsCollection and child classes (RooArgList and RooArgSet)#8179
Conversation
|
Starting build on |
DeepCode's analysis on #de2dd7 found:
Top issues
👉 View analysis in DeepCode’s Dashboard | Configure the bot |
|
Build failed on ROOT-performance-centos8-multicore/default. Failing tests:
And 236 more |
The new `RooAbsCollection::canBeAdded` member function is used in `RooAbsCollection::add`, `RooAbsCollection::addOwned`, and `RooAbsCollection::addClone`. Lke this, only `RooAbsCollection::canBeAdded` has to be overridden in `RooArgList` and `RooArgSet`, instead of overriding the three adding functions. This is convenient for pythonizing the adding functions, because if they are redefined in the child classes, one has to pythonize add redefinitions. After this PR, it is suficcient to pythonize only the adding functions in the base class `RooAbsCollection`.
The python wrapper object needs to release the ownership of the C++ RooAbsArgs object after it has been added to a owning RooAbsCollection. This fixes issue root-project#8120.
Also moves all unit tests of RooAbsCollection pythonizations into a single file.
This tests the functionality recently introduced in root-project#8177 (commits 3819e27 and d8cd26a).
e3a098c to
21fbd34
Compare
|
Starting build on |
|
Starting build on |
|
This pull request introduces 1 alert when merging 8307d6d into fdb7d15 - view on LGTM.com new alerts:
|
The bounds checking is now done in Python for cleaner error messages, and negative indexing is now supported.
8307d6d to
de2dd71
Compare
|
Starting build on |
etejedor
left a comment
There was a problem hiding this comment.
As discussed on mattermost, ok for me!
A pythonization of
RooAbsCollection::addOwnedis introduced to fix issue [RF] Implement a Pythonisation for RooAbsCollection.addOwned() #8120.The unit tests for the pythonization of
RooAbsCollectionwere also extended to cover new developments from PR FindObject for rooabscollection #8177.A pythonization of
RooAbsCollection::operator()is introduced as discussed in fix handling of case where idx is negative #8174.