|
ROOT
Reference Guide |
|
Go to the documentation of this file.
87 gROOT->GetListOfSpecials()->Add(
this);
96 gROOT->GetListOfDataSets()->Add(
this);
100 gROOT->GetListOfCleanups()->Add(
this);
145 , fTreeOffsetLen(100)
172 gROOT->GetListOfSpecials()->Add(
this);
173 gROOT->GetListOfDataSets()->Add(
this);
176 gROOT->GetListOfCleanups()->Add(
this);
188 gROOT->GetListOfCleanups()->Remove(
this);
216 gROOT->GetListOfSpecials()->Remove(
this);
217 gROOT->GetListOfDataSets()->Remove(
this);
230 if (!chain)
return 0;
353 TString basename, treename, query, suffix;
367 directory = basename(0,slashpos);
368 basename.
Remove(0,slashpos+1);
382 if (!strcmp(
file,
".") || !strcmp(
file,
".."))
continue;
384 if ( (basename!=
file) &&
s.Index(re) ==
kNPOS)
continue;
466 Error(
"AddFile",
"No file name; no files connected");
470 const char *treename =
GetName();
471 if (tname && strlen(tname) > 0) treename = tname;
473 TString basename, tn, query, suffix;
477 treename = tn.
Data();
481 char *filename =
new char[nch+1];
482 strlcpy(filename,basename.
Data(),nch+1);
483 strlcat(filename,query.
Data(),nch+1);
514 Error(
"AddFile",
"cannot find tree with name %s in file %s", treename, filename);
523 pksize =
tree->GetPacketSize();
544 Warning(
"AddFile",
"Adding tree with no entries from file: %s", filename);
564 TIter next(filelist);
568 while ((o = next())) {
572 if (cn ==
"TFileInfo") {
576 Warning(
"AddFileInfoList",
"found TFileInfo with empty Url - ignoring");
579 }
else if (cn ==
"TUrl") {
580 url = ((
TUrl*)o)->GetUrl();
581 }
else if (cn ==
"TObjString") {
585 Warning(
"AddFileInfoList",
"object is of type %s : expecting TFileInfo, TUrl"
586 " or TObjString - ignoring", o->
ClassName());
671 Warning(
"AddFriend",
"Unknown TChain %s", chain);
698 Warning(
"AddFriend",
"Unknown TChain %s",chain);
708 if (!chain)
return nullptr;
820 if (
LoadTree(firstentry) < 0)
return 0;
914 Warning(
"GetBranchStatus",
"PROOF proxy not up-to-date:"
915 " run TChain::SetProof(kTRUE, kTRUE) first");
928 Fatal(
"GetClusterIterator",
"Not support for TChain object");
952 Warning(
"GetEntries",
"PROOF proxy not up-to-date:"
953 " run TChain::SetProof(kTRUE, kTRUE) first");
974 if (treeReadEntry < 0) {
998 if (localentry<0)
return -1;
1001 for (
Int_t i=0; i<=treenum; i++){
1026 if (serial < 0)
return -1;
1145 if (curmax > theMax) {
1162 if (curmin < theMin) {
1194 Warning(
"GetBranchStatus",
"PROOF proxy not up-to-date:"
1195 " run TChain::SetProof(kTRUE, kTRUE) first");
1259 Error(
"LoadBaskets",
"Function not yet implemented for TChain.");
1312 for (treenum = 0; treenum <
fNtrees; treenum++) {
1346 if (fetree->IsUpdated()) {
1348 fetree->ResetUpdated();
1403 return treeReadEntry;
1408 external_fe->MarkUpdated();
1466 if (treeReadEntry) {
1485 Int_t returnCode = 0;
1499 Error(
"LoadTree",
"Cannot find tree with name %s in file %s", element->
GetName(), element->
GetTitle());
1597 if (loadResult == treeReadEntry) {
1694 return treeReadEntry;
1708 printf(
"TChain::Lookup - Looking up %d files .... \n", nelements);
1726 if (!stg || !stg->
Matches(eurl)) {
1733 Error(
"Lookup",
"TFileStager instance cannot be instantiated");
1737 Int_t n1 = (nelements > 100) ? (
Int_t) nelements / 100 : 1;
1739 if (nlook > 0 && !(nlook % n1)) {
1740 printf(
"Lookup | %3d %% finished\r", 100 * nlook / nelements);
1756 Error(
"Lookup",
"file %s does not exist\n", eurl.
Data());
1758 Error(
"Lookup",
"file %s cannot be read\n", eurl.
Data());
1762 printf(
"Lookup | %3d %% finished\n", 100 * nlook / nelements);
1774 Error(
"Loop",
"Function not yet implemented");
1776 if (option ||
nentries || firstentry) { }
1779 if (
LoadTree(firstentry) < 0)
return;
1781 if (firstentry < 0) firstentry = 0;
1789 fSelector->Start(option);
1796 if (en > lastentry) en = lastentry;
1797 if (entry > en)
continue;
1800 fSelector->BeginFile();
1802 while (entry <= en) {
1803 fSelector->Execute(
fTree, entry - e0);
1806 fSelector->EndFile();
1809 fSelector->Finish(option);
1860 Error(
"Merge",
"not implemented");
1869 Error(
"Merge",
"not implemented");
2036 while ((branch = (
TBranch*) nextb())) {
2042 if (basketsize > 1000) {
2045 while ((branch = (
TBranch*) nextb())) {
2052 if ( newTree->
CopyEntries(
this, -1, option ) < 0 ) {
2054 Error(
"Merge",
"TTree has not been cloned\n");
2154 static const char *dotr =
".root";
2155 static Ssiz_t dotrl = strlen(dotr);
2158 while (js !=
kNPOS) {
2160 js = filename.
Index(dotr, js + 1);
2162 if (pIdx !=
kNPOS) {
2163 static const char *
slash =
"/";
2167 if (ppIdx !=
kNPOS) {
2169 treename = filename(ppIdx + slashl, filename.
Length());
2170 filename.
Remove(ppIdx + slashl - 1);
2185 Printf(
"******************************************************************************");
2187 Printf(
"******************************************************************************");
2326 static Int_t chCounter = 0;
2332 chName += chCounter;
2337 out <<
" TChain *" << chName.
Data() <<
" = new TChain(\"" <<
GetName() <<
"\");" << std::endl;
2343 if (
dynamic_cast<TChain *
>(frtree)) {
2347 out <<
" " << chName.
Data() <<
"->AddFriend(\"" << frtree->
GetName() <<
"\");" << std::endl;
2351 out <<
" " << chName.
Data() <<
"->AddFriend(\"" << frtree->
GetName() <<
"\", \"" <<
file->GetName()
2352 <<
"\");" << std::endl;
2363 out <<
" " << chName.
Data() <<
"->AddFile(\"" << chel->
GetTitle() <<
"\");" << std::endl;
2374 out <<
" " << chName.
Data() <<
"->SetMarkerColor(ci);" << std::endl;
2376 out <<
" " << chName.
Data() <<
"->SetMarkerColor(" <<
GetMarkerColor() <<
");" << std::endl;
2379 out <<
" " << chName.
Data() <<
"->SetMarkerStyle(" <<
GetMarkerStyle() <<
");" << std::endl;
2382 out <<
" " << chName.
Data() <<
"->SetMarkerSize(" <<
GetMarkerSize() <<
");" << std::endl;
2517 if (cloneBr && (cloneBr->
GetAddress() == oldAdd)) {
2529 Error(
"SetBranchAddress",
"unknown branch -> %s", bname);
2661 if (elist->
GetN() == 0){
2678 for (
Int_t ie = 0; ie<ne; ie++){
2680 treename = chainElement->GetName();
2681 filename = chainElement->GetTitle();
2682 templist = elist->
GetEntryList(treename, filename, opt);
2689 if (listfound == 0){
2690 Error(
"SetEntryList",
"No list found for the trees in this chain");
2753 Int_t dotslashpos = basename.
Index(
".root/");
2755 if (dotslashpos>=0) {
2757 behind_dot_root = basename(dotslashpos+6,basename.
Length()-dotslashpos+6);
2759 basename.
Remove(dotslashpos+5);
2815 char enlistname[100];
2822 const char *treename;
2823 const char *filename;
2828 printf(
"loading trees\n");
2831 for (
Int_t i=0; i<nsel; i++){
2843 enlist->
SetTree(treename, filename);
2844 enlist->
Enter(localentry);
2859 gROOT->GetListOfCleanups()->Remove(
this);
2860 gROOT->GetListOfSpecials()->Remove(
this);
2861 gROOT->GetListOfDataSets()->Remove(
this);
2867 gROOT->GetListOfCleanups()->Add(
this);
2868 gROOT->GetListOfSpecials()->Add(
this);
2869 gROOT->GetListOfDataSets()->Add(
this);
2915 if ((
h =
gROOT->GetPluginManager()->FindHandler(
"TChain",
"proof"))) {
2916 if (
h->LoadPlugin() == -1)
2918 if (!(
fProofChain =
reinterpret_cast<TChain *
>(
h->ExecPlugin(2,
this, gettreeheader))))
2919 Error(
"SetProof",
"creation of TProofChain failed");
2961 if (
b.IsReading()) {
2965 gROOT->GetListOfCleanups()->Remove(
this);
2969 Version_t R__v =
b.ReadVersion(&R__s, &R__c);
2983 b.CheckByteCount(R__s, R__c, TChain::IsA());
2989 gROOT->GetListOfCleanups()->Add(
this);
@ kMustCleanup
if object destructor must call RecursiveRemove()
virtual void UpdateFormulaLeaves()=0
Manages entry lists from different files, when they are not loaded in memory at the same time.
TObjArray * fFiles
-> List of file names containing the trees (TChainElement, owned)
virtual void SetBaddressType(UInt_t type)
virtual Int_t GetN() const
virtual void Reset(Option_t *option="")
Reset baskets, buffers and entries count in all branches and leaves.
TFile * fFile
! Pointer to current file (We own the file).
A specialized string object used for TTree selections.
Class describing a generic file including meta information.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
void SetLoadResult(Int_t result)
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 TObject * Remove(TObject *)
Remove an object from the in-memory list.
Using a TBrowser one can browse all ROOT objects.
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 TBranch * FindBranch(const char *name)
Return the branch that correspond to the path 'branchname', which can include the name of the tree or...
virtual void ResetAfterMerge(TFileMergeInfo *)
Resets the state of this chain after a merge (keep the customization but forget the data).
virtual TList * GetList() const
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Browse(TBrowser *)
Browse content of the TTree.
A TEventList object is a list of selected events (entries) in a TTree.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Set branch address.
TUrl * GetCurrentUrl() const
Return the current url.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
TChain * fProofChain
! chain proxy when going to be processed by PROOF
Bool_t GetCheckedType() const
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...
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
virtual TList * GetListOfFriends() const
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
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 Bool_t GetReapplyCut() const
virtual TLeaf * FindLeaf(const char *name)
See TTree::GetReadEntry().
virtual Bool_t SetMakeClass(Bool_t decomposeObj=kTRUE)
Set the branch in a mode where the object are decomposed (Also known as MakeClass mode).
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
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.
Int_t fMakeClass
! not zero when processing code generated by MakeClass
const char * Data() const
virtual void FreeDirectory(void *dirp)
Free a directory.
Bool_t MaybeWildcard() const
Returns true if string contains one of the wildcard characters "[]*?".
virtual TObject * Remove(TObject *obj)
Remove object from array.
virtual const char * GetTitle() const
Returns title of object.
virtual Bool_t HasBeenLookedUp()
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual Long64_t GetChainEntryNumber(Long64_t entry) const
Return absolute entry number in the chain.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
TTreeCache * GetReadCache(TFile *file) const
Find and return the TTreeCache registered with the file and which may contain branches for us.
virtual Int_t Add(TChain *chain)
Add all files referenced by the passed chain to this chain.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TList * GetListOfClones()
virtual const char * GetBaddressClassName() const
virtual Bool_t GetMakeClass() const
Return whether this branch is in a mode where the object are decomposed or not (Also known as MakeCla...
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
A TTree represents a columnar dataset.
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 void SetShift(Bool_t shift)
virtual void SetMaxVirtualSize(Long64_t size=0)
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 ...
static constexpr double s
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
void SetAnchor(const char *anchor)
virtual Int_t GetStatus() const
virtual TClusterIterator GetClusterIterator(Long64_t firstentry)
Return an iterator over the cluster of baskets starting at firstentry.
Long64_t * fTreeOffset
[fTreeOffsetLen] Array of variables
virtual TObjArray * GetListOfLeaves()
Return a pointer to the list of leaves of the current tree.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Int_t fTreeOffsetLen
Current size of fTreeOffset array.
Int_t GetEntries() const
Return the number of objects in array (i.e.
Small helper to keep current directory context.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual Long64_t GetEntryNumber(Long64_t entry) const
Return entry number corresponding to entry.
virtual void ls(Option_t *option="") const
List the chain.
A TFriendElement TF describes a TTree object TF in a file.
virtual void UpdateBranches(TTree *tree)
Update pointer to current Tree and recompute pointers to the branches in the cache.
virtual Bool_t GetBranchStatus(const char *branchname) const
See TTree::GetReadEntry().
R__EXTERN TVirtualRWMutex * gCoreMutex
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
Buffer base class used for serializing objects.
void SetOptions(const char *opt)
TObject * UncheckedAt(Int_t i) const
virtual void ResetBranchAddress(TBranch *)
Reset the addresses of the branch.
TObject * At(Int_t idx) const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual void SetTree(const TTree *tree)
If a list for a tree with such name and filename exists, sets it as the current sublist If not,...
static void SaveColor(std::ostream &out, Int_t ci)
Save a color with index > 228 as a C++ statement(s) on output stream out.
virtual UInt_t GetBaddressType() const
virtual void SetDirectory(TDirectory *dir)
Remove reference to this chain from current directory and add reference to new directory dir.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
TDirectory * fDirectory
! Pointer to directory holding this tree
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
virtual void SetNumberEntries(Long64_t n)
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
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 ...
void Clear()
Clear string without changing its capacity.
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
const char * GetName() const
Returns name of object.
virtual const char * WorkingDirectory()
Return working directory.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void * GetBaddress() const
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
virtual TObjArray * GetListOfBranches()
TVirtualTreePlayer * fPlayer
! Pointer to current Tree player
virtual void SetStatus(Int_t status)
A TChainElement describes a component of a TChain.
Ssiz_t Last(char c) const
Find last occurrence of a character c.
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
Collectable string class.
void SetDecomposedObj(Bool_t m)
virtual TTree * GetTree() const
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
virtual void RecursiveRemove(TObject *obj)
Make sure that obj (which is being deleted or will soon be) is no longer referenced by this TTree.
Bool_t fCacheUserSet
! true if the cache setting was explicitly given by user
A TTree is a list of TBranches.
virtual void SetBaddressIsPtr(Bool_t isptr)
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
TTree * fTree
! Pointer to current tree (Note: We do not own this tree.)
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 Int_t GetNbranches()
TFile * GetCurrentFile() const
Return pointer to the current file.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual Int_t GetFileNumber() const
virtual Int_t AddFile(const char *name, Long64_t nentries=TTree::kMaxEntries, const char *tname="")
Add a new file to this chain.
UInt_t fFriendLockStatus
! Record which method is locking the friend recursion
TEntryList * fEntryList
! Pointer to event selection list (if one)
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
virtual TFriendElement * AddFriend(const char *treename, const char *filename="")
Add a TFriendElement to the list of friends.
virtual Double_t GetWeight() const
virtual TObjLink * FirstLink() const
virtual void DirectoryAutoAdd(TDirectory *)
Override the TTree::DirectoryAutoAdd behavior: we never auto add.
TEventList * fEventList
! Pointer to event selection list (if one)
TObjArray * GetListOfFiles() const
virtual Bool_t Notify()
This method must be overridden to handle object notification.
virtual TList * GetLists() const
virtual Long64_t CopyEntries(TTree *tree, Long64_t nentries=-1, Option_t *option="")
Copy nentries from given tree to this tree.
R__EXTERN TVirtualMutex * gROOTMutex
virtual void RegisterExternalFriend(TFriendElement *)
Record a TFriendElement that we need to warn when the chain switches to a new file (typically this is...
virtual Bool_t Enter(Long64_t entry, TTree *tree=0)
Add entry #entry to the list.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual Int_t GetEntryWithIndex(Int_t major, Int_t minor=0)
Return entry corresponding to major and minor number.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
virtual TBranch * FindBranch(const char *name)
See TTree::GetReadEntry().
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.
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 Long64_t GetReadEntry() const
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 Long64_t LoadTree(Long64_t entry)
Set current entry.
virtual TTree * GetTree()
Return pointer to friend TTree.
TRangeStaticCast is an adaptater class that allows the typed iteration through a TCollection.
TString & Remove(Ssiz_t pos)
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Get entry from the file to memory.
The TNamed class is the base class for all named ROOT classes.
virtual Long64_t LoadTreeFriend(Long64_t entry, TTree *T)
Load entry on behalf of our master tree, we may use an index.
virtual Double_t GetWeight() const
Return the chain weight.
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the automatic delete bit.
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 Draw(Option_t *opt)
Default Draw method for all objects.
virtual Long64_t GetEntries() const
Return the total number of entries in the chain.
#define R__LOCKGUARD(mutex)
void InvalidateCurrentTree()
Set the TTree to be reloaded as soon as possible.
TString & Insert(Ssiz_t pos, const char *s)
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.
Long64_t fReadEntry
! Number of the entry being processed
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch name in the current tree.
void SetUrl(const char *url, Bool_t defaultIsFile=kFALSE)
Parse url character string and split in its different subcomponents.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
TChain()
Default constructor.
virtual void SetAddress(void *add)
Set address of this branch.
virtual Long64_t GetEntry(Int_t index) const
Return value of entry at index in the list.
Helper class to prevent infinite recursion in the usage of TTree Friends.
Int_t fTreeNumber
! Current Tree number in fTreeOffset table
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
Int_t GetLoadResult() const
This class represents a WWW compatible URL.
virtual void SetPacketSize(Int_t size=100)
Set number of entries per packet for parallel root.
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
virtual TLeaf * FindLeaf(const char *name)
Find leaf..
@ kCanDelete
if object in a list can be deleted
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
@ kInvalidObject
if object ctor succeeded but object should not be used
virtual void ResetCache()
This will simply clear the cache.
virtual void SetBaddressClassName(const char *clname)
Regular expression class.
TDirectory * GetDirectory() const
virtual void SetName(const char *name)
Change the name of this TChain.
A List of entry numbers in a TTree or TChain.
const char * GetFile() const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void Printf(const char *fmt,...)
const char * GetProtocol() const
R__ALWAYS_INLINE Bool_t IsZombie() const
R__EXTERN TSystem * gSystem
Helper class to iterate over cluster of baskets.
virtual Bool_t GetBranchStatus(const char *branchname) const
Return status of branch with name branchname.
virtual Int_t GetNbranches()
Return the number of branches of the current tree.
virtual void SetPacketSize(Int_t size=100)
Set number of entries per packet for parallel root.
virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
virtual Int_t SetCacheSize(Long64_t cachesize=-1)
Set maximum size of the file cache .
virtual void SetReapplyCut(Bool_t apply=kFALSE)
virtual void SetCircular(Long64_t maxEntries)
Enable/Disable circularity for this tree.
virtual void CreatePackets()
Initialize the packet descriptor string.
virtual TVirtualIndex * GetTreeIndex() const
virtual Long64_t GetReadEntry() const
See TTree::GetReadEntry().
A cache to speed-up the reading of ROOT datasets.
TObject * fNotify
! Object to be notified when loading a Tree
virtual ~TChain()
Destructor.
virtual TObjArray * GetListOfBranches()
Return a pointer to the list of branches of the current tree.
TList * fExternalFriends
! List of TFriendsElement pointing to us and need to be notified of LoadTree. Content not owned.
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
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 void UpdateFormulaLeaves(const TTree *parent)=0
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save TChain as a C++ statements on output stream out.
virtual void CreatePackets()
Initialize the packet descriptor string.
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.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
Long64_t fEntries
Number of entries.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
TClass instances represent classes, structs and namespaces in the ROOT type system.
virtual Int_t GetTreeNumber() const
void SetCheckedType(Bool_t m)
const char * GetAnchor() const
virtual void ResetBranchAddress(TBranch *)
Tell all of our branches to set their addresses to zero.
virtual void Add(TObject *obj)
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
Mother of all ROOT objects.
void Close(Option_t *option="") override
Close a file.
virtual void SetBranchPtr(TBranch **ptr)
virtual Int_t LoadBaskets(Long64_t maxmemory)
Dummy function.
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the global branch kAutoDelete bit.
void AddClone(TTree *)
Add a cloned tree to our list of trees to be notified whenever we change our branch addresses or when...
static TFileStager * Open(const char *stager)
Open a stager, after having loaded the relevant plug-in.
virtual TFile * GetFile() const
virtual void SetEventList(TEventList *evlist)
This function transfroms the given TEventList into a TEntryList.
virtual char * GetAddress() const
TList * fStatus
-> List of active/inactive branches (TChainElement, owned)
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 void SetName(const char *name)
Change the name of this tree.
const char * GetFileAndOptions() const
Return the file and its options (the string specified behind the ?).
virtual Bool_t Matches(const char *s)
Describe directory structure in memory.
virtual void CopyAddresses(TTree *, Bool_t undo=kFALSE)
Set branch addresses of passed tree equal to ours.
Long64_t fCacheSize
! Maximum size of file buffers
virtual void SetMakeClass(Int_t make)
Set all the branches in this TTree to be in decomposed object mode (also known as MakeClass mode).
Long64_t fMaxVirtualSize
Maximum total size of buffers kept in memory.
Double_t fWeight
Tree weight (see TTree::SetWeight)
virtual Int_t Locate(const char *u, TString &f)
Just check if the file exists locally.
const char * GetOptions() const
TList * fClones
! List of cloned trees which share our addresses
virtual TFriendElement * AddFriend(const char *chainname, const char *dummy="")
Add a TFriendElement to the list of friends of this chain.
A chain is a collection of files containing TTree objects.
Collection abstract base class.
Wrapper around a TObject so it can be stored in a TList.
virtual TLeaf * GetLeaf(const char *branchname, const char *leafname)
Return a pointer to the leaf name in the current tree.
virtual const char * GetName() const
Returns name of object.
@ kNeedEnableDecomposedObj
virtual TBranch ** GetBranchPtr() const
void Lookup(Bool_t force=kFALSE)
Check / locate the files in the chain.
#define R__WRITE_LOCKGUARD(mutex)
virtual void Browse(TBrowser *)
Browse the contents of the chain.
Int_t fPacketSize
! Number of entries in one packet for parallel root
virtual void ResetBranchAddresses()
Tell all of our branches to drop their current objects and allocate new ones.
virtual void SetLookedUp(Bool_t y=kTRUE)
Set/Reset the looked-up bit.
TFile * GetFile() const
Return a pointer to the current file.
void ToLower()
Change string to lower-case.
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
static constexpr Long64_t kMaxEntries
virtual Int_t GetPacketSize() const
Bool_t fCanDeleteRefs
! If true, TProcessIDs are deleted when closing a file
virtual Bool_t GetBaddressIsPtr() const
virtual void Print(Option_t *option="") const
Print the header information of each tree in the chain.
virtual void SetBaddress(void *add)
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Reset(Option_t *option="")
Resets the state of this chain.
virtual TObjArray * GetListOfLeaves()
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
virtual Long64_t GetEntries() const
virtual Int_t SetCacheSize(Long64_t cacheSize=-1)
Set maximum size of the file cache .
virtual void SetChainOffset(Long64_t offset=0)
virtual Long64_t GetN() const
virtual void ResetAfterMerge(TFileMergeInfo *)
Resets the state of this TTree after a merge (keep the customization but forget the data).
virtual void SetWeight(Double_t w=1, Option_t *option="")
Set chain weight.
virtual void UseCache(Int_t maxCacheSize=10, Int_t pageSize=0)
Dummy function kept for back compatibility.
virtual void SetDirectory(TDirectory *dir)
Add reference to directory dir. dir can be 0.
Int_t fNtrees
Number of trees.
virtual Long64_t GetEntries() const
virtual TTree * GetTree() const
virtual void SetBasketSize(Int_t buffsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
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 SetCacheRead(TFileCacheRead *cache, TObject *tree=0, ECacheAction action=kDisconnect)
Set a pointer to the read cache.
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...
virtual void ResetBranchAddresses()
Reset the addresses of the branches.
virtual void SetTreeNumber(Int_t index)
TList * fFriends
pointer to list of friend elements
void SetCompressionSettings(Int_t settings=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
Set compression settings.