[TREE] Utility to enter a range of entries in TEntryList#8740
[TREE] Utility to enter a range of entries in TEntryList#8740vepadulano merged 2 commits intoroot-project:masterfrom
Conversation
|
Starting build on |
eguiraud
left a comment
There was a problem hiding this comment.
Idea + implementation looks good to me.
Naming/placement: if we are putting the function in TEntryList.h anyway, I guess it can be a method. @pcanal what do you think?
Unrelated, but I hope you don't really need the double ROOT.ROOT to call this from PyROOT, I think that has been fixed years ago 😄
I thought so too, but currently >>> ROOT.Detail.EnterRange
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: <namespace cppyy.gbl.Detail at 0x56507072a2f0> has no attribute 'EnterRange'. Full details:
type object 'Detail' has no attribute 'EnterRange'
'Detail::EnterRange' is not a known C++ class
'EnterRange' is not a known C++ template
'EnterRange' is not a known C++ enumSo maybe it's something that must be "activated" somehow. I'd need to see how it's done with other classes/functions |
|
It could be that it only works for classes and not for functions. Can you please open an issue about that? It's unrelated to the PR but I can't find a jira ticket about this |
|
Build failed on ROOT-debian10-i386/cxx14. Failing tests: |
|
Build failed on mac11.0/cxx17. Failing tests: |
See #8745 |
|
Starting build on |
eguiraud
left a comment
There was a problem hiding this comment.
Alright, looks good to me!
The feature needs a test before merging.
Also maybe I'd put the tree argument before the step argument because I don't expect the step argument to be used much? (but maybe that's also the case for tree?)
I put the step first because I felt it went "logically" after the other two integer arguments. I really wouldn't know what could be used more between that and the tree argument |
|
Starting build on |
|
Build failed on ROOT-performance-centos8-multicore/default. Failing tests: |
|
Build failed on ROOT-debian10-i386/cxx14. Failing tests: |
|
Build failed on mac11.0/cxx17. Failing tests: |
|
The test failures report the file created during the test does not exist, but this node ran the test fine https://lcgapp-services.cern.ch/root-jenkins/job/root-pullrequests-build/124359/testReport/projectroot.tree.tree/test/gtest_tree_tree_test_entrylist_enterrange/ Probably using the same filename for multiple tests leads to a recreation/deletion of the file that is then not usable by the new test? |
|
Starting build on |
|
Build failed on ROOT-debian10-i386/cxx14. Errors:
|
|
Build failed on windows10/cxx14. Failing tests: |
|
Using the same file in multiple tests is never good, they might run concurrently |
You are right, I changed the filename in the latest commit 👍 |
A new method `EnterRange` has been added to TEntryList to allow adding all entries in a certain range in a loop, rather than having to do the loop explicitly in the user application. This is especially helpful in PyROOT to avoid having to do the loop in Python.
30b7f94 to
9839af2
Compare
|
Starting build on |
|
Added commit message and rebased. Will merge if tests pass |
Add a utility function to call
TEntryList::Enterwith entries in a certain range, instead of having to do the loop manually. Especially useful in PyROOT to avoid doing the same in a Python loopInitial idea
Not sure about the namespace and the naming, can be discussed
Final interface