11 #ifndef GAUDIALG_GAUDICOMMONIMP_H 
   12 #define GAUDIALG_GAUDICOMMONIMP_H 1 
   33 template <
class PBASE>
 
   38   Assert( service, 
"get():: IDataProvider* points to NULL!" );
 
   41   return getter( *
this, service, this->
fullTESLocation( location, useRootInTES ) );
 
   46 template <
class PBASE>
 
   51   Assert( service, 
"get():: IDataProvider* points to NULL!" );
 
   54   return getter( *
this, service, this->
fullTESLocation( location, useRootInTES ), 
false );
 
   59 template <
class PBASE>
 
   63   Assert( service, 
"exist():: IDataProvider* points to NULL!" );
 
   66   return checker( service, this->
fullTESLocation( location, useRootInTES ) );
 
   73 template <
class PBASE>
 
   74 template <
class TYPE, 
class TYPE2>
 
   78   Assert( service, 
"getOrCreate():: svc points to NULL!" );
 
   86 template <
class PBASE>
 
   91   if ( 
name.empty() ) 
return tool<TOOL>( 
type, parent, create );
 
   92   Assert( this->toolSvc(), 
"tool():: IToolSvc* points to NULL!" );
 
   95   const StatusCode sc   = this->toolSvc()->retrieveTool( 
type, 
name, Tool, parent, create );
 
  106   PBASE::registerTool( Tool );
 
  107   m_managedTools.push_back( Tool );
 
  114 template <
class PBASE>
 
  115 template <
class TOOL>
 
  118   Assert( PBASE::toolSvc(), 
"IToolSvc* points to NULL!" );
 
  120   TOOL*            Tool = 
nullptr;
 
  121   const StatusCode sc   = this->toolSvc()->retrieveTool( 
type, Tool, parent, create );
 
  125   if ( !Tool ) { Exception( 
std::string{ 
"tool():: Could not retrieve Tool '" }.
append( 
type ).append( 
"'" ) ); }
 
  127   PBASE::registerTool( Tool );
 
  128   m_managedTools.push_back( Tool );
 
  135 template <
class PBASE>
 
  136 template <
class SERVICE>
 
  138   Assert( this->svcLoc(), 
"ISvcLocator* points to NULL!" );
 
  150     auto baseSvc = this->svcLoc()->service( 
name, create );
 
  154     if ( !baseSvc || !
s ) {
 
  158     addToServiceList( baseSvc );
 
  166 template <
class PBASE>
 
  168   if ( !m_updMgrSvc ) { m_updMgrSvc = svc<IUpdateManagerSvc>( 
"UpdateManagerSvc", 
true ); }
 
  174 template <
class PBASE>
 
  176   if ( !ok ) Exception( 
msg, sc );
 
  193 #define ALG_ERROR( message, code )                                                                                     \ 
  194   ( Error( message + std::string( " [ at line " ) + std::to_string( __LINE__ ) + std::string( " in file '" ) +         \ 
  195                std::string( __FILE__ ) + "']",                                                                         \ 
  201 #endif // GAUDIALG_GAUDICOMMONIMP_H