76 fTreeOffset =
new Long64_t[fTreeOffsetLen];
78 fStatus =
new TList();
81 gROOT->GetListOfSpecials()->Add(
this);
86 ResetBit(kProofUptodate);
90 gROOT->GetListOfDataSets()->Add(
this);
94 gROOT->GetListOfCleanups()->Add(
this);
139 , fTreeOffsetLen(100)
158 gROOT->GetListOfSpecials()->Add(
this);
167 gROOT->GetListOfDataSets()->Add(
this);
171 gROOT->GetListOfCleanups()->Add(
this);
183 gROOT->GetListOfCleanups()->Remove(
this);
207 if (rootAlive)
gROOT->GetListOfSpecials()->Remove(
this);
210 if (rootAlive)
gROOT->GetListOfDataSets()->Remove(
this);
222 if (!chain)
return 0;
337 TString basename, treename, query, suffix;
342 return AddFile(name, nentries);
351 directory = basename(0,slashpos);
352 basename.
Remove(0,slashpos+1);
366 if (!strcmp(file,
".") || !strcmp(file,
".."))
continue;
368 if ( (basename!=file) && s.
Index(re) ==
kNPOS)
continue;
445 if(name==0 || name[0]==
'\0') {
446 Error(
"AddFile",
"No file name; no files connected");
450 const char *treename =
GetName();
451 if (tname && strlen(tname) > 0) treename = tname;
453 TString basename, tn, query, suffix;
457 treename = tn.
Data();
461 char *filename =
new char[nch+1];
462 strlcpy(filename,basename.
Data(),nch+1);
463 strlcat(filename,query.
Data(),nch+1);
494 Error(
"AddFile",
"cannot find tree with name %s in file %s", treename, filename);
524 Warning(
"AddFile",
"Adding tree with no entries from file: %s", filename);
544 TIter next(filelist);
548 while ((o = next())) {
552 if (cn ==
"TFileInfo") {
556 Warning(
"AddFileInfoList",
"found TFileInfo with empty Url - ignoring");
559 }
else if (cn ==
"TUrl") {
560 url = ((
TUrl*)o)->GetUrl();
561 }
else if (cn ==
"TObjString") {
565 Warning(
"AddFileInfoList",
"object is of type %s : expecting TFileInfo, TUrl" 566 " or TObjString - ignoring", o->
ClassName());
651 Warning(
"AddFriend",
"Unknown TChain %s", chain);
678 Warning(
"AddFriend",
"Unknown TChain %s",chain);
773 return fProofChain->
Draw(varexp, selection, option, nentries, firstentry);
793 return fProofChain->
Draw(varexp, selection, option, nentries, firstentry);
796 if (
LoadTree(firstentry) < 0)
return 0;
797 return TTree::Draw(varexp,selection,option,nentries,firstentry);
890 Warning(
"GetBranchStatus",
"PROOF proxy not up-to-date:" 891 " run TChain::SetProof(kTRUE, kTRUE) first");
904 Fatal(
"GetClusterIterator",
"Not support for TChain object");
928 Warning(
"GetEntries",
"PROOF proxy not up-to-date:" 929 " run TChain::SetProof(kTRUE, kTRUE) first");
950 if (treeReadEntry < 0) {
974 if (localentry<0)
return -1;
977 for (
Int_t i=0; i<=treenum; i++){
1002 if (serial < 0)
return -1;
1121 if (curmax > theMax) {
1138 if (curmin < theMin) {
1170 Warning(
"GetBranchStatus",
"PROOF proxy not up-to-date:" 1171 " run TChain::SetProof(kTRUE, kTRUE) first");
1235 Error(
"LoadBaskets",
"Function not yet implemented for TChain.");
1287 for (treenum = 0; treenum <
fNtrees; treenum++) {
1299 if (
fTree && treenum == fTreeNumber) {
1334 Int_t newNumber = ((
TChain*) at)->GetTreeNumber();
1335 if ((oldNumber != newNumber) || (old != at->
GetTree()) || (oldintree && (oldintree != at->
GetTree()))) {
1393 return treeReadEntry;
1451 if (treeReadEntry) {
1470 Int_t returnCode = 0;
1484 Error(
"LoadTree",
"Cannot find tree with name %s in file %s", element->
GetName(), element->
GetTitle());
1493 fTreeNumber = treenum;
1524 if (fTreeOffset[fTreeNumber+1] != (fTreeOffset[fTreeNumber] + nentries)) {
1529 if (entry >= fTreeOffset[fTreeNumber+1]) {
1530 if ((fTreeNumber < (
fNtrees - 1)) && (entry < fTreeOffset[fTreeNumber+2])) {
1582 if (loadResult == treeReadEntry) {
1669 return treeReadEntry;
1683 printf(
"TChain::Lookup - Looking up %d files .... \n", nelements);
1694 TString anchor = elemurl.GetAnchor();
1695 TString options = elemurl.GetOptions();
1697 elemurl.SetOptions(
"");
1698 elemurl.SetAnchor(
"");
1700 TString eurl(elemurl.GetUrl());
1701 if (!stg || !stg->
Matches(eurl)) {
1708 Error(
"Lookup",
"TFileStager instance cannot be instantiated");
1712 Int_t n1 = (nelements > 100) ? (
Int_t) nelements / 100 : 1;
1713 if (stg->
Locate(eurl.Data(), eurl) == 0) {
1714 if (nlook > 0 && !(nlook % n1)) {
1715 printf(
"Lookup | %3d %% finished\r", 100 * nlook / nelements);
1719 elemurl.SetUrl(eurl);
1721 elemurl.SetOptions(options);
1722 elemurl.SetAnchor(anchor);
1724 element->
SetTitle(elemurl.GetUrl());
1731 Error(
"Lookup",
"file %s does not exist\n", eurl.Data());
1733 Error(
"Lookup",
"file %s cannot be read\n", eurl.Data());
1737 printf(
"Lookup | %3d %% finished\n", 100 * nlook / nelements);
1749 Error(
"Loop",
"Function not yet implemented");
1751 if (option || nentries || firstentry) { }
1754 if (
LoadTree(firstentry) < 0)
return;
1756 if (firstentry < 0) firstentry = 0;
1757 Long64_t lastentry = firstentry + nentries -1;
1764 fSelector->Start(option);
1768 for (tree=0;tree<
fNtrees;tree++) {
1771 if (en > lastentry) en = lastentry;
1772 if (entry > en)
continue;
1775 fSelector->BeginFile();
1777 while (entry <= en) {
1778 fSelector->Execute(
fTree, entry - e0);
1781 fSelector->EndFile();
1784 fSelector->Finish(option);
1827 return Merge(file, 0, option);
1835 Error(
"Merge",
"not implemented");
1844 Error(
"Merge",
"not implemented");
2011 while ((branch = (
TBranch*) nextb())) {
2017 if (basketsize > 1000) {
2020 while ((branch = (
TBranch*) nextb())) {
2027 if ( newTree->
CopyEntries(
this, -1, option ) < 0 ) {
2029 Error(
"Merge",
"TTree has not been cloned\n");
2112 static const char *dotr =
".root/";
2113 static Ssiz_t dotrl = strlen(dotr);
2116 while (js !=
kNPOS) {
2118 js = filename.
Index(dotr, js + 1);
2120 if (pIdx !=
kNPOS) {
2125 filename.
Remove(pIdx + dotrl - 1);
2140 Printf(
"******************************************************************************");
2142 Printf(
"******************************************************************************");
2146 if (tree) tree->
Print(option);
2286 return TTree::Scan(varexp, selection, option, nentries, firstentry);
2400 if (cloneBr && (cloneBr->
GetAddress() == oldAdd)) {
2408 Error(
"SetBranchAddress",
"unknown branch -> %s", bname);
2540 if (elist->
GetN() == 0){
2557 for (
Int_t ie = 0; ie<ne; ie++){
2559 treename = chainElement->GetName();
2560 filename = chainElement->GetTitle();
2561 templist = elist->
GetEntryList(treename, filename, opt);
2568 if (listfound == 0){
2569 Error(
"SetEntryList",
"No list found for the trees in this chain");
2632 Int_t dotslashpos = basename.
Index(
".root/");
2634 if (dotslashpos>=0) {
2636 behind_dot_root = basename(dotslashpos+6,basename.
Length()-dotslashpos+6);
2638 basename.
Remove(dotslashpos+5);
2694 char enlistname[100];
2701 const char *treename;
2702 const char *filename;
2707 printf(
"loading trees\n");
2710 for (
Int_t i=0; i<nsel; i++){
2722 enlist->SetTree(treename, filename);
2723 enlist->Enter(localentry);
2771 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TChain",
"proof"))) {
2775 Error(
"SetProof",
"creation of TProofChain failed");
2821 gROOT->GetListOfCleanups()->Remove(
this);
2845 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
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
const char * GetFileAndOptions() const
Return the file and its options (the string specified behind the ?).
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
R__EXTERN TVirtualMutex * gROOTMutex
virtual void Browse(TBrowser *)
Browse content of the TTree.
virtual void SetShift(Bool_t shift)
const char * GetOptions() const
virtual void SetLookedUp(Bool_t y=kTRUE)
Set/Reset the looked-up bit.
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.)
TString & Insert(Ssiz_t pos, const char *s)
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.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
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.
const char * GetFile() const
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
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
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.
const char * GetAnchor() const
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
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
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.
#define R__LOCKGUARD2(mutex)
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 containing 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, corresponding 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.