ROOT logo
// @(#)root/tmva $Id$   
// Author: Andreas Hoecker, Joerg Stelzer, Helge Voss

/**********************************************************************************
 * Project: TMVA - a Root-integrated toolkit for multivariate data analysis       *
 * Package: TMVA                                                                  *
 * Class  : Types                                                                 *
 * Web    : http://tmva.sourceforge.net                                           *
 *                                                                                *
 * Description:                                                                   *
 *      GLobal types (singleton class)                                            *
 *                                                                                *
 * Authors (alphabetical):                                                        *
 *      Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland              *
 *      Peter Speckmayer <Peter.Speckmayer@cern.ch>  - CERN, Switzerland          *
 *      Joerg Stelzer   <Joerg.Stelzer@cern.ch>  - CERN, Switzerland              *
 *      Helge Voss      <Helge.Voss@cern.ch>     - MPI-K Heidelberg, Germany      *
 *                                                                                *
 * Copyright (c) 2005:                                                            *
 *      CERN, Switzerland                                                         * 
 *      U. of Victoria, Canada                                                    * 
 *      MPI-K Heidelberg, Germany                                                 * 
 *                                                                                *
 * Redistribution and use in source and binary forms, with or without             *
 * modification, are permitted according to the terms listed in LICENSE           *
 * (http://mva.sourceforge.net/license.txt)                                       *
 **********************************************************************************/

#ifndef ROOT_TMVA_Types
#define ROOT_TMVA_Types

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// Types                                                                //
//                                                                      //
// Singleton class for Global types used by TMVA                        //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include <map>

#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif

#ifndef ROOT_TString
#include "TString.h"
#endif

namespace TMVA {

   typedef UInt_t TMVAVersion_t;

   class MsgLogger;

   // message types for MsgLogger
   // define outside of Types class to facilite access
   enum EMsgType {
      kDEBUG   = 1,
      kVERBOSE = 2,
      kINFO    = 3,
      kWARNING = 4,
      kERROR   = 5,
      kFATAL   = 6,
      kSILENT  = 7
   };

   class Types {

   public:

      // available MVA methods
      enum EMVA {
         kVariable    = 0,
         kCuts           ,
         kLikelihood     ,
         kPDERS          ,
         kHMatrix        ,
         kFisher         ,
         kKNN            ,
         kCFMlpANN       ,
         kTMlpANN        ,
         kBDT            ,
         kDT             ,
         kRuleFit        ,
         kSVM            ,
         kMLP            ,
         kBayesClassifier,
         kFDA            ,
         kBoost          ,
         kPDEFoam        ,
         kLD             ,
         kPlugins        ,
         kCategory       ,
         kMaxMethod
      };

      // available variable transformations
      enum EVariableTransform {
         kIdentity = 0,
         kDecorrelated,
         kNormalized,
         kPCA,
         kRearranged,
         kGauss,
         kUniform,
         kMaxVariableTransform
      };

      // type of analysis
      enum EAnalysisType {
         kClassification = 0,
         kRegression,
         kMulticlass,
         kNoAnalysisType,
         kMaxAnalysisType
      };

      enum ESBType {
         kSignal = 0,  // Never change this number - it is elsewhere assumed to be zero !
         kBackground,
         kSBBoth,
         kMaxSBType,
         kTrueType
      };

      enum ETreeType {
         kTraining = 0,
         kTesting,
         kMaxTreeType,  // also used as temporary storage for trees not yet assigned for testing;training... 
         kValidation,   // these are placeholders... currently not used, but could be moved "forward" if
         kTrainingOriginal     // ever needed 
      };

      enum EBoostStage {
         kBoostProcBegin=0,
         kBeforeTraining,
         kBeforeBoosting,
         kAfterBoosting,
         kBoostProcEnd
      };

   public:

      static Types& Instance();
      static void   DestroyInstance();
      ~Types();

      Types::EMVA   GetMethodType( const TString& method ) const;
      TString       GetMethodName( Types::EMVA    method ) const;

      Bool_t        AddTypeMapping(Types::EMVA method, const TString& methodname);

   private:

      Types();
      static Types* fgTypesPtr;

   private:

      std::map<TString, TMVA::Types::EMVA> fStr2type; // types-to-text map
      mutable MsgLogger* fLogger;   // message logger
      MsgLogger& Log() const { return *fLogger; }

   };
}

#endif
 Types.h:1
 Types.h:2
 Types.h:3
 Types.h:4
 Types.h:5
 Types.h:6
 Types.h:7
 Types.h:8
 Types.h:9
 Types.h:10
 Types.h:11
 Types.h:12
 Types.h:13
 Types.h:14
 Types.h:15
 Types.h:16
 Types.h:17
 Types.h:18
 Types.h:19
 Types.h:20
 Types.h:21
 Types.h:22
 Types.h:23
 Types.h:24
 Types.h:25
 Types.h:26
 Types.h:27
 Types.h:28
 Types.h:29
 Types.h:30
 Types.h:31
 Types.h:32
 Types.h:33
 Types.h:34
 Types.h:35
 Types.h:36
 Types.h:37
 Types.h:38
 Types.h:39
 Types.h:40
 Types.h:41
 Types.h:42
 Types.h:43
 Types.h:44
 Types.h:45
 Types.h:46
 Types.h:47
 Types.h:48
 Types.h:49
 Types.h:50
 Types.h:51
 Types.h:52
 Types.h:53
 Types.h:54
 Types.h:55
 Types.h:56
 Types.h:57
 Types.h:58
 Types.h:59
 Types.h:60
 Types.h:61
 Types.h:62
 Types.h:63
 Types.h:64
 Types.h:65
 Types.h:66
 Types.h:67
 Types.h:68
 Types.h:69
 Types.h:70
 Types.h:71
 Types.h:72
 Types.h:73
 Types.h:74
 Types.h:75
 Types.h:76
 Types.h:77
 Types.h:78
 Types.h:79
 Types.h:80
 Types.h:81
 Types.h:82
 Types.h:83
 Types.h:84
 Types.h:85
 Types.h:86
 Types.h:87
 Types.h:88
 Types.h:89
 Types.h:90
 Types.h:91
 Types.h:92
 Types.h:93
 Types.h:94
 Types.h:95
 Types.h:96
 Types.h:97
 Types.h:98
 Types.h:99
 Types.h:100
 Types.h:101
 Types.h:102
 Types.h:103
 Types.h:104
 Types.h:105
 Types.h:106
 Types.h:107
 Types.h:108
 Types.h:109
 Types.h:110
 Types.h:111
 Types.h:112
 Types.h:113
 Types.h:114
 Types.h:115
 Types.h:116
 Types.h:117
 Types.h:118
 Types.h:119
 Types.h:120
 Types.h:121
 Types.h:122
 Types.h:123
 Types.h:124
 Types.h:125
 Types.h:126
 Types.h:127
 Types.h:128
 Types.h:129
 Types.h:130
 Types.h:131
 Types.h:132
 Types.h:133
 Types.h:134
 Types.h:135
 Types.h:136
 Types.h:137
 Types.h:138
 Types.h:139
 Types.h:140
 Types.h:141
 Types.h:142
 Types.h:143
 Types.h:144
 Types.h:145
 Types.h:146
 Types.h:147
 Types.h:148
 Types.h:149
 Types.h:150
 Types.h:151
 Types.h:152
 Types.h:153
 Types.h:154
 Types.h:155
 Types.h:156
 Types.h:157
 Types.h:158
 Types.h:159
 Types.h:160
 Types.h:161
 Types.h:162
 Types.h:163
 Types.h:164
 Types.h:165
 Types.h:166
 Types.h:167
 Types.h:168