ATLAS Offline Software
Loading...
Searching...
No Matches
AsgMessaging.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Local include(s):
7
8// Gaudi/Athena include(s):
9#ifndef XAOD_STANDALONE
10# include "GaudiKernel/Bootstrap.h"
11# include "GaudiKernel/ISvcLocator.h"
12# include "GaudiKernel/IMessageSvc.h"
13#endif // not XAOD_STANDALONE
14
15namespace asg {
16
17 AsgMessaging::AsgMessaging( const std::string& name )
18 :
19#ifndef XAOD_STANDALONE
20 AthMessaging( Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc", false ),
21 name )
22#else // not XAOD_STANDALONE
23 m_msg( name )
24#endif // not XAOD_STANDALONE
25 {
26
27 }
28
29 AsgMessaging::AsgMessaging( const INamedInterface* tool )
30 :
31#ifndef XAOD_STANDALONE
32 AthMessaging( Gaudi::svcLocator()->service< IMessageSvc >( "MessageSvc", false ),
33 tool->name() )
34#else // not XAOD_STANDALONE
35 m_msg( tool )
36#endif // not XAOD_STANDALONE
37 {
38
39 }
40
41 bool AsgMessaging::msgLvl( const MSG::Level lvl ) const {
42#ifndef XAOD_STANDALONE
43 return ::AthMessaging::msgLvl( lvl );
44#else // not XAOD_STANDALONE
45 return m_msg.msgLevel( lvl );
46#endif // not XAOD_STANDALONE
47 }
48
49 MsgStream& AsgMessaging::msg() const {
50#ifndef XAOD_STANDALONE
51 return ::AthMessaging::msg();
52#else // not XAOD_STANDALONE
53 return m_msg;
54#endif // not XAOD_STANDALONE
55 }
57 MsgStream& AsgMessaging::msg( const MSG::Level lvl ) const {
58#ifndef XAOD_STANDALONE
59 return ::AthMessaging::msg( lvl );
60#else // not XAOD_STANDALONE
61 m_msg << lvl;
62 return m_msg;
63#endif // not XAOD_STANDALONE
64 }
65
66} // namespace asg
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
MsgStream & msg() const
The standard message stream.
AsgMessaging(const std::string &name)
Constructor with a name.
bool msgLvl(const MSG::Level lvl) const
Test the output level of the object.
=============================================================================