70 std::cerr <<
"ClassifierFactory<>::Register - " <<
name <<
" already exists" << std::endl;
74 return fCalls.insert(CallMap::value_type(
name, creator)).second;
98 CallMap::const_iterator it =
fCalls.find(
name);
102 std::cerr <<
"ClassifierFactory<>::Create - don't know anything about " <<
name << std::endl;
107 return (it->second)(job, title, dsi, option);
121 CallMap::const_iterator it =
fCalls.find(
name);
125 std::cerr <<
"ClassifierFactory<>::Create - don't know anything about " <<
name << std::endl;
130 return (it->second)(
"",
"", dsi, weightfile);
138 std::vector<std::string> svec;
140 CallMap::const_iterator it =
fCalls.begin();
141 for (; it !=
fCalls.end(); ++it) svec.push_back(it -> first);
151 std::cout <<
"Print: ClassifierFactory<> knows about " <<
fCalls.size() <<
" objects" << std::endl;
153 CallMap::const_iterator it =
fCalls.begin();
154 for (; it !=
fCalls.end(); ++it) std::cout <<
"Registered object name " << it -> first << std::endl;
Basic types used by ROOT and required by TInterpreter.
bool Bool_t
Boolean (0=false, 1=true) (bool).
IMethod * Create(const std::string &name, const TString &job, const TString &title, DataSetInfo &dsi, const TString &option)
creates the method if needed based on the method name using the creator function the factory has stor...
static ClassifierFactory * fgInstance
Initialize static singleton pointer.
static ClassifierFactory & Instance()
access to the ClassifierFactory singleton creates the instance if needed
static void DestroyInstance()
destroy the singleton instance
IMethod *(* Creator)(const TString &job, const TString &title, DataSetInfo &dsi, const TString &option)
Bool_t Unregister(const std::string &name)
unregisters a classifier type name
void Print() const
prints the registered method type names
const std::vector< std::string > List() const
returns a vector of the method type names of registered methods
Bool_t Register(const std::string &name, Creator creator)
registers a classifier creator function under the method type name
Class that contains all the data information.
Interface for all concrete MVA method implementations.