Logo ROOT   6.10/09
Reference Guide
TLeafElement.cxx
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Rene Brun 14/01/2001
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 TLeafElement
13 \ingroup tree
14 
15 A TLeaf for the general case when using the branches created via
16 a TStreamerInfo (i.e. using TBranchElement).
17 */
18 
19 #include "TLeafElement.h"
20 //#include "TMethodCall.h"
21 
22 #include "TVirtualStreamerInfo.h"
23 
25 
26 ////////////////////////////////////////////////////////////////////////////////
27 /// Default constructor for LeafObject.
28 
30 {
31  fAbsAddress = 0;
32  fID = -1;
33  fType = -1;
34 }
35 
36 ////////////////////////////////////////////////////////////////////////////////
37 /// Create a LeafObject.
38 
40  :TLeaf(parent, name,name)
41 {
42  fAbsAddress = 0;
43  fID = id;
44  fType = type;
45  if (type < TVirtualStreamerInfo::kObject) {
46  Int_t bareType = type;
47  if (bareType > TVirtualStreamerInfo::kOffsetP)
49  else if (bareType > TVirtualStreamerInfo::kOffsetL)
51 
52  if ((bareType >= TVirtualStreamerInfo::kUChar && bareType <= TVirtualStreamerInfo::kULong)
53  || bareType == TVirtualStreamerInfo::kULong64)
54  SetUnsigned();
55  }
56 }
57 
58 ////////////////////////////////////////////////////////////////////////////////
59 /// Default destructor for a LeafObject.
60 
62 {
63 }
64 
65 ////////////////////////////////////////////////////////////////////////////////
66 /// Returns pointer to method corresponding to name name is a string
67 /// with the general form "method(list of params)" If list of params is
68 /// omitted, () is assumed;
69 
71 {
72  return 0;
73 }
74 
75 ////////////////////////////////////////////////////////////////////////////////
76 /// Return true if this leaf is does not have any sub-branch/leaf.
77 
79 {
81  return kTRUE;
82 }
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition: TLeaf.h:32
TMethodCall * GetMethodCall(const char *name)
Returns pointer to method corresponding to name name is a string with the general form "method(list o...
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t IsOnTerminalBranch() const
Return true if this leaf is does not have any sub-branch/leaf.
Int_t fID
element serial number in fInfo
Definition: TLeafElement.h:34
TObjArray * GetListOfBranches()
Definition: TBranch.h:182
Method or function calling interface.
Definition: TMethodCall.h:37
TLeafElement()
Default constructor for LeafObject.
Int_t fType
leaf type
Definition: TLeafElement.h:35
Int_t GetEntriesFast() const
Definition: TObjArray.h:64
A TLeaf for the general case when using the branches created via a TStreamerInfo (i.e.
Definition: TLeafElement.h:30
const Bool_t kFALSE
Definition: RtypesCore.h:92
PyObject * fType
#define ClassImp(name)
Definition: Rtypes.h:336
int type
Definition: TGX11.cxx:120
virtual ~TLeafElement()
Default destructor for a LeafObject.
virtual void SetUnsigned()
Definition: TLeaf.h:100
TBranch * fBranch
! Pointer to supporting branch (we do not own the branch)
Definition: TLeaf.h:43
char * fAbsAddress
! Absolute leaf Address
Definition: TLeafElement.h:33
A TTree is a list of TBranches.
Definition: TBranch.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:91