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 +=
".";
171 for (
Int_t idx = 0, offset = base; idx < events; idx++) {
172 retval[idx] = offset;
202 char* bleft = (
char*) strchr(
name,
'[');
207 Int_t nch = strlen(bleft);
208 char* countname =
new char[nch+1];
209 strcpy(countname, bleft);
210 char* bright = (
char*) strchr(countname,
']');
217 char *bleft2 = (
char*) strchr(countname,
'[');
219 nch = strlen(countname);
223 Error(
"GetLeafCounter",
"TLeaf %s is not setup properly, fBranch is null.",
GetName());
240 if (!leaf && strchr(
GetName(),
'.')) {
241 char* withdot =
new char[strlen(
GetName())+strlen(countname)+1];
243 char* lastdot = strrchr(withdot,
'.');
244 strcpy(lastdot, countname);
249 if (!leaf && strchr(countname,
'.')) {
259 sscanf(bleft2,
"[%d]", &i);
265 bleft = (
char*) strchr(bleft2,
'[');
269 sscanf(bleft,
"[%d]", &i);
278 for (i = 0; i < nch; i++) {
279 if (!isdigit(countname[i])) {
286 sscanf(countname,
"%d", &countval);
288 sscanf(bleft2,
"[%d]", &i);
294 bleft = (
char*) strchr(bleft2,
'[');
298 sscanf(bleft,
"[%d]", &i);
348 if (!calledFromDestructor) {
403 b.CheckByteCount(R__s, R__c, TLeaf::IsA());
#define R__unlikely(expr)
A TTree is a list of TBranches.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
Long64_t GetReadEntry() const
TObjArray * GetListOfLeaves()
Using a TBrowser one can browse all ROOT objects.
Buffer base class used for serializing objects.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual Double_t GetValue(Int_t i=0) const
Int_t fLenType
Number of bytes for this data type.
virtual Int_t GetMaximum() const
virtual void Browse(TBrowser *b)
Browse the content of this leaf.
Int_t fLen
Number of fixed length elements.
Int_t fNdata
! Number of elements in fAddress data buffer
virtual Int_t GetLen() const
Return the number of effective elements of this leaf, for the current entry.
Bool_t fIsUnsigned
(=kTRUE if unsigned, kFALSE otherwise)
virtual ~TLeaf()
Destructor.
TLeaf & operator=(const TLeaf &)
Assignment operator.
virtual void SetAddress(void *add=0)
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...
virtual void SetRange(Bool_t range=kTRUE)
Int_t * GenerateOffsetArrayBase(Int_t base, Int_t events) const
If the class supports it, generate an offset array base.
virtual void FillBasket(TBuffer &b)
Pack leaf elements in Basket output buffer.
TBranch * GetBranch() const
Int_t fOffset
Offset in ClonesArray object (if one)
virtual Int_t GetOffsetHeaderSize() const
TBranch * fBranch
! Pointer to supporting branch (we do not own the branch)
TLeaf * fLeafCount
Pointer to Leaf count if variable length (we do not own the counter)
Bool_t fIsRange
(=kTRUE if leaf has a range, kFALSE otherwise)
@ kNewValue
Set if we own the value buffer and so must delete it ourselves.
virtual void SetLeafCount(TLeaf *leaf)
Set the leaf count of this leaf.
Int_t ResetAddress(void *add, Bool_t destructor=kFALSE)
Helper routine for TLeafX::SetAddress.
The TNamed class is the base class for all named ROOT classes.
virtual const char * GetTitle() const
Returns title of object.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
Int_t GetLast() const
Return index of last object in array.
virtual TObject * Remove(TObject *obj)
Remove object from array.
@ kZombie
object ctor failed
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
R__ALWAYS_INLINE Bool_t IsZombie() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TString & ReplaceAll(const TString &s1, const TString &s2)
A TTree object has a header with a name and a title.
virtual TObjArray * GetListOfLeaves()
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
virtual TLeaf * FindLeaf(const char *name)
Find leaf..