// $Id: CovMatrix4Put.cc,v 1.6 2002/09/19 16:45:18 sachs Exp $ // // Function to display a CovMatrix4 in triangular form // // David Sachs, Fermilab - April 2002 // #include "CovMatrices/CovMatrix4.h" // NOTE: CovMatrix4.h includes other needed header files #include "CovMatrixElement.h" void CovMatrices::CovMatrix4::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 lines 2-3 o << std::setw(W) << M[M10] << std::setw(W) << M[M11] << "\n "; o << std::setw(W) << M[M20] << std::setw(W) << M[M21] << std::setw(W) << M[M22] << "\n "; // Print last line with terminating brace o << std::setw(W) << M[M30] << std::setw(W) << M[M31] << std::setw(W) << M[M32] << std::setw(W) << M[M33] << " }" << std::endl; // Restore previous stream parameters o.flags(oldf); o.precision(oldp); }