Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Tools Class Reference

Global auxiliary applications and data treatment routines.

Definition at line 76 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
 
template<typename T >
void AddAttr (void *node, const char *, const T &value, Int_t precision=16)
 add attribute to xml
 
void AddAttr (void *node, const char *attrname, const char *value)
 add attribute to node
 
voidAddChild (void *parent, const char *childname, const char *content=0, bool isRootNode=false)
 add child node
 
Bool_t AddComment (void *node, const char *comment)
 
Bool_t AddRawLine (void *node, const char *raw)
 XML helpers.
 
std::vector< TMatrixDSym * > * CalcCovarianceMatrices (const std::vector< const Event * > &events, Int_t maxCls, VariableTransformBase *transformBase=0)
 
std::vector< TMatrixDSym * > * CalcCovarianceMatrices (const std::vector< Event * > &events, Int_t maxCls, VariableTransformBase *transformBase=0)
 compute covariance matrices
 
Bool_t CheckForSilentOption (const TString &) const
 check for "silence" option in configuration option string
 
Bool_t CheckForVerboseOption (const TString &) const
 check if verbosity "V" set in option
 
Bool_t CheckSplines (const TH1 *, const TSpline *)
 check quality of splining by comparing splines and histograms in each bin
 
const TStringColor (const TString &)
 human readable color strings
 
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
 
Double_t ComputeVariance (Double_t sumx2, Double_t sumx, Int_t nx)
 compute variance from given sums
 
Bool_t ContainsRegularExpression (const TString &s)
 check if regular expression helper function to search for "$!%^&()'<>?= " in a string
 
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
 
void FormattedOutput (const TMatrixD &, const std::vector< TString > &, MsgLogger &logger)
 formatted output of matrix (with labels)
 
void FormattedOutput (const TMatrixD &, const std::vector< TString > &vert, const std::vector< TString > &horiz, MsgLogger &logger)
 formatted output of matrix (with labels)
 
voidGetChild (void *parent, const char *childname=0)
 get child node
 
const char * GetContent (void *node)
 XML helpers.
 
const TMatrixDGetCorrelationMatrix (const TMatrixD *covMat)
 turns covariance into correlation matrix
 
Double_t GetCorrelationRatio (const TH2F &)
 Compute Correlation Ratio of 2D histogram to estimate functional dependency between two variables Author: Moritz Backes, Geneva (2009)
 
TH1GetCumulativeDist (TH1 *h)
 get the cumulative distribution of a histogram
 
Int_t GetIndexMaxElement (std::vector< Double_t > &)
 find index of maximum entry in vector
 
Int_t GetIndexMinElement (std::vector< Double_t > &)
 find index of minimum entry in vector
 
Double_t GetMutualInformation (const TH2F &)
 Mutual Information method for non-linear correlations estimates in 2D histogram Author: Moritz Backes, Geneva (2009)
 
const char * GetName (void *node)
 XML helpers.
 
voidGetNextChild (void *prevchild, const char *childname=0)
 XML helpers.
 
voidGetParent (void *child)
 get parent node
 
Double_t GetSeparation (const PDF &pdfS, const PDF &pdfB) const
 compute "separation" defined as
 
Double_t GetSeparation (TH1 *S, TH1 *B) const
 compute "separation" defined as
 
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
 
TString GetXTitleWithUnit (const TString &title, const TString &unit)
 histogramming utility
 
TString GetYTitleWithUnit (const TH1 &h, const TString &unit, Bool_t normalised)
 histogramming utility
 
Bool_t HasAttr (void *node, const char *attrname)
 add attribute from xml
 
Bool_t HistoHasEquidistantBins (const TH1 &h)
 
MsgLoggerLog () const
 
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.
 
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.
 
std::vector< Double_tMVADiff (std::vector< Double_t > &, std::vector< Double_t > &)
 computes difference between two vectors
 
Double_t NormHist (TH1 *theHist, Double_t norm=1.0)
 normalises histogram
 
Double_t NormVariable (Double_t x, Double_t xmin, Double_t xmax)
 normalise to output range: [-1, 1]
 
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)
 
TListParseFormatLine (TString theString, const char *sep=":")
 Parse the string and cut into labels separated by ":".
 
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
 
void ReadAttr (void *node, const char *, float &value)
 
void ReadAttr (void *node, const char *, int &value)
 
void ReadAttr (void *node, const char *, short &value)
 
template<typename T >
void ReadAttr (void *node, const char *, T &value)
 read attribute from xml
 
void ReadAttr (void *node, const char *attrname, TString &value)
 add attribute from xml
 
void ReadFloatArbitraryPrecision (Float_t &val, std::istream &is)
 reads a float value with the available precision from a stream
 
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
 
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.
 
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.
 
void ROOTVersionMessage (MsgLogger &logger)
 prints the ROOT release number and date
 
void Scale (std::vector< Double_t > &, Double_t)
 scales double vector
 
void Scale (std::vector< Float_t > &, Float_t)
 scales float vector
 
void SetXMLEngineBufferSize (int buffer)
 
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
 
TString StringFromDouble (Double_t d)
 string tools
 
TString StringFromInt (Long_t i)
 string tools
 
void TMVACitation (MsgLogger &logger, ECitation citType=kPlainText)
 kinds of TMVA citation
 
void TMVAVersionMessage (MsgLogger &logger)
 prints the TMVA release number and date
 
void TMVAWelcomeMessage ()
 direct output, eg, when starting ROOT session -> no use of Logger here
 
void TMVAWelcomeMessage (MsgLogger &logger, EWelcomeMessage m=kStandardWelcomeMsg)
 various kinds of welcome messages ASCII text generated by this site: http://www.network-science.de/ascii/
 
TH2FTransposeHist (const TH2F &)
 Transpose quadratic histogram.
 
void UsefulSortAscending (std::vector< Double_t > &)
 sort vector
 
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.
 
void UsefulSortDescending (std::vector< Double_t > &)
 sort vector
 
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.
 
void WriteFloatArbitraryPrecision (Float_t val, std::ostream &os)
 writes a float value with the available precision to a stream
 
void WriteTMatrixDToXML (void *node, const char *name, TMatrixD *mat)
 XML helpers.
 
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 std::atomic< Tools * > fgTools {0}
 

Private Member Functions

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

Private Attributes

int fXMLBufferSize = 10000000
 

#include <TMVA/Tools.h>

Member Enumeration Documentation

◆ ECitation

Enumerator
kPlainText 
kBibTeX 
kLaTeX 
kHtmlLink 

Definition at line 209 of file Tools.h.

◆ EWelcomeMessage

Enumerator
kStandardWelcomeMsg 
kIsometricWelcomeMsg 
kBlockWelcomeMsg 
kLeanWelcomeMsg 
kLogoWelcomeMsg 
kSmall1WelcomeMsg 
kSmall2WelcomeMsg 
kOriginalWelcomeMsgColor 
kOriginalWelcomeMsgBW 

Definition at line 198 of file Tools.h.

Constructor & Destructor Documentation

◆ Tools()

TMVA::Tools::Tools ( )
private

constructor

Definition at line 91 of file Tools.cxx.

◆ ~Tools()

TMVA::Tools::~Tools ( )

destructor

Definition at line 101 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 347 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 1115 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 1124 of file Tools.cxx.

◆ AddComment()

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

Definition at line 1132 of file Tools.cxx.

◆ AddRawLine()

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

XML helpers.

Definition at line 1190 of file Tools.cxx.

◆ CalcCovarianceMatrices() [1/2]

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

Definition at line 1495 of file Tools.cxx.

◆ CalcCovarianceMatrices() [2/2]

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

compute covariance matrices

Definition at line 1514 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 691 of file Tools.cxx.

◆ CheckForVerboseOption()

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

check if verbosity "V" set in option

Definition at line 708 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 479 of file Tools.cxx.

◆ Color()

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

human readable color strings

Definition at line 828 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 202 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 358 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 784 of file Tools.cxx.

◆ DestroyInstance()

void TMVA::Tools::DestroyInstance ( )
static

Definition at line 82 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 887 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 937 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 985 of file Tools.cxx.

◆ GetChild()

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

get child node

Definition at line 1150 of file Tools.cxx.

◆ GetContent()

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

XML helpers.

Definition at line 1174 of file Tools.cxx.

◆ GetCorrelationMatrix()

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

turns covariance into correlation matrix

Definition at line 324 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 620 of file Tools.cxx.

◆ GetCumulativeDist()

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

get the cumulative distribution of a histogram

Definition at line 1760 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 748 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 765 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 589 of file Tools.cxx.

◆ GetName()

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

XML helpers.

Definition at line 1182 of file Tools.cxx.

◆ GetNextChild()

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

XML helpers.

Definition at line 1162 of file Tools.cxx.

◆ GetParent()

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

get parent node

Definition at line 1140 of file Tools.cxx.

◆ GetSeparation() [1/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 174 of file Tools.cxx.

◆ GetSeparation() [2/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 121 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 271 of file Tools.cxx.

◆ GetXTitleWithUnit()

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

histogramming utility

Definition at line 1040 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 642 of file Tools.cxx.

◆ GetYTitleWithUnit()

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

histogramming utility

Definition at line 1048 of file Tools.cxx.

◆ HasAttr()

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

add attribute from xml

Definition at line 1094 of file Tools.cxx.

◆ HistoHasEquidistantBins()

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

Definition at line 1487 of file Tools.cxx.

◆ Instance()

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

Definition at line 71 of file Tools.cxx.

◆ Log()

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

Definition at line 228 of file Tools.h.

◆ Mean() [1/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 1642 of file Tools.cxx.

◆ Mean() [2/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 1691 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 506 of file Tools.cxx.

◆ NormHist()

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

normalises histogram

Definition at line 383 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 110 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 443 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 401 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 366 of file Tools.cxx.

◆ ReadAttr() [1/5]

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

Definition at line 1783 of file Tools.cxx.

◆ ReadAttr() [2/5]

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

Definition at line 1795 of file Tools.cxx.

◆ ReadAttr() [3/5]

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

Definition at line 1807 of file Tools.cxx.

◆ ReadAttr() [4/5]

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

read attribute from xml

Definition at line 329 of file Tools.h.

◆ ReadAttr() [5/5]

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

add attribute from xml

Definition at line 1102 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 1073 of file Tools.cxx.

◆ ReadTMatrixDFromXML()

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

Definition at line 1276 of file Tools.cxx.

◆ ReadTVectorDFromXML()

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

Definition at line 1267 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 798 of file Tools.cxx.

◆ RMS() [1/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 1706 of file Tools.cxx.

◆ RMS() [2/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 1747 of file Tools.cxx.

◆ ROOTVersionMessage()

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

prints the ROOT release number and date

Definition at line 1325 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 519 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 527 of file Tools.cxx.

◆ SetXMLEngineBufferSize()

void TMVA::Tools::SetXMLEngineBufferSize ( int  buffer)
inline

Definition at line 264 of file Tools.h.

◆ 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 1199 of file Tools.cxx.

◆ StringFromDouble()

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

string tools

Definition at line 1233 of file Tools.cxx.

◆ StringFromInt()

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

string tools

Definition at line 1223 of file Tools.cxx.

◆ TMVACitation()

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

kinds of TMVA citation

Definition at line 1441 of file Tools.cxx.

◆ TMVAVersionMessage()

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

prints the TMVA release number and date

Definition at line 1316 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 1302 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 1344 of file Tools.cxx.

◆ TransposeHist()

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

Transpose quadratic histogram.

Definition at line 657 of file Tools.cxx.

◆ UsefulSortAscending() [1/2]

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

sort vector

Definition at line 737 of file Tools.cxx.

◆ UsefulSortAscending() [2/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 538 of file Tools.cxx.

◆ UsefulSortDescending() [1/2]

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

sort vector

Definition at line 726 of file Tools.cxx.

◆ UsefulSortDescending() [2/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 564 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 1058 of file Tools.cxx.

◆ WriteTMatrixDToXML()

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

XML helpers.

Definition at line 1243 of file Tools.cxx.

◆ WriteTVectorDToXML()

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

Definition at line 1259 of file Tools.cxx.

◆ xmlengine()

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

Definition at line 262 of file Tools.h.

◆ xmlenginebuffersize()

int TMVA::Tools::xmlenginebuffersize ( )
inline

Definition at line 263 of file Tools.h.

Member Data Documentation

◆ fgTools

std::atomic< TMVA::Tools * > TMVA::Tools::fgTools {0}
static

Definition at line 229 of file Tools.h.

◆ fLogger

MsgLogger* TMVA::Tools::fLogger
mutable

Definition at line 227 of file Tools.h.

◆ fRegexp

const TString TMVA::Tools::fRegexp

Definition at line 226 of file Tools.h.

◆ fXMLBufferSize

int TMVA::Tools::fXMLBufferSize = 10000000
private

Definition at line 271 of file Tools.h.

◆ fXMLEngine

TXMLEngine* TMVA::Tools::fXMLEngine

Definition at line 265 of file Tools.h.

Libraries for TMVA::Tools:

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