# Understanding rdataframe from TFile with many trees

**URL:** <https://root-forum.cern.ch/t/understanding-rdataframe-from-tfile-with-many-trees/62208>\
**Category:** ROOT\
**Tags:** rdataframe\
**Created:** [November 11, 2024, 10:50pm UTC](https://root-forum.cern.ch/t/understanding-rdataframe-from-tfile-with-many-trees/62208 "2024-11-11T22:50:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rquaglia](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/rquaglia/32/35548_2.png) [@rquaglia](https://root-forum.cern.ch/u/rquaglia)\
**Post date:** [November 11, 2024, 10:50pm UTC](https://root-forum.cern.ch/t/understanding-rdataframe-from-tfile-with-many-trees/62208/1 "2024-11-11T22:50:54Z")

</div>

Dear Experts,

I have a question about the way RDataFrame access a tree in a list of files.

In practice i have a series of root files for a total of 120Tb. Each file contains 200 ttrees and all of them are accessed via xrootd.

I was wonderijg how is RdataFrame when asked to process just 1 Ttree from the chain is affected in performance due to the big size of the files containing it.

I.e is RDataFrame(“treename”, listoffiles) event loop performance penalised (network, overhead of opening big files even if you access effectively only 1 tree out of 200) by the fact the file sizes are big but the actual disk space of the trees in the file is not? Should one consider to have many trees in as many tfiles instead or is rdataframe smart enough to do the same under the hood?

Thanks in advance

Renato

I hope i made the question clear.

* * *

_Please read [tips for efficient and successful posting](https://root-forum.cern.ch/t/tips-for-efficient-and-successful-posting/28292) and [posting code](https://root-forum.cern.ch/t/posting-code-read-this-first/28293)_

_Please fill also the fields below. Note that **`root -b -q`** will tell you this info, and starting from 6.28/06 upwards, you can call **`.forum bug`** from the ROOT prompt to pre-populate a topic._

_ROOT Version:_ Not Provided  
_Platform:_ Not Provided  
_Compiler:_ Not Provided

* * *

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [November 12, 2024, 7:27am UTC](https://root-forum.cern.ch/t/understanding-rdataframe-from-tfile-with-many-trees/62208/2 "2024-11-12T07:27:45Z")

</div>

Hi Renato,

Thanks for the question, which is legitimate.  
The functionality involved here is not related to RDF per se, but rather the underlying IO layer, which is optimised for handling also this kind of cases. Files are read partially, i.e. you read over the network just the portion you require.

Best,  
Danilo

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [November 26, 2024, 7:28am UTC](https://root-forum.cern.ch/t/understanding-rdataframe-from-tfile-with-many-trees/62208/3 "2024-11-26T07:28:08Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
