14 TFile *f1 = TFile::Open(
"hsimple.root");
16 c1.Print(
"hsimple.ps[");
17 for(
auto k : *f1->GetListOfKeys()) {
18 TKey *key =
static_cast<TKey*
>(k);
19 TClass *cl = gROOT->GetClass(key->GetClassName());
20 if (!cl->InheritsFrom(
"TH1"))
continue;
21 TH1 *h = key->ReadObject<TH1>();
23 c1.Print(
"hsimple.ps");
25 c1.Print(
"hsimple.ps]");