CMS 3D CMS Logo

WarningSummary.cc
Go to the documentation of this file.
3 
4 #include <algorithm>
5 
7  const auto wIt = m_warnings.find(message);
8  if (wIt == m_warnings.end()) {
9  m_warnings.emplace(message, 1);
10  edm::LogWarning(m_category) << message << ": " << details
11  << (m_debug ? ""
12  : "\nNote: further warnings of this type will be suppressed (this can be "
13  "changed by enabling debugging printout)");
14  } else {
15  ++(wIt->second);
16  if (m_debug) {
17  edm::LogWarning(m_category) << message << ": " << details;
18  }
19  }
20 }
21 
23  if (!m_warnings.empty()) {
24  std::stringstream message;
25  message << m_name << " warnings:";
26  for (const auto& warnAndCount : m_warnings) {
27  message << std::endl << warnAndCount.first << " (" << warnAndCount.second << ")";
28  }
29  edm::LogWarning(m_category) << message.str();
30  }
31 }
sistrip::WarningSummary::m_warnings
std::map< std::string, std::size_t > m_warnings
Definition: WarningSummary.h:20
MessageLogger.h
sistrip::WarningSummary::m_category
std::string m_category
Definition: WarningSummary.h:18
sistrip::WarningSummary::add
void add(const std::string &message, const std::string &details="")
Definition: WarningSummary.cc:6
sistrip::WarningSummary::printSummary
void printSummary() const
Definition: WarningSummary.cc:22
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
details
Definition: helper.h:56
sistrip::WarningSummary::m_debug
bool m_debug
Definition: WarningSummary.h:17
WarningSummary.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256