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
public
:
8
Logger
(
std::string
const
&
name
,
int
debug
= 0) :
_name
(name),
_debug
(
debug
) {}
9
Logger
() {}
10
virtual
~Logger
() {}
11
12
inline
void
dqmthrow
(
std::string
const
&
msg
)
const
{
throw
cms::Exception
(
"HCALDQM"
) <<
_name
<<
"::"
<<
msg
; }
13
inline
void
warn
(
std::string
const
&
msg
)
const
{
edm::LogWarning
(
"HCALDQM"
) <<
_name
<<
"::"
<<
msg
; }
14
inline
void
info
(
std::string
const
&
msg
)
const
{
15
if
(
_debug
== 0)
16
return
;
17
edm::LogInfo
(
"HCALDQM"
) <<
_name
<<
"::"
<<
msg
;
18
}
19
template
<
typename
STDTYPE>
20
inline
void
debug
(STDTYPE
const
&
msg
)
const
{
21
if
(
_debug
== 0)
22
return
;
23
24
std::cout
<<
"%MSG"
<< std::endl;
25
std::cout
<<
"$MSG-d HCALDQM::"
<<
_name
<<
"::"
<<
msg
;
26
std::cout
<< std::endl;
27
}
28
29
inline
void
set
(
std::string
const
&
name
,
int
debug
= 0) {
30
_name
=
name
;
31
_debug
=
debug
;
32
33
if
(debug == 0)
34
return
;
35
36
this->
debug
(
"Setting up Logger for "
+
_name
);
37
}
38
39
protected
:
40
std::string
_name
;
41
int
_debug
;
42
};
43
44
#endif
Logger
Definition:
Logger.h:6
Logger::warn
void warn(std::string const &msg) const
Definition:
Logger.h:13
Exception
Definition:
hltDiff.cc:292
Logger::_debug
int _debug
Definition:
Logger.h:41
Logger::~Logger
virtual ~Logger()
Definition:
Logger.h:10
Logger::debug
void debug(STDTYPE const &msg) const
Definition:
Logger.h:20
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogWarning
Definition:
MessageLogger.h:141
Logger::info
void info(std::string const &msg) const
Definition:
Logger.h:14
Logger::Logger
Logger()
Definition:
Logger.h:9
Logger::dqmthrow
void dqmthrow(std::string const &msg) const
Definition:
Logger.h:12
edm::LogInfo
Definition:
MessageLogger.h:254
Logger::_name
std::string _name
Definition:
Logger.h:40
HcalCommonHeaders.h
mps_check.msg
tuple msg
Definition:
mps_check.py:285
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
dataset.name
name
Definition:
dataset.py:45
Logger::Logger
Logger(std::string const &name, int debug=0)
Definition:
Logger.h:8
Generated for CMSSW Reference Manual by
1.8.11