ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaBaseComps
src
AthMessaging.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// AthMessaging.cxx
6
// Implementation file for class AthMessaging
7
// Author: S.Binet<binet@cern.ch>, Frank Winklmeier
9
10
#include "
AthenaBaseComps/AthMessaging.h
"
11
#include "
AthenaKernel/getMessageSvc.h
"
12
13
AthMessaging::AthMessaging
(IMessageSvc* msgSvc,
14
const
std::string& name) :
15
m_nm
(name),
m_imsg
(msgSvc)
16
{}
17
18
19
AthMessaging::AthMessaging
(
const
std::string& name) :
20
m_nm
(name)
21
{}
22
23
24
AthMessaging::~AthMessaging
()
25
{}
26
27
28
void
AthMessaging::setLevel
(MSG::Level lvl)
29
{
30
m_lvl
= lvl;
31
}
32
33
39
void
AthMessaging::initMessaging
()
const
40
{
41
m_imsg
=
Athena::getMessageSvc
();
42
// If user did not set an explicit level, set a default
43
if
(
m_lvl
== MSG::NIL) {
44
m_lvl
=
m_imsg
?
45
static_cast<
MSG::Level
>
(
m_imsg
.load()->outputLevel(
m_nm
) ) :
46
MSG::INFO;
47
}
48
}
AthMessaging.h
AthMessaging::setLevel
void setLevel(MSG::Level lvl)
Change the current logging level.
Definition
AthMessaging.cxx:28
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition
AthMessaging.h:129
AthMessaging::AthMessaging
AthMessaging()
Default constructor:
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition
AthMessaging.h:135
AthMessaging::~AthMessaging
virtual ~AthMessaging()
Destructor:
Definition
AthMessaging.cxx:24
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition
AthMessaging.h:138
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition
AthMessaging.cxx:39
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
Generated on
for ATLAS Offline Software by
1.17.0