updated to the previous incomplete fix. FOURIER range is not truncated anymore.

This commit is contained in:
suter_a 2015-09-04 17:36:57 +02:00
parent 001aed134c
commit 4d211ddcc1

View File

@ -1090,6 +1090,10 @@ Int_t PMsrHandler::WriteMsrLogFile(const Bool_t messages)
fout << "range_for_phase_correction " << fFourier.fRangeForPhaseCorrection[0] << " " << fFourier.fRangeForPhaseCorrection[1] << endl; fout << "range_for_phase_correction " << fFourier.fRangeForPhaseCorrection[0] << " " << fFourier.fRangeForPhaseCorrection[1] << endl;
} else if (sstr.BeginsWith("range ")) { } else if (sstr.BeginsWith("range ")) {
fout.unsetf(ios::floatfield); fout.unsetf(ios::floatfield);
neededPrec = LastSignificant(fFourier.fPlotRange[0]);
if (LastSignificant(fFourier.fPlotRange[1]) > neededPrec)
neededPrec = LastSignificant(fFourier.fPlotRange[1]);
fout.precision(neededPrec+1);
fout << "range " << fFourier.fPlotRange[0] << " " << fFourier.fPlotRange[1] << endl; fout << "range " << fFourier.fPlotRange[0] << " " << fFourier.fPlotRange[1] << endl;
} else { } else {
fout << str.Data() << endl; fout << str.Data() << endl;
@ -1973,6 +1977,10 @@ Int_t PMsrHandler::WriteMsrFile(const Char_t *filename, map<UInt_t, TString> *co
// range // range
if ((fFourier.fPlotRange[0] != -1.0) || (fFourier.fPlotRange[1] != -1.0)) { if ((fFourier.fPlotRange[0] != -1.0) || (fFourier.fPlotRange[1] != -1.0)) {
fout.unsetf(ios::floatfield); fout.unsetf(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 << "range " << fFourier.fPlotRange[0] << " " << fFourier.fPlotRange[1] << endl; fout << "range " << fFourier.fPlotRange[0] << " " << fFourier.fPlotRange[1] << endl;
} }