Greetings,
I have this minor problem where I cannot read TTrees on PyROOT, while I can perfectly read them via .cpp files. The code that I am executing is:
import ROOT
Data = ROOT.TFile.Open("data.root", "READ")
Main_Tree = Data.Get("Tree")
print(Main_Tree.GetEntries())
and I am getting
Traceback (most recent call last):
File "/path/to/script.py", line 5, in <module>
print(Main_Tree.GetEntries())
AttributeError: 'TObject' object has no attribute 'GetEntries'
I am pretty sure that names are all correct because as I said, everything runs fine on a separate .cpp
file. Any help would be greatly appreciated.
Thank you,
Andy
_ROOT Version: 6.24/06
Platform: macosx64, Big Sur 11.6
Compiler: g++ 11