50 char varType,
void* external,
52 :
TNamed(title.Data(),title.Data()),
73 Ssiz_t index = expression.Index(
":=");
74 fExpression = expression(index+2,expression.Sizeof()-index-2);
75 fLabel = expression(0,index);
76 fLabel = fLabel.ReplaceAll(
" ",
"");
156 o << std::setw(nc) <<
GetUnit();
158 o <<
"[" << std::setprecision(12) <<
GetMin() <<
"," << std::setprecision(12) <<
GetMax() <<
"]" << std::endl;
168 TString exp, varname, vartype, minmax, minstr, maxstr;
169 istr >> exp >> varname >> vartype >> minmax;
173 minstr = minmax(0,minmax.
First(
','));
174 maxstr = minmax(1+minmax.
First(
','),minmax.
Length());
176 std::stringstream strmin(minstr.
Data());
177 std::stringstream strmax(maxstr.
Data());
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
Class for type info of MVA input variable.
void ReadFromXML(void *varnode)
read VariableInfo from stream
VariableInfo & operator=(const TMVA::VariableInfo &rhs)
comparison operator
Double_t fXvarianceNorm
variance value for correlated/decorrelated/PCA variable
void SetUnit(const TString &s)
const TString & GetLabel() const
Double_t fXminNorm
minimum value for correlated/decorrelated/PCA variable
const TString & GetExpression() const
void SetExpression(const TString &s)
VariableInfo(const TString &expression, const TString &title, const TString &unit, Int_t varCounter, char varType='F', void *external=nullptr, Double_t min=0, Double_t max=0, Bool_t normalized=kTRUE)
constructor
Int_t fVarCounter
dummy variable
Double_t fXmaxNorm
maximum value for correlated/decorrelated/PCA variable
Bool_t fNormalized
variable gets normalized
VariableInfo()
default constructor
void ReadFromStream(std::istream &istr)
read VariableInfo from stream
void SetLabel(const TString &s)
void AddToXML(void *varnode)
write class to XML
Double_t fXmeanNorm
mean value for correlated/decorrelated/PCA variable
TString fLabel
variable label, set by "mylabel := var1 + var2", this is a shortcut
Char_t fVarType
the variable type to be used internally ('F'-default or 'I')
void * fExternalData
! if the variable content is linked to an external pointer
TString fUnit
unit for axis labels in plots; set by third string in AddVariable
const TString & GetInternalName() const
void SetInternalVarName(const TString &s)
Double_t fXrmsNorm
rms value for correlated/decorrelated/PCA variable
TString fInternalName
internal variable name (needs to be regular expression)
TString fExpression
original variable expression (can be a formula)
const TString & GetUnit() const
void WriteToStream(std::ostream &o) const
write VariableInfo to stream
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetTitle() const override
Returns title of object.
Bool_t TestBit(UInt_t f) const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
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
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.