70 {
71 MsgStream log(messageService(), name());
72
73 log << MSG::INFO << "==============================BesTimerSvc::Print===============================" << endreq;
74 unsigned int maxname=0;
75 std::vector < BesTimer* >::iterator it = m_itemList.begin();
76 for (; it != m_itemList.end(); it++) {
77 if ((*it)->name().length() > maxname) maxname = static_cast<int>((*it)->name().length());
78 if (!(*it)->propName().empty()) {
79 if ((*it)->propName().length() > maxname) maxname = static_cast<int>((*it)->propName().length());
80 }
81 }
82
83 it = m_itemList.begin();
84 for (; it != m_itemList.end(); it++) {
85 std::string nam = (*it)->name();
86 for (unsigned int i = static_cast<int>(nam.length()); i<maxname; i++) nam.insert(i," ");
87 log << MSG::INFO << nam << " mean(t) : " << std::setw(12) << (*it)->mean()<<
88 " ms rms : " << std::setw(12) << (*it)->rms() << " ms " << endreq;
89 }
90 log << MSG::INFO << "------------------------------------------------------------------------------" << endreq;
91 it = m_itemList.begin();
92 for (; it != m_itemList.end(); it++) {
93 if (!(*it)->propName().empty()) {
94 std::string nam = (*it)->name();
95 for (unsigned int i = static_cast<int>(nam.length()); i<maxname; i++) nam.insert(i," ");
96 log << MSG::INFO << nam << " mean(t) : " << std::setw(12) << (*it)->mean()<<
97 " ms rms : " << std::setw(12) << (*it)->rms() << " ms " << endreq;
98
99 nam = (*it)->propName();
100 for (unsigned int i = static_cast<int>(nam.length()); i<maxname; i++) nam.insert(i," ");
101 if ((*it)->meanPropVal() == 0) {
102 log << MSG::INFO << nam << " mean(N) : " << std::setw(12) << endreq;
103 } else {
104 log << MSG::INFO << nam << " mean(N) : " << std::setw(12) << (*it)->meanPropVal() <<
105 " mean(t/N) : "
106 << 1000.*(*it)->meanTimePerObject() << " us " << endreq;
107 }
108 }
109 }
110
111 log << MSG::INFO << "==============================BesTimerSvc::Print===============================" << endreq;
112 }