Hi all,
I have a question: given the following sample code and output:
[code]>>> from ROOT import *
h = {}
for i in range(2):
… f = TFile(“%s”%i, “RECREATE”)
… h[i] = TH1F(“%s”%i, “%s”%i, 100, 0, 1)
… h[i].FillRandom(‘gaus’)
… print h
… f.Close()
…
{0: <ROOT.TH1F object (“0”) at 0x95d600>}
{0: None, 1: <ROOT.TH1F object (“1”) at 0x95d600>}
[/code]
I don’t understand why 0 should be None, i.e., the TH1F object disappears from memory when tf is closed. What I want to do is create several histograms from different ROOT files and have them available for further processing, but I haven’t been able to do so…
How should I proceed?
Many thanks,
Albert