TTreeCloner Class implementing or helping the various TTree cloning method
TTreeCloner(TTree* from, TTree* to, Option_t* method) | |
virtual | ~TTreeCloner() |
static TClass* | Class() |
void | CloseOutWriteBaskets() |
void | CollectBaskets() |
UInt_t | CollectBranches() |
UInt_t | CollectBranches(TBranch* from, TBranch* to) |
UInt_t | CollectBranches(TObjArray* from, TObjArray* to) |
void | CopyMemoryBaskets() |
void | CopyProcessIds() |
void | CopyStreamerInfos() |
Bool_t | Exec() |
virtual TClass* | IsA() const |
Bool_t | IsValid() |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
void | SortBaskets() |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
void | WriteBaskets() |
enum ECloneMethod { | kDefault | |
kSortBasketsByBranch | ||
kSortBasketsByOffset | ||
kSortBasketsByEntry | ||
}; |
UInt_t* | fBasketBranchNum | [fMaxBaskets] Index of the branch(es) of the basket. |
Long64_t* | fBasketEntry | [fMaxBaskets] list of basket start entries. |
UInt_t* | fBasketIndex | [fMaxBaskets] ordered list of basket indices to be written. |
UInt_t* | fBasketNum | [fMaxBaskets] index of the basket within the branch. |
Long64_t* | fBasketSeek | [fMaxBaskets] list of basket position to be read. |
UInt_t | fCloneMethod | Indicates which cloning method was selected. |
TObjArray | fFromBranches | |
TTree* | fFromTree | |
Bool_t | fIsValid | |
UInt_t | fMaxBaskets | |
Option_t* | fMethod | |
UShort_t | fPidOffset | Offset to be added to the copied key/basket. |
TObjArray | fToBranches | |
Long64_t | fToStartEntries | Number of entries in the target tree before any addition. |
TTree* | fToTree |
Constructor. This object would transfer the data from 'from' to 'to' using the method indicated in method. The value of the parameter 'method' determines in which order the branches' baskets are written to the output file. When a TTree is filled the data is stored in the individual branches' basket. Each basket is written individually to the disk as soon as it is full. In consequence the baskets of branches that contain 'large' data chunk are written to the disk more often. There is currently 3 supported sorting order: SortBasketsByOffset (the default) SortBasketsByBranch SortBasketsByEntry When using SortBasketsByOffset the baskets are written in the output file in the same order as in the original file (i.e. the basket are sorted on their offset in the original file; Usually this also means that the baskets are sorted on the index/number of the _last_ entry they contain) When using SortBasketsByBranch all the baskets of each individual branches are stored contiguously. This tends to optimize reading speed when reading a small number (1->5) of branches, since all their baskets will be clustered together instead of being spread across the file. However it might decrease the performance when reading more branches (or the full entry). When using SortBasketsByEntry the baskets with the lowest starting entry are written first. (i.e. the baskets are sorted on the index/number of the first entry they contain). This means that on the file the baskets will be in the order in which they will be needed when reading the whole tree sequentially.
Before we can start adding new basket, we need to flush to disk the partially filled baskets (the WriteBasket)
Fill the array of branches, adding the branch 'from' and 'to', and matching the sub-branches of the 'from' and 'to' branches. Returns the total number of baskets in all the from branch and it sub-branches.
Fill the array of branches, matching the branches of the 'from' and 'to' arrays. Returns the total number of baskets in all the branches.
Fill the array of branches, matching the branches of the 'from' and 'to' TTrees Returns the total number of baskets in all the branches.