CMS 3D CMS Logo

CTPPSPixelErrorSummary.cc
Go to the documentation of this file.
3 #include <iostream>
4 #include <algorithm>
5 
7  const auto eIt = m_errors.find(message);
8  if (eIt == m_errors.end()) {
9  m_errors.emplace(message, 1);
10  edm::LogError(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  ++(eIt->second);
16  if (m_debug) {
17  edm::LogError(m_category) << message << ": " << details;
18  }
19  }
20 }
21 
23  if (!m_errors.empty()) {
24  std::stringstream message;
25  message << m_name << " errors:";
26  for (const auto& warnAndCount : m_errors) {
27  message << std::endl << warnAndCount.first << " (" << warnAndCount.second << ")";
28  }
29  edm::LogError(m_category) << message.str();
30  }
31 }
std::map< std::string, std::size_t > m_errors
Log< level::Error, false > LogError
void add(const std::string &message, const std::string &details="")
Definition: helper.h:56