16 #include "RConfigure.h" 30 #ifndef MATH_NO_PLUGIN_MANAGER 32 #include "TPluginManager.h" 34 #include "TVirtualMutex.h" 44 #ifdef R__HAS_MATHMORE 60 #ifndef MATH_NO_PLUGIN_MANAGER 68 const char * minim = minimizerType.c_str();
69 const char * algo = algoType.c_str();
73 if (minimizerType ==
"Fumili2" ) {
79 if (minimizerType ==
"TMinuit") {
86 R__LOCKGUARD(gROOTMutex);
91 if ((h = gROOT->GetPluginManager()->FindHandler(
"ROOT::Math::Minimizer",minim ))) {
92 if (h->LoadPlugin() == -1) {
94 std::cout <<
"Error Loading ROOT::Math::Minimizer " << minim << std::endl;
103 std::cout <<
"Loaded Minimizer " << minimizerType <<
" " << algoType << std::endl;
105 std::cout <<
"Error creating Minimizer " << minimizerType <<
" " << algoType << std::endl;
127 std::string algo = algoType;
131 if (minimizerType ==
"Minuit2")
133 if (minimizerType ==
"Fumili2")
139 if (minimizerType ==
"Minuit" || minimizerType ==
"TMinuit")
143 #ifdef R__HAS_MATHMORE 145 if (minimizerType ==
"GSL")
148 else if (minimizerType ==
"GSL_NLS")
151 else if (minimizerType ==
"GSL_SIMAN")
168 #ifdef MATH_NO_PLUGIN_MANAGER 169 MATH_ERROR_MSG(
"Factory::CreateDistSampler",
"ROOT plug-in manager not available");
173 const char * typeName = type.c_str();
176 R__LOCKGUARD(gROOTMutex);
178 TPluginManager *pm = gROOT->GetPluginManager();
180 TPluginHandler *h = pm->FindHandler(
"ROOT::Math::DistSampler", typeName );
182 if (h->LoadPlugin() == -1) {
183 MATH_ERROR_MSG(
"Factory::CreateDistSampler",
"Error loading DistSampler plug-in");
191 MATH_ERROR_MSGVAL(
"Factory::CreateDistSampler",
"Error finding DistSampler plug-in",typeName);
static ROOT::Math::Minimizer * CreateMinimizer(const std::string &minimizerType="", const std::string &algoType="")
static method to create the corrisponding Minimizer given the string Supported Minimizers types are: ...
#define MATH_ERROR_MSGVAL(loc, str, x)
GSLSimAnMinimizer class for minimization using simulated annealing using the algorithm from GSL...
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2, Minuit, GSL, etc..) Plug-in's exist in ROOT to be able to instantiate the derived classes like ROOT::Math::GSLMinimizer or ROOT::Math::Minuit2Minimizer via the plug-in manager.
#define MATH_ERROR_MSG(loc, str)
static const std::string & DefaultMinimizerType()
static ROOT::Math::DistSampler * CreateDistSampler(const std::string &samplerType="")
static method to create the distribution sampler class given a string specifying the type Supported s...
Interface class for generic sampling of a distribution, i.e.
Minuit2Minimizer class implementing the ROOT::Math::Minimizer interface for Minuit2 minimization algo...
GSLNLSMinimizer class for Non Linear Least Square fitting It Uses the Levemberg-Marquardt algorithm f...
static const std::string & DefaultSampler()
TMinuitMinimizer class: ROOT::Math::Minimizer implementation based on TMinuit.