Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-4060

histfactory - print error and exit if channel name begins with numeric char

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 6.00.00
    • Fix Version/s: 6.22/00
    • Component/s: RooFit/RooStats
    • Labels:
      None
    • Environment:

      All

      Description

      Dear experts,

      I encountered a strange seg-fault today when using hist2workspace. After digging through a lot of code, I realized that the channelCat (or something related to that) was not properly declared/initialized. The problem was that I called my channel "130_something", and somewhere along the road I guess RooFactoryWSTool::process() tried to declare a variable with a name starting with a numerical char, which is not allowed in c++.

      I tried to find exactly where in RooFactoryWSTool::process() variables are declared, but without success.

      So, my temporary fix is to add a few lines after line 234 in MakeModelsAndMeasurementsFast.cxx:
      if (atoi((TString)ch_name[0])) {
      cerr << "error::channel name can not begin with a numeric char : " << ch_name << endl;
      exit(1);
      }

      The same can be added to MakeModelsAndMeasurements.cxx, but this isn't used by hist2workspace as far as I can see?

      Anyway, this gives a clear error message to the user, so that he/she don't have to spend hours on figuring out a seg-fault

      The best would probably be to implement a check in RooFactoryWSTool where variables are declared, as I guess this problem can be encountered in other ways than just through hist2workspace.

      Cheers,
      Silje

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shageboe Stephan Hageboeck
                Reporter:
                siljehra Silje Hattrem Raddum (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: