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