73 fTreeOffset =
new Long64_t[fTreeOffsetLen];
75 fStatus =
new TList();
78 gROOT->GetListOfSpecials()->Add(
this);
83 ResetBit(kProofUptodate);
87 gROOT->GetListOfDataSets()->Add(
this);
90 gROOT->GetListOfCleanups()->Add(
this);
135 , fTreeOffsetLen(100)
154 gROOT->GetListOfSpecials()->Add(
this);
163 gROOT->GetListOfDataSets()->Add(
this);
166 gROOT->GetListOfCleanups()->Add(
this);
174 gROOT->GetListOfCleanups()->Remove(
this);
197 gROOT->GetListOfSpecials()->Remove(
this);
200 gROOT->GetListOfDataSets()->Remove(
this);
212 if (!chain)
return 0;
215 if ((fNtrees + chain->
GetNtrees()) >= fTreeOffsetLen) {
216 fTreeOffsetLen += 2 * chain->
GetNtrees();
327 TString basename, treename, query, suffix;
332 return AddFile(name, nentries);
341 directory = basename(0,slashpos);
342 basename.
Remove(0,slashpos+1);
356 if (!strcmp(file,
".") || !strcmp(file,
".."))
continue;
358 if ( (basename!=file) && s.
Index(re) ==
kNPOS)
continue;
435 if(name==0 || name[0]==
'\0') {
436 Error(
"AddFile",
"No file name; no files connected");
440 const char *treename =
GetName();
441 if (tname && strlen(tname) > 0) treename = tname;
443 TString basename, tn, query, suffix;
447 treename = tn.
Data();
452 strlcpy(filename,basename.
Data(),nch+1);
453 strlcat(filename,query.
Data(),nch+1);
456 if (fNtrees+1 >= fTreeOffsetLen) {
484 Error(
"AddFile",
"cannot find tree with name %s in file %s", treename, filename);
514 Warning(
"AddFile",
"Adding tree with no entries from file: %s", filename);
538 while ((o =
next())) {
542 if (cn ==
"TFileInfo") {
546 Warning(
"AddFileInfoList",
"found TFileInfo with empty Url - ignoring");
549 }
else if (cn ==
"TUrl") {
550 url = ((
TUrl*)o)->GetUrl();
551 }
else if (cn ==
"TObjString") {
555 Warning(
"AddFileInfoList",
"object is of type %s : expecting TFileInfo, TUrl"
556 " or TObjString - ignoring", o->
ClassName());
641 Warning(
"AddFriend",
"Unknown TChain %s", chain);
668 Warning(
"AddFriend",
"Unknown TChain %s",chain);
763 return fProofChain->
Draw(varexp, selection, option, nentries, firstentry);
783 return fProofChain->
Draw(varexp, selection, option, nentries, firstentry);
786 if (
LoadTree(firstentry) < 0)
return 0;
787 return TTree::Draw(varexp,selection,option,nentries,firstentry);
880 Warning(
"GetBranchStatus",
"PROOF proxy not up-to-date:"
881 " run TChain::SetProof(kTRUE, kTRUE) first");
894 Fatal(
"GetClusterIterator",
"Not support for TChain object");
918 Warning(
"GetEntries",
"PROOF proxy not up-to-date:"
919 " run TChain::SetProof(kTRUE, kTRUE) first");
940 if (treeReadEntry < 0) {
964 if (localentry<0)
return -1;
967 for (
Int_t i=0; i<=treenum; i++){
992 if (serial < 0)
return -1;
1111 if (curmax > theMax) {
1128 if (curmin < theMin) {
1160 Warning(
"GetBranchStatus",
"PROOF proxy not up-to-date:"
1161 " run TChain::SetProof(kTRUE, kTRUE) first");
1225 Error(
"LoadBaskets",
"Function not yet implemented for TChain.");
1275 for (treenum = 0; treenum <
fNtrees; treenum++) {
1287 if (
fTree && treenum == fTreeNumber) {
1322 Int_t newNumber = ((
TChain*) at)->GetTreeNumber();
1323 if ((oldNumber != newNumber) || (old != at->
GetTree()) || (oldintree && (oldintree != at->
GetTree()))) {
1381 return treeReadEntry;
1439 if (treeReadEntry) {
1458 Int_t returnCode = 0;
1472 Error(
"LoadTree",
"Cannot find tree with name %s in file %s", element->
GetName(), element->
GetTitle());
1481 fTreeNumber = treenum;
1512 if (fTreeOffset[fTreeNumber+1] != (fTreeOffset[fTreeNumber] + nentries)) {
1517 if (entry >= fTreeOffset[fTreeNumber+1]) {
1518 if ((fTreeNumber < (fNtrees - 1)) && (entry < fTreeOffset[fTreeNumber+2])) {
1630 return treeReadEntry;
1644 printf(
"TChain::Lookup - Looking up %d files .... \n", nelements);
1655 TString anchor = elemurl.GetAnchor();
1656 TString options = elemurl.GetOptions();
1658 elemurl.SetOptions(
"");
1659 elemurl.SetAnchor(
"");
1661 TString eurl(elemurl.GetUrl());
1662 if (!stg || !stg->
Matches(eurl)) {
1669 Error(
"Lookup",
"TFileStager instance cannot be instantiated");
1673 Int_t n1 = (nelements > 100) ? (
Int_t) nelements / 100 : 1;
1674 if (stg->
Locate(eurl.Data(), eurl) == 0) {
1675 if (nlook > 0 && !(nlook % n1)) {
1676 printf(
"Lookup | %3d %% finished\r", 100 * nlook / nelements);
1680 elemurl.SetUrl(eurl);
1682 elemurl.SetOptions(options);
1683 elemurl.SetAnchor(anchor);
1685 element->
SetTitle(elemurl.GetUrl());
1692 Error(
"Lookup",
"file %s does not exist\n", eurl.Data());
1694 Error(
"Lookup",
"file %s cannot be read\n", eurl.Data());
1698 printf(
"Lookup | %3d %% finished\n", 100 * nlook / nelements);
1710 Error(
"Loop",
"Function not yet implemented");
1712 if (option || nentries || firstentry) { }
1715 if (
LoadTree(firstentry) < 0)
return;
1717 if (firstentry < 0) firstentry = 0;
1718 Long64_t lastentry = firstentry + nentries -1;
1725 fSelector->Start(option);
1729 for (tree=0;tree<
fNtrees;tree++) {
1732 if (en > lastentry) en = lastentry;
1733 if (entry > en)
continue;
1736 fSelector->BeginFile();
1738 while (entry <= en) {
1739 fSelector->Execute(
fTree, entry - e0);
1742 fSelector->EndFile();
1745 fSelector->Finish(option);
1788 return Merge(file, 0, option);
1796 Error(
"Merge",
"not implemented");
1805 Error(
"Merge",
"not implemented");
1972 while ((branch = (
TBranch*) nextb())) {
1978 if (basketsize > 1000) {
1981 while ((branch = (
TBranch*) nextb())) {
1988 if ( newTree->
CopyEntries(
this, -1, option ) < 0 ) {
1990 Error(
"Merge",
"TTree has not been cloned\n");
2049 pIdx = filename.
Index(
"://");
2050 if (pIdx !=
kNPOS && pIdx > 0 && filename.
Index(
"/") > pIdx) {
2058 if (proto ==
"http" || proto ==
"https") {
2059 isUrlDoFull =
kTRUE;
2063 isUrlDoFull =
kTRUE;
2068 pIdx = filename.
Index(
"?");
2069 if (pIdx !=
kNPOS) {
2074 pIdx = query.
Index(
"#");
2075 if (pIdx !=
kNPOS) {
2076 treename = query(pIdx+1,query.
Length()-pIdx-1);
2078 if (query.
Length() == 1) {
2087 pIdx = filename.
Index(
".root");
2088 while(pIdx !=
kNPOS) {
2090 pIdx = filename.
Index(
".root",dotSlashPos+1);
2092 if (dotSlashPos !=
kNPOS && filename[dotSlashPos+5]!=
'/') {
2095 dotSlashPos =
kNPOS;
2097 if (dotSlashPos !=
kNPOS) {
2099 treename =
filename(dotSlashPos+6,filename.
Length()-dotSlashPos-6);
2101 filename.
Remove(dotSlashPos+5);
2103 if (isUrl && !isUrlDoFull) {
2104 pIdx = treename.
Index(
"?");
2105 if (pIdx !=
kNPOS) {
2106 query = treename(pIdx,treename.
Length()-pIdx);
2122 Printf(
"******************************************************************************");
2124 Printf(
"******************************************************************************");
2128 if (tree) tree->
Print(option);
2268 return TTree::Scan(varexp, selection, option, nentries, firstentry);
2381 if (cloneBr && (cloneBr->
GetAddress() == oldAdd)) {
2389 Error(
"SetBranchAddress",
"unknown branch -> %s", bname);
2520 if (elist->
GetN() == 0){
2537 for (
Int_t ie = 0; ie<ne; ie++){
2539 treename = chainElement->GetName();
2540 filename = chainElement->GetTitle();
2541 templist = elist->
GetEntryList(treename, filename, opt);
2548 if (listfound == 0){
2549 Error(
"SetEntryList",
"No list found for the trees in this chain");
2612 Int_t dotslashpos = basename.
Index(
".root/");
2614 if (dotslashpos>=0) {
2616 behind_dot_root = basename(dotslashpos+6,basename.
Length()-dotslashpos+6);
2618 basename.
Remove(dotslashpos+5);
2674 char enlistname[100];
2675 snprintf(enlistname,100,
"%s_%s", evlist->
GetName(),
"entrylist");
2681 const char *treename;
2687 printf(
"loading trees\n");
2690 for (
Int_t i=0; i<nsel; i++){
2702 enlist->SetTree(treename, filename);
2703 enlist->Enter(localentry);
2751 if ((h =
gROOT->GetPluginManager()->FindHandler(
"TChain",
"proof"))) {
2755 Error(
"SetProof",
"creation of TProofChain failed");
2795 void TChain::Streamer(
TBuffer& b)
2799 gROOT->GetListOfCleanups()->Remove(
this);
2820 gROOT->GetListOfCleanups()->Add(
this);
const char * GetName() const
Returns name of object.
virtual Int_t LoadBaskets(Long64_t maxmemory)
Dummy function.
virtual void SetBaddressIsPtr(Bool_t isptr)
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 Bool_t GetReapplyCut() const
virtual const char * GetTitle() const
Returns title of object.
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.
Ssiz_t Last(char c) const
Find last occurrence of a character c.
virtual TList * GetListOfClones()
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 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.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
Manages entry lists from different files, when they are not loaded in memory at the same time...
Collectable string class.
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
virtual Long64_t GetReadEntry() const
virtual Double_t GetWeight() const
Return the chain weight.
TFile * GetFile() const
Return a pointer to the current file.
virtual void SetCacheRead(TFileCacheRead *cache, TObject *tree=0, ECacheAction action=kDisconnect)
Set a pointer to the read cache.
This class represents a WWW compatible URL.
virtual UInt_t GetBaddressType() 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 TList * GetList() const
const char * GetProtocol() 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...
virtual Long64_t GetEntries() const
Return the total number of entries in the chain.
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...
Buffer base class used for serializing objects.
Regular expression class.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
TDirectory * fDirectory
Object to be notified when loading a Tree.
static const char * filename()
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
Int_t fMakeClass
Last entry number to debug.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual TObject * Remove(TObject *obj)
Remove object from array.
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 Long64_t GetChainEntryNumber(Long64_t entry) const
Return absolute entry number in the chain.
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.
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
virtual TTree * GetTree() const
void ToLower()
Change string to lower-case.
virtual void UpdateFormulaLeaves(const TTree *parent)=0
virtual void Browse(TBrowser *)
Browse content of the TTree.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
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.
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.
virtual TVirtualIndex * GetTreeIndex() const
A TChainElement describes a component of a TChain.
TFile * GetCurrentFile() const
Return pointer to the current file.
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)
Long_t ExecPlugin(int nargs, const T &...params)
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)
virtual void Print(Option_t *option="") const
Print the header information of each tree in the chain.
TTree * fTree
If true, TProcessIDs are deleted when closing a file.
virtual void DirectoryAutoAdd(TDirectory *)
Override the TTree::DirectoryAutoAdd behavior: we never auto add.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Long64_t GetReadEntry() const
See TTree::GetReadEntry().
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
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 Int_t GetN() 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 TList * GetListOfFriends() const
const char * Data() const
virtual void Print(Option_t *option="") const
Print a summary of the tree contents.
TFileCacheRead * GetCacheRead(TObject *tree=0) const
Return a pointer to the current read cache.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
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.
virtual TObjArray * GetListOfBranches()
Helper class to iterate over cluster of baskets.
TVirtualTreePlayer * fPlayer
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 void ls(Option_t *option="") const
List the chain.
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 LoadTree(Long64_t entry)
Set current entry.
Bool_t fCacheUserSet
true if cache auto creation or resize check is needed
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 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 Long64_t GetEntries() const
virtual const char * GetBaddressClassName() const
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 void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
Long64_t * fTreeOffset
Current Tree number in fTreeOffset table.
virtual void SetStatus(Int_t status)
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.
virtual TFile * GetFile() const
virtual Int_t GetPacketSize() const
TObject * UncheckedAt(Int_t i) const
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
Using a TBrowser one can browse all ROOT objects.
virtual Long64_t GetEntry(Int_t index) const
Return value of entry at index in the list.
virtual char * GetAddress() const
TEntryList * fEntryList
Pointer to event selection list (if one)
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
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.
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
virtual Int_t GetTreeNumber() const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Long64_t fReadEntry
Offset of 1st entry of this Tree in a TChain.
Collection abstract base class.
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
TObject * GetObject() 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).
Bool_t TestBit(UInt_t f) const
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
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)
virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
virtual const char * GetName() const
Returns name of object.
The ROOT global object gROOT contains a list of all defined classes.
virtual TObjLink * FirstLink() const
TObjArray * GetListOfFiles() const
virtual void ResetBranchAddress(TBranch *)
Tell all of our branches to set their addresses to zero.
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
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...
Int_t GetCompressionSettings() const
virtual Int_t AddFile(const char *name, Long64_t nentries=TTree::kMaxEntries, const char *tname="")
Add a new file to this chain.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
virtual Int_t GetStatus() const
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 Int_t GetTreeNumber() const
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)...
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.
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...
virtual const char * GetName() const
Returns name of object.
Describe directory structure in memory.
virtual Bool_t GetBranchStatus(const char *branchname) const
See TTree::GetReadEntry().
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.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
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 MaybeWildcard() const
Returns true if string contains one of the wildcard characters "[]*?".
static TFileStager * Open(const char *stager)
Open a stager, after having loaded the relevant plug-in.
virtual TTree * GetTree() const
Int_t GetEntries() const
Return the number of objects in array (i.e.
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 ResetBranchAddresses()
Reset the addresses of the branches.
virtual Long64_t GetN() const
virtual void SetBaddress(void *add)
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.
virtual Int_t GetFileNumber() const
virtual void ls(Option_t *option="") const
List files in the chain.
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
TList * fClones
Pointer to current Tree player.
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.
TUrl * GetCurrentUrl() const
Return the current url.
virtual void Add(TObject *obj)
A TFriendElement TF describes a TTree object TF in a file.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
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 Bool_t GetBaddressIsPtr() const
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 ...
virtual void SetTreeNumber(Int_t index)
TObjArray * fFiles
Pointer to current file (We own the file).
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Set branch address.
virtual void * GetBaddress() const
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)
ClassImp(TChain) TChain
Default constructor.
TObject * fNotify
current file number (if file extensions)
virtual Long64_t GetEntries() const
A TTree object has a header with a name and a title.
TFile * fFile
Pointer to current tree (Note: We do not own this tree.)
Class describing a generic file including meta information.
virtual Double_t GetWeight() const
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
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.
TObject * At(Int_t idx) const
virtual Int_t Locate(const char *u, TString &f)
Just check if the file exists locally.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
A TTree is a list of TBranches.
virtual Bool_t GetBranchStatus(const char *branchname) const
Return status of branch with name branchname.
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 TBranch ** GetBranchPtr() const
virtual void SetTitle(const char *title="")
Change (i.e. 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
Total number of bytes in branch buffers.
virtual ~TChain()
Destructor.
virtual Int_t GetPacketSize() const
virtual TObjArray * GetListOfBranches()
Return a pointer to the list of branches of the current tree.
static constexpr Long64_t kMaxEntries
virtual void SetEventList(TEventList *evlist)
This function transfroms the given TEventList into a TEntryList.
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.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
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 TList * GetLists() const
virtual void SetChainOffset(Long64_t offset=0)
virtual Long64_t GetEntryNumber(Long64_t entry) const
Return entry number corresponding to entry.
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the automatic delete bit.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.