86 va_start(ap,
va_(fmt));
96 FILE *left = fopen(from.
Data(),
"r");
97 FILE *right = fopen(to.
Data(),
"r");
100 char rightbuffer[256];
102 char *lvalue,*rvalue;
107 lvalue = fgets(leftbuffer,
sizeof(leftbuffer), left);
108 rvalue = fgets(rightbuffer,
sizeof(rightbuffer), right);
110 if (lvalue&&rvalue) {
111 if (strstr(lvalue,
"by ROOT version")) {
120 }
while(
areEqual && lvalue && rvalue);
140 if (countname && strlen(countname)>0) ndim = 1;
156 }
else if (ndim==1) {
165 result +=
"ArrayProxy<";
166 for(
Int_t ind = ndim - 2; ind > 0; --ind) {
167 result +=
"TMultiArrayType<";
169 result +=
"TArrayType<";
174 for(
Int_t ind = ndim - 2; ind > 0; --ind) {
211 const char *fileprefix,
212 const char *option,
UInt_t maxUnrolling) :
214 fMaxDatamemberType(2),
220 fMaxUnrolling(maxUnrolling),
221 fCurrentListOfTopProxies(&fListOfTopProxies)
233 const char *script,
const char *cutscript,
234 const char *fileprefix,
235 const char *option,
UInt_t maxUnrolling) :
237 fMaxDatamemberType(2),
239 fCutScript(cutscript),
243 fMaxUnrolling(maxUnrolling),
244 fCurrentListOfTopProxies(&fListOfTopProxies)
267 if (desc==0)
return 0;
347 if (strstr(classname,
"<")!=0) {
351 if (
gDebug>=6)
Warning(
"AddForward",
"Forward declaration of templated class not implemented yet.");
352 }
else if (strcmp(classname,
"string")==0) {
373 if (pragma_text ==
n->GetString()) {
390 Warning(
"TTreeProxyGenerator",
"The branch name \"%s\" is duplicated. Only the first instance \n"
391 "\twill be available directly. The other instance(s) might be available via their complete name\n"
392 "\t(including the name of their mother branche's name).",desc->
GetName());
412 if (clname[strlen(clname)-1]==
'>') {
415 }
else if (isscope) {
430 UInt_t len = strlen(clname);
435 for (
UInt_t i = 0; i < len; ++i) {
438 if (nest == 0 && clname[i+1] ==
':') {
446 if (nest == 1) last = i + 1;
449 if (nest == 0)
return;
452 if ((clname[i] ==
',' && nest == 1) || (clname[i] ==
'>' && nest == 0)) {
453 TString incName(clname + last, i - last);
455 if (clname[i] ==
'>' && nest == 1) incName.
Append(
">");
457 if (isdigit(incName[0])) {
475 if (info==0) info = branch->
GetInfo();
518 TIter peek = branches;
520 if (topdesc && topdesc->
IsClones()) {
524 containerName =
"TClonesArray";
525 }
else if (topdesc && topdesc->
IsSTL()) {
535 containerName =
"TClonesArray";
542 }
else if (branch->
GetType() == 3) {
544 containerName =
"TClonesArray";
545 }
else if (branch->
GetType() == 4) {
553 subBranchPrefix = mom->
GetName();
554 if (subBranchPrefix[subBranchPrefix.
Length()-1]==
'.') {
557 subBranchPrefix =
"";
569 TIter peek = branches;
574 Error(
"AnalyzeBranches",
"Ran out of branches when looking in branch %s, class %s",
577 Error(
"AnalyzeBranches",
"Ran out of branches when looking in class %s, element %s",
578 info->
GetName(),element->GetName());
588 if (element->GetType()==-1) {
599 else branchEndname = branch->
GetName();
601 pos = branchEndname.
Index(
".");
603 if (subBranchPrefix.
Length() &&
604 branchEndname.
BeginsWith( subBranchPrefix ) ) {
612 switch(element->GetType()) {
691 TClass *cl = element->GetClassPointer();
694 proxyTypeName =
Form(
"T%sObjProxy<%s >", middle.
Data(), cl->
GetName());
700 containerName =
"TClonesArray";
705 if (valueClass) cname = valueClass->
GetName();
708 proxyTypeName =
Form(
"TStlSimpleProxy<%s >", cl->
GetName());
721 if (element->IsBase()) {
732 if (branchEndname == element->GetName()) {
758 proxyTypeName = local_cldesc->
GetName();
759 local_cldesc =
AddClass(local_cldesc);
800 if (added) proxyTypeName = added->
GetName();
805 if (branchEndname == element->GetName()) {
831 proxyTypeName = local_cldesc->
GetName();
832 local_cldesc =
AddClass(local_cldesc);
853 if (local_prefix.
Length()) local_prefix +=
".";
854 local_prefix += element->GetName();
876 if (added) proxyTypeName = added->
GetName();
886 Error(
"AnalyzeBranch",
887 "Unsupported type for %s (%d).",
888 branch->
GetName(),element->GetType());
892 TString dataMemberName = element->GetName();
895 proxyTypeName, branchname,
true, skipped ), isBase );
897 dataMemberName.
Prepend(prefix);
899 proxyTypeName, branchname,
true, skipped ) );
917 Error(
"AnalyzeOldLeaf",
"TLeafObject not supported yet");
923 if (pos!=-1) leafTypeName.
Remove(pos);
929 std::vector<Int_t> maxDim;
934 pos = temp.
Index(
"[");
936 if (pos) temp.
Remove(0,pos);
940 pos = temp.
Index(
"[");
942 if (pos) temp.
Remove(0,pos);
949 const char *current = dimensions.
Data();
955 if (current[0] ==
']') {
956 maxDim.push_back(-1);
958 scanindex = sscanf(current,
"%d",&index);
960 maxDim.push_back(index);
962 maxDim.push_back(-2);
966 current = (
char*)strstr( current,
"[" );
984 type += leafTypeName;
990 type += leafTypeName;
995 type =
"TArrayProxy<";
996 for(
Int_t ind = dim - 2; ind > 0; --ind) {
997 type +=
"TMultiArrayType<";
999 type +=
"TArrayType<";
1002 type += maxDim[dim-1];
1004 for(
Int_t ind = dim - 2; ind > 0; --ind) {
1006 type += maxDim[ind];
1021 true,
false,
true ),
1027 true,
false,
true ) );
1043 UInt_t extraLookedAt = 0;
1059 for(
int l=0;
l<nleaves;
l++) {
1065 TString dataMemberName = branchName;
1070 branchName.
Data() ),
1076 branchName.
Data() ) );
1087 return extraLookedAt;
1095 TIter next(
tree->GetListOfBranches() );
1097 while ( (branch = (
TBranch*)next()) ) {
1099 const char *branchname = branch->
GetName();
1101 if (classname && strlen(classname)) {
1114 containerName =
"TClonesArray";
1122 Error(
"AnalyzeTree",
1123 "Introspection of TClonesArray in older file not implemented yet.");
1138 Error(
"AnalyzeTree",
1139 "Introspection of TClonesArray for %s failed.",branch->
GetName());
1144 containerName = cl->
GetName();
1188 TString dataMemberName = branchname;
1197 true,
false,
false ) );
1216 TString dataMemberName = branchname;
1219 if ( branchname[strlen(branchname)-1] !=
'.' ) {
1231 if (
tree->GetListOfFriends()) {
1235 TIter nextfriend(
tree->GetListOfFriends());
1275 containerName =
"TClonesArray";
1276 }
else if (topdesc->
IsSTL()) {
1284 if (!element)
return;
1286 if (strcmp(element->
GetName(),
"This")==0) {
1288 containerName = cl->
GetName();
1314 if (subpath.
Length()>0) subpath +=
".";
1315 subpath += dataMemberName;
1423 containerName =
"TClonesArray";
1437 if (path && strlen(path)>0) fullpath.
Append(path).
Append(
".");
1438 fullpath += element->
GetName();
1458 Error(
"AnalyzeTree",
1459 "Introspection of TClonesArray in older file not implemented yet.");
1464 containerName = cl->
GetName();
1468 else Error(
"AnalyzeTree",
"missing class for %s.",branch->
GetName());
1479 Error(
"AnalyzeTree",
1480 "Unsupported type for %s %s %d",
1485 dataMemberName = element->
GetName();
1503 if (subpath.
Length()>0) subpath +=
".";
1504 subpath += dataMemberName;
1517 pxDataMemberName = dataMemberName;
1520 dataMemberName.
Data(),
false),
1523 Error(
"AnalyzeTree",
"topdesc should not be null in TTreeProxyGenerator::AnalyzeElement.");
1584 Error(
"WriteProxy",
"No user script has been specified.");
1593 while ( incPath.
Index(
" :") != -1 ) {
1596 incPath.
Prepend(fileLocation+
":.:");
1603 const char *cutfilename =
nullptr;
1606 incPath.
Prepend(fileLocation+
":.:");
1642 treefile =
"Memory Directory";
1646 if (dot_pos ==
kNPOS) {
1647 Error(
"WriteProxy",
"User's script (%s) has no extension! Nothing will be written.",scriptfunc.
Data());
1649 delete [] cutfilename;
1653 TString scriptHeader = scriptfunc;
1654 const char * extensions[] = {
".h",
".hh",
".hpp",
".hxx",
".hPP",
".hXX" };
1657 for (i = 0; i < 6; i++ ) {
1658 TString possible = scriptHeader;
1659 possible.
Append(extensions[i]);
1662 scriptHeader = possible;
1664 scriptHeader.
Data())));
1674 dot_pos = cutscriptfunc.
Last(
'.');
1676 TString cutscriptHeader = cutscriptfunc;
1678 for (i = 0; i < 6; i++ ) {
1679 TString possible = cutscriptHeader;
1680 possible.
Append(extensions[i]);
1683 cutscriptHeader = possible;
1685 cutscriptHeader.
Data())));
1694 TString tmpfilename =
".Proxy-";
1701 Error(
"WriteProxy",
"Unable to open the file %s for writing.",
1704 delete [] cutfilename;
1709 fprintf(hf,
"/////////////////////////////////////////////////////////////////////////\n");
1710 fprintf(hf,
"// This class has been automatically generated \n");
1711 fprintf(hf,
"// (at %s by ROOT version %s)\n",td.
AsString(),
gROOT->GetVersion());
1714 fprintf(hf,
"// found on file: %s\n",treefile.
Data());
1718 fprintf(hf,
"/////////////////////////////////////////////////////////////////////////\n");
1722 fprintf(hf,
"#ifndef %s_h\n",classname.
Data());
1723 fprintf(hf,
"#define %s_h\n",classname.
Data());
1728 fprintf(hf,
"#define R__BRANCHPROXY_GENERATOR_VERSION 2\n\n");
1729 fprintf(hf,
"// ROOT headers needed by the proxy\n");
1730 fprintf(hf,
"#include <TROOT.h>\n");
1731 fprintf(hf,
"#include <TChain.h>\n");
1732 fprintf(hf,
"#include <TFile.h>\n");
1733 fprintf(hf,
"#include <TPad.h>\n");
1734 fprintf(hf,
"#include <TH1.h>\n");
1735 fprintf(hf,
"#include <TSelector.h>\n");
1736 fprintf(hf,
"#include <TBranchProxy.h>\n");
1737 fprintf(hf,
"#include <TBranchProxyDirector.h>\n");
1738 fprintf(hf,
"#include <TBranchProxyTemplate.h>\n");
1739 fprintf(hf,
"#include <TFriendProxy.h>\n");
1740 fprintf(hf,
"using namespace ROOT::Internal;\n");
1741 fprintf(hf,
"using ROOT::Detail::TBranchProxy;\n");
1744 fprintf(hf,
"// forward declarations needed by this particular proxy\n");
1747 while ( (current=next()) ) {
1748 if (strstr(current->
GetTitle(),
"::")==0) {
1752 fprintf(hf,
"%s",current->
GetTitle());
1757 fprintf(hf,
"// Header needed by this particular proxy\n");
1760 while ( (header = next()) ) {
1761 fprintf(hf,
"%s",header->
GetTitle());
1765 fprintf(hf,
"class %s_Interface {\n", scriptfunc.
Data());
1766 fprintf(hf,
" // This class defines the list of methods that are directly used by %s,\n",classname.
Data());
1767 fprintf(hf,
" // and that can be overloaded in the user's script\n");
1768 fprintf(hf,
"public:\n");
1769 fprintf(hf,
" void %s_Begin(TTree*) {}\n",scriptfunc.
Data());
1770 fprintf(hf,
" void %s_SlaveBegin(TTree*) {}\n",scriptfunc.
Data());
1771 fprintf(hf,
" Bool_t %s_Notify() { return kTRUE; }\n",scriptfunc.
Data());
1772 fprintf(hf,
" Bool_t %s_Process(Long64_t) { return kTRUE; }\n",scriptfunc.
Data());
1773 fprintf(hf,
" void %s_SlaveTerminate() {}\n",scriptfunc.
Data());
1774 fprintf(hf,
" void %s_Terminate() {}\n",scriptfunc.
Data());
1778 fprintf(hf,
"class %s : public TSelector, public %s_Interface {\n", classname.
Data(), scriptfunc.
Data());
1779 fprintf(hf,
"public :\n");
1780 fprintf(hf,
" TTree *fChain; //!pointer to the analyzed TTree or TChain\n");
1781 fprintf(hf,
" TH1 *htemp; //!pointer to the histogram\n");
1782 fprintf(hf,
" TBranchProxyDirector fDirector; //!Manages the proxys\n\n");
1784 fprintf(hf,
" // Optional User methods\n");
1785 fprintf(hf,
" TClass *fClass; // Pointer to this class's description\n");
1788 fprintf(hf,
"\n // Wrapper class for each unwounded class\n");
1797 fprintf(hf,
"\n // Wrapper class for each friend TTree\n");
1805 fprintf(hf,
"\n // Proxy for each of the branches, leaves and friends of the tree\n");
1821 fprintf(hf,
" %s(TTree *tree=0) : \n",classname.
Data());
1822 fprintf(hf,
" fChain(0)");
1823 fprintf(hf,
",\n htemp(0)");
1824 fprintf(hf,
",\n fDirector(tree,-1)");
1825 fprintf(hf,
",\n fClass (TClass::GetClass(\"%s\"))",classname.
Data());
1828 fprintf(hf,
",\n %-*s(&fDirector,\"%s\")",
1834 fprintf(hf,
",\n %-*s(&fDirector,tree,%d)",
1838 fprintf(hf,
"\n { }\n");
1841 fprintf(hf,
" ~%s();\n",classname.
Data());
1842 fprintf(hf,
" Int_t Version() const {return 1;}\n");
1843 fprintf(hf,
" void Begin(::TTree *tree);\n");
1844 fprintf(hf,
" void SlaveBegin(::TTree *tree);\n");
1845 fprintf(hf,
" void Init(::TTree *tree);\n");
1846 fprintf(hf,
" Bool_t Notify();\n");
1847 fprintf(hf,
" Bool_t Process(Long64_t entry);\n");
1848 fprintf(hf,
" void SlaveTerminate();\n");
1849 fprintf(hf,
" void Terminate();\n");
1851 fprintf(hf,
" ClassDef(%s,0);\n",classname.
Data());
1854 fprintf(hf,
"//inject the user's code\n");
1864 fprintf(hf,
"#endif\n");
1867 fprintf(hf,
"#ifdef __MAKECINT__\n");
1872 fprintf(hf,
"#pragma link C++ class %s::%s-;\n",classname.
Data(),clp->
GetName());
1883 fprintf(hf,
"#pragma link C++ class %s;\n",classname.
Data());
1884 fprintf(hf,
"#endif\n");
1888 fprintf(hf,
"inline %s::~%s() {\n",classname.
Data(),classname.
Data());
1889 fprintf(hf,
" // destructor. Clean up helpers.\n");
1893 fprintf(hf,
"inline void %s::Init(TTree *tree)\n",classname.
Data());
1895 fprintf(hf,
"// Set branch addresses\n");
1896 fprintf(hf,
" if (tree == 0) return;\n");
1897 fprintf(hf,
" fChain = tree;\n");
1898 fprintf(hf,
" fDirector.SetTree(fChain);\n");
1899 fprintf(hf,
" if (htemp == 0) {\n");
1900 fprintf(hf,
" htemp = fDirector.CreateHistogram(GetOption());\n");
1904 fprintf(hf,
" htemp->SetTitle(\"%s\");\n",
fScript.
Data());
1906 fprintf(hf,
" fObject = htemp;\n");
1910 fprintf(hf,
"Bool_t %s::Notify()\n",classname.
Data());
1912 fprintf(hf,
" // Called when loading a new file.\n");
1913 fprintf(hf,
" // Get branch pointers.\n");
1914 fprintf(hf,
" fDirector.SetTree(fChain);\n");
1915 fprintf(hf,
" %s_Notify();\n",scriptfunc.
Data());
1917 fprintf(hf,
" return kTRUE;\n");
1923 fprintf(hf,
"inline void %s::Begin(TTree *tree)\n",classname.
Data());
1925 fprintf(hf,
" // The Begin() function is called at the start of the query.\n");
1926 fprintf(hf,
" // When running with PROOF Begin() is only called on the client.\n");
1927 fprintf(hf,
" // The tree argument is deprecated (on PROOF 0 is passed).\n");
1929 fprintf(hf,
" TString option = GetOption();\n");
1930 fprintf(hf,
" %s_Begin(tree);\n",scriptfunc.
Data());
1936 fprintf(hf,
"inline void %s::SlaveBegin(TTree *tree)\n",classname.
Data());
1938 fprintf(hf,
" // The SlaveBegin() function is called after the Begin() function.\n");
1939 fprintf(hf,
" // When running with PROOF SlaveBegin() is called on each slave server.\n");
1940 fprintf(hf,
" // The tree argument is deprecated (on PROOF 0 is passed).\n");
1942 fprintf(hf,
" Init(tree);\n");
1944 fprintf(hf,
" %s_SlaveBegin(tree);\n",scriptfunc.
Data());
1950 fprintf(hf,
"inline Bool_t %s::Process(Long64_t entry)\n",classname.
Data());
1953 fprintf(hf,
" // The Process() function is called for each entry in the tree (or possibly\n"
1954 " // keyed object in the case of PROOF) to be processed. The entry argument\n"
1955 " // specifies which entry in the currently loaded tree is to be processed.\n"
1956 " // It can be passed to either TTree::GetEntry() or TBranch::GetEntry()\n"
1957 " // to read either all or the required parts of the data. When processing\n"
1958 " // keyed objects with PROOF, the object is already loaded and is available\n"
1959 " // via the fObject pointer.\n"
1961 " // This function should contain the \"body\" of the analysis. It can contain\n"
1962 " // simple or elaborate selection criteria, run algorithms on the data\n"
1963 " // of the event and typically fill histograms.\n\n");
1964 fprintf(hf,
" // WARNING when a selector is used with a TChain, you must use\n");
1965 fprintf(hf,
" // the pointer to the current TTree to call GetEntry(entry).\n");
1966 fprintf(hf,
" // The entry is always the local entry number in the current tree.\n");
1967 fprintf(hf,
" // Assuming that fChain is the pointer to the TChain being processed,\n");
1968 fprintf(hf,
" // use fChain->GetTree()->GetEntry(entry).\n");
1971 fprintf(hf,
" fDirector.SetReadEntry(entry);\n");
1974 fprintf(hf,
" if (%s()) %s();\n",cutscriptfunc.
Data(),scriptfunc.
Data());
1976 fprintf(hf,
" %s();\n",scriptfunc.
Data());
1980 fprintf(hf,
" if (%s()) htemp->Fill(%s());\n",cutscriptfunc.
Data(),scriptfunc.
Data());
1982 fprintf(hf,
" htemp->Fill(%s());\n",scriptfunc.
Data());
1985 fprintf(hf,
" %s_Process(entry);\n",scriptfunc.
Data());
1986 fprintf(hf,
" return kTRUE;\n");
1988 fprintf(hf,
"}\n\n");
1991 fprintf(hf,
"inline void %s::SlaveTerminate()\n",classname.
Data());
1993 fprintf(hf,
" // The SlaveTerminate() function is called after all entries or objects\n"
1994 " // have been processed. When running with PROOF SlaveTerminate() is called\n"
1995 " // on each slave server.");
1997 fprintf(hf,
" %s_SlaveTerminate();\n",scriptfunc.
Data());
1998 fprintf(hf,
"}\n\n");
2001 fprintf(hf,
"inline void %s::Terminate()\n",classname.
Data());
2003 fprintf(hf,
" // Function called at the end of the event loop.\n");
2004 fprintf(hf,
" htemp = (TH1*)fObject;\n");
2005 fprintf(hf,
" Int_t drawflag = (htemp && htemp->GetEntries()>0);\n");
2007 fprintf(hf,
" if (gPad && !drawflag && !fOption.Contains(\"goff\") && !fOption.Contains(\"same\")) {\n");
2008 fprintf(hf,
" gPad->Clear();\n");
2009 fprintf(hf,
" } else {\n");
2010 fprintf(hf,
" if (fOption.Contains(\"goff\")) drawflag = false;\n");
2011 fprintf(hf,
" if (drawflag) htemp->Draw(fOption);\n");
2013 fprintf(hf,
" %s_Terminate();\n",scriptfunc.
Data());
2026 delete [] cutfilename;
void ErrorHandler(int level, const char *location, const char *fmt, va_list va)
General error handler function. It calls the user set error handler.
void Error(const char *location, const char *msgfmt,...)
void Warning(const char *location, const char *msgfmt,...)
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
void Debug(Int_t level, const char *va_(fmt),...)
const char * GetBranchName() const
const char * GetRawSymbol() const
const char * GetSubBranchPrefix() const
void AddDescriptor(TBranchProxyDescriptor *desc, Bool_t isBase)
void OutputDecl(FILE *hf, int offset, UInt_t)
virtual Bool_t IsEquivalent(const TBranchProxyClassDescriptor *other)
TString GetContainerName() const
void OutputDecl(FILE *hf, int offset, UInt_t maxVarname)
const char * GetBranchName()
const char * GetTypeName()
const char * GetDataName()
void OutputDecl(FILE *hf, int offset, UInt_t maxVarname)
Bool_t IsEquivalent(const TFriendProxyDescriptor *other)
TList * GetListOfTopProxies()
void OutputClassDecl(FILE *hf, int offset, UInt_t maxVarname)
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.
void AddMissingClassAsEnum(const char *clname, Bool_t isscope)
void AnalyzeTree(TTree *tree)
TBranchProxyClassDescriptor * AddClass(TBranchProxyClassDescriptor *desc)
void AddDescriptor(TBranchProxyDescriptor *desc)
void AddPragma(const char *pragma_text)
UInt_t AnalyzeOldLeaf(TLeaf *leaf, UInt_t level, TBranchProxyClassDescriptor *topdesc)
Bool_t NeedToEmulate(TClass *cl, UInt_t level)
UInt_t AnalyzeOldBranch(TBranch *branch, UInt_t level, TBranchProxyClassDescriptor *desc)
void AnalyzeElement(TBranch *branch, TStreamerElement *element, UInt_t level, TBranchProxyClassDescriptor *desc, const char *path)
TTreeProxyGenerator(TTree *tree, const char *script, const char *fileprefix, const char *option, UInt_t maxUnrolling)
void AddFriend(TFriendProxyDescriptor *desc)
void CheckForMissingClass(const char *clname)
UInt_t AnalyzeBranches(UInt_t level, TBranchProxyClassDescriptor *topdesc, TBranchElement *branch, TVirtualStreamerInfo *info=0)
void ParseOptions()
Parse the options string.
TList * fCurrentListOfTopProxies
void AddForward(TClass *cl)
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.