Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TBranchClones.cxx
Go to the documentation of this file.
1// @(#)root/tree:$Id$
2// Author: Rene Brun 11/02/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#include "TBranchClones.h"
13
14#include "TBasket.h"
15#include "TBuffer.h"
16#include "TClass.h"
17#include "TClonesArray.h"
18#include "TDataMember.h"
19#include "TDataType.h"
20#include "TFile.h"
21#include "TLeafI.h"
22#include "TRealData.h"
23#include "TTree.h"
24
25#include <cstring>
26
28
29/** \class TBranchClones
30\ingroup tree
31
32A Branch for the case of an array of clone objects.
33
34See TTree.
35*/
36
37////////////////////////////////////////////////////////////////////////////////
38/// Default and i/o constructor.
39
41: TBranch()
42, fList(nullptr)
43, fRead(0)
44, fN(0)
45, fNdataMax(0)
46, fBranchCount(nullptr)
47{
48}
49
50////////////////////////////////////////////////////////////////////////////////
51/// Constructor.
52
53TBranchClones::TBranchClones(TTree *tree, const char* name, void* pointer, Int_t basketsize, Int_t compress, Int_t splitlevel)
54: TBranch()
55, fList(nullptr)
56, fRead(0)
57, fN(0)
58, fNdataMax(0)
59, fBranchCount(nullptr)
60{
61 Init(tree,nullptr,name,pointer,basketsize,compress,splitlevel);
62}
63
64////////////////////////////////////////////////////////////////////////////////
65/// Constructor.
66
67TBranchClones::TBranchClones(TBranch *parent, const char* name, void* pointer, Int_t basketsize, Int_t compress, Int_t splitlevel)
68: TBranch()
69, fList(nullptr)
70, fRead(0)
71, fN(0)
72, fNdataMax(0)
73, fBranchCount(nullptr)
74{
75 Init(nullptr,parent,name,pointer,basketsize,compress,splitlevel);
76}
77
78////////////////////////////////////////////////////////////////////////////////
79/// Initialization (non-virtual, to be called from constructor).
80
81void TBranchClones::Init(TTree *tree, TBranch *parent, const char* name, void* pointer, Int_t basketsize, Int_t compress, Int_t splitlevel)
82{
83 if (tree==nullptr && parent!=nullptr) tree = parent->GetTree();
84 fTree = tree;
85 fMother = parent ? parent->GetMother() : this;
86 fParent = parent;
87
88 TString leaflist;
89 TString branchname;
90 TString branchcount;
92 if ((compress == -1) && tree->GetDirectory()) {
93 TFile* bfile = nullptr;
94 if (tree->GetDirectory()) {
95 bfile = tree->GetDirectory()->GetFile();
96 }
97 if (bfile) {
98 compress = bfile->GetCompressionSettings();
99 }
100 }
101 char* cpointer = (char*) pointer;
102 char** ppointer = (char**) pointer;
103 fList = (TClonesArray*) *ppointer;
104 fAddress = cpointer;
105 TClass* cl = fList->GetClass();
106 if (!cl) {
107 return;
108 }
109 tree->BuildStreamerInfo(cl);
110 fClassName = cl->GetName();
111 fSplitLevel = splitlevel;
112
113 // Create a branch to store the array count.
114 if (basketsize < 100) {
115 basketsize = 100;
116 }
117 leaflist.Form("%s_/I", name);
118 branchcount.Form("%s_", name);
119 fBranchCount = new TBranch(this, branchcount, &fN, leaflist, basketsize);
121 TLeaf* leafcount = (TLeaf*) fBranchCount->GetListOfLeaves()->UncheckedAt(0);
123 fFileName = "";
124
125 // Loop on all public data members of the class and its base classes.
126 const char* itype = nullptr;
127 TRealData* rd = nullptr;
128 TIter next(cl->GetListOfRealData());
129 while ((rd = (TRealData *) next())) {
130 if (rd->TestBit(TRealData::kTransient)) continue;
131
132 if (rd->IsObject()) {
133 continue;
134 }
135 TDataMember* member = rd->GetDataMember();
136 if (!member->IsPersistent()) {
137 // -- Skip non-persistent members.
138 continue;
139 }
140 if (!member->IsBasic() || member->IsaPointer()) {
141 Warning("BranchClones", "Cannot process: %s::%s", cl->GetName(), member->GetName());
142 continue;
143 }
144 // Forget TObject part if splitlevel = 2.
145 if ((splitlevel > 1) || fList->TestBit(TClonesArray::kForgetBits) || cl->CanIgnoreTObjectStreamer()) {
146 if (!std::strcmp(member->GetName(), "fBits")) {
147 continue;
148 }
149 if (!std::strcmp(member->GetName(), "fUniqueID")) {
150 continue;
151 }
152 }
153 tree->BuildStreamerInfo(TClass::GetClass(member->GetFullTypeName()));
154 TDataType* membertype = member->GetDataType();
155 Int_t type = membertype->GetType();
156 if (!type) {
157 Warning("BranchClones", "Cannot process: %s::%s of type zero!", cl->GetName(), member->GetName());
158 continue;
159 }
160
161 if (type == 1) {
162 itype = "B";
163 } else if (type == 2) {
164 itype = "S";
165 } else if (type == 3) {
166 itype = "I";
167 } else if (type == 5) {
168 itype = "F";
169 } else if (type == 8) {
170 itype = "D";
171 } else if (type == 9) {
172 itype = "D";
173 } else if (type == 11) {
174 itype = "b";
175 } else if (type == 12) {
176 itype = "s";
177 } else if (type == 13) {
178 itype = "i";
179 }
180
181 leaflist.Form("%s[%s]/%s", member->GetName(), branchcount.Data(), itype);
182 Int_t comp = compress;
183 branchname.Form("%s.%s", name, rd->GetName());
184 TBranch* branch = new TBranch(this, branchname, this, leaflist, basketsize, comp);
185 branch->SetBit(kIsClone);
186 TObjArray* leaves = branch->GetListOfLeaves();
187 TLeaf* leaf = (TLeaf*) leaves->UncheckedAt(0);
188 leaf->SetOffset(rd->GetThisOffset());
189 leaf->SetLeafCount(leafcount);
190 Int_t arraydim = member->GetArrayDim();
191 if (arraydim) {
192 Int_t maxindex = 1;
193 while (arraydim) {
194 maxindex *= member->GetMaxIndex(--arraydim);
195 }
196 leaf->SetLen(maxindex);
197 }
198 fBranches.Add(branch);
199 }
200}
201
202////////////////////////////////////////////////////////////////////////////////
203/// Destructor.
204
206{
207 delete fBranchCount;
208 fBranchCount = nullptr;
210 // FIXME: We might own this, possible memory leak.
211 fList = nullptr;
212}
213
214////////////////////////////////////////////////////////////////////////////////
215/// Browse this branch.
216
218{
220}
221
222////////////////////////////////////////////////////////////////////////////////
223/// Loop on all branches and fill Basket buffer.
224
226{
227 Int_t i = 0;
228 Int_t nbytes = 0;
229 Int_t nbranches = fBranches.GetEntriesFast();
230 char** ppointer = (char**) fAddress;
231 if (!ppointer) {
232 return 0;
233 }
234 fList = (TClonesArray*) *ppointer;
236 fEntries++;
237 if (fN > fNdataMax) {
239 TString branchcount;
240 branchcount.Form("%s_", GetName());
241 TLeafI* leafi = (TLeafI*) fBranchCount->GetLeaf(branchcount);
242 leafi->SetMaximum(fNdataMax);
243 for (i = 0; i < nbranches; i++) {
244 TBranch* branch = (TBranch*) fBranches.UncheckedAt(i);
245 TObjArray* leaves = branch->GetListOfLeaves();
246 TLeaf* leaf = (TLeaf*) leaves->UncheckedAt(0);
247 leaf->SetAddress();
248 }
249 }
250 nbytes += fBranchCount->FillImpl(imtHelper);
251 for (i = 0; i < nbranches; i++) {
252 TBranch* branch = (TBranch*) fBranches.UncheckedAt(i);
253 TObjArray* leaves = branch->GetListOfLeaves();
254 TLeaf* leaf = (TLeaf*) leaves->UncheckedAt(0);
255 leaf->Import(fList, fN);
256 nbytes += branch->FillImpl(imtHelper);
257 }
258 return nbytes;
259}
260
261////////////////////////////////////////////////////////////////////////////////
262/// Read all branches and return total number of bytes read.
263
265{
266 if (TestBit(kDoNotProcess) && !getall) {
267 return 0;
268 }
269 Int_t nbytes = fBranchCount->GetEntry(entry, getall);
270 TLeaf* leafcount = (TLeaf*) fBranchCount->GetListOfLeaves()->UncheckedAt(0);
271 fN = Int_t(leafcount->GetValue());
272 if (fN <= 0) {
273 if (fList) {
274 fList->Clear();
275 }
276 return 0;
277 }
278 TBranch* branch = nullptr;
279 Int_t nbranches = fBranches.GetEntriesFast();
280 // If fList exists, create clones array objects.
281 if (fList) {
282 fList->Clear();
284 for (Int_t i = 0; i < nbranches; i++) {
285 branch = (TBranch*) fBranches.UncheckedAt(i);
286 if (((TLeaf*) branch->GetListOfLeaves()->UncheckedAt(0))->GetOffset() < 0) {
287 continue;
288 }
289 nbytes += branch->GetEntryExport(entry, getall, fList, fN);
290 }
291 } else {
292 for (Int_t i = 0; i < nbranches; i++) {
293 branch = (TBranch*) fBranches.UncheckedAt(i);
294 nbytes += branch->GetEntry(entry, getall);
295 }
296 }
297 return nbytes;
298}
299
300////////////////////////////////////////////////////////////////////////////////
301/// Print branch parameters.
302
304{
306 Int_t nbranches = fBranches.GetEntriesFast();
307 for (Int_t i = 0; i < nbranches; i++) {
308 TBranch* branch = (TBranch*) fBranches.At(i);
309 branch->Print(option);
310 }
311}
312
313////////////////////////////////////////////////////////////////////////////////
314/// Reset branch.
315///
316/// - Existing buffers are deleted
317/// - Entries, max and min are reset
318
320{
321 fEntries = 0;
322 fTotBytes = 0;
323 fZipBytes = 0;
324 Int_t nbranches = fBranches.GetEntriesFast();
325 for (Int_t i = 0; i < nbranches; i++) {
326 TBranch* branch = (TBranch*) fBranches.At(i);
327 branch->Reset(option);
328 }
330}
331
332////////////////////////////////////////////////////////////////////////////////
333/// Reset branch after a merge.
334///
335/// - Existing buffers are deleted
336/// - Entries, max and min are reset
337
339{
340 fEntries = 0;
341 fTotBytes = 0;
342 fZipBytes = 0;
343 Int_t nbranches = fBranches.GetEntriesFast();
344 for (Int_t i = 0; i < nbranches; i++) {
345 TBranch* branch = (TBranch*) fBranches.At(i);
346 branch->ResetAfterMerge(info);
347 }
349}
350
351////////////////////////////////////////////////////////////////////////////////
352/// Set address of this branch.
353
355{
356 fReadEntry = -1;
357 fAddress = (char*) addr;
358 char** pp= (char**) fAddress;
359 if (pp && (*pp == nullptr)) {
360 // We've been asked to allocate an object for the user.
361 *pp= (char*) new TClonesArray(fClassName);
362 }
363 fList = nullptr;
364 if (pp) {
365 fList = (TClonesArray*) *pp;
366 }
368}
369
370////////////////////////////////////////////////////////////////////////////////
371/// Reset basket size for all sub-branches.
372
374{
375 TBranch::SetBasketSize(buffsize);
376
377 Int_t nbranches = fBranches.GetEntriesFast();
378 for (Int_t i = 0; i < nbranches; i++) {
379 TBranch* branch = (TBranch*) fBranches[i];
380 branch->SetBasketSize(fBasketSize);
381 }
382}
383
384////////////////////////////////////////////////////////////////////////////////
385/// Serialize/Deserialize from a buffer.
386
388{
389 UInt_t R__s, R__c;
390 if (b.IsReading()) {
391 b.ReadVersion(&R__s, &R__c);
393 b >> fCompress;
394 b >> fBasketSize;
396 b >> fMaxBaskets;
397 b >> fWriteBasket;
398 b >> fEntryNumber;
399 b >> fEntries;
400 b >> fTotBytes;
401 b >> fZipBytes;
402 b >> fOffset;
403 b >> fBranchCount;
406 fTree = nullptr;
407 TBranch* branch = nullptr;
408 TLeaf* leaf = nullptr;
409 Int_t nbranches = fBranches.GetEntriesFast();
410 for (Int_t i = 0; i < nbranches; i++) {
411 branch = (TBranch*) fBranches[i];
412 branch->SetBit(kIsClone);
413 leaf = (TLeaf*) branch->GetListOfLeaves()->UncheckedAt(0);
414 leaf->SetOffset(-1);
415 }
416 fRead = 1;
417 TClass* cl = TClass::GetClass((const char*) fClassName);
418 if (!cl) {
419 Warning("Streamer", "Unknown class: %s. Cannot read BranchClones: %s", fClassName.Data(), GetName());
421 return;
422 }
423 if (!cl->GetListOfRealData()) {
424 cl->BuildRealData();
425 }
426 TString branchname;
427 TRealData* rd = nullptr;
428 TIter next(cl->GetListOfRealData());
429 while ((rd = (TRealData*) next())) {
430 if (rd->TestBit(TRealData::kTransient)) continue;
431
432 TDataMember* member = rd->GetDataMember();
433 if (!member || !member->IsBasic() || !member->IsPersistent()) {
434 continue;
435 }
436 TDataType* membertype = member->GetDataType();
437 if (!membertype->GetType()) {
438 continue;
439 }
440 branchname.Form("%s.%s", GetName(), rd->GetName());
441 branch = (TBranch*) fBranches.FindObject(branchname);
442 if (!branch) {
443 continue;
444 }
445 TObjArray* leaves = branch->GetListOfLeaves();
446 leaf = (TLeaf*) leaves->UncheckedAt(0);
447 leaf->SetOffset(rd->GetThisOffset());
448 }
449 b.CheckByteCount(R__s, R__c, TBranchClones::IsA());
450 } else {
451 R__c = b.WriteVersion(TBranchClones::IsA(), true);
453 b << fCompress;
454 b << fBasketSize;
456 b << fMaxBaskets;
457 b << fWriteBasket;
458 b << fEntryNumber;
459 b << fEntries;
460 b << fTotBytes;
461 b << fZipBytes;
462 b << fOffset;
463 b << fBranchCount;
466 b.SetByteCount(R__c, true);
467 }
468}
469
470////////////////////////////////////////////////////////////////////////////////
471/// Refresh the value of fDirectory (i.e. where this branch writes/reads its buffers)
472/// with the current value of fTree->GetCurrentFile unless this branch has been
473/// redirected to a different file. Also update the sub-branches.
474
476{
479}
#define b(i)
Definition RSha256.hxx:100
int Int_t
Definition RtypesCore.h:45
long long Long64_t
Definition RtypesCore.h:69
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:382
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char name[80]
Definition TGX11.cxx:110
A helper class for managing IMT work during TTree:Fill operations.
A Branch for the case of an array of clone objects.
TClonesArray * fList
! Pointer to the clonesarray
void UpdateFile() override
Refresh the value of fDirectory (i.e.
TBranch * fBranchCount
Branch with clones count.
Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *) override
Loop on all branches and fill Basket buffer.
void SetAddress(void *add) override
Set address of this branch.
void Browse(TBrowser *b) override
Browse this branch.
Int_t fN
! Number of elements in ClonesArray
void Reset(Option_t *option="") override
Reset branch.
void Print(Option_t *option="") const override
Print branch parameters.
Int_t fRead
! flag = 1 if clonesarray has been read
void Streamer(TBuffer &) override
Serialize/Deserialize from a buffer.
TString fClassName
Name of the class of the objets in the ClonesArray.
void SetBasketSize(Int_t buffsize) override
Reset basket size for all sub-branches.
TClass * IsA() const override
TBranchClones()
Default and i/o constructor.
void ResetAfterMerge(TFileMergeInfo *) override
Reset branch after a merge.
~TBranchClones() override
Destructor.
Int_t GetEntry(Long64_t entry=0, Int_t getall=0) override
Read all branches and return total number of bytes read.
void Init(TTree *tree, TBranch *parent, const char *name, void *clonesaddress, Int_t basketsize=32000, Int_t compress=-1, Int_t splitlevel=1)
Initialization (non-virtual, to be called from constructor).
Int_t fNdataMax
! Maximum value of fN
A TTree is a list of TBranches.
Definition TBranch.h:93
virtual TLeaf * GetLeaf(const char *name) const
Return pointer to the 1st Leaf named name in thisBranch.
Definition TBranch.cxx:2055
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
Definition TBranch.h:149
Int_t fEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
Definition TBranch.h:119
TBranch()
Default constructor. Used for I/O by default.
Definition TBranch.cxx:87
Int_t fMaxBaskets
Maximum number of Baskets so far.
Definition TBranch.h:125
Long64_t fTotBytes
Total number of bytes in all leaves before compression.
Definition TBranch.h:136
TTree * GetTree() const
Definition TBranch.h:252
@ kIsClone
To indicate a TBranchClones.
Definition TBranch.h:106
@ kDoNotProcess
Active bit for branches.
Definition TBranch.h:105
char * fAddress
! Address of 1st leaf (variable or object)
Definition TBranch.h:147
Int_t fOffset
Offset of this branch.
Definition TBranch.h:124
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
Definition TBranch.cxx:1706
Long64_t fReadEntry
! Current entry number when reading
Definition TBranch.h:130
void Print(Option_t *option="") const override
Print TBranch parameters.
Definition TBranch.cxx:2341
virtual void SetAddress(void *add)
Set address of this branch.
Definition TBranch.cxx:2682
virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesArray *list, Int_t n)
Read all leaves of an entry and export buffers to real objects in a TClonesArray list.
Definition TBranch.cxx:1762
Long64_t fZipBytes
Total number of bytes in all leaves after compression.
Definition TBranch.h:137
Int_t fSplitLevel
Branch split level.
Definition TBranch.h:127
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Definition TBranch.cxx:3304
TObjArray fBranches
-> List of Branches of this branch
Definition TBranch.h:138
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
Definition TBranch.cxx:2598
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
Definition TBranch.h:148
TBranch * fMother
! Pointer to top-level parent branch in the tree.
Definition TBranch.h:145
TBranch * fParent
! Pointer to parent branch.
Definition TBranch.h:146
virtual void SetBasketSize(Int_t buffsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
Definition TBranch.cxx:2729
Int_t fWriteBasket
Last basket number written.
Definition TBranch.h:120
TObjArray * GetListOfLeaves()
Definition TBranch.h:247
Int_t fBasketSize
Initial Size of Basket Buffer.
Definition TBranch.h:118
virtual void Reset(Option_t *option="")
Reset a Branch.
Definition TBranch.cxx:2557
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
Definition TBranch.h:121
TBranch * GetMother() const
Get our top-level parent branch in the tree.
Definition TBranch.cxx:2127
Int_t fCompress
Compression level and algorithm.
Definition TBranch.h:117
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
Definition TBranch.cxx:856
Long64_t fEntries
Number of entries.
Definition TBranch.h:134
TTree * fTree
! Pointer to Tree header
Definition TBranch.h:144
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
Buffer base class used for serializing objects.
Definition TBuffer.h:43
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
void BuildRealData(void *pointer=nullptr, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Definition TClass.cxx:2100
TList * GetListOfRealData() const
Definition TClass.h:453
Bool_t CanIgnoreTObjectStreamer()
Definition TClass.h:393
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Definition TClass.cxx:3037
An array of clone (identical) objects.
virtual void ExpandCreateFast(Int_t n)
Expand or shrink the array to n elements and create the clone objects by calling their default ctor.
TClass * GetClass() const
void Clear(Option_t *option="") override
Clear the clones array.
void Browse(TBrowser *b) override
Browse this collection (called by TBrowser).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
All ROOT classes may have RTTI (run time type identification) support added.
Definition TDataMember.h:31
Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
Bool_t IsPersistent() const
Definition TDataMember.h:91
Int_t GetArrayDim() const
Return number of array dimensions.
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
Bool_t IsaPointer() const
Return true if data member is a pointer.
TDataType * GetDataType() const
Definition TDataMember.h:76
const char * GetFullTypeName() const
Get the concrete type name of this data member, including const and volatile qualifiers.
Basic data type descriptor (datatype information is obtained from CINT).
Definition TDataType.h:44
Int_t GetType() const
Definition TDataType.h:68
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Definition TFile.h:53
Int_t GetCompressionSettings() const
Definition TFile.h:397
A TLeaf for an Integer data type.
Definition TLeafI.h:27
virtual void SetMaximum(Int_t max)
Definition TLeafI.h:56
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition TLeaf.h:57
virtual Double_t GetValue(Int_t i=0) const
Definition TLeaf.h:183
virtual void SetLen(Int_t len=1)
Definition TLeaf.h:163
virtual void SetAddress(void *add=nullptr)
Definition TLeaf.h:185
virtual void SetOffset(Int_t offset=0)
Definition TLeaf.h:164
virtual void SetLeafCount(TLeaf *leaf)
Set the leaf count of this leaf.
Definition TLeaf.cxx:465
virtual void Import(TClonesArray *, Int_t)
Definition TLeaf.h:147
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
void Streamer(TBuffer &) override
Stream an object of class TObject.
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:140
An array of TObjects.
Definition TObjArray.h:31
Int_t GetEntriesFast() const
Definition TObjArray.h:58
void Streamer(TBuffer &) override
Stream all objects in the array to or from the I/O buffer.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
Definition TObjArray.h:164
TObject * UncheckedAt(Int_t i) const
Definition TObjArray.h:84
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
void Add(TObject *obj) override
Definition TObjArray.h:68
friend class TClonesArray
Definition TObject.h:240
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:199
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:991
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:798
The TRealData class manages the effective list of all data members for a given class.
Definition TRealData.h:30
const char * GetName() const override
Returns name of object.
Definition TRealData.h:52
TDataMember * GetDataMember() const
Definition TRealData.h:53
Bool_t IsObject() const
Definition TRealData.h:56
Long_t GetThisOffset() const
Definition TRealData.h:55
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376
virtual void Streamer(TBuffer &)
Stream a string object.
Definition TString.cxx:1412
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition TString.cxx:2356
A TTree represents a columnar dataset.
Definition TTree.h:79
TDirectory * GetDirectory() const
Definition TTree.h:462