Main Page
Namespaces
Classes
Package Documentation
FWCore
MessageLogger
interface
MessageSender.h
Go to the documentation of this file.
1
#ifndef FWCore_MessageLogger_MessageSender_h
2
#define FWCore_MessageLogger_MessageSender_h
3
4
#include "
FWCore/MessageLogger/interface/ELstring.h
"
5
#include "
FWCore/MessageLogger/interface/ELseverityLevel.h
"
6
#include "
FWCore/MessageLogger/interface/ErrorObj.h
"
7
8
#include <memory>
9
10
#include <map>
11
12
// Change log
13
//
14
// 1 mf 8/25/08 error summary information for LoggedErrorsSummary()
15
//
16
// 2 mf 6/22/09 add severity to LoggedErrorsSummary by using
17
// ErrorSummaryEntry as map key
18
//
19
// 3 wmtan 6/22/11 Hold the ErrorObj with a shared pointer with a custom deleter.
20
// The custom deleter takes over the function of the message sending from the MessageSender destructor.
21
// This allows MessageSender to be copyable, which fixes the clang compilation errors.
22
23
24
namespace
edm
25
{
26
27
class
MessageSender
28
{
29
struct
ErrorObjDeleter
{
30
ErrorObjDeleter
() {}
31
void
operator()
(
ErrorObj
* errorObjPtr);
32
};
33
34
public
:
35
// --- birth/death:
36
MessageSender
() :
errorobj_p
() {}
37
MessageSender
(
ELseverityLevel
const
& sev,
38
ELstring
const
&
id
,
39
bool
verbatim =
false
,
bool
suppressed =
false
);
40
~MessageSender
();
41
42
// --- stream out the next part of a message:
43
template
<
class
T >
44
MessageSender
&
45
operator<<
(
T
const
&
t
)
46
{
47
if
(
valid
()) (*errorobj_p) <<
t
;
48
return
*
this
;
49
}
50
51
bool
valid
() {
52
return
errorobj_p
!= 0;
53
}
54
55
private
:
56
// data:
57
std::shared_ptr<ErrorObj>
errorobj_p
;
58
59
};
// MessageSender
60
61
62
}
// namespace edm
63
64
65
#endif // FWCore_MessageLogger_MessageSender_h
edm::MessageSender::MessageSender
MessageSender()
Definition:
MessageSender.h:36
edm::MessageSender::operator<<
MessageSender & operator<<(T const &t)
Definition:
MessageSender.h:45
ErrorObj.h
edm::ErrorObj
Definition:
ErrorObj.h:48
ELseverityLevel.h
edm::MessageSender::ErrorObjDeleter::ErrorObjDeleter
ErrorObjDeleter()
Definition:
MessageSender.h:30
edm::MessageSender::errorobj_p
std::shared_ptr< ErrorObj > errorobj_p
Definition:
MessageSender.h:57
edm::MessageSender::ErrorObjDeleter::operator()
void operator()(ErrorObj *errorObjPtr)
Definition:
MessageSender.cc:99
edm::MessageSender::~MessageSender
~MessageSender()
Definition:
MessageSender.cc:149
edm::MessageSender::valid
bool valid()
Definition:
MessageSender.h:51
ELstring.h
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::MessageSender::ErrorObjDeleter
Definition:
MessageSender.h:29
lumiQTWidget.t
t
Definition:
lumiQTWidget.py:50
edm::ELseverityLevel
Definition:
ELseverityLevel.h:103
T
long double T
Definition:
Basic3DVectorLD.h:57
edm::ELstring
std::string ELstring
Definition:
ELstring.h:26
edm::MessageSender
Definition:
MessageSender.h:27
Generated for CMSSW Reference Manual by
1.8.11