Logo ROOT  
Reference Guide
TChainElement.h
Go to the documentation of this file.
1 // @(#)root/tree:$Id$
2 // Author: Rene Brun 11/02/97
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 #ifndef ROOT_TChainElement
12 #define ROOT_TChainElement
13 
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TChainElement //
18 // //
19 // Describes a component of a TChain. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 
24 #include "TNamed.h"
25 
26 class TBranch;
27 
28 class TChainElement : public TNamed {
29 
30  // TChainElement status bits
31  enum EStatusBits {
33  };
34 
35 protected:
36  Long64_t fEntries; ///< Number of entries in the tree of this chain element
37  Int_t fNPackets; ///< Number of packets
38  Int_t fPacketSize; ///< Number of events in one packet for parallel root
39  Int_t fStatus; ///< branch status when used as a branch
40  void *fBaddress; ///<! branch address when used as a branch
41  TString fBaddressClassName; ///<! Name of the class pointed to by fBaddress
42  UInt_t fBaddressType; ///<! Type of the value pointed to by fBaddress
43  Bool_t fBaddressIsPtr : 1; ///<! True if the address is a pointer to an address
44  Bool_t fDecomposedObj : 1; ///<! True if the address needs the branch in MakeClass/DecomposedObj mode.
45  Bool_t fCheckedType : 1; ///<! True if the branch type and the address type have been checked.
46  char *fPackets; ///<! Packet descriptor string
47  TBranch **fBranchPtr; ///<! Address of user branch pointer (to updated upon loading a file)
48  Int_t fLoadResult; ///<! Return value of TChain::LoadTree(); 0 means success
49 
50 public:
51  TChainElement();
52  TChainElement(const char *title, const char *filename);
53  virtual ~TChainElement();
54  virtual void CreatePackets();
55  virtual void *GetBaddress() const {return fBaddress;}
56  virtual const char *GetBaddressClassName() const { return fBaddressClassName; }
57  virtual Bool_t GetBaddressIsPtr() const { return fBaddressIsPtr; }
58  virtual UInt_t GetBaddressType() const { return fBaddressType; }
59  virtual TBranch **GetBranchPtr() const { return fBranchPtr; }
60  virtual Long64_t GetEntries() const {return fEntries;}
61  Int_t GetLoadResult() const { return fLoadResult; }
62  Bool_t GetCheckedType() const { return fCheckedType; }
64  virtual char *GetPackets() const {return fPackets;}
65  virtual Int_t GetPacketSize() const {return fPacketSize;}
66  virtual Int_t GetStatus() const {return fStatus;}
68  virtual void ls(Option_t *option="") const;
69  virtual void SetBaddress(void *add) {fBaddress = add;}
70  virtual void SetBaddressClassName(const char* clname) { fBaddressClassName = clname; }
71  virtual void SetBaddressIsPtr(Bool_t isptr) { fBaddressIsPtr = isptr; }
73  virtual void SetBranchPtr(TBranch **ptr) { fBranchPtr = ptr; }
76  void SetLoadResult(Int_t result) { fLoadResult = result; }
77  virtual void SetLookedUp(Bool_t y = kTRUE);
79  virtual void SetPacketSize(Int_t size = 100);
80  virtual void SetStatus(Int_t status) {fStatus = status;}
81 
82  ClassDef(TChainElement,2); //A chain element
83 };
84 
85 #endif
86 
m
auto * m
Definition: textangle.C:8
TChainElement::fBaddressIsPtr
Bool_t fBaddressIsPtr
! True if the address is a pointer to an address
Definition: TChainElement.h:43
n
const Int_t n
Definition: legend1.C:16
TChainElement::SetBaddressType
virtual void SetBaddressType(UInt_t type)
Definition: TChainElement.h:72
TChainElement::SetLoadResult
void SetLoadResult(Int_t result)
Definition: TChainElement.h:76
TChainElement::fPacketSize
Int_t fPacketSize
Number of events in one packet for parallel root.
Definition: TChainElement.h:38
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TObject::TestBit
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
TChainElement::fStatus
Int_t fStatus
branch status when used as a branch
Definition: TChainElement.h:39
TChainElement::GetCheckedType
Bool_t GetCheckedType() const
Definition: TChainElement.h:62
TChainElement::HasBeenLookedUp
virtual Bool_t HasBeenLookedUp()
Definition: TChainElement.h:67
TNamed.h
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TChainElement::GetBaddressClassName
virtual const char * GetBaddressClassName() const
Definition: TChainElement.h:56
Int_t
int Int_t
Definition: RtypesCore.h:45
TChainElement::fEntries
Long64_t fEntries
Number of entries in the tree of this chain element.
Definition: TChainElement.h:36
TChainElement::GetStatus
virtual Int_t GetStatus() const
Definition: TChainElement.h:66
TChainElement::GetDecomposedObj
Bool_t GetDecomposedObj() const
Definition: TChainElement.h:63
TChainElement::TChainElement
TChainElement()
Default constructor for a chain element.
Definition: TChainElement.cxx:28
TChainElement::kHasBeenLookedUp
@ kHasBeenLookedUp
Definition: TChainElement.h:32
TChainElement::GetBaddressType
virtual UInt_t GetBaddressType() const
Definition: TChainElement.h:58
TString
Definition: TString.h:136
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TChainElement::SetNumberEntries
virtual void SetNumberEntries(Long64_t n)
Definition: TChainElement.h:78
bool
TChainElement::GetBaddress
virtual void * GetBaddress() const
Definition: TChainElement.h:55
TChainElement::SetStatus
virtual void SetStatus(Int_t status)
Definition: TChainElement.h:80
TChainElement
Definition: TChainElement.h:28
TChainElement::SetDecomposedObj
void SetDecomposedObj(Bool_t m)
Definition: TChainElement.h:75
TBranch
Definition: TBranch.h:89
TChainElement::SetBaddressIsPtr
virtual void SetBaddressIsPtr(Bool_t isptr)
Definition: TChainElement.h:71
TChainElement::GetPackets
virtual char * GetPackets() const
Definition: TChainElement.h:64
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TChainElement::fLoadResult
Int_t fLoadResult
! Return value of TChain::LoadTree(); 0 means success
Definition: TChainElement.h:48
TChainElement::fPackets
char * fPackets
! Packet descriptor string
Definition: TChainElement.h:46
TChainElement::fBranchPtr
TBranch ** fBranchPtr
! Address of user branch pointer (to updated upon loading a file)
Definition: TChainElement.h:47
TNamed
Definition: TNamed.h:29
BIT
#define BIT(n)
Definition: Rtypes.h:85
y
Double_t y[n]
Definition: legend1.C:17
TChainElement::fBaddressType
UInt_t fBaddressType
! Type of the value pointed to by fBaddress
Definition: TChainElement.h:42
TChainElement::GetLoadResult
Int_t GetLoadResult() const
Definition: TChainElement.h:61
TChainElement::SetPacketSize
virtual void SetPacketSize(Int_t size=100)
Set number of entries per packet for parallel root.
Definition: TChainElement.cxx:92
TChainElement::SetBaddressClassName
virtual void SetBaddressClassName(const char *clname)
Definition: TChainElement.h:70
unsigned int
TChainElement::fDecomposedObj
Bool_t fDecomposedObj
! True if the address needs the branch in MakeClass/DecomposedObj mode.
Definition: TChainElement.h:44
TChainElement::CreatePackets
virtual void CreatePackets()
Initialize the packet descriptor string.
Definition: TChainElement.cxx:65
TChainElement::fNPackets
Int_t fNPackets
Number of packets.
Definition: TChainElement.h:37
TChainElement::SetCheckedType
void SetCheckedType(Bool_t m)
Definition: TChainElement.h:74
TChainElement::ls
virtual void ls(Option_t *option="") const
List files in the chain.
Definition: TChainElement.cxx:78
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TChainElement::SetBranchPtr
virtual void SetBranchPtr(TBranch **ptr)
Definition: TChainElement.h:73
TChainElement::GetBranchPtr
virtual TBranch ** GetBranchPtr() const
Definition: TChainElement.h:59
TChainElement::fBaddressClassName
TString fBaddressClassName
! Name of the class pointed to by fBaddress
Definition: TChainElement.h:41
type
int type
Definition: TGX11.cxx:121
TChainElement::SetLookedUp
virtual void SetLookedUp(Bool_t y=kTRUE)
Set/Reset the looked-up bit.
Definition: TChainElement.cxx:100
TChainElement::GetPacketSize
virtual Int_t GetPacketSize() const
Definition: TChainElement.h:65
TChainElement::fBaddress
void * fBaddress
! branch address when used as a branch
Definition: TChainElement.h:40
TChainElement::GetBaddressIsPtr
virtual Bool_t GetBaddressIsPtr() const
Definition: TChainElement.h:57
TChainElement::~TChainElement
virtual ~TChainElement()
Default destructor for a chain element.
Definition: TChainElement.cxx:57
TChainElement::SetBaddress
virtual void SetBaddress(void *add)
Definition: TChainElement.h:69
TObject::EStatusBits
EStatusBits
Definition: TObject.h:57
TChainElement::GetEntries
virtual Long64_t GetEntries() const
Definition: TChainElement.h:60
TChainElement::fCheckedType
Bool_t fCheckedType
! True if the branch type and the address type have been checked.
Definition: TChainElement.h:45
int