You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to read data from a class (TRestAnalysisTree) that inherits from the standard TTree.
Currently this does not work but uproot correctly reads the object as a tree so perhaps it can also read the branch contents with a few changes.
Using latest uproot (5.0.11).
import uproot
file = uproot.open("simulation.analysis.root")
analysis_tree = file["AnalysisTree"] # is not a TTree but inherits from one
print(analysis_tree.keys()) # works fine
event_tree = file["EventTree"] # event_tree is a TTree
print(analysis_tree) # <TTree 'AnalysisTree' (72 branches) at 0x02e3ec6540d0>
print(event_tree) # <TTree 'EventTree' (4 branches) at 0x02e39dbc5c90>
analysis_branch = analysis_tree["g4Ana_yOriginPrimary"]
analysis_branch.array() # ERROR
I would like to read data from a class (
TRestAnalysisTree
) that inherits from the standardTTree
.Currently this does not work but uproot correctly reads the object as a tree so perhaps it can also read the branch contents with a few changes.
Using latest uproot (5.0.11).
The error:
I think this come from the reading of the trees as there are some differences, for example:
Updating some of these private attributes (e.g.
_file
) fixes some of the errors but I could not get it working.Sample root file (zip): simulation.anaylsis.zip
The text was updated successfully, but these errors were encountered: