75 fTreeOffset =
new Long64_t[fTreeOffsetLen];
77 fStatus =
new TList();
80 gROOT->GetListOfSpecials()->Add(
this);
85 ResetBit(kProofUptodate);
89 gROOT->GetListOfDataSets()->Add(
this);
92 gROOT->GetListOfCleanups()->Add(
this);
137 , fTreeOffsetLen(100)
156 gROOT->GetListOfSpecials()->Add(
this);
165 gROOT->GetListOfDataSets()->Add(
this);
168 gROOT->GetListOfCleanups()->Add(
this);
178 if (rootAlive)
gROOT->GetListOfCleanups()->Remove(
this);
201 if (rootAlive)
gROOT->GetListOfSpecials()->Remove(
this);
204 if (rootAlive)
gROOT->GetListOfDataSets()->Remove(
this);
216 if (!chain)
return 0;
331 TString basename, treename, query, suffix;
336 return AddFile(name, nentries);
345 directory = basename(0,slashpos);
346 basename.
Remove(0,slashpos+1);
360 if (!strcmp(file,
".") || !strcmp(file,
".."))
continue;
362 if ( (basename!=file) && s.
Index(re) ==
kNPOS)
continue;
439 if(name==0 || name[0]==
'\0') {
440 Error(
"AddFile",
"No file name; no files connected");
444 const char *treename =
GetName();
445 if (tname && strlen(tname) > 0) treename = tname;
447 TString basename, tn, query, suffix;
451 treename = tn.
Data();
455 char *filename =
new char[nch+1];
456 strlcpy(filename,basename.
Data(),nch+1);
457 strlcat(filename,query.
Data(),nch+1);
488 Error(
"AddFile",
"cannot find tree with name %s in file %s", treename, filename);
518 Warning(
"AddFile",
"Adding tree with no entries from file: %s", filename);
538 TIter next(filelist);
542 while ((o = next())) {
546 if (cn ==
"TFileInfo") {
550 Warning(
"AddFileInfoList",
"found TFileInfo with empty Url - ignoring");
553 }
else if (cn ==
"TUrl") {
554 url = ((
TUrl*)o)->GetUrl();
555 }
else if (cn ==
"TObjString") {
559 Warning(
"AddFileInfoList",
"object is of type %s : expecting TFileInfo, TUrl" 560 " or TObjString - ignoring", o->
ClassName());
645 Warning(
"AddFriend",
"Unknown TChain %s", chain);
672 Warning(
"AddFriend",
"Unknown TChain %s",chain);
767 return fProofChain->
Draw(varexp, selection, option, nentries, firstentry);
787 return fProofChain->
Draw(varexp, selection, option, nentries, firstentry);
790 if (
LoadTree(firstentry) < 0)
return 0;
791 return TTree::Draw(varexp,selection,option,nentries,firstentry);
884 Warning(
"GetBranchStatus",
"PROOF proxy not up-to-date:" 885 " run TChain::SetProof(kTRUE, kTRUE) first");
898 Fatal(
"GetClusterIterator",
"Not support for TChain object");
922 Warning(
"GetEntries",
"PROOF proxy not up-to-date:" 923 " run TChain::SetProof(kTRUE, kTRUE) first");
944 if (treeReadEntry < 0) {
968 if (localentry<0)
return -1;
971 for (
Int_t i=0; i<=treenum; i++){
996 if (serial < 0)
return -1;
1115 if (curmax > theMax) {
1132 if (curmin < theMin) {
1164 Warning(
"GetBranchStatus",
"PROOF proxy not up-to-date:" 1165 " run TChain::SetProof(kTRUE, kTRUE) first");
1229 Error(
"LoadBaskets",
"Function not yet implemented for TChain.");
1281 for (treenum = 0; treenum <
fNtrees; treenum++) {
1293 if (
fTree && treenum == fTreeNumber) {
1328 Int_t newNumber = ((
TChain*) at)->GetTreeNumber();
1329 if ((oldNumber != newNumber) || (old != at->
GetTree()) || (oldintree && (oldintree != at->
GetTree()))) {
1387 return treeReadEntry;
1445 if (treeReadEntry) {
1464 Int_t returnCode = 0;
1478 Error(
"LoadTree",
"Cannot find tree with name %s in file %s", element->
GetName(), element->
GetTitle());
1487 fTreeNumber = treenum;
1518 if (fTreeOffset[fTreeNumber+1] != (fTreeOffset[fTreeNumber] + nentries)) {
1523 if (entry >= fTreeOffset[fTreeNumber+1]) {
1524 if ((fTreeNumber < (
fNtrees - 1)) && (entry < fTreeOffset[fTreeNumber+2])) {
1576 if (loadResult == treeReadEntry) {
1663 return treeReadEntry;
1677 printf(
"TChain::Lookup - Looking up %d files .... \n", nelements);
1688 TString anchor = elemurl.GetAnchor();
1689 TString options = elemurl.GetOptions();
1691 elemurl.SetOptions(
"");
1692 elemurl.SetAnchor(
"");
1694 TString eurl(elemurl.GetUrl());
1695 if (!stg || !stg->
Matches(eurl)) {
1702 Error(
"Lookup",
"TFileStager instance cannot be instantiated");
1706 Int_t n1 = (nelements > 100) ? (
Int_t) nelements / 100 : 1;
1707 if (stg->
Locate(eurl.Data(), eurl) == 0) {
1708 if (nlook > 0 && !(nlook % n1)) {
1709 printf(
"Lookup | %3d %% finished\r", 100 * nlook / nelements);
1713 elemurl.SetUrl(eurl);
1715 elemurl.SetOptions(options);
1716 elemurl.SetAnchor(anchor);
1718 element->
SetTitle(elemurl.GetUrl());
1725 Error(
"Lookup",
"file %s does not exist\n", eurl.Data());
1727 Error(
"Lookup",
"file %s cannot be read\n", eurl.Data());
1731 printf(
"Lookup | %3d %% finished\n", 100 * nlook / nelements);
1743 Error(
"Loop",
"Function not yet implemented");
1745 if (option || nentries || firstentry) { }
1748 if (
LoadTree(firstentry) < 0)
return;
1750 if (firstentry < 0) firstentry = 0;
1751 Long64_t lastentry = firstentry + nentries -1;
1758 fSelector->Start(option);
1762 for (tree=0;tree<
fNtrees;tree++) {
1765 if (en > lastentry) en = lastentry;
1766 if (entry > en)
continue;
1769 fSelector->BeginFile();
1771 while (entry <= en) {
1772 fSelector->Execute(
fTree, entry - e0);
1775 fSelector->EndFile();
1778 fSelector->Finish(option);
1821 return Merge(file, 0, option);
1829 Error(
"Merge",
"not implemented");
1838 Error(
"Merge",
"not implemented");
2005 while ((branch = (
TBranch*) nextb())) {
2011 if (basketsize > 1000) {
2014 while ((branch = (
TBranch*) nextb())) {
2021 if ( newTree->
CopyEntries(
this, -1, option ) < 0 ) {
2023 Error(
"Merge",
"TTree has not been cloned\n");
2082 pIdx = filename.
Index(
"://");
2083 if (pIdx !=
kNPOS && pIdx > 0 && filename.
Index(
"/") > pIdx) {
2091 if (proto ==
"http" || proto ==
"https") {
2092 isUrlDoFull =
kTRUE;
2096 isUrlDoFull =
kTRUE;
2101 pIdx = filename.
Index(
"?");
2102 if (pIdx !=
kNPOS) {
2103 query = filename(pIdx,filename.
Length()-pIdx);
2104 suffix = filename(pIdx, filename.
Length()-pIdx);
2107 pIdx = query.
Index(
"#");
2108 if (pIdx !=
kNPOS) {
2109 treename = query(pIdx+1,query.
Length()-pIdx-1);
2111 if (query.
Length() == 1) {
2120 pIdx = filename.
Index(
".root");
2121 while(pIdx !=
kNPOS) {
2123 pIdx = filename.
Index(
".root",dotSlashPos+1);
2125 if (dotSlashPos !=
kNPOS && filename[dotSlashPos+5]!=
'/') {
2128 dotSlashPos =
kNPOS;
2130 if (dotSlashPos !=
kNPOS) {
2132 treename = filename(dotSlashPos+6,filename.
Length()-dotSlashPos-6);
2133 suffix.
Prepend(filename(dotSlashPos+5, filename.
Length()-dotSlashPos-5));
2134 filename.
Remove(dotSlashPos+5);
2136 if (isUrl && !isUrlDoFull) {
2137 pIdx = treename.
Index(
"?");
2138 if (pIdx !=
kNPOS) {
2139 query = treename(pIdx,treename.
Length()-pIdx);
2155 Printf(
"******************************************************************************");
2157 Printf(
"******************************************************************************");
2161 if (tree) tree->
Print(option);
2301 return TTree::Scan(varexp, selection, option, nentries, firstentry);
2414 if (cloneBr && (cloneBr->
GetAddress() == oldAdd)) {
2422 Error(
"SetBranchAddress",
"unknown branch -> %s", bname);
2553 if (elist->
GetN() == 0){
2570 for (
Int_t ie = 0; ie<ne; ie++){
2572 treename = chainElement->GetName();
2573 filename = chainElement->GetTitle();
2574 templist = elist->
GetEntryList(treename, filename, opt);
2581 if (listfound == 0){
2582 Error(
"SetEntryList",
"No list found for the trees in this chain");
2645 Int_t dotslashpos = basename.
Index(
".root/");
2647 if (dotslashpos>=0) {
2649 behind_dot_root = basename(dotslashpos+6,basename.
Length()-dotslashpos+6);
2651 basename.
Remove(dotslashpos+5);
2707 char enlistname[100];
2714 const char *treename;
2715 const char *filename;
2720 printf(
"loading trees\n");
2723 for (
Int_t i=0; i<nsel; i++){
2735 enlist->SetTree(treename, filename);
2736 enlist->Enter(localentry);
2784 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TChain",
"proof"))) {
2788 Error(
"SetProof",
"creation of TProofChain failed");
2832 gROOT->GetListOfCleanups()->Remove(
this);
2853 gROOT->GetListOfCleanups()->Add(
this);
virtual Int_t LoadBaskets(Long64_t maxmemory)
Dummy function.
virtual void SetBaddressIsPtr(Bool_t isptr)
virtual Bool_t GetReapplyCut() const
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the global branch kAutoDelete bit.
virtual TBranch * FindBranch(const char *name)
Return the branch that correspond to the path 'branchname', which can include the name of the tree or...
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * GetName() const
Returns name of object.
Double_t fWeight
Tree weight (see TTree::SetWeight)
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual TList * GetListOfClones()
virtual UInt_t GetBaddressType() const
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
virtual void Browse(TBrowser *)
Browse the contents of the chain.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual TObjArray * GetListOfLeaves()
Return a pointer to the list of leaves of the current tree.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual TTree * GetTree()
Return pointer to friend TTree.
virtual void SetAddress(void *add)
Set address of this branch.
virtual Long64_t GetEntryNumber(Long64_t entry) const
Return entry number corresponding to entry.
virtual Long64_t GetN() const
virtual void ls(Option_t *option="") const
List the chain.
virtual Bool_t GetBranchStatus(const char *branchname) const
See TTree::GetReadEntry().
virtual const char * WorkingDirectory()
Return working directory.
virtual TLeaf * GetLeaf(const char *branchname, const char *leafname)
Return a pointer to the leaf name in the current tree.
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
virtual void Reset(Option_t *option="")
Resets the state of this chain.
Manages entry lists from different files, when they are not loaded in memory at the same time...
Collectable string class.
Int_t fNtrees
Number of trees.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
virtual Int_t GetTreeNumber() const
virtual void Print(Option_t *option="") const
Print a summary of the tree contents.
virtual Int_t GetStatus() const
Bool_t fCanDeleteRefs
! If true, TProcessIDs are deleted when closing a file
virtual void SetCacheRead(TFileCacheRead *cache, TObject *tree=0, ECacheAction action=kDisconnect)
Set a pointer to the read cache.
virtual void * GetBaddress() const
This class represents a WWW compatible URL.
TList * fFriends
pointer to list of friend elements
TUrl * GetCurrentUrl() const
Return the current url.
Bool_t TestBit(UInt_t f) const
const char * GetProtocol() const
virtual Int_t SetCacheSize(Long64_t cacheSize=-1)
Set maximum size of the file cache .
virtual void ResetBranchAddress(TBranch *)
Reset the addresses of the branch.
virtual Int_t GetPacketSize() const
virtual TList * GetLists() const
virtual void SetWeight(Double_t w=1, Option_t *option="")
Set chain weight.
A specialized TFileCacheRead object for a TTree.
virtual TLeaf * GetLeaf(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 fri...
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual void SetDirectory(TDirectory *dir)
Remove reference to this chain from current directory and add reference to new directory dir...
virtual TList * GetListOfFriends() const
Buffer base class used for serializing objects.
void SetLoadResult(Int_t result)
Regular expression class.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
TDirectory * fDirectory
! Pointer to directory holding this tree
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
Int_t fMakeClass
! not zero when processing code generated by MakeClass
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual TObject * Remove(TObject *obj)
Remove object from array.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual void SetAutoSave(Long64_t autos=-300000000)
This function may be called at the start of a program to change the default value for fAutoSave (and ...
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Int_t LoadPlugin()
Load the plugin library for this handler.
void ToLower()
Change string to lower-case.
virtual void UpdateFormulaLeaves(const TTree *parent)=0
virtual void Browse(TBrowser *)
Browse content of the TTree.
virtual void SetShift(Bool_t shift)
virtual void SetLookedUp(Bool_t y=kTRUE)
Set/Reset the looked-up bit.
TString & Prepend(const char *cs)
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
TObject * At(Int_t idx) const
virtual Long64_t Scan(const char *varexp="", const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Loop on tree and print entries passing selection.
A TChainElement describes a component of a TChain.
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)
virtual void RecursiveRemove(TObject *obj)
Make sure that obj (which is being deleted or will soon be) is no longer referenced by this TTree...
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
virtual void SetMaxVirtualSize(Long64_t size=0)
Bool_t MaybeWildcard() const
Returns true if string contains one of the wildcard characters "[]*?".
TTree * fTree
! Pointer to current tree (Note: We do not own this tree.)
virtual void DirectoryAutoAdd(TDirectory *)
Override the TTree::DirectoryAutoAdd behavior: we never auto add.
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
virtual Int_t GetFileNumber() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
if object in a list can be deleted
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual Bool_t HasBeenLookedUp()
virtual void SetDirectory(TDirectory *dir)
Add reference to directory dir. dir can be 0.
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
virtual Double_t GetWeight() const
virtual void CanDeleteRefs(Bool_t flag=kTRUE)
When closing a file during the chain processing, the file may be closed with option "R" if flag is se...
virtual TClusterIterator GetClusterIterator(Long64_t firstentry)
Return an iterator over the cluster of baskets starting at firstentry.
virtual Int_t AddFileInfoList(TCollection *list, Long64_t nfiles=TTree::kMaxEntries)
Add all files referenced in the list to the chain.
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
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.
TObjArray * GetListOfFiles() const
virtual TObjArray * GetListOfBranches()
Helper class to iterate over cluster of baskets.
TVirtualTreePlayer * fPlayer
! Pointer to current Tree player
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Long64_t Draw(const char *varexp, const TCut &selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Draw expression varexp for selected entries.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual void SetBaddressClassName(const char *clname)
virtual Long64_t CopyEntries(TTree *tree, Long64_t nentries=-1, Option_t *option="")
Copy nentries from given tree to this tree.
virtual void SetPacketSize(Int_t size=100)
Set number of entries per packet for parallel root.
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 ...
virtual TBranch * FindBranch(const char *name)
See TTree::GetReadEntry().
The TNamed class is the base class for all named ROOT classes.
virtual Bool_t Notify()
This method must be overridden to handle object notification.
virtual Long64_t GetEntries() const
virtual Long64_t GetReadEntry() const
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
Bool_t fCacheUserSet
! true if the cache setting was explicitly given by user
virtual void SetEntryList(TEntryList *elist, Option_t *opt="")
Set the input entry list (processing the entries of the chain will then be limited to the entries in ...
virtual Long64_t GetEntry(Int_t index) const
Return value of entry at index in the list.
virtual Int_t GetNbranches()
void Clear()
Clear string without changing its capacity.
virtual TClusterIterator GetClusterIterator(Long64_t firstentry)
Return an iterator over the cluster of baskets starting at firstentry.
void InvalidateCurrentTree()
Set the TTree to be reloaded as soon as possible.
virtual Int_t GetN() const
UInt_t fFriendLockStatus
! Record which method is locking the friend recursion
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch name in the current tree.
virtual void ResetCache()
This will simply clear the cache.
virtual void SetBranchPtr(TBranch **ptr)
virtual TFriendElement * AddFriend(const char *treename, const char *filename="")
Add a TFriendElement to the list of friends.
virtual Long64_t Scan(const char *varexp="", const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Loop over tree entries and print entries passing selection.
virtual Long64_t LoadTree(Long64_t entry)
Find the tree which contains entry, and set it as the current tree.
virtual TList * GetList() const
virtual Long64_t GetEntries() const
Return the total number of entries in the chain.
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
virtual TFile * GetFile() const
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
Long64_t * fTreeOffset
[fTreeOffsetLen] Array of variables
virtual void SetStatus(Int_t status)
Int_t fTreeOffsetLen
Current size of fTreeOffset array.
virtual TTree * GetTree() const
virtual Int_t GetTreeNumber() const
A specialized string object used for TTree selections.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
Int_t fTreeNumber
! Current Tree number in fTreeOffset table
const char * GetName() const
Returns name of object.
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
Using a TBrowser one can browse all ROOT objects.
TEntryList * fEntryList
! Pointer to event selection list (if one)
virtual Long64_t GetReadEntry() const
See TTree::GetReadEntry().
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual Bool_t GetBaddressIsPtr() const
virtual void UpdateFormulaLeaves()=0
void SetCompressionSettings(Int_t settings=1)
Set compression settings.
R__EXTERN TSystem * gSystem
virtual Int_t GetNbranches()
Return the number of branches of the current tree.
if object ctor succeeded but object should not be used
virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
Long_t ExecPlugin(int nargs, const T &... params)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Long64_t fReadEntry
! Number of the entry being processed
virtual TVirtualIndex * GetTreeIndex() const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Collection abstract base class.
virtual TBranch ** GetBranchPtr() const
virtual void SetProof(Bool_t on=kTRUE, Bool_t refresh=kFALSE, Bool_t gettreeheader=kFALSE)
Enable/Disable PROOF processing on the current default Proof (gProof).
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TFile * GetCurrentFile() const
Return pointer to the current file.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
void ParseTreeFilename(const char *name, TString &filename, TString &treename, TString &query, TString &suffix, Bool_t wildcards) const
Get the tree url or filename and other information from the name.
A TEventList object is a list of selected events (entries) in a TTree.
virtual TLeaf * FindLeaf(const char *name)
Find leaf..
virtual void SetNumberEntries(Long64_t n)
The ROOT global object gROOT contains a list of all defined classes.
virtual void ResetBranchAddress(TBranch *)
Tell all of our branches to set their addresses to zero.
TEventList * fEventList
! Pointer to event selection list (if one)
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
virtual Bool_t GetBranchStatus(const char *branchname) const
Return status of branch with name branchname.
if object destructor must call RecursiveRemove()
virtual void FreeDirectory(void *dirp)
Free a directory.
void AddClone(TTree *)
Add a cloned tree to our list of trees to be notified whenever we change our branch addresses or when...
virtual TObjLink * FirstLink() const
virtual Int_t AddFile(const char *name, Long64_t nentries=TTree::kMaxEntries, const char *tname="")
Add a new file to this chain.
virtual void CreatePackets()
Initialize the packet descriptor string.
virtual void SetBasketSize(Int_t buffsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
virtual Int_t CheckBranchAddressType(TBranch *branch, TClass *ptrClass, EDataType datatype, Bool_t ptr)
Check whether or not the address described by the last 3 parameters matches the content of the branch...
virtual Int_t GetEntryWithIndex(Int_t major, Int_t minor=0)
Return entry corresponding to major and minor number.
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Process this tree executing the TSelector code in the specified filename.
TString & Remove(Ssiz_t pos)
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual void SetMakeClass(Int_t make)
Set all the branches in this TTree to be in decomposed object mode (also known as MakeClass mode)...
TFile * GetFile() const
Return a pointer to the current file.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Get entry from the file to memory.
virtual Long64_t LoadTreeFriend(Long64_t entry, TTree *T)
Load entry on behalf of our master tree, we may use an index.
TObject * UncheckedAt(Int_t i) const
Long64_t fMaxVirtualSize
Maximum total size of buffers kept in memory.
virtual TObject * Remove(TObject *)
Remove an object from the in-memory list.
virtual TFriendElement * AddFriend(const char *chainname, const char *dummy="")
Add a TFriendElement to the list of friends of this chain.
virtual Long64_t GetEntryAndTree(Int_t index, Int_t &treenum)
Return the index of "index"-th non-zero entry in the TTree or TChain and the # of the corresponding t...
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Describe directory structure in memory.
void Lookup(Bool_t force=kFALSE)
Check / locate the files in the chain.
Wrapper around a TObject so it can be stored in a TList.
virtual void ResetBranchAddresses()
Tell all of our branches to drop their current objects and allocate new ones.
static RooMathCoreReg dummy
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
virtual void UseCache(Int_t maxCacheSize=10, Int_t pageSize=0)
Dummy function kept for back compatibility.
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static TFileStager * Open(const char *stager)
Open a stager, after having loaded the relevant plug-in.
virtual Double_t GetWeight() const
Return the chain weight.
virtual void SetBaddressType(UInt_t type)
Helper class to prevent infinite recursion in the usage of TTree Friends.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual Int_t SetCacheSize(Long64_t cachesize=-1)
Set maximum size of the file cache .
virtual void Print(Option_t *option="") const
Print the header information of each tree in the chain.
virtual void ResetBranchAddresses()
Reset the addresses of the branches.
virtual Long64_t GetEntries() const
virtual void SetBaddress(void *add)
virtual Int_t GetPacketSize() const
virtual void ResetAfterMerge(TFileMergeInfo *)
Resets the state of this TTree after a merge (keep the customization but forget the data)...
Mother of all ROOT objects.
TObject * GetObject() const
virtual TTree * GetTree() const
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
Long64_t fEntries
Number of entries.
virtual const char * GetBaddressClassName() const
TList * fClones
! List of cloned trees which share our addresses
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Process all entries in this chain, calling functions in filename.
virtual void Add(TObject *obj)
TChain()
Default constructor.
A TFriendElement TF describes a TTree object TF in a file.
A chain is a collection of files containg TTree objects.
virtual void ResetAfterMerge(TFileMergeInfo *)
Resets the state of this chain after a merge (keep the customization but forget the data)...
virtual void SetPacketSize(Int_t size=100)
Set number of entries per packet for parallel root.
virtual TEntryList * GetEntryList(const char *treename, const char *filename, Option_t *opt="")
Return the entry list, correspoding to treename and filename By default, the filename is first tried ...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual void SetTreeNumber(Int_t index)
TObjArray * fFiles
-> List of file names containing the trees (TChainElement, owned)
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Set branch address.
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
virtual void SetCircular(Long64_t maxEntries)
Enable/Disable circularity for this tree.
virtual void CreatePackets()
Initialize the packet descriptor string.
virtual void Reset(Option_t *option="")
Reset baskets, buffers and entries count in all branches and leaves.
virtual Bool_t Matches(const char *s)
TFileCacheRead * GetCacheRead(TObject *tree=0) const
Return a pointer to the current read cache.
virtual char * GetAddress() const
TObject * fNotify
! Object to be notified when loading a Tree
A TTree object has a header with a name and a title.
TFile * fFile
! Pointer to current file (We own the file).
TChain * fProofChain
! chain proxy when going to be processed by PROOF
Class describing a generic file including meta information.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual Int_t Locate(const char *u, TString &f)
Just check if the file exists locally.
virtual const char * GetName() const
Returns name of object.
A TTree is a list of TBranches.
virtual TLeaf * FindLeaf(const char *name)
See TTree::GetReadEntry().
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
A List of entry numbers in a TTree or TChain.
virtual void UpdateBranches(TTree *tree)
Update pointer to current Tree and recompute pointers to the branches in the cache.
Int_t fPacketSize
! Number of entries in one packet for parallel root
virtual ~TChain()
Destructor.
virtual TObjArray * GetListOfBranches()
Return a pointer to the list of branches of the current tree.
static constexpr Long64_t kMaxEntries
virtual Long64_t GetChainEntryNumber(Long64_t entry) const
Return absolute entry number in the chain.
virtual void SetEventList(TEventList *evlist)
This function transfroms the given TEventList into a TEntryList.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
TList * fStatus
-> List of active/inactive branches (TChainElement, owned)
virtual void SetName(const char *name)
Change the name of this tree.
virtual Int_t Add(TChain *chain)
Add all files referenced by the passed chain to this chain.
Int_t GetCompressionSettings() const
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual const char * GetTitle() const
Returns title of object.
virtual void CopyAddresses(TTree *, Bool_t undo=kFALSE)
Set branch addresses of passed tree equal to ours.
virtual TObjArray * GetListOfLeaves()
virtual void Close(Option_t *option="")
Close a file.
virtual void ls(Option_t *option="") const
List files in the chain.
Long64_t fCacheSize
! Maximum size of file buffers
virtual void SetChainOffset(Long64_t offset=0)
const char * Data() const
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the automatic delete bit.