Logo ROOT  
Reference Guide
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(0)
43, fRead(0)
44, fN(0)
45, fNdataMax(0)
46, fBranchCount(0)
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(0)
56, fRead(0)
57, fN(0)
58, fNdataMax(0)
59, fBranchCount(0)
60{
61 Init(tree,0,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(0)
70, fRead(0)
71, fN(0)
72, fNdataMax(0)
73, fBranchCount(0)
74{
75 Init(0,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==0 && parent!=0) 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 = 0;
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 = 0;
127 TRealData* rd = 0;
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 = 0;
210 // FIXME: We might own this, possible memory leak.
211 fList = 0;
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 = 0;
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{
305 fBranchCount->Print(option);
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 == 0)) {
360 // We've been asked to allocate an object for the user.
361 *pp= (char*) new TClonesArray(fClassName);
362 }
363 fList = 0;
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
387void TBranchClones::Streamer(TBuffer& b)
388{
389 UInt_t R__s, R__c;
390 if (b.IsReading()) {
391 b.ReadVersion(&R__s, &R__c);
392 TNamed::Streamer(b);
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;
404 fClassName.Streamer(b);
405 fBranches.Streamer(b);
406 fTree = 0;
407 TBranch* branch = 0;
408 TLeaf* leaf = 0;
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 = 0;
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(), kTRUE);
452 TNamed::Streamer(b);
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;
464 fClassName.Streamer(b);
465 fBranches.Streamer(b);
466 b.SetByteCount(R__c, kTRUE);
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:43
unsigned int UInt_t
Definition: RtypesCore.h:44
long long Long64_t
Definition: RtypesCore.h:71
const Bool_t kTRUE
Definition: RtypesCore.h:89
const char Option_t
Definition: RtypesCore.h:64
#define ClassImp(name)
Definition: Rtypes.h:361
char name[80]
Definition: TGX11.cxx:109
int type
Definition: TGX11.cxx:120
A Branch for the case of an array of clone objects.
Definition: TBranchClones.h:29
TClonesArray * fList
! Pointer to the clonesarray
Definition: TBranchClones.h:32
TBranch * fBranchCount
Branch with clones count.
Definition: TBranchClones.h:37
Int_t fN
! Number of elements in ClonesArray
Definition: TBranchClones.h:34
virtual void SetAddress(void *add)
Set address of this branch.
virtual void Browse(TBrowser *b)
Browse this branch.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Int_t fRead
! flag = 1 if clonesarray has been read
Definition: TBranchClones.h:33
virtual ~TBranchClones()
Destructor.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset branch after a merge.
TString fClassName
name of the class of the objets in the ClonesArray
Definition: TBranchClones.h:36
TBranchClones()
Default and i/o constructor.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches and return total number of bytes read.
virtual void SetBasketSize(Int_t buffsize)
Reset basket size for all sub-branches.
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).
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all branches and fill Basket buffer.
virtual void Print(Option_t *option="") const
Print branch parameters.
Int_t fNdataMax
! Maximum value of fN
Definition: TBranchClones.h:35
virtual void Reset(Option_t *option="")
Reset branch.
A TTree is a list of TBranches.
Definition: TBranch.h:91
virtual TLeaf * GetLeaf(const char *name) const
Return pointer to the 1st Leaf named name in thisBranch.
Definition: TBranch.cxx:1919
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
Definition: TBranch.h:147
Int_t fEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
Definition: TBranch.h:117
TBranch()
Default constructor. Used for I/O by default.
Definition: TBranch.cxx:84
Int_t fMaxBaskets
Maximum number of Baskets so far.
Definition: TBranch.h:123
Long64_t fTotBytes
Total number of bytes in all leaves before compression.
Definition: TBranch.h:134
TTree * GetTree() const
Definition: TBranch.h:250
@ kIsClone
Definition: TBranch.h:104
@ kDoNotProcess
Definition: TBranch.h:103
char * fAddress
! Address of 1st leaf (variable or object)
Definition: TBranch.h:145
Int_t fOffset
Offset of this branch.
Definition: TBranch.h:122
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:1591
Long64_t fReadEntry
! Current entry number when reading
Definition: TBranch.h:128
virtual void SetAddress(void *add)
Set address of this branch.
Definition: TBranch.cxx:2546
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:1647
Long64_t fZipBytes
Total number of bytes in all leaves after compression.
Definition: TBranch.h:135
Int_t fSplitLevel
Branch split level.
Definition: TBranch.h:125
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Definition: TBranch.cxx:3168
virtual void Print(Option_t *option="") const
Print TBranch parameters.
Definition: TBranch.cxx:2205
TObjArray fBranches
-> List of Branches of this branch
Definition: TBranch.h:136
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
Definition: TBranch.cxx:2462
TDirectory * fDirectory
! Pointer to directory where this branch buffers are stored
Definition: TBranch.h:146
TBranch * fMother
! Pointer to top-level parent branch in the tree.
Definition: TBranch.h:143
TBranch * fParent
! Pointer to parent branch.
Definition: TBranch.h:144
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:2593
Int_t fWriteBasket
Last basket number written.
Definition: TBranch.h:118
TObjArray * GetListOfLeaves()
Definition: TBranch.h:245
Int_t fBasketSize
Initial Size of Basket Buffer.
Definition: TBranch.h:116
virtual void Reset(Option_t *option="")
Reset a Branch.
Definition: TBranch.cxx:2421
Long64_t fEntryNumber
Current entry number (last one filled in this branch)
Definition: TBranch.h:119
TBranch * GetMother() const
Get our top-level parent branch in the tree.
Definition: TBranch.cxx:1991
Int_t fCompress
Compression level and algorithm.
Definition: TBranch.h:115
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
Definition: TBranch.cxx:844
Long64_t fEntries
Number of entries.
Definition: TBranch.h:132
TTree * fTree
! Pointer to Tree header
Definition: TBranch.h:142
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
Buffer base class used for serializing objects.
Definition: TBuffer.h:42
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Definition: TClass.cxx:2011
TList * GetListOfRealData() const
Definition: TClass.h:450
Bool_t CanIgnoreTObjectStreamer()
Definition: TClass.h:391
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:2948
An array of clone (identical) objects.
Definition: TClonesArray.h:32
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
Definition: TClonesArray.h:56
virtual void Clear(Option_t *option="")
Clear the clones array.
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: TCollection.h:182
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 full type description of data member, e,g.: "class TDirectory*".
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 a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:53
Int_t GetCompressionSettings() const
Definition: TFile.h:398
A TLeaf for an Integer data type.
Definition: TLeafI.h:27
virtual void SetMaximum(Int_t max)
Definition: TLeafI.h:57
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:49
virtual Double_t GetValue(Int_t i=0) const
Definition: TLeaf.h:174
virtual void SetLen(Int_t len=1)
Definition: TLeaf.h:154
virtual void SetAddress(void *add=0)
Definition: TLeaf.h:176
virtual void SetOffset(Int_t offset=0)
Definition: TLeaf.h:155
virtual void SetLeafCount(TLeaf *leaf)
Set the leaf count of this leaf.
Definition: TLeaf.cxx:443
virtual void Import(TClonesArray *, Int_t)
Definition: TLeaf.h:138
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
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
void Add(TObject *obj)
Definition: TObjArray.h:74
TObject * UncheckedAt(Int_t i) const
Definition: TObjArray.h:90
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Definition: TObjArray.cxx:356
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Definition: TObjArray.cxx:415
TObject * At(Int_t idx) const
Definition: TObjArray.h:166
friend class TClonesArray
Definition: TObject.h:228
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:187
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:877
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:694
The TRealData class manages the effective list of all data members for a given class.
Definition: TRealData.h:30
TDataMember * GetDataMember() const
Definition: TRealData.h:53
@ kTransient
Definition: TRealData.h:44
Bool_t IsObject() const
Definition: TRealData.h:56
virtual const char * GetName() const
Returns name of object.
Definition: TRealData.h:52
Long_t GetThisOffset() const
Definition: TRealData.h:55
Basic string class.
Definition: TString.h:131
const char * Data() const
Definition: TString.h:364
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition: TString.cxx:2289
A TTree represents a columnar dataset.
Definition: TTree.h:78
TDirectory * GetDirectory() const
Definition: TTree.h:456
Definition: tree.py:1