85 va_start(ap,
va_(fmt));
95 FILE *left = fopen(from.
Data(),
"r");
96 FILE *right = fopen(to.
Data(),
"r");
99 char rightbuffer[256];
101 char *lvalue,*rvalue;
106 lvalue = fgets(leftbuffer,
sizeof(leftbuffer), left);
107 rvalue = fgets(rightbuffer,
sizeof(rightbuffer), right);
109 if (lvalue&&rvalue) {
110 if (strstr(lvalue,
"by ROOT version")) {
119 }
while(areEqual && lvalue && rvalue);
136 if (element->
InheritsFrom(TStreamerBasicPointer::Class())) {
139 if (countname && strlen(countname)>0) ndim = 1;
155 }
else if (ndim==1) {
164 result +=
"ArrayProxy<";
165 for(
Int_t ind = ndim - 2; ind > 0; --ind) {
166 result +=
"TMultiArrayType<";
168 result +=
"TArrayType<";
173 for(
Int_t ind = ndim - 2; ind > 0; --ind) {
213 const char *fileprefix,
214 const char *option,
UInt_t maxUnrolling) :
216 fMaxDatamemberType(2),
222 fMaxUnrolling(maxUnrolling),
223 fCurrentListOfTopProxies(&fListOfTopProxies)
236 const char *script,
const char *cutscript,
237 const char *fileprefix,
238 const char *option,
UInt_t maxUnrolling) :
240 fMaxDatamemberType(2),
242 fCutScript(cutscript),
246 fMaxUnrolling(maxUnrolling),
247 fCurrentListOfTopProxies(&fListOfTopProxies)
270 if (desc==0)
return 0;
352 if (strstr(classname,
"<")!=0) {
356 if (
gDebug>=6)
Warning(
"AddForward",
"Forward declaration of templated class not implemented yet.");
357 }
else if (strcmp(classname,
"string")==0) {
380 if (pragma_text ==
n->GetString()) {
398 Warning(
"TTreeProxyGenerator",
"The branch name \"%s\" is duplicated. Only the first instance \n"
399 "\twill be available directly. The other instance(s) might be available via their complete name\n"
400 "\t(including the name of their mother branche's name).",desc->
GetName());
421 if (clname[strlen(clname)-1]==
'>') {
424 }
else if (isscope) {
440 UInt_t len = strlen(clname);
445 for (
UInt_t i = 0; i < len; ++i) {
448 if (nest == 0 && clname[i+1] ==
':') {
456 if (nest == 1) last = i + 1;
459 if (nest == 0)
return;
462 if ((clname[i] ==
',' && nest == 1) || (clname[i] ==
'>' && nest == 0)) {
463 TString incName(clname + last, i - last);
465 if (clname[i] ==
'>' && nest == 1) incName.
Append(
">");
467 if (isdigit(incName[0])) {
486 if (info==0) info = branch->
GetInfo();
530 TIter peek = branches;
532 if (topdesc && topdesc->
IsClones()) {
536 containerName =
"TClonesArray";
537 }
else if (topdesc && topdesc->
IsSTL()) {
547 containerName =
"TClonesArray";
554 }
else if (branch->
GetType() == 3) {
556 containerName =
"TClonesArray";
557 }
else if (branch->
GetType() == 4) {
565 subBranchPrefix = mom->
GetName();
566 if (subBranchPrefix[subBranchPrefix.
Length()-1]==
'.') {
569 subBranchPrefix =
"";
581 TIter peek = branches;
586 Error(
"AnalyzeBranches",
"Ran out of branches when looking in branch %s, class %s",
589 Error(
"AnalyzeBranches",
"Ran out of branches when looking in class %s, element %s",
590 info->
GetName(),element->GetName());
600 if (element->GetType()==-1) {
611 else branchEndname = branch->
GetName();
613 pos = branchEndname.
Index(
".");
615 if (subBranchPrefix.
Length() &&
616 branchEndname.
BeginsWith( subBranchPrefix ) ) {
624 switch(element->GetType()) {
703 TClass *cl = element->GetClassPointer();
706 proxyTypeName =
Form(
"T%sObjProxy<%s >", middle.
Data(), cl->
GetName());
709 if (cl==TClonesArray::Class()) {
712 containerName =
"TClonesArray";
717 if (valueClass) cname = valueClass->
GetName();
720 proxyTypeName =
Form(
"TStlSimpleProxy<%s >", cl->
GetName());
733 if (element->IsBase()) {
744 if (branchEndname == element->GetName()) {
770 proxyTypeName = local_cldesc->
GetName();
771 local_cldesc =
AddClass(local_cldesc);
812 if (added) proxyTypeName = added->
GetName();
817 if (branchEndname == element->GetName()) {
843 proxyTypeName = local_cldesc->
GetName();
844 local_cldesc =
AddClass(local_cldesc);
865 if (local_prefix.
Length()) local_prefix +=
".";
866 local_prefix += element->GetName();
888 if (added) proxyTypeName = added->
GetName();
898 Error(
"AnalyzeBranch",
899 "Unsupported type for %s (%d).",
900 branch->
GetName(),element->GetType());
904 TString dataMemberName = element->GetName();
907 proxyTypeName, branchname,
true, skipped ), isBase );
909 dataMemberName.
Prepend(prefix);
911 proxyTypeName, branchname,
true, skipped ) );
929 if (leaf->IsA()==TLeafObject::Class()) {
930 Error(
"AnalyzeOldLeaf",
"TLeafObject not supported yet");
936 if (pos!=-1) leafTypeName.
Remove(pos);
942 std::vector<Int_t> maxDim;
947 pos = temp.
Index(
"[");
949 if (pos) temp.
Remove(0,pos);
953 pos = temp.
Index(
"[");
955 if (pos) temp.
Remove(0,pos);
962 const char *current = dimensions.
Data();
968 if (current[0] ==
']') {
969 maxDim.push_back(-1);
971 scanindex = sscanf(current,
"%d",&index);
973 maxDim.push_back(index);
975 maxDim.push_back(-2);
979 current = (
char*)strstr( current,
"[" );
988 if (dim == 0 && leaf->IsA() == TLeafC::Class()) {
997 type += leafTypeName;
1003 type += leafTypeName;
1008 type =
"TArrayProxy<";
1009 for(
Int_t ind = dim - 2; ind > 0; --ind) {
1010 type +=
"TMultiArrayType<";
1012 type +=
"TArrayType<";
1015 type += maxDim[dim-1];
1017 for(
Int_t ind = dim - 2; ind > 0; --ind) {
1019 type += maxDim[ind];
1034 true,
false,
true ),
1040 true,
false,
true ) );
1057 UInt_t extraLookedAt = 0;
1073 for(
int l=0;
l<nleaves;
l++) {
1079 TString dataMemberName = branchName;
1084 branchName.
Data() ),
1090 branchName.
Data() ) );
1101 return extraLookedAt;
1110 TIter next(
tree->GetListOfBranches() );
1112 while ( (branch = (
TBranch*)next()) ) {
1114 const char *branchname = branch->
GetName();
1116 if (classname && strlen(classname)) {
1127 if (cl==TClonesArray::Class()) {
1129 containerName =
"TClonesArray";
1130 if (branch->IsA()==TBranchElement::Class()) {
1137 Error(
"AnalyzeTree",
1138 "Introspection of TClonesArray in older file not implemented yet.");
1153 Error(
"AnalyzeTree",
1154 "Introspection of TClonesArray for %s failed.",branch->
GetName());
1159 containerName = cl->
GetName();
1203 TString dataMemberName = branchname;
1212 true,
false,
false ) );
1231 TString dataMemberName = branchname;
1234 if ( branchname[strlen(branchname)-1] !=
'.' ) {
1246 if (
tree->GetTree()->GetListOfFriends()) {
1250 TIter nextfriend(
tree->GetTree()->GetListOfFriends());
1291 containerName =
"TClonesArray";
1292 }
else if (topdesc->
IsSTL()) {
1300 if (!element)
return;
1302 if (strcmp(element->
GetName(),
"This")==0) {
1304 containerName = cl->
GetName();
1330 if (subpath.
Length()>0) subpath +=
".";
1331 subpath += dataMemberName;
1437 if (cl==TClonesArray::Class()) {
1439 containerName =
"TClonesArray";
1453 if (path && strlen(path)>0) fullpath.
Append(path).
Append(
".");
1454 fullpath += element->
GetName();
1474 Error(
"AnalyzeTree",
1475 "Introspection of TClonesArray in older file not implemented yet.");
1480 containerName = cl->
GetName();
1484 else Error(
"AnalyzeTree",
"missing class for %s.",branch->
GetName());
1485 if (element->IsA()==TStreamerBase::Class()) {
1495 Error(
"AnalyzeTree",
1496 "Unsupported type for %s %s %d",
1501 dataMemberName = element->
GetName();
1519 if (subpath.
Length()>0) subpath +=
".";
1520 subpath += dataMemberName;
1533 pxDataMemberName = dataMemberName;
1536 dataMemberName.
Data(),
false),
1539 Error(
"AnalyzeTree",
"topdesc should not be null in TTreeProxyGenerator::AnalyzeElement.");
1600 Error(
"WriteProxy",
"No user script has been specified.");
1609 while ( incPath.
Index(
" :") != -1 ) {
1612 incPath.
Prepend(fileLocation+
":.:");
1619 const char *cutfilename =
nullptr;
1622 incPath.
Prepend(fileLocation+
":.:");
1658 treefile =
"Memory Directory";
1662 if (dot_pos ==
kNPOS) {
1663 Error(
"WriteProxy",
"User's script (%s) has no extension! Nothing will be written.",scriptfunc.
Data());
1665 delete [] cutfilename;
1669 TString scriptHeader = scriptfunc;
1670 const char * extensions[] = {
".h",
".hh",
".hpp",
".hxx",
".hPP",
".hXX" };
1673 for (i = 0; i < 6; i++ ) {
1674 TString possible = scriptHeader;
1675 possible.
Append(extensions[i]);
1678 scriptHeader = possible;
1680 scriptHeader.
Data())));
1690 dot_pos = cutscriptfunc.
Last(
'.');
1692 TString cutscriptHeader = cutscriptfunc;
1694 for (i = 0; i < 6; i++ ) {
1695 TString possible = cutscriptHeader;
1696 possible.
Append(extensions[i]);
1699 cutscriptHeader = possible;
1701 cutscriptHeader.
Data())));
1710 TString tmpfilename =
".Proxy-";
1717 Error(
"WriteProxy",
"Unable to open the file %s for writing.",
1720 delete [] cutfilename;
1725 fprintf(hf,
"/////////////////////////////////////////////////////////////////////////\n");
1726 fprintf(hf,
"// This class has been automatically generated \n");
1727 fprintf(hf,
"// (at %s by ROOT version %s)\n",td.
AsString(),
gROOT->GetVersion());
1730 fprintf(hf,
"// found on file: %s\n",treefile.
Data());
1734 fprintf(hf,
"/////////////////////////////////////////////////////////////////////////\n");
1738 fprintf(hf,
"#ifndef %s_h\n",classname.
Data());
1739 fprintf(hf,
"#define %s_h\n",classname.
Data());
1744 fprintf(hf,
"#define R__BRANCHPROXY_GENERATOR_VERSION 2\n\n");
1745 fprintf(hf,
"// ROOT headers needed by the proxy\n");
1746 fprintf(hf,
"#include <TROOT.h>\n");
1747 fprintf(hf,
"#include <TChain.h>\n");
1748 fprintf(hf,
"#include <TFile.h>\n");
1749 fprintf(hf,
"#include <TPad.h>\n");
1750 fprintf(hf,
"#include <TH1.h>\n");
1751 fprintf(hf,
"#include <TSelector.h>\n");
1752 fprintf(hf,
"#include <TBranchProxy.h>\n");
1753 fprintf(hf,
"#include <TBranchProxyDirector.h>\n");
1754 fprintf(hf,
"#include <TBranchProxyTemplate.h>\n");
1755 fprintf(hf,
"#include <TFriendProxy.h>\n");
1756 fprintf(hf,
"using namespace ROOT::Internal;\n");
1757 fprintf(hf,
"using ROOT::Detail::TBranchProxy;\n");
1760 fprintf(hf,
"// forward declarations needed by this particular proxy\n");
1763 while ( (current=next()) ) {
1764 if (strstr(current->
GetTitle(),
"::")==0) {
1768 fprintf(hf,
"%s",current->
GetTitle());
1773 fprintf(hf,
"// Header needed by this particular proxy\n");
1776 while ( (header = next()) ) {
1777 fprintf(hf,
"%s",header->
GetTitle());
1781 fprintf(hf,
"class %s_Interface {\n", scriptfunc.
Data());
1782 fprintf(hf,
" // This class defines the list of methods that are directly used by %s,\n",classname.
Data());
1783 fprintf(hf,
" // and that can be overloaded in the user's script\n");
1784 fprintf(hf,
"public:\n");
1785 fprintf(hf,
" void %s_Begin(TTree*) {}\n",scriptfunc.
Data());
1786 fprintf(hf,
" void %s_SlaveBegin(TTree*) {}\n",scriptfunc.
Data());
1787 fprintf(hf,
" Bool_t %s_Notify() { return kTRUE; }\n",scriptfunc.
Data());
1788 fprintf(hf,
" Bool_t %s_Process(Long64_t) { return kTRUE; }\n",scriptfunc.
Data());
1789 fprintf(hf,
" void %s_SlaveTerminate() {}\n",scriptfunc.
Data());
1790 fprintf(hf,
" void %s_Terminate() {}\n",scriptfunc.
Data());
1794 fprintf(hf,
"class %s : public TSelector, public %s_Interface {\n", classname.
Data(), scriptfunc.
Data());
1795 fprintf(hf,
"public :\n");
1796 fprintf(hf,
" TTree *fChain; //!pointer to the analyzed TTree or TChain\n");
1797 fprintf(hf,
" TH1 *htemp; //!pointer to the histogram\n");
1798 fprintf(hf,
" TBranchProxyDirector fDirector; //!Manages the proxys\n\n");
1800 fprintf(hf,
" // Optional User methods\n");
1801 fprintf(hf,
" TClass *fClass; // Pointer to this class's description\n");
1804 fprintf(hf,
"\n // Wrapper class for each unwounded class\n");
1813 fprintf(hf,
"\n // Wrapper class for each friend TTree\n");
1821 fprintf(hf,
"\n // Proxy for each of the branches, leaves and friends of the tree\n");
1837 fprintf(hf,
" %s(TTree *tree=0) : \n",classname.
Data());
1838 fprintf(hf,
" fChain(0)");
1839 fprintf(hf,
",\n htemp(0)");
1840 fprintf(hf,
",\n fDirector(tree,-1)");
1841 fprintf(hf,
",\n fClass (TClass::GetClass(\"%s\"))",classname.
Data());
1844 fprintf(hf,
",\n %-*s(&fDirector,\"%s\")",
1850 fprintf(hf,
",\n %-*s(&fDirector,tree,%d)",
1854 fprintf(hf,
"\n { }\n");
1857 fprintf(hf,
" ~%s();\n",classname.
Data());
1858 fprintf(hf,
" Int_t Version() const {return 1;}\n");
1859 fprintf(hf,
" void Begin(::TTree *tree);\n");
1860 fprintf(hf,
" void SlaveBegin(::TTree *tree);\n");
1861 fprintf(hf,
" void Init(::TTree *tree);\n");
1862 fprintf(hf,
" Bool_t Notify();\n");
1863 fprintf(hf,
" Bool_t Process(Long64_t entry);\n");
1864 fprintf(hf,
" void SlaveTerminate();\n");
1865 fprintf(hf,
" void Terminate();\n");
1867 fprintf(hf,
" ClassDef(%s,0);\n",classname.
Data());
1870 fprintf(hf,
"//inject the user's code\n");
1880 fprintf(hf,
"#endif\n");
1883 fprintf(hf,
"#ifdef __MAKECINT__\n");
1888 fprintf(hf,
"#pragma link C++ class %s::%s-;\n",classname.
Data(),clp->
GetName());
1899 fprintf(hf,
"#pragma link C++ class %s;\n",classname.
Data());
1900 fprintf(hf,
"#endif\n");
1904 fprintf(hf,
"inline %s::~%s() {\n",classname.
Data(),classname.
Data());
1905 fprintf(hf,
" // destructor. Clean up helpers.\n");
1909 fprintf(hf,
"inline void %s::Init(TTree *tree)\n",classname.
Data());
1911 fprintf(hf,
"// Set branch addresses\n");
1912 fprintf(hf,
" if (tree == 0) return;\n");
1913 fprintf(hf,
" fChain = tree;\n");
1914 fprintf(hf,
" fDirector.SetTree(fChain);\n");
1915 fprintf(hf,
" if (htemp == 0) {\n");
1916 fprintf(hf,
" htemp = fDirector.CreateHistogram(GetOption());\n");
1920 fprintf(hf,
" htemp->SetTitle(\"%s\");\n",
fScript.
Data());
1922 fprintf(hf,
" fObject = htemp;\n");
1926 fprintf(hf,
"Bool_t %s::Notify()\n",classname.
Data());
1928 fprintf(hf,
" // Called when loading a new file.\n");
1929 fprintf(hf,
" // Get branch pointers.\n");
1930 fprintf(hf,
" fDirector.SetTree(fChain);\n");
1931 fprintf(hf,
" %s_Notify();\n",scriptfunc.
Data());
1933 fprintf(hf,
" return kTRUE;\n");
1939 fprintf(hf,
"inline void %s::Begin(TTree *tree)\n",classname.
Data());
1941 fprintf(hf,
" // The Begin() function is called at the start of the query.\n");
1942 fprintf(hf,
" // When running with PROOF Begin() is only called on the client.\n");
1943 fprintf(hf,
" // The tree argument is deprecated (on PROOF 0 is passed).\n");
1945 fprintf(hf,
" TString option = GetOption();\n");
1946 fprintf(hf,
" %s_Begin(tree);\n",scriptfunc.
Data());
1952 fprintf(hf,
"inline void %s::SlaveBegin(TTree *tree)\n",classname.
Data());
1954 fprintf(hf,
" // The SlaveBegin() function is called after the Begin() function.\n");
1955 fprintf(hf,
" // When running with PROOF SlaveBegin() is called on each slave server.\n");
1956 fprintf(hf,
" // The tree argument is deprecated (on PROOF 0 is passed).\n");
1958 fprintf(hf,
" Init(tree);\n");
1960 fprintf(hf,
" %s_SlaveBegin(tree);\n",scriptfunc.
Data());
1966 fprintf(hf,
"inline Bool_t %s::Process(Long64_t entry)\n",classname.
Data());
1969 fprintf(hf,
" // The Process() function is called for each entry in the tree (or possibly\n"
1970 " // keyed object in the case of PROOF) to be processed. The entry argument\n"
1971 " // specifies which entry in the currently loaded tree is to be processed.\n"
1972 " // It can be passed to either TTree::GetEntry() or TBranch::GetEntry()\n"
1973 " // to read either all or the required parts of the data. When processing\n"
1974 " // keyed objects with PROOF, the object is already loaded and is available\n"
1975 " // via the fObject pointer.\n"
1977 " // This function should contain the \"body\" of the analysis. It can contain\n"
1978 " // simple or elaborate selection criteria, run algorithms on the data\n"
1979 " // of the event and typically fill histograms.\n\n");
1980 fprintf(hf,
" // WARNING when a selector is used with a TChain, you must use\n");
1981 fprintf(hf,
" // the pointer to the current TTree to call GetEntry(entry).\n");
1982 fprintf(hf,
" // The entry is always the local entry number in the current tree.\n");
1983 fprintf(hf,
" // Assuming that fChain is the pointer to the TChain being processed,\n");
1984 fprintf(hf,
" // use fChain->GetTree()->GetEntry(entry).\n");
1987 fprintf(hf,
" fDirector.SetReadEntry(entry);\n");
1990 fprintf(hf,
" if (%s()) %s();\n",cutscriptfunc.
Data(),scriptfunc.
Data());
1992 fprintf(hf,
" %s();\n",scriptfunc.
Data());
1996 fprintf(hf,
" if (%s()) htemp->Fill(%s());\n",cutscriptfunc.
Data(),scriptfunc.
Data());
1998 fprintf(hf,
" htemp->Fill(%s());\n",scriptfunc.
Data());
2001 fprintf(hf,
" %s_Process(entry);\n",scriptfunc.
Data());
2002 fprintf(hf,
" return kTRUE;\n");
2004 fprintf(hf,
"}\n\n");
2007 fprintf(hf,
"inline void %s::SlaveTerminate()\n",classname.
Data());
2009 fprintf(hf,
" // The SlaveTerminate() function is called after all entries or objects\n"
2010 " // have been processed. When running with PROOF SlaveTerminate() is called\n"
2011 " // on each slave server.");
2013 fprintf(hf,
" %s_SlaveTerminate();\n",scriptfunc.
Data());
2014 fprintf(hf,
"}\n\n");
2017 fprintf(hf,
"inline void %s::Terminate()\n",classname.
Data());
2019 fprintf(hf,
" // Function called at the end of the event loop.\n");
2020 fprintf(hf,
" htemp = (TH1*)fObject;\n");
2021 fprintf(hf,
" Int_t drawflag = (htemp && htemp->GetEntries()>0);\n");
2023 fprintf(hf,
" if (gPad && !drawflag && !fOption.Contains(\"goff\") && !fOption.Contains(\"same\")) {\n");
2024 fprintf(hf,
" gPad->Clear();\n");
2025 fprintf(hf,
" } else {\n");
2026 fprintf(hf,
" if (fOption.Contains(\"goff\")) drawflag = false;\n");
2027 fprintf(hf,
" if (drawflag) htemp->Draw(fOption);\n");
2029 fprintf(hf,
" %s_Terminate();\n",scriptfunc.
Data());
2042 delete [] cutfilename;
void ErrorHandler(int level, const char *location, const char *fmt, std::va_list va)
General error handler function. It calls the user set error handler.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
void Debug(Int_t level, const char *va_(fmt),...)
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.
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.
virtual Bool_t IsEquivalent(const TBranchProxyClassDescriptor *other)
Return true if this description is the 'same' as the other decription.
TString GetContainerName() const
Return the name of the container holding this class, if any.
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.
const char * GetDataName()
Get the name of the data member.
void OutputDecl(FILE *hf, int offset, UInt_t maxVarname)
Print the declaration needed for this descriptor.
Bool_t IsEquivalent(const TFriendProxyDescriptor *other)
Return true if this descriptor and the other are equivalent (describe the same entity).
TList * GetListOfTopProxies()
void OutputClassDecl(FILE *hf, int offset, UInt_t maxVarname)
Print the declaration needed for this descriptor.
Base class for code generators like TTreeProxyGenerator and TTreeReaderGenerator.
TList fListOfHeaders
List of included headers.
void AddHeader(TClass *cl)
Add a header inclusion request.
TVirtualStreamerInfo * GetStreamerInfo(TBranch *branch, TIter current, TClass *cl)
Return the correct TStreamerInfo of class 'cl' in the list of branches (current) [Assuming these bran...
TVirtualStreamerInfo * GetBaseClass(TStreamerElement *element)
Check if element is a base class and if yes, return the base class.
TString GetContainedClassName(TBranchElement *branch, TStreamerElement *element, Bool_t ispointer)
Get name of class inside a container.
TTree * fTree
Pointer to the tree.
TString fOptionStr
User options as a string.
void AddMissingClassAsEnum(const char *clname, Bool_t isscope)
Generate an enum for a given type if it is not known in the list of class unless the type itself a te...
void AnalyzeTree(TTree *tree)
Analyze a TTree and its (potential) friends.
TBranchProxyClassDescriptor * AddClass(TBranchProxyClassDescriptor *desc)
Add a Class Descriptor.
void AddDescriptor(TBranchProxyDescriptor *desc)
Add a branch descriptor.
void AddPragma(const char *pragma_text)
Add a forward declaration request.
UInt_t AnalyzeOldLeaf(TLeaf *leaf, UInt_t level, TBranchProxyClassDescriptor *topdesc)
Analyze the leaf and populate the `TTreeProxyGenerator or the topdesc with its findings.
Bool_t NeedToEmulate(TClass *cl, UInt_t level)
Return true if we should create a nested class representing this class.
UInt_t AnalyzeOldBranch(TBranch *branch, UInt_t level, TBranchProxyClassDescriptor *desc)
Analyze the branch and populate the TTreeProxyGenerator or the topdesc with its findings.
void AnalyzeElement(TBranch *branch, TStreamerElement *element, UInt_t level, TBranchProxyClassDescriptor *desc, const char *path)
Analyze the element and populate the TTreeProxyGenerator or the topdesc with its findings.
TTreeProxyGenerator(TTree *tree, const char *script, const char *fileprefix, const char *option, UInt_t maxUnrolling)
Constructor.
void AddFriend(TFriendProxyDescriptor *desc)
Add Friend descriptor.
void CheckForMissingClass(const char *clname)
Check if the template parameter refers to an enum and/or a missing class (we can't tell those 2 apart...
UInt_t AnalyzeBranches(UInt_t level, TBranchProxyClassDescriptor *topdesc, TBranchElement *branch, TVirtualStreamerInfo *info=0)
Analyze the sub-branch and populate the TTreeProxyGenerator or the topdesc with its findings.
void ParseOptions()
Parse the options string.
TList * fCurrentListOfTopProxies
void AddForward(TClass *cl)
Add a forward declaration request.
void WriteProxy()
Check whether the file exist and do something useful if it does.
UInt_t fMaxDatamemberType
A Branch for the case of an object.
TBranchElement * GetBranchCount() const
TStreamerInfo * GetInfo() const
Get streamer info for the branch class.
A TTree is a list of TBranches.
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any.
virtual char * GetAddress() const
TObjArray * GetListOfBranches()
Int_t GetSplitLevel() const
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
TBranch * GetSubBranch(const TBranch *br) const
Find the parent branch of child.
virtual void SetAddress(void *add)
Set address of this branch.
TObjArray * GetListOfLeaves()
TBranch * GetMother() const
Get our top-level parent branch in the tree.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
Bool_t CanIgnoreTObjectStreamer()
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
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.
An array of clone (identical) objects.
TClass * GetClass() const
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsString() const
Return the date & time as a string (ctime() format).
virtual TFile * GetFile() const
A TFriendElement TF describes a TTree object TF in a file.
virtual TTree * GetTree()
Return pointer to friend TTree.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual const char * GetTypeName() const
TBranch * GetBranch() const
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
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.
Int_t GetEntriesFast() const
Int_t GetEntries() const
Return the number of objects in array (i.e.
TObject * UncheckedAt(Int_t i) const
TObject * At(Int_t idx) const
Collectable string class.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual const char * GetTitle() const
Returns title of object.
const char * GetCountName() const
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
Int_t GetArrayDim() const
Int_t GetMaxIndex(Int_t i) const
const char * GetTypeName() const
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Prepend(const char *cs)
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual const char * GetIncludePath()
Get the list of include path.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
virtual FILE * TempFileName(TString &base, const char *dir=nullptr)
Create a secure temporary file by appending a unique 6 letter string to base.
virtual int Rename(const char *from, const char *to)
Rename a file.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual char * Which(const char *search, const char *file, EAccessMode mode=kFileExists)
Find location of file in a search path.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
virtual int Unlink(const char *name)
Unlink, i.e.
A TTree represents a columnar dataset.
TDirectory * GetDirectory() const
virtual Long64_t GetReadEntry() const
virtual TClass * GetValueClass() const =0
Abstract Interface class describing Streamer information for one class.
virtual TObjArray * GetElements() const =0
virtual TClass * GetClass() const =0
static Bool_t R__AddPragmaForClass(TTreeProxyGenerator *gen, TClass *cl)
Add the "pragma C++ class" if needed and return true if it has been added or if it is known to not be...
TString GetArrayType(TStreamerElement *element, const char *subtype, TTreeProxyGenerator::EContainer container)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
bool areEqual(const RULE *r1, const RULE *r2, bool moduloNameOrPattern=false)
bool IsStdClass(const char *type)
return true if the class belongs to the std namespace
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.