Creating List of Objects in TFile

Hey,

What I’m trying to do is create a list (array) of all objects(TH1F histograms) in a TFile.
all i can figure out how to do is get a list but not in a way i can add to a list

tf = TFile(“fname.root”)
listofObj = []

tf.ls()
tf.GetListOfKeys()

Thanks in advance

Hi,

see http://root.cern.ch/phpBB3//viewtopic.php?f=14&t=11049.

Cheers,
Wim

Worked great, Thank you!