# TTreeReader does not find branch, TTree::Draw finds it

**URL:** <https://root-forum.cern.ch/t/ttreereader-does-not-find-branch-ttree-draw-finds-it/39642>\
**Category:** Newbie\
**Created:** [May 28, 2020, 11:33am UTC](https://root-forum.cern.ch/t/ttreereader-does-not-find-branch-ttree-draw-finds-it/39642 "2020-05-28T11:33:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [May 28, 2020, 1:28pm UTC](https://root-forum.cern.ch/t/ttreereader-does-not-find-branch-ttree-draw-finds-it/39642/4 "2020-05-28T13:28:00Z")

</div>

Applying the patch is fairly simple, you can create a new git branch in which you pull the changes from that patch:

```auto
$ cd path/to/root_sources
$ git checkout -b eguiraud-fix_10702
$ git pull https://github.com/eguiraud/root.git fix_10702

```

At this point you just have to recompile.

Indeed `TTreeReader` has several advantages with respect to raw TTree usage, but sometimes it also has bugs 😅

If you are looking for a high-level C++ interface for ROOT data processing, you might also be interested in [RDataFrame](https://root.cern.ch/doc/master/classROOT_1_1RDataFrame.html) (see [here](https://root-forum.cern.ch/t/rdataframe-a-modern-tool-to-manipulate-and-analyze-root-datasets/29384) for the advertising forum post), which is based on TTreeReader but offers a nicer interface.

Cheers,  
Enrico

---

_[View the full topic](https://root-forum.cern.ch/t/ttreereader-does-not-find-branch-ttree-draw-finds-it/39642)._
