Logo ROOT   6.18/05
Reference Guide
Classes | Namespaces | Macros
ClassifierFactory.h File Reference
#include <map>
#include <string>
#include <vector>
#include "TString.h"
Include dependency graph for ClassifierFactory.h:
This graph shows which files directly or indirectly include this file:

Classes

class  TMVA::ClassifierFactory
 This is the MVA factory. More...
 

Namespaces

namespace  TMVA
 create variable transformations
 

Macros

#define REGISTER_METHOD(CLASS)
 for example More...
 

Macro Definition Documentation

◆ REGISTER_METHOD

#define REGISTER_METHOD (   CLASS)
Value:
namespace \
{ \
struct RegisterTMVAMethod { \
static TMVA::IMethod* CreateMethod##CLASS(const TString& job, const TString& title, TMVA::DataSetInfo& dsi, const TString& option) \
{ \
if(job=="" && title=="") { \
return (TMVA::IMethod*) new TMVA::Method##CLASS(dsi, option); \
} else { \
return (TMVA::IMethod*) new TMVA::Method##CLASS(job, title, dsi, option); \
} \
} \
RegisterTMVAMethod() { \
TMVA::ClassifierFactory::Instance(). Register(#CLASS, CreateMethod##CLASS); \
TMVA::Types::Instance().AddTypeMapping(TMVA::Types::k##CLASS, #CLASS); \
} \
}; \
static RegisterTMVAMethod RegisterTMVAMethod_instance; \
}
static ClassifierFactory & Instance()
access to the ClassifierFactory singleton creates the instance if needed
Class that contains all the data information.
Definition: DataSetInfo.h:60
Interface for all concrete MVA method implementations.
Definition: IMethod.h:54
static Types & Instance()
the the single instance of "Types" if existing already, or create it (Singleton)
Definition: Types.cxx:70
Bool_t AddTypeMapping(Types::EMVA method, const TString &methodname)
Definition: Types.cxx:101
Basic string class.
Definition: TString.h:131

for example

REGISTER_METHOD(Fisher)

expands to this code:

namespace { TMVA::IMethod* CreateMethod() { return (TMVA::IMethod*) new TMVA::MethodFisher; } Bool_t RegisteredMethod = TMVA::ClassifierFactory<TMVA::MethodBase>::Instance(). Register("Method", CreateMethodFisher); }

Definition at line 124 of file ClassifierFactory.h.