Main Page
Namespaces
Classes
Package Documentation
DQM
HcalCommon
interface
Logger.h
Go to the documentation of this file.
1
#ifndef Logger_h
2
#define Logger_h
3
4
#include "
DQM/HcalCommon/interface/HcalCommonHeaders.h
"
5
6
class
Logger
7
{
8
public
:
9
Logger
(
std::string
const
&
name
,
int
debug
=0) :
10
_name
(name),
_debug
(
debug
)
11
{}
12
Logger
() {}
13
virtual
~Logger
() {}
14
15
inline
void
dqmthrow
(
std::string
const
&
msg
)
const
16
{
17
throw
cms::Exception
(
"HCALDQM"
) <<
_name
<<
"::"
18
<<
msg
;
19
}
20
inline
void
warn
(
std::string
const
&
msg
)
const
21
{
22
edm::LogWarning
(
"HCALDQM"
) <<
_name
<<
"::"
<<
msg
;
23
}
24
inline
void
info
(
std::string
const
&
msg
)
const
25
{
26
if
(
_debug
==0)
27
return
;
28
edm::LogInfo
(
"HCALDQM"
) <<
_name
<<
"::"
<<
msg
;
29
}
30
template
<
typename
STDTYPE>
31
inline
void
debug
(STDTYPE
const
&
msg
)
const
32
{
33
if
(
_debug
==0)
34
return
;
35
36
std::cout
<<
"%MSG"
<< std::endl;
37
std::cout
<<
"$MSG-d HCALDQM::"
<<
_name
<<
"::"
<<
msg
;
38
std::cout
<< std::endl;
39
}
40
41
inline
void
set
(
std::string
const
&
name
,
int
debug
=0)
42
{
43
_name
=
name
;
44
_debug
=
debug
;
45
46
if
(debug==0)
47
return
;
48
49
this->
debug
(
"Setting up Logger for "
+
_name
);
50
}
51
52
protected
:
53
std::string
_name
;
54
int
_debug
;
55
};
56
57
#endif
58
59
60
Logger
Definition:
Logger.h:6
Logger::warn
void warn(std::string const &msg) const
Definition:
Logger.h:20
Exception
Definition:
hltDiff.cc:292
Logger::_debug
int _debug
Definition:
Logger.h:54
Logger::~Logger
virtual ~Logger()
Definition:
Logger.h:13
Logger::debug
void debug(STDTYPE const &msg) const
Definition:
Logger.h:31
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
edm::LogWarning
Definition:
MessageLogger.h:142
Logger::info
void info(std::string const &msg) const
Definition:
Logger.h:24
Logger::Logger
Logger()
Definition:
Logger.h:12
Logger::dqmthrow
void dqmthrow(std::string const &msg) const
Definition:
Logger.h:15
edm::LogInfo
Definition:
MessageLogger.h:238
Logger::_name
std::string _name
Definition:
Logger.h:53
HcalCommonHeaders.h
mps_check.msg
tuple msg
Definition:
mps_check.py:277
gather_cfg.cout
cout
Definition:
gather_cfg.py:143
dataset.name
name
Definition:
dataset.py:45
Logger::Logger
Logger(std::string const &name, int debug=0)
Definition:
Logger.h:9
Generated for CMSSW Reference Manual by
1.8.11