ATLAS Offline Software
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 
15 namespace 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
52 #else // not XAOD_STANDALONE
53  return m_msg;
54 #endif // not XAOD_STANDALONE
55  }
56 
57  MsgStream& AsgMessaging::msg( const MSG::Level lvl ) const {
58 #ifndef XAOD_STANDALONE
60 #else // not XAOD_STANDALONE
61  m_msg << lvl;
62  return m_msg;
63 #endif // not XAOD_STANDALONE
64  }
65 
66 } // namespace asg
asg::AsgMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level of the object.
Definition: AsgMessaging.cxx:41
asg
Definition: DataHandleTestTool.h:28
asg::AsgMessaging::AsgMessaging
AsgMessaging(const std::string &name)
Constructor with a name.
Definition: AsgMessaging.cxx:17
AsgMessaging.h
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
asg::AsgMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AsgMessaging.cxx:49
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7