// $Id: CovMatrix2Put.cc,v 1.5 2002/09/19 16:45:18 sachs Exp $ // // Function to display a CovMatrix2 in triangular form // // David Sachs, Fermilab - April 2002 // #include "CovMatrices/CovMatrix2.h" // NOTE: CovMatrix2.h includes other needed header files #include "CovMatrixElement.h" void CovMatrices::CovMatrix2::put(std::ostream& o) const { // Define precision and width to use for now enum { W = 18, P = 10 }; // should have W = P + 8 std::ios::fmtflags oldf = o.setf(std::ios::scientific|std::ios::showpos); int oldp = o.precision(P); // Print first line (with leading brace) o << "{" << std::setw(W) << M[M00] << "\n "; // Print last line with terminating brace o << std::setw(W) << M[M10] << std::setw(W) << M[M11] << " }" << std::endl; // Restore previous stream parameters o.flags(oldf); o.precision(oldp); }