ROOT  6.06/09
Reference Guide
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

Definition at line 91 of file Tools.h.

Public Types

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

Public Member Functions

 ~Tools ()
 destructor More...
 
template<typename T >
Double_t Mean (Long64_t n, const T *a, const Double_t *w=0)
 
template<typename Iterator , typename WeightIterator >
Double_t Mean (Iterator first, Iterator last, WeightIterator w)
 
template<typename T >
Double_t RMS (Long64_t n, const T *a, const Double_t *w=0)
 
template<typename Iterator , typename WeightIterator >
Double_t RMS (Iterator first, Iterator last, WeightIterator w)
 
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)
 
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...
 
Double_t NormHist (TH1 *theHist, Double_t norm=1.0)
 normalises histogram More...
 
TListParseFormatLine (TString theString, const char *sep=":")
 Parse the string and cut into labels separated by ":". 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...
 
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...
 
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)
 
const TMatrixDGetCorrelationMatrix (const TMatrixD *covMat)
 turns covariance into correlation matrix More...
 
Bool_t CheckSplines (const TH1 *, const TSpline *)
 
Double_t NormVariable (Double_t x, Double_t xmin, Double_t xmax)
 normalise to output range: [-1, 1] More...
 
Double_t GetSeparation (TH1 *S, TH1 *B) const
 compute "separation" defined as <s2> = (1/2) Int_-oo..+oo { (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> = (1/2) Int_-oo..+oo { (S(x) - B(x))2/(S(x) + B(x)) dx } More...
 
std::vector< Double_tMVADiff (std::vector< Double_t > &, std::vector< Double_t > &)
 computes difference between two vectors 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...
 
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 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 UsefulSortDescending (std::vector< Double_t > &)
 sort vector More...
 
void UsefulSortAscending (std::vector< Double_t > &)
 sort vector 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...
 
Bool_t ContainsRegularExpression (const TString &s)
 check if regular expression helper function to search for "$!%^&()'<>?= " in a string More...
 
TString ReplaceRegularExpressions (const TString &s, const TString &replace="+")
 replace regular expressions helper function to remove all occurences "$!%^&()'<>?= " from a string and replace all ::,$,*,/,+,- with M,S,T,D,P,M respectively 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...
 
void WriteFloatArbitraryPrecision (Float_t val, std::ostream &os)
 writes a float value with the available precision to a stream More...
 
void ReadFloatArbitraryPrecision (Float_t &val, std::istream &is)
 reads a float value with the available precision from a stream 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...
 
Double_t GetMutualInformation (const TH2F &)
 Mutual Information method for non-linear correlations estimates in 2D histogram Author: Moritz Backes, Geneva (2009) 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...
 
TH2FTransposeHist (const TH2F &)
 Transpose quadratic histogram. More...
 
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...
 
const TStringColor (const TString &)
 human readable color strings 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...
 
void TMVAVersionMessage (MsgLogger &logger)
 prints the TMVA release number and date More...
 
void ROOTVersionMessage (MsgLogger &logger)
 prints the ROOT release number and date More...
 
void TMVACitation (MsgLogger &logger, ECitation citType=kPlainText)
 kinds of TMVA citation 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...
 
MsgLoggerLog () const
 
TString StringFromInt (Long_t i)
 string tools More...
 
TString StringFromDouble (Double_t d)
 string tools More...
 
void WriteTMatrixDToXML (void *node, const char *name, TMatrixD *mat)
 XML helpers. More...
 
void WriteTVectorDToXML (void *node, const char *name, TVectorD *vec)
 
void ReadTMatrixDFromXML (void *node, const char *name, TMatrixD *mat)
 
void ReadTVectorDFromXML (void *node, const char *name, TVectorD *vec)
 
Bool_t HistoHasEquidistantBins (const TH1 &h)
 
Bool_t HasAttr (void *node, const char *attrname)
 add attribute from xml More...
 
template<typename T >
void ReadAttr (void *node, const char *, T &value)
 
void ReadAttr (void *node, const char *attrname, TString &value)
 add attribute from xml More...
 
template<typename T >
void AddAttr (void *node, const char *, const T &value, Int_t precision=16)
 
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 AddRawLine (void *node, const char *raw)
 XML helpers. More...
 
Bool_t AddComment (void *node, const char *comment)
 
voidGetParent (void *child)
 get parent node More...
 
voidGetChild (void *parent, const char *childname=0)
 get child node More...
 
voidGetNextChild (void *prevchild, const char *childname=0)
 XML helpers. More...
 
const char * GetContent (void *node)
 XML helpers. More...
 
const char * GetName (void *node)
 XML helpers. More...
 
TXMLEnginexmlengine ()
 
int xmlenginebuffersize ()
 
TH1GetCumulativeDist (TH1 *h)
 

Static Public Member Functions

static ToolsInstance ()
 
static void DestroyInstance ()
 

Public Attributes

const TString fRegexp
 
MsgLoggerfLogger
 
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>

+ Collaboration diagram for TMVA::Tools:

Member Enumeration Documentation

Enumerator
kPlainText 
kBibTeX 
kLaTeX 
kHtmlLink 

Definition at line 224 of file Tools.h.

Enumerator
kStandardWelcomeMsg 
kIsometricWelcomeMsg 
kBlockWelcomeMsg 
kLeanWelcomeMsg 
kLogoWelcomeMsg 
kSmall1WelcomeMsg 
kSmall2WelcomeMsg 
kOriginalWelcomeMsgColor 
kOriginalWelcomeMsgBW 

Definition at line 213 of file Tools.h.

Constructor & Destructor Documentation

TMVA::Tools::Tools ( )
private

constructor

Definition at line 108 of file Tools.cxx.

TMVA::Tools::~Tools ( )

destructor

Definition at line 118 of file Tools.cxx.

Member Function Documentation

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

add attribute to node

Definition at line 1125 of file Tools.cxx.

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

Definition at line 1142 of file Tools.cxx.

Referenced by TMVA::MethodCuts::AddWeightsXMLTo().

Bool_t TMVA::Tools::AddRawLine ( void node,
const char *  raw 
)
std::vector< TMatrixDSym * > * TMVA::Tools::CalcCovarianceMatrices ( const std::vector< Event * > &  events,
Int_t  maxCls,
VariableTransformBase transformBase = 0 
)
std::vector< TMatrixDSym * > * TMVA::Tools::CalcCovarianceMatrices ( const std::vector< const Event * > &  events,
Int_t  maxCls,
VariableTransformBase transformBase = 0 
)

Definition at line 1502 of file Tools.cxx.

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

check for "silence" option in configuration option string

Definition at line 700 of file Tools.cxx.

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

check if verbosity "V" set in option

Definition at line 717 of file Tools.cxx.

Bool_t TMVA::Tools::CheckSplines ( const TH1 theHist,
const TSpline theSpline 
)
const TString & TMVA::Tools::Color ( const TString c)

human readable color strings

Definition at line 837 of file Tools.cxx.

Referenced by TMVA::Factory::BookMethod(), TMVA::Timer::DrawProgressBar(), TMVA::MethodBayesClassifier::GetHelpMessage(), TMVA::MethodLD::GetHelpMessage(), TMVA::MethodKNN::GetHelpMessage(), TMVA::MethodTMlpANN::GetHelpMessage(), TMVA::MethodHMatrix::GetHelpMessage(), TMVA::MethodPyAdaBoost::GetHelpMessage(), TMVA::MethodRXGB::GetHelpMessage(), TMVA::MethodSVM::GetHelpMessage(), TMVA::MethodFisher::GetHelpMessage(), TMVA::MethodC50::GetHelpMessage(), TMVA::MethodFDA::GetHelpMessage(), TMVA::MethodRSNNS::GetHelpMessage(), TMVA::MethodLikelihood::GetHelpMessage(), TMVA::MethodPDERS::GetHelpMessage(), TMVA::MethodCategory::GetHelpMessage(), TMVA::MethodMLP::GetHelpMessage(), TMVA::MethodRSVM::GetHelpMessage(), TMVA::MethodRuleFit::GetHelpMessage(), TMVA::MethodPyGTB::GetHelpMessage(), TMVA::MethodCFMlpANN::GetHelpMessage(), TMVA::MethodPyRandomForest::GetHelpMessage(), TMVA::MethodCuts::GetHelpMessage(), TMVA::MethodBDT::GetHelpMessage(), TMVA::MethodPDEFoam::GetHelpMessage(), TMVA::MethodBoost::GetHelpMessage(), TMVA::MethodBase::MakeClass(), TMVA::TransformationHandler::PlotVariables(), TMVA::MethodBase::PrintHelpMessage(), TMVA::MethodRuleFit::ProcessOptions(), TMVA::MethodPDEFoam::ReadFoamsFromFile(), TMVA::MethodRSVM::ReadStateFromFile(), TMVA::MethodRSNNS::ReadStateFromFile(), TMVA::MethodPyRandomForest::ReadStateFromFile(), TMVA::MethodRXGB::ReadStateFromFile(), TMVA::MethodPyGTB::ReadStateFromFile(), TMVA::MethodC50::ReadStateFromFile(), TMVA::MethodPyAdaBoost::ReadStateFromFile(), TMVA::MethodBase::ReadStateFromFile(), TMVA::Timer::SecToText(), TMVACitation(), TMVA::MethodRSVM::Train(), TMVA::MethodC50::Train(), TMVA::MethodRXGB::Train(), TMVA::MethodRSNNS::Train(), TMVA::MethodPyAdaBoost::Train(), TMVA::MethodPyRandomForest::Train(), TMVA::MethodPyGTB::Train(), TMVA::MethodPDEFoam::WriteFoamsToFile(), and TMVA::MethodBase::WriteStateToFile().

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 
)
Double_t TMVA::Tools::ComputeVariance ( Double_t  sumx2,
Double_t  sumx,
Int_t  nx 
)
inline

Definition at line 318 of file Tools.h.

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

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

Definition at line 793 of file Tools.cxx.

void TMVA::Tools::DestroyInstance ( )
static

Definition at line 95 of file Tools.cxx.

Referenced by TMVA::Factory::~Factory().

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" 
)
void TMVA::Tools::FormattedOutput ( const TMatrixD M,
const std::vector< TString > &  V,
MsgLogger logger 
)

formatted output of matrix (with labels)

Definition at line 946 of file Tools.cxx.

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

void * TMVA::Tools::GetChild ( void parent,
const char *  childname = 0 
)
const char * TMVA::Tools::GetContent ( void node)
const TMatrixD * TMVA::Tools::GetCorrelationMatrix ( const TMatrixD covMat)

turns covariance into correlation matrix

Definition at line 337 of file Tools.cxx.

Referenced by TMVA::Factory::EvaluateAllMethods(), and TMVA::DecisionTree::TrainNodeFast().

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

Referenced by TMVA::TransformationHandler::PlotVariables().

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

Definition at line 1759 of file Tools.cxx.

Referenced by TMVA::ROCCalc::GetROC().

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

find index of maximum entry in vector

Definition at line 757 of file Tools.cxx.

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

find index of minimum entry in vector

Definition at line 774 of file Tools.cxx.

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

Referenced by TMVA::TransformationHandler::PlotVariables(), and TMVA::MethodBase::TestRegression().

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

XML helpers.

Definition at line 1190 of file Tools.cxx.

Referenced by TMVA::VariablePCATransform::ReadFromXML().

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

get parent node

Definition at line 1149 of file Tools.cxx.

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

compute "separation" defined as <s2> = (1/2) Int_-oo..+oo { (S(x) - B(x))^2/(S(x) + B(x)) dx }

Definition at line 136 of file Tools.cxx.

Referenced by TMVA::MethodLikelihood::CreateRanking(), TMVA::OptimizeConfigParameters::GetSeparation(), TMVA::MethodBase::GetSeparation(), and TMVA::TransformationHandler::PlotVariables().

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

compute "separation" defined as <s2> = (1/2) Int_-oo..+oo { (S(x) - B(x))2/(S(x) + B(x)) dx }

Definition at line 187 of file Tools.cxx.

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

Referenced by TMVA::VariableDecorrTransform::CalcSQRMats().

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

histogramming utility

Definition at line 1049 of file Tools.cxx.

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

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

histogramming utility

Definition at line 1057 of file Tools.cxx.

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

add attribute from xml

Definition at line 1104 of file Tools.cxx.

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

Definition at line 1494 of file Tools.cxx.

Referenced by TMVA::PDF::AddXMLTo().

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

Definition at line 80 of file Tools.cxx.

Referenced by Classification(), and TMVA::gTools().

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

Definition at line 243 of file Tools.h.

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

Definition at line 1694 of file Tools.cxx.

Referenced by ComputeStat().

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

Definition at line 1644 of file Tools.cxx.

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

Double_t TMVA::Tools::NormHist ( TH1 theHist,
Double_t  norm = 1.0 
)
Double_t TMVA::Tools::NormVariable ( Double_t  x,
Double_t  xmin,
Double_t  xmax 
)

normalise to output range: [-1, 1]

Definition at line 127 of file Tools.cxx.

Referenced by ComputeStat(), TMVA::MethodANNBase::CreateRanking(), and TMVA::MethodMLP::TrainOneEventFast().

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)

Definition at line 440 of file Tools.cxx.

TList * TMVA::Tools::ParseFormatLine ( TString  theString,
const char *  sep = ":" 
)
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.

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

Definition at line 295 of file Tools.h.

Referenced by TMVA::BinarySearchTree::CreateFromXML(), TMVA::DecisionTree::CreateFromXML(), TMVA::Reader::GetMethodTypeFromFile(), TMVA::StatDialogBDTReg::GetNtrees(), TMVA::StatDialogBDT::GetNtrees(), TMVA::BinarySearchTreeNode::ReadAttributes(), TMVA::DecisionTreeNode::ReadAttributes(), TMVA::MethodBase::ReadClassesFromXML(), TMVA::VariablePCATransform::ReadFromXML(), TMVA::VariableNormalizeTransform::ReadFromXML(), TMVA::VariableDecorrTransform::ReadFromXML(), TMVA::VariableInfo::ReadFromXML(), TMVA::TransformationHandler::ReadFromXML(), TMVA::VariableGaussTransform::ReadFromXML(), TMVA::VariableTransformBase::ReadFromXML(), TMVA::Rule::ReadFromXML(), TMVA::RuleEnsemble::ReadFromXML(), TMVA::Configurable::ReadOptionsFromXML(), TMVA::MethodBase::ReadSpectatorsFromXML(), TMVA::MethodBase::ReadStateFromXML(), TMVA::MethodBase::ReadTargetsFromXML(), TMVA::StatDialogBDTReg::ReadTree(), TMVA::StatDialogBDT::ReadTree(), TMVA::MethodBase::ReadVariablesFromXML(), TMVA::MethodCompositeBase::ReadWeightsFromXML(), TMVA::MethodTMlpANN::ReadWeightsFromXML(), TMVA::MethodFisher::ReadWeightsFromXML(), TMVA::MethodKNN::ReadWeightsFromXML(), TMVA::MethodLD::ReadWeightsFromXML(), TMVA::MethodSVM::ReadWeightsFromXML(), TMVA::MethodFDA::ReadWeightsFromXML(), TMVA::MethodCategory::ReadWeightsFromXML(), TMVA::MethodLikelihood::ReadWeightsFromXML(), TMVA::MethodCuts::ReadWeightsFromXML(), TMVA::MethodBDT::ReadWeightsFromXML(), TMVA::MethodCFMlpANN::ReadWeightsFromXML(), TMVA::MethodANNBase::ReadWeightsFromXML(), TMVA::MethodPDEFoam::ReadWeightsFromXML(), TMVA::PDF::ReadXML(), and TMVA::Node::ReadXML().

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

