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
43class TBranch;
44class 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
54
55class TBuffer;
56class TBrowser;
57class TFile;
58class TLeaf;
59class TH1;
60class TTreeFormula;
61class TPolyMarker;
62class TEventList;
63class TEntryList;
64class TSQLResult;
65class TSelector;
66class TPrincipal;
67class TFriendElement;
68class TCut;
69class TVirtualIndex;
70class TBranchRef;
71class TBasket;
72class TStreamerInfo;
73class TTreeCache;
74class TTreeCloner;
75class TFileMergeInfo;
77
78class TTree : public TNamed, public TAttLine, public TAttFill, public TAttMarker {
79
81
82protected:
83 Long64_t fEntries; ///< Number of entries
84// NOTE: cannot use std::atomic for these counters as it cannot be serialized.
85 Long64_t fTotBytes; ///< Total number of bytes in all branches before compression
86 Long64_t fZipBytes; ///< Total number of bytes in all branches after compression
87 Long64_t fSavedBytes; ///< Number of autosaved bytes
88 Long64_t fFlushedBytes; ///< Number of auto-flushed bytes
89 Double_t fWeight; ///< Tree weight (see TTree::SetWeight)
90 Int_t fTimerInterval; ///< Timer interval in milliseconds
91 Int_t fScanField; ///< Number of runs before prompting in Scan
92 Int_t fUpdate; ///< Update frequency for EntryLoop
93 Int_t fDefaultEntryOffsetLen; ///< Initial Length of fEntryOffset table in the basket buffers
94 Int_t fNClusterRange; ///< Number of Cluster range in addition to the one defined by 'AutoFlush'
95 Int_t fMaxClusterRange; ///<! Memory allocated for the cluster range.
96 Long64_t fMaxEntries; ///< Maximum number of entries in case of circular buffers
97 Long64_t fMaxEntryLoop; ///< Maximum number of entries to process
98 Long64_t fMaxVirtualSize; ///< Maximum total size of buffers kept in memory
99 Long64_t fAutoSave; ///< Autosave tree when fAutoSave entries written or -fAutoSave (compressed) bytes produced
100 Long64_t fAutoFlush; ///< Auto-flush tree when fAutoFlush entries written or -fAutoFlush (compressed) bytes produced
101 Long64_t fEstimate; ///< Number of entries to estimate histogram limits
102 Long64_t *fClusterRangeEnd; ///<[fNClusterRange] Last entry of a cluster range.
103 Long64_t *fClusterSize; ///<[fNClusterRange] Number of entries in each cluster for a given range.
104 Long64_t fCacheSize; ///<! Maximum size of file buffers
105 Long64_t fChainOffset; ///<! Offset of 1st entry of this Tree in a TChain
106 Long64_t fReadEntry; ///<! Number of the entry being processed
107 std::atomic<Long64_t> fTotalBuffers; ///<! Total number of bytes in branch buffers
108 Int_t fPacketSize; ///<! Number of entries in one packet for parallel root
109 Int_t fNfill; ///<! Local for EntryLoop
110 Int_t fDebug; ///<! Debug level
111 Long64_t fDebugMin; ///<! First entry number to debug
112 Long64_t fDebugMax; ///<! Last entry number to debug
113 TIOFeatures fIOFeatures{0}; ///< IO features to define for newly-written baskets and branches.
114 Int_t fMakeClass; ///<! not zero when processing code generated by MakeClass
115 Int_t fFileNumber; ///<! current file number (if file extensions)
116 TObject *fNotify; ///<! Object to be notified when loading a Tree
117 TDirectory *fDirectory; ///<! Pointer to directory holding this tree
118 TObjArray fBranches; ///< List of Branches
119 TObjArray fLeaves; ///< Direct pointers to individual branch leaves
120 TList *fAliases; ///< List of aliases for expressions based on the tree branches.
121 TEventList *fEventList; ///<! Pointer to event selection list (if one)
122 TEntryList *fEntryList; ///<! Pointer to event selection list (if one)
123 TArrayD fIndexValues; ///< Sorted index values
124 TArrayI fIndex; ///< Index of sorted values
125 TVirtualIndex *fTreeIndex; ///< Pointer to the tree Index (if any)
126 TList *fFriends; ///< pointer to list of friend elements
127 TList *fExternalFriends; ///<! List of TFriendsElement pointing to us and need to be notified of LoadTree. Content not owned.
128 TVirtualPerfStats *fPerfStats; ///<! pointer to the current perf stats object
129 TList *fUserInfo; ///< pointer to a list of user objects associated to this Tree
130 TVirtualTreePlayer *fPlayer; ///<! Pointer to current Tree player
131 TList *fClones; ///<! List of cloned trees which share our addresses
132 TBranchRef *fBranchRef; ///< Branch supporting the TRefTable (if any)
133 UInt_t fFriendLockStatus; ///<! Record which method is locking the friend recursion
134 TBuffer *fTransientBuffer; ///<! Pointer to the current transient buffer.
135 Bool_t fCacheDoAutoInit; ///<! true if cache auto creation or resize check is needed
136 Bool_t fCacheDoClusterPrefetch;///<! true if cache is prefetching whole clusters
137 Bool_t fCacheUserSet; ///<! true if the cache setting was explicitly given by user
138 Bool_t fIMTEnabled; ///<! true if implicit multi-threading is enabled for this tree
139 UInt_t fNEntriesSinceSorting; ///<! Number of entries processed since the last re-sorting of branches
140 std::vector<std::pair<Long64_t,TBranch*>> fSortedBranches; ///<! Branches to be processed in parallel when IMT is on, sorted by average task time
141 std::vector<TBranch*> fSeqBranches; ///<! Branches to be processed sequentially when IMT is on
142 Float_t fTargetMemoryRatio{1.1f}; ///<! Ratio for memory usage in uncompressed buffers versus actual occupancy. 1.0
143 /// indicates basket should be resized to exact memory usage, but causes significant
144/// memory churn.
145#ifdef R__TRACK_BASKET_ALLOC_TIME
146 mutable std::atomic<ULong64_t> fAllocationTime{0}; ///<! Time spent reallocating basket memory buffers, in microseconds.
147#endif
148 mutable std::atomic<UInt_t> fAllocationCount{0}; ///<! Number of reallocations basket memory buffers.
149
150 static Int_t fgBranchStyle; ///< Old/New branch style
151 static Long64_t fgMaxTreeSize; ///< Maximum size of a file containing a Tree
152
153private:
154 // For simplicity, although fIMTFlush is always disabled in non-IMT builds, we don't #ifdef it out.
155 mutable Bool_t fIMTFlush{false}; ///<! True if we are doing a multithreaded flush.
156 mutable std::atomic<Long64_t> fIMTTotBytes; ///<! Total bytes for the IMT flush baskets
157 mutable std::atomic<Long64_t> fIMTZipBytes; ///<! Zip bytes for the IMT flush baskets.
158
159 void InitializeBranchLists(bool checkLeafCount);
160 void SortBranchesByTime();
161 Int_t FlushBasketsImpl() const;
162 void MarkEventCluster();
163
164protected:
165 virtual void KeepCircular();
166 virtual TBranch *BranchImp(const char* branchname, const char* classname, TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel);
167 virtual TBranch *BranchImp(const char* branchname, TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel);
168 virtual TBranch *BranchImpRef(const char* branchname, const char* classname, TClass* ptrClass, void* addobj, Int_t bufsize, Int_t splitlevel);
169 virtual TBranch *BranchImpRef(const char* branchname, TClass* ptrClass, EDataType datatype, void* addobj, Int_t bufsize, Int_t splitlevel);
170 virtual TBranch *BranchImpArr(const char* branchname, EDataType datatype, std::size_t N, void* addobj, Int_t bufsize, Int_t splitlevel);
171 virtual Int_t CheckBranchAddressType(TBranch* branch, TClass* ptrClass, EDataType datatype, Bool_t ptr);
172 virtual TBranch *BronchExec(const char* name, const char* classname, void* addobj, Bool_t isptrptr, Int_t bufsize, Int_t splitlevel);
173 friend TBranch *TTreeBranchImpRef(TTree *tree, const char* branchname, TClass* ptrClass, EDataType datatype, void* addobj, Int_t bufsize, Int_t splitlevel);
174 Int_t SetBranchAddressImp(TBranch *branch, void* addr, TBranch** ptr);
175 virtual TLeaf *GetLeafImpl(const char* branchname, const char* leafname);
176
177 Long64_t GetCacheAutoSize(Bool_t withDefault = kFALSE) const;
178 char GetNewlineValue(std::istream &inputStream);
179 void ImportClusterRanges(TTree *fromtree);
180 void MoveReadCache(TFile *src, TDirectory *dir);
181 Int_t SetCacheSizeAux(Bool_t autocache = kTRUE, Long64_t cacheSize = 0);
182
184 // Helper class to prevent infinite recursion in the
185 // usage of TTree Friends. Implemented in TTree.cxx.
186 TTree *fTree; // Pointer to the locked tree
187 UInt_t fMethodBit; // BIT for the locked method
188 Bool_t fPrevious; // Previous value of the BIT.
189
190 protected:
191 TFriendLock(const TFriendLock&);
193
194 public:
195 TFriendLock(TTree* tree, UInt_t methodbit);
196 ~TFriendLock();
197 };
198 friend class TFriendLock;
199 // So that the index class can use TFriendLock:
200 friend class TTreeIndex;
201 friend class TChainIndex;
202 // So that the TTreeCloner can access the protected interfaces
203 friend class TTreeCloner;
204
205 // use to update fFriendLockStatus
217 kPrint = BIT(10),
220 };
221
222public:
223 // Used as the max value for any TTree range operation.
225
226 // SetBranchAddress return values
239 kNeedEnableDecomposedObj = BIT(29), // DecomposedObj is the newer name of MakeClass mode
242 };
243
244 // TTree status bits
248 /// If set, the branch's buffers will grow until an event cluster boundary is hit,
249 /// guaranteeing a basket per cluster. This mode does not provide any guarantee on the
250 /// memory bounds in the case of extremely large events.
252 /// If set, signals that this TTree is the output of the processing of another TTree, and
253 /// the entries are reshuffled w.r.t. to the original TTree. As a safety measure, a TTree
254 /// with this bit set cannot add friends nor can be added as a friend. If you know what
255 /// you are doing, you can manually unset this bit with `ResetBit(EStatusBits::kEntriesReshuffled)`.
256 kEntriesReshuffled = BIT(19) // bits 15-18 are used by TChain
257 };
258
259 // Split level modifier
260 enum {
262 };
263
265 {
266 private:
267 TTree *fTree; // TTree upon which we are iterating.
268 Int_t fClusterRange; // Which cluster range are we looking at.
269 Long64_t fStartEntry; // Where does the cluster start.
270 Long64_t fNextEntry; // Where does the cluster end (exclusive).
271 Long64_t fEstimatedSize; // If positive, the calculated estimated tree size.
272
274
275 protected:
276 friend class TTree;
277 TClusterIterator(TTree *tree, Long64_t firstEntry);
278
279 public:
280 // Intentionally used the default copy constructor and default destructor
281 // as the TClusterIterator does not own the TTree.
282 // TClusterIterator(const TClusterIterator&);
283 // ~TClusterIterator();
284
285 // No public constructors, the iterator must be
286 // created via TTree::GetClusterIterator
287
288 // Move on to the next cluster and return the starting entry
289 // of this next cluster
290 Long64_t Next();
291
292 // Move on to the previous cluster and return the starting entry
293 // of this previous cluster
295
296 // Return the start entry of the current cluster.
298 return fStartEntry;
299 }
300
301 // Return the first entry of the next cluster.
303 return fNextEntry;
304 }
305
306 Long64_t operator()() { return Next(); }
307 };
308
309 TTree();
310 TTree(const char* name, const char* title, Int_t splitlevel = 99, TDirectory* dir = gDirectory);
311 virtual ~TTree();
312
313 TTree(const TTree& tt) = delete;
314 TTree& operator=(const TTree& tt) = delete;
315
316 virtual Int_t AddBranchToCache(const char *bname, Bool_t subbranches = kFALSE);
317 virtual Int_t AddBranchToCache(TBranch *branch, Bool_t subbranches = kFALSE);
318 virtual Int_t DropBranchFromCache(const char *bname, Bool_t subbranches = kFALSE);
319 virtual Int_t DropBranchFromCache(TBranch *branch, Bool_t subbranches = kFALSE);
320 void AddClone(TTree*);
321 virtual TFriendElement *AddFriend(const char* treename, const char* filename = "");
322 virtual TFriendElement *AddFriend(const char* treename, TFile* file);
323 virtual TFriendElement *AddFriend(TTree* tree, const char* alias = "", Bool_t warn = kFALSE);
324 // As the TBasket invokes Add{Tot,Zip}Bytes on its parent tree, we must do these updates in a thread-safe
325 // manner only when we are flushing multiple baskets in parallel.
326 virtual void AddTotBytes(Int_t tot) { if (fIMTFlush) { fIMTTotBytes += tot; } else { fTotBytes += tot; } }
327 virtual void AddZipBytes(Int_t zip) { if (fIMTFlush) { fIMTZipBytes += zip; } else { fZipBytes += zip; } }
328// NOTE: these counters aren't thread safe like the ones above.
329#ifdef R__TRACK_BASKET_ALLOC_TIME
330 void AddAllocationTime(ULong64_t time) { fAllocationTime += time; }
331#endif
333 virtual Long64_t AutoSave(Option_t* option = "");
334
335 /// Add a new branch, and infer the data type from the type of `obj` being passed.
336 ///
337 /// \note This and the next overload should cover most cases for creating a branch. Try to use these two whenever
338 /// possible, unless e.g. type conversions are needed.
339 ///
340 /// \param[in] name Name of the branch to be created.
341 /// \param[in] obj Address of the object to be added. Make sure to pass a pointer to the actual type/class that
342 /// should be stored in the tree (no pointers to base classes). When calling Fill(), the current value of the type/object will be saved.
343 /// \param[in] bufsize The buffer size in bytes for this branch. When the buffer is full, it is compressed and written to disc.
344 /// 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).
345 /// A small value for bufsize is beneficial if entries in the Tree are accessed randomly and the Tree is in split mode.
346 /// \param[in] splitlevel If T is a class or struct and splitlevel > 0, the members of the object are serialised as separate branches.
347 /// \return Pointer to the TBranch that was created. The branch is owned by the tree.
348 template <class T> TBranch *Branch(const char* name, T* obj, Int_t bufsize = 32000, Int_t splitlevel = 99)
349 {
350 return BranchImpRef(name, TClass::GetClass<T>(), TDataType::GetType(typeid(T)), obj, bufsize, splitlevel);
351 }
352
353 /// Add a new branch, and infer the data type from the array `addobj` being passed.
354 ///
355 /// \note This and the previous overload should cover most cases for creating a branch. Try to use these two whenever
356 /// possible, unless e.g. type conversions are needed.
357 ///
358 /// \param[in] name Name of the branch to be created.
359 /// \param[in] obj Array of the objects to be added. When calling Fill(), the current value of the type/object will be saved.
360 /// \param[in] bufsize he buffer size in bytes for this branch. When the buffer is full, it is compressed and written to disc.
361 /// 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).
362 /// A small value for bufsize is beneficial if entries in the Tree are accessed randomly and the Tree is in split mode.
363 /// \param[in] splitlevel If T is a class or struct and splitlevel > 0, the members of the object are serialised as separate branches.
364 /// \return Pointer to the TBranch that was created. The branch is owned by the tree.
365 template <class T> TBranch *Branch(const char* name, T** addobj, Int_t bufsize = 32000, Int_t splitlevel = 99)
366 {
367 return BranchImp(name, TClass::GetClass<T>(), addobj, bufsize, splitlevel);
368 }
369
370 virtual Int_t Branch(TCollection* list, Int_t bufsize = 32000, Int_t splitlevel = 99, const char* name = "");
371 virtual Int_t Branch(TList* list, Int_t bufsize = 32000, Int_t splitlevel = 99);
372 virtual Int_t Branch(const char* folder, Int_t bufsize = 32000, Int_t splitlevel = 99);
373 virtual TBranch *Branch(const char* name, void* address, const char* leaflist, Int_t bufsize = 32000);
374 TBranch *Branch(const char* name, char* address, const char* leaflist, Int_t bufsize = 32000)
375 {
376 // Overload to avoid confusion between this signature and the template instance.
377 return Branch(name,(void*)address,leaflist,bufsize);
378 }
379 TBranch *Branch(const char* name, Long_t address, const char* leaflist, Int_t bufsize = 32000)
380 {
381 // Overload to avoid confusion between this signature and the template instance.
382 return Branch(name,(void*)address,leaflist,bufsize);
383 }
384 TBranch *Branch(const char* name, int address, const char* leaflist, Int_t bufsize = 32000)
385 {
386 // Overload to avoid confusion between this signature and the template instance.
387 return Branch(name,(void*)(Long_t)address,leaflist,bufsize);
388 }
389 virtual TBranch *Branch(const char* name, const char* classname, void* addobj, Int_t bufsize = 32000, Int_t splitlevel = 99);
390 template <class T> TBranch *Branch(const char* name, const char* classname, T* obj, Int_t bufsize = 32000, Int_t splitlevel = 99)
391 {
392 // See BranchImpRed for details. Here we __ignore
393 return BranchImpRef(name, classname, TClass::GetClass<T>(), obj, bufsize, splitlevel);
394 }
395 template <class T> TBranch *Branch(const char* name, const char* classname, T** addobj, Int_t bufsize = 32000, Int_t splitlevel = 99)
396 {
397 // See BranchImp for details
398 return BranchImp(name, classname, TClass::GetClass<T>(), addobj, bufsize, splitlevel);
399 }
400 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)
401 {
402 TClass *cl = TClass::GetClass<T>();
403 if (cl) {
404 TClass *arrCl = TClass::GetClass<std::array<T, N>>();
405 Error("Branch","std::array of objects not yet supported as top level branch object (the class is %s)",
406 arrCl ? arrCl->GetName() : cl->GetName());
407 return nullptr;
408 }
409 return BranchImpArr(name, TDataType::GetType(typeid(T)), N, obj, bufsize, splitlevel);
410 }
411 virtual TBranch *Bronch(const char* name, const char* classname, void* addobj, Int_t bufsize = 32000, Int_t splitlevel = 99);
412 virtual TBranch *BranchOld(const char* name, const char* classname, void* addobj, Int_t bufsize = 32000, Int_t splitlevel = 1);
413 virtual TBranch *BranchRef();
414 virtual void Browse(TBrowser*);
415 virtual Int_t BuildIndex(const char* majorname, const char* minorname = "0");
416 TStreamerInfo *BuildStreamerInfo(TClass* cl, void* pointer = 0, Bool_t canOptimize = kTRUE);
417 virtual TFile *ChangeFile(TFile* file);
418 virtual TTree *CloneTree(Long64_t nentries = -1, Option_t* option = "");
419 virtual void CopyAddresses(TTree*,Bool_t undo = kFALSE);
420 virtual Long64_t CopyEntries(TTree* tree, Long64_t nentries = -1, Option_t *option = "", Bool_t needCopyAddresses = false);
421 virtual TTree *CopyTree(const char* selection, Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0);
422 virtual TBasket *CreateBasket(TBranch*);
423 virtual void DirectoryAutoAdd(TDirectory *);
424 Int_t Debug() const { return fDebug; }
425 virtual void Delete(Option_t* option = ""); // *MENU*
426 virtual void Draw(Option_t* opt) { Draw(opt, "", "", kMaxEntries, 0); }
427 virtual Long64_t Draw(const char* varexp, const TCut& selection, Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0);
428 virtual Long64_t Draw(const char* varexp, const char* selection, Option_t* option = "", Long64_t nentries = kMaxEntries, Long64_t firstentry = 0); // *MENU*
429 virtual void DropBaskets();
430 virtual void DropBuffers(Int_t nbytes);
431 virtual Int_t Fill();
432 virtual TBranch *FindBranch(const char* name);
433 virtual TLeaf *FindLeaf(const char* name);
434 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*
435 virtual Int_t FlushBaskets(Bool_t create_cluster = true) const;
436 virtual const char *GetAlias(const char* aliasName) const;
438#ifdef R__TRACK_BASKET_ALLOC_TIME
439 ULong64_t GetAllocationTime() const { return fAllocationTime; }
440#endif
441 virtual Long64_t GetAutoFlush() const {return fAutoFlush;}
442 virtual Long64_t GetAutoSave() const {return fAutoSave;}
443 virtual TBranch *GetBranch(const char* name);
444 virtual TBranchRef *GetBranchRef() const { return fBranchRef; };
445 virtual Bool_t GetBranchStatus(const char* branchname) const;
446 static Int_t GetBranchStyle();
447 virtual Long64_t GetCacheSize() const { return fCacheSize; }
448 virtual TClusterIterator GetClusterIterator(Long64_t firstentry);
449 virtual Long64_t GetChainEntryNumber(Long64_t entry) const { return entry; }
450 virtual Long64_t GetChainOffset() const { return fChainOffset; }
452 TFile *GetCurrentFile() const;
454 Long64_t GetDebugMax() const { return fDebugMax; }
455 Long64_t GetDebugMin() const { return fDebugMin; }
456 TDirectory *GetDirectory() const { return fDirectory; }
457 virtual Long64_t GetEntries() const { return fEntries; }
458 virtual Long64_t GetEntries(const char *selection);
459 virtual Long64_t GetEntriesFast() const { return fEntries; }
460 virtual Long64_t GetEntriesFriend() const;
461 virtual Long64_t GetEstimate() const { return fEstimate; }
462 virtual Int_t GetEntry(Long64_t entry = 0, Int_t getall = 0);
463 Int_t GetEvent(Long64_t entry = 0, Int_t getall = 0) { return GetEntry(entry, getall); }
464 virtual Int_t GetEntryWithIndex(Int_t major, Int_t minor = 0);
465 virtual Long64_t GetEntryNumberWithBestIndex(Long64_t major, Long64_t minor = 0) const;
466 virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor = 0) const;
467 TEventList *GetEventList() const { return fEventList; }
468 virtual TEntryList *GetEntryList();
469 virtual Long64_t GetEntryNumber(Long64_t entry) const;
470 virtual Int_t GetFileNumber() const { return fFileNumber; }
471 virtual TTree *GetFriend(const char*) const;
472 virtual const char *GetFriendAlias(TTree*) const;
474 virtual Bool_t GetImplicitMT() { return fIMTEnabled; }
475 virtual Int_t *GetIndex() { return &fIndex.fArray[0]; }
476 virtual Double_t *GetIndexValues() { return &fIndexValues.fArray[0]; }
479 virtual TLeaf *GetLeaf(const char* branchname, const char* leafname);
480 virtual TLeaf *GetLeaf(const char* name);
481 virtual TList *GetListOfClones() { return fClones; }
482 virtual TObjArray *GetListOfBranches() { return &fBranches; }
483 virtual TObjArray *GetListOfLeaves() { return &fLeaves; }
484 virtual TList *GetListOfFriends() const { return fFriends; }
485 virtual TList *GetListOfAliases() const { return fAliases; }
486
487 // GetMakeClass is left non-virtual for efficiency reason.
488 // Making it virtual affects the performance of the I/O
489 Int_t GetMakeClass() const { return fMakeClass; }
490
491 virtual Long64_t GetMaxEntryLoop() const { return fMaxEntryLoop; }
492 virtual Double_t GetMaximum(const char* columname);
493 static Long64_t GetMaxTreeSize();
494 virtual Long64_t GetMaxVirtualSize() const { return fMaxVirtualSize; }
495 virtual Double_t GetMinimum(const char* columname);
497 TObject *GetNotify() const { return fNotify; }
499 virtual Int_t GetPacketSize() const { return fPacketSize; }
500 virtual TVirtualPerfStats *GetPerfStats() const { return fPerfStats; }
503 virtual Long64_t GetReadEntry() const { return fReadEntry; }
504 virtual Long64_t GetReadEvent() const { return fReadEntry; }
505 virtual Int_t GetScanField() const { return fScanField; }
508 virtual Int_t GetTimerInterval() const { return fTimerInterval; }
510 virtual Long64_t GetTotBytes() const { return fTotBytes; }
511 virtual TTree *GetTree() const { return const_cast<TTree*>(this); }
512 virtual TVirtualIndex *GetTreeIndex() const { return fTreeIndex; }
513 virtual Int_t GetTreeNumber() const { return 0; }
515 virtual Int_t GetUpdate() const { return fUpdate; }
516 virtual TList *GetUserInfo();
517 // See TSelectorDraw::GetVar
519 // See TSelectorDraw::GetVar
521 // See TSelectorDraw::GetVar
523 // See TSelectorDraw::GetVar
525 // See TSelectorDraw::GetVar
527 // See TSelectorDraw::GetVal
528 virtual Double_t *GetVal(Int_t i) { return GetPlayer()->GetVal(i); }
529 // See TSelectorDraw::GetVal
530 virtual Double_t *GetV1() { return GetPlayer()->GetV1(); }
531 // See TSelectorDraw::GetVal
532 virtual Double_t *GetV2() { return GetPlayer()->GetV2(); }
533 // See TSelectorDraw::GetVal
534 virtual Double_t *GetV3() { return GetPlayer()->GetV3(); }
535 // See TSelectorDraw::GetVal
536 virtual Double_t *GetV4() { return GetPlayer()->GetV4(); }
537 virtual Double_t *GetW() { return GetPlayer()->GetW(); }
538 virtual Double_t GetWeight() const { return fWeight; }
539 virtual Long64_t GetZipBytes() const { return fZipBytes; }
540 virtual void IncrementTotalBuffers(Int_t nbytes) { fTotalBuffers += nbytes; }
541 Bool_t IsFolder() const { return kTRUE; }
542 virtual Bool_t InPlaceClone(TDirectory *newdirectory, const char *options = "");
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();
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*
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
664protected:
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
673public:
677 TIterator &operator=(const TIterator &rhs);
679
680 const TCollection *GetCollection() const { return 0; }
681 Option_t *GetOption() const;
682 TObject *Next();
685 // TODO: Implement me
686 return false;
687 }
689 // TODO: Implement me
690 return false;
691 }
693 // TODO: Implement me
694 return nullptr;
695 }
696 ClassDef(TTreeFriendLeafIter,0) //Linked list iterator
697 };
698
699
700#endif
#define SafeDelete(p)
Definition: RConfig.hxx:543
int Int_t
Definition: RtypesCore.h:43
unsigned int UInt_t
Definition: RtypesCore.h:44
const Bool_t kFALSE
Definition: RtypesCore.h:90
long Long_t
Definition: RtypesCore.h:52
bool Bool_t
Definition: RtypesCore.h:61
double Double_t
Definition: RtypesCore.h:57
long long Long64_t
Definition: RtypesCore.h:71
unsigned long long ULong64_t
Definition: RtypesCore.h:72
float Float_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:89
const char Option_t
Definition: RtypesCore.h:64
#define ClassDef(name, id)
Definition: Rtypes.h:322
#define BIT(n)
Definition: Rtypes.h:83
const Bool_t kIterForward
Definition: TCollection.h:40
EDataType
Definition: TDataType.h:28
@ kOther_t
Definition: TDataType.h:32
#define gDirectory
Definition: TDirectory.h:229
#define N
char name[80]
Definition: TGX11.cxx:109
int type
Definition: TGX11.cxx:120
int nentries
Definition: THbookFile.cxx:89
TIOFeatures provides the end-user with the ability to change the IO behavior of data written via a TT...
Definition: TIOFeatures.hxx:69
Array of doubles (64 bits per element).
Definition: TArrayD.h:27
Double_t * fArray
Definition: TArrayD.h:30
Array of integers (32 bits per element).
Definition: TArrayI.h:27
Int_t * fArray
Definition: TArrayI.h:30
Fill Area Attributes class.
Definition: TAttFill.h:19
Line Attributes class.
Definition: TAttLine.h:18
Marker Attributes class.
Definition: TAttMarker.h:19
Manages buffers for branches of a Tree.
Definition: TBasket.h:34
A branch containing and managing a TRefTable for TRef autoloading.
Definition: TBranchRef.h:29
A TTree is a list of TBranches.
Definition: TBranch.h:91
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
A Chain Index.
Definition: TChainIndex.h:39
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
Collection abstract base class.
Definition: TCollection.h:63
A specialized string object used for TTree selections.
Definition: TCut.h:25
Int_t GetType() const
Definition: TDataType.h:68
Describe directory structure in memory.
Definition: TDirectory.h:40
A List of entry numbers in a TTree or TChain.
Definition: TEntryList.h:26
A TEventList object is a list of selected events (entries) in a TTree.
Definition: TEventList.h:31
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:53
A TFriendElement TF describes a TTree object TF in a file.
The TH1 histogram class.
Definition: TH1.h:56
Iterator abstract base class.
Definition: TIterator.h:30
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:49
A doubly linked list.
Definition: TList.h:44
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
An array of TObjects.
Definition: TObjArray.h:37
Int_t GetEntriesFast() const
Definition: TObjArray.h:64
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:891
EStatusBits
Definition: TObject.h:57
A PolyMarker is defined by an array on N points in a 2-D space.
Definition: TPolyMarker.h:31
Principal Components Analysis (PCA)
Definition: TPrincipal.h:20
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
Definition: TSelector.h:33
Describe Streamer information for one class version.
Definition: TStreamerInfo.h:46
A cache to speed-up the reading of ROOT datasets.
Definition: TTreeCache.h:35
Class implementing or helping the various TTree cloning method.
Definition: TTreeCloner.h:31
Used to pass a selection expression to the Tree drawing routine.
Definition: TTreeFormula.h:58
Iterator on all the leaves in a TTree and its friend.
Definition: TTree.h:662
TObject * Next()
Go the next friend element.
Definition: TTree.cxx:9657
TTree * fTree
tree being iterated
Definition: TTree.h:665
Option_t * GetOption() const
Returns the object option stored in the list.
Definition: TTree.cxx:9696
TIterator & operator=(const TIterator &rhs)
Overridden assignment operator. Does NOT copy the 'cursor' location!
Definition: TTree.cxx:9634
Bool_t operator!=(const TIterator &) const
Compare two iterator objects.
Definition: TTree.h:684
TIterator * fLeafIter
current leaf sub-iterator.
Definition: TTree.h:666
TIterator * fTreeIter
current tree sub-iterator.
Definition: TTree.h:667
Bool_t fDirection
iteration direction
Definition: TTree.h:668
const TCollection * GetCollection() const
Definition: TTree.h:680
TObject * operator*() const
Return current object or nullptr.
Definition: TTree.h:692
A Tree Index with majorname and minorname.
Definition: TTreeIndex.h:29
Helper class to iterate over cluster of baskets.
Definition: TTree.h:265
Long64_t GetEstimatedClusterSize()
Estimate the cluster size.
Definition: TTree.cxx:596
Long64_t Previous()
Move on to the previous cluster and return the starting entry of this previous cluster.
Definition: TTree.cxx:679
Long64_t GetStartEntry()
Definition: TTree.h:297
Long64_t fNextEntry
Definition: TTree.h:270
Long64_t operator()()
Definition: TTree.h:306
Long64_t Next()
Move on to the next cluster and return the starting entry of this next cluster.
Definition: TTree.cxx:635
Long64_t GetNextEntry()
Definition: TTree.h:302
Long64_t fStartEntry
Definition: TTree.h:269
Long64_t fEstimatedSize
Definition: TTree.h:271
TClusterIterator(TTree *tree, Long64_t firstEntry)
Regular constructor.
Definition: TTree.cxx:545
Helper class to prevent infinite recursion in the usage of TTree Friends.
Definition: TTree.h:183
TFriendLock & operator=(const TFriendLock &)
Assignment operator.
Definition: TTree.cxx:515
TFriendLock(const TFriendLock &)
Copy constructor.
Definition: TTree.cxx:505
UInt_t fMethodBit
Definition: TTree.h:187
TTree * fTree
Definition: TTree.h:186
~TFriendLock()
Restore the state of tree the same as before we set the lock.
Definition: TTree.cxx:528
Bool_t fPrevious
Definition: TTree.h:188
A TTree represents a columnar dataset.
Definition: TTree.h:78
virtual Int_t Fill()
Fill all branches.
Definition: TTree.cxx:4524
virtual TFriendElement * AddFriend(const char *treename, const char *filename="")
Add a TFriendElement to the list of friends.
Definition: TTree.cxx:1316
TBranchRef * fBranchRef
Branch supporting the TRefTable (if any)
Definition: TTree.h:132
virtual Int_t AddBranchToCache(const char *bname, Bool_t subbranches=kFALSE)
Add branch with name bname to the Tree cache.
Definition: TTree.cxx:1044
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:4762
virtual TVirtualPerfStats * GetPerfStats() const
Definition: TTree.h:500
virtual void SetTimerInterval(Int_t msec=333)
Definition: TTree.h:639
TTreeFormula * GetSelect()
Definition: TTree.h:506
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
Definition: TTree.cxx:5209
virtual Int_t GetScanField() const
Definition: TTree.h:505
static Int_t GetBranchStyle()
Static function returning the current branch style.
Definition: TTree.cxx:5309
TList * fFriends
pointer to list of friend elements
Definition: TTree.h:126
virtual Long64_t GetChainEntryNumber(Long64_t entry) const
Definition: TTree.h:449
UInt_t fFriendLockStatus
! Record which method is locking the friend recursion
Definition: TTree.h:133
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:6003
Long64_t fTotBytes
Total number of bytes in all branches before compression.
Definition: TTree.h:85
Int_t GetDefaultEntryOffsetLen() const
Definition: TTree.h:453
Int_t fMaxClusterRange
! Memory allocated for the cluster range.
Definition: TTree.h:95
virtual void Show(Long64_t entry=-1, Int_t lenmax=20)
Print values of all active leaves for entry.
Definition: TTree.cxx:9206
TEventList * fEventList
! Pointer to event selection list (if one)
Definition: TTree.h:121
virtual Long64_t GetAutoSave() const
Definition: TTree.h:442
virtual Int_t StopCacheLearningPhase()
Stop the cache learning phase.
Definition: TTree.cxx:9295
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:140
virtual void SetCircular(Long64_t maxEntries)
Enable/Disable circularity for this tree.
Definition: TTree.cxx:8739
virtual Long64_t GetEstimate() const
Definition: TTree.h:461
Long64_t GetDebugMax() const
Definition: TTree.h:454
Long64_t fSavedBytes
Number of autosaved bytes.
Definition: TTree.h:87
virtual TClusterIterator GetClusterIterator(Long64_t firstentry)
Return an iterator over the cluster of baskets starting at firstentry.
Definition: TTree.cxx:5371
virtual void ResetBranchAddress(TBranch *)
Tell all of our branches to set their addresses to zero.
Definition: TTree.cxx:7959
char GetNewlineValue(std::istream &inputStream)
Determine which newline this file is using.
Definition: TTree.cxx:7486
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:2825
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:365
TIOFeatures fIOFeatures
IO features to define for newly-written baskets and branches.
Definition: TTree.h:113
virtual Long64_t GetSelectedRows()
Definition: TTree.h:507
void AddAllocationCount(UInt_t count)
Definition: TTree.h:332
virtual void SetMaxEntryLoop(Long64_t maxev=kMaxEntries)
Definition: TTree.h:617
virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
Definition: TTree.cxx:5815
Long64_t fDebugMin
! First entry number to debug
Definition: TTree.h:111
virtual Long64_t SetEntries(Long64_t n=-1)
Change number of entries in the tree.
Definition: TTree.cxx:8858
TBranch * Branch(const char *name, Long_t address, const char *leaflist, Int_t bufsize=32000)
Definition: TTree.h:379
virtual TObjArray * GetListOfLeaves()
Definition: TTree.h:483
Bool_t fCacheDoClusterPrefetch
! true if cache is prefetching whole clusters
Definition: TTree.h:136
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:2055
virtual TBranch * BranchRef()
Build the optional branch supporting the TRefTable.
Definition: TTree.cxx:2309
virtual Bool_t InPlaceClone(TDirectory *newdirectory, const char *options="")
Copy the content to a new new file, update this TTree with the new location information and attach th...
Definition: TTree.cxx:6915
TFile * GetCurrentFile() const
Return pointer to the current file.
Definition: TTree.cxx:5383
TObject * GetNotify() const
Definition: TTree.h:497
TList * fAliases
List of aliases for expressions based on the tree branches.
Definition: TTree.h:120
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:3667
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:5044
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:4994
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:8559
Long64_t * fClusterRangeEnd
[fNClusterRange] Last entry of a cluster range.
Definition: TTree.h:102
std::atomic< Long64_t > fIMTZipBytes
! Zip bytes for the IMT flush baskets.
Definition: TTree.h:157
void UseCurrentStyle()
Replace current attributes by current style.
Definition: TTree.cxx:9556
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
Definition: TTree.cxx:6208
Float_t fTargetMemoryRatio
! Ratio for memory usage in uncompressed buffers versus actual occupancy.
Definition: TTree.h:142
virtual Double_t * GetIndexValues()
Definition: TTree.h:476
virtual TList * GetListOfAliases() const
Definition: TTree.h:485
virtual Long64_t ReadStream(std::istream &inputStream, const char *branchDescriptor="", char delimiter=' ')
Create or simply read branches from an input stream.
Definition: TTree.cxx:7513
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:8775
Int_t fScanField
Number of runs before prompting in Scan.
Definition: TTree.h:91
virtual Double_t GetWeight() const
Definition: TTree.h:538
virtual ~TTree()
Destructor.
Definition: TTree.cxx:905
virtual TTree * GetFriend(const char *) const
Return a pointer to the TTree friend whose name or alias is 'friendname.
Definition: TTree.cxx:5880
virtual Long64_t CopyEntries(TTree *tree, Long64_t nentries=-1, Option_t *option="", Bool_t needCopyAddresses=false)
Copy nentries from given tree to this tree.
Definition: TTree.cxx:3482
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
Definition: TTree.cxx:8237
TTreeFormula * GetVar(Int_t i)
Definition: TTree.h:518
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
Definition: TTree.cxx:6138
virtual Long64_t GetEntryNumberWithBestIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
Definition: TTree.cxx:5795
static void SetMaxTreeSize(Long64_t maxsize=100000000000LL)
Set the maximum size in bytes of a Tree file (static function).
Definition: TTree.cxx:9044
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:2393
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:9544
Int_t fNClusterRange
Number of Cluster range in addition to the one defined by 'AutoFlush'.
Definition: TTree.h:94
virtual void PrintCacheStats(Option_t *option="") const
Print statistics about the TreeCache for this tree.
Definition: TTree.cxx:7273
virtual Int_t BuildIndex(const char *majorname, const char *minorname="0")
Build a Tree Index (default is TTreeIndex).
Definition: TTree.cxx:2618
TVirtualTreePlayer * fPlayer
! Pointer to current Tree player
Definition: TTree.h:130
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:9024
virtual void IncrementTotalBuffers(Int_t nbytes)
Definition: TTree.h:540
TObjArray fBranches
List of Branches.
Definition: TTree.h:118
TDirectory * GetDirectory() const
Definition: TTree.h:456
TTreeCache * GetReadCache(TFile *file) const
Find and return the TTreeCache registered with the file and which may contain branches for us.
Definition: TTree.cxx:6221
Bool_t fCacheUserSet
! true if the cache setting was explicitly given by user
Definition: TTree.h:137
Long64_t fEntries
Number of entries.
Definition: TTree.h:83
virtual TFile * ChangeFile(TFile *file)
Called by TTree::Fill() when file has reached its maximum fgMaxTreeSize.
Definition: TTree.cxx:2707
virtual Bool_t GetBranchStatus(const char *branchname) const
Return status of branch with name branchname.
Definition: TTree.cxx:5294
virtual TEntryList * GetEntryList()
Returns the entry list assigned to this tree.
Definition: TTree.cxx:5759
virtual void SetWeight(Double_t w=1, Option_t *option="")
Set tree weight.
Definition: TTree.cxx:9195
void InitializeBranchLists(bool checkLeafCount)
Divides the top-level branches into two vectors: (i) branches to be processed sequentially and (ii) b...
Definition: TTree.cxx:5686
Long64_t * fClusterSize
[fNClusterRange] Number of entries in each cluster for a given range.
Definition: TTree.h:103
virtual Bool_t GetImplicitMT()
Definition: TTree.h:474
Long64_t fFlushedBytes
Number of auto-flushed bytes.
Definition: TTree.h:88
virtual void SetPerfStats(TVirtualPerfStats *perf)
Set perf stats.
Definition: TTree.cxx:9150
TTreeFormula * GetVar2()
Definition: TTree.h:522
std::atomic< Long64_t > fIMTTotBytes
! Total bytes for the IMT flush baskets
Definition: TTree.h:156
virtual void SetCacheLearnEntries(Int_t n=10)
Interface to TTreeCache to set the number of entries for the learning phase.
Definition: TTree.cxx:8712
void SetTargetMemoryRatio(Float_t ratio)
Definition: TTree.h:638
TEntryList * fEntryList
! Pointer to event selection list (if one)
Definition: TTree.h:122
virtual TVirtualIndex * GetTreeIndex() const
Definition: TTree.h:512
Int_t Debug() const
Definition: TTree.h:424
TList * fExternalFriends
! List of TFriendsElement pointing to us and need to be notified of LoadTree. Content not owned.
Definition: TTree.h:127
virtual Long64_t Merge(TCollection *list, Option_t *option="")
Merge the trees in the TList into this tree.
Definition: TTree.cxx:6793
virtual void SetMaxVirtualSize(Long64_t size=0)
Definition: TTree.h:619
virtual void DropBaskets()
Remove some baskets from memory.
Definition: TTree.cxx:4438
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:8194
virtual void SetImplicitMT(Bool_t enabled)
Definition: TTree.h:615
TBranch * Branch(const char *name, const char *classname, T **addobj, Int_t bufsize=32000, Int_t splitlevel=99)
Definition: TTree.h:395
Long64_t fMaxEntryLoop
Maximum number of entries to process.
Definition: TTree.h:97
Int_t SetBranchAddress(const char *bname, T **add, TBranch **ptr=0)
Definition: TTree.h:582
friend TBranch * TTreeBranchImpRef(TTree *tree, const char *branchname, TClass *ptrClass, EDataType datatype, void *addobj, Int_t bufsize, Int_t splitlevel)
Float_t GetTargetMemoryRatio() const
Definition: TTree.h:514
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
Definition: TTree.cxx:8813
void SortBranchesByTime()
Sorts top-level branches by the last average task time recorded per branch.
Definition: TTree.cxx:5739
virtual Int_t * GetIndex()
Definition: TTree.h:475
virtual TBranchRef * GetBranchRef() const
Definition: TTree.h:444
virtual Double_t * GetV3()
Definition: TTree.h:534
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:7353
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:1619
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:8916
TBranch * Branch(const char *name, int address, const char *leaflist, Int_t bufsize=32000)
Definition: TTree.h:384
void MoveReadCache(TFile *src, TDirectory *dir)
Move a cache from a file to the current file in dir.
Definition: TTree.cxx:6886
TTree & operator=(const TTree &tt)=delete
Long64_t fAutoFlush
Auto-flush tree when fAutoFlush entries written or -fAutoFlush (compressed) bytes produced.
Definition: TTree.h:100
Int_t fUpdate
Update frequency for EntryLoop.
Definition: TTree.h:92
virtual void ResetAfterMerge(TFileMergeInfo *)
Resets the state of this TTree after a merge (keep the customization but forget the data).
Definition: TTree.cxx:7928
virtual void CopyAddresses(TTree *, Bool_t undo=kFALSE)
Set branch addresses of passed tree equal to ours.
Definition: TTree.cxx:3254
TBranch * Branch(const char *name, std::array< T, N > *obj, Int_t bufsize=32000, Int_t splitlevel=99)
Definition: TTree.h:400
virtual Long64_t GetEntries() const
Definition: TTree.h:457
virtual void SetEstimate(Long64_t nentries=1000000)
Set number of entries to estimate variable limits.
Definition: TTree.cxx:8957
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:5987
Int_t fTimerInterval
Timer interval in milliseconds.
Definition: TTree.h:90
Int_t fDebug
! Debug level
Definition: TTree.h:110
virtual Long64_t AutoSave(Option_t *option="")
AutoSave tree header every fAutoSave bytes.
Definition: TTree.cxx:1484
virtual Long64_t GetEntryNumber(Long64_t entry) const
Return entry number corresponding to entry.
Definition: TTree.cxx:5770
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
Definition: TTree.cxx:3094
Int_t fFileNumber
! current file number (if file extensions)
Definition: TTree.h:115
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:6098
virtual Long64_t GetZipBytes() const
Definition: TTree.h:539
TObjArray fLeaves
Direct pointers to individual branch leaves.
Definition: TTree.h:119
virtual void Reset(Option_t *option="")
Reset baskets, buffers and entries count in all branches and leaves.
Definition: TTree.cxx:7897
virtual void Print(Option_t *option="") const
Print a summary of the tree contents.
Definition: TTree.cxx:7122
virtual void KeepCircular()
Keep a maximum of fMaxEntries in memory.
Definition: TTree.cxx:6318
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:3767
Long64_t GetCacheAutoSize(Bool_t withDefault=kFALSE) const
Used for automatic sizing of the cache.
Definition: TTree.cxx:5321
virtual Bool_t SetAlias(const char *aliasName, const char *aliasFormula)
Set a tree variable alias.
Definition: TTree.cxx:8030
Long64_t fMaxVirtualSize
Maximum total size of buffers kept in memory.
Definition: TTree.h:98
virtual Long64_t GetTotBytes() const
Definition: TTree.h:510
virtual void SetObject(const char *name, const char *title)
Change the name and title of this tree.
Definition: TTree.cxx:9081
TVirtualPerfStats * fPerfStats
! pointer to the current perf stats object
Definition: TTree.h:128
Double_t fWeight
Tree weight (see TTree::SetWeight)
Definition: TTree.h:89
virtual void SetUpdate(Int_t freq=0)
Definition: TTree.h:642
std::vector< TBranch * > fSeqBranches
! Branches to be processed sequentially when IMT is on
Definition: TTree.h:141
Long64_t fDebugMax
! Last entry number to debug
Definition: TTree.h:112
Int_t fDefaultEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
Definition: TTree.h:93
TTree()
Default constructor and I/O constructor.
Definition: TTree.cxx:722
Long64_t fAutoSave
Autosave tree when fAutoSave entries written or -fAutoSave (compressed) bytes produced.
Definition: TTree.h:99
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:348
virtual void SetDefaultEntryOffsetLen(Int_t newdefault, Bool_t updateExisting=kFALSE)
Update the default value for the branch's fEntryOffsetLen.
Definition: TTree.cxx:8787
std::atomic< UInt_t > fAllocationCount
indicates basket should be resized to exact memory usage, but causes significant
Definition: TTree.h:148
virtual Int_t GetEntryWithIndex(Int_t major, Int_t minor=0)
Read entry corresponding to major and minor number.
Definition: TTree.cxx:5832
static TTree * MergeTrees(TList *list, Option_t *option="")
Static function merging the trees in the TList into a new tree.
Definition: TTree.cxx:6754
TTreeFormula * GetVar4()
Definition: TTree.h:526
virtual Long64_t GetReadEntry() const
Definition: TTree.h:503
virtual TObjArray * GetListOfBranches()
Definition: TTree.h:482
virtual void SetParallelUnzip(Bool_t opt=kTRUE, Float_t RelSize=-1)
Enable or disable parallel unzipping of Tree buffers.
Definition: TTree.cxx:9112
Long64_t fZipBytes
Total number of bytes in all branches after compression.
Definition: TTree.h:86
@ kSplitCollectionOfPointers
Definition: TTree.h:261
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:7779
virtual TTree * GetTree() const
Definition: TTree.h:511
TBuffer * fTransientBuffer
! Pointer to the current transient buffer.
Definition: TTree.h:134
virtual Double_t * GetVal(Int_t i)
Definition: TTree.h:528
Bool_t fIMTEnabled
! true if implicit multi-threading is enabled for this tree
Definition: TTree.h:138
virtual void SetEntryList(TEntryList *list, Option_t *opt="")
Set an EntryList.
Definition: TTree.cxx:8893
virtual Int_t DropBranchFromCache(const char *bname, Bool_t subbranches=kFALSE)
Remove the branch with name 'bname' from the Tree cache.
Definition: TTree.cxx:1127
virtual void AddZipBytes(Int_t zip)
Definition: TTree.h:327
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
Definition: TTree.cxx:6376
virtual Long64_t ReadFile(const char *filename, const char *branchDescriptor="", char delimiter=' ')
Create or simply read branches from filename.
Definition: TTree.cxx:7467
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
Definition: TTree.cxx:5141
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:8977
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:5542
virtual TBasket * CreateBasket(TBranch *)
Create a basket for this tree and given branch.
Definition: TTree.cxx:3679
TList * fUserInfo
pointer to a list of user objects associated to this Tree
Definition: TTree.h:129
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
Definition: TTree.cxx:6178
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
Definition: TTree.cxx:7871
virtual Long64_t GetEntriesFast() const
Definition: TTree.h:459
virtual Double_t * GetV1()
Definition: TTree.h:530
virtual TList * GetUserInfo()
Return a pointer to the list containing user objects associated to this tree.
Definition: TTree.cxx:6259
virtual void SetNotify(TObject *obj)
Sets the address of the object to be notified when the tree is loaded.
Definition: TTree.h:632
TEventList * GetEventList() const
Definition: TTree.h:467
Int_t SetBranchAddress(const char *bname, T *add, TBranch **ptr=0)
Definition: TTree.h:591
Long64_t fChainOffset
! Offset of 1st entry of this Tree in a TChain
Definition: TTree.h:105
@ kOnlyFlushAtCluster
If set, the branch's buffers will grow until an event cluster boundary is hit, guaranteeing a basket ...
Definition: TTree.h:251
@ kEntriesReshuffled
If set, signals that this TTree is the output of the processing of another TTree, and the entries are...
Definition: TTree.h:256
@ kCircular
Definition: TTree.h:247
@ kForceRead
Definition: TTree.h:246
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:5416
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:7416
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:2385
virtual void SetBasketSize(const char *bname, Int_t buffsize=16000)
Set a branch's basket size.
Definition: TTree.cxx:8210
static void SetBranchStyle(Int_t style=1)
Set the current branch style.
Definition: TTree.cxx:8517
virtual Long64_t GetReadEvent() const
Definition: TTree.h:504
void ImportClusterRanges(TTree *fromtree)
Appends the cluster range information stored in 'fromtree' to this tree, including the value of fAuto...
Definition: TTree.cxx:6275
Long64_t fEstimate
Number of entries to estimate histogram limits.
Definition: TTree.h:101
TH1 * GetHistogram()
Definition: TTree.h:473
UInt_t GetAllocationCount() const
Definition: TTree.h:437
Int_t FlushBasketsImpl() const
Internal implementation of the FlushBaskets algorithm.
Definition: TTree.cxx:5061
Long64_t GetDebugMin() const
Definition: TTree.h:455
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:6460
TVirtualIndex * fTreeIndex
Pointer to the tree Index (if any)
Definition: TTree.h:125
virtual void Browse(TBrowser *)
Browse content of the TTree.
Definition: TTree.cxx:2590
virtual Int_t GetTreeNumber() const
Definition: TTree.h:513
TObject * fNotify
! Object to be notified when loading a Tree
Definition: TTree.h:116
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:1538
virtual TList * GetListOfClones()
Definition: TTree.h:481
Long64_t fCacheSize
! Maximum size of file buffers
Definition: TTree.h:104
TList * fClones
! List of cloned trees which share our addresses
Definition: TTree.h:131
std::atomic< Long64_t > fTotalBuffers
! Total number of bytes in branch buffers
Definition: TTree.h:107
Bool_t fCacheDoAutoInit
! true if cache auto creation or resize check is needed
Definition: TTree.h:135
virtual Int_t MakeSelector(const char *selector=0, Option_t *option="")
Generate skeleton selector class for this tree.
Definition: TTree.cxx:6725
ELockStatusBits
Definition: TTree.h:206
@ kFindBranch
Definition: TTree.h:207
@ kFindLeaf
Definition: TTree.h:208
@ kGetEntryWithIndex
Definition: TTree.h:212
@ kPrint
Definition: TTree.h:217
@ kGetFriend
Definition: TTree.h:213
@ kGetBranch
Definition: TTree.h:210
@ kSetBranchStatus
Definition: TTree.h:219
@ kLoadTree
Definition: TTree.h:216
@ kGetEntry
Definition: TTree.h:211
@ kGetLeaf
Definition: TTree.h:215
@ kRemoveFriend
Definition: TTree.h:218
@ kGetFriendAlias
Definition: TTree.h:214
@ kGetAlias
Definition: TTree.h:209
virtual Double_t * GetV4()
Definition: TTree.h:536
TBranch * Branch(const char *name, const char *classname, T *obj, Int_t bufsize=32000, Int_t splitlevel=99)
Definition: TTree.h:390
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
Definition: TTree.h:426
virtual Int_t MakeClass(const char *classname=0, Option_t *option="")
Generate a skeleton analysis class for this tree.
Definition: TTree.cxx:6510
TTreeFormula * GetVar3()
Definition: TTree.h:524
virtual void SetTreeIndex(TVirtualIndex *index)
The current TreeIndex is replaced by the new index.
Definition: TTree.cxx:9167
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:6960
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:7401
virtual Int_t SetCacheEntryRange(Long64_t first, Long64_t last)
interface to TTreeCache to set the cache entry range
Definition: TTree.cxx:8678
static Long64_t GetMaxTreeSize()
Static function which returns the tree file size limit in bytes.
Definition: TTree.cxx:6168
Int_t SetBranchAddressImp(TBranch *branch, void *addr, TBranch **ptr)
Change branch address, dealing with clone trees properly.
Definition: TTree.cxx:8297
virtual Int_t GetTimerInterval() const
Definition: TTree.h:508
virtual void SetScanField(Int_t n=50)
Definition: TTree.h:637
TTree(const TTree &tt)=delete
Long64_t fMaxEntries
Maximum number of entries in case of circular buffers.
Definition: TTree.h:96
TBranch * Branch(const char *name, char *address, const char *leaflist, Int_t bufsize=32000)
Definition: TTree.h:374
virtual void DropBuffers(Int_t nbytes)
Drop branch buffers to accommodate nbytes below MaxVirtualsize.
Definition: TTree.cxx:4451
virtual void SetName(const char *name)
Change the name of this tree.
Definition: TTree.cxx:9052
virtual void Delete(Option_t *option="")
Delete this tree from memory or/and disk.
Definition: TTree.cxx:3695
virtual TList * GetListOfFriends() const
Definition: TTree.h:484
virtual void Refresh()
Refresh contents of this tree and its branches from the current status on disk.
Definition: TTree.cxx:7810
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:8085
static Long64_t fgMaxTreeSize
Maximum size of a file containing a Tree.
Definition: TTree.h:151
Long64_t fReadEntry
! Number of the entry being processed
Definition: TTree.h:106
TArrayD fIndexValues
Sorted index values.
Definition: TTree.h:123
void MarkEventCluster()
Mark the previous event as being at the end of the event cluster.
Definition: TTree.cxx:8147
virtual Int_t GetNbranches()
Definition: TTree.h:496
virtual Int_t MakeCode(const char *filename=0)
Generate a skeleton function for this tree.
Definition: TTree.cxx:6543
UInt_t fNEntriesSinceSorting
! Number of entries processed since the last re-sorting of branches
Definition: TTree.h:139
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:6671
virtual void SetFileNumber(Int_t number=0)
Set fFileNumber to number.
Definition: TTree.cxx:9000
virtual TLeaf * FindLeaf(const char *name)
Find leaf..
Definition: TTree.cxx:4834
Int_t GetEvent(Long64_t entry=0, Int_t getall=0)
Definition: TTree.h:463
virtual void StartViewer()
Start the TTreeViewer on this tree.
Definition: TTree.cxx:9280
Int_t GetMakeClass() const
Definition: TTree.h:489
TDirectory * fDirectory
! Pointer to directory holding this tree
Definition: TTree.h:117
ESetBranchAddressStatus
Definition: TTree.h:227
@ kNeedEnableDecomposedObj
Definition: TTree.h:239
@ kClassMismatch
Definition: TTree.h:232
@ kNeedDisableDecomposedObj
Definition: TTree.h:240
@ kVoidPtr
Definition: TTree.h:237
@ kNoCheck
Definition: TTree.h:238
@ kMatchConversionCollection
Definition: TTree.h:235
@ kMissingCompiledCollectionProxy
Definition: TTree.h:230
@ kMismatch
Definition: TTree.h:231
@ kMatchConversion
Definition: TTree.h:234
@ kInternalError
Definition: TTree.h:229
@ kDecomposedObjMask
Definition: TTree.h:241
@ kMatch
Definition: TTree.h:233
@ kMissingBranch
Definition: TTree.h:228
@ kMakeClass
Definition: TTree.h:236
static Int_t fgBranchStyle
Old/New branch style.
Definition: TTree.h:150
virtual void ResetBranchAddresses()
Tell all of our branches to drop their current objects and allocate new ones.
Definition: TTree.cxx:7969
Int_t fNfill
! Local for EntryLoop
Definition: TTree.h:109
virtual Long64_t GetCacheSize() const
Definition: TTree.h:447
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:7851
TArrayI fIndex
Index of sorted values.
Definition: TTree.h:124
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TTree.h:541
virtual Int_t GetPacketSize() const
Definition: TTree.h:499
virtual Int_t SetCacheSize(Long64_t cachesize=-1)
Set maximum size of the file cache .
Definition: TTree.cxx:8533
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:1204
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
Definition: TTree.cxx:8386
TBuffer * GetTransientBuffer(Int_t size)
Returns the transient buffer currently used by this TTree for reading/writing baskets.
Definition: TTree.cxx:1022
ROOT::TIOFeatures GetIOFeatures() const
Returns the current set of IO settings.
Definition: TTree.cxx:5979
virtual Int_t GetFileNumber() const
Definition: TTree.h:470
virtual const char * GetFriendAlias(TTree *) const
If the 'tree' is a friend, this method returns its alias name.
Definition: TTree.cxx:5937
virtual void SetChainOffset(Long64_t offset=0)
Definition: TTree.h:603
virtual Bool_t GetClusterPrefetch() const
Definition: TTree.h:451
virtual Bool_t Notify()
Function called when loading a new class library.
Definition: TTree.cxx:6936
virtual void RemoveExternalFriend(TFriendElement *)
Removes external friend.
Definition: TTree.cxx:7862
virtual Double_t * GetW()
Definition: TTree.h:537
Bool_t MemoryFull(Int_t nbytes)
Check if adding nbytes to memory we are still below MaxVirtualsize.
Definition: TTree.cxx:6740
TTreeFormula * GetVar1()
Definition: TTree.h:520
virtual Double_t * GetV2()
Definition: TTree.h:532
Int_t fPacketSize
! Number of entries in one packet for parallel root
Definition: TTree.h:108
virtual Int_t GetUpdate() const
Definition: TTree.h:515
virtual Long64_t GetChainOffset() const
Definition: TTree.h:450
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:9595
TStreamerInfo * BuildStreamerInfo(TClass *cl, void *pointer=0, Bool_t canOptimize=kTRUE)
Build StreamerInfo for class cl.
Definition: TTree.cxx:2633
virtual TBranch * BranchImpArr(const char *branchname, EDataType datatype, std::size_t N, void *addobj, Int_t bufsize, Int_t splitlevel)
Definition: TTree.cxx:1715
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:7988
virtual Long64_t GetMaxEntryLoop() const
Definition: TTree.h:491
Bool_t fIMTFlush
! True if we are doing a multithreaded flush.
Definition: TTree.h:155
virtual void SetClusterPrefetch(Bool_t enabled)
Definition: TTree.h:605
virtual void AddTotBytes(Int_t tot)
Definition: TTree.h:326
Int_t fMakeClass
! not zero when processing code generated by MakeClass
Definition: TTree.h:114
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:6354
static constexpr Long64_t kMaxEntries
Definition: TTree.h:224
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:7103
virtual Long64_t GetAutoFlush() const
Definition: TTree.h:441
virtual Long64_t GetMaxVirtualSize() const
Definition: TTree.h:494
Abstract interface for Tree Index.
Definition: TVirtualIndex.h:30
Provides the interface for the PROOF internal performance measurement and event tracing.
Abstract base class defining the interface for the plugins that implement Draw, Scan,...
virtual TTreeFormula * GetVar1() const =0
virtual Double_t * GetV4() const =0
virtual Double_t * GetW() const =0
virtual TTreeFormula * GetVar4() const =0
virtual TTreeFormula * GetVar(Int_t) const =0
virtual Double_t * GetVal(Int_t) const =0
virtual TTreeFormula * GetVar2() const =0
virtual Double_t * GetV1() const =0
static constexpr Long64_t kMaxEntries
virtual TTreeFormula * GetVar3() const =0
virtual Double_t * GetV2() const =0
virtual TTreeFormula * GetSelect() const =0
virtual TH1 * GetHistogram() const =0
virtual Long64_t GetSelectedRows() const =0
virtual Double_t * GetV3() const =0
const Int_t n
Definition: legend1.C:16
double T(double x)
Definition: ChebyshevPol.h:34
constexpr std::array< decltype(std::declval< F >()(std::declval< int >())), N > make(F f)
Definition: file.py:1
Definition: first.py:1
Definition: tree.py:1
TCanvas * style()
Definition: style.C:1
auto * tt
Definition: textangle.C:16