Reading a ROOT file with multiple cycles of ttrees #921
-
Dear uproot users, I have a ROOT file with such format: treename;1 treename;2 treename;3 anothertree;13 anothertree;14 Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
First and simply, to get the last element of the with uproot.open("file.root") as f:
tree = f['treename'] If you want to learn more: https://root-forum.cern.ch/t/aux-1-aux-2-aux3/13345 |
Beta Was this translation helpful? Give feedback.
-
The keys and items methods have a kwarg cycle number, simply set it to false and you will get the keys without cycle number appended. For items, that means you’ll only grab the latest version for that key. |
Beta Was this translation helpful? Give feedback.
The keys and items methods have a kwarg cycle number, simply set it to false and you will get the keys without cycle number appended. For items, that means you’ll only grab the latest version for that key.