68 const char *bracket = strchr(name,
'[');
134 if (!
name.EndsWith(
"."))
name +=
".";
172 char* bleft = (
char*) strchr(name,
'[');
177 Int_t nch = strlen(bleft);
178 char* countname =
new char[nch+1];
179 strcpy(countname, bleft);
180 char* bright = (
char*) strchr(countname,
']');
187 char *bleft2 = (
char*) strchr(countname,
'[');
189 nch = strlen(countname);
193 Error(
"GetLeafCounter",
"TLeaf %s is not setup properly, fBranch is null.",
GetName());
208 if (!leaf && strchr(
GetName(),
'.')) {
209 char* withdot =
new char[strlen(
GetName())+strlen(countname)+1];
211 char* lastdot = strrchr(withdot,
'.');
212 strcpy(lastdot, countname);
217 if (!leaf && strchr(countname,
'.')) {
227 sscanf(bleft2,
"[%d]", &i);
233 bleft = (
char*) strchr(bleft2,
'[');
237 sscanf(bleft,
"[%d]", &i);
246 for (i = 0; i < nch; i++) {
247 if (!isdigit(countname[i])) {
254 sscanf(countname,
"%d", &countval);
256 sscanf(bleft2,
"[%d]", &i);
262 bleft = (
char*) strchr(bleft2,
'[');
266 sscanf(bleft,
"[%d]", &i);
316 if (!calledFromDestructor) {
virtual ~TLeaf()
Destructor.
virtual const char * GetName() const
Returns name of object.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Set if we own the value buffer and so must delete it ourselves.
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t TestBit(UInt_t f) const
virtual TLeaf * GetLeafCounter(Int_t &countval) const
Return a pointer to the counter of this leaf.
Buffer base class used for serializing objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual TObject * Remove(TObject *obj)
Remove object from array.
Int_t fLenType
Number of bytes for this data type.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void SetRange(Bool_t range=kTRUE)
virtual Double_t GetValue(Int_t i=0) const
The TNamed class is the base class for all named ROOT classes.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Int_t fLen
Number of fixed length elements.
virtual void SetAddress(void *add=0)
virtual void FillBasket(TBuffer &b)
Pack leaf elements in Basket output buffer.
Using a TBrowser one can browse all ROOT objects.
Int_t GetLast() const
Return index of last object in array.
virtual Int_t GetLen() const
Return the number of effective elements of this leaf.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Int_t fNdata
! Number of elements in fAddress data buffer
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual TLeaf * FindLeaf(const char *name)
Find leaf..
virtual void SetLeafCount(TLeaf *leaf)
Set the leaf count of this leaf.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Int_t GetMaximum() const
virtual void Browse(TBrowser *b)
Browse the content of this leaf.
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
Bool_t fIsUnsigned
(=kTRUE if unsigned, kFALSE otherwise)
TObjArray * GetListOfLeaves()
Int_t fOffset
Offset in ClonesArray object (if one)
Bool_t fIsRange
(=kTRUE if leaf has a range, kFALSE otherwise)
TBranch * fBranch
! Pointer to supporting branch (we do not own the branch)
Int_t ResetAddress(void *add, Bool_t destructor=kFALSE)
Helper routine for TLeafX::SetAddress.
TLeaf * fLeafCount
Pointer to Leaf count if variable length (we do not own the counter)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Int_t GetEntries() const
Return the number of objects in array (i.e.
A TTree object has a header with a name and a title.
Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
TLeaf & operator=(const TLeaf &)
Assignment operator.
TBranch * GetBranch() const
A TTree is a list of TBranches.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual const char * GetTitle() const
Returns title of object.
virtual TObjArray * GetListOfLeaves()