|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef MESSAGEHELPER_H
6 #define MESSAGEHELPER_H
24 const std::string& addition)
const;
33 mutable std::vector<std::atomic<unsigned int> > m_warningCounts
35 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])
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."
108 if (messageNumber >= m_warningCounts.size())
110 m_warningCounts[messageNumber] = 0;
void setMaxNumberOfMessagesPrinted(unsigned int num)
bool msgLvl(const MSG::Level lvl) const
void printSummary(void) const
std::vector< std::string > m_warningText
The text for the WARNINGs (the index is the error number).
const AthAlgTool & m_parent
std::vector< std::atomic< unsigned int > > m_warningCounts ATLAS_THREAD_SAFE
The counts per error (the index is the error number)
unsigned int m_maxWarnings
Maximum number of WARNING messages permitted.
bool wouldPrintWarning(unsigned int messageNumber) const
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
Define macros for attributes used to control the static checker.
void incrementCount(unsigned int messageNumber)