Go to the documentation of this file.00001
00002 #include "CondFormats/HIObjects/interface/CentralityTable.h"
00003 #include "CondCore/Utilities/interface/PayLoadInspector.h"
00004 #include "CondCore/Utilities/interface/InspectorPythonWrapper.h"
00005
00006 #include <string>
00007 #include <sstream>
00008 #include <iostream>
00009
00010
00011 namespace cond {
00012
00013 template<>
00014 std::string
00015 PayLoadInspector<CentralityTable>::summary() const {
00016
00017 CentralityTable const & table = object();
00018
00019 std::stringstream ss;
00020
00021 ss<<"Bin \t";
00022 ss<<"Lower Boundary\t";
00023 ss<<"Npart \t";
00024 ss<<"sigma \t";
00025 ss<<"Ncoll \t";
00026 ss<<"sigma \t";
00027 ss<<"B \t";
00028 ss<<"sigma \t"<<std::endl;
00029 ss<<"__________________________________________________"<<std::endl;
00030
00031 for(unsigned int j=0; j<table.m_table.size(); j++){
00032
00033 const CentralityTable::CBin& thisBin = table.m_table[j];
00034 ss<<j<<" \t";
00035 ss<<thisBin.bin_edge <<"\t";
00036 ss<<thisBin.n_part.mean<<" \t";
00037 ss<<thisBin.n_part.var<<" \t";
00038 ss<<thisBin.n_coll.mean<<" \t";
00039 ss<<thisBin.n_coll.var<<" \t";
00040 ss<<thisBin.b.mean<<" \t";
00041 ss<<thisBin.b.var<<" \t"<<std::endl;
00042 ss<<"__________________________________________________"<<std::endl;
00043
00044 }
00045
00046 return ss.str();
00047 }
00048
00049 }
00050
00051 PYTHON_WRAPPER(CentralityTable,CentralityTable);
00052