6 #include "GaudiKernel/IChronoStatSvc.h"
7 #include "GaudiKernel/IIncidentSvc.h"
8 #include "GaudiKernel/IDataProviderSvc.h"
9 #include "GaudiKernel/IHistogramSvc.h"
10 #include "GaudiKernel/INTupleSvc.h"
11 #include "GaudiKernel/IAlgContextSvc.h"
12 #include "GaudiKernel/Bootstrap.h"
16 #include "GaudiAlg/GaudiTool.h"
17 #include "GaudiAlg/GaudiAlgorithm.h"
66 : m_message (
std::move(
msg) )
74 long increment (
const std::string&
object ) {
return ++m_map[object] ; }
76 long decrement (
const std::string&
object ) {
return --m_map[object] ; }
78 long counts (
const std::string&
object ) {
return m_map[object] ; }
85 for (
const auto& entry : m_map )
88 std::cout <<
"GaudiTool WARNING " << m_message
89 <<
"'" << entry.first <<
"' Counts = " << entry.second
97 typedef std::map<std::string,long>
Map;
108 static Counter s_InstanceCounter (
" Create/Destroy (mis)balance " ) ;
115 static Counter s_FinalizeCounter (
" Initialize/Finalize (mis)balance " ) ;
139 const std::string& this_name ,
142 , m_local ( this_type +
"/" + this_name )
147 "The name of Algorithm Context Service" ) ;
182 debug() <<
" ==> Finalize the base class GaudiTool " <<
endmsg;
207 bool ownedByToolSvc =
false;
208 unsigned int sanityCheck(0);
209 while ( tool && ++sanityCheck < 99999 )
211 ownedByToolSvc = (
nullptr !=
dynamic_cast<const IToolSvc*
>(tool->
parent()) );
212 if ( ownedByToolSvc ) {
break; }
216 return ownedByToolSvc;
237 m_ntupleSvc = svc<INTupleSvc>(
"NTupleSvc" , true ) ;
248 m_evtColSvc = svc< INTupleSvc > (
"EvtTupleSvc" , true ) ;
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode finalize() override
standard finalization method
Data provider interface definition.
bool isFailure() const
Test for a status code of FAILURE.
The IChronoStatSvc is the interface implemented by the ChronoStatService.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
Definition of the IHistogramSvc interface class.
StatusCode initialize() override
standard initialization method
An abstract interface for Algorithm Context Service.
TOOL * tool(const std::string &type, const std::string &name, const IInterface *parent=0, bool create=true) const
Useful method for the easy location of tools.
The interface implemented by the IncidentSvc service.
MSG::Level msgLevel() const
get the output level from the embedded MsgStream