Uploaded image for project: 'Test Project'
  1. Test Project
  2. TP-5

Jira autoformatting test

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: High
    • Resolution: Unresolved
    • Component/s: None
    • Labels:
      None
    • Platforms:
      x86_64-slc6-gcc48-opt
    • Development:

      Description

      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
      if (className.Contains('_'))

      { Log() << kFatal << "<AddTree>: className \"" << className << "\" must not contain " << "underscores. They will break the TMVA GUI!" << Endl; }

      b) in GetClassNames: instead of doing
      char c = '_';
      Int_t pos = name.Last(c);
      name.Remove(0,pos+1);
      do this (the first double underscore is what we are really looking for):
      std::string nameStd(name.Data());
      auto doubleUnderscorePos = nameStd.find("__");
      if (doubleUnderscorePos != std::string::npos)

      { nameStd.erase(0, doubleUnderscorePos + 2); name = nameStd; }

      However, I'd prefer to disallow the underscore because I don't know what other also does not like underscores in the name.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              axel Axel Naumann
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: