63 const char *branchname,
86 TNamed(branchname,branchname),
104 const char *branchname,
105 const char *branchPrefix,
ELocation isclones,
107 const TString &containerName) :
159 if ( !other )
return false;
193 if (leftname.
Length() && leftname[0]==
'.') leftname.
Remove(0,1);
195 if (rightname.
Length() && rightname[0]==
'.') rightname.
Remove(0,1);
196 if (leftname != rightname )
return false;
282 fprintf(hf,
"%-*sstruct %s\n", offset,
" ",
GetName() );
285 fprintf(hf,
"%-*s : ", offset,
" ");
293 fprintf(hf,
",\n%-*spublic %s", offset+5,
" ", desc->
GetTypeName());
298 fprintf(hf,
"%-*s{\n", offset,
" ");
302 fprintf(hf,
"%-*s %s(TBranchProxyDirector* director,const char *top,const char *mid=0) :",
305 bool wroteFirst =
false;
320 fprintf(hf,
"%s\n%-*s %-*s(top,mid)",wroteFirst?
",":
"",offset,
" ",
fMaxDatamemberType,
"ffPrefix");
337 objInit =
"ffPrefix, ";
342 objInit =
"top, \"\", mid";
347 fprintf(hf,
"%s\n%-*s %-*s(director, %s)",
355 fprintf(hf,
"\n%-*s {};\n",offset,
" ");
359 fprintf(hf,
"%-*s %s(TBranchProxyDirector* director, TBranchProxy *parent, const char *membername, const char *top=0, const char *mid=0) :",
374 fprintf(hf,
",\n%-*s%-*s(director, parent, membername, top, mid)", offset+6,
" ",
fMaxDatamemberType,desc->
GetTypeName());
378 fprintf(hf,
"%s\n%-*s %-*s(top,mid)",wroteFirst?
",":
"",offset,
" ",
fMaxDatamemberType,
"ffPrefix");
382 fprintf(hf,
"%s\n%-*s %-*s(director, parent, membername, top, mid)",
391 fprintf(hf,
"\n%-*s {};\n",offset,
" ");
395 fprintf(hf,
"%-*s%-*s %s;\n", offset+3,
" ",
fMaxDatamemberType,
"ROOT::Internal::TBranchProxyHelper",
"ffPrefix");
401 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
404 fprintf(hf,
"%-*sconst %s* operator[](Int_t i) { return obj.At(i); }\n", offset+3,
" ",
type);
405 fprintf(hf,
"%-*sconst %s* operator[](UInt_t i) { return obj.At(i); }\n", offset+3,
" ",
type);
406 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
407 fprintf(hf,
"%-*sconst TClonesArray* operator->() { return obj.GetPtr(); }\n", offset+3,
" ");
408 fprintf(hf,
"%-*sTClaObjProxy<%s > obj;\n", offset+3,
" ",
type);
409 }
else if (
IsSTL() ) {
411 fprintf(hf,
"%-*sconst %s& At(UInt_t i) {\n",offset+3,
" ",
type);
415 fprintf(hf,
"%-*s static %s default_val((TRootIOCtor*)0);\n",offset+3,
" ",
type);
417 fprintf(hf,
"%-*s static %s default_val;\n",offset+3,
" ",
type);
419 fprintf(hf,
"%-*s if (!obj.Read()) return default_val;\n",offset+3,
" ");
421 fprintf(hf,
"%-*s %s *temp = & obj.GetPtr()->at(i);\n",offset+3,
" ",
type);
423 fprintf(hf,
"%-*s %s *temp = (%s *)( obj.GetProxy()->GetStlStart(i) );\n",offset+3,
" ",
type,
type);
427 fprintf(hf,
"%-*s if (temp) return *temp; else return default_val;\n",offset+3,
" ");
428 fprintf(hf,
"%-*s}\n",offset+3,
" ");
430 fprintf(hf,
"%-*sconst %s& operator[](Int_t i) { return At(i); }\n", offset+3,
" ",
type);
431 fprintf(hf,
"%-*sconst %s& operator[](UInt_t i) { return At(i); }\n", offset+3,
" ",
type);
432 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetPtr()->size(); }\n",offset+3,
" ");
433 fprintf(hf,
"%-*sconst %s* operator->() { return obj.GetPtr(); }\n", offset+3,
" ",
fContainerName.Data());
434 fprintf(hf,
"%-*soperator %s*() { return obj.GetPtr(); }\n", offset+3,
" ",
fContainerName.Data());
435 fprintf(hf,
"%-*sTObjProxy<%s > obj;\n", offset+3,
" ",
fContainerName.Data());
437 fprintf(hf,
"%-*sconst %s& operator[](Int_t i) { return obj.At(i); }\n", offset+3,
" ",
type);
438 fprintf(hf,
"%-*sconst %s& operator[](UInt_t i) { return obj.At(i); }\n", offset+3,
" ",
type);
439 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
440 fprintf(hf,
"%-*sTStlObjProxy<%s > obj;\n", offset+3,
" ",
type);
443 fprintf(hf,
"%-*sconst %s* operator->() { return obj.GetPtr(); }\n", offset+3,
" ",
type);
444 fprintf(hf,
"%-*sTObjProxy<%s > obj;\n", offset+3,
" ",
type);
449 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
450 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
451 fprintf(hf,
"%-*sconst TClonesArray* operator->() { return obj.GetPtr(); }\n", offset+3,
" ");
452 fprintf(hf,
"%-*sTClaProxy obj;\n", offset+3,
" ");
454 }
else if (
IsSTL()) {
456 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
457 fprintf(hf,
"%-*sInt_t GetEntries() { return obj.GetEntries(); }\n",offset+3,
" ");
459 fprintf(hf,
"%-*sTStlProxy obj;\n", offset+3,
" ");
463 fprintf(hf,
"%-*sInjecTBranchProxyInterface();\n", offset+3,
" ");
464 fprintf(hf,
"%-*sTBranchProxy obj;\n", offset+3,
" ");
474 fprintf(hf,
"%-*s};\n",offset,
" ");
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
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.
bool IsClones() const
Return true if this proxy is for a TClonesArray.
TBranchProxyClassDescriptor(const TBranchProxyClassDescriptor &b)
void OutputDecl(FILE *hf, int offset, UInt_t)
Output the declaration and implementation of this emulation class.
virtual bool IsEquivalent(const TBranchProxyClassDescriptor *other)
Return true if this description is the 'same' as the other decription.
void NameToSymbol()
Make the typename a proper class name without having the really deal with namespace and templates.
bool IsSTL() const
Return true if this proxy is for a TClonesArray.
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.
bool IsLoaded() const
Return true if the class needed by the branch is loaded.
UInt_t fMaxDatamemberType
TVirtualStreamerInfo * fInfo
void AddDescriptor(TBranchProxyDescriptor *desc, bool isBase)
Add a descriptor to this proxy.
bool IsSplit() const
Return true if the branch is split.
void OutputDecl(FILE *hf, int offset, UInt_t maxVarname)
Output the declaration corresponding to this proxy.
const char * GetBranchName()
Get the branch name.
bool IsEquivalent(const TBranchProxyDescriptor *other, bool inClass=false)
Return true if this description is the 'same' as the other description.
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.
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.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
const char * Data() const
TString & Remove(Ssiz_t pos)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual TClass * GetValueClass() const =0
If the value type is a user-defined class, return a pointer to the TClass representing the value type...
Abstract Interface class describing Streamer information for one class.
int main(int argc, char **argv)
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.