|
ROOT
Reference Guide |
|
Go to the documentation of this file.
70 TChain(
const char*
name,
const char* title =
"");
102 virtual TLeaf *
GetLeaf(
const char* branchname,
const char* leafname);
109 virtual const char *
GetAlias(
const char *aliasName)
const;
145 return TTree::SetBranchAddress<T>(bname, add, ptr);
147 #ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION
151 return TTree::SetBranchAddress<T>(bname, add, ptr);
constexpr std::array< decltype(std::declval< F >)(std::declval< int >))), N > make(F f)
TObjArray * fFiles
-> List of file names containing the trees (TChainElement, owned)
TFile * fFile
! Pointer to current file (We own the file).
A specialized string object used for TTree selections.
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.
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 void ResetAfterMerge(TFileMergeInfo *)
Resets the state of this chain after a merge (keep the customization but forget the data).
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.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
TChain * fProofChain
! chain proxy when going to be processed by PROOF
virtual Long64_t GetCacheSize() const
Long64_t * GetTreeOffset() 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 Merge(const char *name, Option_t *option="")
Merge all the entries in the chain into a new tree in a new file.
virtual TLeaf * FindLeaf(const char *name)
See TTree::GetReadEntry().
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.
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 Long64_t GetChainEntryNumber(Long64_t entry) const
Return absolute entry number in the chain.
virtual Int_t Add(TChain *chain)
Add all files referenced by the passed chain to this chain.
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 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 ...
Long64_t * fTreeOffset
[fTreeOffsetLen] Array of variables
virtual TObjArray * GetListOfLeaves()
Return a pointer to the list of leaves of the current tree.
Int_t fTreeOffsetLen
Current size of fTreeOffset array.
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 Bool_t GetBranchStatus(const char *branchname) const
See TTree::GetReadEntry().
void MayNotUse(const char *method) const
Use this method to signal that a method (defined in a base class) may not be called in a derived clas...
virtual void ResetBranchAddress(TBranch *)
Reset the addresses of the branch.
virtual void SetDirectory(TDirectory *dir)
Remove reference to this chain from current directory and add reference to new directory dir.
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
virtual Long64_t GetCacheSize() const
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
TList * GetStatus() const
virtual void RecursiveRemove(TObject *obj)
Make sure that obj (which is being deleted or will soon be) is no longer referenced by this TTree.
A TTree is a list of TBranches.
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 AddFile(const char *name, Long64_t nentries=TTree::kMaxEntries, const char *tname="")
Add a new file to this chain.
virtual void DirectoryAutoAdd(TDirectory *)
Override the TTree::DirectoryAutoAdd behavior: we never auto add.
TObjArray * GetListOfFiles() const
Int_t SetBranchAddress(const char *bname, T **add, TBranch **ptr=0)
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.
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
virtual TBranch * FindBranch(const char *name)
See TTree::GetReadEntry().
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 void Draw(Option_t *opt)
Default Draw method for all objects.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Get entry from the file to memory.
virtual Double_t GetWeight() const
Return the chain weight.
virtual Long64_t GetEntries(const char *sel)
Return the number of entries matching the selection.
virtual Int_t GetTreeNumber() const
virtual Long64_t LoadTree(Long64_t entry)
Find the tree which contains entry, and set it as the current tree.
TChain & operator=(const TChain &)
virtual Long64_t GetEntries() const
Return the total number of entries in the chain.
void InvalidateCurrentTree()
Set the TTree to be reloaded as soon as possible.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch name in the current tree.
TChain()
Default constructor.
Int_t fTreeNumber
! Current Tree number in fTreeOffset table
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
virtual void SetName(const char *name)
Change the name of this TChain.
A List of entry numbers in a TTree or TChain.
Int_t GetTreeOffsetLen() const
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.
Int_t SetBranchAddress(const char *bname, T *add, TBranch **ptr=0)
virtual void CreatePackets()
Initialize the packet descriptor string.
virtual Long64_t GetReadEntry() const
See TTree::GetReadEntry().
virtual ~TChain()
Destructor.
virtual TObjArray * GetListOfBranches()
Return a pointer to the list of branches of the current tree.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save TChain as a C++ statements on output stream out.
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.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Mother of all ROOT objects.
#define ClassDef(name, id)
virtual Int_t LoadBaskets(Long64_t maxmemory)
Dummy function.
virtual void SetAutoDelete(Bool_t autodel=kTRUE)
Set the global branch kAutoDelete bit.
virtual void SetEventList(TEventList *evlist)
This function transfroms the given TEventList into a TEntryList.
virtual Int_t Fill()
Fill all branches.
TList * fStatus
-> List of active/inactive branches (TChainElement, owned)
Describe directory structure in memory.
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).
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.
virtual TLeaf * GetLeaf(const char *branchname, const char *leafname)
Return a pointer to the leaf name in the current tree.
void Lookup(Bool_t force=kFALSE)
Check / locate the files in the chain.
virtual void Browse(TBrowser *)
Browse the contents of the chain.
TFile * GetFile() const
Return a pointer to the current file.
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
static constexpr auto kBigNumber
static constexpr Long64_t kMaxEntries
Bool_t fCanDeleteRefs
! If true, TProcessIDs are deleted when closing a file
virtual void Print(Option_t *option="") const
Print the header information of each tree in the chain.
virtual void Reset(Option_t *option="")
Resets the state of this chain.
virtual Long64_t GetEntries() const
virtual Int_t SetCacheSize(Long64_t cacheSize=-1)
Set maximum size of the file cache .
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.
Int_t fNtrees
Number of trees.
virtual TTree * GetTree() const
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 ResetBranchAddresses()
Reset the addresses of the branches.