File indexing completed on 2024-04-06 12:03:51
0001 #ifndef DataFormats_Common_ErrorSummaryEntry_h
0002 #define DataFormats_Common_ErrorSummaryEntry_h
0003
0004 #include "DataFormats/Common/interface/ELseverityLevel.h"
0005
0006 #include <string>
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 namespace edm {
0036 struct ErrorSummaryEntry {
0037 std::string category;
0038 std::string module;
0039 ELseverityLevel severity;
0040 unsigned int count;
0041 ErrorSummaryEntry(std::string const& cat, std::string const& mod, ELseverityLevel sev, unsigned int cnt = 0)
0042 : category(cat), module(mod), severity(sev), count(cnt) {}
0043 ErrorSummaryEntry() : category(), module(), severity(), count(0) {}
0044 bool operator<(ErrorSummaryEntry const& rhs) const {
0045 if (category < rhs.category)
0046 return true;
0047 if (category > rhs.category)
0048 return false;
0049 if (module < rhs.module)
0050 return true;
0051 if (module > rhs.module)
0052 return false;
0053 if (severity < rhs.severity)
0054 return true;
0055 if (severity > rhs.severity)
0056 return false;
0057 if (count < rhs.count)
0058 return true;
0059 return false;
0060 }
0061 bool operator==(ErrorSummaryEntry const& rhs) const {
0062 return ((category < rhs.category) && (module < rhs.module) && (severity < rhs.severity) && (count < rhs.count));
0063 }
0064 };
0065 }
0066
0067 #endif