What's the meaning of fBasket in TTree?

Hi,
I see that the TTree structure include fBaskets/fBasketEvent, why TTree needs them? I don’t find the reason in ROOT User’s Guide. Is “Basket” a capacity in memory? Can anyone explain that in a layman’s word?

Best,
Li


ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


I think @pcanal can help you with this question.

Hi,
I’m not ROOT’s I/O expert so maybe Philippe will correct some details, but the simple version should be:

ROOT reads TTree entries one “cluster” at a time. A cluster is a bunch of entries that have been compressed and written to disk together.
Within a cluster, the entry values of each branch are stored in buffers called “baskets”.

So in short a TBasket contains a bunch of entry values of a given TBranch.

Hi,
Thank you very much! It solved my problem.

Best,
Li

1 Like

Hi,
a picture showing the role of baskets is generated by this macro:

$ROOTSYS/tutorials/tree/tree.C

Cheers
Otto

1 Like

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