24 const std::string& addition)
const;
26 void setMessage(
unsigned int messageNumber,
const std::string& message);
33 mutable std::vector<std::atomic<unsigned int> > m_warningCounts
36 std::vector<std::string>
48 m_warningCounts[messageNumber]++;
52 bool haveWarnings =
false;
53 for (
unsigned int i = 0; i < m_warningCounts.size(); ++i) {
54 if (!m_warningCounts[i])
62 std::stringstream out;
63 out <<
" summary of WARNING occurences (maximum shown during job: "
67 for (
unsigned int i = 0; i < m_warningCounts.size(); ++i) {
68 if (!m_warningCounts[i])
71 out <<
" " << m_warningCounts[i] <<
":\t" <<
m_warningText[i];
77 unsigned int count = ++m_warningCounts[messageNumber];
84 <<
"Limit reached. No more messages of this type will be printed."
89 const std::string& addition)
const {
90 unsigned int count = ++m_warningCounts[messageNumber];
98 <<
"Limit reached. No more messages of this type will be printed."
107 const std::string& message) {
108 if (messageNumber >= m_warningCounts.size())
110 m_warningCounts[messageNumber] = 0;
115 if (
m_parent.msgLvl(MSG::WARNING) &&
Define macros for attributes used to control the static checker.
void printSummary(void) const
const AthAlgTool & m_parent
void setMaxNumberOfMessagesPrinted(unsigned int num)
void setMessage(unsigned int messageNumber, const std::string &message)
MessageHelper(const AthAlgTool &parent, unsigned int num)
Pass to the constructor the number of messages.
void printWarning(unsigned int messageNumber) const
std::vector< std::string > m_warningText
The text for the WARNINGs (the index is the error number).
std::vector< std::atomic< unsigned int > > m_warningCounts ATLAS_THREAD_SAFE
The counts per error (the index is the error number)
void incrementCount(unsigned int messageNumber)
bool wouldPrintWarning(unsigned int messageNumber) const
unsigned int m_maxWarnings
Maximum number of WARNING messages permitted.
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string