CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/DataFormats/VertexReco/src/print.cc

Go to the documentation of this file.
00001 #include "DataFormats/VertexReco/interface/print.h"
00002 #include "DataFormats/VertexReco/interface/Vertex.h"
00003 #include <sstream>
00004 
00005 using namespace std;
00006 
00007 namespace reco {
00008   string print ( const Vertex & vtx, edm::Verbosity v ) {
00009     ostringstream out;
00010     if ( v > edm::Silent ) {
00011       out << "vertex position (x, y, z) = ( ";
00012       out.precision(6); out.width(13); out<< vtx.x();
00013       out.precision(6); out.width(13); out<< vtx.y();
00014       out.precision(6); out.width(13); out<< vtx.z();
00015       out << " )" << endl;
00016       //    if ( v >= normal ) {
00017       out << "error = " << endl;
00018       for (int i = 0; i < 2; i++) {
00019         for (int j = 0; j < 2; j++) {
00020           out.precision(6); out.width(13); out<<vtx.covariance(i, j);
00021         }
00022         out << endl;
00023       }
00024       out << endl;
00025     }
00026     // if ( v >= edm::Detailed ) {
00027     //   print track weights
00028     //   print original and refitted track parameters
00029     // }
00030     return out.str();
00031   }
00032 }