Reading the result of a fit from a file

[code]TFile *f = new TFile(“test.root”, “READ”);
TListIter next(f->GetListOfKeys());

TObject *o;

while (o = next()) o->Print();

next.Reset();

TH1F *h;

while (o = next()) {
f->GetObject(o->GetName(), h);
if (h && (h->GetFunction(“gaus”)))
std::cout << o->GetName() << " : "
<< h->GetFunction(“gaus”)->GetParameter(1)
<< std::endl;
}[/code]