Details
-
Bug
-
Status: Closed (View Workflow)
-
High
-
Resolution: Fixed
-
6.06/04
-
None
-
linux, ubuntu 14.04, g++ 5.3
Description
The function for reading a ASCII file for RooDataSet, RooDataSet::read, which uses the RooStreamParser class for parsing, does not properly read the float number with a negative exponent :
some example of error message :
0 ERROR:InputArguments – RooRealVar::readFromStream: parse error, cannot convert '4.52562e' to double precision
0 ERROR:InputArguments – RooRealVar::readFromStream: parse error, cannot convert '7.18401e' to double precision
The problem is coming from the readToken() function of RooStreamParser. I think that it is in line 230 of RooStreamParser.cxx . The - and + sign after the exponent is not properly considered and a split is performed at the + or - sign. When there is no + or - sign the parsing is fine.
It is easy to reproduce the bug, running the attached script will show the problem :
test 1:
3.4532e
+12
test 2:
3.4532e
-12
test 3:
3.4532e12