6 #include "GaudiKernel/IInterface.h"
7 #include "GaudiKernel/IProperty.h"
8 #include "GaudiKernel/IAlgorithm.h"
9 #include "GaudiKernel/IAlgTool.h"
10 #include "GaudiKernel/SmartIF.h"
11 #include "GaudiKernel/DataObject.h"
15 #include "GaudiAlg/GaudiAlgorithm.h"
16 #include "GaudiAlg/GaudiTool.h"
20 #include "GaudiPython/AlgDecorators.h"
39 const std::string&
type ,
40 const std::string&
name ,
44 return alg ? alg -> tool<IAlgTool> (
type ,
name , parent , create ) :
nullptr;
57 const std::string& typeAndName ,
61 return alg ? alg->
tool<
IAlgTool>( typeAndName , parent , create ) :
nullptr;
73 const std::string& name ,
76 return alg ? alg -> svc<IInterface> (
name , create ) :
nullptr;
83 std::vector<std::string>& names ,
88 if ( !alg ) {
return 0 ; }
90 for (
const auto& cnt : alg->
counters() )
92 names.push_back ( cnt.first ) ;
93 out .push_back ( &cnt.second ) ;
102 std::vector<std::string>& names ,
107 if ( !alg ) {
return 0 ; }
109 for (
const auto& cnt : alg->
counters() )
111 names.push_back ( cnt.first ) ;
112 out .push_back ( &cnt.second ) ;
121 std::vector<std::string>& names ,
126 return alg ? _counters_a_ ( dynamic_cast<const GaudiAlgorithm*>( alg ) , names , out )
134 std::vector<std::string>& names ,
139 return alg ? _counters_t_ ( dynamic_cast<const GaudiTool*>( alg ) , names , out )
148 return cmp ? &( cmp ->
counter ( name ) ) :
nullptr;
156 return cmp ? &( cmp ->
counter ( name ) ) :
nullptr;
164 return cmp ? _counter_a_ ( dynamic_cast<const GaudiAlgorithm*>( cmp ) , name )
173 return cmp ? _counter_t_ ( dynamic_cast<const GaudiTool*>( cmp ) , name )
183 if ( cmp ) tools = cmp->tools() ;
184 return tools.size() ;
193 if ( cmp ) tools = cmp->tools() ;
194 return tools.size() ;
203 return cmp ? _tools_a_ ( dynamic_cast<const GaudiAlgorithm*> ( cmp ) , tools )
213 return cmp ? _tools_t_ ( dynamic_cast<const GaudiTool*> ( cmp ) , tools ) : 0;
225 const std::string& location ,
226 const bool useRootInTes )
228 return alg ? alg->
exist<
DataObject> ( alg->evtSvc() , location , useRootInTes )
241 const std::string& location ,
242 const bool useRootInTes )
244 return alg ? alg->
get<
DataObject> ( alg->evtSvc() , location , useRootInTes )
static size_t _counters_a_(const GaudiAlgorithm *alg, std::vector< std::string > &names, Counters &out)
static bool exist(const GaudiAlgorithm *alg, const std::string &location, const bool useRootInTes)
get the data from TES
static const StatEntity * _counter_t_(const GaudiTool *alg, const std::string &name)
static IInterface * svc_(const GaudiAlgorithm *alg, const std::string &name, const bool create=false)
get the service from GaudiAlgorithm
bool exist(IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
Check the existence of a data object or container in the Gaudi Transient Event Store.
const Statistics & counters() const
accessor to all counters
static size_t _counters_t_(const GaudiTool *alg, std::vector< std::string > &names, Counters &out)
static IAlgTool * tool_(const GaudiAlgorithm *alg, const std::string &type, const std::string &name, const IInterface *parent=0, const bool create=true)
get the tool from GaudiAlgorithm
std::vector< IAlgTool * > Tools
Definition of the basic interface.
static size_t _tools_t_(const GaudiTool *, Tools &tools)
The useful base class for data processing algorithms.
Gaudi::Utils::GetData< TYPE >::return_type get(IDataProviderSvc *svc, const std::string &location, const bool useRootInTES=true) const
Templated access to the data in Gaudi Transient Store.
static size_t _tools_a_(const GaudiAlgorithm *, Tools &tools)
The IAlgorithm is the interface implemented by the Algorithm base class.
std::vector< const StatEntity * > Counters
the actual type of vector of counters
static const StatEntity * _counter_a_(const GaudiAlgorithm *alg, const std::string &name)
static DataObject * get_(const GaudiAlgorithm *alg, const std::string &location, const bool useRootInTes)
get the data from TES
The basic counter used for Monitoring purposes.
A DataObject is the base class of any identifiable object on any data store.
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.