Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TBranchObject.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/** \class TBranchObject
13\ingroup tree
14
15A Branch for the case of an object.
16*/
17
18#include "TBranchObject.h"
19
20#include "TBasket.h"
21#include "TBranchClones.h"
22#include "TBrowser.h"
23#include "TBuffer.h"
24#include "TClass.h"
25#include "TClonesArray.h"
26#include "TDataMember.h"
27#include "TDataType.h"
28#include "TFile.h"
29#include "TLeafObject.h"
30#include "TRealData.h"
31#include "TStreamerInfo.h"
32#include "TTree.h"
33#include "snprintf.h"
34
35
36////////////////////////////////////////////////////////////////////////////////
37/// Default constructor for BranchObject.
38
40: TBranch()
41{
42 fNleaves = 1;
43 fOldObject = nullptr;
44}
45
46////////////////////////////////////////////////////////////////////////////////
47/// Create a BranchObject.
48
49TBranchObject::TBranchObject(TTree *tree, const char* name, const char* classname, void* addobj, Int_t basketsize, Int_t splitlevel, Int_t compress, bool isptrptr /* = true */)
50: TBranch()
51{
52 Init(tree,nullptr,name,classname,addobj,basketsize,splitlevel,compress,isptrptr);
53}
54
55////////////////////////////////////////////////////////////////////////////////
56/// Create a BranchObject.
57
58TBranchObject::TBranchObject(TBranch *parent, const char* name, const char* classname, void* addobj, Int_t basketsize, Int_t splitlevel, Int_t compress, bool isptrptr /* = true */)
59: TBranch()
60{
61 Init(nullptr,parent,name,classname,addobj,basketsize,splitlevel,compress,isptrptr);
62}
63
64////////////////////////////////////////////////////////////////////////////////
65/// Initialization routine (run from the constructor so do not make this function virtual)
66
67void TBranchObject::Init(TTree *tree, TBranch *parent, const char* name, const char* classname, void* addobj, Int_t basketsize, Int_t /*splitlevel*/, Int_t compress, bool isptrptr)
68{
69 if (tree==nullptr && parent!=nullptr) tree = parent->GetTree();
70 fTree = tree;
71 fMother = parent ? parent->GetMother() : this;
72 fParent = parent;
73
74 TClass* cl = TClass::GetClass(classname);
75
76 if (!cl) {
77 Error("TBranchObject", "Cannot find class:%s", classname);
78 return;
79 }
80
81 if (!isptrptr) {
84 } else {
85 fOldObject = nullptr;
86 }
87
88 char** apointer = (char**) addobj;
89 TObject* obj = (TObject*) (*apointer);
90
91 bool delobj = false;
92 if (!obj) {
93 obj = (TObject*) cl->New();
94 delobj = true;
95 }
96
97 tree->BuildStreamerInfo(cl, obj);
98
99 if (delobj) {
100 cl->Destructor(obj);
101 }
102
103 SetName(name);
104 SetTitle(name);
105
107 if ((compress == -1) && tree->GetDirectory()) {
108 TFile* bfile = tree->GetDirectory()->GetFile();
109 if (bfile) {
110 fCompress = bfile->GetCompressionSettings();
111 }
112 }
113 if (basketsize < 100) {
114 basketsize = 100;
115 }
117 fAddress = (char*) addobj;
118 fClassName = classname;
122
123 for (Int_t i = 0; i < fMaxBaskets; ++i) {
124 fBasketBytes[i] = 0;
125 fBasketEntry[i] = 0;
126 fBasketSeek[i] = 0;
127 }
128
129 TLeaf* leaf = new TLeafObject(this, name, classname);
130 leaf->SetAddress(addobj);
131 fNleaves = 1;
133 tree->GetListOfLeaves()->Add(leaf);
134
135 // Set the bit kAutoDelete to specify that when reading
136 // in TLeafObject::ReadBasket, the object should be deleted
137 // before calling Streamer.
138 // It is foreseen to not set this bit in a future version.
139 if (isptrptr) SetAutoDelete(true);
140
142 fFileName = "";
143
144}
145
146////////////////////////////////////////////////////////////////////////////////
147/// Destructor for a BranchObject.
148
153
154////////////////////////////////////////////////////////////////////////////////
155/// Browse the branch content.
156
158{
160 if (nbranches > 1) {
162 }
163 if (GetBrowsables() && GetBrowsables()->GetSize()) {
164 GetBrowsables()->Browse(b);
165 }
166}
167
168////////////////////////////////////////////////////////////////////////////////
169/// Loop on all leaves of this branch to fill Basket buffer.
170
172{
173 Int_t nbytes = 0;
175 if (nbranches) {
176 ++fEntries;
178 for (Int_t i = 0; i < nbranches; ++i) {
180 if (!branch->TestBit(kDoNotProcess)) {
181 Int_t bc = branch->FillImpl(imtHelper);
182 nbytes += bc;
183 }
184 }
185 } else {
186 if (!TestBit(kDoNotProcess)) {
188 nbytes += bc;
189 }
190 }
191 return nbytes;
192}
193
194////////////////////////////////////////////////////////////////////////////////
195/// Read all branches of a BranchObject and return total number of bytes.
196///
197/// - If entry = 0 take current entry number + 1
198/// - If entry < 0 reset entry number to 0
199///
200/// The function returns the number of bytes read from the input buffer.
201///
202/// - If entry does not exist the function returns 0.
203/// - If an I/O error occurs, the function returns -1.
204
206{
207 if (TestBit(kDoNotProcess) && !getall) {
208 return 0;
209 }
212
213 if (nbranches) {
214 if (fAddress == nullptr) {
216 }
217 nbytes = 0;
218 Int_t nb;
219 for (Int_t i = 0; i < nbranches; ++i) {
221 if (branch) {
222 nb = branch->GetEntry(entry, getall);
223 if (nb < 0) {
224 return nb;
225 }
226 nbytes += nb;
227 }
228 }
229 } else {
231 }
232 return nbytes;
233}
234
235////////////////////////////////////////////////////////////////////////////////
236/// Fill expectedClass and expectedType with information on the data type of the
237/// object/values contained in this branch (and thus the type of pointers
238/// expected to be passed to Set[Branch]Address
239/// return 0 in case of success and > 0 in case of failure.
240
242{
243 expectedClass = nullptr;
246 if (!lobj) {
247 Error("GetExpectedType", "Did not find any leaves in %s",GetName());
248 return 1;
249 }
250 expectedClass = lobj->GetClass();
251 return 0;
252}
253
254////////////////////////////////////////////////////////////////////////////////
255/// Return TRUE if more than one leaf or if fBrowsables, FALSE otherwise.
256
258{
260
261 if (nbranches >= 1) {
262 return true;
263 }
264
265 TList* browsables = const_cast<TBranchObject*>(this)->GetBrowsables();
266
267 return browsables && browsables->GetSize();
268}
269
270////////////////////////////////////////////////////////////////////////////////
271/// Print TBranch parameters.
272
274{
276 if (nbranches) {
277 Printf("*Branch :%-9s : %-54s *", GetName(), GetTitle());
278 Printf("*Entries : %8d : BranchObject (see below) *", Int_t(fEntries));
279 Printf("*............................................................................*");
280 for (Int_t i = 0; i < nbranches; ++i) {
282 if (branch) {
283 branch->Print(option);
284 }
285 }
286 } else {
288 }
289}
290
291////////////////////////////////////////////////////////////////////////////////
292/// Reset a branch.
293///
294/// - Existing buffers are deleted.
295/// - Entries, max and min are reset.
296
298{
300
302 for (Int_t i = 0; i < nbranches; ++i) {
304 branch->Reset(option);
305 }
306}
307
308////////////////////////////////////////////////////////////////////////////////
309/// Reset a Branch after a Merge operation (drop data but keep customizations)
311{
313
315 for (Int_t i = 0; i < nbranches; ++i) {
317 branch->ResetAfterMerge(info);
318 }
319}
320
321////////////////////////////////////////////////////////////////////////////////
322/// Set address of this branch.
323
325{
326 if (TestBit(kDoNotProcess)) {
327 return;
328 }
329
330 // Special case when called from code generated by TTree::MakeClass.
331 if (Longptr_t(add) == -1) {
332 SetBit(kWarn);
333 return;
334 }
335
336 fReadEntry = -1;
338
340 if (leaf) {
341 leaf->SetAddress(add);
342 }
343
344 fAddress = (char*) add;
345 char** ppointer = (char**) add;
346
347 char* obj = nullptr;
348 if (ppointer) {
349 obj = *ppointer;
350 }
351
353
354 if (!cl) {
355 for (Int_t i = 0; i < nbranches; ++i) {
356 TBranch* br = (TBranch*) fBranches[i];
357 br->SetAddress(obj);
358 }
359 return;
360 }
361
362 if (ppointer && !obj) {
363 obj = (char*) cl->New();
364 *ppointer = obj;
365 }
366
367 if (!cl->GetListOfRealData()) {
368 cl->BuildRealData(obj);
369 }
370
372 if (ppointer) {
374 if (!clones) {
375 Error("SetAddress", "Pointer to TClonesArray is null");
376 return;
377 }
378 TClass* clm = clones->GetClass();
379 if (clm) {
380 clm->BuildRealData(); //just in case clm derives from an abstract class
381 clm->GetStreamerInfo();
382 }
383 }
384 }
385
386 //
387 // Loop over our data members looking
388 // for sub-branches for them. If we
389 // find one, set its address.
390 //
391
392 char* fullname = new char[200];
393
394 const char* bname = GetName();
395
396 Int_t isDot = 0;
397 if (bname[strlen(bname)-1] == '.') {
398 isDot = 1;
399 }
400
401 char* pointer = nullptr;
402 TRealData* rd = nullptr;
403 TIter next(cl->GetListOfRealData());
404 while ((rd = (TRealData*) next())) {
405 if (rd->TestBit(TRealData::kTransient)) continue;
406
407 TDataMember* dm = rd->GetDataMember();
408 if (!dm || !dm->IsPersistent()) {
409 continue;
410 }
411 const char* rdname = rd->GetName();
412 TDataType* dtype = dm->GetDataType();
413 Int_t code = 0;
414 if (dtype) {
415 code = dm->GetDataType()->GetType();
416 }
417 Int_t offset = rd->GetThisOffset();
418 if (ppointer) {
419 pointer = obj + offset;
420 }
421 TBranch* branch = nullptr;
422 if (dm->IsaPointer()) {
423 TClass* clobj = nullptr;
424 if (!dm->IsBasic()) {
426 }
427 if (clobj && clobj->InheritsFrom(TClonesArray::Class())) {
428 if (isDot) {
429 snprintf(fullname,200, "%s%s", bname, &rdname[1]);
430 } else {
431 snprintf(fullname,200, "%s", &rdname[1]);
432 }
433 branch = (TBranch*) fBranches.FindObject(fullname);
434 } else {
435 if (!clobj) {
436 // this is a basic type we can handle only if
437 // it has a dimension:
438 const char* index = dm->GetArrayIndex();
439 if (!index[0]) {
440 if (code == 1) {
441 // Case of a string ... we do not need the size
442 if (isDot) {
443 snprintf(fullname,200, "%s%s", bname, &rdname[0]);
444 } else {
445 snprintf(fullname,200, "%s", &rdname[0]);
446 }
447 } else {
448 continue;
449 }
450 }
451 if (isDot) {
452 snprintf(fullname,200, "%s%s", bname, &rdname[0]);
453 } else {
454 snprintf(fullname,200, "%s", &rdname[0]);
455 }
456 // let's remove the stars!
458 UInt_t pos;
459 for (cursor = 0, pos = 0; cursor < strlen(fullname); ++cursor) {
460 if (fullname[cursor] != '*') {
461 fullname[pos++] = fullname[cursor];
462 }
463 }
464 fullname[pos] = '\0';
465 branch = (TBranch*) fBranches.FindObject(fullname);
466 } else {
467 if (!clobj->IsTObject()) {
468 continue;
469 }
470 if (isDot) {
471 snprintf(fullname,200, "%s%s", bname, &rdname[1]);
472 } else {
473 snprintf(fullname,200, "%s", &rdname[1]);
474 }
475 branch = (TBranch*) fBranches.FindObject(fullname);
476 }
477 }
478 } else {
479 if (dm->IsBasic()) {
480 if (isDot) {
481 snprintf(fullname,200, "%s%s", bname, &rdname[0]);
482 } else {
483 snprintf(fullname,200, "%s", &rdname[0]);
484 }
485 branch = (TBranch*) fBranches.FindObject(fullname);
486 }
487 }
488 if (branch) {
489 branch->SetAddress(pointer);
490 }
491 }
492
493 delete[] fullname;
494}
495
496////////////////////////////////////////////////////////////////////////////////
497/// Set the AutoDelete bit.
498///
499/// This function can be used to instruct Root in TBranchObject::ReadBasket
500/// to not delete the object referenced by a branchobject before reading a
501/// new entry. By default, the object is deleted.
502/// - If autodel is true, this existing object will be deleted, a new object
503/// created by the default constructor, then object->Streamer called.
504/// - If autodel is false, the existing object is not deleted. Root assumes
505/// that the user is taking care of deleting any internal object or array
506/// This can be done in Streamer itself.
507/// - If this branch has sub-branches, the function sets autodel for these
508/// branches as well.
509/// We STRONGLY suggest to activate this option by default when you create
510/// the top level branch. This will make the read phase more efficient
511/// because it minimizes the numbers of new/delete operations.
512/// Once this option has been set and the Tree is written to a file, it is
513/// not necessary to specify the option again when reading, unless you
514/// want to set the opposite mode.
515
517{
519
521 for (Int_t i=0;i<nbranches;i++) {
523 branch->SetAutoDelete(autodel);
524 }
525}
526
527////////////////////////////////////////////////////////////////////////////////
528/// Reset basket size for all subbranches of this branch.
529
531{
533
535 for (Int_t i = 0; i < nbranches; ++i) {
537 branch->SetBasketSize(fBasketSize);
538 }
539}
540
541////////////////////////////////////////////////////////////////////////////////
542/// Stream an object of class TBranchObject.
543
545{
546 if (R__b.IsReading()) {
547 R__b.ReadClassBuffer(TBranchObject::Class(), this);
548 // We should rewarn in this process.
551 } else {
553 fDirectory = nullptr; // to avoid recursive calls
554
555 R__b.WriteClassBuffer(TBranchObject::Class(), this);
556
557 // make sure that all TStreamerInfo objects referenced by
558 // this class are written to the file
559 R__b.ForceWriteInfo(TClass::GetClass(fClassName.Data())->GetStreamerInfo(), true);
560
561 // if branch is in a separate file save this branch
562 // as an independent key
563 if (!dirsav) {
564 return;
565 }
566 if (!dirsav->IsWritable()) {
568 return;
569 }
571 if (!pdirectory) {
573 return;
574 }
575 const char* treeFileName = pdirectory->GetFile()->GetName();
577 const char* motherFileName = treeFileName;
578 if (mother && (mother != this)) {
579 motherFileName = mother->GetFileName();
580 }
581 if ((fFileName.Length() > 0) && strcmp(motherFileName, fFileName.Data())) {
582 dirsav->WriteTObject(this);
583 }
585 }
586}
587
588////////////////////////////////////////////////////////////////////////////////
589/// -- If the branch address is not set, we set all addresses starting with
590/// the top level parent branch. This is required to be done in order for
591/// GetOffset to be correct and for GetEntry to run.
592
594{
595 if (fAddress == nullptr) {
596 // try to create object
597 if (!TestBit(kWarn)) {
599 if (cl) {
600 TObject** voidobj = (TObject**) new Long_t[1];
601 *voidobj = (TObject*) cl->New();
603 } else {
604 Warning("GetEntry", "Cannot get class: %s", fClassName.Data());
605 SetBit(kWarn);
606 }
607 }
608 }
609}
610
611////////////////////////////////////////////////////////////////////////////////
612/// Update branch addresses if a new object was created.
613
615{
616 void** ppointer = (void**) fAddress;
617 if (!ppointer) {
618 return;
619 }
620 TObject* obj = (TObject*) (*ppointer);
621 if (obj != fOldObject) {
622 fOldObject = obj;
624 }
625}
626
#define b(i)
Definition RSha256.hxx:100
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
Definition RtypesCore.h:89
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
Definition RtypesCore.h:68
long long Long64_t
Portable signed long integer 8 bytes.
Definition RtypesCore.h:83
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
EDataType
Definition TDataType.h:28
@ kOther_t
Definition TDataType.h:32
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 cursor
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 offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
char name[80]
Definition TGX11.cxx:110
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
Definition TString.cxx:2509
#define snprintf
Definition civetweb.c:1579
A helper class for managing IMT work during TTree:Fill operations.
A Branch for the case of an object.
void SetAddress(void *addobj) override
Set address of this branch.
void ResetAfterMerge(TFileMergeInfo *) override
Reset a Branch after a Merge operation (drop data but keep customizations)
TObject * fOldObject
!Pointer to old object
bool IsFolder() const override
Return TRUE if more than one leaf or if fBrowsables, FALSE otherwise.
void SetBasketSize(Int_t bufsize) override
Reset basket size for all subbranches of this branch.
void SetupAddresses() override
– If the branch address is not set, we set all addresses starting with the top level parent branch.
Int_t GetExpectedType(TClass *&clptr, EDataType &type) override
Fill expectedClass and expectedType with information on the data type of the object/values contained ...
void UpdateAddress() override
Update branch addresses if a new object was created.
void Init(TTree *tree, TBranch *parent, const char *name, const char *classname, void *addobj, Int_t basketsize, Int_t splitlevel, Int_t compress, bool isptrptr)
Initialization routine (run from the constructor so do not make this function virtual)
void SetAutoDelete(bool autodel=true) override
Set the AutoDelete bit.
void Streamer(TBuffer &) override
Stream an object of class TBranchObject.
Int_t GetEntry(Long64_t entry=0, Int_t getall=0) override
Read all branches of a BranchObject and return total number of bytes.
TString fClassName
Class name of referenced object.
~TBranchObject() override
Destructor for a BranchObject.
TBranchObject()
Default constructor for BranchObject.
void Print(Option_t *option="") const override
Print TBranch parameters.
Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *) override
Loop on all leaves of this branch to fill Basket buffer.
void Reset(Option_t *option="") override
Reset a branch.
static TClass * Class()
void Browse(TBrowser *b) override
Browse the branch content.
A TTree is a list of TBranches.
Definition TBranch.h:93
TString fFileName
Name of file where buffers are stored ("" if in same file as Tree header)
Definition TBranch.h:149
Int_t fMaxBaskets
Maximum number of Baskets so far.
Definition TBranch.h:125
TTree * GetTree() const
Definition TBranch.h:252
@ kDoNotProcess
Active bit for branches.
Definition TBranch.h:105
TObjArray fLeaves
-> List of leaves of this branch
Definition TBranch.h:139
char * fAddress
! Address of 1st leaf (variable or object)
Definition TBranch.h:147
virtual TList * GetBrowsables()
Returns (and, if 0, creates) browsable objects for this branch See TVirtualBranchBrowsable::FillListO...
Definition TBranch.cxx:1311
Long64_t * fBasketEntry
[fMaxBaskets] Table of first entry in each basket
Definition TBranch.h:142
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:1705
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:2340
virtual void SetAutoDelete(bool autodel=true)
Set the automatic delete bit.
Definition TBranch.cxx:2728
Int_t fNleaves
! Number of leaves
Definition TBranch.h:128
Int_t * fBasketBytes
[fMaxBaskets] Length of baskets on file
Definition TBranch.h:141
TObjArray fBranches
-> List of Branches of this branch
Definition TBranch.h:138
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
Definition TBranch.cxx:2597
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
Long64_t * fBasketSeek
[fMaxBaskets] Addresses of baskets on file
Definition TBranch.h:143
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:2556
virtual void SetBasketSize(Int_t bufsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
Definition TBranch.cxx:2741
TBranch * GetMother() const
Get our top-level parent branch in the tree.
Definition TBranch.cxx:2126
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:855
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:84
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Definition TClass.cxx:5017
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
Definition TClass.cxx:5439
void BuildRealData(void *pointer=nullptr, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Definition TClass.cxx:2036
TList * GetListOfRealData() const
Definition TClass.h:465
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
Definition TClass.cxx:4901
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:2973
An array of clone (identical) objects.
static TClass * Class()
void Browse(TBrowser *b) override
Browse this collection (called by TBrowser).
All ROOT classes may have RTTI (run time type identification) support added.
Definition TDataMember.h:31
Bool_t IsPersistent() const
Definition TDataMember.h:91
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 * GetTypeName() const
Get the decayed type name of this data member, removing const and volatile qualifiers,...
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
Basic data type descriptor (datatype information is obtained from CINT).
Definition TDataType.h:44
Int_t GetType() const
Definition TDataType.h:68
Describe directory structure in memory.
Definition TDirectory.h:45
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Definition TFile.h:131
A TLeaf for a general object derived from TObject.
Definition TLeafObject.h:31
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition TLeaf.h:57
A doubly linked list.
Definition TList.h:38
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:173
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
const char * GetTitle() const override
Returns title of object.
Definition TNamed.h:50
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:149
Int_t GetEntriesFast() const
Definition TObjArray.h:58
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
Mother of all ROOT objects.
Definition TObject.h:41
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:202
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:1057
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:864
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1071
void ResetBit(UInt_t f)
Definition TObject.h:201
The TRealData class manages the effective list of all data members for a given class.
Definition TRealData.h:30
Ssiz_t Length() const
Definition TString.h:425
const char * Data() const
Definition TString.h:384
A TTree represents a columnar dataset.
Definition TTree.h:89
TDirectory * GetDirectory() const
Definition TTree.h:501