Hi,
I’d like to know the size of the TObjects saved in a TFile ?
How can I perform that ?
I have heavy files with a lot of TObjects saved inside, and wish to know which objects make the greatest part of the file’s overall size.
From the doc, I would do in python something like:
from ROOT import TFile
f = TFile(myfile.root)
for k in f.GetListOfKeys():
print “{:40s}{:3.1f}”.format(k.GetName(), k.GetNbytes())
But the numbers do not correspond to what I see in the output of TObject->Print()
Thanks
ROOT Version 6.12.04
Platform, compiler (SLC6.2, gcc4.9):
Hi,
I tried TFile::Map. It is interesting, but it prints out the size of every TBaskets, and without its name.
What I wish is the total size of the TTree including all TBaskets in the TFile.
I think it is the number comming after “File Size” in TTree::Print()