I’m trying to open some histograms in a loop, but keep on getting objects of None Type. Here is the code:
root_files = ["file1.root", "file2.root", "file3.root"]
for i in range (len(root_files)):
f = TFile(root_files[i])
h = f.Get("myHisto")
I find that the first two items in the list l are of None type, the last is the histogram as intended. I’ve played around with SetOwnership, but it doesn’t seem to help.