Logo ROOT  
Reference Guide
TTree.h
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Rene Brun 12/01/96
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TTree
13 #define ROOT_TTree
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TTree //
18 // //
19 // A TTree object is a list of TBranch. //
20 // To Create a TTree object one must: //
21 // - Create the TTree header via the TTree constructor //
22 // - Call the TBranch constructor for every branch. //
23 // //
24 // To Fill this object, use member function Fill with no parameters. //
25 // The Fill function loops on all defined TBranch. //
26 // //
27 //////////////////////////////////////////////////////////////////////////
28 
29 #include "Compression.h"
30 #include "ROOT/TIOFeatures.hxx"
31 #include "TArrayD.h"
32 #include "TArrayI.h"
33 #include "TAttFill.h"
34 #include "TAttLine.h"
35 #include "TAttMarker.h"
36 #include "TClass.h"
37 #include "TDataType.h"
38 #include "TDirectory.h"
39 #include "TObjArray.h"
40 #include "TVirtualTreePlayer.h"
41 
42 #ifdef R__LESS_INCLUDES
43 class TBranch;
44 class TList;
45 #else
46 #include "TBranch.h"
47 // #include "TBuffer.h"
48 #include "TList.h"
49 #endif
50 
51 #include <array>
52 #include <atomic>
53 #include <vector>
54 #include <utility>
55 
56 class TBuffer;
57 class TBrowser;
58 class TFile;
59 class TLeaf;
60 class TH1;
61 class TTreeFormula;
62 class TPolyMarker;
63 class TEventList;
64 class TEntryList;
65 class TSQLResult;
66 class TSelector;
67 class TPrincipal;
68 class TFriendElement;
69 class TCut;
70 class TVirtualIndex;
71 class TBranchRef;
72 class TBasket;
73 class TStreamerInfo;
74 class TTreeCache;
75 class TTreeCloner;
76 class TFileMergeInfo;
77 class TVirtualPerfStats;
78 
79 class TTree : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
80 
82 
83 protected:
84  Long64_t fEntries; ///< Number of entries
85 // NOTE: cannot use std::atomic for these counters as it cannot be serialized.
86  Long64_t fTotBytes; ///< Total number of bytes in all branches before compression
87  Long64_t fZipBytes; ///< Total number of bytes in all branches after compression
88  Long64_t fSavedBytes; ///< Number of autosaved bytes
89  Long64_t fFlushedBytes; ///< Number of auto-flushed bytes
90  Double_t fWeight; ///< Tree weight (see TTree::SetWeight)
91  Int_t fTimerInterval; ///< Timer interval in milliseconds
92  Int_t fScanField; ///< Number of runs before prompting in Scan
93  Int_t fUpdate; ///< Update frequency for EntryLoop
94  Int_t fDefaultEntryOffsetLen; ///< Initial Length of fEntryOffset table in the basket buffers
95  Int_t fNClusterRange; ///< Number of Cluster range in addition to the one defined by 'AutoFlush'
96  Int_t fMaxClusterRange; ///<! Memory allocated for the cluster range.
97  Long64_t fMaxEntries; ///< Maximum number of entries in case of circular buffers
98  Long64_t fMaxEntryLoop; ///< Maximum number of entries to process
99  Long64_t fMaxVirtualSize; ///< Maximum total size of buffers kept in memory
100  Long64_t fAutoSave; ///< Autosave tree when fAutoSave entries written or -fAutoSave (compressed) bytes produced
101  Long64_t fAutoFlush; ///< Auto-flush tree when fAutoFlush entries written or -fAutoFlush (compressed) bytes produced
102  Long64_t fEstimate; ///< Number of entries to estimate histogram limits
103  Long64_t *fClusterRangeEnd; ///<[fNClusterRange] Last entry of a cluster range.
104  Long64_t *fClusterSize; ///<[fNClusterRange] Number of entries in each cluster for a given range.
105  Long64_t fCacheSize; ///<! Maximum size of file buffers
106  Long64_t fChainOffset; ///<! Offset of 1st entry of this Tree in a TChain
107  Long64_t fReadEntry; ///<! Number of the entry being processed
108  std::atomic<Long64_t> fTotalBuffers; ///<! Total number of bytes in branch buffers
109  Int_t fPacketSize; ///<! Number of entries in one packet for parallel root
110  Int_t fNfill; ///<! Local for EntryLoop
111  Int_t fDebug; ///<! Debug level
112  Long64_t fDebugMin; ///<! First entry number to debug
113  Long64_t fDebugMax; ///<! Last entry number to debug
114  TIOFeatures fIOFeatures{0}; ///< IO features to define for newly-written baskets and branches.
115  Int_t fMakeClass; ///<! not zero when processing code generated by MakeClass
116  Int_t fFileNumber; ///<! current file number (if file extensions)
117  TObject *fNotify; ///<! Object to be notified when loading a Tree
118  TDirectory *fDirectory; ///<! Pointer to directory holding this tree
119  TObjArray fBranches; ///< List of Branches
120  TObjArray fLeaves; ///< Direct pointers to individual branch leaves
121  TList *fAliases; ///< List of aliases for expressions based on the tree branches.
122  TEventList *fEventList; ///<! Pointer to event selection list (if one)
123  TEntryList *fEntryList; ///<! Pointer to event selection list (if one)
124  TArrayD fIndexValues; ///< Sorted index values
125  TArrayI fIndex; ///< Index of sorted values
126  TVirtualIndex *fTreeIndex; ///< Pointer to the tree Index (if any)
127  TList *fFriends; ///< pointer to list of friend elements
128  TList *fExternalFriends; ///<! List of TFriendsElement pointing to us and need to be notified of LoadTree. Content not owned.
129  TVirtualPerfStats *fPerfStats; ///<! pointer to the current perf stats object
130  TList *fUserInfo; ///< pointer to a list of user objects associated to this Tree
131  TVirtualTreePlayer *fPlayer; ///<! Pointer to current Tree player
132  TList *fClones; ///<! List of cloned trees which share our addresses
133  TBranchRef *fBranchRef; ///< Branch supporting the TRefTable (if any)
134  UInt_t fFriendLockStatus; ///<! Record which method is locking the friend recursion
135  TBuffer *fTransientBuffer; ///<! Pointer to the current transient buffer.
136  Bool_t fCacheDoAutoInit; ///<! true if cache auto creation or resize check is needed
137  Bool_t fCacheDoClusterPrefetch;///<! true if cache is prefetching whole clusters
138  Bool_t fCacheUserSet; ///<! true if the cache setting was explicitly given by user
139  Bool_t fIMTEnabled; ///<! true if implicit multi-threading is enabled for this tree
140  UInt_t fNEntriesSinceSorting; ///<! Number of entries processed since the last re-sorting of branches
141  std::vector<std::pair<Long64_t,TBranch*>> fSortedBranches; ///<! Branches to be processed in parallel when IMT is on, sorted by average task time
142  std::vector<TBranch*> fSeqBranches; ///<! Branches to be processed sequentially when IMT is on
143  Float_t fTargetMemoryRatio{1.1f}; ///<! Ratio for memory usage in uncompressed buffers versus actual occupancy. 1.0
144  /// indicates basket should be resized to exact memory usage, but causes significant
145 /// memory churn.
146 #ifdef R__TRACK_BASKET_ALLOC_TIME
147  mutable std::atomic<ULong64_t> fAllocationTime{0}; ///<! Time spent reallocating basket memory buffers, in microseconds.
148 #endif
149  mutable std::atomic<UInt_t> fAllocationCount{0}; ///<! Number of reallocations basket memory buffers.
150 
151  static Int_t fgBranchStyle; ///< Old/New branch style
152  static Long64_t fgMaxTreeSize; ///< Maximum size of a file containing a Tree
153 
154 private:
155  // For simplicity, although fIMTFlush is always disabled in non-IMT builds, we don't #ifdef it out.
156  mutable Bool_t fIMTFlush{false}; ///<! True if we are doing a multithreaded flush.
157  mutable std::atomic<Long64_t> fIMTTotBytes; ///<! Total bytes for the IMT flush baskets
158  mutable std::atomic<Long64_t> fIMTZipBytes; ///<! Zip bytes for the IMT flush baskets.
159 
160  void InitializeBranchLists(bool checkLeafCount);
161  void SortBranchesByTime();
162  Int_t FlushBasketsImpl() const;
163  void MarkEventCluster();
164 
165 protected:
166  virtual void KeepCircular();
167  virtual TBranch *BranchImp(const char* branchname, const char* classname, TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel);
168  virtual TBranch *BranchImp(const char* branchname, TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel);
169  virtual TBranch *BranchImpRef(const char* branchname, const char* classname, TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel);
170  virtual TBranch *BranchImpRef(const char* branchname, TClass* ptrClass, EDataType datatype, void* addobj, Int_t bufsize, Int_t splitlevel);
171  virtual TBranch *BranchImpArr(const char* branchname, EDataType datatype, std::size_t N, void* addobj, Int_t bufsize, Int_t splitlevel);
172  virtual Int_t CheckBranchAddressType(TBranch* branch, TClass* ptrClass, EDataType datatype, Bool_t ptr);
173  virtual TBranch *BronchExec(const char* name, const char* classname, void* addobj, Bool_t isptrptr, Int_t bufsize, Int_t splitlevel);
174  friend TBranch *TTreeBranchImpRef(TTree *tree, const char* branchname, TClass* ptrClass, EDataType datatype, void* addobj, Int_t bufsize, Int_t splitlevel);
175  Int_t SetBranchAddressImp(TBranch *branch, void* addr, TBranch** ptr);
176  virtual TLeaf *GetLeafImpl(const char* branchname, const char* leafname);
177 
178  Long64_t GetCacheAutoSize(Bool_t withDefault = kFALSE) const;
179  char GetNewlineValue(std::istream &inputStream);
180  void ImportClusterRanges(TTree *fromtree);
181  void MoveReadCache(TFile *src, TDirectory *dir);
182  Int_t SetCacheSizeAux(Bool_t autocache = kTRUE, Long64_t cacheSize = 0);
183 
184  class TFriendLock {
185  // Helper class to prevent infinite recursion in the
186  // usage of TTree Friends. Implemented in TTree.cxx.
187  TTree *fTree; // Pointer to the locked tree
188  UInt_t fMethodBit; // BIT for the locked method
189  Bool_t fPrevious; // Previous value of the BIT.
190 
191  protected:
192  TFriendLock(const TFriendLock&);
194 
195  public:
196  TFriendLock(TTree* tree, UInt_t methodbit);
197  ~TFriendLock();
198  };
199  friend class TFriendLock;
200  // So that the index class can use TFriendLock:
201  friend class TTreeIndex;
202  friend class TChainIndex;
203  // So that the TTreeCloner can access the protected interfaces
204  friend class TTreeCloner;
205 
206  // use to update fFriendLockStatus
216  kGetLeaf = BIT(8),
218  kPrint = BIT(10),
221  };
222 
223 public:
224  // Used as the max value for any TTree range operation.
226 
227  // SetBranchAddress return values
232  kMismatch = -2,
234  kMatch = 0,
238  kVoidPtr = 4,
239  kNoCheck = 5,
240  kNeedEnableDecomposedObj = BIT(29), // DecomposedObj is the newer name of MakeClass mode
243  };
244 
245  // TTree status bits
246  enum EStatusBits {
248  kCircular = BIT(12),
249  /// If set, the branch's buffers will grow until an event cluster boundary is hit,
250  /// guaranteeing a basket per cluster. This mode does not provide any guarantee on the
251  /// memory bounds in the case of extremely large events.
253  /// If set, signals that this TTree is the output of the processing of another TTree, and
254  /// the entries are reshuffled w.r.t. to the original TTree. As a safety measure, a TTree
255  /// with this bit set cannot add friends nor can be added as a friend. If you know what
256  /// you are doing, you can manually unset this bit with `ResetBit(EStatusBits::kEntriesReshuffled)`.
257  kEntriesReshuffled = BIT(19) // bits 15-18 are used by TChain
258  };
259 
260  // Split level modifier
261  enum {
263  };
264 
266  {
267  private:
268  TTree *fTree; // TTree upon which we are iterating.
269  Int_t fClusterRange; // Which cluster range are we looking at.
270  Long64_t fStartEntry; // Where does the cluster start.
271  Long64_t fNextEntry; // Where does the cluster end (exclusive).
272  Long64_t fEstimatedSize; // If positive, the calculated estimated tree size.
273 
275 
276  protected:
277  friend class TTree;
278  TClusterIterator(TTree *tree, Long64_t firstEntry);
279 
280  public:
281  // Intentionally used the default copy constructor and default destructor
282  // as the TClusterIterator does not own the TTree.
283  // TClusterIterator(const TClusterIterator&);
284  // ~TClusterIterator();
285 
286  // No public constructors, the iterator must be
287  // created via TTree::GetClusterIterator
288 
289  // Move on to the next cluster and return the starting entry
290  // of this next cluster
291  Long64_t Next();
292 
293  // Move on to the previous cluster and return the starting entry
294  // of this previous cluster
295  Long64_t Previous();
296 
297  // Return the start entry of the current cluster.
299  return fStartEntry;
300  }
301 
302  // Return the first entry of the next cluster.
304  return fNextEntry;
305  }
306 
307  Long64_t operator()() { return Next(); }
308  };
309 
310  TTree();
311  TTree(const char* name, const char* title, Int_t splitlevel = 99, TDirectory* dir = gDirectory);
312  virtual ~TTree();
313 
314  TTree(const TTree& tt) = delete;
315  TTree& operator=(const TTree& tt) = delete;
316 
317  virtual Int_t AddBranchToCache(const char *bname, Bool_t subbranches = kFALSE);
318  virtual Int_t AddBranchToCache(TBranch *branch, Bool_t subbranches = kFALSE);
319  virtual Int_t DropBranchFromCache(const char *bname, Bool_t subbranches = kFALSE);
320  virtual Int_t DropBranchFromCache(TBranch *branch, Bool_t subbranches = kFALSE);
321  void AddClone(TTree*);
322  virtual TFriendElement *AddFriend(const char* treename, const char* filename = "");
323  virtual TFriendElement *AddFriend(const char* treename, TFile* file);
324  virtual TFriendElement *AddFriend(TTree* tree, const char* alias = "", Bool_t warn = kFALSE);
325  // As the TBasket invokes Add{Tot,Zip}Bytes on its parent tree, we must do these updates in a thread-safe
326  // manner only when we are flushing multiple baskets in parallel.
327  virtual void AddTotBytes(Int_t tot) { if (fIMTFlush) { fIMTTotBytes += tot; } else { fTotBytes += tot; } }
328  virtual void AddZipBytes(Int_t zip) { if (fIMTFlush) { fIMTZipBytes += zip; } else { fZipBytes += zip; } }
329 // NOTE: these counters aren't thread safe like the ones above.
330 #ifdef R__TRACK_BASKET_ALLOC_TIME
331  void AddAllocationTime(ULong64_t time) { fAllocationTime += time; }
332 #endif
333  void AddAllocationCount(UInt_t count) { fAllocationCount += count; }
334  virtual Long64_t AutoSave(Option_t* option = "");
335 
336  /// Add a new branch, and infer the data type from the type of `obj` being passed.
337  ///
338  /// \note This and the next overload should cover most cases for creating a branch. Try to use these two whenever
339  /// possible, unless e.g. type conversions are needed.
340  ///
341  /// \param[in] name Name of the branch to be created.
342  /// \param[in] obj Address of the object to be added. Make sure to pass a pointer to the actual type/class that
343  /// should be stored in the tree (no pointers to base classes). When calling Fill(), the current value of the type/object will be saved.
344  /// \param[in] bufsize The buffer size in bytes for this branch. When the buffer is full, it is compressed and written to disc.
345  /// The default value of 32000 bytes and should be ok for most simple types. Larger buffers (e.g. 256000) if your Tree is not split and each entry is large (Megabytes).
346  /// A small value for bufsize is beneficial if entries in the Tree are accessed randomly and the Tree is in split mode.
347  /// \param[in] splitlevel If T is a class or struct and splitlevel > 0, the members of the object are serialised as separate branches.
348  /// \return Pointer to the TBranch that was created. The branch is owned by the tree.
349  template <class T> TBranch *Branch(const char* name, T* obj, Int_t bufsize = 32000, Int_t splitlevel = 99)
350  {
351  return BranchImpRef(name, TClass::GetClass<T>(), TDataType::GetType(typeid(T)), obj, bufsize, splitlevel);
352  }
353 
354  /// Add a new branch, and infer the data type from the array `addobj` being passed.
355  ///
356  /// \note This and the previous overload should cover most cases for creating a branch. Try to use these two whenever
357  /// possible, unless e.g. type conversions are needed.
358  ///
359  /// \param[in] name Name of the branch to be created.
360  /// \param[in] obj Array of the objects to be added. When calling Fill(), the current value of the type/object will be saved.
361  /// \param[in] bufsize he buffer size in bytes for this branch. When the buffer is full, it is compressed and written to disc.
362  /// The default value of 32000 bytes and should be ok for most simple types. Larger buffers (e.g. 256000) if your Tree is not split and each entry is large (Megabytes).
363  /// A small value for bufsize is beneficial if entries in the Tree are accessed randomly and the Tree is in split mode.
364  /// \param[in] splitlevel If T is a class or struct and splitlevel > 0, the members of the object are serialised as separate branches.
365  /// \return Pointer to the TBranch that was created. The branch is owned by the tree.
366  template <class T> TBranch *Branch(const char* name, T** addobj, Int_t bufsize = 32000, Int_t splitlevel = 99)
367  {
368  return BranchImp(name, TClass::GetClass<T>(), addobj, bufsize, splitlevel);
369  }
370 
371  virtual Int_t Branch(TCollection* list, Int_t bufsize = 32000, Int_t splitlevel = 99, const char* name = "");
372  virtual Int_t Branch(TList* list, Int_t bufsize = 32000, Int_t splitlevel = 99);
373  virtual Int_t Branch(const char* folder, Int_t bufsize = 32000, Int_t splitlevel = 99);
374  virtual TBranch *Branch(const char* name, void* address, const char* leaflist, Int_t bufsize = 32000);
375  TBranch *Branch(const char* name, char* address, const char* leaflist, Int_t bufsize = 32000)
376  {
377  // Overload to avoid confusion between this signature and the template instance.
378  return Branch(name,(void*)address,leaflist,bufsize);
379  }
380  TBranch *Branch(const char* name, Long_t address, const char* leaflist, Int_t bufsize = 32000)
381  {
382  // Overload to avoid confusion between this signature and the template instance.
383  return Branch(name,(void*)address,leaflist,bufsize);
384  }
385  TBranch *Branch(const char* name, int address, const char* leaflist, Int_t bufsize = 32000)
386  {
387  // Overload to avoid confusion between this signature and the template instance.
388  return Branch(name,(void*)(Long_t)address,leaflist,bufsize);
389  }
390  virtual TBranch *Branch(const char* name, const char* classname, void* addobj, Int_t bufsize = 32000, Int_t splitlevel = 99);
391  template <class T> TBranch *Branch(const char* name, const char* classname, T* obj, Int_t bufsize = 32000, Int_t splitlevel = 99)
392  {
393  // See BranchImpRed for details. Here we __ignore
394  return BranchImpRef(name, classname, TClass::GetClass<T>(), obj, bufsize, splitlevel);
395  }
396  template <class T> TBranch *Branch(const char* name, const char* classname, T** addobj, Int_t bufsize = 32000, Int_t splitlevel = 99)
397  {
398  // See BranchImp for details
399  return BranchImp(name, classname, TClass::GetClass<T>(), addobj, bufsize, splitlevel);
400  }
401  template <typename T, std::size_t N> TBranch *Branch(const char* name, std::array<T, N> *obj, Int_t bufsize = 32000, Int_t splitlevel = 99)
402  {
403  TClass *cl = TClass::GetClass<T>();
404  if (cl) {
405  TClass *arrCl = TClass::GetClass<std::array<T, N>>();
406  Error("Branch","std::array of objects not yet supported as top level branch object (the class is %s)",
407  arrCl ? arrCl->GetName() : cl->GetName());
408  return nullptr;
409  }
410  return BranchImpArr(name, TDataType::GetType(typeid(T)), N, obj, bufsize, splitlevel);
411  }
412  virtual TBranch *Bronch(const char* name, const char* classname, void* addobj, Int_t bufsize = 32000, Int_t splitlevel = 99);
413  virtual TBranch *BranchOld(const char* name, const char* classname, void* addobj, Int_t bufsize = 32000, Int_t splitlevel = 1);
414  virtual TBranch *BranchRef();
415  virtual void Browse(TBrowser*);
416  virtual Int_t BuildIndex(const char* majorname, const char* minorname = "0");
417  TStreamerInfo *BuildStreamerInfo(TClass* cl, void* pointer = 0, Bool_t canOptimize = kTRUE);
418  virtual TFile *ChangeFile(TFile* file);
419  virtual TTree *CloneTree(Long64_t nentries = -1, Option_t* option = "");
420  virtual void CopyAddresses(TTree*,Bool_t undo = kFALSE);
421  virtual Long64_t CopyEntries(TTree* tree, Long64_t nentries = -1, Option_t *option = "");
422  virtual TTree *CopyTree(const char* selection, Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0);
423  virtual TBasket *CreateBasket(TBranch*);
424  virtual void DirectoryAutoAdd(TDirectory *);
425  Int_t Debug() const { return fDebug; }
426  virtual void Delete(Option_t* option = ""); // *MENU*
427  virtual void Draw(Option_t* opt) { Draw(opt, "", "", kMaxEntries, 0); }
428  virtual Long64_t Draw(const char* varexp, const TCut& selection, Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0);
429  virtual Long64_t Draw(const char* varexp, const char* selection, Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0); // *MENU*
430  virtual void DropBaskets();
431  virtual void DropBuffers(Int_t nbytes);
432  virtual Int_t Fill();
433  virtual TBranch *FindBranch(const char* name);
434  virtual TLeaf *FindLeaf(const char* name);
435  virtual Int_t Fit(const char* funcname, const char* varexp, const char* selection = "", Option_t* option = "", Option_t* goption = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0); // *MENU*
436  virtual Int_t FlushBaskets(Bool_t create_cluster = true) const;
437  virtual const char *GetAlias(const char* aliasName) const;
439 #ifdef R__TRACK_BASKET_ALLOC_TIME
440  ULong64_t GetAllocationTime() const { return fAllocationTime; }
441 #endif
442  virtual Long64_t GetAutoFlush() const {return fAutoFlush;}
443  virtual Long64_t GetAutoSave() const {return fAutoSave;}
444  virtual TBranch *GetBranch(const char* name);
445  virtual TBranchRef *GetBranchRef() const { return fBranchRef; };
446  virtual Bool_t GetBranchStatus(const char* branchname) const;
447  static Int_t GetBranchStyle();
448  virtual Long64_t GetCacheSize() const { return fCacheSize; }
449  virtual TClusterIterator GetClusterIterator(Long64_t firstentry);
450  virtual Long64_t GetChainEntryNumber(Long64_t entry) const { return entry; }
451  virtual Long64_t GetChainOffset() const { return fChainOffset; }
453  TFile *GetCurrentFile() const;
455  Long64_t GetDebugMax() const { return fDebugMax; }
456  Long64_t GetDebugMin() const { return fDebugMin; }
457  TDirectory *GetDirectory() const { return fDirectory; }
458  virtual Long64_t GetEntries() const { return fEntries; }
459  virtual Long64_t GetEntries(const char *selection);
460  virtual Long64_t GetEntriesFast() const { return fEntries; }
461  virtual Long64_t GetEntriesFriend() const;
462  virtual Long64_t GetEstimate() const { return fEstimate; }
463  virtual Int_t GetEntry(Long64_t entry = 0, Int_t getall = 0);
464  Int_t GetEvent(Long64_t entry = 0, Int_t getall = 0) { return GetEntry(entry, getall); }
465  virtual Int_t GetEntryWithIndex(Int_t major, Int_t minor = 0);
466  virtual Long64_t GetEntryNumberWithBestIndex(Long64_t major, Long64_t minor = 0) const;
467  virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor = 0) const;
468  TEventList *GetEventList() const { return fEventList; }
469  virtual TEntryList *GetEntryList();
470  virtual Long64_t GetEntryNumber(Long64_t entry) const;
471  virtual Int_t GetFileNumber() const { return fFileNumber; }
472  virtual TTree *GetFriend(const char*) const;
473  virtual const char *GetFriendAlias(TTree*) const;
475  virtual Bool_t GetImplicitMT() { return fIMTEnabled; }
476  virtual Int_t *GetIndex() { return &fIndex.fArray[0]; }
477  virtual Double_t *GetIndexValues() { return &fIndexValues.fArray[0]; }
480  virtual TLeaf *GetLeaf(const char* branchname, const char* leafname);
481  virtual TLeaf *GetLeaf(const char* name);
482  virtual TList *GetListOfClones() { return fClones; }
483  virtual TObjArray *GetListOfBranches() { return &fBranches; }
484  virtual TObjArray *GetListOfLeaves() { return &fLeaves; }
485  virtual TList *GetListOfFriends() const { return fFriends; }
486  virtual TList *GetListOfAliases() const { return fAliases; }
487 
488  // GetMakeClass is left non-virtual for efficiency reason.
489  // Making it virtual affects the performance of the I/O
490  Int_t GetMakeClass() const { return fMakeClass; }
491 
492  virtual Long64_t GetMaxEntryLoop() const { return fMaxEntryLoop; }
493  virtual Double_t GetMaximum(const char* columname);
494  static Long64_t GetMaxTreeSize();
495  virtual Long64_t GetMaxVirtualSize() const { return fMaxVirtualSize; }
496  virtual Double_t GetMinimum(const char* columname);
497  virtual Int_t GetNbranches() { return fBranches.GetEntriesFast(); }
498  TObject *GetNotify() const { return fNotify; }
500  virtual Int_t GetPacketSize() const { return fPacketSize; }
501  virtual TVirtualPerfStats *GetPerfStats() const { return fPerfStats; }
504  virtual Long64_t GetReadEntry() const { return fReadEntry; }
505  virtual Long64_t GetReadEvent() const { return fReadEntry; }
506  virtual Int_t GetScanField() const { return fScanField; }
509  virtual Int_t GetTimerInterval() const { return fTimerInterval; }
511  virtual Long64_t GetTotBytes() const { return fTotBytes; }
512  virtual TTree *GetTree() const { return const_cast<TTree*>(this); }
513  virtual TVirtualIndex *GetTreeIndex() const { return fTreeIndex; }
514  virtual Int_t GetTreeNumber() const { return 0; }
516  virtual Int_t GetUpdate() const { return fUpdate; }
517  virtual TList *GetUserInfo();
518  // See TSelectorDraw::GetVar
519  TTreeFormula *GetVar(Int_t i) { return GetPlayer()->GetVar(i); }
520  // See TSelectorDraw::GetVar
521  TTreeFormula *GetVar1() { return GetPlayer()->GetVar1(); }
522  // See TSelectorDraw::GetVar
523  TTreeFormula *GetVar2() { return GetPlayer()->GetVar2(); }
524  // See TSelectorDraw::GetVar
525  TTreeFormula *GetVar3() { return GetPlayer()->GetVar3(); }
526  // See TSelectorDraw::GetVar
527  TTreeFormula *GetVar4() { return GetPlayer()->GetVar4(); }
528  // See TSelectorDraw::GetVal
529  virtual Double_t *GetVal(Int_t i) { return GetPlayer()->GetVal(i); }
530  // See TSelectorDraw::GetVal
531  virtual Double_t *GetV1() { return GetPlayer()->GetV1(); }
532  // See TSelectorDraw::GetVal
533  virtual Double_t *GetV2() { return GetPlayer()->GetV2(); }
534  // See TSelectorDraw::GetVal
535  virtual Double_t *GetV3() { return GetPlayer()->GetV3(); }
536  // See TSelectorDraw::GetVal
537  virtual Double_t *GetV4() { return GetPlayer()->GetV4(); }
538  virtual Double_t *GetW() { return GetPlayer()->GetW(); }
539  virtual Double_t GetWeight() const { return fWeight; }
540  virtual Long64_t GetZipBytes() const { return fZipBytes; }
541  virtual void IncrementTotalBuffers(Int_t nbytes) { fTotalBuffers += nbytes; }
542  Bool_t IsFolder() const { return kTRUE; }
543  virtual Int_t LoadBaskets(Long64_t maxmemory = 2000000000);
544  virtual Long64_t LoadTree(Long64_t entry);
545  virtual Long64_t LoadTreeFriend(Long64_t entry, TTree* T);
546  virtual Int_t MakeClass(const char* classname = 0, Option_t* option = "");
547  virtual Int_t MakeCode(const char* filename = 0);
548  virtual Int_t MakeProxy(const char* classname, const char* macrofilename = 0, const char* cutfilename = 0, const char* option = 0, Int_t maxUnrolling = 3);
549  virtual Int_t MakeSelector(const char* selector = 0, Option_t* option = "");
550  Bool_t MemoryFull(Int_t nbytes);
551  virtual Long64_t Merge(TCollection* list, Option_t* option = "");
552  virtual Long64_t Merge(TCollection* list, TFileMergeInfo *info);
553  static TTree *MergeTrees(TList* list, Option_t* option = "");
554  virtual Bool_t Notify();
555  virtual void OptimizeBaskets(ULong64_t maxMemory=10000000, Float_t minComp=1.1, Option_t *option="");
556  TPrincipal *Principal(const char* varexp = "", const char* selection = "", Option_t* option = "np", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0);
557  virtual void Print(Option_t* option = "") const; // *MENU*
558  virtual void PrintCacheStats(Option_t* option = "") const;
559  virtual Long64_t Process(const char* filename, Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0); // *MENU*
560  virtual Long64_t Process(TSelector* selector, Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0);
561  virtual Long64_t Project(const char* hname, const char* varexp, const char* selection = "", Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0);
562  virtual TSQLResult *Query(const char* varexp = "", const char* selection = "", Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0);
563  virtual Long64_t ReadFile(const char* filename, const char* branchDescriptor = "", char delimiter = ' ');
564  virtual Long64_t ReadStream(std::istream& inputStream, const char* branchDescriptor = "", char delimiter = ' ');
565  virtual void Refresh();
566  virtual void RegisterExternalFriend(TFriendElement *);
567  virtual void RemoveExternalFriend(TFriendElement *);
568  virtual void RemoveFriend(TTree*);
569  virtual void RecursiveRemove(TObject *obj);
570  virtual void Reset(Option_t* option = "");
571  virtual void ResetAfterMerge(TFileMergeInfo *);
572  virtual void ResetBranchAddress(TBranch *);
573  virtual void ResetBranchAddresses();
574  virtual Long64_t Scan(const char* varexp = "", const char* selection = "", Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0); // *MENU*
575  virtual Bool_t SetAlias(const char* aliasName, const char* aliasFormula);
576  virtual void SetAutoSave(Long64_t autos = -300000000);
577  virtual void SetAutoFlush(Long64_t autof = -30000000);
578  virtual void SetBasketSize(const char* bname, Int_t buffsize = 16000);
579  virtual Int_t SetBranchAddress(const char *bname,void *add, TBranch **ptr = 0);
580  virtual Int_t SetBranchAddress(const char *bname,void *add, TClass *realClass, EDataType datatype, Bool_t isptr);
581  virtual Int_t SetBranchAddress(const char *bname,void *add, TBranch **ptr, TClass *realClass, EDataType datatype, Bool_t isptr);
582  template <class T> Int_t SetBranchAddress(const char *bname, T **add, TBranch **ptr = 0) {
583  TClass *cl = TClass::GetClass<T>();
585  if (cl==0) type = TDataType::GetType(typeid(T));
586  return SetBranchAddress(bname,add,ptr,cl,type,true);
587  }
588 #ifndef R__NO_CLASS_TEMPLATE_SPECIALIZATION
589  // This can only be used when the template overload resolution can distinguish between
590  // T* and T**
591  template <class T> Int_t SetBranchAddress(const char *bname, T *add, TBranch **ptr = 0) {
592  TClass *cl = TClass::GetClass<T>();
594  if (cl==0) type = TDataType::GetType(typeid(T));
595  return SetBranchAddress(bname,add,ptr,cl,type,false);
596  }
597 #endif
598  virtual void SetBranchStatus(const char* bname, Bool_t status = 1, UInt_t* found = 0);
599  static void SetBranchStyle(Int_t style = 1); //style=0 for old branch, =1 for new branch style
600  virtual Int_t SetCacheSize(Long64_t cachesize = -1);
602  virtual void SetCacheLearnEntries(Int_t n=10);
603  virtual void SetChainOffset(Long64_t offset = 0) { fChainOffset=offset; }
604  virtual void SetCircular(Long64_t maxEntries);
605  virtual void SetClusterPrefetch(Bool_t enabled) { fCacheDoClusterPrefetch = enabled; }
606  virtual void SetDebug(Int_t level = 1, Long64_t min = 0, Long64_t max = 9999999); // *MENU*
607  virtual void SetDefaultEntryOffsetLen(Int_t newdefault, Bool_t updateExisting = kFALSE);
608  virtual void SetDirectory(TDirectory* dir);
609  virtual Long64_t SetEntries(Long64_t n = -1);
610  virtual void SetEstimate(Long64_t nentries = 1000000);
612  virtual void SetFileNumber(Int_t number = 0);
613  virtual void SetEventList(TEventList* list);
614  virtual void SetEntryList(TEntryList* list, Option_t *opt="");
615  virtual void SetImplicitMT(Bool_t enabled) { fIMTEnabled = enabled; }
616  virtual void SetMakeClass(Int_t make);
617  virtual void SetMaxEntryLoop(Long64_t maxev = kMaxEntries) { fMaxEntryLoop = maxev; } // *MENU*
618  static void SetMaxTreeSize(Long64_t maxsize = 100000000000LL);
619  virtual void SetMaxVirtualSize(Long64_t size = 0) { fMaxVirtualSize = size; } // *MENU*
620  virtual void SetName(const char* name); // *MENU*
621 
622  /**
623  * @brief Sets the address of the object to be notified when the tree is loaded.
624  *
625  * The method TObject::Notify is called for the given object when the tree
626  * is loaded. Specifically this occurs in the TTree::LoadTree method. To
627  * remove the notification call this method with nullptr:
628  * @code tree->SetNotify(nullptr); @endcode
629  *
630  * @param[in] obj Pointer to a TObject to be notified.
631  */
632  virtual void SetNotify(TObject* obj) { fNotify = obj; }
633 
634  virtual void SetObject(const char* name, const char* title);
635  virtual void SetParallelUnzip(Bool_t opt=kTRUE, Float_t RelSize=-1);
636  virtual void SetPerfStats(TVirtualPerfStats* perf);
637  virtual void SetScanField(Int_t n = 50) { fScanField = n; } // *MENU*
639  virtual void SetTimerInterval(Int_t msec = 333) { fTimerInterval=msec; }
640  virtual void SetTreeIndex(TVirtualIndex* index);
641  virtual void SetWeight(Double_t w = 1, Option_t* option = "");
642  virtual void SetUpdate(Int_t freq = 0) { fUpdate = freq; }
643  virtual void Show(Long64_t entry = -1, Int_t lenmax = 20);
644  virtual void StartViewer(); // *MENU*
645  virtual Int_t StopCacheLearningPhase();
646  virtual Int_t UnbinnedFit(const char* funcname, const char* varexp, const char* selection = "", Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0);
647  void UseCurrentStyle();
648  virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0);
649  virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0) const;
650 
651  ClassDef(TTree, 20) // Tree descriptor (the main ROOT I/O class)
652 };
653 
654 //////////////////////////////////////////////////////////////////////////
655 // //
656 // TTreeFriendLeafIter //
657 // //
658 // Iterator on all the leaves in a TTree and its friend //
659 // //
660 //////////////////////////////////////////////////////////////////////////
661 
663 
664 protected:
665  TTree *fTree; ///< tree being iterated
666  TIterator *fLeafIter; ///< current leaf sub-iterator.
667  TIterator *fTreeIter; ///< current tree sub-iterator.
668  Bool_t fDirection; ///< iteration direction
669 
671  fDirection(0) { }
672 
673 public:
674  TTreeFriendLeafIter(const TTree* t, Bool_t dir = kIterForward);
677  TIterator &operator=(const TIterator &rhs);
679 
680  const TCollection *GetCollection() const { return 0; }
681  Option_t *GetOption() const;
682  TObject *Next();
684  Bool_t operator !=(const TIterator&) const {
685  // TODO: Implement me
686  return false;
687  }
689  // TODO: Implement me
690  return false;
691  }
692  TObject *operator*() const {
693  // TODO: Implement me
694  return nullptr;
695  }
696  ClassDef(TTreeFriendLeafIter,0) //Linked list iterator
697  };
698 
699 
700 #endif
TTree::Project
virtual Long64_t Project(const char *hname, const char *varexp, const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Make a projection of a tree using selections.
Definition: TTree.cxx:7369
TTree::kLoadTree
@ kLoadTree
Definition: TTree.h:217
TTree::OptimizeBaskets
virtual void OptimizeBaskets(ULong64_t maxMemory=10000000, Float_t minComp=1.1, Option_t *option="")
This function may be called after having filled some entries in a Tree.
Definition: TTree.cxx:6928
TVirtualTreePlayer::GetSelect
virtual TTreeFormula * GetSelect() const =0
TTree::kMissingCompiledCollectionProxy
@ kMissingCompiledCollectionProxy
Definition: TTree.h:231
ROOT::Math::rowOffsetsUtils::make
constexpr std::array< decltype(std::declval< F >)(std::declval< int >))), N > make(F f)
Definition: MatrixRepresentationsStatic.h:185
TTree::MemoryFull
Bool_t MemoryFull(Int_t nbytes)
Check if adding nbytes to memory we are still below MaxVirtualsize.
Definition: TTree.cxx:6730
TTree::GetLeafImpl
virtual TLeaf * GetLeafImpl(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...
Definition: TTree.cxx:5998
TTreeFriendLeafIter::fTreeIter
TIterator * fTreeIter
current tree sub-iterator.
Definition: TTree.h:667
Compression.h
n
const Int_t n
Definition: legend1.C:16
TTree::GetScanField
virtual Int_t GetScanField() const
Definition: TTree.h:506
TTree::GetEntriesFriend
virtual Long64_t GetEntriesFriend() const
Return pointer to the 1st Leaf named name in any Branch of this Tree or any branch in the list of fri...
Definition: TTree.cxx:5411
TFileMergeInfo
Definition: TFileMergeInfo.h:42
TTree::Reset
virtual void Reset(Option_t *option="")
Reset baskets, buffers and entries count in all branches and leaves.
Definition: TTree.cxx:7865
TTree::kInternalError
@ kInternalError
Definition: TTree.h:230
TTreeFriendLeafIter::operator*
TObject * operator*() const
Return current object or nullptr.
Definition: TTree.h:692
TTree::PrintCacheStats
virtual void PrintCacheStats(Option_t *option="") const
Print statistics about the TreeCache for this tree.
Definition: TTree.cxx:7241
TTree::TClusterIterator::fStartEntry
Long64_t fStartEntry
Definition: TTree.h:270
TTreeFriendLeafIter::TTreeFriendLeafIter
TTreeFriendLeafIter()
Definition: TTree.h:670
TTree::fSavedBytes
Long64_t fSavedBytes
Number of autosaved bytes.
Definition: TTree.h:88
TTree::kClassMismatch
@ kClassMismatch
Definition: TTree.h:233
TTree::AutoSave
virtual Long64_t AutoSave(Option_t *option="")
AutoSave tree header every fAutoSave bytes.
Definition: TTree.cxx:1478
first
Definition: first.py:1
TCut
Definition: TCut.h:25
TTree::fTreeIndex
TVirtualIndex * fTreeIndex
Pointer to the tree Index (if any)
Definition: TTree.h:126
TTree::TClusterIterator::operator()
Long64_t operator()()
Definition: TTree.h:307
TTree::GetV4
virtual Double_t * GetV4()
Definition: TTree.h:537
TTree::GetListOfAliases
virtual TList * GetListOfAliases() const
Definition: TTree.h:486
TTree::Branch
TBranch * Branch(const char *name, const char *classname, T **addobj, Int_t bufsize=32000, Int_t splitlevel=99)
Definition: TTree.h:396
TBrowser
Definition: TBrowser.h:37
TTree::LoadBaskets
virtual Int_t LoadBaskets(Long64_t maxmemory=2000000000)
Read in memory all baskets from all branches up to the limit of maxmemory bytes.
Definition: TTree.cxx:6344
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TTree::SetParallelUnzip
virtual void SetParallelUnzip(Bool_t opt=kTRUE, Float_t RelSize=-1)
Enable or disable parallel unzipping of Tree buffers.
Definition: TTree.cxx:9080
TTree::TClusterIterator::GetStartEntry
Long64_t GetStartEntry()
Definition: TTree.h:298
tt
auto * tt
Definition: textangle.C:16
TTree::FindBranch
virtual TBranch * FindBranch(const char *name)
Return the branch that correspond to the path 'branchname', which can include the name of the tree or...
Definition: TTree.cxx:4763
TTree::Browse
virtual void Browse(TBrowser *)
Browse content of the TTree.
Definition: TTree.cxx:2584
TVirtualTreePlayer::GetVar
virtual TTreeFormula * GetVar(Int_t) const =0
TTree::TClusterIterator::Previous
Long64_t Previous()
Move on to the previous cluster and return the starting entry of this previous cluster.
Definition: TTree.cxx:681
TEventList
Definition: TEventList.h:31
TTree::MergeTrees
static TTree * MergeTrees(TList *list, Option_t *option="")
Static function merging the trees in the TList into a new tree.
Definition: TTree.cxx:6744
TObjArray
Definition: TObjArray.h:37
TSelector
Definition: TSelector.h:31
TDirectory.h
TTree::Branch
TBranch * Branch(const char *name, T **addobj, Int_t bufsize=32000, Int_t splitlevel=99)
Add a new branch, and infer the data type from the array addobj being passed.
Definition: TTree.h:366
TChainIndex
Definition: TChainIndex.h:40
TTree::GetPacketSize
virtual Int_t GetPacketSize() const
Definition: TTree.h:500
TTree::CopyTree
virtual TTree * CopyTree(const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Copy a tree with selection.
Definition: TTree.cxx:3646
TTree::GetLeaf
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...
Definition: TTree.cxx:6088
TTree::SetScanField
virtual void SetScanField(Int_t n=50)
Definition: TTree.h:637
TTree::GetV1
virtual Double_t * GetV1()
Definition: TTree.h:531
TTree::fIOFeatures
TIOFeatures fIOFeatures
IO features to define for newly-written baskets and branches.
Definition: TTree.h:114
TTree::SetBranchAddress
Int_t SetBranchAddress(const char *bname, T *add, TBranch **ptr=0)
Definition: TTree.h:591
TTree::GetPlayer
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
Definition: TTree.cxx:6198
TTree::MakeCode
virtual Int_t MakeCode(const char *filename=0)
Generate a skeleton function for this tree.
Definition: TTree.cxx:6533
TTree::GetListOfFriends
virtual TList * GetListOfFriends() const
Definition: TTree.h:485
TTree::GetVar2
TTreeFormula * GetVar2()
Definition: TTree.h:523
TVirtualIndex
Definition: TVirtualIndex.h:30
TTree::fMakeClass
Int_t fMakeClass
! not zero when processing code generated by MakeClass
Definition: TTree.h:115
TTree::IncrementTotalBuffers
virtual void IncrementTotalBuffers(Int_t nbytes)
Definition: TTree.h:541
TTree::CreateBasket
virtual TBasket * CreateBasket(TBranch *)
Create a basket for this tree and given branch.
Definition: TTree.cxx:3658
TTree::Delete
virtual void Delete(Option_t *option="")
Delete this tree from memory or/and disk.
Definition: TTree.cxx:3674
TTree::FlushBaskets
virtual Int_t FlushBaskets(Bool_t create_cluster=true) const
Write to disk all the basket that have not yet been individually written and create an event cluster ...
Definition: TTree.cxx:5045
TTree::operator=
TTree & operator=(const TTree &tt)=delete
tree
Definition: tree.py:1
TTree::MakeProxy
virtual Int_t MakeProxy(const char *classname, const char *macrofilename=0, const char *cutfilename=0, const char *option=0, Int_t maxUnrolling=3)
Generate a skeleton analysis class for this Tree using TBranchProxy.
Definition: TTree.cxx:6661
TTree::TClusterIterator::TClusterIterator
TClusterIterator(TTree *tree, Long64_t firstEntry)
Regular constructor.
Definition: TTree.cxx:547
TTreeFriendLeafIter
Definition: TTree.h:662
TTree::kFindBranch
@ kFindBranch
Definition: TTree.h:208
TTree::GetFriend
virtual TTree * GetFriend(const char *) const
Return a pointer to the TTree friend whose name or alias is friendname.
Definition: TTree.cxx:5875
TTree::Notify
virtual Bool_t Notify()
Function called when loading a new class library.
Definition: TTree.cxx:6904
TTree::fAliases
TList * fAliases
List of aliases for expressions based on the tree branches.
Definition: TTree.h:121
TDataType::GetType
Int_t GetType() const
Definition: TDataType.h:68
TTree::kGetFriend
@ kGetFriend
Definition: TTree.h:214
TVirtualTreePlayer.h
TTree::fTransientBuffer
TBuffer * fTransientBuffer
! Pointer to the current transient buffer.
Definition: TTree.h:135
TTree::GetReadCache
TTreeCache * GetReadCache(TFile *file) const
Find and return the TTreeCache registered with the file and which may contain branches for us.
Definition: TTree.cxx:6211
TTree::GetClusterPrefetch
virtual Bool_t GetClusterPrefetch() const
Definition: TTree.h:452
TBranch.h
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:890
TTree::GetListOfClones
virtual TList * GetListOfClones()
Definition: TTree.h:482
TTree::BuildStreamerInfo
TStreamerInfo * BuildStreamerInfo(TClass *cl, void *pointer=0, Bool_t canOptimize=kTRUE)
Build StreamerInfo for class cl.
Definition: TTree.cxx:2627
TTree::CloneTree
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
Definition: TTree.cxx:3089
TTree::GetMakeClass
Int_t GetMakeClass() const
Definition: TTree.h:490
TTree::GetEntryList
virtual TEntryList * GetEntryList()
Returns the entry list assigned to this tree.
Definition: TTree.cxx:5754
TTree
Definition: TTree.h:79
TTree::SetBranchAddress
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
Definition: TTree.cxx:8205
TTree::fNfill
Int_t fNfill
! Local for EntryLoop
Definition: TTree.h:110
TTree::KeepCircular
virtual void KeepCircular()
Keep a maximum of fMaxEntries in memory.
Definition: TTree.cxx:6308
TVirtualTreePlayer::GetVar2
virtual TTreeFormula * GetVar2() const =0
TVirtualTreePlayer::GetVar4
virtual TTreeFormula * GetVar4() const =0
TTree::SetMaxVirtualSize
virtual void SetMaxVirtualSize(Long64_t size=0)
Definition: TTree.h:619
TTree::SetTreeIndex
virtual void SetTreeIndex(TVirtualIndex *index)
The current TreeIndex is replaced by the new index.
Definition: TTree.cxx:9135
TAttMarker.h
TTree::BranchImpRef
virtual TBranch * BranchImpRef(const char *branchname, const char *classname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel)
Same as TTree::Branch but automatic detection of the class name.
Definition: TTree.cxx:1613
Float_t
float Float_t
Definition: RtypesCore.h:57
TTree::BuildIndex
virtual Int_t BuildIndex(const char *majorname, const char *minorname="0")
Build a Tree Index (default is TTreeIndex).
Definition: TTree.cxx:2612
TTree::kVoidPtr
@ kVoidPtr
Definition: TTree.h:238
TTree::Show
virtual void Show(Long64_t entry=-1, Int_t lenmax=20)
Print values of all active leaves for entry.
Definition: TTree.cxx:9174
TVirtualTreePlayer::GetV4
virtual Double_t * GetV4() const =0
Int_t
int Int_t
Definition: RtypesCore.h:45
TTree::ReadStream
virtual Long64_t ReadStream(std::istream &inputStream, const char *branchDescriptor="", char delimiter=' ')
Create or simply read branches from an input stream.
Definition: TTree.cxx:7481
TTree::GetClusterIterator
virtual TClusterIterator GetClusterIterator(Long64_t firstentry)
Return an iterator over the cluster of baskets starting at firstentry.
Definition: TTree.cxx:5366
TVirtualPerfStats
Definition: TVirtualPerfStats.h:31
TTree::MakeClass
virtual Int_t MakeClass(const char *classname=0, Option_t *option="")
Generate a skeleton analysis class for this tree.
Definition: TTree.cxx:6500
TArrayI::fArray
Int_t * fArray
Definition: TArrayI.h:36
N
#define N
TTree::TClusterIterator::fEstimatedSize
Long64_t fEstimatedSize
Definition: TTree.h:272
TTree::SetFileNumber
virtual void SetFileNumber(Int_t number=0)
Set fFileNumber to number.
Definition: TTree.cxx:8968
TTree::kFindLeaf
@ kFindLeaf
Definition: TTree.h:209
TTree::AddZipBytes
virtual void AddZipBytes(Int_t zip)
Definition: TTree.h:328
TTree::GetMaxTreeSize
static Long64_t GetMaxTreeSize()
Static function which returns the tree file size limit in bytes.
Definition: TTree.cxx:6158
SafeDelete
#define SafeDelete(p)
Definition: RConfig.hxx:543
TTree::GetNotify
TObject * GetNotify() const
Definition: TTree.h:498
TTree::fFlushedBytes
Long64_t fFlushedBytes
Number of auto-flushed bytes.
Definition: TTree.h:89
TTree::TTree
TTree()
Default constructor and I/O constructor.
Definition: TTree.cxx:724
TClass.h
TIOFeatures.hxx
TTree::GetMaxEntryLoop
virtual Long64_t GetMaxEntryLoop() const
Definition: TTree.h:492
TList.h
TTree::GetEntriesFast
virtual Long64_t GetEntriesFast() const
Definition: TTree.h:460
TTree::Print
virtual void Print(Option_t *option="") const
Print a summary of the tree contents.
Definition: TTree.cxx:7090
nentries
int nentries
Definition: THbookFile.cxx:91
TFriendElement
Definition: TFriendElement.h:33
TTreeFriendLeafIter::GetOption
Option_t * GetOption() const
Returns the object option stored in the list.
Definition: TTree.cxx:9664
TTree::fScanField
Int_t fScanField
Number of runs before prompting in Scan.
Definition: TTree.h:92
TTree::RemoveFriend
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
Definition: TTree.cxx:7839
TVirtualTreePlayer::GetHistogram
virtual TH1 * GetHistogram() const =0
TBuffer
Definition: TBuffer.h:43
TTree::GetUserInfo
virtual TList * GetUserInfo()
Return a pointer to the list containing user objects associated to this tree.
Definition: TTree.cxx:6249
TTree::SetCacheLearnEntries
virtual void SetCacheLearnEntries(Int_t n=10)
Interface to TTreeCache to set the number of entries for the learning phase.
Definition: TTree.cxx:8680
TTree::GetVar
TTreeFormula * GetVar(Int_t i)
Definition: TTree.h:519
TTree::SetMaxEntryLoop
virtual void SetMaxEntryLoop(Long64_t maxev=kMaxEntries)
Definition: TTree.h:617
TTree::Fill
virtual Int_t Fill()
Fill all branches.
Definition: TTree.cxx:4527
ROOT::TIOFeatures
Definition: TIOFeatures.hxx:69
TTree::kEntriesReshuffled
@ kEntriesReshuffled
If set, signals that this TTree is the output of the processing of another TTree, and the entries are...
Definition: TTree.h:257
TTree::fIndexValues
TArrayD fIndexValues
Sorted index values.
Definition: TTree.h:124
TTree::fTargetMemoryRatio
Float_t fTargetMemoryRatio
! Ratio for memory usage in uncompressed buffers versus actual occupancy.
Definition: TTree.h:143
TTree::GetEntryNumberWithBestIndex
virtual Long64_t GetEntryNumberWithBestIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
Definition: TTree.cxx:5790
TTree::fMaxEntryLoop
Long64_t fMaxEntryLoop
Maximum number of entries to process.
Definition: TTree.h:98
TTree::UseCurrentStyle
void UseCurrentStyle()
Replace current attributes by current style.
Definition: TTree.cxx:9526
TTree::fMaxClusterRange
Int_t fMaxClusterRange
! Memory allocated for the cluster range.
Definition: TTree.h:96
TTree::BranchOld
virtual TBranch * BranchOld(const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=1)
Create a new TTree BranchObject.
Definition: TTree.cxx:2049
TTree::SetBranchAddress
Int_t SetBranchAddress(const char *bname, T **add, TBranch **ptr=0)
Definition: TTree.h:582
TTree::GetSelect
TTreeFormula * GetSelect()
Definition: TTree.h:507
TTree::GetAutoFlush
virtual Long64_t GetAutoFlush() const
Definition: TTree.h:442
TTree::fDirectory
TDirectory * fDirectory
! Pointer to directory holding this tree
Definition: TTree.h:118
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TTree::fClusterRangeEnd
Long64_t * fClusterRangeEnd
[fNClusterRange] Last entry of a cluster range.
Definition: TTree.h:103
TTree::Refresh
virtual void Refresh()
Refresh contents of this tree and its branches from the current status on disk.
Definition: TTree.cxx:7778
TTree::GetDebugMin
Long64_t GetDebugMin() const
Definition: TTree.h:456
TTree::SetAutoSave
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 ...
Definition: TTree.cxx:8162
TTree::GetMinimum
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
Definition: TTree.cxx:6168
TTree::kRemoveFriend
@ kRemoveFriend
Definition: TTree.h:219
TTree::fNClusterRange
Int_t fNClusterRange
Number of Cluster range in addition to the one defined by 'AutoFlush'.
Definition: TTree.h:95
TTree::GetEntry
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
Definition: TTree.cxx:5537
TTree::GetEntryNumber
virtual Long64_t GetEntryNumber(Long64_t entry) const
Return entry number corresponding to entry.
Definition: TTree.cxx:5765
TTree::fTimerInterval
Int_t fTimerInterval
Timer interval in milliseconds.
Definition: TTree.h:91
TTree::GetChainOffset
virtual Long64_t GetChainOffset() const
Definition: TTree.h:451
TTree::fIMTFlush
Bool_t fIMTFlush
! True if we are doing a multithreaded flush.
Definition: TTree.h:156
bool
TIterator
Definition: TIterator.h:30
TTree::Write
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition: TTree.cxx:9563
TTree::fNEntriesSinceSorting
UInt_t fNEntriesSinceSorting
! Number of entries processed since the last re-sorting of branches
Definition: TTree.h:140
TTree::SetEstimate
virtual void SetEstimate(Long64_t nentries=1000000)
Set number of entries to estimate variable limits.
Definition: TTree.cxx:8925
TSQLResult
Definition: TSQLResult.h:32
TTree::Branch
TBranch * Branch(const char *name, Long_t address, const char *leaflist, Int_t bufsize=32000)
Definition: TTree.h:380
TTree::GetCacheSize
virtual Long64_t GetCacheSize() const
Definition: TTree.h:448
TTree::fCacheDoClusterPrefetch
Bool_t fCacheDoClusterPrefetch
! true if cache is prefetching whole clusters
Definition: TTree.h:137
TTree::GetMaximum
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
Definition: TTree.cxx:6128
TTree::GetListOfBranches
virtual TObjArray * GetListOfBranches()
Definition: TTree.h:483
TTree::fPlayer
TVirtualTreePlayer * fPlayer
! Pointer to current Tree player
Definition: TTree.h:131
TTree::ESetBranchAddressStatus
ESetBranchAddressStatus
Definition: TTree.h:228
TTree::SetMaxTreeSize
static void SetMaxTreeSize(Long64_t maxsize=100000000000LL)
Set the maximum size in bytes of a Tree file (static function).
Definition: TTree.cxx:9012
TTree::fChainOffset
Long64_t fChainOffset
! Offset of 1st entry of this Tree in a TChain
Definition: TTree.h:106
TVirtualTreePlayer::GetVar1
virtual TTreeFormula * GetVar1() const =0
TTree::GetTargetMemoryRatio
Float_t GetTargetMemoryRatio() const
Definition: TTree.h:515
TTree::ImportClusterRanges
void ImportClusterRanges(TTree *fromtree)
Appends the cluster range information stored in 'fromtree' to this tree, including the value of fAuto...
Definition: TTree.cxx:6265
TTree::GetSelectedRows
virtual Long64_t GetSelectedRows()
Definition: TTree.h:508
kIterForward
const Bool_t kIterForward
Definition: TCollection.h:40
TTree::kMatchConversionCollection
@ kMatchConversionCollection
Definition: TTree.h:236
TAttLine.h
TTree::GetTree
virtual TTree * GetTree() const
Definition: TTree.h:512
TTree::GetAlias
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
Definition: TTree.cxx:5142
TTree::SetEventList
virtual void SetEventList(TEventList *list)
This function transfroms the given TEventList into a TEntryList The new TEntryList is owned by the TT...
Definition: TTree.cxx:8884
style
TCanvas * style()
Definition: style.C:1
TTree::Query
virtual TSQLResult * Query(const char *varexp="", const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Loop over entries and return a TSQLResult object containing entries following selection.
Definition: TTree.cxx:7384
TTree::fCacheUserSet
Bool_t fCacheUserSet
! true if the cache setting was explicitly given by user
Definition: TTree.h:138
TBranch
Definition: TBranch.h:89
TTree::fUserInfo
TList * fUserInfo
pointer to a list of user objects associated to this Tree
Definition: TTree.h:130
TTree::GetBranch
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
Definition: TTree.cxx:5210
TTree::GetBranchStyle
static Int_t GetBranchStyle()
Static function returning the current branch style.
Definition: TTree.cxx:5304
TTree::GetNbranches
virtual Int_t GetNbranches()
Definition: TTree.h:497
TTree::ELockStatusBits
ELockStatusBits
Definition: TTree.h:207
TTree::TClusterIterator::fTree
TTree * fTree
Definition: TTree.h:268
TTree::GetCurrentFile
TFile * GetCurrentFile() const
Return pointer to the current file.
Definition: TTree.cxx:5378
TTree::GetFileNumber
virtual Int_t GetFileNumber() const
Definition: TTree.h:471
TTree::TClusterIterator::fClusterRange
Int_t fClusterRange
Definition: TTree.h:269
TDataType.h
TTree::GetVar3
TTreeFormula * GetVar3()
Definition: TTree.h:525
TTree::fFriendLockStatus
UInt_t fFriendLockStatus
! Record which method is locking the friend recursion
Definition: TTree.h:134
TTree::DirectoryAutoAdd
virtual void DirectoryAutoAdd(TDirectory *)
Called by TKey and TObject::Clone to automatically add us to a directory when we are read from a file...
Definition: TTree.cxx:3746
TTree::fIndex
TArrayI fIndex
Index of sorted values.
Definition: TTree.h:125
TTree::fEntryList
TEntryList * fEntryList
! Pointer to event selection list (if one)
Definition: TTree.h:123
TTree::SetTargetMemoryRatio
void SetTargetMemoryRatio(Float_t ratio)
Definition: TTree.h:638
TArrayD.h
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TTree::AddFriend
virtual TFriendElement * AddFriend(const char *treename, const char *filename="")
Add a TFriendElement to the list of friends.
Definition: TTree.cxx:1310
TTree::GetWeight
virtual Double_t GetWeight() const
Definition: TTree.h:539
TTree::Merge
virtual Long64_t Merge(TCollection *list, Option_t *option="")
Merge the trees in the TList into this tree.
Definition: TTree.cxx:6787
TTree::StartViewer
virtual void StartViewer()
Start the TTreeViewer on this tree.
Definition: TTree.cxx:9248
TTreeFriendLeafIter::fLeafIter
TIterator * fLeafIter
current leaf sub-iterator.
Definition: TTree.h:666
TAttFill.h
TTreeFriendLeafIter::operator=
TIterator & operator=(const TIterator &rhs)
Overridden assignment operator. Does NOT copy the 'cursor' location!
Definition: TTree.cxx:9602
TTree::GetEntryWithIndex
virtual Int_t GetEntryWithIndex(Int_t major, Int_t minor=0)
Read entry corresponding to major and minor number.
Definition: TTree.cxx:5827
TAttLine
Definition: TAttLine.h:18
TTree::fEventList
TEventList * fEventList
! Pointer to event selection list (if one)
Definition: TTree.h:122
TTree::kCircular
@ kCircular
Definition: TTree.h:248
TTree::MarkEventCluster
void MarkEventCluster()
Mark the previous event as being at the end of the event cluster.
Definition: TTree.cxx:8115
TTree::GetV2
virtual Double_t * GetV2()
Definition: TTree.h:533
TTree::fIMTZipBytes
std::atomic< Long64_t > fIMTZipBytes
! Zip bytes for the IMT flush baskets.
Definition: TTree.h:158
TTree::fPerfStats
TVirtualPerfStats * fPerfStats
! pointer to the current perf stats object
Definition: TTree.h:129
TTree::fZipBytes
Long64_t fZipBytes
Total number of bytes in all branches after compression.
Definition: TTree.h:87
TTree::SetAutoFlush
virtual void SetAutoFlush(Long64_t autof=-30000000)
This function may be called at the start of a program to change the default value for fAutoFlush.
Definition: TTree.cxx:8053
TStreamerInfo
Definition: TStreamerInfo.h:44
TTree::GetIndex
virtual Int_t * GetIndex()
Definition: TTree.h:476
TTree::CopyEntries
virtual Long64_t CopyEntries(TTree *tree, Long64_t nentries=-1, Option_t *option="")
Copy nentries from given tree to this tree.
Definition: TTree.cxx:3477
TTree::GetReadEvent
virtual Long64_t GetReadEvent() const
Definition: TTree.h:505
TTree::RegisterExternalFriend
virtual void RegisterExternalFriend(TFriendElement *)
Record a TFriendElement that we need to warn when the chain switches to a new file (typically this is...
Definition: TTree.cxx:7819
TTree::fAutoSave
Long64_t fAutoSave
Autosave tree when fAutoSave entries written or -fAutoSave (compressed) bytes produced.
Definition: TTree.h:100
TTree::kPrint
@ kPrint
Definition: TTree.h:218
TTree::fAllocationCount
std::atomic< UInt_t > fAllocationCount
indicates basket should be resized to exact memory usage, but causes significant
Definition: TTree.h:149
TLeaf
Definition: TLeaf.h:57
TTree::BranchImp
virtual TBranch * BranchImp(const char *branchname, const char *classname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel)
Same as TTree::Branch() with added check that addobj matches className.
Definition: TTree.cxx:1532
TTree::SetObject
virtual void SetObject(const char *name, const char *title)
Change the name and title of this tree.
Definition: TTree.cxx:9049
TTree::Process
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.
Definition: TTree.cxx:7321
TTree::Branch
TBranch * Branch(const char *name, T *obj, Int_t bufsize=32000, Int_t splitlevel=99)
Add a new branch, and infer the data type from the type of obj being passed.
Definition: TTree.h:349
TTree::GetReadEntry
virtual Long64_t GetReadEntry() const
Definition: TTree.h:504
TTree::TClusterIterator::GetNextEntry
Long64_t GetNextEntry()
Definition: TTree.h:303
TTree::LoadTree
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
Definition: TTree.cxx:6366
TTree::kGetEntryWithIndex
@ kGetEntryWithIndex
Definition: TTree.h:213
TTree::fCacheDoAutoInit
Bool_t fCacheDoAutoInit
! true if cache auto creation or resize check is needed
Definition: TTree.h:136
TTreeCloner
Definition: TTreeCloner.h:29
TTree::kForceRead
@ kForceRead
Definition: TTree.h:247
TObjArray::GetEntriesFast
Int_t GetEntriesFast() const
Definition: TObjArray.h:64
TTree::GetTimerInterval
virtual Int_t GetTimerInterval() const
Definition: TTree.h:509
TTree::fBranches
TObjArray fBranches
List of Branches.
Definition: TTree.h:119
TTree::SetNotify
virtual void SetNotify(TObject *obj)
Sets the address of the object to be notified when the tree is loaded.
Definition: TTree.h:632
TTree::UnbinnedFit
virtual Int_t UnbinnedFit(const char *funcname, const char *varexp, const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Unbinned fit of one or more variable(s) from a tree.
Definition: TTree.cxx:9514
TTree::GetPerfStats
virtual TVirtualPerfStats * GetPerfStats() const
Definition: TTree.h:501
TTree::TTreeBranchImpRef
friend TBranch * TTreeBranchImpRef(TTree *tree, const char *branchname, TClass *ptrClass, EDataType datatype, void *addobj, Int_t bufsize, Int_t splitlevel)
TNamed
Definition: TNamed.h:29
TTree::fLeaves
TObjArray fLeaves
Direct pointers to individual branch leaves.
Definition: TTree.h:120
TTree::fBranchRef
TBranchRef * fBranchRef
Branch supporting the TRefTable (if any)
Definition: TTree.h:133
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TTree::LoadTreeFriend
virtual Long64_t LoadTreeFriend(Long64_t entry, TTree *T)
Load entry on behalf of our master tree, we may use an index.
Definition: TTree.cxx:6450
TTree::TFriendLock::fMethodBit
UInt_t fMethodBit
Definition: TTree.h:188
TVirtualTreePlayer
Definition: TVirtualTreePlayer.h:38
TTree::SetEntryList
virtual void SetEntryList(TEntryList *list, Option_t *opt="")
Set an EntryList.
Definition: TTree.cxx:8861
TTree::GetEstimate
virtual Long64_t GetEstimate() const
Definition: TTree.h:462
TPrincipal
Definition: TPrincipal.h:21
Long_t
long Long_t
Definition: RtypesCore.h:54
TTree::kSetBranchStatus
@ kSetBranchStatus
Definition: TTree.h:220
TTree::GetBranchRef
virtual TBranchRef * GetBranchRef() const
Definition: TTree.h:445
TTree::Scan
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.
Definition: TTree.cxx:7956
TTree::SortBranchesByTime
void SortBranchesByTime()
Sorts top-level branches by the last average task time recorded per branch.
Definition: TTree.cxx:5734
gDirectory
#define gDirectory
Definition: TDirectory.h:236
TAttMarker
Definition: TAttMarker.h:19
TTreeFormula
Definition: TTreeFormula.h:58
TTree::Draw
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
Definition: TTree.h:427
TArrayI.h
BIT
#define BIT(n)
Definition: Rtypes.h:85
TTree::GetNewlineValue
char GetNewlineValue(std::istream &inputStream)
Determine which newline this file is using.
Definition: TTree.cxx:7454
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TTree::fDebugMax
Long64_t fDebugMax
! Last entry number to debug
Definition: TTree.h:113
TTreeFriendLeafIter::fTree
TTree * fTree
tree being iterated
Definition: TTree.h:665
TTree::fDebug
Int_t fDebug
! Debug level
Definition: TTree.h:111
TTree::fReadEntry
Long64_t fReadEntry
! Number of the entry being processed
Definition: TTree.h:107
TTree::Branch
TBranch * Branch(const char *name, char *address, const char *leaflist, Int_t bufsize=32000)
Definition: TTree.h:375
TTree::GetVar4
TTreeFormula * GetVar4()
Definition: TTree.h:527
TTree::kNoCheck
@ kNoCheck
Definition: TTree.h:239
TTree::~TTree
virtual ~TTree()
Destructor.
Definition: TTree.cxx:907
TTree::SetCacheSizeAux
Int_t SetCacheSizeAux(Bool_t autocache=kTRUE, Long64_t cacheSize=0)
Set the size of the file cache and create it if possible.
Definition: TTree.cxx:8527
TTree::GetTreeNumber
virtual Int_t GetTreeNumber() const
Definition: TTree.h:514
TTree::SetWeight
virtual void SetWeight(Double_t w=1, Option_t *option="")
Set tree weight.
Definition: TTree.cxx:9163
TTree::SetBasketSize
virtual void SetBasketSize(const char *bname, Int_t buffsize=16000)
Set a branch's basket size.
Definition: TTree.cxx:8178
TTree::kGetBranch
@ kGetBranch
Definition: TTree.h:211
TTree::GetHistogram
TH1 * GetHistogram()
Definition: TTree.h:474
TTree::SetAlias
virtual Bool_t SetAlias(const char *aliasName, const char *aliasFormula)
Set a tree variable alias.
Definition: TTree.cxx:7998
TTree::TFriendLock
Definition: TTree.h:184
TTree::fUpdate
Int_t fUpdate
Update frequency for EntryLoop.
Definition: TTree.h:93
TTree::TFriendLock::~TFriendLock
~TFriendLock()
Restore the state of tree the same as before we set the lock.
Definition: TTree.cxx:530
TTree::TClusterIterator::Next
Long64_t Next()
Move on to the next cluster and return the starting entry of this next cluster.
Definition: TTree.cxx:637
TTree::SetDirectory
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
Definition: TTree.cxx:8781
TTree::TClusterIterator::GetEstimatedClusterSize
Long64_t GetEstimatedClusterSize()
Estimate the cluster size.
Definition: TTree.cxx:598
TTree::FindLeaf
virtual TLeaf * FindLeaf(const char *name)
Find leaf..
Definition: TTree.cxx:4835
TFile
Definition: TFile.h:54
TTree::MakeSelector
virtual Int_t MakeSelector(const char *selector=0, Option_t *option="")
Generate skeleton selector class for this tree.
Definition: TTree.cxx:6715
TTree::GetAutoSave
virtual Long64_t GetAutoSave() const
Definition: TTree.h:443
TTree::GetCacheAutoSize
Long64_t GetCacheAutoSize(Bool_t withDefault=kFALSE) const
Used for automatic sizing of the cache.
Definition: TTree.cxx:5316
kOther_t
@ kOther_t
Definition: TDataType.h:38
unsigned int
TTree::Branch
TBranch * Branch(const char *name, int address, const char *leaflist, Int_t bufsize=32000)
Definition: TTree.h:385
TTree::SetPerfStats
virtual void SetPerfStats(TVirtualPerfStats *perf)
Set perf stats.
Definition: TTree.cxx:9118
TTree::fSortedBranches
std::vector< std::pair< Long64_t, TBranch * > > fSortedBranches
! Branches to be processed in parallel when IMT is on, sorted by average task time
Definition: TTree.h:141
TTree::GetDirectory
TDirectory * GetDirectory() const
Definition: TTree.h:457
TVirtualTreePlayer::GetW
virtual Double_t * GetW() const =0
TEntryList
Definition: TEntryList.h:25
TTree::ReadFile
virtual Long64_t ReadFile(const char *filename, const char *branchDescriptor="", char delimiter=' ')
Create or simply read branches from filename.
Definition: TTree.cxx:7435
TTreeFriendLeafIter::fDirection
Bool_t fDirection
iteration direction
Definition: TTree.h:668
TTree::fClusterSize
Long64_t * fClusterSize
[fNClusterRange] Number of entries in each cluster for a given range.
Definition: TTree.h:104
TTree::TClusterIterator
Definition: TTree.h:265
TTree::Bronch
virtual TBranch * Bronch(const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
Create a new TTree BranchElement.
Definition: TTree.cxx:2379
TTree::GetBranchStatus
virtual Bool_t GetBranchStatus(const char *branchname) const
Return status of branch with name branchname.
Definition: TTree.cxx:5289
TTree::kNeedDisableDecomposedObj
@ kNeedDisableDecomposedObj
Definition: TTree.h:241
TTree::fDefaultEntryOffsetLen
Int_t fDefaultEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
Definition: TTree.h:94
TArrayD::fArray
Double_t * fArray
Definition: TArrayD.h:36
TTree::GetEntryNumberWithIndex
virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
Definition: TTree.cxx:5810
TTree::TFriendLock::fTree
TTree * fTree
Definition: TTree.h:187
TTreeIndex
Definition: TTreeIndex.h:29
TTree::SetUpdate
virtual void SetUpdate(Int_t freq=0)
Definition: TTree.h:642
TTree::DropBranchFromCache
virtual Int_t DropBranchFromCache(const char *bname, Bool_t subbranches=kFALSE)
Remove the branch with name 'bname' from the Tree cache.
Definition: TTree.cxx:1121
TTree::GetChainEntryNumber
virtual Long64_t GetChainEntryNumber(Long64_t entry) const
Definition: TTree.h:450
ULong64_t
unsigned long long ULong64_t
Definition: RtypesCore.h:74
TTree::IsFolder
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TTree.h:542
TTree::SetCacheSize
virtual Int_t SetCacheSize(Long64_t cachesize=-1)
Set maximum size of the file cache .
Definition: TTree.cxx:8501
TTree::SetCircular
virtual void SetCircular(Long64_t maxEntries)
Enable/Disable circularity for this tree.
Definition: TTree.cxx:8707
TTree::SetDebug
virtual void SetDebug(Int_t level=1, Long64_t min=0, Long64_t max=9999999)
Set the debug level and the debug range.
Definition: TTree.cxx:8743
TTree::GetTreeIndex
virtual TVirtualIndex * GetTreeIndex() const
Definition: TTree.h:513
TBasket
Definition: TBasket.h:34
TTreeCache
A cache to speed-up the reading of ROOT datasets.
Definition: TTreeCache.h:32
TTree::kGetFriendAlias
@ kGetFriendAlias
Definition: TTree.h:215
TTree::SetTimerInterval
virtual void SetTimerInterval(Int_t msec=333)
Definition: TTree.h:639
TTree::TFriendLock::TFriendLock
TFriendLock(const TFriendLock &)
Copy constructor.
Definition: TTree.cxx:507
TTree::fNotify
TObject * fNotify
! Object to be notified when loading a Tree
Definition: TTree.h:117
TTree::GetVar1
TTreeFormula * GetVar1()
Definition: TTree.h:521
Double_t
double Double_t
Definition: RtypesCore.h:59
TTree::fExternalFriends
TList * fExternalFriends
! List of TFriendsElement pointing to us and need to be notified of LoadTree. Content not owned.
Definition: TTree.h:128
TTree::BranchImpArr
virtual TBranch * BranchImpArr(const char *branchname, EDataType datatype, std::size_t N, void *addobj, Int_t bufsize, Int_t splitlevel)
Definition: TTree.cxx:1709
TTree::Debug
Int_t Debug() const
Definition: TTree.h:425
TTree::DropBaskets
virtual void DropBaskets()
Remove some baskets from memory.
Definition: TTree.cxx:4446
TTreeFriendLeafIter::GetCollection
const TCollection * GetCollection() const
Definition: TTree.h:680
TTree::GetUpdate
virtual Int_t GetUpdate() const
Definition: TTree.h:516
TObjArray.h
TTree::fgMaxTreeSize
static Long64_t fgMaxTreeSize
Maximum size of a file containing a Tree.
Definition: TTree.h:152
TVirtualTreePlayer::kMaxEntries
static constexpr Long64_t kMaxEntries
Definition: TVirtualTreePlayer.h:45
TTree::fEntries
Long64_t fEntries
Number of entries.
Definition: TTree.h:84
TTree::SetEntries
virtual Long64_t SetEntries(Long64_t n=-1)
Change number of entries in the tree.
Definition: TTree.cxx:8826
TTree::ChangeFile
virtual TFile * ChangeFile(TFile *file)
Called by TTree::Fill() when file has reached its maximum fgMaxTreeSize.
Definition: TTree.cxx:2702
TTree::GetW
virtual Double_t * GetW()
Definition: TTree.h:538
TClass
Definition: TClass.h:80
TVirtualTreePlayer::GetV2
virtual Double_t * GetV2() const =0
TTree::kMakeClass
@ kMakeClass
Definition: TTree.h:237
TTree::AddAllocationCount
void AddAllocationCount(UInt_t count)
Definition: TTree.h:333
file
Definition: file.py:1
TTree::kGetLeaf
@ kGetLeaf
Definition: TTree.h:216
TTree::fIMTEnabled
Bool_t fIMTEnabled
! true if implicit multi-threading is enabled for this tree
Definition: TTree.h:139
EDataType
EDataType
Definition: TDataType.h:28
TTreeFriendLeafIter::operator!=
Bool_t operator!=(const TIterator &) const
Compare two iterator objects.
Definition: TTree.h:684
TTree::GetDebugMax
Long64_t GetDebugMax() const
Definition: TTree.h:455
TTree::TClusterIterator::fNextEntry
Long64_t fNextEntry
Definition: TTree.h:271
TTree::AddBranchToCache
virtual Int_t AddBranchToCache(const char *bname, Bool_t subbranches=kFALSE)
Add branch with name bname to the Tree cache.
Definition: TTree.cxx:1038
TTree::GetIOFeatures
ROOT::TIOFeatures GetIOFeatures() const
Returns the current set of IO settings.
Definition: TTree.cxx:5974
TTree::Branch
TBranch * Branch(const char *name, std::array< T, N > *obj, Int_t bufsize=32000, Int_t splitlevel=99)
Definition: TTree.h:401
TTree::ResetBranchAddress
virtual void ResetBranchAddress(TBranch *)
Tell all of our branches to set their addresses to zero.
Definition: TTree.cxx:7927
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TTree::GetZipBytes
virtual Long64_t GetZipBytes() const
Definition: TTree.h:540
TTree::fMaxEntries
Long64_t fMaxEntries
Maximum number of entries in case of circular buffers.
Definition: TTree.h:97
TH1
Definition: TH1.h:57
TTree::AddClone
void AddClone(TTree *)
Add a cloned tree to our list of trees to be notified whenever we change our branch addresses or when...
Definition: TTree.cxx:1198
TTree::RecursiveRemove
virtual void RecursiveRemove(TObject *obj)
Make sure that obj (which is being deleted or will soon be) is no longer referenced by this TTree.
Definition: TTree.cxx:7747
TTree::InitializeBranchLists
void InitializeBranchLists(bool checkLeafCount)
Divides the top-level branches into two vectors: (i) branches to be processed sequentially and (ii) b...
Definition: TTree.cxx:5681
TPolyMarker
Definition: TPolyMarker.h:31
TVirtualTreePlayer::GetVar3
virtual TTreeFormula * GetVar3() const =0
name
char name[80]
Definition: TGX11.cxx:110
TTree::CheckBranchAddressType
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...
Definition: TTree.cxx:2820
TVirtualTreePlayer::GetV1
virtual Double_t * GetV1() const =0
TTree::SetName
virtual void SetName(const char *name)
Change the name of this tree.
Definition: TTree.cxx:9020
TTree::SetClusterPrefetch
virtual void SetClusterPrefetch(Bool_t enabled)
Definition: TTree.h:605
ROOT::Math::Chebyshev::T
double T(double x)
Definition: ChebyshevPol.h:52
TDirectory
Definition: TDirectory.h:40
TTree::fTotalBuffers
std::atomic< Long64_t > fTotalBuffers
! Total number of bytes in branch buffers
Definition: TTree.h:108
TTree::CopyAddresses
virtual void CopyAddresses(TTree *, Bool_t undo=kFALSE)
Set branch addresses of passed tree equal to ours.
Definition: TTree.cxx:3249
TTree::DropBuffers
virtual void DropBuffers(Int_t nbytes)
Drop branch buffers to accommodate nbytes below MaxVirtualsize.
Definition: TTree.cxx:4459
TTree::GetFriendAlias
virtual const char * GetFriendAlias(TTree *) const
If the 'tree' is a friend, this method returns its alias name.
Definition: TTree.cxx:5932
TTree::fCacheSize
Long64_t fCacheSize
! Maximum size of file buffers
Definition: TTree.h:105
TTree::SetMakeClass
virtual void SetMakeClass(Int_t make)
Set all the branches in this TTree to be in decomposed object mode (also known as MakeClass mode).
Definition: TTree.cxx:8992
TTree::BranchRef
virtual TBranch * BranchRef()
Build the optional branch supporting the TRefTable.
Definition: TTree.cxx:2303
TTree::SetBranchAddressImp
Int_t SetBranchAddressImp(TBranch *branch, void *addr, TBranch **ptr)
Change branch address, dealing with clone trees properly.
Definition: TTree.cxx:8265
TTree::Branch
TBranch * Branch(const char *name, const char *classname, T *obj, Int_t bufsize=32000, Int_t splitlevel=99)
Definition: TTree.h:391
TTree::kSplitCollectionOfPointers
@ kSplitCollectionOfPointers
Definition: TTree.h:262
TTree::GetEventList
TEventList * GetEventList() const
Definition: TTree.h:468
TVirtualTreePlayer::GetSelectedRows
virtual Long64_t GetSelectedRows() const =0
TTree::GetIteratorOnAllLeaves
virtual TIterator * GetIteratorOnAllLeaves(Bool_t dir=kIterForward)
Creates a new iterator that will go through all the leaves on the tree itself and its friend.
Definition: TTree.cxx:5982
TTree::fMaxVirtualSize
Long64_t fMaxVirtualSize
Maximum total size of buffers kept in memory.
Definition: TTree.h:99
TTree::GetEvent
Int_t GetEvent(Long64_t entry=0, Int_t getall=0)
Definition: TTree.h:464
TTree::kGetEntry
@ kGetEntry
Definition: TTree.h:212
TTree::fWeight
Double_t fWeight
Tree weight (see TTree::SetWeight)
Definition: TTree.h:90
TTree::kMismatch
@ kMismatch
Definition: TTree.h:232
TTree::fClones
TList * fClones
! List of cloned trees which share our addresses
Definition: TTree.h:132
TTree::kDecomposedObjMask
@ kDecomposedObjMask
Definition: TTree.h:242
TTree::GetTotBytes
virtual Long64_t GetTotBytes() const
Definition: TTree.h:511
TTree::GetTransientBuffer
TBuffer * GetTransientBuffer(Int_t size)
Returns the transient buffer currently used by this TTree for reading/writing baskets.
Definition: TTree.cxx:1016
TCollection
Definition: TCollection.h:63
TAttFill
Definition: TAttFill.h:19
TTree::fTotBytes
Long64_t fTotBytes
Total number of bytes in all branches before compression.
Definition: TTree.h:86
TTree::FlushBasketsImpl
Int_t FlushBasketsImpl() const
Internal implementation of the FlushBaskets algorithm.
Definition: TTree.cxx:5062
TTree::fSeqBranches
std::vector< TBranch * > fSeqBranches
! Branches to be processed sequentially when IMT is on
Definition: TTree.h:142
TTree::GetVal
virtual Double_t * GetVal(Int_t i)
Definition: TTree.h:529
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:53
TTree::kNeedEnableDecomposedObj
@ kNeedEnableDecomposedObj
Definition: TTree.h:240
TTree::kGetAlias
@ kGetAlias
Definition: TTree.h:210
type
int type
Definition: TGX11.cxx:121
TTree::fAutoFlush
Long64_t fAutoFlush
Auto-flush tree when fAutoFlush entries written or -fAutoFlush (compressed) bytes produced.
Definition: TTree.h:101
TTree::GetImplicitMT
virtual Bool_t GetImplicitMT()
Definition: TTree.h:475
TTree::fPacketSize
Int_t fPacketSize
! Number of entries in one packet for parallel root
Definition: TTree.h:109
TTree::TFriendLock::fPrevious
Bool_t fPrevious
Definition: TTree.h:189
TTree::ResetBranchAddresses
virtual void ResetBranchAddresses()
Tell all of our branches to drop their current objects and allocate new ones.
Definition: TTree.cxx:7937
TArrayD
Definition: TArrayD.h:27
TVirtualTreePlayer::GetVal
virtual Double_t * GetVal(Int_t) const =0
TTree::BronchExec
virtual TBranch * BronchExec(const char *name, const char *classname, void *addobj, Bool_t isptrptr, Int_t bufsize, Int_t splitlevel)
Helper function implementing TTree::Bronch and TTree::Branch(const char *name, T &obj);.
Definition: TTree.cxx:2387
TVirtualTreePlayer::GetV3
virtual Double_t * GetV3() const =0
TTree::kMaxEntries
static constexpr Long64_t kMaxEntries
Definition: TTree.h:225
TTree::fEstimate
Long64_t fEstimate
Number of entries to estimate histogram limits.
Definition: TTree.h:102
TTree::kMatch
@ kMatch
Definition: TTree.h:234
TTree::StopCacheLearningPhase
virtual Int_t StopCacheLearningPhase()
Stop the cache learning phase.
Definition: TTree.cxx:9263
TTree::GetListOfLeaves
virtual TObjArray * GetListOfLeaves()
Definition: TTree.h:484
TTree::SetBranchStatus
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
Definition: TTree.cxx:8354
TTree::SetCacheEntryRange
virtual Int_t SetCacheEntryRange(Long64_t first, Long64_t last)
interface to TTreeCache to set the cache entry range
Definition: TTree.cxx:8646
TTree::GetEntries
virtual Long64_t GetEntries() const
Definition: TTree.h:458
TTree::MoveReadCache
void MoveReadCache(TFile *src, TDirectory *dir)
Move a cache from a file to the current file in dir.
Definition: TTree.cxx:6882
TTree::GetMaxVirtualSize
virtual Long64_t GetMaxVirtualSize() const
Definition: TTree.h:495
TTree::SetChainOffset
virtual void SetChainOffset(Long64_t offset=0)
Definition: TTree.h:603
TTree::GetIndexValues
virtual Double_t * GetIndexValues()
Definition: TTree.h:477
TTree::ResetAfterMerge
virtual void ResetAfterMerge(TFileMergeInfo *)
Resets the state of this TTree after a merge (keep the customization but forget the data).
Definition: TTree.cxx:7896
TTree::fIMTTotBytes
std::atomic< Long64_t > fIMTTotBytes
! Total bytes for the IMT flush baskets
Definition: TTree.h:157
TTree::fgBranchStyle
static Int_t fgBranchStyle
Old/New branch style.
Definition: TTree.h:151
TTree::SetDefaultEntryOffsetLen
virtual void SetDefaultEntryOffsetLen(Int_t newdefault, Bool_t updateExisting=kFALSE)
Update the default value for the branch's fEntryOffsetLen.
Definition: TTree.cxx:8755
TTree::fFileNumber
Int_t fFileNumber
! current file number (if file extensions)
Definition: TTree.h:116
TTree::GetV3
virtual Double_t * GetV3()
Definition: TTree.h:535
TTree::kMissingBranch
@ kMissingBranch
Definition: TTree.h:229
TTree::TFriendLock::operator=
TFriendLock & operator=(const TFriendLock &)
Assignment operator.
Definition: TTree.cxx:517
TTreeFriendLeafIter::Next
TObject * Next()
Go the next friend element.
Definition: TTree.cxx:9625
TObject::EStatusBits
EStatusBits
Definition: TObject.h:57
TTree::SetImplicitMT
virtual void SetImplicitMT(Bool_t enabled)
Definition: TTree.h:615
TTreeFriendLeafIter::Reset
void Reset()
Definition: TTree.h:683
TTree::GetDefaultEntryOffsetLen
Int_t GetDefaultEntryOffsetLen() const
Definition: TTree.h:454
TList
Definition: TList.h:44
TTree::kMatchConversion
@ kMatchConversion
Definition: TTree.h:235
TBranchRef
Definition: TBranchRef.h:34
TTree::AddTotBytes
virtual void AddTotBytes(Int_t tot)
Definition: TTree.h:327
TArrayI
Definition: TArrayI.h:27
TTree::Fit
virtual Int_t Fit(const char *funcname, const char *varexp, const char *selection="", Option_t *option="", Option_t *goption="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Fit a projected item(s) from a tree.
Definition: TTree.cxx:4995
TTree::kOnlyFlushAtCluster
@ kOnlyFlushAtCluster
If set, the branch's buffers will grow until an event cluster boundary is hit, guaranteeing a basket ...
Definition: TTree.h:252
TTree::fFriends
TList * fFriends
pointer to list of friend elements
Definition: TTree.h:127
int
TTree::GetAllocationCount
UInt_t GetAllocationCount() const
Definition: TTree.h:438
TTree::Principal
TPrincipal * Principal(const char *varexp="", const char *selection="", Option_t *option="np", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Interface to the Principal Components Analysis class.
Definition: TTree.cxx:7071
TTree::fDebugMin
Long64_t fDebugMin
! First entry number to debug
Definition: TTree.h:112
TTree::SetIOFeatures
ROOT::TIOFeatures SetIOFeatures(const ROOT::TIOFeatures &)
Provide the end-user with the ability to enable/disable various experimental IO features for this TTr...
Definition: TTree.cxx:8945
TTree::RemoveExternalFriend
virtual void RemoveExternalFriend(TFriendElement *)
Removes external friend.
Definition: TTree.cxx:7830
TTreeFriendLeafIter::~TTreeFriendLeafIter
~TTreeFriendLeafIter()
Definition: TTree.h:676
TTree::SetBranchStyle
static void SetBranchStyle(Int_t style=1)
Set the current branch style.
Definition: TTree.cxx:8485