// $Id: CovMatrix6Put.cc,v 1.6 2002/09/19 16:45:18 sachs Exp $ // // Function to display a CovMatrix6 in triangular form // // David Sachs, Fermilab - April 2002 // #include "CovMatrices/CovMatrix6.h" // NOTE: CovMatrix6.h includes other needed header files #include "CovMatrixElement.h" void CovMatrices::CovMatrix6::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-5 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 "; o << std::setw(W) << M[M30] << std::setw(W) << M[M31] << std::setw(W) << M[M32] << std::setw(W) << M[M33] << "\n "; o << std::setw(W) << M[M40] << std::setw(W) << M[M41] << std::setw(W) << M[M42] << std::setw(W) << M[M43] << std::setw(W) << M[M44] << "\n "; // Print last line with terminating brace o << std::setw(W) << M[M50] << std::setw(W) << M[M51] << std::setw(W) << M[M52] << std::setw(W) << M[M53] << std::setw(W) << M[M54] << std::setw(W) << M[M55] << " }" << std::endl; // Restore previous stream parameters o.flags(oldf); o.precision(oldp); }