16 #include "TClassEdit.h" 55 if (0 == strcmp(cl->
GetName(),
"string")) {
56 directive =
"#include <string>\n";
58 const char *what =
"";
60 case ROOT::kSTLvector: what =
"vector";
break;
61 case ROOT::kSTLlist: what =
"list";
break;
62 case ROOT::kSTLforwardlist: what =
"forward_list";
break;
63 case -ROOT::kSTLdeque:
64 case ROOT::kSTLdeque: what =
"deque";
break;
66 case ROOT::kSTLmap: what =
"map";
break;
67 case -ROOT::kSTLmultimap:
68 case ROOT::kSTLmultimap: what =
"map";
break;
70 case ROOT::kSTLset: what =
"set";
break;
71 case -ROOT::kSTLmultiset:
72 case ROOT::kSTLmultiset: what =
"set";
break;
73 case -ROOT::kSTLunorderedset:
74 case ROOT::kSTLunorderedset: what =
"unordered_set";
break;
75 case -ROOT::kSTLunorderedmultiset:
76 case ROOT::kSTLunorderedmultiset: what =
"unordered_multiset";
break;
77 case -ROOT::kSTLunorderedmap:
78 case ROOT::kSTLunorderedmap: what =
"unordered_map";
break;
79 case -ROOT::kSTLunorderedmultimap:
80 case ROOT::kSTLunorderedmultimap: what =
"unordered_multimap";
break;
83 directive =
"#include <";
90 if (!filename)
return;
93 TString inclPath(
"include;prec_stl");
95 TString inclPath(
"include:prec_stl");
101 const char* pdelim =
";";
102 static const char ddelim =
'\\';
104 const char* pdelim =
":";
105 static const char ddelim =
'/';
107 while (inclPath.
Tokenize(inclDir, posDelim, pdelim))
110 filename += inclDir.
Length();
111 if (filename[0] == ddelim || filename[0] ==
'/') {
117 directive =
Form(
"#include \"%s\"\n",filename);
118 }
else if (!strncmp(cl->
GetName(),
"pair<", 5)
119 || !strncmp(cl->
GetName(),
"std::pair<", 10)) {
120 TClassEdit::TSplitType split(cl->
GetName());
121 if (split.fElements.size() == 3) {
122 for (
int arg = 1; arg < 3; ++arg) {
132 if (directive ==
n->GetTitle()) {
169 const char *ename = 0;
177 else Error(
"AnalyzeBranch",
"Missing parent for %s.", branch->
GetName());
185 cname = arr->GetClass()->GetName();
188 Error(
"AnalyzeBranch",
189 "Introspection of TClonesArray in older file not implemented yet.");
202 if (info)
return info;
virtual const char * GetName() const
Returns name of object.
const char * GetDeclFileName() const
Namespace for new ROOT classes and functions.
virtual TClass * GetValueClass() const =0
TBranch * GetSubBranch(const TBranch *br) const
Find the parent branch of child.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
void AddHeader(TClass *cl)
Add a header inclusion request.
TStreamerInfo * GetInfo() const
Get streamer info for the branch class.
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
TString GetContainedClassName(TBranchElement *branch, TStreamerElement *element, Bool_t ispointer)
Get name of class inside a container.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual Int_t GetClassVersion() const =0
The TNamed class is the base class for all named ROOT classes.
virtual Long64_t GetReadEntry() const
virtual Int_t GetOffset(const char *) const =0
TString & Append(const char *cs)
TVirtualStreamerInfo * GetBaseStreamerInfo() const
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of a BranchElement and return total number of bytes.
TTreeGeneratorBase(TTree *tree, const char *option)
Constructor.
virtual TFile * GetFile() const
virtual const char * GetClonesName() const
char * GetObject() const
Return a pointer to our object.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TVirtualStreamerInfo * GetStreamerInfo(TBranch *branch, TIter current, TClass *cl)
Return the correct TStreamerInfo of class 'cl' in the list of branches (current) [Assuming these bran...
char * Form(const char *fmt,...)
The ROOT global object gROOT contains a list of all defined classes.
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
A Branch for the case of an object.
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
TDirectory * GetDirectory() const
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, 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.
const TList * GetStreamerInfoCache()
Returns the cached list of StreamerInfos used in this file.
Mother of all ROOT objects.
An array of clone (identical) objects.
virtual void Add(TObject *obj)
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
A TTree object has a header with a name and a title.
A TTree is a list of TBranches.
Abstract Interface class describing Streamer information for one class.
TVirtualStreamerInfo * GetBaseClass(TStreamerElement *element)
Check if element is a base class and if yes, return the base class.
TBranch * GetMother() const
Get our top-level parent branch in the tree.
void Error(ErrorHandler_t func, int code, const char *va_(fmt),...)
Write error message and call a handler, if required.
const char * Data() const