# Printing out all trees and their elements within a root file

**URL:** <https://root-forum.cern.ch/t/printing-out-all-trees-and-their-elements-within-a-root-file/18304>\
**Category:** ROOT\
**Created:** [October 7, 2014, 10:19pm UTC](https://root-forum.cern.ch/t/printing-out-all-trees-and-their-elements-within-a-root-file/18304 "2014-10-07T22:19:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [October 8, 2014, 2:08am UTC](https://root-forum.cern.ch/t/printing-out-all-trees-and-their-elements-within-a-root-file/18304/2 "2014-10-08T02:08:52Z")

</div>

See:

> [@Aux;1 aux;2 aux3;](https://root-forum.cern.ch/t/aux-1-aux-2-aux3/13345/2):
>
> Search for “cycle” and/or “namecycle”, for example in: In a Nutshell: [Input and Output](https://root.cern.ch/d/input-and-output) . ROOT User’s Guide: [Input/Output](https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#inputoutput) : [Retrieving Objects from Disk](https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#retrieving-objects-from-disk) , [Subdirectories and Navigation](https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#subdirectories-and-navigation) . Just for reference: [some additional notes about GetObject, Get, FindObjectAny, FindKeyAny, ReadObj, ReadObjAny](https://root-forum.cern.ch/t/broken-tdirectoryfile-findobjectany-and-tdirectoryfile-findkeyany/20943/16) .

[TTree::GetListOfBranches](http://root.cern.ch/root/html534/TTree.html#TTree:GetListOfBranches)  
[TTree::GetListOfLeaves](http://root.cern.ch/root/html534/TTree.html#TTree:GetListOfLeaves)

---

_[View the full topic](https://root-forum.cern.ch/t/printing-out-all-trees-and-their-elements-within-a-root-file/18304)._
