# Reading a given tree across multiple root files

**URL:** <https://root-forum.cern.ch/t/reading-a-given-tree-across-multiple-root-files/58447>\
**Category:** Newbie\
**Tags:** root\
**Created:** [March 8, 2024, 7:46pm UTC](https://root-forum.cern.ch/t/reading-a-given-tree-across-multiple-root-files/58447 "2024-03-08T19:46:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![utkarsh-2000](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/e47774/32.png) [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Post date:** [March 9, 2024, 10:33am UTC](https://root-forum.cern.ch/t/reading-a-given-tree-across-multiple-root-files/58447/4 "2024-03-09T10:33:49Z")

</div>

Thank You @Danilo,

Yes this is quite helpful.  
A quick follow up, the analysis requires the one branch values to be modified by a polynomial function

```auto
Value = p0 + p1*value + p2*(value)^2

```

However the p0, p1 and p2 are duffer for each file containing tree.

In this scenario is it possible to use TChain to merge the entries and still treat them with the different coefficients for file or

I need to loop through each file and use RVecOps as mentioned here

> [@Effficiency: TF1 vs directly evaluating a polynomial?](https://root-forum.cern.ch/t/effficiency-tf1-vs-directly-evaluating-a-polynomial/58420/5):
>
> Hi, I think the best way, if you want to go for the vectorized approach, is to use RDataFrame and not TTreeReader, as mentioned above. Best, Danilo

Please share if I haven’t been able to clarify myself. Thanks

Thanks a lot

---

_[View the full topic](https://root-forum.cern.ch/t/reading-a-given-tree-across-multiple-root-files/58447)._
