68 const char *bracket = strchr(name,
'[');
134 if (!
name.EndsWith(
"."))
name +=
".";
170 for (
Int_t idx = 0, offset = base; idx < events; idx++) {
171 retval[idx] = offset;
201 char* bleft = (
char*) strchr(name,
'[');
206 Int_t nch = strlen(bleft);
207 char* countname =
new char[nch+1];
208 strcpy(countname, bleft);
209 char* bright = (
char*) strchr(countname,
']');
216 char *bleft2 = (
char*) strchr(countname,
'[');
218 nch = strlen(countname);
222 Error(
"GetLeafCounter",
"TLeaf %s is not setup properly, fBranch is null.",
GetName());
239 if (!leaf && strchr(
GetName(),
'.')) {
240 char* withdot =
new char[strlen(
GetName())+strlen(countname)+1];
242 char* lastdot = strrchr(withdot,
'.');
243 strcpy(lastdot, countname);
248 if (!leaf && strchr(countname,
'.')) {
258 sscanf(bleft2,
"[%d]", &i);
264 bleft = (
char*) strchr(bleft2,
'[');
268 sscanf(bleft,
"[%d]", &i);
277 for (i = 0; i < nch; i++) {
278 if (!isdigit(countname[i])) {
285 sscanf(countname,
"%d", &countval);
287 sscanf(bleft2,
"[%d]", &i);
293 bleft = (
char*) strchr(bleft2,
'[');
297 sscanf(bleft,
"[%d]", &i);
347 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
#define R__unlikely(expr)
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual TLeaf * GetLeafCounter(Int_t &countval) const
Return a pointer to the counter of this leaf (if any) or store the number of elements that the leaf c...
Buffer base class used for serializing objects.
Int_t * GenerateOffsetArrayBase(Int_t base, Int_t events) const
If the class supports it, generate an offset array base.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual TObject * Remove(TObject *obj)
Remove object from array.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) 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 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.
Set if we own the value buffer and so must delete it ourselves.
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.
R__ALWAYS_INLINE Bool_t IsZombie() const
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, for the current entry.
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 Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
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)
Long64_t GetReadEntry() const
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()