18 #include "TDirectory.h"
98 if (variables.
Length() == 0)
104 if (variables[i] ==
':'
105 && !( (i > 0 && variables[i - 1] ==
':')
106 || (i + 1 < variables.
Length() && variables[i + 1] ==
':') ) ) {
135 if (name.
Length() != 0 && name[0] ==
'+') {
147 if (
char *p = (
char*)strstr(name.
Data(),
"(")) {
150 char* end = p + strlen(p);
154 while (p < end && *p !=
',' && *p !=
')')
162 Error(
"ParseName",
"expected \')\'");
171 Error(
"ParseName",
"impossible value for *q!");
188 char* gg = (
char*)strstr(
fExp.
Data(),
">>");
202 Error(
"ParseVarExp",
"error parsing variable expression");
321 return "TProofDrawEventList";
323 return "TProofDrawEntryList";
325 return "TProofDrawProfile";
327 return "TProofDrawProfile2D";
329 return "TProofDrawGraph";
331 return "TProofDrawPolyMarker3D";
333 return "TProofDrawListOfGraphs";
337 return "TProofDrawHist";
339 return "TProofDrawListOfPolyMarkers3D";
355 Error(
"GetParameter",
"wrong arguments");
398 Error(
"GetVarExp",
"wrong Parameters %d; fDimension = %d", num,
fDimension);
~TTreeDrawArgsParser()
Destructor.
Bool_t ParseVarExp()
Split variables and parse name and parameters in brackets.
void variables(TString fin="TMVA.root", TString dirName="InputVariables_Id", TString title="TMVA Input Variables", Bool_t isRegression=kFALSE, Bool_t useTMVAStyle=kTRUE)
Bool_t SplitVariables(TString variables)
Parse expression [var1 [:var2 [:var3] ...]], number of variables cannot be greater than fgMaxDimensio...
static Int_t fgMaxParameters
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t fParameterGiven[9]
Bool_t ParseOption()
Check if options contain some data important for choosing the type of the drawn object.
void ToLower()
Change string to lower-case.
static Int_t fgMaxDimension
const char * Data() const
TTreeDrawArgsParser::EOutputType DefineType()
Put the type of the draw result into fOutputType and return it.
TString GetProofSelectorName() const
Returns apropriate TSelector class name for proof for the object that is to be drawn assumes that Par...
std::vector< std::vector< double > > Data
TString GetObjectTitle() const
Returns the desired plot title.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Double_t GetParameter(int num) const
returns num-th parameter from brackets in the expression in case of an error (wrong number) returns 0...
static Int_t GetMaxDimension()
return fgMaxDimension (cannot be inline)
Bool_t ParseName(TString name)
Syntax:
char * Form(const char *fmt,...)
TString GetVarExp() const
Returns the variable string, i.e. [var1[:var2[:var2[:var4]]]].
Double_t GetIfSpecified(Int_t num, Double_t def) const
void ClearPrevious()
Resets all the variables of the class.
A class that parses all parameters for TTree::Draw().
Bool_t IsSpecified(int num) const
returns kTRUE if the num-th parameter was specified otherwise returns fFALSE in case of an error (wro...
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
ClassImp(TTreeDrawArgsParser) TTreeDrawArgsParser
Constructor - cleans all the class variables.
Bool_t Parse(const char *varexp, const char *selection, Option_t *option)
Parses parameters from TTree::Draw().