From 24bc2cbb0be5cfc9d6b7c10c3022b6b46b7e75a4 Mon Sep 17 00:00:00 2001 From: Suter Andreas Date: Tue, 8 Sep 2015 15:50:06 +0200 Subject: [PATCH] hopefully final fix for the FOURIER range output. --- src/classes/PMsrHandler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/classes/PMsrHandler.cpp b/src/classes/PMsrHandler.cpp index afac766b..67c59201 100644 --- a/src/classes/PMsrHandler.cpp +++ b/src/classes/PMsrHandler.cpp @@ -1089,11 +1089,11 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages) } else if (sstr.BeginsWith("range_for_phase_correction")) { fout << "range_for_phase_correction " << fFourier.fRangeForPhaseCorrection[0] << " " << fFourier.fRangeForPhaseCorrection[1] << endl; } else if (sstr.BeginsWith("range ")) { - fout.unsetf(ios::floatfield); + fout.setf(ios::fixed,ios::floatfield); neededPrec = LastSignificant(fFourier.fPlotRange[0]); if (LastSignificant(fFourier.fPlotRange[1]) > neededPrec) neededPrec = LastSignificant(fFourier.fPlotRange[1]); - fout.precision(neededPrec+1); + fout.precision(neededPrec); fout << "range " << fFourier.fPlotRange[0] << " " << fFourier.fPlotRange[1] << endl; } else { fout << str.Data() << endl; @@ -1976,11 +1976,11 @@ Int_t PMsrHandler::WriteMsrFile(const Char_t *filename, map *co // range if ((fFourier.fPlotRange[0] != -1.0) || (fFourier.fPlotRange[1] != -1.0)) { - fout.unsetf(ios::floatfield); + fout.setf(ios::fixed,ios::floatfield); UInt_t neededPrec = LastSignificant(fFourier.fPlotRange[0]); if (LastSignificant(fFourier.fPlotRange[1]) > neededPrec) neededPrec = LastSignificant(fFourier.fPlotRange[1]); - fout.precision(neededPrec+1); + fout.precision(neededPrec); fout << "range " << fFourier.fPlotRange[0] << " " << fFourier.fPlotRange[1] << endl; }