add attribute from xml

Definition at line 1112 of file Tools.cxx.

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

reads a float value with the available precision from a stream

Definition at line 1082 of file Tools.cxx.

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

Definition at line 1284 of file Tools.cxx.

Referenced by TMVA::MethodHMatrix::ReadWeightsFromXML().

void TMVA::Tools::ReadTVectorDFromXML ( void node,
const char *  name,
TVectorD vec 
)
TString TMVA::Tools::ReplaceRegularExpressions ( const TString s,
const TString replace = "+" 
)

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

Definition at line 807 of file Tools.cxx.

Referenced by TMVA::VariableInfo::VariableInfo().

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

Definition at line 1745 of file Tools.cxx.

Referenced by ComputeStat().

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

Definition at line 1706 of file Tools.cxx.

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

prints the ROOT release number and date

Definition at line 1333 of file Tools.cxx.

Referenced by TMVA::Factory::Greetings().

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

scales double vector

Definition at line 528 of file Tools.cxx.

Referenced by TMVA::Volume::Scale().

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

scales float vector

Definition at line 536 of file Tools.cxx.

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

Referenced by TMVA::MethodCategory::CreateCategoryDSI(), TMVA::Configurable::ReadOptionsFromXML(), and TMVA::Factory::WriteDataInformation().

TString TMVA::Tools::StringFromDouble ( Double_t  d)
TString TMVA::Tools::StringFromInt ( Long_t  i)

string tools

Definition at line 1231 of file Tools.cxx.

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

kinds of TMVA citation

Definition at line 1448 of file Tools.cxx.

Referenced by TMVA::Factory::EvaluateAllMethods().

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

prints the TMVA release number and date

Definition at line 1324 of file Tools.cxx.

Referenced by TMVA::Factory::Greetings().

void TMVA::Tools::TMVAWelcomeMessage ( )

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

Definition at line 1310 of file Tools.cxx.

Referenced by TMVA::Factory::Greetings().

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

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

Transpose quadratic histogram.

Definition at line 666 of file Tools.cxx.

Referenced by TMVA::TransformationHandler::PlotVariables().

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

Referenced by TMVA::Factory::EvaluateAllMethods(), and TMVA::MethodBDT::GetRegressionValues().

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

sort vector

Definition at line 746 of file Tools.cxx.

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

Referenced by TMVA::Factory::EvaluateAllMethods().

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

sort vector

Definition at line 735 of file Tools.cxx.

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

writes a float value with the available precision to a stream

Definition at line 1067 of file Tools.cxx.

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

XML helpers.

Definition at line 1251 of file Tools.cxx.

Referenced by TMVA::MethodHMatrix::AddWeightsXMLTo(), and TMVA::VariableDecorrTransform::AttachXMLTo().

void TMVA::Tools::WriteTVectorDToXML ( void node,
const char *  name,
TVectorD vec 
)
TXMLEngine& TMVA::Tools::xmlengine ( )
inline
int TMVA::Tools::xmlenginebuffersize ( )
inline

Definition at line 278 of file Tools.h.

Member Data Documentation

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

Definition at line 247 of file Tools.h.

MsgLogger* TMVA::Tools::fLogger
mutable

Definition at line 242 of file Tools.h.

Referenced by Log().

const TString TMVA::Tools::fRegexp

Definition at line 241 of file Tools.h.

Referenced by ContainsRegularExpression(), and ReplaceRegularExpressions().

TXMLEngine* TMVA::Tools::fXMLEngine

Definition at line 279 of file Tools.h.

Referenced by xmlengine().


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