Status: Open (View Workflow)
In TMVA::Factory, function AddTree (in master this has been moved to a different file, I think it is now in tmva/tmva/src/DataInputHandler.cxx): When parameter className contains an underscore, the TMVA::TMVAMultiClassGui does not work correctly, i.e. segfaults.
Reason is file tmva/tmvagui/src/tmvaglob.cxx, function
std::vector<TString> TMVA::TMVAGlob::GetClassNames(TDirectory *dir )
it determines the class names by looking at the histogram names in the TMVA output file, removes some strings like "_Gauss"
and then removes all characters to the last '_' in the name - that is wrong if your class names contains an underscore.
Two possible solutions:
a) disallow underscores in class names (i.e. fail in TMVA::Factory::AddTree), you could add
b) in GetClassNames: instead of doing
char c = '_';
Int_t pos = name.Last(c);
do this (the first double underscore is what we are really looking for):
auto doubleUnderscorePos = nameStd.find("__");
if (doubleUnderscorePos != std::string::npos)
However, I'd prefer to disallow the underscore because I don't know what other also does not like underscores in the name.