TFile::ls() subdirectories recursively

Try to call f->ReadAll() before f->ls():

root [1] f->ls()
TFile**         small.root
 TFile*         small.root
  KEY: TDirectoryFile   something;1     something
  KEY: TProcessID       ProcessID0;1    961dc7ef-5ff3-11e7-8053-8cbb8d80beef
root [2] f->ReadAll()
root [3] f->ls()
TFile**         small.root
 TFile*         small.root
  TDirectoryFile*               something       something
   KEY: TTree   T;1     An example of a ROOT tree
  KEY: TDirectoryFile   something;1     something
  KEY: TProcessID       ProcessID0;1    961dc7ef-5ff3-11e7-8053-8cbb8d80beef
root [4]
2 Likes