63 TMVA::IMethod* CreateMethodPlugins(
const TString& jobName,
const TString& methodTitle, TMVA::DataSetInfo& theData,
const TString& theOption)
66 TPluginManager *pluginManager(0);
67 TPluginHandler *pluginHandler(0);
68 pluginManager = gROOT->GetPluginManager();
70 TString myMethodTitle;
71 if(jobName==
"" && methodTitle==
"") {
72 myMethodTitle = theOption.Copy();
73 Ssiz_t firstUnderscore = myMethodTitle.First(
'_');
74 Ssiz_t firstPoint = myMethodTitle.Last(
'.');
75 myMethodTitle.Remove(firstPoint,myMethodTitle.Length() - firstPoint);
76 myMethodTitle.Remove(0,firstUnderscore-1);
78 else myMethodTitle = methodTitle;
79 pluginHandler = pluginManager->FindHandler(
"TMVA@@MethodBase", myMethodTitle);
82 std::cerr <<
"Couldn't find plugin handler for TMVA@@MethodBase and " << methodTitle << std::endl;
86 if (pluginHandler->LoadPlugin() == 0) {
87 if(jobName==
"" && methodTitle==
"") {
89 return (TMVA::IMethod*) pluginHandler->ExecPlugin(2, &theData, &theOption);
93 return (TMVA::IMethod*) pluginHandler->ExecPlugin(4, &jobName, &methodTitle, &theData, &theOption);
100 struct registration {
102 TMVA::ClassifierFactory::Instance().Register(
"Plugins", CreateMethodPlugins);
103 TMVA::Types::Instance().AddTypeMapping(TMVA::Types::kPlugins,
"Plugins");