12 #ifndef ROOT_TBranchProxyTemplate
13 #define ROOT_TBranchProxyTemplate
15 #if R__BRANCHPROXY_GENERATOR_VERSION != 2
17 # error "Please regenerate this file using TTree::MakeProxy()!"
20 #ifndef ROOT_TBranchProxy
24 #define InjecTBranchProxyInterface() \
25 ROOT::Detail::TBranchProxy *GetProxy() { return obj.GetProxy(); } \
26 void Reset() { obj.Reset(); } \
27 bool Setup() { return obj.Setup(); } \
28 bool IsInitialized() { return obj.IsInitialized(); } \
29 bool IsaPointer() const { return obj.IsaPointer(); } \
30 bool Read() { return obj.Read(); }
43 obj(director,top,name) {};
45 obj(director,top,name,data) {};
47 obj(director,parent, name, top, mid) {};
54 std::cout <<
"fWhere " << obj.
GetWhere() << std::endl;
60 if (!obj.
Read())
return 0;
80 std::cout <<
"obj.GetWhere() " << obj.
GetWhere() << std::endl;
87 obj(director,top,name) {};
89 obj(director,top,name,data) {};
91 obj(director,parent, name, top, mid) {};
100 if (!obj.
Read())
return &default_val;
101 if (obj.
GetWhere()==0)
return &default_val;
104 if (temp)
return temp;
105 else return &default_val;
122 std::cout <<
"obj.GetWhere() " << obj.
GetWhere() << std::endl;
129 obj(director,top,name) {};
131 obj(director,top,name,data) {};
133 obj(director,parent, name, top, mid) {};
143 static const value_t default_val;
144 if (!obj.
Read())
return default_val;
145 if (obj.
GetWhere()==0)
return default_val;
148 if (temp)
return *temp;
149 else return default_val;
169 TObjProxy<
T>(director,top,name),fCollection(0) {};
171 TObjProxy<
T>(director,top,name,data),fCollection(0) {};
173 TObjProxy<
T>(director,parent, name, top, mid),fCollection(0) {};
177 if (fCollection==0) {
190 if (!fCollection)
return 0;
192 return fCollection->
Size();
198 static value_t default_val;
202 if (!fCollection)
return 0;
204 return *(value_t*)(fCollection->
At(i));
206 else return default_val;
Namespace for new ROOT classes and functions.
TStlObjProxy(TBranchProxyDirector *director, Detail::TBranchProxy *parent, const char *name, const char *top=0, const char *mid=0)
TObjProxy(TBranchProxyDirector *director, const char *top, const char *name, const char *data)
virtual void * GetStart(UInt_t=0)
const value_t & At(UInt_t i)
const value_t operator[](Int_t i)
InjecTBranchProxyInterface()
TStlObjProxy(TBranchProxyDirector *director, const char *top, const char *name)
TClaObjProxy(TBranchProxyDirector *director, const char *top, const char *name)
InjecTBranchProxyInterface()
TStlObjProxy(TBranchProxyDirector *director, const char *top, const char *name, const char *data)
const TClonesArray * GetPtr()
TStlSimpleProxy(TBranchProxyDirector *director, Detail::TBranchProxy *parent, const char *name, const char *top=0, const char *mid=0)
TObjProxy(TBranchProxyDirector *director, const char *name)
TClaObjProxy(TBranchProxyDirector *director, const char *name)
TStlSimpleProxy(TBranchProxyDirector *director, const char *name)
TClaObjProxy(TBranchProxyDirector *director, Detail::TBranchProxy *parent, const char *name, const char *top=0, const char *mid=0)
const T * operator[](Int_t i)
virtual void * GetClaStart(UInt_t i=0)
TClaObjProxy(TBranchProxyDirector *director, const char *top, const char *name, const char *data)
TVirtualCollectionProxy * GetCollection()
TStlSimpleProxy(TBranchProxyDirector *director, const char *top, const char *name)
TStlObjProxy(TBranchProxyDirector *director, const char *name)
TObjProxy(TBranchProxyDirector *director, const char *top, const char *name)
The ROOT global object gROOT contains a list of all defined classes.
const TVirtualCollectionProxy * GetPtr()
TObjProxy(TBranchProxyDirector *director, Detail::TBranchProxy *parent, const char *name, const char *top=0, const char *mid=0)
const value_t & operator[](Int_t i)
TVirtualCollectionProxy * GetCollection()
virtual void * At(UInt_t idx)=0
virtual void * GetStlStart(UInt_t i=0)
const value_t At(UInt_t i)
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
virtual UInt_t Size() const =0
const TClonesArray * GetPtr()
An array of clone (identical) objects.
InjecTBranchProxyInterface()
TVirtualCollectionProxy * fCollection
TStlSimpleProxy(TBranchProxyDirector *director, const char *top, const char *name, const char *data)
virtual TVirtualCollectionProxy * Generate() const =0