diff --git a/src/classes/PMsrHandler.cpp b/src/classes/PMsrHandler.cpp index a13ab2b6..9a6755e4 100644 --- a/src/classes/PMsrHandler.cpp +++ b/src/classes/PMsrHandler.cpp @@ -838,6 +838,8 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages) fout.width(8); fout.precision(NeededPrecision(fRuns[runNo].GetFitRange(j))); fout << left << fixed << fRuns[runNo].GetFitRange(j); + if (j==0) + fout << " "; } fout << endl; } else if (sstr.BeginsWith("packing")) { @@ -941,10 +943,17 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages) fout << endl; } else if (sstr.BeginsWith("range")) { fout << "range "; - fout.precision(2); - fout << fPlots[plotNo].fTmin[0] << " " << fPlots[plotNo].fTmax[0]; + fout.precision(NeededPrecision(fPlots[plotNo].fTmin[0])); + fout << fPlots[plotNo].fTmin[0]; + fout << " "; + fout.precision(NeededPrecision(fPlots[plotNo].fTmax[0])); + fout << fPlots[plotNo].fTmax[0]; if (fPlots[plotNo].fYmin.size() > 0) { - fout << " " << fPlots[plotNo].fYmin[0] << " " << fPlots[plotNo].fYmax[0]; + fout << " "; + fout.precision(NeededPrecision(fPlots[plotNo].fYmin[0])); + fout << fPlots[plotNo].fYmin[0] << " "; + fout.precision(NeededPrecision(fPlots[plotNo].fYmax[0])); + fout << fPlots[plotNo].fYmax[0]; } fout << endl; } else { @@ -4668,7 +4677,7 @@ void PMsrHandler::CheckMaxLikelihood() //-------------------------------------------------------------------------- /** *
Calculates the needed precision of Double_t values for WriteMsrLogFile and WriteMsrFile of the fit range.
- * If a precision of > 4 decimal places is needed, a warning is placed and a value of 4 is returned.
+ * If a precision of > 6 decimal places is needed, a warning is placed and a value of 6 is returned.
*
* \param dval value for which the precision has to be estimated
*
@@ -4679,20 +4688,24 @@ UInt_t PMsrHandler::NeededPrecision(Double_t dval)
{
UInt_t prec=0;
- Int_t ival = static_cast