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 }
std::map< std::string, std::size_t > m_warnings
Definition: helper.h:56
void add(const std::string &message, const std::string &details="")
Log< level::Warning, false > LogWarning