Config.cxx

Go to the documentation of this file.
00001 // @(#)root/tmva $Id: Config.cxx 33931 2010-06-15 16:49:02Z stelzer $   
00002 // Author: Andreas Hoecker, Joerg Stelzer, Fredrik Tegenfeldt, Helge Voss
00003 
00004 /**********************************************************************************
00005  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
00006  * Package: TMVA                                                                  *
00007  * Class  : Config                                                                *
00008  * Web    : http://tmva.sourceforge.net                                           *
00009  *                                                                                *
00010  * Description:                                                                   *
00011  *      Implementation                                                            *
00012  *                                                                                *
00013  * Authors (alphabetical):                                                        *
00014  *      Andreas Hoecker    <Andreas.Hocker@cern.ch>     - CERN, Switzerland       *
00015  *      Joerg Stelzer      <Joerg.Stelzer@cern.ch>      - CERN, Switzerland       *
00016  *      Fredrik Tegenfeldt <Fredrik.Tegenfeldt@cern.ch> - Iowa State U., USA      *
00017  *      Helge Voss         <Helge.Voss@cern.ch>         - MPI-K Heidelberg, GER   *
00018  *                                                                                *
00019  * Copyright (c) 2006:                                                            *
00020  *      CERN, Switzerland                                                         *
00021  *      Iowa State U., USA                                                        *
00022  *      MPI-K Heidelberg, Germany                                                 *
00023  *                                                                                *
00024  * Redistribution and use in source and binary forms, with or without             *
00025  * modification, are permitted according to the terms listed in LICENSE           *
00026  * (http://mva.sourceforge.net/license.txt)                                       *
00027  **********************************************************************************/
00028 
00029 #include "TMVA/Config.h"
00030 #include "TMVA/MsgLogger.h"
00031 
00032 ClassImp(TMVA::Config)
00033 
00034 TMVA::Config* TMVA::Config::fgConfigPtr = 0;
00035 
00036 TMVA::Config& TMVA::gConfig() { return TMVA::Config::Instance(); }
00037 
00038 //_______________________________________________________________________
00039 TMVA::Config::Config() :
00040    fUseColoredConsole    ( kTRUE  ),
00041    fSilent               ( kFALSE ),
00042    fWriteOptionsReference( kFALSE ),
00043    fDrawProgressBar      ( kTRUE ),
00044    fLogger               ( new MsgLogger("Config") )
00045 {
00046    // constructor - set defaults
00047    
00048    // plotting
00049    fVariablePlotting.fTimesRMS = 8.0;
00050    fVariablePlotting.fNbins1D  = 60;
00051    fVariablePlotting.fNbins2D  = 300;
00052    fVariablePlotting.fMaxNumOfAllowedVariablesForScatterPlots = 20;
00053    
00054    fVariablePlotting.fNbinsXOfROCCurve = 100;
00055 
00056    // IO names
00057    fIONames.fWeightFileDir           = "weights";
00058    fIONames.fWeightFileExtension     = "weights";
00059    fIONames.fOptionsReferenceFileDir = "optionInfo";
00060 }
00061 
00062 //_______________________________________________________________________
00063 TMVA::Config::~Config()
00064 {
00065    // destructor
00066    delete fLogger;
00067 }
00068 
00069 //_______________________________________________________________________
00070 void TMVA::Config::DestroyInstance()
00071 {
00072    // static function: destroy TMVA instance
00073    if (fgConfigPtr != 0) { delete fgConfigPtr; fgConfigPtr = 0;}
00074 }
00075 
00076 //_______________________________________________________________________
00077 TMVA::Config& TMVA::Config::Instance()
00078 {
00079    // static function: returns  TMVA instance
00080    return fgConfigPtr ? *fgConfigPtr :*(fgConfigPtr = new Config());
00081 }
00082 

Generated on Tue Jul 5 15:16:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1