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/ELseverityLevel.h
"
5
#include "
FWCore/MessageLogger/interface/ErrorObj.h
"
6
7
#include <memory>
8
9
#include <map>
10
11
namespace
edm
{
12
13
class
MessageSender
{
14
struct
ErrorObjDeleter
{
15
ErrorObjDeleter
() {}
16
void
operator()
(
ErrorObj
* errorObjPtr);
17
};
18
19
public
:
20
// --- birth/death:
21
MessageSender
() =
default
;
22
MessageSender
(
ELseverityLevel
const
& sev, std::string_view
id
,
bool
verbatim =
false
,
bool
suppressed =
false
);
23
MessageSender
(
MessageSender
&&) =
default
;
24
MessageSender
(
MessageSender
const
&) =
default
;
25
MessageSender
&
operator=
(
MessageSender
&&) =
default
;
26
MessageSender
&
operator=
(
MessageSender
const
&) =
default
;
27
~MessageSender
();
28
29
// --- stream out the next part of a message:
30
template
<
class
T>
31
MessageSender
&
operator<<
(
T
const
&
t
) {
32
if
(
valid
())
33
(*errorobj_p) <<
t
;
34
return
*
this
;
35
}
36
37
template
<
typename
... Args>
38
MessageSender
&
format
(std::string_view fmt, Args
const
&...
args
) {
39
if
(
valid
())
40
errorobj_p
->format(fmt,
args
...);
41
return
*
this
;
42
}
43
44
bool
valid
()
const
noexcept {
return
errorobj_p
!=
nullptr
; }
45
46
private
:
47
// data:
48
std::shared_ptr<ErrorObj>
errorobj_p
;
49
50
};
// MessageSender
51
52
}
// namespace edm
53
54
#endif // FWCore_MessageLogger_MessageSender_h
writedatasetfile.args
args
Definition:
writedatasetfile.py:18
edm::MessageSender::format
MessageSender & format(std::string_view fmt, Args const &... args)
Definition:
MessageSender.h:38
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ErrorObj
Definition:
ErrorObj.h:43
edm::MessageSender::operator<<
MessageSender & operator<<(T const &t)
Definition:
MessageSender.h:31
edm::MessageSender::valid
bool valid() const noexcept
Definition:
MessageSender.h:44
ErrorObj.h
watchdog.const
const
Definition:
watchdog.py:83
edm::MessageSender::~MessageSender
~MessageSender()
Definition:
MessageSender.cc:139
edm::MessageSender::ErrorObjDeleter::operator()
void operator()(ErrorObj *errorObjPtr)
Definition:
MessageSender.cc:93
edm::MessageSender::ErrorObjDeleter::ErrorObjDeleter
ErrorObjDeleter()
Definition:
MessageSender.h:15
edm::MessageSender::ErrorObjDeleter
Definition:
MessageSender.h:14
edm::MessageSender
Definition:
MessageSender.h:13
ELseverityLevel.h
edm::MessageSender::operator=
MessageSender & operator=(MessageSender &&)=default
edm::ELseverityLevel
Definition:
ELseverityLevel.h:26
T
long double T
Definition:
Basic3DVectorLD.h:48
edm::MessageSender::MessageSender
MessageSender()=default
edm::MessageSender::errorobj_p
std::shared_ptr< ErrorObj > errorobj_p
Definition:
MessageSender.h:48
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
Generated for CMSSW Reference Manual by
1.8.16