ROOT Version:JupyROOT 6.30/02_
Hello experts,
I am trying to save a TH1F histogram in a TDirectory of a .root file. When I then try to open this .root file with TBrowser for example, I get these error lines:
Error in TList::Clear: A list is accessing an object (0x288d9f0) already deleted (list name = TList)
Error in TList::Clear: A list is accessing an object (0x288de70) already deleted (list name = TList)
… (many more lines)
This is the code to produce this:
outfile = ROOT.TFile("data.root", "RECREATE")
nomi = outfile.mkdir("nominal")
nomi.cd()
reco_ttbar = ROOT.TH1F("reco_ttbar_m", "data_ttbar_m", 87, 0, 2001)
for v in pred:
reco_ttbar.Fill(v)
reco_ttbar.Write()
outfile.cd()
outfile.Close()
When I dont do .Close() these errors disapear, but then of course I get the warning about not properly closing the file. Hope someone can help me out.
Cheers