12#ifndef ROOT_TTreeCloner
13#define ROOT_TTreeCloner
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
A TTree is a list of TBranches.
Describe directory structure in memory.
A cache when reading files over the network.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
CompareEntry(TTreeCloner *obj)
bool operator()(UInt_t i1, UInt_t i2)
bool operator()(UInt_t i1, UInt_t i2)
CompareSeek(TTreeCloner *obj)
Class implementing or helping the various TTree cloning method.
UInt_t * fBasketBranchNum
[fMaxBaskets] Index of the branch(es) of the basket.
void ImportClusterRanges()
Set the entries and import the cluster range of the.
UInt_t CollectBranches()
Fill the array of branches, matching the branches of the 'from' and 'to' TTrees Returns the total num...
void CollectBaskets()
Collect the information about the on-file basket that need to be copied.
TTreeCloner & operator=(const TTreeCloner &)=delete
UInt_t * fBasketIndex
[fMaxBaskets] ordered list of basket indices to be written.
UInt_t FillCache(UInt_t from)
Fill the file cache with the next set of basket.
void CopyStreamerInfos()
Make sure that all the needed TStreamerInfo are present in the output file.
void WriteBaskets()
Transfer the basket from the input file to the output file.
const char * GetWarning() const
bool Exec()
Execute the cloning.
Long64_t * fBasketSeek
[fMaxBaskets] list of basket position to be read.
void SetCacheSize(Int_t size)
Set the TFile cache size to be used.
void CopyMemoryBaskets()
Transfer the basket from the input file to the output file.
bool fNeedConversion
True if the fast merge is not possible but a slow merge might possible.
UShort_t fPidOffset
Offset to be added to the copied key/basket.
Long64_t * fBasketEntry
[fMaxBaskets] list of basket start entries.
void CreateCache()
Create a TFileCacheRead if it was requested.
TFileCacheRead * fFileCache
File Cache used to reduce the number of individual reads.
void CopyProcessIds()
Make sure that all the needed TStreamerInfo are present in the output file.
TTreeCloner(const TTreeCloner &)=delete
TFileCacheRead * fPrevCache
Cache that set before the TTreeCloner ctor for the 'from' TTree if any.
UInt_t fCloneMethod
Indicates which cloning method was selected.
void RestoreCache()
Restore the TFileCacheRead to its previous value.
TString fWarningMsg
Text of the error message lead to an 'invalid' state.
void CloseOutWriteBaskets()
Before we can start adding new basket, we need to flush to disk the partially filled baskets (the Wri...
Long64_t fToStartEntries
Number of entries in the target tree before any addition.
virtual ~TTreeCloner()
TTreeCloner destructor.
Int_t fCacheSize
Requested size of the file cache.
UInt_t * fBasketNum
[fMaxBaskets] index of the basket within the branch.
TDirectory * fToDirectory
void SortBaskets()
Sort the basket according to the user request.
A TTree represents a columnar dataset.