21 template <
typename FUN>
54 return item.first.versionMatch(riid);
143 return m_propertyMgr->getProperty(p);
156 return m_propertyMgr->getProperty(
n,v);
184 if(jos->setMyProperties(
name(),
this ).isFailure()) {
199 , m_parent ( parent )
215 if (
Algorithm* _alg = dynamic_cast<Algorithm*> ( _p ) )
220 else if (
Service* _svc = dynamic_cast<Service*> ( _p ) )
225 else if (
AlgTool* _too = dynamic_cast<AlgTool*> ( _p ) )
230 else if (
Auditor* _aud = dynamic_cast<Auditor*> ( _p ) )
238 (
"Failure to create tool '"
239 + type +
"/" + name +
"': illegal parent type '"
247 throw GaudiException(
"Could not locate ApplicationMgr",
"AlgTool",0);
273 return attempt( *
this,
"sysInitialize", [&]() {
302 return attempt( *
this,
"sysInitialize", [&]() {
325 return attempt( *
this,
"sysStop", [&]() {
348 return attempt( *
this,
"sysFinalize", [&]() {
374 <<
"sysReinitialize(): cannot reinitialize tool not initialized"
379 return attempt(*
this,
"SysReinitialize()", [&]() {
419 <<
"sysRestart(): cannot reinitialize tool not started"
424 return attempt(*
this,
"sysRestart", [&]() {
441 error() <<
"restart(): cannot be stopped" <<
endmsg;
446 error() <<
"restart(): cannot be started" <<
endmsg;
464 if (! thArr->retrieved()) {
466 debug() <<
"ToolHandleArray " << thArr->propertyName()
467 <<
" not used: not registering any of its Tools" <<
endmsg;
470 debug() <<
"Registering all Tools in ToolHandleArray "
471 << thArr->propertyName() ;
472 for (
auto th_name : thArr->typesAndNames()) {
477 debug() <<
" (private)";
479 }
else if (
toolSvc()->retrieveTool(th_name, tool, 0).isSuccess()) {
481 debug() <<
" (public)";
486 warning() <<
"Error retrieving Tool " << th_name
487 <<
" in ToolHandleArray" << thArr->propertyName()
488 <<
". Not registered" <<
endmsg;
501 << (th->isPublic() ?
"Public" :
"Private" )
502 <<
" ToolHandle tool " << tool->
name()
506 debug() <<
"ToolHandle " << th->typeAndName() <<
" not used" <<
endmsg;
532 void** ppSvc)
const {
534 return helper.
getService(svcName, createIf, iid, ppSvc);
542 void** ppSvc)
const {
549 return helper.
service(name, quiet, createIf);
570 for (
auto tool :
tools()) {
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.
virtual Property & declareUpdateHandler(std::function< void(Property &)> fun)
set new callback for update
StatusCode setProperty(const Property &p) override
set the property form another property
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
bool isSuccess() const
Test for a status code of SUCCESS.
GAUDI_API Property * getProperty(const IProperty *p, const std::string &name)
simple function which gets the property with given name from the component
Data provider interface definition.
Property manager helper class.
bool isFailure() const
Test for a status code of FAILURE.
GAUDI_API bool isGaudiThreaded(const std::string &name)
test if current Gaudi object is running /will run in a thread
virtual const std::string & name() const =0
Retrieve the name of the instance.
StatusCode getProperty(Property *p) const override
get the property
TYPE * get() const
Get interface pointer.
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.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Main interface for the JobOptions service.
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
void updateMsgStreamOutputLevel(int level)
Update the output level of the cached MsgStream.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
const std::vector< Property * > & getProperties() const override
get all properties
virtual const std::string & tag() const
name tag for the exception, or exception type
const TYPE & value() const
explicit conversion
Base class from which all concrete algorithm classes should be derived.
Property base class allowing Property* collections to be "homogeneous".
bool assign(const Property &source) override
get the value from another property
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...
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
double fun(const std::vector< double > &x)
bool hasProperty(const std::string &name) const override
Return true if we have a property with the given name.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
SmartIF< IService > service(const std::string &name, const bool quiet=false, const bool createIf=true) const
The IProperty is the basic interface for all components which have properties that can be set or get...
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.
MSG::Level msgLevel() const
get the output level from the embedded MsgStream
GAUDI_API std::string getGaudiThreadIDfromName(const std::string &name)
helper function to extract Gaudi Thread ID from thread copy name
virtual void undeclareAll(const IInterface *owner)=0
Undeclare monitoring information.
StatusCode getService(const std::string &name, bool createIf, const InterfaceID &iid, void **ppSvc) const
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
GAUDI_API std::string getGaudiThreadGenericName(const std::string &name)
helper function to extract Gaudi instance name from thread copy name
StatusCode createService(const std::string &name, const InterfaceID &iid, void **ppSvc) const
Base class from which all concrete auditor classes should be derived.