First comment: In my installation I found loopdir.C at $ROOTSYS/tutorials/loopdir.C
I am using 5.13/02.
Second comment: I have a root file with a subdirectory which has many histograms which can be seen in TBrowser. I find that when I use the keys method I only get the key for the subdirectory. The keys to the histograms are never returned. It would seem that I need to set my directory to the subdirectory and then fetch the keys. I tried this with this code:
TFile *f = new TFile(“T0Classic_classic_t0_fitter.root”);
f->cd(“classic_t0_fitter”);
TIter next(f->GetListOfKeys());
TKey key;
nhist=0;
while ((key = (TKey)next())) {
nhist++;
cout << "Key " << nhist << endl;
cout << " Classname " <GetClassName() << endl;
cout << " Title " <GetTitle() << endl;
}
This produces this output:
Key 1
Classname TDirectory
Title classic_t0_fitter
However, there are 100’s of histrograms in the “classic_t0_fitter” subdirectory which I am not getting the keys for. What do I need to do differently to get them?
Thanks much