19#include <unordered_map>
21#ifndef XAOD_STANDALONE
22#include <GaudiKernel/Bootstrap.h>
23#include <GaudiKernel/ISvcLocator.h>
47 std::unordered_map<std::string,MsgStream>& packageMsgStreamMap ()
63 std::recursive_mutex& packageMsgMutex ()
65 static std::recursive_mutex
result;
70 MsgStream& MsgHelpers ::
71 pkgMsgStream (
const std::string& package)
73 std::lock_guard<std::recursive_mutex> lock {packageMsgMutex()};
74 auto iter = packageMsgStreamMap().find (package);
75 if (iter != packageMsgStreamMap().end())
78 const std::string fullName {
"Package." + package};
80 auto result = packageMsgStreamMap().emplace (package, fullName);
82 auto result = packageMsgStreamMap().emplace
83 (std::piecewise_construct,
84 std::forward_as_tuple (package),
88 return result.first->second;
94 setPkgMsgLevel (
const std::string& package, MSG::Level level)
96 std::lock_guard<std::recursive_mutex> lock {packageMsgMutex()};
103 printAllPkgMsgLevels ()
105 using namespace msgAsgMessaging;
106 std::lock_guard<std::recursive_mutex> lock {packageMsgMutex()};
108 for (
auto& msgStream : packageMsgStreamMap())
110 ANA_MSG_INFO (
" package=" << msgStream.first <<
" level=" << name (msgStream.second.level()) <<
"(" << unsigned (msgStream.second.level()) <<
")");
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
static MsgStream & pkgMsgStream(const std::string &package)
the message stream for the given package identifier