60 const char *branchname,
82 TNamed(branchname,branchname),
99 const char *branchname,
100 const char *branchPrefix,
ELocation isclones,
102 const TString &containerName) :
148 if ( !other )
return kFALSE;
182 if (leftname.Length() && leftname[0]==
'.') leftname.
Remove(0,1);
184 if (rightname.Length() && rightname[0]==
'.') rightname.
Remove(0,1);
185 if (leftname != rightname )
return kFALSE;
257 fprintf(hf,
"%-*sstruct %s\n", offset,
" ",
GetName() );
260 fprintf(hf,
"%-*s : ", offset,
" ");
268 fprintf(hf,
",\n%-*spublic %s", offset+5,
" ", desc->
GetTypeName());
273 fprintf(hf,
"%-*s{\n", offset,
" ");
277 fprintf(hf,
"%-*s %s(TBranchProxyDirector* director,const char *top,const char *mid=0) :",
295 fprintf(hf,
"%s\n%-*s %-*s(top,mid)",wroteFirst?
",":
"",offset,
" ",
fMaxDatamemberType,
"ffPrefix");
312 objInit =
"ffPrefix, ";
317 objInit =
"top, \"\", mid";
322 fprintf(hf,
"%s\n%-*s %-*s(director, %s)",
330 fprintf(hf,
"\n%-*s {};\n",offset,
" ");
334 fprintf(hf,
"%-*s %s(TBranchProxyDirector* director, TBranchProxy *parent, const char *membername, const char *top=0, const char *mid=0) :",
353 fprintf(hf,
"%s\n%-*s %-*s(top,mid)",wroteFirst?
",":
"",offset,
" ",
fMaxDatamemberType,
"ffPrefix");
357 fprintf(hf,
"%s\n%-*s %-*s(director, parent, membername)",
366 fprintf(hf,
"\n%-*s {};\n",offset,
" ");
370 fprintf(hf,
"%-*s%-*s %s;\n", offset+3,
" ",
fMaxDatamemberType,
"ROOT::Internal::TBranchProxyHelper",
"ffPrefix");
376 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
379 fprintf(hf,
"%-*sconst %s* operator[](Int_t i) { return obj.At(i); }\n", offset+3,
" ",type);
380 fprintf(hf,
"%-*sconst %s* operator[](UInt_t i) { return obj.At(i); }\n", offset+3,
" ",type);
381 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
382 fprintf(hf,
"%-*sconst TClonesArray* operator->() { return obj.GetPtr(); }\n", offset+3,
" ");
383 fprintf(hf,
"%-*sTClaObjProxy<%s > obj;\n", offset+3,
" ", type);
384 }
else if (
IsSTL() ) {
386 fprintf(hf,
"%-*sconst %s& At(UInt_t i) {\n",offset+3,
" ",type);
390 fprintf(hf,
"%-*s static %s default_val((TRootIOCtor*)0);\n",offset+3,
" ",type);
392 fprintf(hf,
"%-*s static %s default_val;\n",offset+3,
" ",type);
394 fprintf(hf,
"%-*s if (!obj.Read()) return default_val;\n",offset+3,
" ");
396 fprintf(hf,
"%-*s %s *temp = & obj.GetPtr()->at(i);\n",offset+3,
" ",type);
398 fprintf(hf,
"%-*s %s *temp = (%s *)( obj.GetProxy()->GetStlStart(i) );\n",offset+3,
" ",type,type);
402 fprintf(hf,
"%-*s if (temp) return *temp; else return default_val;\n",offset+3,
" ");
403 fprintf(hf,
"%-*s}\n",offset+3,
" ");
405 fprintf(hf,
"%-*sconst %s& operator[](Int_t i) { return At(i); }\n", offset+3,
" ",type);
406 fprintf(hf,
"%-*sconst %s& operator[](UInt_t i) { return At(i); }\n", offset+3,
" ",type);
407 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetPtr()->size(); }\n",offset+3,
" ");
408 fprintf(hf,
"%-*sconst %s* operator->() { return obj.GetPtr(); }\n", offset+3,
" ",
fContainerName.
Data());
409 fprintf(hf,
"%-*soperator %s*() { return obj.GetPtr(); }\n", offset+3,
" ",
fContainerName.
Data());
412 fprintf(hf,
"%-*sconst %s& operator[](Int_t i) { return obj.At(i); }\n", offset+3,
" ",type);
413 fprintf(hf,
"%-*sconst %s& operator[](UInt_t i) { return obj.At(i); }\n", offset+3,
" ",type);
414 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
415 fprintf(hf,
"%-*sTStlObjProxy<%s > obj;\n", offset+3,
" ", type);
418 fprintf(hf,
"%-*sconst %s* operator->() { return obj.GetPtr(); }\n", offset+3,
" ",type);
419 fprintf(hf,
"%-*sTObjProxy<%s > obj;\n", offset+3,
" ", type);
424 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
425 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
426 fprintf(hf,
"%-*sconst TClonesArray* operator->() { return obj.GetPtr(); }\n", offset+3,
" ");
427 fprintf(hf,
"%-*sTClaProxy obj;\n", offset+3,
" ");
429 }
else if (
IsSTL()) {
431 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
432 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
434 fprintf(hf,
"%-*sTStlProxy obj;\n", offset+3,
" ");
438 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
439 fprintf(hf,
"%-*sTBranchProxy obj;\n", offset+3,
" ");
449 fprintf(hf,
"%-*s};\n",offset,
" ");
virtual Bool_t IsEquivalent(const TBranchProxyClassDescriptor *other)
virtual const char * GetName() const
Returns name of object.
const char * GetBranchName()
ELocation GetIsClones() const
Namespace for new ROOT classes and functions.
virtual TClass * GetValueClass() const =0
TString GetContainerName() const
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void SetName(const char *name)
Set the name of the TNamed.
void OutputInit(FILE *hf, int offset, UInt_t maxVarname, const char *prefix)
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
TString & Prepend(const char *cs)
const char * GetSubBranchPrefix() const
void AddDescriptor(TBranchProxyDescriptor *desc, Bool_t isBase)
The TNamed class is the base class for all named ROOT classes.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
int main(int argc, char **argv)
UInt_t GetSplitLevel() const
TVirtualStreamerInfo * fInfo
void OutputDecl(FILE *hf, int offset, UInt_t maxVarname)
const char * GetTypeName()
The ROOT global object gROOT contains a list of all defined classes.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
TString & Remove(Ssiz_t pos)
Bool_t IsEquivalent(const TBranchProxyDescriptor *other, Bool_t inClass=kFALSE)
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.
UInt_t fMaxDatamemberType
const char * GetBranchName() const
TBranchProxyClassDescriptor(const TBranchProxyClassDescriptor &b)
void OutputDecl(FILE *hf, int offset, UInt_t)
virtual void Add(TObject *obj)
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Abstract Interface class describing Streamer information for one class.
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
const char * GetRawSymbol() const
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const