Logo ROOT   6.14/05
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 ////////////////////////////////////////////////////////////////////////////////
77 /// Copy/set fMinimum and fMaximum to include/be wide than those of the parameter
78 
80 {
81  if (input) {
82  if (input->GetMaximum() > this->GetMaximum())
83  ((TBranchElement*)fBranch)->fMaximum = input->GetMaximum();
84  return kTRUE;
85  } else {
86  return kFALSE;
87  }
88 }
89 
90 ////////////////////////////////////////////////////////////////////////////////
91 /// Return true if this leaf is does not have any sub-branch/leaf.
92 
94 {
96  return kTRUE;
97 }
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:201
XFontStruct * id
Definition: TGX11.cxx:108
Method or function calling interface.
Definition: TMethodCall.h:37
TLeafElement()
Default constructor for LeafObject.
virtual Int_t GetMaximum() const
Definition: TLeafElement.h:46
Int_t fType
leaf type
Definition: TLeafElement.h:35
virtual Bool_t IncludeRange(TLeaf *)
Copy/set fMinimum and fMaximum to include/be wide than those of the parameter.
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
A Branch for the case of an object.
const Bool_t kFALSE
Definition: RtypesCore.h:88
virtual Int_t GetMaximum() const
Definition: TLeaf.h:84
#define ClassImp(name)
Definition: Rtypes.h:359
int type
Definition: TGX11.cxx:120
virtual ~TLeafElement()
Default destructor for a LeafObject.
virtual void SetUnsigned()
Definition: TLeaf.h:114
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:62
const Bool_t kTRUE
Definition: RtypesCore.h:87
char name[80]
Definition: TGX11.cxx:109