![]() |
The Gaudi Framework
v27r1
|
Base class for all services. More...
#include <GaudiKernel/Service.h>
Public Types | |
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > | Factory |
![]() | |
using | base_class = CommonMessaging |
Public Member Functions | |
const std::string & | name () const override |
Retrieve name of the service. More... | |
StatusCode | configure () override |
StatusCode | initialize () override |
StatusCode | start () override |
StatusCode | stop () override |
StatusCode | finalize () override |
StatusCode | terminate () override |
Gaudi::StateMachine::State | FSMState () const override |
Gaudi::StateMachine::State | targetFSMState () const override |
StatusCode | reinitialize () override |
StatusCode | restart () override |
StatusCode | sysInitialize () override |
Initialize Service. More... | |
StatusCode | sysStart () override |
Initialize Service. More... | |
StatusCode | sysStop () override |
Initialize Service. More... | |
StatusCode | sysFinalize () override |
Finalize Service. More... | |
StatusCode | sysReinitialize () override |
Re-initialize the Service. More... | |
StatusCode | sysRestart () override |
Re-initialize the Service. More... | |
StatusCode | setProperty (const Property &p) override |
StatusCode | setProperty (const std::string &s) override |
StatusCode | setProperty (const std::string &n, const std::string &v) override |
StatusCode | getProperty (Property *p) const override |
const Property & | getProperty (const std::string &name) const override |
StatusCode | getProperty (const std::string &n, std::string &v) const override |
const std::vector< Property * > & | getProperties () const override |
bool | hasProperty (const std::string &name) const override |
template<class TYPE > | |
StatusCode | setProperty (const std::string &name, const TYPE &value) |
set the property form the value More... | |
Service (std::string name, ISvcLocator *svcloc) | |
Standard Constructor. More... | |
SmartIF< ISvcLocator > & | serviceLocator () const override |
Retrieve pointer to service locator. More... | |
StatusCode | setProperties () |
Method for setting declared properties to the values specified for the job. More... | |
template<class T > | |
StatusCode | service (const std::string &name, const T *&psvc, bool createIf=true) const |
Access a service by name, creating it if it doesn't already exist. More... | |
template<class T > | |
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const |
template<typename IFace = IService> | |
SmartIF< IFace > | service (const std::string &name, bool createIf=true) const |
template<class T > | |
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const |
Access a service by name and type, creating it if it doesn't already exist. More... | |
template<class T > | |
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
Declare the named property. More... | |
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
Declare remote named properties. More... | |
template<class T > | |
StatusCode | declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true) |
Declare used Private tool. More... | |
template<class T > | |
StatusCode | declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true) |
Declare used Public tool. More... | |
SmartIF< IAuditorSvc > & | auditorSvc () const |
The standard auditor service.May not be invoked before sysInitialize() has been invoked. More... | |
![]() | |
virtual | ~CommonMessagingBase ()=default |
Virtual destructor. More... | |
SmartIF< IMessageSvc > & | msgSvc () const |
The standard message service. More... | |
MsgStream & | msgStream () const |
Return an uninitialized MsgStream. More... | |
MsgStream & | msgStream (const MSG::Level level) const |
Predefined configurable message stream for the efficient printouts. More... | |
MsgStream & | always () const |
shortcut for the method msgStream(MSG::ALWAYS) More... | |
MsgStream & | fatal () const |
shortcut for the method msgStream(MSG::FATAL) More... | |
MsgStream & | err () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | error () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | warning () const |
shortcut for the method msgStream(MSG::WARNING) More... | |
MsgStream & | info () const |
shortcut for the method msgStream(MSG::INFO) More... | |
MsgStream & | debug () const |
shortcut for the method msgStream(MSG::DEBUG) More... | |
MsgStream & | verbose () const |
shortcut for the method msgStream(MSG::VERBOSE) More... | |
MsgStream & | msg () const |
shortcut for the method msgStream(MSG::INFO) More... | |
MSG::Level | msgLevel () const |
get the output level from the embedded MsgStream More... | |
MSG::Level | outputLevel () const __attribute__((deprecated)) |
Backward compatibility function for getting the output level. More... | |
bool | msgLevel (MSG::Level lvl) const |
get the output level from the embedded MsgStream More... | |
Protected Member Functions | |
~Service () override | |
Standard Destructor. More... | |
int | outputLevel () const |
get the Service's output level More... | |
![]() | |
void | updateMsgStreamOutputLevel (int level) |
Update the output level of the cached MsgStream. More... | |
Protected Attributes | |
IntegerProperty | m_outputLevel = MSG::NIL |
Service output level. More... | |
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE |
Service state. More... | |
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE |
Service state. More... | |
Private Member Functions | |
void | sysInitialize_imp () |
void | setServiceManager (ISvcManager *ism) override |
void | initOutputLevel (Property &prop) |
callback for output level property More... | |
Private Attributes | |
StatusCode | m_initSC |
std::once_flag | m_initFlag |
std::string | m_name |
Service Name. More... | |
SmartIF< ISvcLocator > | m_svcLocator |
Service Locator reference. More... | |
SmartIF< ISvcManager > | m_svcManager |
SmartIF< PropertyMgr > | m_propertyMgr |
Property Manager. More... | |
SmartIF< IAuditorSvc > | m_pAuditorSvc |
Auditor Service. More... | |
BooleanProperty | m_auditInit |
bool | m_auditorInitialize |
bool | m_auditorStart |
bool | m_auditorStop |
bool | m_auditorFinalize |
bool | m_auditorReinitialize |
bool | m_auditorRestart |
Friends | |
class | ServiceManager |
typedef Gaudi::PluginService::Factory<IService*, const std::string&, ISvcLocator*> Service::Factory |
Service::Service | ( | std::string | name, |
ISvcLocator * | svcloc | ||
) |
Standard Constructor.
Definition at line 386 of file Service.cpp.
|
overrideprotected |
Standard Destructor.
Definition at line 21 of file Service.cpp.
SmartIF< IAuditorSvc > & Service::auditorSvc | ( | ) | const |
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
Definition at line 428 of file Service.cpp.
|
inlineoverride |
Definition at line 51 of file Service.h.
|
inline |
Declare used Private tool.
handle | ToolHandle<T> |
toolTypeAndName | |
parent,default | public tool |
create | if necessary, default true |
Definition at line 246 of file Service.h.
|
inline |
Declare the named property.
name | the property name |
property | the property itself, |
doc | the documentation string |
Definition at line 215 of file Service.h.
|
inline |
Declare used Public tool.
handle | ToolHandle<T> |
toolTypeAndName | |
parent,default | public tool |
create | if necessary, default true |
Definition at line 276 of file Service.h.
|
inline |
Declare remote named properties.
This is used to declare as a local property a property of another services or algorithm. The only needed information is IProperty interface of the remote service and the its property name if different of the current one.
name | Local property name |
rsvc | Remote IProperty interface |
rname | Name of the property at remote service |
Definition at line 231 of file Service.h.
|
override |
Definition at line 193 of file Service.cpp.
|
inlineoverride |
|
override |
Definition at line 354 of file Service.cpp.
|
override |
Definition at line 342 of file Service.cpp.
|
override |
Definition at line 346 of file Service.cpp.
|
override |
Definition at line 350 of file Service.cpp.
|
override |
Definition at line 358 of file Service.cpp.
|
override |
Definition at line 68 of file Service.cpp.
|
private |
callback for output level property
Definition at line 423 of file Service.cpp.
|
override |
|
inlineprotected |
|
override |
Definition at line 282 of file Service.cpp.
|
override |
Definition at line 303 of file Service.cpp.
|
inline |
Access a service by name, creating it if it doesn't already exist.
Definition at line 144 of file Service.h.
|
inline |
Definition at line 160 of file Service.h.
|
inline |
Definition at line 171 of file Service.h.
|
inline |
Access a service by name and type, creating it if it doesn't already exist.
Definition at line 180 of file Service.h.
|
override |
Retrieve pointer to service locator.
Definition at line 324 of file Service.cpp.
StatusCode Service::setProperties | ( | ) |
Method for setting declared properties to the values specified for the job.
Definition at line 363 of file Service.cpp.
|
override |
Definition at line 330 of file Service.cpp.
|
override |
Definition at line 334 of file Service.cpp.
|
override |
Definition at line 338 of file Service.cpp.
|
inline |
set the property form the value
Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only
This is very convenient in resetting of the default properties in the derived classes. E.g. without this method one needs to convert everything into strings to use IProperty::setProperty
For simple cases it is more or less ok, but for complicated properties it is just ugly..
name | name of the property |
value | value of the property |
Definition at line 127 of file Service.h.
|
overrideprivate |
Definition at line 439 of file Service.cpp.
|
override |
Definition at line 152 of file Service.cpp.
|
override |
Definition at line 146 of file Service.cpp.
|
override |
Finalize Service.
Definition at line 158 of file Service.cpp.
|
override |
|
private |
Definition at line 31 of file Service.cpp.
|
override |
Re-initialize the Service.
Definition at line 199 of file Service.cpp.
|
override |
Re-initialize the Service.
Definition at line 240 of file Service.cpp.
|
override |
Initialize Service.
Definition at line 77 of file Service.cpp.
|
override |
Initialize Service.
Definition at line 111 of file Service.cpp.
|
inlineoverride |
Definition at line 58 of file Service.h.
|
inlineoverride |
Definition at line 56 of file Service.h.
|
friend |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
mutableprivate |
|
private |
|
protected |
|
mutableprivate |
|
private |
|
protected |