64 const char *branchname,
70 fContainerName(containerName),
72 fSplitLevel(splitlevel),
73 fBranchName(branchname),
74 fSubBranchPrefix(branchname),
87 TNamed(branchname,branchname),
92 fBranchName(branchname),
93 fSubBranchPrefix(branchname),
105 const char *branchname,
106 const char *branchPrefix,
ELocation isclones,
108 const TString &containerName) :
111 fContainerName(containerName),
113 fSplitLevel(splitlevel),
114 fBranchName(branchname),
115 fSubBranchPrefix(branchPrefix),
117 fMaxDatamemberType(3)
160 if ( !other )
return kFALSE;
194 if (leftname.
Length() && leftname[0]==
'.') leftname.
Remove(0,1);
196 if (rightname.
Length() && rightname[0]==
'.') rightname.
Remove(0,1);
197 if (leftname != rightname )
return kFALSE;
283 fprintf(hf,
"%-*sstruct %s\n", offset,
" ",
GetName() );
286 fprintf(hf,
"%-*s : ", offset,
" ");
294 fprintf(hf,
",\n%-*spublic %s", offset+5,
" ", desc->
GetTypeName());
299 fprintf(hf,
"%-*s{\n", offset,
" ");
303 fprintf(hf,
"%-*s %s(TBranchProxyDirector* director,const char *top,const char *mid=0) :",
321 fprintf(hf,
"%s\n%-*s %-*s(top,mid)",wroteFirst?
",":
"",offset,
" ",
fMaxDatamemberType,
"ffPrefix");
338 objInit =
"ffPrefix, ";
343 objInit =
"top, \"\", mid";
348 fprintf(hf,
"%s\n%-*s %-*s(director, %s)",
356 fprintf(hf,
"\n%-*s {};\n",offset,
" ");
360 fprintf(hf,
"%-*s %s(TBranchProxyDirector* director, TBranchProxy *parent, const char *membername, const char *top=0, const char *mid=0) :",
375 fprintf(hf,
",\n%-*s%-*s(director, parent, membername, top, mid)", offset+6,
" ",
fMaxDatamemberType,desc->
GetTypeName());
379 fprintf(hf,
"%s\n%-*s %-*s(top,mid)",wroteFirst?
",":
"",offset,
" ",
fMaxDatamemberType,
"ffPrefix");
383 fprintf(hf,
"%s\n%-*s %-*s(director, parent, membername, top, mid)",
392 fprintf(hf,
"\n%-*s {};\n",offset,
" ");
396 fprintf(hf,
"%-*s%-*s %s;\n", offset+3,
" ",
fMaxDatamemberType,
"ROOT::Internal::TBranchProxyHelper",
"ffPrefix");
402 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
405 fprintf(hf,
"%-*sconst %s* operator[](Int_t i) { return obj.At(i); }\n", offset+3,
" ",
type);
406 fprintf(hf,
"%-*sconst %s* operator[](UInt_t i) { return obj.At(i); }\n", offset+3,
" ",
type);
407 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
408 fprintf(hf,
"%-*sconst TClonesArray* operator->() { return obj.GetPtr(); }\n", offset+3,
" ");
409 fprintf(hf,
"%-*sTClaObjProxy<%s > obj;\n", offset+3,
" ",
type);
410 }
else if (
IsSTL() ) {
412 fprintf(hf,
"%-*sconst %s& At(UInt_t i) {\n",offset+3,
" ",
type);
416 fprintf(hf,
"%-*s static %s default_val((TRootIOCtor*)0);\n",offset+3,
" ",
type);
418 fprintf(hf,
"%-*s static %s default_val;\n",offset+3,
" ",
type);
420 fprintf(hf,
"%-*s if (!obj.Read()) return default_val;\n",offset+3,
" ");
422 fprintf(hf,
"%-*s %s *temp = & obj.GetPtr()->at(i);\n",offset+3,
" ",
type);
424 fprintf(hf,
"%-*s %s *temp = (%s *)( obj.GetProxy()->GetStlStart(i) );\n",offset+3,
" ",
type,
type);
428 fprintf(hf,
"%-*s if (temp) return *temp; else return default_val;\n",offset+3,
" ");
429 fprintf(hf,
"%-*s}\n",offset+3,
" ");
431 fprintf(hf,
"%-*sconst %s& operator[](Int_t i) { return At(i); }\n", offset+3,
" ",
type);
432 fprintf(hf,
"%-*sconst %s& operator[](UInt_t i) { return At(i); }\n", offset+3,
" ",
type);
433 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetPtr()->size(); }\n",offset+3,
" ");
434 fprintf(hf,
"%-*sconst %s* operator->() { return obj.GetPtr(); }\n", offset+3,
" ",
fContainerName.
Data());
435 fprintf(hf,
"%-*soperator %s*() { return obj.GetPtr(); }\n", offset+3,
" ",
fContainerName.
Data());
438 fprintf(hf,
"%-*sconst %s& operator[](Int_t i) { return obj.At(i); }\n", offset+3,
" ",
type);
439 fprintf(hf,
"%-*sconst %s& operator[](UInt_t i) { return obj.At(i); }\n", offset+3,
" ",
type);
440 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
441 fprintf(hf,
"%-*sTStlObjProxy<%s > obj;\n", offset+3,
" ",
type);
444 fprintf(hf,
"%-*sconst %s* operator->() { return obj.GetPtr(); }\n", offset+3,
" ",
type);
445 fprintf(hf,
"%-*sTObjProxy<%s > obj;\n", offset+3,
" ",
type);
450 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
451 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
452 fprintf(hf,
"%-*sconst TClonesArray* operator->() { return obj.GetPtr(); }\n", offset+3,
" ");
453 fprintf(hf,
"%-*sTClaProxy obj;\n", offset+3,
" ");
455 }
else if (
IsSTL()) {
457 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
458 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
460 fprintf(hf,
"%-*sTStlProxy obj;\n", offset+3,
" ");
464 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
465 fprintf(hf,
"%-*sTBranchProxy obj;\n", offset+3,
" ");
475 fprintf(hf,
"%-*s};\n",offset,
" ");
Bool_t IsLoaded() const
Return true if the class needed by the branch is loaded.
const char * GetBranchName() const
Get the branch name.
const char * GetRawSymbol() const
Get the real symbol name.
const char * GetSubBranchPrefix() const
Get the prefix from the branch name.
ELocation GetIsClones() const
Return whether the branch is inside, nested in or outside of a TClonesArray.
TBranchProxyClassDescriptor(const TBranchProxyClassDescriptor &b)
Bool_t IsClones() const
Return true if this proxy is for a TClonesArray.
void AddDescriptor(TBranchProxyDescriptor *desc, Bool_t isBase)
Add a descriptor to this proxy.
void OutputDecl(FILE *hf, int offset, UInt_t)
Output the declaration and implementation of this emulation class.
void NameToSymbol()
Make the typename a proper class name without having the really deal with namespace and templates.
virtual Bool_t IsEquivalent(const TBranchProxyClassDescriptor *other)
Return true if this description is the 'same' as the other decription.
UInt_t GetSplitLevel() const
Return the split level of the branch.
TString GetContainerName() const
Return the name of the container holding this class, if any.
UInt_t fMaxDatamemberType
TVirtualStreamerInfo * fInfo
Bool_t IsSTL() const
Return true if this proxy is for a TClonesArray.
void OutputDecl(FILE *hf, int offset, UInt_t maxVarname)
Output the declaration corresponding to this proxy.
const char * GetBranchName()
Get the branch name.
const char * GetTypeName()
Get the name of the type of the data member.
void OutputInit(FILE *hf, int offset, UInt_t maxVarname, const char *prefix)
Output the initialization corresponding to this proxy.
Bool_t IsSplit() const
Return true if the branch is split.
Bool_t IsEquivalent(const TBranchProxyDescriptor *other, Bool_t inClass=kFALSE)
Return true if this description is the 'same' as the other description.
TClass instances represent classes, structs and namespaces in the ROOT type system.
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
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.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual void Add(TObject *obj)
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
The TNamed class is the base class for all named ROOT classes.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Prepend(const char *cs)
TString & Remove(Ssiz_t pos)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual TClass * GetValueClass() const =0
Abstract Interface class describing Streamer information for one class.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.