Baskets

Can anyone explain what is basket, which appears in ntuples.

Hi,

With each branch of TTree (ntuple) is associated a TBasket object. This TBasket object manages the in-memory buffer where the TBranch writes the platform independent binary version of the object (the result of streaming).

Each time a call to TTree::Fill is made (and hence a call to TBranch::Fill for each branch), the object or variable that the branch points to are streamed into the TBasket buffer, whose size is determined by the buffersize parameter of the TTree::Branch call creating a branch.

Whenever one of those buffer is full, it is optionally compressed and then the corresponding TBasket and its buffer are written to disk and a new TBasket is created to hold the next entries.

Cheers,
Philippe.