Go to the documentation of this file.
80 long increment( std::string_view
object ) {
return ++
get(
object ); }
82 long decrement( std::string_view
object ) {
return --
get(
object ); }
84 long counts( std::string_view
object ) {
return get(
object ); }
90 for (
const auto& entry : m_map ) {
92 std::cout <<
"GaudiTool WARNING " << m_message <<
"'" << entry.first <<
"' Counts = " << entry.second
102 auto i = m_map.find(
which );
103 if ( i == m_map.end() ) i = m_map.emplace(
which,
long{} ).first;
116 static Counter s_InstanceCounter(
" Create/Destroy (mis)balance " );
123 static Counter s_FinalizeCounter(
" Initialize/Finalize (mis)balance " );
151 GaudiToolLocal::s_InstanceCounter.increment(
m_local );
166 GaudiToolLocal::s_FinalizeCounter.increment(
m_local );
191 GaudiToolLocal::s_FinalizeCounter.decrement(
m_local );
202 bool ownedByToolSvc =
false;
203 unsigned int sanityCheck( 0 );
204 while (
tool && ++sanityCheck < 99999 ) {
205 ownedByToolSvc = (
nullptr !=
dynamic_cast<const IToolSvc*
>(
tool->parent() ) );
206 if ( ownedByToolSvc ) {
break; }
210 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.
GAUDI_API bool isEnvSet(const char *var)
Check if an environment variable is set or not.
StatusCode initialize() override
standard initialization method
StatusCode finalize() override
standard finalization method