7 #include "GaudiKernel/IInterface.h"
8 #include "GaudiKernel/IProperty.h"
9 #include "GaudiKernel/IAlgorithm.h"
10 #include "GaudiKernel/IAlgTool.h"
11 #include "GaudiKernel/SmartIF.h"
12 #include "GaudiKernel/DataObject.h"
16 #include "GaudiAlg/GaudiAlgorithm.h"
17 #include "GaudiAlg/GaudiTool.h"
21 #include "GaudiPython/AlgDecorators.h"
40 const std::string&
type ,
41 const std::string& name ,
45 if ( 0 == alg ) {
return 0 ; }
46 return alg -> tool<IAlgTool> (
type , name , parent , create ) ;
59 const std::string& typeAndName ,
63 if ( 0 == alg ) {
return 0 ; }
64 return alg->
tool<
IAlgTool>( typeAndName , parent , create ) ;
76 const std::string& name ,
79 if ( 0 == alg ) {
return 0 ; }
80 return alg -> svc<IInterface> ( name , create ) ;
87 std::vector<std::string>&
names ,
90 typedef std::map<std::string,StatEntity> Stats ;
93 if ( 0 == alg ) {
return 0 ; }
95 const Stats& counters = alg->
counters() ;
96 for ( Stats::const_iterator icnt = counters.begin() ;
97 counters.end() != icnt ; ++icnt )
99 names.push_back ( icnt->first ) ;
100 out .push_back ( &(icnt->second) ) ;
109 std::vector<std::string>& names ,
112 typedef std::map<std::string,StatEntity> Stats ;
115 if ( 0 == alg ) {
return 0 ; }
117 const Stats& counters = alg->
counters() ;
118 for ( Stats::const_iterator icnt = counters.begin() ;
119 counters.end() != icnt ; ++icnt )
121 names.push_back ( icnt->first ) ;
122 out .push_back ( &(icnt->second) ) ;
131 std::vector<std::string>& names ,
136 if ( 0 == alg ) {
return 0 ; }
138 return _counters_a_ ( dynamic_cast<const GaudiAlgorithm*>( alg ) , names , out ) ;
145 std::vector<std::string>& names ,
150 if ( 0 == alg ) {
return 0 ; }
152 return _counters_t_ ( dynamic_cast<const GaudiTool*>( alg ) , names , out ) ;
160 if ( 0 == cmp ) {
return 0 ; }
161 return &( cmp -> counter ( name ) ) ;
169 if ( 0 == cmp ) {
return 0 ; }
170 return &( cmp -> counter ( name ) ) ;
178 if ( 0 == cmp ) {
return 0 ; }
179 return _counter_a_ ( dynamic_cast<const GaudiAlgorithm*>( cmp ) , name ) ;
187 if ( 0 == cmp ) {
return 0 ; }
188 return _counter_t_ ( dynamic_cast<const GaudiTool*>( cmp ) , name ) ;
197 if ( 0 == cmp ) {
return 0 ; }
198 tools = cmp->
tools() ;
199 return tools.size() ;
208 if ( 0 == cmp ) {
return 0 ; }
209 tools = cmp->
tools() ;
210 return tools.size() ;
219 if ( 0 == cmp ) {
return 0 ; }
220 return _tools_a_ ( dynamic_cast<const GaudiAlgorithm*> ( cmp ) , tools ) ;
229 if ( 0 == cmp ) {
return 0 ; }
230 return _tools_t_ ( dynamic_cast<const GaudiTool*> ( cmp ) , tools ) ;
242 const std::string& location ,
243 const bool useRootInTes )
245 if ( 0 == alg ) {
return false ; }
246 return alg -> exist<DataObject> ( alg->
evtSvc() , location , useRootInTes ) ;
258 const std::string& location ,
259 const bool useRootInTes )
261 if ( 0 == alg ) {
return 0 ; }