Hi,
you can loop on the keys holding objects stored in a ROOT files and get their type name, e.g. “TTree” as follows:
for (auto&& keyAsObj : file->GetListOfKeys()){
auto key = (TKey*) keyAsObj;
cout << key->GetName() << " " << key->GetClassName() << endl;
}
if it is enough for you, you can achieve this with a command line utility, rootls
rootls myfile.root
Cheers,
D