Skip to content
Snippets Groups Projects
Commit da37b936 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

More std::cout fixes for Windows compilation

parent 7416e1d6
No related branches found
No related tags found
No related merge requests found
......@@ -331,13 +331,13 @@ void BasicMinimizer::SetFinalValues(const double * x) {
}
void BasicMinimizer::PrintResult() const {
int pr = std::cout.precision(18);
std::cout << "FVAL = " << fMinVal << std::endl;
std::cout.precision(pr);
//int pr = std::cout.precision(18);
std::cout << std::string("FVAL = ") << fMinVal << std::endl;
std::cout << std::setprecision(18);
// std::cout << "Edm = " << fState.Edm() << std::endl;
std::cout << "Niterations = " << NIterations() << std::endl;
std::cout << std::string("Niterations = ") << NIterations() << std::endl;
unsigned int ncalls = NCalls();
if (ncalls) std::cout << "NCalls = " << ncalls << std::endl;
if (ncalls) std::cout << std::string("NCalls = ") << ncalls << std::endl;
for (unsigned int i = 0; i < fDim; ++i)
std::cout << fNames[i] << "\t = " << fValues[i] << std::endl;
}
......
......@@ -17,6 +17,7 @@
#include <algorithm>
#include <functional>
#include <ctype.h> // need to use c version of tolower defined here
#include <string>
namespace ROOT {
namespace Math {
......
......@@ -20,6 +20,7 @@
#include <iostream>
#include <cassert>
#include <iomanip>
namespace ROOT {
......@@ -101,11 +102,11 @@ bool GSLSimAnMinimizer::Minimize() {
else
std::cout << "GSLSimAnMinimizer: Error in solving" << std::endl;
int pr = std::cout.precision(18);
//int pr = std::cout.precision(18);
std::cout << "FVAL = " << MinValue() << std::endl;
std::cout.precision(pr);
std::cout << std::setprecision(18);
for (unsigned int i = 0; i < NDim(); ++i)
std::cout << VariableName(i) << "\t = " << X()[i] << std::endl;
std::cout << VariableName(i) << std::string("\t = ") << X()[i] << std::endl;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment