A chain is a collection of files containing TTree objects.
When the chain is created, the first parameter is the default name for the Tree to be processed later on.
Enter a new element in the chain via the TChain::Add function. Once a chain is defined, one can use the normal TTree functions to Draw,Scan,etc.
Use TChain::SetBranchStatus to activate one or more branches for all the trees in the chain.
Public Types | |
enum | EStatusBits { kGlobalWeight = (1ULL << ( 15 )) , kAutoDelete = (1ULL << ( 16 )) , kProofUptodate = (1ULL << ( 17 )) , kProofLite = (1ULL << ( 18 )) } |
enum | Mode { kWithoutGlobalRegistration , kWithGlobalRegistration } |
Public Types inherited from TTree | |
enum | { kSplitCollectionOfPointers = 100 } |
enum | ESetBranchAddressStatus { kMissingBranch = -5 , kInternalError = -4 , kMissingCompiledCollectionProxy = -3 , kMismatch = -2 , kClassMismatch = -1 , kMatch = 0 , kMatchConversion = 1 , kMatchConversionCollection = 2 , kMakeClass = 3 , kVoidPtr = 4 , kNoCheck = 5 , kNeedEnableDecomposedObj = (1ULL << ( 29 )) , kNeedDisableDecomposedObj = (1ULL << ( 30 )) , kDecomposedObjMask = kNeedEnableDecomposedObj | kNeedDisableDecomposedObj } |
enum | EStatusBits { kForceRead = (1ULL << ( 11 )) , kCircular = (1ULL << ( 12 )) , kOnlyFlushAtCluster = (1ULL << ( 14 )) , kEntriesReshuffled = (1ULL << ( 19 )) } |
Public Types inherited from TObject | |
enum | { kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 , kBitMask = 0x00ffffff } |
enum | { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) } |
enum | EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) } |
enum | EStatusBits { kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) , kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 )) } |
Public Member Functions | |
TChain (const char *name, const char *title="", Mode mode=kWithGlobalRegistration) | |
Create a chain. | |
TChain (Mode mode=kWithGlobalRegistration) | |
Default constructor. | |
~TChain () override | |
Destructor. | |
virtual Int_t | Add (const char *name, Long64_t nentries=TTree::kMaxEntries) |
Add a new file to this chain. | |
virtual Int_t | Add (TChain *chain) |
Add all files referenced by the passed chain to this chain. | |
virtual Int_t | AddFile (const char *name, Long64_t nentries=TTree::kMaxEntries, const char *tname="") |
Add a new file to this chain. | |
virtual Int_t | AddFileInfoList (TCollection *list, Long64_t nfiles=TTree::kMaxEntries) |
Add all files referenced in the list to the chain. | |
TFriendElement * | AddFriend (const char *chainname, const char *dummy="") override |
Add a TFriendElement to the list of friends of this chain. | |
TFriendElement * | AddFriend (const char *chainname, TFile *dummy) override |
Add the whole chain or tree as a friend of this chain. | |
TFriendElement * | AddFriend (TTree *chain, const char *alias="", bool warn=false) override |
Add the whole chain or tree as a friend of this chain. | |
void | Browse (TBrowser *) override |
Browse the contents of the chain. | |
virtual void | CanDeleteRefs (bool flag=true) |
When closing a file during the chain processing, the file may be closed with option "R" if flag is set to true. | |
virtual void | CreatePackets () |
Initialize the packet descriptor string. | |
void | DirectoryAutoAdd (TDirectory *) override |
Override the TTree::DirectoryAutoAdd behavior: we never auto add. | |
Long64_t | Draw (const char *varexp, const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) override |
Process all entries in this chain and draw histogram corresponding to expression varexp. | |
Long64_t | Draw (const char *varexp, const TCut &selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) override |
Draw expression varexp for selected entries. | |
void | Draw (Option_t *opt) override |
Default Draw method for all objects. | |
Int_t | Fill () override |
Fill all branches. | |
TBranch * | FindBranch (const char *name) override |
See TTree::GetReadEntry(). | |
TLeaf * | FindLeaf (const char *name) override |
See TTree::GetReadEntry(). | |
const char * | GetAlias (const char *aliasName) const override |
Returns the expanded value of the alias. Search in the friends if any. | |
TBranch * | GetBranch (const char *name) override |
Return pointer to the branch name in the current tree. | |
bool | GetBranchStatus (const char *branchname) const override |
See TTree::GetReadEntry(). | |
Long64_t | GetCacheSize () const override |
Long64_t | GetChainEntryNumber (Long64_t entry) const override |
Return absolute entry number in the chain. | |
TClusterIterator | GetClusterIterator (Long64_t firstentry) override |
Return an iterator over the cluster of baskets starting at firstentry. | |
Long64_t | GetEntries () const override |
Return the total number of entries in the chain. | |
Long64_t | GetEntries (const char *sel) override |
Return the number of entries matching the selection. | |
Int_t | GetEntry (Long64_t entry=0, Int_t getall=0) override |
Get entry from the file to memory. | |
Long64_t | GetEntryNumber (Long64_t entry) const override |
Return entry number corresponding to entry. | |
Int_t | GetEntryWithIndex (Int_t major, Int_t minor=0) override |
Return entry corresponding to major and minor number. | |
TFile * | GetFile () const |
Return a pointer to the current file. | |
TLeaf * | GetLeaf (const char *branchname, const char *leafname) override |
Return a pointer to the leaf name in the current tree. | |
TLeaf * | GetLeaf (const char *name) override |
Return a pointer to the leaf name in the current tree. | |
TObjArray * | GetListOfBranches () override |
Return a pointer to the list of branches of the current tree. | |
TObjArray * | GetListOfFiles () const |
TObjArray * | GetListOfLeaves () override |
Return a pointer to the list of leaves of the current tree. | |
Double_t | GetMaximum (const char *columname) override |
Return maximum of column with name columname. | |
Double_t | GetMinimum (const char *columname) override |
Return minimum of column with name columname. | |
Int_t | GetNbranches () override |
Return the number of branches of the current tree. | |
Int_t | GetNtrees () const |
Long64_t | GetReadEntry () const override |
See TTree::GetReadEntry(). | |
TList * | GetStatus () const |
TTree * | GetTree () const override |
Int_t | GetTreeNumber () const override |
Long64_t * | GetTreeOffset () const |
Int_t | GetTreeOffsetLen () const |
Double_t | GetWeight () const override |
Return the chain weight. | |
bool | InPlaceClone (TDirectory *newdirectory, const char *options="") override |
Move content to a new file. (NOT IMPLEMENTED for TChain) | |
TClass * | IsA () const override |
Int_t | LoadBaskets (Long64_t maxmemory) override |
Dummy function. | |
Long64_t | LoadTree (Long64_t entry) override |
Find the tree which contains entry, and set it as the current tree. | |
void | Lookup (bool force=false) |
Check / locate the files in the chain. | |
virtual void | Loop (Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) |
Loop on nentries of this chain starting at firstentry. (NOT IMPLEMENTED) | |
void | ls (Option_t *option="") const override |
List the chain. | |
virtual Long64_t | Merge (const char *name, Option_t *option="") |
Merge all the entries in the chain into a new tree in a new file. | |
Long64_t | Merge (TCollection *list, Option_t *option="") override |
Merge all chains in the collection. (NOT IMPLEMENTED) | |
Long64_t | Merge (TCollection *list, TFileMergeInfo *info) override |
Merge all chains in the collection. (NOT IMPLEMENTED) | |
virtual Long64_t | Merge (TFile *file, Int_t basketsize, Option_t *option="") |
Merge all the entries in the chain into a new tree in the current file. | |
void | Print (Option_t *option="") const override |
Print the header information of each tree in the chain. | |
Long64_t | Process (const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) override |
Process all entries in this chain, calling functions in filename. | |
Long64_t | Process (TSelector *selector, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) override |
Process this chain executing the code in selector. | |
void | RecursiveRemove (TObject *obj) override |
Make sure that obj (which is being deleted or will soon be) is no longer referenced by this TTree. | |
void | RemoveFriend (TTree *) override |
Remove a friend from the list of friends. | |
void | Reset (Option_t *option="") override |
Resets the state of this chain. | |
void | ResetAfterMerge (TFileMergeInfo *) override |
Resets the state of this chain after a merge (keep the customization but forget the data). | |
void | ResetBranchAddress (TBranch *) override |
Reset the addresses of the branch. | |
void | ResetBranchAddresses () override |
Reset the addresses of the branches. | |
void | SavePrimitive (std::ostream &out, Option_t *option="") override |
Save TChain as a C++ statements on output stream out. | |
Long64_t | Scan (const char *varexp="", const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) override |
Loop on tree and print entries passing selection. | |
virtual void | SetAutoDelete (bool autodel=true) |
Set the global branch kAutoDelete bit. | |
template<class T > | |
Int_t | SetBranchAddress (const char *bname, T **add, TBranch **ptr=nullptr) |
template<class T > | |
Int_t | SetBranchAddress (const char *bname, T *add, TBranch **ptr=nullptr) |
Int_t | SetBranchAddress (const char *bname, void *add, TBranch **ptr, TClass *realClass, EDataType datatype, bool isptr) override |
Check if bname is already in the status list, and if not, create a TChainElement object and set its address. | |
Int_t | SetBranchAddress (const char *bname, void *add, TBranch **ptr=nullptr) override |
Set branch address. | |
Int_t | SetBranchAddress (const char *bname, void *add, TClass *realClass, EDataType datatype, bool isptr) override |
Check if bname is already in the status list, and if not, create a TChainElement object and set its address. | |
void | SetBranchStatus (const char *bname, bool status=true, UInt_t *found=nullptr) override |
Set branch status to Process or DoNotProcess. | |
Int_t | SetCacheSize (Long64_t cacheSize=-1) override |
Set maximum size of the file cache . | |
void | SetDirectory (TDirectory *dir) override |
Remove reference to this chain from current directory and add reference to new directory dir. | |
void | SetEntryList (TEntryList *elist, Option_t *opt="") override |
Set the input entry list (processing the entries of the chain will then be limited to the entries in the list). | |
virtual void | SetEntryListFile (const char *filename="", Option_t *opt="") |
Set the input entry list (processing the entries of the chain will then be limited to the entries in the list). | |
void | SetEventList (TEventList *evlist) override |
This function transfroms the given TEventList into a TEntryList. | |
void | SetMakeClass (Int_t make) override |
Set all the branches in this TTree to be in decomposed object mode (also known as MakeClass mode). | |
void | SetName (const char *name) override |
Change the name of this TChain. | |
virtual void | SetPacketSize (Int_t size=100) |
Set number of entries per packet for parallel root. | |
virtual void | SetProof (bool on=true, bool refresh=false, bool gettreeheader=false) |
Enable/Disable PROOF processing on the current default Proof (gProof). | |
void | SetWeight (Double_t w=1, Option_t *option="") override |
Set chain weight. | |
void | Streamer (TBuffer &) override |
Stream a class object. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
virtual void | UseCache (Int_t maxCacheSize=10, Int_t pageSize=0) |
Dummy function kept for back compatibility. | |
Public Member Functions inherited from TTree | |
TTree () | |
Default constructor and I/O constructor. | |
TTree (const char *name, const char *title, Int_t splitlevel=99, TDirectory *dir=(::ROOT::Internal::TDirectoryAtomicAdapter{})) | |
Normal tree constructor. | |
TTree (const TTree &tt)=delete | |
~TTree () override | |
Destructor. | |
void | AddAllocationCount (UInt_t count) |
virtual Int_t | AddBranchToCache (const char *bname, bool subbranches=false) |
Add branch with name bname to the Tree cache. | |
virtual Int_t | AddBranchToCache (TBranch *branch, bool subbranches=false) |
Add branch b to the Tree cache. | |
void | AddClone (TTree *) |
Add a cloned tree to our list of trees to be notified whenever we change our branch addresses or when we are deleted. | |
virtual void | AddTotBytes (Int_t tot) |
virtual void | AddZipBytes (Int_t zip) |
virtual Long64_t | AutoSave (Option_t *option="") |
AutoSave tree header every fAutoSave bytes. | |
virtual Int_t | Branch (const char *folder, Int_t bufsize=32000, Int_t splitlevel=99) |
Create one branch for each element in the folder. | |
TBranch * | Branch (const char *name, char *address, const char *leaflist, Int_t bufsize=32000) |
template<class T > | |
TBranch * | Branch (const char *name, const char *classname, T **addobj, Int_t bufsize=32000, Int_t splitlevel=99) |
template<class T > | |
TBranch * | Branch (const char *name, const char *classname, T *obj, Int_t bufsize=32000, Int_t splitlevel=99) |
virtual TBranch * | Branch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99) |
Create a new branch with the object of class classname at address addobj. | |
TBranch * | Branch (const char *name, int address, const char *leaflist, Int_t bufsize=32000) |
TBranch * | Branch (const char *name, Longptr_t address, const char *leaflist, Int_t bufsize=32000) |
template<typename T , std::size_t N> | |
TBranch * | Branch (const char *name, std::array< T, N > *obj, Int_t bufsize=32000, Int_t splitlevel=99) |
template<class T > | |
TBranch * | Branch (const char *name, T **addobj, Int_t bufsize=32000, Int_t splitlevel=99) |
Add a new branch, and infer the data type from the array addobj being passed. | |
template<class T > | |
TBranch * | Branch (const char *name, T *obj, Int_t bufsize=32000, Int_t splitlevel=99) |
Add a new branch, and infer the data type from the type of obj being passed. | |
virtual TBranch * | Branch (const char *name, void *address, const char *leaflist, Int_t bufsize=32000) |
Create a new TTree Branch. | |
virtual Int_t | Branch (TCollection *list, Int_t bufsize=32000, Int_t splitlevel=99, const char *name="") |
Create one branch for each element in the collection. | |
virtual Int_t | Branch (TList *list, Int_t bufsize=32000, Int_t splitlevel=99) |
Deprecated function. Use next function instead. | |
virtual TBranch * | BranchOld (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=1) |
Create a new TTree BranchObject. | |
virtual TBranch * | BranchRef () |
Build the optional branch supporting the TRefTable. | |
virtual TBranch * | Bronch (const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99) |
Create a new TTree BranchElement. | |
void | Browse (TBrowser *) override |
Browse content of the TTree. | |
virtual Int_t | BuildIndex (const char *majorname, const char *minorname="0") |
Build a Tree Index (default is TTreeIndex). | |
TStreamerInfo * | BuildStreamerInfo (TClass *cl, void *pointer=nullptr, bool canOptimize=true) |
Build StreamerInfo for class cl. | |
virtual TFile * | ChangeFile (TFile *file) |
Called by TTree::Fill() when file has reached its maximum fgMaxTreeSize. | |
virtual TTree * | CloneTree (Long64_t nentries=-1, Option_t *option="") |
Create a clone of this tree and copy nentries. | |
virtual void | CopyAddresses (TTree *, bool undo=false) |
Set branch addresses of passed tree equal to ours. | |
virtual Long64_t | CopyEntries (TTree *tree, Long64_t nentries=-1, Option_t *option="", bool needCopyAddresses=false) |
Copy nentries from given tree to this tree. | |
virtual TTree * | CopyTree (const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) |
Copy a tree with selection. | |
virtual TBasket * | CreateBasket (TBranch *) |
Create a basket for this tree and given branch. | |
Int_t | Debug () const |
void | Delete (Option_t *option="") override |
Delete this tree from memory or/and disk. | |
void | Draw (Option_t *opt) override |
Default Draw method for all objects. | |
virtual void | DropBaskets () |
Remove some baskets from memory. | |
virtual Int_t | DropBranchFromCache (const char *bname, bool subbranches=false) |
Remove the branch with name 'bname' from the Tree cache. | |
virtual Int_t | DropBranchFromCache (TBranch *branch, bool subbranches=false) |
Remove the branch b from the Tree cache. | |
virtual void | DropBuffers (Int_t nbytes) |
Drop branch buffers to accommodate nbytes below MaxVirtualsize. | |
bool | EnableCache () |
Enable the TTreeCache unless explicitly disabled for this TTree by a prior call to SetCacheSize(0) . | |
virtual Int_t | Fit (const char *funcname, const char *varexp, const char *selection="", Option_t *option="", Option_t *goption="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) |
Fit a projected item(s) from a tree. | |
virtual Int_t | FlushBaskets (bool create_cluster=true) const |
Write to disk all the basket that have not yet been individually written and create an event cluster boundary (by default). | |
UInt_t | GetAllocationCount () const |
virtual Long64_t | GetAutoFlush () const |
virtual Long64_t | GetAutoSave () const |
virtual TBranchRef * | GetBranchRef () const |
virtual Long64_t | GetChainOffset () const |
virtual bool | GetClusterPrefetch () const |
TFile * | GetCurrentFile () const |
Return pointer to the current file. | |
Long64_t | GetDebugMax () const |
Long64_t | GetDebugMin () const |
Int_t | GetDefaultEntryOffsetLen () const |
TDirectory * | GetDirectory () const |
virtual Long64_t | GetEntriesFast () const |
Return a number greater or equal to the total number of entries in the dataset. | |
virtual Long64_t | GetEntriesFriend () const |
Return pointer to the 1st Leaf named name in any Branch of this Tree or any branch in the list of friend trees. | |
virtual TEntryList * | GetEntryList () |
Returns the entry list assigned to this tree. | |
virtual Long64_t | GetEntryNumberWithBestIndex (Long64_t major, Long64_t minor=0) const |
Return entry number corresponding to major and minor number. | |
virtual Long64_t | GetEntryNumberWithIndex (Long64_t major, Long64_t minor=0) const |
Return entry number corresponding to major and minor number. | |
virtual Long64_t | GetEstimate () const |
Int_t | GetEvent (Long64_t entry, Int_t getall=0) |
TEventList * | GetEventList () const |
virtual Int_t | GetFileNumber () const |
virtual TTree * | GetFriend (const char *) const |
Return a pointer to the TTree friend whose name or alias is friendname . | |
virtual const char * | GetFriendAlias (TTree *) const |
If the 'tree' is a friend, this method returns its alias name. | |
TH1 * | GetHistogram () |
virtual bool | GetImplicitMT () |
virtual Int_t * | GetIndex () |
virtual Double_t * | GetIndexValues () |
ROOT::TIOFeatures | GetIOFeatures () const |
Returns the current set of IO settings. | |
virtual TIterator * | GetIteratorOnAllLeaves (bool dir=kIterForward) |
Creates a new iterator that will go through all the leaves on the tree itself and its friend. | |
virtual TList * | GetListOfAliases () const |
virtual TList * | GetListOfClones () |
virtual TList * | GetListOfFriends () const |
Int_t | GetMakeClass () const |
virtual Long64_t | GetMaxEntryLoop () const |
virtual Long64_t | GetMaxVirtualSize () const |
TObject * | GetNotify () const |
virtual Int_t | GetPacketSize () const |
virtual TVirtualPerfStats * | GetPerfStats () const |
TVirtualTreePlayer * | GetPlayer () |
Load the TTreePlayer (if not already done). | |
TTreeCache * | GetReadCache (TFile *file) const |
Find and return the TTreeCache registered with the file and which may contain branches for us. | |
TTreeCache * | GetReadCache (TFile *file, bool create) |
Find and return the TTreeCache registered with the file and which may contain branches for us. | |
virtual Long64_t | GetReadEvent () const |
virtual Int_t | GetScanField () const |
TTreeFormula * | GetSelect () |
virtual Long64_t | GetSelectedRows () |
Float_t | GetTargetMemoryRatio () const |
virtual Int_t | GetTimerInterval () const |
virtual Long64_t | GetTotBytes () const |
TBuffer * | GetTransientBuffer (Int_t size) |
Returns the transient buffer currently used by this TTree for reading/writing baskets. | |
virtual TVirtualIndex * | GetTreeIndex () const |
virtual Int_t | GetUpdate () const |
virtual TList * | GetUserInfo () |
Return a pointer to the list containing user objects associated to this tree. | |
virtual Double_t * | GetV1 () |
virtual Double_t * | GetV2 () |
virtual Double_t * | GetV3 () |
virtual Double_t * | GetV4 () |
virtual Double_t * | GetVal (Int_t i) |
TTreeFormula * | GetVar (Int_t i) |
TTreeFormula * | GetVar1 () |
TTreeFormula * | GetVar2 () |
TTreeFormula * | GetVar3 () |
TTreeFormula * | GetVar4 () |
virtual Double_t * | GetW () |
virtual Long64_t | GetZipBytes () const |
virtual void | IncrementTotalBuffers (Int_t nbytes) |
TClass * | IsA () const override |
bool | IsFolder () const override |
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). | |
virtual Long64_t | LoadTreeFriend (Long64_t entry, TTree *T) |
Load entry on behalf of our master tree, we may use an index. | |
virtual Int_t | MakeClass (const char *classname=nullptr, Option_t *option="") |
Generate a skeleton analysis class for this tree. | |
virtual Int_t | MakeCode (const char *filename=nullptr) |
Generate a skeleton function for this tree. | |
virtual Int_t | MakeProxy (const char *classname, const char *macrofilename=nullptr, const char *cutfilename=nullptr, const char *option=nullptr, Int_t maxUnrolling=3) |
Generate a skeleton analysis class for this Tree using TBranchProxy. | |
virtual Int_t | MakeSelector (const char *selector=nullptr, Option_t *option="") |
Generate skeleton selector class for this tree. | |
bool | MemoryFull (Int_t nbytes) |
Check if adding nbytes to memory we are still below MaxVirtualsize. | |
bool | Notify () override |
Function called when loading a new class library. | |
TTree & | operator= (const TTree &tt)=delete |
virtual void | OptimizeBaskets (ULong64_t maxMemory=10000000, Float_t minComp=1.1, Option_t *option="") |
This function may be called after having filled some entries in a Tree. | |
TPrincipal * | Principal (const char *varexp="", const char *selection="", Option_t *option="np", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) |
Interface to the Principal Components Analysis class. | |
void | Print (Option_t *option="") const override |
Print a summary of the tree contents. | |
virtual void | PrintCacheStats (Option_t *option="") const |
Print statistics about the TreeCache for this tree. | |
virtual Long64_t | Project (const char *hname, const char *varexp, const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) |
Make a projection of a tree using selections. | |
virtual TSQLResult * | Query (const char *varexp="", const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) |
Loop over entries and return a TSQLResult object containing entries following selection. | |
virtual Long64_t | ReadFile (const char *filename, const char *branchDescriptor="", char delimiter=' ') |
Create or simply read branches from filename. | |
virtual Long64_t | ReadStream (std::istream &inputStream, const char *branchDescriptor="", char delimiter=' ') |
Create or simply read branches from an input stream. | |
void | RecursiveRemove (TObject *obj) override |
Make sure that obj (which is being deleted or will soon be) is no longer referenced by this TTree. | |
virtual void | Refresh () |
Refresh contents of this tree and its branches from the current status on disk. | |
virtual void | RegisterExternalFriend (TFriendElement *) |
Record a TFriendElement that we need to warn when the chain switches to a new file (typically this is because this chain is a friend of another TChain) | |
virtual void | RemoveExternalFriend (TFriendElement *) |
Removes external friend. | |
virtual bool | SetAlias (const char *aliasName, const char *aliasFormula) |
Set a tree variable alias. | |
virtual void | SetAutoFlush (Long64_t autof=-30000000) |
This function may be called at the start of a program to change the default value for fAutoFlush. | |
virtual void | SetAutoSave (Long64_t autos=-300000000) |
In case of a program crash, it will be possible to recover the data in the tree up to the last AutoSave point. | |
virtual void | SetBasketSize (const char *bname, Int_t buffsize=16000) |
Set a branch's basket size. | |
template<class T > | |
Int_t | SetBranchAddress (const char *bname, T **add, TBranch **ptr=nullptr) |
template<class T > | |
Int_t | SetBranchAddress (const char *bname, T *add, TBranch **ptr=nullptr) |
virtual Int_t | SetCacheEntryRange (Long64_t first, Long64_t last) |
interface to TTreeCache to set the cache entry range | |
virtual void | SetCacheLearnEntries (Int_t n=10) |
Interface to TTreeCache to set the number of entries for the learning phase. | |
virtual void | SetChainOffset (Long64_t offset=0) |
virtual void | SetCircular (Long64_t maxEntries) |
Enable/Disable circularity for this tree. | |
virtual void | SetClusterPrefetch (bool enabled) |
virtual void | SetDebug (Int_t level=1, Long64_t min=0, Long64_t max=9999999) |
Set the debug level and the debug range. | |
virtual void | SetDefaultEntryOffsetLen (Int_t newdefault, bool updateExisting=false) |
Update the default value for the branch's fEntryOffsetLen. | |
virtual Long64_t | SetEntries (Long64_t n=-1) |
Change number of entries in the tree. | |
virtual void | SetEstimate (Long64_t nentries=1000000) |
Set number of entries to estimate variable limits. | |
virtual void | SetFileNumber (Int_t number=0) |
Set fFileNumber to number. | |
virtual void | SetImplicitMT (bool enabled) |
ROOT::TIOFeatures | SetIOFeatures (const ROOT::TIOFeatures &) |
Provide the end-user with the ability to enable/disable various experimental IO features for this TTree. | |
virtual void | SetMaxEntryLoop (Long64_t maxev=kMaxEntries) |
virtual void | SetMaxVirtualSize (Long64_t size=0) |
void | SetName (const char *name) override |
Change the name of this tree. | |
virtual void | SetNotify (TObject *obj) |
Sets the address of the object to be notified when the tree is loaded. | |
virtual void | SetObject (const char *name, const char *title) |
Change the name and title of this tree. | |
virtual void | SetParallelUnzip (bool opt=true, Float_t RelSize=-1) |
Enable or disable parallel unzipping of Tree buffers. | |
virtual void | SetPerfStats (TVirtualPerfStats *perf) |
Set perf stats. | |
virtual void | SetScanField (Int_t n=50) |
Sets the default maximum number of lines to be shown before <CR> when calling Scan(). | |
void | SetTargetMemoryRatio (Float_t ratio) |
virtual void | SetTimerInterval (Int_t msec=333) |
virtual void | SetTreeIndex (TVirtualIndex *index) |
The current TreeIndex is replaced by the new index. | |
virtual void | SetUpdate (Int_t freq=0) |
virtual void | Show (Long64_t entry=-1, Int_t lenmax=20) |
Print values of all active leaves for entry. | |
virtual void | StartViewer () |
Start the TTreeViewer on this tree. | |
virtual Int_t | StopCacheLearningPhase () |
Stop the cache learning phase. | |
void | Streamer (TBuffer &) override |
Stream a class object. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
virtual Int_t | UnbinnedFit (const char *funcname, const char *varexp, const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0) |
Unbinned fit of one or more variable(s) from a tree. | |
void | UseCurrentStyle () override |
Replace current attributes by current style. | |
Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const override |
Write this object to the current directory. | |
Int_t | Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) override |
Write this object to the current directory. | |
Public Member Functions inherited from TNamed | |
TNamed () | |
TNamed (const char *name, const char *title) | |
TNamed (const TNamed &named) | |
TNamed copy ctor. | |
TNamed (const TString &name, const TString &title) | |
virtual | ~TNamed () |
TNamed destructor. | |
void | Clear (Option_t *option="") override |
Set name and title to empty strings (""). | |
TObject * | Clone (const char *newname="") const override |
Make a clone of an object using the Streamer facility. | |
Int_t | Compare (const TObject *obj) const override |
Compare two TNamed objects. | |
void | Copy (TObject &named) const override |
Copy this to obj. | |
virtual void | FillBuffer (char *&buffer) |
Encode TNamed into output buffer. | |
const char * | GetName () const override |
Returns name of object. | |
const char * | GetTitle () const override |
Returns title of object. | |
ULong_t | Hash () const override |
Return hash value for this object. | |
Bool_t | IsSortable () const override |
void | ls (Option_t *option="") const override |
List TNamed name and title. | |
TNamed & | operator= (const TNamed &rhs) |
TNamed assignment operator. | |
virtual void | SetNameTitle (const char *name, const char *title) |
Set all the TNamed parameters (name and title). | |
virtual void | SetTitle (const char *title="") |
Set the title of the TNamed. | |
virtual Int_t | Sizeof () const |
Return size of the TNamed part of the TObject. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TObject | |
TObject () | |
TObject constructor. | |
TObject (const TObject &object) | |
TObject copy ctor. | |
virtual | ~TObject () |
TObject destructor. | |
void | AbstractMethod (const char *method) const |
Use this method to implement an "abstract" method that you don't want to leave purely abstract. | |
virtual void | AppendPad (Option_t *option="") |
Append graphics object to current pad. | |
ULong_t | CheckedHash () |
Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. | |
virtual const char * | ClassName () const |
Returns name of class to which the object belongs. | |
virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
Computes distance from point (px,py) to the object. | |
virtual void | DrawClass () const |
Draw class inheritance tree of the class to which this object belongs. | |
virtual TObject * | DrawClone (Option_t *option="") const |
Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1) . | |
virtual void | Dump () const |
Dump contents of object on stdout. | |
virtual void | Error (const char *method, const char *msgfmt,...) const |
Issue error message. | |
virtual void | Execute (const char *method, const char *params, Int_t *error=nullptr) |
Execute method on this object with the given parameter string, e.g. | |
virtual void | Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr) |
Execute method on this object with parameters stored in the TObjArray. | |
virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
Execute action corresponding to an event at (px,py). | |
virtual void | Fatal (const char *method, const char *msgfmt,...) const |
Issue fatal error message. | |
virtual TObject * | FindObject (const char *name) const |
Must be redefined in derived classes. | |
virtual TObject * | FindObject (const TObject *obj) const |
Must be redefined in derived classes. | |
virtual Option_t * | GetDrawOption () const |
Get option used by the graphics system to draw this object. | |
virtual const char * | GetIconName () const |
Returns mime type name of object. | |
virtual char * | GetObjectInfo (Int_t px, Int_t py) const |
Returns string containing info about the object at position (px,py). | |
virtual Option_t * | GetOption () const |
virtual UInt_t | GetUniqueID () const |
Return the unique object id. | |
virtual Bool_t | HandleTimer (TTimer *timer) |
Execute action in response of a timer timing out. | |
Bool_t | HasInconsistentHash () const |
Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. | |
virtual void | Info (const char *method, const char *msgfmt,...) const |
Issue info message. | |
virtual Bool_t | InheritsFrom (const char *classname) const |
Returns kTRUE if object inherits from class "classname". | |
virtual Bool_t | InheritsFrom (const TClass *cl) const |
Returns kTRUE if object inherits from TClass cl. | |
virtual void | Inspect () const |
Dump contents of this object in a graphics canvas. | |
void | InvertBit (UInt_t f) |
Bool_t | IsDestructed () const |
IsDestructed. | |
virtual Bool_t | IsEqual (const TObject *obj) const |
Default equal comparison (objects are equal if they have the same address in memory). | |
R__ALWAYS_INLINE Bool_t | IsOnHeap () const |
R__ALWAYS_INLINE Bool_t | IsZombie () const |
void | MayNotUse (const char *method) const |
Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). | |
void | Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const |
Use this method to declare a method obsolete. | |
void | operator delete (void *ptr) |
Operator delete. | |
void | operator delete (void *ptr, void *vp) |
Only called by placement new when throwing an exception. | |
void | operator delete[] (void *ptr) |
Operator delete []. | |
void | operator delete[] (void *ptr, void *vp) |
Only called by placement new[] when throwing an exception. | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *vp) |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, void *vp) |
TObject & | operator= (const TObject &rhs) |
TObject assignment operator. | |
virtual void | Paint (Option_t *option="") |
This method must be overridden if a class wants to paint itself. | |
virtual void | Pop () |
Pop on object drawn in a pad to the top of the display list. | |
virtual Int_t | Read (const char *name) |
Read contents of object with specified name from the current directory. | |
void | ResetBit (UInt_t f) |
virtual void | SaveAs (const char *filename="", Option_t *option="") const |
Save this object in the file specified by filename. | |
void | SetBit (UInt_t f) |
void | SetBit (UInt_t f, Bool_t set) |
Set or unset the user status bits as specified in f. | |
virtual void | SetDrawOption (Option_t *option="") |
Set drawing option for object. | |
virtual void | SetUniqueID (UInt_t uid) |
Set the unique object id. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
virtual void | SysError (const char *method, const char *msgfmt,...) const |
Issue system error message. | |
R__ALWAYS_INLINE Bool_t | TestBit (UInt_t f) const |
Int_t | TestBits (UInt_t f) const |
virtual void | Warning (const char *method, const char *msgfmt,...) const |
Issue warning message. | |
Public Member Functions inherited from TAttLine | |
TAttLine () | |
AttLine default constructor. | |
TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth) | |
AttLine normal constructor. | |
virtual | ~TAttLine () |
AttLine destructor. | |
void | Copy (TAttLine &attline) const |
Copy this line attributes to a new TAttLine. | |
Int_t | DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2) |
Compute distance from point px,py to a line. | |
virtual Color_t | GetLineColor () const |
Return the line color. | |
virtual Style_t | GetLineStyle () const |
Return the line style. | |
virtual Width_t | GetLineWidth () const |
Return the line width. | |
virtual void | Modify () |
Change current line attributes if necessary. | |
virtual void | ResetAttLine (Option_t *option="") |
Reset this line attributes to default values. | |
virtual void | SaveLineAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1) |
Save line attributes as C++ statement(s) on output stream out. | |
virtual void | SetLineAttributes () |
Invoke the DialogCanvas Line attributes. | |
virtual void | SetLineColor (Color_t lcolor) |
Set the line color. | |
virtual void | SetLineColorAlpha (Color_t lcolor, Float_t lalpha) |
Set a transparent line color. | |
virtual void | SetLineStyle (Style_t lstyle) |
Set the line style. | |
virtual void | SetLineWidth (Width_t lwidth) |
Set the line width. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TAttFill | |
TAttFill () | |
AttFill default constructor. | |
TAttFill (Color_t fcolor, Style_t fstyle) | |
AttFill normal constructor. | |
virtual | ~TAttFill () |
AttFill destructor. | |
void | Copy (TAttFill &attfill) const |
Copy this fill attributes to a new TAttFill. | |
virtual Color_t | GetFillColor () const |
Return the fill area color. | |
virtual Style_t | GetFillStyle () const |
Return the fill area style. | |
virtual Bool_t | IsTransparent () const |
virtual void | Modify () |
Change current fill area attributes if necessary. | |
virtual void | ResetAttFill (Option_t *option="") |
Reset this fill attributes to default values. | |
virtual void | SaveFillAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001) |
Save fill attributes as C++ statement(s) on output stream out. | |
virtual void | SetFillAttributes () |
Invoke the DialogCanvas Fill attributes. | |
virtual void | SetFillColor (Color_t fcolor) |
Set the fill area color. | |
virtual void | SetFillColorAlpha (Color_t fcolor, Float_t falpha) |
Set a transparent fill color. | |
virtual void | SetFillStyle (Style_t fstyle) |
Set the fill area style. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Public Member Functions inherited from TAttMarker | |
TAttMarker () | |
TAttMarker default constructor. | |
TAttMarker (Color_t color, Style_t style, Size_t msize) | |
TAttMarker normal constructor. | |
virtual | ~TAttMarker () |
TAttMarker destructor. | |
void | Copy (TAttMarker &attmarker) const |
Copy this marker attributes to a new TAttMarker. | |
virtual Color_t | GetMarkerColor () const |
Return the marker color. | |
virtual Size_t | GetMarkerSize () const |
Return the marker size. | |
virtual Style_t | GetMarkerStyle () const |
Return the marker style. | |
virtual void | Modify () |
Change current marker attributes if necessary. | |
virtual void | ResetAttMarker (Option_t *toption="") |
Reset this marker attributes to the default values. | |
virtual void | SaveMarkerAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1) |
Save line attributes as C++ statement(s) on output stream out. | |
virtual void | SetMarkerAttributes () |
Invoke the DialogCanvas Marker attributes. | |
virtual void | SetMarkerColor (Color_t mcolor=1) |
Set the marker color. | |
virtual void | SetMarkerColorAlpha (Color_t mcolor, Float_t malpha) |
Set a transparent marker color. | |
virtual void | SetMarkerSize (Size_t msize=1) |
Set the marker size. | |
virtual void | SetMarkerStyle (Style_t mstyle=1) |
Set the marker style. | |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Static Public Member Functions | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TTree | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Int_t | GetBranchStyle () |
Static function returning the current branch style. | |
static Long64_t | GetMaxTreeSize () |
Static function which returns the tree file size limit in bytes. | |
static TTree * | MergeTrees (TList *list, Option_t *option="") |
Static function merging the trees in the TList into a new tree. | |
static void | SetBranchStyle (Int_t style=1) |
Set the current branch style. | |
static void | SetMaxTreeSize (Long64_t maxsize=100000000000LL) |
Set the maximum size in bytes of a Tree file (static function). | |
Static Public Member Functions inherited from TNamed | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TObject | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Longptr_t | GetDtorOnly () |
Return destructor only flag. | |
static Bool_t | GetObjectStat () |
Get status of object stat flag. | |
static void | SetDtorOnly (void *obj) |
Set destructor only flag. | |
static void | SetObjectStat (Bool_t stat) |
Turn on/off tracking of objects in the TObjectTable. | |
Static Public Member Functions inherited from TAttLine | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TAttFill | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Static Public Member Functions inherited from TAttMarker | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
static Width_t | GetMarkerLineWidth (Style_t style) |
Internal helper function that returns the line width of the given marker style (0 = filled marker) | |
static Style_t | GetMarkerStyleBase (Style_t style) |
Internal helper function that returns the corresponding marker style with line width 1 for the given style. | |
Static Public Attributes | |
static constexpr auto | kBigNumber = TTree::kMaxEntries |
Static Public Attributes inherited from TTree | |
static constexpr Long64_t | kMaxEntries = TVirtualTreePlayer::kMaxEntries |
Protected Member Functions | |
void | InvalidateCurrentTree () |
Set the TTree to be reloaded as soon as possible. | |
void | ReleaseChainProof () |
Protected Member Functions inherited from TTree | |
virtual TBranch * | BranchImp (const char *branchname, const char *classname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel) |
Same as TTree::Branch() with added check that addobj matches className. | |
virtual TBranch * | BranchImp (const char *branchname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel) |
Same as TTree::Branch but automatic detection of the class name. | |
virtual TBranch * | BranchImpArr (const char *branchname, EDataType datatype, std::size_t N, void *addobj, Int_t bufsize, Int_t splitlevel) |
virtual TBranch * | BranchImpRef (const char *branchname, const char *classname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel) |
Same as TTree::Branch but automatic detection of the class name. | |
virtual TBranch * | BranchImpRef (const char *branchname, TClass *ptrClass, EDataType datatype, void *addobj, Int_t bufsize, Int_t splitlevel) |
Same as TTree::Branch but automatic detection of the class name. | |
virtual TBranch * | BronchExec (const char *name, const char *classname, void *addobj, bool isptrptr, Int_t bufsize, Int_t splitlevel) |
Helper function implementing TTree::Bronch and TTree::Branch(const char *name, T &obj);. | |
virtual Int_t | CheckBranchAddressType (TBranch *branch, TClass *ptrClass, EDataType datatype, bool ptr) |
Check whether or not the address described by the last 3 parameters matches the content of the branch. | |
Long64_t | GetCacheAutoSize (bool withDefault=false) |
Used for automatic sizing of the cache. | |
virtual TLeaf * | GetLeafImpl (const char *branchname, const char *leafname) |
Return pointer to the 1st Leaf named name in any Branch of this Tree or any branch in the list of friend trees. | |
char | GetNewlineValue (std::istream &inputStream) |
Determine which newline this file is using. | |
void | ImportClusterRanges (TTree *fromtree) |
Appends the cluster range information stored in 'fromtree' to this tree, including the value of fAutoFlush. | |
virtual void | KeepCircular () |
Keep a maximum of fMaxEntries in memory. | |
void | MoveReadCache (TFile *src, TDirectory *dir) |
Move a cache from a file to the current file in dir. | |
Int_t | SetBranchAddressImp (TBranch *branch, void *addr, TBranch **ptr) |
Change branch address, dealing with clone trees properly. | |
Int_t | SetCacheSizeAux (bool autocache=true, Long64_t cacheSize=0) |
Set the size of the file cache and create it if possible. | |
Protected Member Functions inherited from TObject | |
virtual void | DoError (int level, const char *location, const char *fmt, va_list va) const |
Interface to ErrorHandler (protected). | |
void | MakeZombie () |
Protected Attributes | |
bool | fCanDeleteRefs |
! If true, TProcessIDs are deleted when closing a file | |
TFile * | fFile |
! Pointer to current file (We own the file). | |
TObjArray * | fFiles |
-> List of file names containing the trees (TChainElement, owned) | |
bool | fGlobalRegistration |
! if true, bypass use of global lists | |
Int_t | fNtrees |
Number of trees. | |
TChain * | fProofChain |
! chain proxy when going to be processed by PROOF | |
TList * | fStatus |
-> List of active/inactive branches (TChainElement, owned) | |
TTree * | fTree |
! Pointer to current tree (Note: We do not own this tree.) | |
Int_t | fTreeNumber |
! Current Tree number in fTreeOffset table | |
Long64_t * | fTreeOffset |
[fTreeOffsetLen] Array of variables | |
Int_t | fTreeOffsetLen |
Current size of fTreeOffset array. | |
Protected Attributes inherited from TTree | |
TList * | fAliases |
List of aliases for expressions based on the tree branches. | |
std::atomic< UInt_t > | fAllocationCount {0} |
indicates basket should be resized to exact memory usage, but causes significant | |
Long64_t | fAutoFlush |
Auto-flush tree when fAutoFlush entries written or -fAutoFlush (compressed) bytes produced. | |
Long64_t | fAutoSave |
Autosave tree when fAutoSave entries written or -fAutoSave (compressed) bytes produced. | |
TObjArray | fBranches |
List of Branches. | |
TBranchRef * | fBranchRef |
Branch supporting the TRefTable (if any) | |
bool | fCacheDoAutoInit |
! true if cache auto creation or resize check is needed | |
bool | fCacheDoClusterPrefetch |
! true if cache is prefetching whole clusters | |
Long64_t | fCacheSize |
! Maximum size of file buffers | |
bool | fCacheUserSet |
! true if the cache setting was explicitly given by user | |
Long64_t | fChainOffset |
! Offset of 1st entry of this Tree in a TChain | |
TList * | fClones |
! List of cloned trees which share our addresses | |
Long64_t * | fClusterRangeEnd |
[fNClusterRange] Last entry of a cluster range. | |
Long64_t * | fClusterSize |
[fNClusterRange] Number of entries in each cluster for a given range. | |
Int_t | fDebug |
! Debug level | |
Long64_t | fDebugMax |
! Last entry number to debug | |
Long64_t | fDebugMin |
! First entry number to debug | |
Int_t | fDefaultEntryOffsetLen |
Initial Length of fEntryOffset table in the basket buffers. | |
TDirectory * | fDirectory |
! Pointer to directory holding this tree | |
Long64_t | fEntries |
Number of entries. | |
TEntryList * | fEntryList |
! Pointer to event selection list (if one) | |
Long64_t | fEstimate |
Number of entries to estimate histogram limits. | |
TEventList * | fEventList |
! Pointer to event selection list (if one) | |
TList * | fExternalFriends |
! List of TFriendsElement pointing to us and need to be notified of LoadTree. Content not owned. | |
Int_t | fFileNumber |
! current file number (if file extensions) | |
Long64_t | fFlushedBytes |
Number of auto-flushed bytes. | |
UInt_t | fFriendLockStatus |
! Record which method is locking the friend recursion | |
TList * | fFriends |
pointer to list of friend elements | |
bool | fIMTEnabled |
! true if implicit multi-threading is enabled for this tree | |
TArrayI | fIndex |
Index of sorted values. | |
TArrayD | fIndexValues |
Sorted index values. | |
TIOFeatures | fIOFeatures {0} |
IO features to define for newly-written baskets and branches. | |
TObjArray | fLeaves |
Direct pointers to individual branch leaves. | |
Int_t | fMakeClass |
! not zero when processing code generated by MakeClass | |
Int_t | fMaxClusterRange |
! Memory allocated for the cluster range. | |
Long64_t | fMaxEntries |
Maximum number of entries in case of circular buffers. | |
Long64_t | fMaxEntryLoop |
Maximum number of entries to process. | |
Long64_t | fMaxVirtualSize |
Maximum total size of buffers kept in memory. | |
Int_t | fNClusterRange |
Number of Cluster range in addition to the one defined by 'AutoFlush'. | |
UInt_t | fNEntriesSinceSorting |
! Number of entries processed since the last re-sorting of branches | |
Int_t | fNfill |
! Local for EntryLoop | |
TObject * | fNotify |
Object to be notified when loading a Tree. | |
Int_t | fPacketSize |
! Number of entries in one packet for parallel root | |
TVirtualPerfStats * | fPerfStats |
! pointer to the current perf stats object | |
TVirtualTreePlayer * | fPlayer |
! Pointer to current Tree player | |
Long64_t | fReadEntry |
! Number of the entry being processed | |
Long64_t | fSavedBytes |
Number of autosaved bytes. | |
Int_t | fScanField |
Number of runs before prompting in Scan. | |
std::vector< TBranch * > | fSeqBranches |
! Branches to be processed sequentially when IMT is on | |
std::vector< std::pair< Long64_t, TBranch * > > | fSortedBranches |
! Branches to be processed in parallel when IMT is on, sorted by average task time | |
Float_t | fTargetMemoryRatio {1.1f} |
! Ratio for memory usage in uncompressed buffers versus actual occupancy. | |
Int_t | fTimerInterval |
Timer interval in milliseconds. | |
std::atomic< Long64_t > | fTotalBuffers |
! Total number of bytes in branch buffers | |
Long64_t | fTotBytes |
Total number of bytes in all branches before compression. | |
TBuffer * | fTransientBuffer |
! Pointer to the current transient buffer. | |
TVirtualIndex * | fTreeIndex |
Pointer to the tree Index (if any) | |
Int_t | fUpdate |
Update frequency for EntryLoop. | |
TList * | fUserInfo |
pointer to a list of user objects associated to this Tree | |
Double_t | fWeight |
Tree weight (see TTree::SetWeight) | |
Long64_t | fZipBytes |
Total number of bytes in all branches after compression. | |
Protected Attributes inherited from TNamed | |
TString | fName |
TString | fTitle |
Protected Attributes inherited from TAttLine | |
Color_t | fLineColor |
Line color. | |
Style_t | fLineStyle |
Line style. | |
Width_t | fLineWidth |
Line width. | |
Protected Attributes inherited from TAttFill | |
Color_t | fFillColor |
Fill area color. | |
Style_t | fFillStyle |
Fill area style. | |
Protected Attributes inherited from TAttMarker | |
Color_t | fMarkerColor |
Marker color. | |
Size_t | fMarkerSize |
Marker size. | |
Style_t | fMarkerStyle |
Marker style. | |
Private Member Functions | |
TChain (const TChain &) | |
TChain & | operator= (const TChain &) |
void | ParseTreeFilename (const char *name, TString &filename, TString &treename, TString &query, TString &suffix) const |
Get the tree url or filename and other information from the name. | |
Additional Inherited Members | |
Protected Types inherited from TTree | |
enum | ELockStatusBits { kFindBranch = (1ULL << ( 0 )) , kFindLeaf = (1ULL << ( 1 )) , kGetAlias = (1ULL << ( 2 )) , kGetBranch = (1ULL << ( 3 )) , kGetEntry = (1ULL << ( 4 )) , kGetEntryWithIndex = (1ULL << ( 5 )) , kGetFriend = (1ULL << ( 6 )) , kGetFriendAlias = (1ULL << ( 7 )) , kGetLeaf = (1ULL << ( 8 )) , kLoadTree = (1ULL << ( 9 )) , kPrint = (1ULL << ( 10 )) , kRemoveFriend = (1ULL << ( 11 )) , kSetBranchStatus = (1ULL << ( 12 )) } |
Protected Types inherited from TObject | |
enum | { kOnlyPrepStep = (1ULL << ( 3 )) } |
Static Protected Attributes inherited from TTree | |
static Int_t | fgBranchStyle = 1 |
Old/New branch style. | |
static Long64_t | fgMaxTreeSize = 100000000000LL |
Maximum size of a file containing a Tree. | |
#include <TChain.h>
enum TChain::EStatusBits |
enum TChain::Mode |
|
private |
TChain::TChain | ( | Mode | mode = kWithGlobalRegistration | ) |
Default constructor.
Definition at line 72 of file TChain.cxx.
TChain::TChain | ( | const char * | name, |
const char * | title = "" , |
||
Mode | mode = kWithGlobalRegistration |
||
) |
Create a chain.
A TChain is a collection of TFile objects. the first parameter "name" is the name of the TTree object in the files added with Add. Use TChain::Add to add a new element to this chain.
In case the Tree is in a subdirectory, do, eg:
Example: Suppose we have 3 files f1.root, f2.root and f3.root. Each file contains a TTree object named "T".
The Draw function above will process the variable "x" in Tree "T" reading sequentially the 3 files in the chain ch.
The TChain data structure:
Each TChainElement has a name equal to the tree name of this TChain and a title equal to the file name. So, to loop over the TFiles that have been added to this chain:
Definition at line 140 of file TChain.cxx.
|
override |
Destructor.
Definition at line 173 of file TChain.cxx.
|
virtual |
Add a new file to this chain.
[in] | name | The path to the file to be added. See below for details. |
[in] | nentries | Number of entries in the file. This can be an estimate or queried from the file. See below for details. |
nentries
, returns the number of files matching the name irrespective of whether they contain the correct tree.There are two sets of formats accepted for the parameter name
. The first one is:
Note the following:
tree_name
part is missing, it will be assumed that the file contains a tree with the same name as the chain./tree_name
) is only supported for backward compatibility; it requires the file name to contain the string '.root' and its use is deprecated. Instead, use the form
?#tree_name (that is an "?" followed by an empty query), for example: The second format accepted for name
may have the form of a URL, e.g.:
Note the following:
http
or https
URLs can contain a query identifier without tree_name
, but generally URLs can not be written with them because of ambiguity with the wildcard character. (Also see the documentation for TChain::AddFile, which does not support wildcards but allows the URL name to contain a query).Depending on the value of the parameter, the number of entries in the file is retrieved differently:
nentries <= 0
, the file is connected and the tree header read in memory to get the number of entries.nentries > 0
, the file is not connected, nentries
is assumed to be the number of entries in the file. In this case, no check is made that the file exists and that the corresponding tree exists as well. This second mode is interesting in case the number of entries in the file is already stored in a run data base for example.nentries == TTree::kMaxEntries
(default), the file is not connected. The number of entries in each file will be read only when the file will need to be connected to read an entry. This option is the default and very efficient if one processes the chain sequentially. Note that in case TChain::GetEntry(entry) is called and entry refers to an entry in the 3rd file, for example, this forces the tree headers in the first and second file to be read to find the number of entries in these files. Note that calling TChain::GetEntriesFast after having created a chain with this default returns TTree::kMaxEntries ! Using TChain::GetEntries instead will force all the tree headers in the chain to be read to get the number of entries in each tree.Each element of the chain is a TChainElement object. It has a name equal to the tree name of this chain (or the name of the specific tree in the added file if it was explicitly tagged) and a title equal to the file name. So, to loop over the files that have been added to this chain:
TChain
to this one, use TChain::Add(TChain* chain). Definition at line 365 of file TChain.cxx.
Add all files referenced by the passed chain to this chain.
The function returns the total number of files connected.
Definition at line 219 of file TChain.cxx.
|
virtual |
Add a new file to this chain.
Filename formats are similar to TChain::Add. Wildcards are not applied. urls may also contain query and fragment identifiers where the tree name can be specified in the url fragment.
eg.
If tree_name is given as a part of the file name it is used to as the name of the tree to load from the file. Otherwise if tname argument is specified the chain will load the tree named tname from the file, otherwise the original treename specified in the TChain constructor will be used. Tagging the tree_name with a slash [/tree_name] is only supported for backward compatibility; it requires the file name ot contain the string '.root' and its use is deprecated.
A. If nentries <= 0, the file is opened and the tree header read into memory to get the number of entries.
B. If nentries > 0, the file is not opened, and nentries is assumed to be the number of entries in the file. In this case, no check is made that the file exists nor that the tree exists in the file, nor that the real TTree entries match with the input argument. This second mode is interesting in case the number of entries in the file is already stored in a run database for example.
nentries
> tree_entries
, this may lead to silent data corruption in your analysis or undefined behavior in your program. Use the other options if unsure.C. If nentries == TTree::kMaxEntries (default), the file is not opened. The number of entries in each file will be read only when the file is opened to read an entry. This option is the default and very efficient if one processes the chain sequentially. Note that in case GetEntry(entry) is called and entry refers to an entry in the third file, for example, this forces the tree headers in the first and second file to be read to find the number of entries in those files. Note that if one calls GetEntriesFast() after having created a chain with this default, GetEntriesFast() will return TTree::kMaxEntries! Using the GetEntries() function instead will force all of the tree headers in the chain to be read to read the number of entries in each tree.
D. The TChain data structure Each TChainElement has a name equal to the tree name of this TChain and a title equal to the file name. So, to loop over the TFiles that have been added to this chain:
The function returns 1 if the file is successfully connected, 0 otherwise.
Definition at line 494 of file TChain.cxx.
|
virtual |
Add all files referenced in the list to the chain.
The object type in the list must be either TFileInfo or TObjString or TUrl . The function return 1 if successful, 0 otherwise.
Definition at line 592 of file TChain.cxx.
|
overridevirtual |
Add a TFriendElement to the list of friends of this chain.
A TChain has a list of friends similar to a tree (see TTree::AddFriend). You can add a friend to a chain with the TChain::AddFriend method, and you can retrieve the list of friends with TChain::GetListOfFriends. This example has four chains each has 20 ROOT trees from 20 ROOT files.
Now we can add the friends to the first chain.
The parameter is the name of friend chain (the name of a chain is always the name of the tree from which it was created). The original chain has access to all variable in its friends. We can use the TChain::Draw method as if the values in the friends were in the original chain. To specify the chain to use in the Draw method, use the syntax:
If the variable name is enough to uniquely identify the variable, you can leave out the chain and/or branch name. For example, this generates a 3-d scatter plot of variable "var" in the TChain ch versus variable v1 in TChain t1 versus variable v2 in TChain t2.
When a TChain::Draw is executed, an automatic call to TTree::AddFriend connects the trees in the chain. When a chain is deleted, its friend elements are also deleted.
The number of entries in the friend must be equal or greater to the number of entries of the original chain. If the friend has fewer entries a warning is given and the resulting histogram will have missing entries. For additional information see TTree::AddFriend.
Reimplemented from TTree.
Definition at line 682 of file TChain.cxx.
|
overridevirtual |
Add the whole chain or tree as a friend of this chain.
Reimplemented from TTree.
Definition at line 711 of file TChain.cxx.
|
overridevirtual |
Add the whole chain or tree as a friend of this chain.
Reimplemented from TTree.
Definition at line 738 of file TChain.cxx.
|
overridevirtual |
Browse the contents of the chain.
Reimplemented from TObject.
Reimplemented in TProofChain.
Definition at line 765 of file TChain.cxx.
|
virtual |
When closing a file during the chain processing, the file may be closed with option "R" if flag is set to true.
by default flag is true. When closing a file with option "R", all TProcessIDs referenced by this file are deleted. Calling TFile::Close("R") might be necessary in case one reads a long list of files having TRef, writing some of the referenced objects or TRef to a new file. If the TRef or referenced objects of the file being closed will not be referenced again, it is possible to minimize the size of the TProcessID data structures in memory by forcing a delete of the unused TProcessID.
Definition at line 783 of file TChain.cxx.
|
static |
|
inlinestaticconstexpr |
|
virtual |
Initialize the packet descriptor string.
Definition at line 791 of file TChain.cxx.
|
inlinestatic |
|
overridevirtual |
Override the TTree::DirectoryAutoAdd behavior: we never auto add.
Reimplemented from TTree.
Definition at line 804 of file TChain.cxx.
|
overridevirtual |
Process all entries in this chain and draw histogram corresponding to expression varexp.
Returns -1 in case of error or number of selected events in case of success.
Reimplemented from TTree.
Reimplemented in TProofChain.
Definition at line 839 of file TChain.cxx.
|
overridevirtual |
Draw expression varexp for selected entries.
Returns -1 in case of error or number of selected events in case of success.
This function accepts TCut objects as arguments. Useful to use the string operator +, example:
Reimplemented from TTree.
Reimplemented in TProofChain.
Definition at line 819 of file TChain.cxx.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Fill all branches.
This function loops on all the branches of this tree. For each branch, it copies to the branch buffer (basket) the current values of the leaves data types. If a leaf is a simple data type, a simple conversion to a machine independent format has to be done.
This machine independent version of the data is copied into a basket (each branch has its own basket). When a basket is full (32k worth of data by default), it is then optionally compressed and written to disk (this operation is also called committing or 'flushing' the basket). The committed baskets are then immediately removed from memory.
The function returns the number of bytes committed to the individual branches.
If a write error occurs, the number of bytes returned is -1.
If no data are written, because, e.g., the branch is disabled, the number of bytes returned is 0.
The baskets are flushed and the Tree header saved at regular intervals
At regular intervals, when the amount of data written so far is greater than fAutoFlush (see SetAutoFlush) all the baskets are flushed to disk. This makes future reading faster as it guarantees that baskets belonging to nearby entries will be on the same disk region. When the first call to flush the baskets happen, we also take this opportunity to optimize the baskets buffers. We also check if the amount of data written is greater than fAutoSave (see SetAutoSave). In this case we also write the Tree header. This makes the Tree recoverable up to this point in case the program writing the Tree crashes. The decisions to FlushBaskets and Auto Save can be made based either on the number of bytes written (fAutoFlush and fAutoSave negative) or on the number of entries written (fAutoFlush and fAutoSave positive). Note that the user can decide to call FlushBaskets and AutoSave in her event loop base on the number of events written instead of the number of bytes written.
TTree::FlushBaskets
too often increases the IO time.TTree::AutoSave
too often increases the IO time and also the file size.TTree::ChangeFile
when the tree reaches a size greater than TTree::fgMaxTreeSize
. This doesn't happen if the tree is attached to a TMemFile
or derivate. Reimplemented from TTree.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Returns the expanded value of the alias. Search in the friends if any.
Reimplemented from TTree.
Definition at line 900 of file TChain.cxx.
|
overridevirtual |
Return pointer to the branch name in the current tree.
Reimplemented from TTree.
Reimplemented in TProofChain.
Definition at line 919 of file TChain.cxx.
|
overridevirtual |
|
inlineoverridevirtual |
Return absolute entry number in the chain.
The input parameter entry is the entry number in the current tree of this chain.
Reimplemented from TTree.
Definition at line 968 of file TChain.cxx.
|
overridevirtual |
Return an iterator over the cluster of baskets starting at firstentry.
This iterator is not yet supported for TChain object.
Reimplemented from TTree.
Definition at line 957 of file TChain.cxx.
|
overridevirtual |
Return the total number of entries in the chain.
In case the number of entries in each tree is not yet known, the offset table is computed.
Reimplemented from TTree.
Reimplemented in TProofChain.
Definition at line 978 of file TChain.cxx.
|
inlineoverridevirtual |
Return the number of entries matching the selection.
Return -1 in case of errors.
If the selection uses any arrays or containers, we return the number of entries where at least one element match the selection. GetEntries is implemented using the selector class TSelectorEntries, which can be used directly (see code in TTreePlayer::GetEntries) for additional option. If SetEventList was used on the TTree or TChain, only that subset of entries will be considered.
Reimplemented from TTree.
Reimplemented in TProofChain.
Get entry from the file to memory.
Return the total number of bytes read, 0 bytes read indicates a failure.
Reimplemented from TTree.
Definition at line 1002 of file TChain.cxx.
Return entry number corresponding to entry.
if no TEntryList set returns entry else returns entry #entry from this entry list and also computes the global entry number (loads all tree headers)
Reimplemented from TTree.
Definition at line 1021 of file TChain.cxx.
Return entry corresponding to major and minor number.
The function returns the total number of bytes read. If the Tree has friend trees, the corresponding entry with the index values (major,minor) is read. Note that the master Tree and its friend may have different entry serial numbers corresponding to (major,minor).
Reimplemented from TTree.
Definition at line 1054 of file TChain.cxx.
TFile * TChain::GetFile | ( | ) | const |
Return a pointer to the current file.
If no file is connected, the first file is automatically loaded.
Definition at line 1065 of file TChain.cxx.
|
overridevirtual |
Return a pointer to the leaf name in the current tree.
Reimplemented from TTree.
Definition at line 1078 of file TChain.cxx.
|
overridevirtual |
Return a pointer to the leaf name in the current tree.
Reimplemented from TTree.
Definition at line 1099 of file TChain.cxx.
|
overridevirtual |
Return a pointer to the list of branches of the current tree.
Warning: If there is no current TTree yet, this routine will open the first in the chain.
Returns 0 on failure.
Reimplemented from TTree.
Reimplemented in TProofChain.
Definition at line 1125 of file TChain.cxx.
|
overridevirtual |
Return a pointer to the list of leaves of the current tree.
Warning: May set the current tree!
Reimplemented from TTree.
Reimplemented in TProofChain.
Definition at line 1148 of file TChain.cxx.
|
overridevirtual |
Return maximum of column with name columname.
Reimplemented from TTree.
Definition at line 1169 of file TChain.cxx.
|
overridevirtual |
Return minimum of column with name columname.
Reimplemented from TTree.
Definition at line 1186 of file TChain.cxx.
|
overridevirtual |
Return the number of branches of the current tree.
Warning: May set the current tree!
Reimplemented from TTree.
Definition at line 1205 of file TChain.cxx.
|
overridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
overridevirtual |
Return the chain weight.
By default the weight is the weight of the current tree. However, if the weight has been set in TChain::SetWeight() with the option "global", then that weight will be returned.
Warning: May set the current tree!
Reimplemented from TTree.
Definition at line 1241 of file TChain.cxx.
|
overridevirtual |
Move content to a new file. (NOT IMPLEMENTED for TChain)
Reimplemented from TTree.
Definition at line 1259 of file TChain.cxx.
|
protected |
Set the TTree to be reloaded as soon as possible.
In particular this is needed when adding a Friend.
If the tree has clones, copy them into the chain clone list so we can change their branch addresses when necessary.
This is to support the syntax:
Definition at line 1278 of file TChain.cxx.
|
inlineoverridevirtual |
Dummy function.
It could be implemented and load all baskets of all trees in the chain. For the time being use TChain::Merge and TTree::LoadBasket on the resulting tree.
Reimplemented from TTree.
Definition at line 1296 of file TChain.cxx.
Find the tree which contains entry, and set it as the current tree.
Returns the entry number in that tree.
The input argument entry is the entry serial number in the whole chain.
In case of error, LoadTree returns a negative number:
Calls fNotify->Notify() (if fNotify is not null) when starting the processing of a new sub-tree. See TNotifyLink for more information on the notification mechanism.
Reimplemented from TTree.
Definition at line 1324 of file TChain.cxx.
void TChain::Lookup | ( | bool | force = false | ) |
Check / locate the files in the chain.
By default only the files not yet looked up are checked. Use force = true to check / re-check every file.
Definition at line 1760 of file TChain.cxx.
|
virtual |
Loop on nentries of this chain starting at firstentry. (NOT IMPLEMENTED)
Definition at line 1830 of file TChain.cxx.
|
overridevirtual |
Merge all the entries in the chain into a new tree in a new file.
See important note in the following function Merge().
If the chain is expecting the input tree inside a directory, this directory is NOT created by this routine.
So in a case where we have:
The resulting file will have not subdirectory. To recreate the directory structure do:
Definition at line 1907 of file TChain.cxx.
|
overridevirtual |
Merge all chains in the collection. (NOT IMPLEMENTED)
Reimplemented from TTree.
Definition at line 1916 of file TChain.cxx.
|
overridevirtual |
Merge all chains in the collection. (NOT IMPLEMENTED)
Reimplemented from TTree.
Definition at line 1925 of file TChain.cxx.
Merge all the entries in the chain into a new tree in the current file.
Note: The "file" parameter is not the file where the new tree will be inserted. The new tree is inserted into gDirectory, which is usually the most recently opened file, or the directory most recently cd()'d to.
If option = "C" is given, the compression level for all branches in the new Tree is set to the file compression level. By default, the compression level of all branches is the original compression level in the old trees.
If basketsize > 1000, the basket size for all branches of the new tree will be set to basketsize.
Example using the file generated in $ROOTSYS/test/Event merge two copies of Event.root
If the chain is expecting the input tree inside a directory, this directory is NOT created by this routine.
So if you do:
The resulting file will not have subdirectories. In order to preserve the directory structure do the following instead:
If 'option' contains the word 'fast' the merge will be done without unzipping or unstreaming the baskets (i.e., a direct copy of the raw bytes on disk).
When 'fast' is specified, 'option' can also contains a sorting order for the baskets in the output file.
There is currently 3 supported sorting order:
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.
When merging many files, it may happen that the resulting file reaches a size > TTree::fgMaxTreeSize (default = 100 GBytes). In this case the current file is automatically closed and a new file started. If the name of the merged file was "merged.root", the subsequent files will be named "merged_1.root", "merged_2.root", etc. fgMaxTreeSize may be modified via the static function TTree::SetMaxTreeSize. When in fast mode, the check and switch is only done in between each input file.
This is required because in general the automatic file overflow described above may happen during the merge. If only the current file is produced (the file passed as first argument), one can instruct Merge to not close and delete the file by specifying the option "keep".
The function returns the total number of files produced. To check that all files have been merged use something like:
Definition at line 2033 of file TChain.cxx.
|
private |
Get the tree url or filename and other information from the name.
A treename and a url's query section is split off from name. The splitting depends on whether the resulting filename is to be subsequently treated for wildcards or not, since the question mark is both the url query identifier and a wildcard. Wildcard matching is not done in this method itself.
The following way to specify the treename is still supported with the constrain that the file name contains the sub-string '.root'. This is now deprecated and will be removed in future versions.
Note that in a case like this
i.e. anchor but no options (query), the filename will be the full path, as the anchor may be the internal file name of an archive. Use '?#treename' to pass the treename if the query field is empty.
[in] | name | is the original name |
[out] | filename | the url or filename to be opened or matched |
[out] | treename | the treename, which may be found in a url fragment section as a trailing part of the name (deprecated). If not found this will be empty. Exception: a fragment containing the '=' character is not interpreted as a treename |
[out] | query | is the url query section, including the leading question mark. If not found or the query section is only followed by a fragment this will be empty. |
[out] | suffix | the portion of name which was removed to from filename. |
Definition at line 2172 of file TChain.cxx.
|
overridevirtual |
Print the header information of each tree in the chain.
See TTree::Print for a list of options.
Reimplemented from TObject.
Definition at line 2242 of file TChain.cxx.
|
overridevirtual |
Process all entries in this chain, calling functions in filename.
The return value is -1 in case of error and TSelector::GetStatus() in in case of success. See TTree::Process.
Reimplemented from TTree.
Reimplemented in TProofChain.
Definition at line 2265 of file TChain.cxx.
|
overridevirtual |
Process this chain executing the code in selector.
The return value is -1 in case of error and TSelector::GetStatus() in in case of success.
Reimplemented from TTree.
Reimplemented in TProofChain.
Definition at line 2287 of file TChain.cxx.
|
overridevirtual |
Make sure that obj (which is being deleted or will soon be) is no longer referenced by this TTree.
Reimplemented from TObject.
Definition at line 2305 of file TChain.cxx.
|
protected |
|
overridevirtual |
Remove a friend from the list of friends.
Reimplemented from TTree.
Definition at line 2324 of file TChain.cxx.
|
overridevirtual |
Resets the state of this chain.
Reimplemented from TTree.
Definition at line 2347 of file TChain.cxx.
|
overridevirtual |
Resets the state of this chain after a merge (keep the customization but forget the data).
Reimplemented from TTree.
Definition at line 2369 of file TChain.cxx.
|
overridevirtual |
Reset the addresses of the branch.
Reimplemented from TTree.
Definition at line 2492 of file TChain.cxx.
|
overridevirtual |
Reset the addresses of the branches.
Reimplemented from TTree.
Definition at line 2506 of file TChain.cxx.
|
overridevirtual |
Save TChain as a C++ statements on output stream out.
With the option "friend" save the description of all the TChain's friend trees or chains as well.
Reimplemented from TObject.
Definition at line 2386 of file TChain.cxx.
|
overridevirtual |
Loop on tree and print entries passing selection.
Reimplemented from TTree.
Definition at line 2443 of file TChain.cxx.
|
virtual |
Set the global branch kAutoDelete bit.
When LoadTree loads a new Tree, the branches for which the address is set will have the option AutoDelete set For more details on AutoDelete, see TBranch::SetAutoDelete.
Definition at line 2458 of file TChain.cxx.
|
overridevirtual |
Check if bname is already in the status list, and if not, create a TChainElement object and set its address.
See TTree::CheckBranchAddressType for the semantic of the return value.
Note: See the comments in TBranchElement::SetAddress() for a more detailed discussion of the meaning of the add parameter.
Reimplemented from TTree.
Definition at line 2609 of file TChain.cxx.
|
overridevirtual |
Set branch address.
[in] | bname | is the name of a branch. |
[in] | add | is the address of the branch. |
[in] | ptr |
Note: See the comments in TBranchElement::SetAddress() for a more detailed discussion of the meaning of the add parameter.
IMPORTANT REMARK:
In case TChain::SetBranchStatus is called, it must be called BEFORE calling this function.
See TTree::CheckBranchAddressType for the semantic of the return value.
Reimplemented from TTree.
Definition at line 2535 of file TChain.cxx.
|
overridevirtual |
Check if bname is already in the status list, and if not, create a TChainElement object and set its address.
See TTree::CheckBranchAddressType for the semantic of the return value.
Note: See the comments in TBranchElement::SetAddress() for a more detailed discussion of the meaning of the add parameter.
Reimplemented from TTree.
Definition at line 2597 of file TChain.cxx.
|
overridevirtual |
Set branch status to Process or DoNotProcess.
[in] | bname | is the name of a branch. if bname="*", apply to all branches. |
[in] | status | = 1 branch will be processed, = 0 branch will not be processed |
[out] | found |
See IMPORTANT REMARKS in TTree::SetBranchStatus and TChain::SetBranchAddress
If found is not 0, the number of branch(es) found matching the regular expression is returned in *found AND the error message 'unknown branch' is suppressed.
Reimplemented from TTree.
Definition at line 2639 of file TChain.cxx.
Set maximum size of the file cache .
The cacheSize might be clamped, see TFileCacheRead::SetBufferSize
Returns:
Reimplemented from TTree.
Definition at line 2467 of file TChain.cxx.
|
overridevirtual |
Remove reference to this chain from current directory and add reference to new directory dir.
dir can be 0 in which case the chain does not belong to any directory.
Reimplemented from TTree.
Definition at line 2666 of file TChain.cxx.
|
overridevirtual |
Set the input entry list (processing the entries of the chain will then be limited to the entries in the list).
[in] | elist | The entry list to be assigned to this chain. |
[in] | opt | An option string. Possible values are:
|
std::runtime_error | If option "sync" was chosen and either:
|
This function finds correspondence between the sub-lists of the TEntryList and the trees of the TChain.
Reimplemented from TTree.
Definition at line 2703 of file TChain.cxx.
|
virtual |
Set the input entry list (processing the entries of the chain will then be limited to the entries in the list).
This function creates a special kind of entry list (TEntryListFromFile object) that loads lists, corresponding to the chain elements, one by one, so that only one list is in memory at a time.
If there is an error opening one of the files, this file is skipped and the next file is loaded
File naming convention:
If the list name is not specified (by passing filename_elist.root/listname to the TChain::SetEntryList() function, the first object of class TEntryList in the file is taken.
It is assumed, that there are as many list files, as there are elements in the chain and they are in the same order
Definition at line 2848 of file TChain.cxx.
|
overridevirtual |
This function transfroms the given TEventList into a TEntryList.
NOTE, that this function loads all tree headers, because the entry numbers in the TEventList are global and have to be recomputed, taking into account the number of entries in each tree.
The new TEntryList is owned by the TChain and gets deleted when the chain is deleted. This TEntryList is returned by GetEntryList() function, and after GetEntryList() function is called, the TEntryList is not owned by the chain any more and will not be deleted with it.
Reimplemented from TTree.
Reimplemented in TProofChain.
Definition at line 2894 of file TChain.cxx.
|
inlineoverridevirtual |
Set all the branches in this TTree to be in decomposed object mode (also known as MakeClass mode).
For MakeClass mode 0, the TTree expects the address where the data is stored to be set by either the user or the TTree to the address of a full object through the top level branch. For MakeClass mode 1, this address is expected to point to a numerical type or C-style array (variable or not) of numerical type, representing the primitive data members. The function's primary purpose is to allow the user to access the data directly with numerical type variable rather than having to have the original set of classes (or a reproduction thereof).
Reimplemented from TTree.
|
overridevirtual |
Change the name of this TChain.
Reimplemented from TNamed.
Reimplemented in TProofChain.
Definition at line 2969 of file TChain.cxx.
|
virtual |
Set number of entries per packet for parallel root.
Definition at line 2991 of file TChain.cxx.
Enable/Disable PROOF processing on the current default Proof (gProof).
"Draw" and "Processed" commands will be handled by PROOF. The refresh and gettreeheader are meaningful only if on == true. If refresh is true the underlying fProofChain (chain proxy) is always rebuilt (even if already existing). If gettreeheader is true the header of the tree will be read from the PROOF cluster: this is only needed for browsing and should be used with care because it may take a long time to execute.
Definition at line 3012 of file TChain.cxx.
Set chain weight.
The weight is used by TTree::Draw to automatically weight each selected entry in the resulting histogram. For example the equivalent of
is
By default the weight used will be the weight of each Tree in the TChain. However, one can force the individual weights to be ignored by specifying the option "global". In this case, the TChain global weight will be used for all Trees.
Reimplemented from TTree.
Definition at line 3059 of file TChain.cxx.
|
overridevirtual |
Stream a class object.
Reimplemented from TObject.
Reimplemented in TProofChain.
Definition at line 3073 of file TChain.cxx.
|
inline |
Dummy function kept for back compatibility.
The cache is now activated automatically when processing TTrees/TChain.
Definition at line 3115 of file TChain.cxx.
|
protected |
|
protected |
|
protected |
-> List of file names containing the trees (TChainElement, owned)
|
protected |
|
protected |
|
protected |
-> List of active/inactive branches (TChainElement, owned)
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexpr |