Logo ROOT   6.14/05
Reference Guide
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
TMVA::Tools Class Reference

Global auxiliary applications and data treatment routines.

Definition at line 80 of file Tools.h.

Public Types

enum  ECitation { kPlainText = 1, kBibTeX, kLaTeX, kHtmlLink }
 
enum  EWelcomeMessage {
  kStandardWelcomeMsg = 1, kIsometricWelcomeMsg, kBlockWelcomeMsg, kLeanWelcomeMsg,
  kLogoWelcomeMsg, kSmall1WelcomeMsg, kSmall2WelcomeMsg, kOriginalWelcomeMsgColor,
  kOriginalWelcomeMsgBW
}
 

Public Member Functions

 ~Tools ()
 destructor More...
 
template<typename T >
void AddAttr (void *node, const char *, const T &value, Int_t precision=16)
 add attribute to xml More...
 
void AddAttr (void *node, const char *attrname, const char *value)
 add attribute to node More...
 
voidAddChild (void *parent, const char *childname, const char *content=0, bool isRootNode=false)
 add child node More...
 
Bool_t AddComment (void *node, const char *comment)
 
Bool_t AddRawLine (void *node, const char *raw)
 XML helpers. More...
 
std::vector< TMatrixDSym * > * CalcCovarianceMatrices (const std::vector< Event *> &events, Int_t maxCls, VariableTransformBase *transformBase=0)
 compute covariance matrices More...
 
std::vector< TMatrixDSym * > * CalcCovarianceMatrices (const std::vector< const Event *> &events, Int_t maxCls, VariableTransformBase *transformBase=0)
 
Bool_t CheckForSilentOption (const TString &) const
 check for "silence" option in configuration option string More...
 
Bool_t CheckForVerboseOption (const TString &) const
 check if verbosity "V" set in option More...
 
Bool_t CheckSplines (const TH1 *, const TSpline *)
 check quality of splining by comparing splines and histograms in each bin More...
 
const TStringColor (const TString &)
 human readable color strings More...
 
void ComputeStat (const std::vector< TMVA::Event *> &, std::vector< Float_t > *, Double_t &, Double_t &, Double_t &, Double_t &, Double_t &, Double_t &, Int_t signalClass, Bool_t norm=kFALSE)
 sanity check More...
 
Double_t ComputeVariance (Double_t sumx2, Double_t sumx, Int_t nx)
 compute variance from given sums More...
 
Bool_t ContainsRegularExpression (const TString &s)
 check if regular expression helper function to search for "$!%^&()'<>?= " in a string More...
 
void FormattedOutput (const std::vector< Double_t > &, const std::vector< TString > &, const TString titleVars, const TString titleValues, MsgLogger &logger, TString format="%+1.3f")
 formatted output of simple table More...
 
void FormattedOutput (const TMatrixD &, const std::vector< TString > &, MsgLogger &logger)
 formatted output of matrix (with labels) More...
 
void FormattedOutput (const TMatrixD &, const std::vector< TString > &vert, const std::vector< TString > &horiz, MsgLogger &logger)
 formatted output of matrix (with labels) More...
 
voidGetChild (void *parent, const char *childname=0)
 get child node More...
 
const char * GetContent (void *node)
 XML helpers. More...
 
const TMatrixDGetCorrelationMatrix (const TMatrixD *covMat)
 turns covariance into correlation matrix More...
 
Double_t GetCorrelationRatio (const TH2F &)
 Compute Correlation Ratio of 2D histogram to estimate functional dependency between two variables Author: Moritz Backes, Geneva (2009) More...
 
TH1GetCumulativeDist (TH1 *h)
 get the cumulative distribution of a histogram More...
 
Int_t GetIndexMaxElement (std::vector< Double_t > &)
 find index of maximum entry in vector More...
 
Int_t GetIndexMinElement (std::vector< Double_t > &)
 find index of minimum entry in vector More...
 
Double_t GetMutualInformation (const TH2F &)
 Mutual Information method for non-linear correlations estimates in 2D histogram Author: Moritz Backes, Geneva (2009) More...
 
const char * GetName (void *node)
 XML helpers. More...
 
voidGetNextChild (void *prevchild, const char *childname=0)
 XML helpers. More...
 
voidGetParent (void *child)
 get parent node More...
 
Double_t GetSeparation (TH1 *S, TH1 *B) const
 compute "separation" defined as

\[ <s2> = \frac{1}{2} \int_{-\infty}^{+\infty} \frac{(S(x) - B(x))^2}{(S(x) + B(x))} dx \]

More...
 
Double_t GetSeparation (const PDF &pdfS, const PDF &pdfB) const
 compute "separation" defined as

\[ <s2> = \frac{1}{2} \int_{-\infty}^{+\infty} \frac{(S(x) - B(x))^2}{(S(x) + B(x))} dx \]

More...
 
TMatrixDGetSQRootMatrix (TMatrixDSym *symMat)
 square-root of symmetric matrix of course the resulting sqrtMat is also symmetric, but it's easier to treat it as a general matrix More...
 
TString GetXTitleWithUnit (const TString &title, const TString &unit)
 histogramming utility More...
 
TString GetYTitleWithUnit (const TH1 &h, const TString &unit, Bool_t normalised)
 histogramming utility More...
 
Bool_t HasAttr (void *node, const char *attrname)
 add attribute from xml More...
 
Bool_t HistoHasEquidistantBins (const TH1 &h)
 
MsgLoggerLog () const
 
template<typename T >
Double_t Mean (Long64_t n, const T *a, const Double_t *w=0)
 Return the weighted mean of an array a with length n. More...
 
template<typename Iterator , typename WeightIterator >
Double_t Mean (Iterator first, Iterator last, WeightIterator w)
 Return the weighted mean of an array defined by the first and last iterators. More...
 
std::vector< Double_tMVADiff (std::vector< Double_t > &, std::vector< Double_t > &)
 computes difference between two vectors More...
 
Double_t NormHist (TH1 *theHist, Double_t norm=1.0)
 normalises histogram More...
 
Double_t NormVariable (Double_t x, Double_t xmin, Double_t xmax)
 normalise to output range: [-1, 1] More...
 
std::vector< Int_t > * ParseANNOptionString (TString theOptions, Int_t nvar, std::vector< Int_t > *nodes)
 parse option string for ANN methods default settings (should be defined in theOption string) More...
 
TListParseFormatLine (TString theString, const char *sep=":")
 Parse the string and cut into labels separated by ":". More...
 
TH1projNormTH1F (TTree *theTree, const TString &theVarName, const TString &name, Int_t nbins, Double_t xmin, Double_t xmax, const TString &cut)
 projects variable from tree into normalised histogram More...
 
template<typename T >
void ReadAttr (void *node, const char *, T &value)
 read attribute from xml More...
 
void ReadAttr (void *node, const char *attrname, TString &value)
 add attribute from xml More...
 
void ReadAttr (void *node, const char *, float &value)
 
void ReadAttr (void *node, const char *, int &value)
 
void ReadAttr (void *node, const char *, short &value)
 
void ReadFloatArbitraryPrecision (Float_t &val, std::istream &is)
 reads a float value with the available precision from a stream More...
 
void ReadTMatrixDFromXML (void *node, const char *name, TMatrixD *mat)
 
void ReadTVectorDFromXML (void *node, const char *name, TVectorD *vec)
 
TString ReplaceRegularExpressions (const TString &s, const TString &replace="+")
 replace regular expressions helper function to remove all occurrences "$!%^&()'<>?= " from a string and replace all ::,$,*,/,+,- with M,S,T,D,P,M respectively More...
 
template<typename T >
Double_t RMS (Long64_t n, const T *a, const Double_t *w=0)
 Return the Standard Deviation of an array a with length n. More...
 
template<typename Iterator , typename WeightIterator >
Double_t RMS (Iterator first, Iterator last, WeightIterator w)
 Return the Standard Deviation of an array defined by the iterators. More...
 
void ROOTVersionMessage (MsgLogger &logger)
 prints the ROOT release number and date More...
 
void Scale (std::vector< Double_t > &, Double_t)
 scales double vector More...
 
void Scale (std::vector< Float_t > &, Float_t)
 scales float vector More...
 
std::vector< TStringSplitString (const TString &theOpt, const char separator) const
 splits the option string at 'separator' and fills the list 'splitV' with the primitive strings More...
 
TString StringFromDouble (Double_t d)
 string tools More...
 
TString StringFromInt (Long_t i)
 string tools More...
 
void TMVACitation (MsgLogger &logger, ECitation citType=kPlainText)
 kinds of TMVA citation More...
 
void TMVAVersionMessage (MsgLogger &logger)
 prints the TMVA release number and date More...
 
void TMVAWelcomeMessage ()
 direct output, eg, when starting ROOT session -> no use of Logger here More...
 
void TMVAWelcomeMessage (MsgLogger &logger, EWelcomeMessage m=kStandardWelcomeMsg)
 various kinds of welcome messages ASCII text generated by this site: http://www.network-science.de/ascii/ More...
 
TH2FTransposeHist (const TH2F &)
 Transpose quadratic histogram. More...
 
void UsefulSortAscending (std::vector< std::vector< Double_t > > &, std::vector< TString > *vs=0)
 sort 2D vector (AND in parallel a TString vector) in such a way that the "first vector is sorted" and the other vectors are reshuffled in the same way as necessary to have the first vector sorted. More...
 
void UsefulSortAscending (std::vector< Double_t > &)
 sort vector More...
 
void UsefulSortDescending (std::vector< std::vector< Double_t > > &, std::vector< TString > *vs=0)
 sort 2D vector (AND in parallel a TString vector) in such a way that the "first vector is sorted" and the other vectors are reshuffled in the same way as necessary to have the first vector sorted. More...
 
void UsefulSortDescending (std::vector< Double_t > &)
 sort vector More...
 
void WriteFloatArbitraryPrecision (Float_t val, std::ostream &os)
 writes a float value with the available precision to a stream More...
 
void WriteTMatrixDToXML (void *node, const char *name, TMatrixD *mat)
 XML helpers. More...
 
void WriteTVectorDToXML (void *node, const char *name, TVectorD *vec)
 
TXMLEnginexmlengine ()
 
int xmlenginebuffersize ()
 

Static Public Member Functions

static void DestroyInstance ()
 
static ToolsInstance ()
 

Public Attributes

MsgLoggerfLogger
 
const TString fRegexp
 
TXMLEnginefXMLEngine
 

Static Public Attributes

static ToolsfgTools = 0
 

Private Member Functions

 Tools ()
 constructor More...
 
Double_t GetYMean_binX (const TH2 &, Int_t bin_x)
 Compute the mean in Y for a given bin X of a 2D histogram. More...
 

#include <TMVA/Tools.h>

Member Enumeration Documentation

◆ ECitation

enum TMVA::Tools::ECitation
Enumerator
kPlainText 
kBibTeX 
kLaTeX 
kHtmlLink 

Definition at line 213 of file Tools.h.

◆ EWelcomeMessage

enum TMVA::Tools::EWelcomeMessage
Enumerator
kStandardWelcomeMsg 
kIsometricWelcomeMsg 
kBlockWelcomeMsg 
kLeanWelcomeMsg 
kLogoWelcomeMsg 
kSmall1WelcomeMsg 
kSmall2WelcomeMsg 
kOriginalWelcomeMsgColor 
kOriginalWelcomeMsgBW 

Definition at line 202 of file Tools.h.

Constructor & Destructor Documentation

◆ Tools()

TMVA::Tools::Tools ( )
private

constructor

Definition at line 103 of file Tools.cxx.

◆ ~Tools()

TMVA::Tools::~Tools ( )

destructor

Definition at line 113 of file Tools.cxx.

Member Function Documentation

◆ AddAttr() [1/2]

template<typename T >
void TMVA::Tools::AddAttr ( void node,
const char *  attrname,
const T &  value,
Int_t  precision = 16 
)

add attribute to xml

Definition at line 353 of file Tools.h.

◆ AddAttr() [2/2]

void TMVA::Tools::AddAttr ( void node,
const char *  attrname,
const char *  value 
)

add attribute to node

Definition at line 1127 of file Tools.cxx.

◆ AddChild()

void * TMVA::Tools::AddChild ( void parent,
const char *  childname,
const char *  content = 0,
bool  isRootNode = false 
)

add child node

Definition at line 1136 of file Tools.cxx.

◆ AddComment()

Bool_t TMVA::Tools::AddComment ( void node,
const char *  comment 
)

Definition at line 1144 of file Tools.cxx.

◆ AddRawLine()

Bool_t TMVA::Tools::AddRawLine ( void node,
const char *  raw 
)

XML helpers.

Definition at line 1202 of file Tools.cxx.

◆ CalcCovarianceMatrices() [1/2]

std::vector< TMatrixDSym * > * TMVA::Tools::CalcCovarianceMatrices ( const std::vector< Event *> &  events,
Int_t  maxCls,
VariableTransformBase transformBase = 0 
)

compute covariance matrices

Definition at line 1526 of file Tools.cxx.

◆ CalcCovarianceMatrices() [2/2]

std::vector< TMatrixDSym * > * TMVA::Tools::CalcCovarianceMatrices ( const std::vector< const Event *> &  events,
Int_t  maxCls,
VariableTransformBase transformBase = 0 
)

Definition at line 1507 of file Tools.cxx.

◆ CheckForSilentOption()

Bool_t TMVA::Tools::CheckForSilentOption ( const TString cs) const

check for "silence" option in configuration option string

Definition at line 703 of file Tools.cxx.

◆ CheckForVerboseOption()

Bool_t TMVA::Tools::CheckForVerboseOption ( const TString cs) const

check if verbosity "V" set in option

Definition at line 720 of file Tools.cxx.

◆ CheckSplines()

Bool_t TMVA::Tools::CheckSplines ( const TH1 theHist,
const TSpline theSpline 
)

check quality of splining by comparing splines and histograms in each bin

Definition at line 491 of file Tools.cxx.

◆ Color()

const TString & TMVA::Tools::Color ( const TString c)

human readable color strings

Definition at line 840 of file Tools.cxx.

◆ ComputeStat()

void TMVA::Tools::ComputeStat ( const std::vector< TMVA::Event *> &  events,
std::vector< Float_t > *  valVec,
Double_t meanS,
Double_t meanB,
Double_t rmsS,
Double_t rmsB,
Double_t xmin,
Double_t xmax,
Int_t  signalClass,
Bool_t  norm = kFALSE 
)

sanity check

Definition at line 214 of file Tools.cxx.

◆ ComputeVariance()

Double_t TMVA::Tools::ComputeVariance ( Double_t  sumx2,
Double_t  sumx,
Int_t  nx 
)
inline

compute variance from given sums

Definition at line 364 of file Tools.h.

◆ ContainsRegularExpression()

Bool_t TMVA::Tools::ContainsRegularExpression ( const TString s)

check if regular expression helper function to search for "$!%^&()'<>?= " in a string

Definition at line 796 of file Tools.cxx.

◆ DestroyInstance()

void TMVA::Tools::DestroyInstance ( )
static

Definition at line 90 of file Tools.cxx.

◆ FormattedOutput() [1/3]

void TMVA::Tools::FormattedOutput ( const std::vector< Double_t > &  values,
const std::vector< TString > &  V,
const TString  titleVars,
const TString  titleValues,
MsgLogger logger,
TString  format = "%+1.3f" 
)

formatted output of simple table

Definition at line 899 of file Tools.cxx.

◆ FormattedOutput() [2/3]

void TMVA::Tools::FormattedOutput ( const TMatrixD M,
const std::vector< TString > &  V,
MsgLogger logger 
)

formatted output of matrix (with labels)

Definition at line 949 of file Tools.cxx.

◆ FormattedOutput() [3/3]

void TMVA::Tools::FormattedOutput ( const TMatrixD M,
const std::vector< TString > &  vert,
const std::vector< TString > &  horiz,
MsgLogger logger 
)

formatted output of matrix (with labels)

Definition at line 997 of file Tools.cxx.

◆ GetChild()

void * TMVA::Tools::GetChild ( void parent,
const char *  childname = 0 
)

get child node

Definition at line 1162 of file Tools.cxx.

◆ GetContent()

const char * TMVA::Tools::GetContent ( void node)

XML helpers.

Definition at line 1186 of file Tools.cxx.

◆ GetCorrelationMatrix()

const TMatrixD * TMVA::Tools::GetCorrelationMatrix ( const TMatrixD covMat)

turns covariance into correlation matrix

Definition at line 336 of file Tools.cxx.

◆ GetCorrelationRatio()

Double_t TMVA::Tools::GetCorrelationRatio ( const TH2F h_)

Compute Correlation Ratio of 2D histogram to estimate functional dependency between two variables Author: Moritz Backes, Geneva (2009)

Definition at line 632 of file Tools.cxx.

◆ GetCumulativeDist()

TH1 * TMVA::Tools::GetCumulativeDist ( TH1 h)

get the cumulative distribution of a histogram

Definition at line 1772 of file Tools.cxx.

◆ GetIndexMaxElement()

Int_t TMVA::Tools::GetIndexMaxElement ( std::vector< Double_t > &  v)

find index of maximum entry in vector

Definition at line 760 of file Tools.cxx.

◆ GetIndexMinElement()

Int_t TMVA::Tools::GetIndexMinElement ( std::vector< Double_t > &  v)

find index of minimum entry in vector

Definition at line 777 of file Tools.cxx.

◆ GetMutualInformation()

Double_t TMVA::Tools::GetMutualInformation ( const TH2F h_)

Mutual Information method for non-linear correlations estimates in 2D histogram Author: Moritz Backes, Geneva (2009)

Definition at line 601 of file Tools.cxx.

◆ GetName()

const char * TMVA::Tools::GetName ( void node)

XML helpers.

Definition at line 1194 of file Tools.cxx.

◆ GetNextChild()

void * TMVA::Tools::GetNextChild ( void prevchild,
const char *  childname = 0 
)

XML helpers.

Definition at line 1174 of file Tools.cxx.

◆ GetParent()

void * TMVA::Tools::GetParent ( void child)

get parent node

Definition at line 1152 of file Tools.cxx.

◆ GetSeparation() [1/2]

Double_t TMVA::Tools::GetSeparation ( TH1 S,
TH1 B 
) const

compute "separation" defined as

\[ <s2> = \frac{1}{2} \int_{-\infty}^{+\infty} \frac{(S(x) - B(x))^2}{(S(x) + B(x))} dx \]

Definition at line 133 of file Tools.cxx.

◆ GetSeparation() [2/2]

Double_t TMVA::Tools::GetSeparation ( const PDF pdfS,
const PDF pdfB 
) const

compute "separation" defined as

\[ <s2> = \frac{1}{2} \int_{-\infty}^{+\infty} \frac{(S(x) - B(x))^2}{(S(x) + B(x))} dx \]

Definition at line 186 of file Tools.cxx.

◆ GetSQRootMatrix()

TMatrixD * TMVA::Tools::GetSQRootMatrix ( TMatrixDSym symMat)

square-root of symmetric matrix of course the resulting sqrtMat is also symmetric, but it's easier to treat it as a general matrix

Definition at line 283 of file Tools.cxx.

◆ GetXTitleWithUnit()

TString TMVA::Tools::GetXTitleWithUnit ( const TString title,
const TString unit 
)

histogramming utility

Definition at line 1052 of file Tools.cxx.

◆ GetYMean_binX()

Double_t TMVA::Tools::GetYMean_binX ( const TH2 h,
Int_t  bin_x 
)
private

Compute the mean in Y for a given bin X of a 2D histogram.

Definition at line 654 of file Tools.cxx.

◆ GetYTitleWithUnit()

TString TMVA::Tools::GetYTitleWithUnit ( const TH1 h,
const TString unit,
Bool_t  normalised 
)

histogramming utility

Definition at line 1060 of file Tools.cxx.

◆ HasAttr()

Bool_t TMVA::Tools::HasAttr ( void node,
const char *  attrname 
)

add attribute from xml

Definition at line 1106 of file Tools.cxx.

◆ HistoHasEquidistantBins()

Bool_t TMVA::Tools::HistoHasEquidistantBins ( const TH1 h)

Definition at line 1499 of file Tools.cxx.

◆ Instance()

TMVA::Tools & TMVA::Tools::Instance ( )
static

Definition at line 75 of file Tools.cxx.

◆ Log()

MsgLogger& TMVA::Tools::Log ( ) const
inline

Definition at line 232 of file Tools.h.

◆ Mean() [1/2]

template<typename T >
Double_t TMVA::Tools::Mean ( Long64_t  n,
const T *  a,
const Double_t w = 0 
)

Return the weighted mean of an array a with length n.

Definition at line 1703 of file Tools.cxx.

◆ Mean() [2/2]

template<typename Iterator , typename WeightIterator >
Double_t TMVA::Tools::Mean ( Iterator  first,
Iterator  last,
WeightIterator  w 
)

Return the weighted mean of an array defined by the first and last iterators.

The w iterator should point to the first element of a vector of weights of the same size as the main array.

Definition at line 1654 of file Tools.cxx.

◆ MVADiff()

std::vector< Double_t > TMVA::Tools::MVADiff ( std::vector< Double_t > &  a,
std::vector< Double_t > &  b 
)

computes difference between two vectors

Definition at line 518 of file Tools.cxx.

◆ NormHist()

Double_t TMVA::Tools::NormHist ( TH1 theHist,
Double_t  norm = 1.0 
)

normalises histogram

Definition at line 395 of file Tools.cxx.

◆ NormVariable()

Double_t TMVA::Tools::NormVariable ( Double_t  x,
Double_t  xmin,
Double_t  xmax 
)

normalise to output range: [-1, 1]

Definition at line 122 of file Tools.cxx.

◆ ParseANNOptionString()

vector< Int_t > * TMVA::Tools::ParseANNOptionString ( TString  theOptions,
Int_t  nvar,
std::vector< Int_t > *  nodes 
)

parse option string for ANN methods default settings (should be defined in theOption string)

format and syntax of option string: "3000:N:N+2:N-3:6"

where:

  • 3000 - number of training cycles (epochs)
  • N - number of nodes in first hidden layer, where N is the number of discriminating variables used (note that the first ANN layer necessarily has N nodes, and hence is not given).
  • N+2 - number of nodes in 2nd hidden layer (2 nodes more than number of variables)
  • N-3 - number of nodes in 3rd hidden layer (3 nodes less than number of variables)
  • 6 - 6 nodes in last (4th) hidden layer (note that the last ANN layer in MVA has 2 nodes, each one for signal and background classes)

Definition at line 455 of file Tools.cxx.

◆ ParseFormatLine()

TList * TMVA::Tools::ParseFormatLine ( TString  theString,
const char *  sep = ":" 
)

Parse the string and cut into labels separated by ":".

Definition at line 413 of file Tools.cxx.

◆ projNormTH1F()

TH1 * TMVA::Tools::projNormTH1F ( TTree theTree,
const TString theVarName,
const TString name,
Int_t  nbins,
Double_t  xmin,
Double_t  xmax,
const TString cut 
)

projects variable from tree into normalised histogram

Definition at line 378 of file Tools.cxx.

◆ ReadAttr() [1/5]

template<typename T >
void TMVA::Tools::ReadAttr ( void node,
const char *  attrname,
T &  value 
)
inline

read attribute from xml

Definition at line 335 of file Tools.h.

◆ ReadAttr() [2/5]

void TMVA::Tools::ReadAttr ( void node,
const char *  attrname,
TString value 
)

add attribute from xml

Definition at line 1114 of file Tools.cxx.

◆ ReadAttr() [3/5]

void TMVA::Tools::ReadAttr ( void node,
const char *  attrname,
float &  value 
)

Definition at line 1795 of file Tools.cxx.

◆ ReadAttr() [4/5]

void TMVA::Tools::ReadAttr ( void node,
const char *  attrname,
int &  value 
)

Definition at line 1807 of file Tools.cxx.

◆ ReadAttr() [5/5]

void TMVA::Tools::ReadAttr ( void node,
const char *  attrname,
short &  value 
)

Definition at line 1819 of file Tools.cxx.

◆ ReadFloatArbitraryPrecision()

void TMVA::Tools::ReadFloatArbitraryPrecision ( Float_t val,
std::istream &  is 
)

reads a float value with the available precision from a stream

Definition at line 1085 of file Tools.cxx.

◆ ReadTMatrixDFromXML()

void TMVA::Tools::ReadTMatrixDFromXML ( void node,
const char *  name,
TMatrixD mat 
)

Definition at line 1288 of file Tools.cxx.

◆ ReadTVectorDFromXML()

void TMVA::Tools::ReadTVectorDFromXML ( void node,
const char *  name,
TVectorD vec 
)

Definition at line 1279 of file Tools.cxx.

◆ ReplaceRegularExpressions()

TString TMVA::Tools::ReplaceRegularExpressions ( const TString s,
const TString replace = "+" 
)

replace regular expressions helper function to remove all occurrences "$!%^&()'<>?= " from a string and replace all ::,$,*,/,+,- with M,S,T,D,P,M respectively

Definition at line 810 of file Tools.cxx.

◆ RMS() [1/2]

template<typename T >
Double_t TMVA::Tools::RMS ( Long64_t  n,
const T *  a,
const Double_t w = 0 
)

Return the Standard Deviation of an array a with length n.

Note that this function returns the sigma(standard deviation) and not the root mean square of the array.

Definition at line 1759 of file Tools.cxx.

◆ RMS() [2/2]

template<typename Iterator , typename WeightIterator >
Double_t TMVA::Tools::RMS ( Iterator  first,
Iterator  last,
WeightIterator  w 
)

Return the Standard Deviation of an array defined by the iterators.

Note that this function returns the sigma(standard deviation) and not the root mean square of the array.

Definition at line 1718 of file Tools.cxx.

◆ ROOTVersionMessage()

void TMVA::Tools::ROOTVersionMessage ( MsgLogger logger)

prints the ROOT release number and date

Definition at line 1337 of file Tools.cxx.

◆ Scale() [1/2]

void TMVA::Tools::Scale ( std::vector< Double_t > &  v,
Double_t  f 
)

scales double vector

Definition at line 531 of file Tools.cxx.

◆ Scale() [2/2]

void TMVA::Tools::Scale ( std::vector< Float_t > &  v,
Float_t  f 
)

scales float vector

Definition at line 539 of file Tools.cxx.

◆ SplitString()

std::vector< TString > TMVA::Tools::SplitString ( const TString theOpt,
const char  separator 
) const

splits the option string at 'separator' and fills the list 'splitV' with the primitive strings

Definition at line 1211 of file Tools.cxx.

◆ StringFromDouble()

TString TMVA::Tools::StringFromDouble ( Double_t  d)

string tools

Definition at line 1245 of file Tools.cxx.

◆ StringFromInt()

TString TMVA::Tools::StringFromInt ( Long_t  i)

string tools

Definition at line 1235 of file Tools.cxx.

◆ TMVACitation()

void TMVA::Tools::TMVACitation ( MsgLogger logger,
ECitation  citType = kPlainText 
)

kinds of TMVA citation

Definition at line 1453 of file Tools.cxx.

◆ TMVAVersionMessage()

void TMVA::Tools::TMVAVersionMessage ( MsgLogger logger)

prints the TMVA release number and date

Definition at line 1328 of file Tools.cxx.

◆ TMVAWelcomeMessage() [1/2]

void TMVA::Tools::TMVAWelcomeMessage ( )

direct output, eg, when starting ROOT session -> no use of Logger here

Definition at line 1314 of file Tools.cxx.

◆ TMVAWelcomeMessage() [2/2]

void TMVA::Tools::TMVAWelcomeMessage ( MsgLogger logger,
EWelcomeMessage  m = kStandardWelcomeMsg 
)

various kinds of welcome messages ASCII text generated by this site: http://www.network-science.de/ascii/

Definition at line 1356 of file Tools.cxx.

◆ TransposeHist()

TH2F * TMVA::Tools::TransposeHist ( const TH2F h)

Transpose quadratic histogram.

Definition at line 669 of file Tools.cxx.

◆ UsefulSortAscending() [1/2]

void TMVA::Tools::UsefulSortAscending ( std::vector< std::vector< Double_t > > &  v,
std::vector< TString > *  vs = 0 
)

sort 2D vector (AND in parallel a TString vector) in such a way that the "first vector is sorted" and the other vectors are reshuffled in the same way as necessary to have the first vector sorted.

I.e. the correlation between the elements is kept.

Definition at line 550 of file Tools.cxx.

◆ UsefulSortAscending() [2/2]

void TMVA::Tools::UsefulSortAscending ( std::vector< Double_t > &  v)

sort vector

Definition at line 749 of file Tools.cxx.

◆ UsefulSortDescending() [1/2]

void TMVA::Tools::UsefulSortDescending ( std::vector< std::vector< Double_t > > &  v,
std::vector< TString > *  vs = 0 
)

sort 2D vector (AND in parallel a TString vector) in such a way that the "first vector is sorted" and the other vectors are reshuffled in the same way as necessary to have the first vector sorted.

I.e. the correlation between the elements is kept.

Definition at line 576 of file Tools.cxx.

◆ UsefulSortDescending() [2/2]

void TMVA::Tools::UsefulSortDescending ( std::vector< Double_t > &  v)

sort vector

Definition at line 738 of file Tools.cxx.

◆ WriteFloatArbitraryPrecision()

void TMVA::Tools::WriteFloatArbitraryPrecision ( Float_t  val,
std::ostream &  os 
)

writes a float value with the available precision to a stream

Definition at line 1070 of file Tools.cxx.

◆ WriteTMatrixDToXML()

void TMVA::Tools::WriteTMatrixDToXML ( void node,
const char *  name,
TMatrixD mat 
)

XML helpers.

Definition at line 1255 of file Tools.cxx.

◆ WriteTVectorDToXML()

void TMVA::Tools::WriteTVectorDToXML ( void node,
const char *  name,
TVectorD vec 
)

Definition at line 1271 of file Tools.cxx.

◆ xmlengine()

TXMLEngine& TMVA::Tools::xmlengine ( )
inline

Definition at line 270 of file Tools.h.

◆ xmlenginebuffersize()

int TMVA::Tools::xmlenginebuffersize ( )
inline

Definition at line 271 of file Tools.h.

Member Data Documentation

◆ fgTools

TMVA::Tools * TMVA::Tools::fgTools = 0
static

Definition at line 236 of file Tools.h.

◆ fLogger

MsgLogger* TMVA::Tools::fLogger
mutable

Definition at line 231 of file Tools.h.

◆ fRegexp

const TString TMVA::Tools::fRegexp

Definition at line 230 of file Tools.h.

◆ fXMLEngine

TXMLEngine* TMVA::Tools::fXMLEngine

Definition at line 272 of file Tools.h.

Libraries for TMVA::Tools:
[legend]

The documentation for this class was generated from the following files: