# Loop in TTree with selection

**URL:** <https://root-forum.cern.ch/t/loop-in-ttree-with-selection/46210>\
**Category:** Newbie\
**Created:** [August 6, 2021, 10:27am UTC](https://root-forum.cern.ch/t/loop-in-ttree-with-selection/46210 "2021-08-06T10:27:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [August 6, 2021, 10:57am UTC](https://root-forum.cern.ch/t/loop-in-ttree-with-selection/46210/2 "2021-08-06T10:57:16Z")

</div>

Check out [Chapter: Trees](https://root.cern/root/htmldoc/guides/users-guide/Trees.html)  
I particular, search for “void tree1r” to see a basic example that shows how to loop over the tree and fill histograms, just like you want.

---

_[View the full topic](https://root-forum.cern.ch/t/loop-in-ttree-with-selection/46210)._
