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

Recovery after an error and mysterious error message

    XMLWordPrintable

    Details

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

      All

      Description

      Typing these simple lines I get

      root [0] RooRealVar x("x","x",10,0,10);
       
      RooFit v3.58 -- Developed by Wouter Verkerke and David Kirkby 
                      Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
                      All rights reserved, please read http://roofit.sourceforge.net/license.txt
       
      root [1] RooPlot * pl = x.frame(Title("x"));
      input_line_39:2:36: error: hexadecimal floating constants require an exponent
       (*(class RooRealVar*)0x10c746058.frame(Title("x")))
                                         ^
      input_line_39:2:41: error: use of undeclared identifier 'Title'
       (*(class RooRealVar*)0x10c746058.frame(Title("x")))
                                              ^
       
      Now the first error message is not clear why ? 
      The error is just a missing namespace RooFit for the function Title. 
      But after adding the namespace: 
       
      root [2] RooPlot * pl = x.frame(RooFit::Title("x"));
      ROOT_prompt_2:1:11: error: redefinition of 'pl'
      RooPlot * pl = x.frame(RooFit::Title("x"));
                ^
      ROOT_prompt_1:1:11: note: previous definition is here
      RooPlot * pl = x.frame(Title("x"));

      pl should not be defined afterwards, and it should be possible to re-assign it in case of an error

        Attachments

          Activity

            People

            Assignee:
            jalopezg Javier Lopez Gomez
            Reporter:
            moneta Lorenzo Moneta
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: