30 template <
typename FUN>
55 StatusCode sc = base_class::queryInterface( riid, ppvi );
61 return Status::NO_INTERFACE;
124 return jos->setMyProperties(
name(),
this );
137 }
else if (
Service* _svc = dynamic_cast<Service*>( _p ) ) {
139 }
else if (
AlgTool* _too = dynamic_cast<AlgTool*>( _p ) ) {
141 }
else if (
Auditor* _aud = dynamic_cast<Auditor*>( _p ) ) {
175 return attempt( *
this,
"sysInitialize", [&]() {
181 if ( !sc )
return sc;
189 if ( !h->objKey().empty() ) out.
emplace( h->fullKey() );
192 if ( !h->objKey().empty() && out.find( h->fullKey() ) != out.end() ) {
193 error() <<
"Explicit circular data dependency found for id " << h->fullKey() <<
endmsg;
198 if ( !sc )
return sc;
223 return attempt( *
this,
"sysStart", [&]() {
245 return attempt( *
this,
"sysStop", [&]() {
267 return attempt( *
this,
"sysFinalize", [&]() {
291 error() <<
"sysReinitialize(): cannot reinitialize tool not initialized" <<
endmsg;
295 return attempt( *
this,
"SysReinitialize()", [&]() {
332 error() <<
"sysRestart(): cannot reinitialize tool not started" <<
endmsg;
336 return attempt( *
this,
"sysRestart", [&]() {
352 error() <<
"restart(): cannot be stopped" <<
endmsg;
357 error() <<
"restart(): cannot be started" <<
endmsg;
372 if ( !th->isEnabled() ) {
374 debug() <<
"ToolHandle " << th->typeAndName() <<
" not used" <<
endmsg;
378 auto sc = th->retrieve();
383 auto* tool = th->get();
385 debug() <<
"Adding " << ( th->isPublic() ?
"public" :
"private" ) <<
" ToolHandle tool " << tool->
name() <<
" (" 392 debug() <<
"Registering all Tools in ToolHandleArray " << thArr->propertyName() <<
endmsg;
394 for (
auto toolHandle : thArr->getBaseArray() ) {
396 BaseToolHandle* bth = dynamic_cast<BaseToolHandle*>( toolHandle );
400 error() <<
"Error retrieving Tool " << toolHandle->typeAndName() <<
" in ToolHandleArray " 401 << thArr->propertyName() <<
". Not registered" <<
endmsg;
427 return helper.
getService( svcName, createIf, iid, ppSvc );
432 void** ppSvc )
const {
457 for (
auto tool :
tools() ) vis->
visit( dynamic_cast<AlgTool*>( tool ) );
std::vector< Gaudi::DataHandle * > inputHandles() const override
Definition of the MsgStream class used to transmit messages.
an helper to share the implementation of service() among the various kernel base classes
Define general base for Gaudi exception.
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
Implementation of property with value of concrete type.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
SmartIF< IService > service(std::string_view name, const bool quiet=false, const bool createIf=true) const
virtual const std::string & tag() const
name tag for the exception, or exception type
constexpr static const auto SUCCESS
void initDataHandleHolder()
initializes all handles - called by the sysInitialize method of any descendant of this
Data provider interface definition.
TYPE * get() const
Get interface pointer.
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
StatusCode getService(std::string_view name, bool createIf, const InterfaceID &iid, void **ppSvc) const
virtual void visit(const IDataHandleHolder *)=0
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
DataObjIDColl m_inputDataObjs
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Main interface for the JobOptions service.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
virtual bool hasProperty(const std::string &name) const =0
Return true if we have a property with the given name.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
State GAUDI_API ChangeState(const Transition transition, const State state)
Function to get the new state according to the required transition, checking if the transition is all...
StatusCode createService(std::string_view name, const InterfaceID &iid, void **ppSvc) const
Base class from which all concrete algorithm classes should be derived.
constexpr static const auto FAILURE
const Gaudi::Algorithm & parent
bool assign(const Details::PropertyBase &source) override
get the value from another property
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
The interface implemented by the IAuditorSvc base class.
Base class for all services.
virtual void undeclareAll(const IInterface *owner)=0
Undeclare monitoring information.
std::vector< Gaudi::DataHandle * > outputHandles() const override
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
DataObjIDColl m_outputDataObjs
Base class from which all concrete auditor classes should be derived.