# Accessing the same leaf for different events of TTree

**URL:** <https://root-forum.cern.ch/t/accessing-the-same-leaf-for-different-events-of-ttree/24891>\
**Category:** ROOT\
**Tags:** tree\
**Created:** [May 24, 2017, 5:58pm UTC](https://root-forum.cern.ch/t/accessing-the-same-leaf-for-different-events-of-ttree/24891 "2017-05-24T17:58:11Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ksmith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksmith/32/12567_2.png) [@ksmith](https://root-forum.cern.ch/u/ksmith)\
**Post date:** [May 24, 2017, 6:37pm UTC](https://root-forum.cern.ch/t/accessing-the-same-leaf-for-different-events-of-ttree/24891/4 "2017-05-24T18:37:23Z")

</div>

`GetEntry` is a member of `TTree`

```auto
TLeaf* leaf = tree->GetLeaf("some_information");
tree -> GetEntry(1);

```

Also, see this about posting code fragments:

> [@Getting the same histograms after cuts](https://root-forum.cern.ch/t/getting-the-same-histograms-after-cuts/24719/2):
>
> Remark on the way to post code snippets: When you post pieces of code on the forum enclose it with ``` . That makes your post much more readable (I systematically edit your posts that way) . So do: ``` // this is a C++ piece of code. ``` And it will display as: // this is a C++ piece of code.

---

_[View the full topic](https://root-forum.cern.ch/t/accessing-the-same-leaf-for-different-events-of-ttree/24891)._
