How to go through branches when we don't know name

if we don’t know the branch’s name, how to go through every branch in a tree? does the root has a function can go through a tree and return all element(data) in this tree?

Search for “GetListOf” in: http://root.cern.ch/root/html/TTree.html