Go to the documentation of this file.
79 long increment( std::string_view
object ) {
return ++
get(
object ); }
81 long decrement( std::string_view
object ) {
return --
get(
object ); }
83 long counts( std::string_view
object ) {
return get(
object ); }
89 for (
const auto& entry : m_map ) {
91 std::cout <<
"GaudiTool WARNING " << m_message <<
"'" << entry.first <<
"' Counts = " << entry.second
101 auto i = m_map.find(
which );
102 if ( i == m_map.end() ) i = m_map.emplace(
which,
long{} ).first;
115 static Counter s_InstanceCounter(
" Create/Destroy (mis)balance " );
122 static Counter s_FinalizeCounter(
" Initialize/Finalize (mis)balance " );
150 GaudiToolLocal::s_InstanceCounter.increment(
m_local );
165 GaudiToolLocal::s_FinalizeCounter.increment(
m_local );
190 GaudiToolLocal::s_FinalizeCounter.decrement(
m_local );
201 bool ownedByToolSvc =
false;
202 unsigned int sanityCheck( 0 );
203 while (
tool && ++sanityCheck < 99999 ) {
204 ownedByToolSvc = (
nullptr !=
dynamic_cast<const IToolSvc*
>(
tool->parent() ) );
205 if ( ownedByToolSvc ) {
break; }
209 return ownedByToolSvc;
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
TOOL * tool(std::string_view type, std::string_view name, const IInterface *parent=0, bool create=true) const
Useful method for the easy location of tools.
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode initialize() override
standard initialization method
StatusCode finalize() override
standard finalization method