68 const char *bracket = strchr(name,
'[');
79 fLenType(lf.fLenType),
81 fIsRange(lf.fIsRange),
82 fIsUnsigned(lf.fIsUnsigned),
83 fLeafCount(lf.fLeafCount),
134 if (!
name.EndsWith(
"."))
name +=
".";
170 for (
Int_t idx = 0, offset = base; idx < events; idx++) {
171 retval[idx] = offset;
200 char* bleft = (
char*) strchr(name,
'[');
205 Int_t nch = strlen(bleft);
206 char* countname =
new char[nch+1];
207 strcpy(countname, bleft);
208 char* bright = (
char*) strchr(countname,
']');
215 char *bleft2 = (
char*) strchr(countname,
'[');
217 nch = strlen(countname);
221 Error(
"GetLeafCounter",
"TLeaf %s is not setup properly, fBranch is null.",
GetName());
236 if (!leaf && strchr(
GetName(),
'.')) {
237 char* withdot =
new char[strlen(
GetName())+strlen(countname)+1];
239 char* lastdot = strrchr(withdot,
'.');
240 strcpy(lastdot, countname);
245 if (!leaf && strchr(countname,
'.')) {
255 sscanf(bleft2,
"[%d]", &i);
261 bleft = (
char*) strchr(bleft2,
'[');
265 sscanf(bleft,
"[%d]", &i);
274 for (i = 0; i < nch; i++) {
275 if (!isdigit(countname[i])) {
282 sscanf(countname,
"%d", &countval);
284 sscanf(bleft2,
"[%d]", &i);
290 bleft = (
char*) strchr(bleft2,
'[');
294 sscanf(bleft,
"[%d]", &i);
344 if (!calledFromDestructor) {
virtual Int_t GetLen() const
Return the number of effective elements of this leaf.
virtual ~TLeaf()
Destructor.
Long64_t GetReadEntry() const
virtual const char * GetTitle() const
Returns title 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
Option_t * GetDrawOption() const
Get option used by the graphics system to draw this object.
Int_t GetLast() const
Return index of last object in array.
TString & ReplaceAll(const TString &s1, const TString &s2)
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.
TBranch * GetBranch() const
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 TObject * FindObject(const char *name) const
Find an object in this collection using its name.
The TNamed class is the base class for all named ROOT classes.
Set if we own the value buffer and so must delete it ourselves.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
virtual TLeaf * GetLeafCounter(Int_t &countval) const
Return a pointer to the counter of this leaf.
virtual Double_t GetValue(Int_t i=0) const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Int_t GetMaximum() const
Using a TBrowser one can browse all ROOT objects.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Int_t fNdata
! Number of elements in fAddress data buffer
virtual TLeaf * FindLeaf(const char *name)
Find leaf..
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
virtual const char * GetName() const
Returns name of object.
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
R__ALWAYS_INLINE Bool_t IsZombie() 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 GetEntries() const
Return the number of objects in array (i.e.
Int_t fOffset
Offset in ClonesArray object (if one)
Bool_t fIsRange
(=kTRUE if leaf has a range, kFALSE otherwise)
#define R__unlikely(expr)
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
A TTree object has a header with a name and a title.
TLeaf & operator=(const TLeaf &)
Assignment operator.
A TTree is a list of TBranches.
Int_t * GenerateOffsetArrayBase(Int_t base, Int_t events) const
If the class supports it, generate an offset array base.
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual TObjArray * GetListOfLeaves()