Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
FWCore
MessageLogger
interface
ErrorSummaryEntry.h
Go to the documentation of this file.
1
#ifndef MessageLogger_ErrorSummaryEntry_h
2
#define MessageLogger_ErrorSummaryEntry_h
3
4
#include "
FWCore/MessageLogger/interface/ELseverityLevel.h
"
5
6
#include <string>
7
8
// ----------------------------------------------------------------------
9
//
10
// ErrorSummaryEntry.h - Structure to hold summary of a warning or error
11
// message issued in an event.
12
//
13
// Usage:
14
// if (edm::FreshErrorsExist()) {
15
// std::vector(edm::ErrorSummaryEntry es = edm::LoggedErrorsSummary();
16
// package_as_product_in_the_event (es);
17
// }
18
//
19
// edm::ErrorSummaryEntry is a very simple struct, containing only strings
20
// and an int; it is very suitable for inclusion in the event.
21
//
22
// Unusual C++ practice warning:
23
// edm::ErrorSummaryEntry is a simple struct; its members are public and
24
// are accessed directly rather than through accessor functions. Thus it
25
// **is reasonable** in this case to treat the code defining the
26
// edm::ErrorSummaryEntry as documentation of how to use it.
27
//
28
// 20-Aug-2008 mf Created file.
29
//
30
// 22-Jun-2009 mf Added severity to the structure. This adds just one
31
// integer to the memory used.
32
//
33
// ----------------------------------------------------------------------
34
35
namespace
edm {
36
37
struct
ErrorSummaryEntry
38
{
39
std::string
category
;
40
std::string
module
;
41
ELseverityLevel
severity
;
42
unsigned
int
count
;
43
ErrorSummaryEntry
(
std::string
const
& cat,
std::string
const
&
mod
,
44
ELseverityLevel
sev,
unsigned
int
cnt = 0)
45
:
category
(cat)
46
,
module
(mod)
47
,
severity
(sev)
48
,
count
(cnt) {}
49
ErrorSummaryEntry
() :
category
(),
module
(),
severity
(),
count
(0) {}
50
bool
operator<
(
ErrorSummaryEntry
const
& rhs)
const
{
51
if
(
category
< rhs.
category
)
return
true
;
52
if
(
category
> rhs.
category
)
return
false
;
53
if
(
module
< rhs.
module
)
return
true
;
54
if
(
module
> rhs.
module
)
return
false
;
55
if
(
severity
< rhs.
severity
)
return
true
;
56
if
(
severity
> rhs.
severity
)
return
false
;
57
if
(
count
< rhs.
count
)
return
true
;
58
return
false
;
59
}
60
bool
operator==
(
ErrorSummaryEntry
const
& rhs)
const
{
61
return
( (
category
< rhs.
category
) && (
module
< rhs.
module
)
62
&& (
severity
< rhs.
severity
) && (
count
< rhs.
count
) );
63
}
64
};
65
66
}
// end of namespace edm
67
68
69
#endif // MessageLogger_ErrorSummaryEntry_h
70
edm::ErrorSummaryEntry::ErrorSummaryEntry
ErrorSummaryEntry()
Definition:
ErrorSummaryEntry.h:49
ELseverityLevel.h
edm::ErrorSummaryEntry::severity
ELseverityLevel severity
Definition:
ErrorSummaryEntry.h:41
edm::ErrorSummaryEntry::operator==
bool operator==(ErrorSummaryEntry const &rhs) const
Definition:
ErrorSummaryEntry.h:60
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
edm::ErrorSummaryEntry::count
unsigned int count
Definition:
ErrorSummaryEntry.h:42
edm::ErrorSummaryEntry::operator<
bool operator<(ErrorSummaryEntry const &rhs) const
Definition:
ErrorSummaryEntry.h:50
edm::ErrorSummaryEntry::category
std::string category
Definition:
ErrorSummaryEntry.h:39
edm::ErrorSummaryEntry::module
std::string module
Definition:
ErrorSummaryEntry.h:40
edm::ELseverityLevel
Definition:
ELseverityLevel.h:103
mod
T mod(const T &a, const T &b)
Definition:
ecalDccMap.h:4
module
Definition:
vlib.h:208
edm::ErrorSummaryEntry::ErrorSummaryEntry
ErrorSummaryEntry(std::string const &cat, std::string const &mod, ELseverityLevel sev, unsigned int cnt=0)
Definition:
ErrorSummaryEntry.h:43
edm::ErrorSummaryEntry
Definition:
ErrorSummaryEntry.h:37
Generated for CMSSW Reference Manual by
1.8.5