Service Class Reference

Base class for all services. More...

#include </scratch/z5/marcocle/GaudiDocs/lhcb-release/825/GAUDI/GAUDI_v26r3/InstallArea/x86_64-slc6-gcc48-opt/include/GaudiKernel/Service.h>

Inherits CommonMessaging< implements3< IService, IProperty, IStateful > >, and CommonMessaging< implements3< IService, IProperty, IStateful > >.

Inherited by extends1< Service, Gaudi::ISignalMonitor >, extends1< Service, Gaudi::ISignalMonitor >, extends1< Service, IAuditorSvc >, extends1< Service, IAuditorSvc >, extends1< Service, ICounterSvc >, extends1< Service, ICounterSvc >, extends1< Service, IEventProcessor >, extends1< Service, IEventProcessor >, extends1< Service, IEvtSelector >, extends1< Service, IEvtSelector >, extends1< Service, IExceptionSvc >, extends1< Service, IExceptionSvc >, extends1< Service, IFileAccess >, extends1< Service, IFileAccess >, extends1< Service, IGslSvc >, extends1< Service, IGslSvc >, extends1< Service, IIncidentListener >, extends1< Service, IIncidentListener >, extends1< Service, IIncidentSvc >, extends1< Service, IIncidentSvc >, extends1< Service, IIODataManager >, extends1< Service, IIODataManager >, extends1< Service, IIssueLogger >, extends1< Service, IIssueLogger >, extends1< Service, IParticlePropertySvc >, extends1< Service, IParticlePropertySvc >, extends1< Service, IPartPropSvc >, extends1< Service, IPartPropSvc >, extends1< Service, IRunable >, extends1< Service, IRunable >, extends1< Service, IStatusCodeSvc >, extends1< Service, IStatusCodeSvc >, extends1< Service, IToolSvc >, extends1< Service, IToolSvc >, extends2< Service, IAlgContextSvc, IIncidentListener >, extends2< Service, IAlgContextSvc, IIncidentListener >, extends2< Service, IChronoStatSvc, IIncidentListener >, extends2< Service, IChronoStatSvc, IIncidentListener >, extends2< Service, IConversionSvc, IAddressCreator >, extends2< Service, IConversionSvc, IAddressCreator >, extends2< Service, IDataProviderSvc, IDataManagerSvc >, extends2< Service, IDataProviderSvc, IDataManagerSvc >, extends2< Service, IFileCatalog, IFileCatalogMgr >, extends2< Service, IFileCatalog, IFileCatalogMgr >, extends2< Service, IFileMgr, IIncidentListener >, extends2< Service, IFileMgr, IIncidentListener >, extends2< Service, IHistorySvc, IIncidentListener >, extends2< Service, IHistorySvc, IIncidentListener >, extends2< Service, IIoComponentMgr, IIncidentListener >, extends2< Service, IIoComponentMgr, IIncidentListener >, extends2< Service, IMessageSvc, IInactiveMessageCounter >, extends2< Service, IMessageSvc, IInactiveMessageCounter >, extends2< Service, IProperty, IJobOptionsSvc >, extends2< Service, IProperty, IJobOptionsSvc >, extends3< Service, IConversionSvc, IPersistencySvc, IAddressCreator >, extends3< Service, IConversionSvc, IPersistencySvc, IAddressCreator >, extends3< Service, IDataProviderSvc, IDataManagerSvc, IPartitionControl >, extends3< Service, IDataProviderSvc, IDataManagerSvc, IPartitionControl >, extends3< Service, IRndmEngine, ISerialize, IIncidentListener >, extends3< Service, IRndmEngine, ISerialize, IIncidentListener >, extends3< Service, IRndmGenSvc, IRndmEngine, ISerialize >, extends3< Service, IRndmGenSvc, IRndmEngine, ISerialize >, extends3< Service, ITHistSvc, IIncidentListener, IIoComponent >, extends3< Service, ITHistSvc, IIncidentListener, IIoComponent >, Gaudi::RootPerfMonSvc, and Gaudi::RootPerfMonSvc.

Collaboration diagram for Service:

Public Types

typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > Factory
 
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3< IService, IProperty, IStatefulextend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extend_interfaces3< IService, IProperty, IStatefulextend_interfaces_base
 Typedef to the base of this class. More...
 
typedef extend_interfaces_base::ext_iids interfaces
 MPL set of all the implemented interfaces. More...
 
typedef extend_interfaces_base::ext_iids interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IService, IProperty, IStateful >
typedef mpl::fold< typename IService::iid::iids::type, typename mpl::fold< typename IProperty::iid::iids::type, typename IStateful::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type, mpl::insert< mpl::_1, mpl::_2 > >::type ext_iids
 MPL set of interfaces extended by this one. More...
 
typedef mpl::fold< typename IService::iid::iids::type, typename mpl::fold< typename IProperty::iid::iids::type, typename IStateful::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type, mpl::insert< mpl::_1, mpl::_2 > >::type ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status {
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR,
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR
}
 Return status. More...
 
enum  Status {
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR,
  SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR
}
 Return status. More...
 
typedef Gaudi::InterfaceId< IInterface, 0, 0 > iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
typedef Gaudi::InterfaceId< IInterface, 0, 0 > iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 

Public Member Functions

virtual unsigned long release ()
 Release Interface instance. More...
 
virtual const std::string & name () const
 Retrieve name of the service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode initialize ()
 Initialization (from CONFIGURED to INITIALIZED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode finalize ()
 Finalize (from INITIALIZED to CONFIGURED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Initialize Service. More...
 
virtual StatusCode sysStop ()
 Initialize Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-initialize the Service. More...
 
virtual StatusCode setProperty (const Property &p)
 Set the property by property. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector< Property * > & getProperties () const
 Get list of properties. More...
 
virtual bool hasProperty (const std::string &name) const
 Return true if we have a property with the given name. More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const
 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<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 >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
virtual unsigned long release ()
 Release Interface instance. More...
 
virtual const std::string & name () const
 Retrieve name of the service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode initialize ()
 Initialization (from CONFIGURED to INITIALIZED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode finalize ()
 Finalize (from INITIALIZED to CONFIGURED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Initialize Service. More...
 
virtual StatusCode sysStop ()
 Initialize Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-initialize the Service. More...
 
virtual StatusCode setProperty (const Property &p)
 Set the property by property. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector< Property * > & getProperties () const
 Get list of properties. More...
 
virtual bool hasProperty (const std::string &name) const
 Return true if we have a property with the given name. More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const
 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<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 >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces3< IService, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::string > getInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::string > getInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 1)
 InterfaceID. More...
 
 DeclareInterfaceID (IProperty, 2, 1)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 

Protected Member Functions

virtual ~Service ()
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
virtual ~Service ()
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 

Protected Attributes

IntegerProperty m_outputLevel
 Service output level. More...
 
Gaudi::StateMachine::State m_state
 Service state. More...
 
Gaudi::StateMachine::State m_targetState
 Service state. More...
 
- Protected Attributes inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message service. More...
 

Private Member Functions

void setServiceManager (ISvcManager *ism)
 
void initOutputLevel (Property &prop)
 callback for output level property More...
 
void setServiceManager (ISvcManager *ism)
 
void initOutputLevel (Property &prop)
 callback for output level property More...
 

Private Attributes

std::string m_name
 Service Name. More...
 
SmartIF< ISvcLocatorm_svcLocator
 Service Locator reference. More...
 
SmartIF< ISvcManagerm_svcManager
 
PropertyMgrm_propertyMgr
 Property Manager. More...
 
SmartIF< IAuditorSvcm_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
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 

Detailed Description

Base class for all services.

It implements the IService and IProperty interfaces.

Author
Pere Mato
Marco Clemencic

Definition at line 33 of file Service.h.

Member Typedef Documentation

Definition at line 38 of file Service.h.

Definition at line 38 of file Service.h.

Constructor & Destructor Documentation

Service::Service ( const std::string &  name,
ISvcLocator svcloc 
)

Standard Constructor.

Definition at line 395 of file Service.cpp.

395  {
396  m_name = name;
397  m_svcLocator = svcloc;
400  m_propertyMgr = new PropertyMgr();
402  // Declare common Service properties with their defaults
403  if ( (name != "MessageSvc") && msgSvc().isValid() ) {
404  // In genconf a service is instantiated without the ApplicationMgr
406  }
407  declareProperty("OutputLevel", m_outputLevel);
409 
410  // Get the default setting for service auditing from the AppMgr
411  declareProperty("AuditServices", m_auditInit = true);
412 
413  bool audit(false);
414  SmartIF<IProperty> appMgr(serviceLocator()->service("ApplicationMgr"));
415  if (appMgr.isValid()) {
416  const Property& prop = appMgr->getProperty("AuditServices");
417  if (m_name != "IncidentSvc") {
418  setProperty(prop).ignore();
419  audit = m_auditInit.value();
420  } else {
421  audit = false;
422  }
423  }
424 
425  declareProperty( "AuditInitialize" , m_auditorInitialize = audit );
426  declareProperty( "AuditStart" , m_auditorStart = audit );
427  declareProperty( "AuditStop" , m_auditorStop = audit );
428  declareProperty( "AuditFinalize" , m_auditorFinalize = audit );
429  declareProperty( "AuditReInitialize" , m_auditorReinitialize = audit );
430  declareProperty( "AuditReStart" , m_auditorRestart = audit );
431 }
BooleanProperty m_auditInit
Definition: Service.h:266
Gaudi::StateMachine::State m_targetState
Service state.
Definition: Service.h:248
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:244
bool m_auditorInitialize
Definition: Service.h:267
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:246
virtual StatusCode setProperty(const Property &p)
Set the property by property.
Definition: Service.cpp:340
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
std::string m_name
Service Name.
Definition: Service.h:255
Property manager helper class.
Definition: PropertyMgr.h:34
virtual void declareUpdateHandler(PropertyCallbackFunctor *pf)
set new callback for update
Definition: Property.cpp:141
virtual int outputLevel() const =0
Retrieve the current output level threshold.
bool m_auditorFinalize
Definition: Service.h:270
bool m_auditorReinitialize
Definition: Service.h:271
const TYPE & value() const
explicit conversion
Definition: Property.h:355
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
Property base class allowing Property* collections to be "homogeneous".
Definition: Property.h:43
SmartIF< ISvcLocator > m_svcLocator
Service Locator reference.
Definition: Service.h:257
bool m_auditorStart
Definition: Service.h:268
void initOutputLevel(Property &prop)
callback for output level property
Definition: Service.cpp:434
tuple appMgr
Definition: IOTest.py:83
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.
Definition: Service.h:143
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
void ignore() const
Definition: StatusCode.h:107
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:212
bool m_auditorRestart
Definition: Service.h:272
bool m_auditorStop
Definition: Service.h:269
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:334
Service::~Service ( )
protectedvirtual

Standard Destructor.

Definition at line 442 of file Service.cpp.

442  {
443  delete m_propertyMgr;
444 }
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
Service::Service ( const std::string &  name,
ISvcLocator svcloc 
)

Standard Constructor.

virtual Service::~Service ( )
protectedvirtual

Standard Destructor.

Member Function Documentation

SmartIF< IAuditorSvc > & Service::auditorSvc ( ) const

The standard auditor service.May not be invoked before sysInitialize() has been invoked.

Definition at line 446 of file Service.cpp.

446  {
447  if ( !m_pAuditorSvc.isValid() ) {
448  m_pAuditorSvc = serviceLocator()->service("AuditorSvc");
449  if( !m_pAuditorSvc.isValid() ) {
450  throw GaudiException("Service [AuditorSvc] not found", name(), StatusCode::FAILURE);
451  }
452  }
453  return m_pAuditorSvc;
454 }
Define general base for Gaudi exception.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:82
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: Service.h:265
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:334
SmartIF<IAuditorSvc>& Service::auditorSvc ( ) const

The standard auditor service.May not be invoked before sysInitialize() has been invoked.

virtual StatusCode Service::configure ( )
inlinevirtual

Configuration (from OFFLINE to CONFIGURED).

Implements IService.

Definition at line 50 of file Service.h.

virtual StatusCode Service::configure ( )
inlinevirtual

Configuration (from OFFLINE to CONFIGURED).

Implements IService.

Definition at line 50 of file Service.h.

template<class T >
Property* Service::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
) const
inline

Declare the named property.

MySvc ( const std::string& name ,
ISvcLocator* pSvc )
: Service ( name , pSvc )
, m_property1 ( ... )
, m_property2 ( ... )
{
// declare the property
declareProperty( "Property1" , m_property1 , "Doc for property #1" ) ;
// declare the property and attach the handler to it
declareProperty( "Property2" , m_property2 , "Doc for property #2" )
-> declareUpdateHandler( &MySvc::handler_2 ) ;
}
See also
PropertyMgr
PropertyMgr::declareProperty
Parameters
namethe property name
propertythe property itself,
docthe documentation string
Returns
the actual property objects

Definition at line 212 of file Service.h.

215  {
216  return m_propertyMgr -> declareProperty ( name , property , doc ) ;
217  }
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:212
template<class T >
Property* Service::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
) const
inline

Declare the named property.

MySvc ( const std::string& name ,
ISvcLocator* pSvc )
: Service ( name , pSvc )
, m_property1 ( ... )
, m_property2 ( ... )
{
// declare the property
declareProperty( "Property1" , m_property1 , "Doc for property #1" ) ;
// declare the property and attach the handler to it
declareProperty( "Property2" , m_property2 , "Doc for property #2" )
-> declareUpdateHandler( &MySvc::handler_2 ) ;
}
See also
PropertyMgr
PropertyMgr::declareProperty
Parameters
namethe property name
propertythe property itself,
docthe documentation string
Returns
the actual property objects

Definition at line 212 of file Service.h.

215  {
216  return m_propertyMgr -> declareProperty ( name , property , doc ) ;
217  }
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:212
Property* Service::declareRemoteProperty ( const std::string &  name,
IProperty rsvc,
const std::string &  rname = "" 
) const
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.

Parameters
nameLocal property name
rsvcRemote IProperty interface
rnameName of the property at remote service

Definition at line 228 of file Service.h.

231  {
232  return m_propertyMgr -> declareRemoteProperty ( name , rsvc , rname ) ;
233  }
Property * declareRemoteProperty(const std::string &name, IProperty *rsvc, const std::string &rname="") const
Declare remote named properties.
Definition: Service.h:228
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
Property* Service::declareRemoteProperty ( const std::string &  name,
IProperty rsvc,
const std::string &  rname = "" 
) const
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.

Parameters
nameLocal property name
rsvcRemote IProperty interface
rnameName of the property at remote service

Definition at line 228 of file Service.h.

231  {
232  return m_propertyMgr -> declareRemoteProperty ( name , rsvc , rname ) ;
233  }
Property * declareRemoteProperty(const std::string &name, IProperty *rsvc, const std::string &rname="") const
Declare remote named properties.
Definition: Service.h:228
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
virtual Gaudi::StateMachine::State Service::FSMState ( ) const
inlinevirtual

Get the current state.

Implements IService.

Definition at line 56 of file Service.h.

56 { return m_state; }
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:246
virtual Gaudi::StateMachine::State Service::FSMState ( ) const
inlinevirtual

Get the current state.

Implements IService.

Definition at line 56 of file Service.h.

56 { return m_state; }
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:246
const std::vector< Property * > & Service::getProperties ( ) const
virtual

Get list of properties.

Implements IProperty.

Definition at line 364 of file Service.cpp.

364  {
365  return m_propertyMgr->getProperties();
366 }
const std::vector< Property * > & getProperties() const
get all properties
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
virtual const std::vector<Property*>& Service::getProperties ( ) const
virtual

Get list of properties.

Implements IProperty.

StatusCode Service::getProperty ( Property p) const
virtual

Get the property by property.

Implements IProperty.

Reimplemented in JobOptionsSvc.

Definition at line 352 of file Service.cpp.

352  {
353  return m_propertyMgr->getProperty(p);
354 }
StatusCode getProperty(Property *p) const
get the property
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
virtual StatusCode Service::getProperty ( Property p) const
virtual

Get the property by property.

Implements IProperty.

Reimplemented in JobOptionsSvc.

const Property & Service::getProperty ( const std::string &  name) const
virtual

Get the property by name.

Implements IProperty.

Definition at line 356 of file Service.cpp.

356  {
357  return m_propertyMgr->getProperty(n);
358 }
StatusCode getProperty(Property *p) const
get the property
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
virtual const Property& Service::getProperty ( const std::string &  name) const
virtual

Get the property by name.

Implements IProperty.

StatusCode Service::getProperty ( const std::string &  n,
std::string &  v 
) const
virtual

Get the property by std::string.

Implements IProperty.

Definition at line 360 of file Service.cpp.

360  {
361  return m_propertyMgr->getProperty(n,v);
362 }
StatusCode getProperty(Property *p) const
get the property
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
virtual StatusCode Service::getProperty ( const std::string &  n,
std::string &  v 
) const
virtual

Get the property by std::string.

Implements IProperty.

virtual bool Service::hasProperty ( const std::string &  name) const
virtual

Return true if we have a property with the given name.

Implements IProperty.

bool Service::hasProperty ( const std::string &  name) const
virtual

Return true if we have a property with the given name.

Implements IProperty.

Definition at line 368 of file Service.cpp.

368  {
369  return m_propertyMgr->hasProperty(name);
370 }
bool hasProperty(const std::string &name) const
Return true if we have a property with the given name.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
StatusCode Service::initialize ( )
virtual

Initialization (from CONFIGURED to INITIALIZED).

Implements IService.

Reimplemented in MultiStoreSvc, DataSvc, DataSvc, Gaudi::Utils::StopSignalHandler, PersistencySvc, HistogramSvc, DataOnDemandSvc, Gaudi::RootCnvSvc, Gaudi::RootCnvSvc, GslSvc, EventCollectionSelector, EventSelector, ConversionSvc, ConversionSvc, Gaudi::RootPerfMonSvc, Gaudi::RootPerfMonSvc, Gaudi::ParticlePropertySvc, Gaudi::IODataManager, MinimalEventLoopMgr, MinimalEventLoopMgr, EventLoopMgr, RndmGenSvc, Gaudi::MultiFileCatalog, IncidentSvc, RndmEngine, HistogramPersistencySvc, Gaudi::RootEvtSelector, Gaudi::RootEvtSelector, IoComponentMgr, MessageSvc, HistorySvc, AlgContextSvc, ChronoStatSvc, AppMgrRunable, EvtPersistencySvc, NTupleSvc, StalledEventMonitor, ExceptionSvc, FileMgr, HepRndm::Engine< TYPE >, DetDataSvc, JobOptionsSvc, TagCollectionSvc, ToolSvc, THistSvc, AuditorSvc, RecordDataSvc, VFSSvc, PartPropSvc, PythonScriptingSvc, RootHistCnv::PersSvc, IssueLogger, EvtDataSvc, StatusCodeSvc, and DetPersistencySvc.

Definition at line 72 of file Service.cpp.

72  {
73  // Set the Algorithm's properties
75  ON_DEBUG debug() << "Service base class initialized successfully" << endmsg;
77  return sc ;
78 }
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:246
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
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...
Definition: StateMachine.cpp:8
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
Definition: Service.cpp:373
#define ON_DEBUG
Definition: Service.cpp:17
void Service::initOutputLevel ( Property prop)
private

callback for output level property

Definition at line 434 of file Service.cpp.

434  {
435  if ( (name() != "MessageSvc") && msgSvc().isValid() ) {
437  }
439 }
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:244
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
void updateMsgStreamOutputLevel(int level)
Update the output level of the cached MsgStream.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
virtual void setOutputLevel(int new_level)=0
Set new global output level threshold.
void Service::initOutputLevel ( Property prop)
private

callback for output level property

virtual const std::string& Service::name ( ) const
virtual

Retrieve name of the service.

Implements CommonMessaging< implements3< IService, IProperty, IStateful > >.

const std::string & Service::name ( ) const
virtual

Retrieve name of the service.

Implements CommonMessaging< implements3< IService, IProperty, IStateful > >.

Definition at line 329 of file Service.cpp.

329  {
330  return m_name;
331 }
std::string m_name
Service Name.
Definition: Service.h:255
int Service::outputLevel ( ) const
inlineprotected

get the Service's output level

Definition at line 251 of file Service.h.

251 { return m_outputLevel.value(); }
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:244
const TYPE & value() const
explicit conversion
Definition: Property.h:355
int Service::outputLevel ( ) const
inlineprotected

get the Service's output level

Definition at line 251 of file Service.h.

251 { return m_outputLevel.value(); }
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:244
const TYPE & value() const
explicit conversion
Definition: Property.h:355
StatusCode Service::reinitialize ( )
virtual

Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).

Implements IService.

Reimplemented in MultiStoreSvc, DataSvc, DataSvc, HistogramSvc, DataOnDemandSvc, EventSelector, MinimalEventLoopMgr, MinimalEventLoopMgr, EventLoopMgr, HistogramPersistencySvc, HistorySvc, MessageSvc, NTupleSvc, DetDataSvc, THistSvc, RecordDataSvc, PartPropSvc, IssueLogger, EvtDataSvc, and StatusCodeSvc.

Definition at line 292 of file Service.cpp.

292  {
293  /* @TODO
294  * MCl 2008-10-23: the implementation of reinitialize as finalize+initialize
295  * is causing too many problems
296  *
297  // Default implementation is finalize+initialize
298  StatusCode sc = finalize();
299  if (sc.isFailure()) {
300  error() << "reinitialize(): cannot be finalized" << endmsg;
301  return sc;
302  }
303  sc = initialize();
304  if (sc.isFailure()) {
305  error() << "reinitialize(): cannot be initialized" << endmsg;
306  return sc;
307  }
308  */
309  return StatusCode::SUCCESS;
310 }
virtual StatusCode Service::reinitialize ( )
virtual
unsigned long Service::release ( )
virtual

Release Interface instance.

Specialized implementation because the default one is not enough.

Implements IInterface.

Definition at line 22 of file Service.cpp.

22  {
23  // Avoid to decrement 0
24  const unsigned long count = (m_refCount) ? --m_refCount : m_refCount;
25  if( count == 0) {
26  if (m_svcManager!=0) {
28  }
29  delete this;
30  }
31  return count;
32 }
SmartIF< ISvcManager > m_svcManager
Definition: Service.h:258
void ignore() const
Definition: StatusCode.h:107
virtual StatusCode removeService(IService *svc)=0
Remove a service from the "active" list of services of the factory.
virtual unsigned long Service::release ( )
virtual

Release Interface instance.

Specialized implementation because the default one is not enough.

Implements IInterface.

StatusCode Service::restart ( )
virtual

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Implements IService.

Reimplemented in MinimalEventLoopMgr, and MinimalEventLoopMgr.

Definition at line 313 of file Service.cpp.

313  {
314  // Default implementation is stop+start
315  StatusCode sc = stop();
316  if (sc.isFailure()) {
317  error() << "restart(): cannot be stopped" << endmsg;
318  return sc;
319  }
320  sc = start();
321  if (sc.isFailure()) {
322  error() << "restart(): cannot be started" << endmsg;
323  return sc;
324  }
325  return StatusCode::SUCCESS;
326 }
virtual StatusCode stop()
Stop (from RUNNING to INITIALIZED).
Definition: Service.cpp:150
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual StatusCode start()
Start (from INITIALIZED to RUNNING).
Definition: Service.cpp:156
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual StatusCode Service::restart ( )
virtual

Initialization (from RUNNING to RUNNING, via INITIALIZED).

Implements IService.

Reimplemented in MinimalEventLoopMgr, and MinimalEventLoopMgr.

template<class T >
StatusCode Service::service ( const std::string &  name,
const T *&  psvc,
bool  createIf = true 
) const
inline

Access a service by name, creating it if it doesn't already exist.

Definition at line 143 of file Service.h.

143  {
144  ISvcLocator& svcLoc = *serviceLocator();
145  SmartIF<T> ptr(
146  ServiceLocatorHelper(svcLoc, *this).service(name, !createIf, // quiet
147  createIf));
148  if (ptr.isValid()) {
149  psvc = ptr.get();
150  const_cast<T*>(psvc)->addRef();
151  return StatusCode::SUCCESS;
152  }
153  // else
154  psvc = 0;
155  return StatusCode::FAILURE;
156  }
an helper to share the implementation of service() among the various kernel base classes $Id: ...
Small smart pointer class with automatic reference counting for IInterface.
Definition: IConverter.h:14
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
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.
Definition: Service.h:143
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:334
template<class T >
StatusCode Service::service ( const std::string &  name,
const T *&  psvc,
bool  createIf = true 
) const
inline

Access a service by name, creating it if it doesn't already exist.

Definition at line 143 of file Service.h.

143  {
144  ISvcLocator& svcLoc = *serviceLocator();
145  SmartIF<T> ptr(
146  ServiceLocatorHelper(svcLoc, *this).service(name, !createIf, // quiet
147  createIf));
148  if (ptr.isValid()) {
149  psvc = ptr.get();
150  const_cast<T*>(psvc)->addRef();
151  return StatusCode::SUCCESS;
152  }
153  // else
154  psvc = 0;
155  return StatusCode::FAILURE;
156  }
an helper to share the implementation of service() among the various kernel base classes $Id: ...
Small smart pointer class with automatic reference counting for IInterface.
Definition: IConverter.h:14
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
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.
Definition: Service.h:143
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:334
template<class T >
StatusCode Service::service ( const std::string &  name,
T *&  psvc,
bool  createIf = true 
) const
inline

Definition at line 159 of file Service.h.

159  {
160  ISvcLocator& svcLoc = *serviceLocator();
161  SmartIF<T> ptr(
162  ServiceLocatorHelper(svcLoc, *this).service(name, !createIf, // quiet
163  createIf));
164  if (ptr.isValid()) {
165  psvc = ptr.get();
166  psvc->addRef();
167  return StatusCode::SUCCESS;
168  }
169  // else
170  psvc = 0;
171  return StatusCode::FAILURE;
172  }
an helper to share the implementation of service() among the various kernel base classes $Id: ...
Small smart pointer class with automatic reference counting for IInterface.
Definition: IConverter.h:14
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
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.
Definition: Service.h:143
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:334
template<class T >
StatusCode Service::service ( const std::string &  name,
T *&  psvc,
bool  createIf = true 
) const
inline

Definition at line 159 of file Service.h.

159  {
160  ISvcLocator& svcLoc = *serviceLocator();
161  SmartIF<T> ptr(
162  ServiceLocatorHelper(svcLoc, *this).service(name, !createIf, // quiet
163  createIf));
164  if (ptr.isValid()) {
165  psvc = ptr.get();
166  psvc->addRef();
167  return StatusCode::SUCCESS;
168  }
169  // else
170  psvc = 0;
171  return StatusCode::FAILURE;
172  }
an helper to share the implementation of service() among the various kernel base classes $Id: ...
Small smart pointer class with automatic reference counting for IInterface.
Definition: IConverter.h:14
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
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.
Definition: Service.h:143
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:334
template<class T >
StatusCode Service::service ( const std::string &  svcType,
const std::string &  svcName,
T *&  psvc 
) const
inline

Access a service by name and type, creating it if it doesn't already exist.

Definition at line 177 of file Service.h.

178  {
179  return service(svcType + "/" + svcName, psvc);
180  }
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.
Definition: Service.h:143
template<class T >
StatusCode Service::service ( const std::string &  svcType,
const std::string &  svcName,
T *&  psvc 
) const
inline

Access a service by name and type, creating it if it doesn't already exist.

Definition at line 177 of file Service.h.

178  {
179  return service(svcType + "/" + svcName, psvc);
180  }
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.
Definition: Service.h:143
SmartIF<ISvcLocator>& Service::serviceLocator ( ) const
virtual

Retrieve pointer to service locator.

Implements CommonMessaging< implements3< IService, IProperty, IStateful > >.

SmartIF< ISvcLocator > & Service::serviceLocator ( ) const
virtual

Retrieve pointer to service locator.

Implements CommonMessaging< implements3< IService, IProperty, IStateful > >.

Definition at line 334 of file Service.cpp.

334  {
335  return m_svcLocator;
336 }
SmartIF< ISvcLocator > m_svcLocator
Service Locator reference.
Definition: Service.h:257
StatusCode Service::setProperties ( )

Method for setting declared properties to the values specified for the job.

StatusCode Service::setProperties ( )

Method for setting declared properties to the values specified for the job.

Definition at line 373 of file Service.cpp.

373  {
374  const bool CREATEIF(true);
375  SmartIF<IJobOptionsSvc> jos(serviceLocator()->service("JobOptionsSvc", CREATEIF));
376  if( !jos.isValid() ) {
377  throw GaudiException("Service [JobOptionsSvc] not found", name(), StatusCode::FAILURE);
378  }
379  // set first generic Properties
380  StatusCode sc = jos->setMyProperties( getGaudiThreadGenericName(name()), this );
381  if( sc.isFailure() ) return sc;
382 
383  // set specific Properties
384  if (isGaudiThreaded(name())) {
385  if (jos->setMyProperties( name(), this ).isFailure()) {
386  return StatusCode::FAILURE;
387  }
388  }
389  return StatusCode::SUCCESS;
390 }
Define general base for Gaudi exception.
GAUDI_API bool isGaudiThreaded(const std::string &name)
test if current Gaudi object is running /will run in a thread
Definition: ThreadGaudi.cpp:75
GAUDI_API std::string getGaudiThreadGenericName(const std::string &name)
helper function to extract Gaudi instance name from thread copy name
Definition: ThreadGaudi.cpp:52
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
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.
Definition: Service.h:143
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:334
StatusCode Service::setProperty ( const Property p)
virtual

Set the property by property.

Implements IProperty.

Reimplemented in JobOptionsSvc.

Definition at line 340 of file Service.cpp.

340  {
341  return m_propertyMgr->setProperty(p);
342 }
StatusCode setProperty(const Property &p)
set the property form another property
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
virtual StatusCode Service::setProperty ( const Property p)
virtual

Set the property by property.

Implements IProperty.

Reimplemented in JobOptionsSvc.

StatusCode Service::setProperty ( const std::string &  s)
virtual

Set the property by string.

Implements IProperty.

Definition at line 344 of file Service.cpp.

344  {
345  return m_propertyMgr->setProperty(s);
346 }
StatusCode setProperty(const Property &p)
set the property form another property
string s
Definition: gaudirun.py:244
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
virtual StatusCode Service::setProperty ( const std::string &  s)
virtual

Set the property by string.

Implements IProperty.

StatusCode Service::setProperty ( const std::string &  n,
const std::string &  v 
)
virtual

Set the property by std::string.

Implements IProperty.

Definition at line 348 of file Service.cpp.

348  {
349  return m_propertyMgr->setProperty(n,v);
350 }
StatusCode setProperty(const Property &p)
set the property form another property
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
virtual StatusCode Service::setProperty ( const std::string &  n,
const std::string &  v 
)
virtual

Set the property by std::string.

Implements IProperty.

template<class TYPE >
StatusCode Service::setProperty ( const std::string &  name,
const TYPE &  value 
)
inline

set the property form the value

std::vector<double> data = ... ;
setProperty( "Data" , data ) ;
std::map<std::string,double> cuts = ... ;
setProperty( "Cuts" , cuts ) ;
std::map<std::string,std::string> dict = ... ;
setProperty( "Dictionary" , dict ) ;

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

setProperty ( "OutputLevel" , "1" ) ;
setProperty ( "Enable" , "True" ) ;
setProperty ( "ErrorMax" , "10" ) ;

For simple cases it is more or less ok, but for complicated properties it is just ugly..

Parameters
namename of the property
valuevalue of the property
See also
Gaudi::Utils::setProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 126 of file Service.h.

StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1212
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
template<class TYPE >
StatusCode Service::setProperty ( const std::string &  name,
const TYPE &  value 
)
inline

set the property form the value

std::vector<double> data = ... ;
setProperty( "Data" , data ) ;
std::map<std::string,double> cuts = ... ;
setProperty( "Cuts" , cuts ) ;
std::map<std::string,std::string> dict = ... ;
setProperty( "Dictionary" , dict ) ;

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

setProperty ( "OutputLevel" , "1" ) ;
setProperty ( "Enable" , "True" ) ;
setProperty ( "ErrorMax" , "10" ) ;

For simple cases it is more or less ok, but for complicated properties it is just ugly..

Parameters
namename of the property
valuevalue of the property
See also
Gaudi::Utils::setProperty
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
Date
2007-05-13

Definition at line 126 of file Service.h.

StatusCode setProperty(IProperty *component, const std::string &name, const TYPE &value, const std::string &doc)
simple function to set the property of the given object from the value
Definition: Property.h:1212
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
PropertyMgr * m_propertyMgr
Property Manager.
Definition: Service.h:260
void Service::setServiceManager ( ISvcManager ism)
privatevirtual

Implements IService.

Definition at line 457 of file Service.cpp.

457  {
458  m_svcManager = ism;
459 }
SmartIF< ISvcManager > m_svcManager
Definition: Service.h:258
void Service::setServiceManager ( ISvcManager ism)
privatevirtual

Implements IService.

StatusCode Service::start ( )
virtual

Start (from INITIALIZED to RUNNING).

Implements IService.

Reimplemented in MinimalEventLoopMgr, MinimalEventLoopMgr, AppMgrRunable, StalledEventMonitor, and ToolSvc.

Definition at line 156 of file Service.cpp.

156  {
157  // stub implementation
158  return StatusCode::SUCCESS;
159 }
virtual StatusCode Service::start ( )
virtual

Start (from INITIALIZED to RUNNING).

Implements IService.

Reimplemented in MinimalEventLoopMgr, MinimalEventLoopMgr, AppMgrRunable, StalledEventMonitor, and ToolSvc.

virtual StatusCode Service::stop ( )
virtual
StatusCode Service::stop ( )
virtual

Stop (from RUNNING to INITIALIZED).

Implements IService.

Reimplemented in Gaudi::RootPerfMonSvc, Gaudi::RootPerfMonSvc, MinimalEventLoopMgr, MinimalEventLoopMgr, EventLoopMgr, HistorySvc, StalledEventMonitor, AppMgrRunable, and ToolSvc.

Definition at line 150 of file Service.cpp.

150  {
151  // stub implementation
152  return StatusCode::SUCCESS;
153 }
StatusCode Service::sysFinalize ( )
virtual

Finalize Service.

Implements IService.

Reimplemented in AuditorSvc.

Definition at line 162 of file Service.cpp.

162  {
163 
165 
166  try {
168  Gaudi::Guards::AuditorGuard guard(this,
169  // check if we want to audit the initialize
170  (m_auditorFinalize) ? auditorSvc().get() : 0,
172  sc = finalize();
173  if (sc.isSuccess())
175  }
176  catch( const GaudiException& Exception ) {
177  fatal() << " Exception with tag=" << Exception.tag()
178  << " is caught " << endmsg;
179  error() << Exception << endmsg;
180  // Stat stat( chronoSvc() , Exception.tag() ) ;
181  }
182  catch( const std::exception& Exception ) {
183  fatal() << " Standard std::exception is caught " << endmsg;
184  error() << Exception.what() << endmsg;
185  // Stat stat( chronoSvc() , "*std::exception*" ) ;
186  }
187  catch( ... ) {
188  fatal() << "UNKNOWN Exception is caught " << endmsg;
189  // Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
190  }
191 
192  m_pAuditorSvc = 0;
193  return sc;
194 }
Gaudi::StateMachine::State m_targetState
Service state.
Definition: Service.h:248
Define general base for Gaudi exception.
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:246
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
Definition: Service.cpp:446
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & tag() const
name tag for the exception, or exception type
bool m_auditorFinalize
Definition: Service.h:270
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:218
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
Definition: Service.h:265
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: Service.cpp:197
virtual StatusCode Service::sysFinalize ( )
virtual

Finalize Service.

Implements IService.

Reimplemented in AuditorSvc.

virtual StatusCode Service::sysInitialize ( )
virtual

Initialize Service.

Implements IService.

Reimplemented in AuditorSvc.

StatusCode Service::sysInitialize ( )
virtual

Initialize Service.

Implements IService.

Reimplemented in AuditorSvc.

Definition at line 35 of file Service.cpp.

35  {
36  StatusCode sc;
37 
38  try {
40  Gaudi::Guards::AuditorGuard guard(this,
41  // check if we want to audit the initialize
42  (m_auditorInitialize) ? auditorSvc().get() : 0,
44  if ((name() != "MessageSvc") && msgSvc().isValid()) // pre-set the outputLevel from the MessageSvc value
46  sc = initialize(); // This should change the state to Gaudi::StateMachine::CONFIGURED
47  if (sc.isSuccess())
49  return sc;
50  }
51  catch ( const GaudiException& Exception ) {
52  fatal() << "in sysInitialize(): exception with tag=" << Exception.tag()
53  << " is caught" << endmsg;
54  error() << Exception << endmsg;
55  // Stat stat( chronoSvc() , Exception.tag() );
56  }
57  catch( const std::exception& Exception ) {
58  fatal() << "in sysInitialize(): standard std::exception is caught" << endmsg;
59  error() << Exception.what() << endmsg;
60  // Stat stat( chronoSvc() , "*std::exception*" );
61  }
62  catch(...) {
63  fatal() << "in sysInitialize(): UNKNOWN Exception is caught" << endmsg;
64  // Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
65  }
66 
67  return StatusCode::FAILURE;
68 }
Gaudi::StateMachine::State m_targetState
Service state.
Definition: Service.h:248
IntegerProperty m_outputLevel
Service output level.
Definition: Service.h:244
Define general base for Gaudi exception.
bool m_auditorInitialize
Definition: Service.h:267
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:246
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
Definition: Service.cpp:446
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
virtual int outputLevel() const =0
Retrieve the current output level threshold.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & tag() const
name tag for the exception, or exception type
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: Service.cpp:72
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:218
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
StatusCode Service::sysReinitialize ( )
virtual

Re-initialize the Service.

Implements IService.

Definition at line 204 of file Service.cpp.

204  {
205 
206  StatusCode sc;
207 
208  // Check that the current status is the correct one.
210  MsgStream log ( msgSvc() , name() );
211  error()
212  << "sysReinitialize(): cannot reinitialize service not initialized"
213  << endmsg;
214  return StatusCode::FAILURE;
215  }
216 
217  try {
218 
219  Gaudi::Guards::AuditorGuard guard(this,
220  // check if we want to audit the initialize
221  (m_auditorReinitialize) ? auditorSvc().get() : 0,
223  sc = reinitialize();
224  return sc;
225  }
226  catch( const GaudiException& Exception ) {
227  MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
228  fatal() << " Exception with tag=" << Exception.tag()
229  << " is caught " << endmsg;
230  error() << Exception << endmsg;
231  // Stat stat( chronoSvc() , Exception.tag() ) ;
232  }
233  catch( const std::exception& Exception ) {
234  MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
235  fatal() << " Standard std::exception is caught " << endmsg;
236  error() << Exception.what() << endmsg;
237  // Stat stat( chronoSvc() , "*std::exception*" ) ;
238  }
239  catch( ... ) {
240  MsgStream log ( msgSvc() , name() + ".sysReinitialize()" );
241  fatal() << "UNKNOWN Exception is caught " << endmsg;
242  // Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
243  }
244  return StatusCode::FAILURE ;
245 
246 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
Define general base for Gaudi exception.
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
Definition: Service.cpp:446
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & tag() const
name tag for the exception, or exception type
bool m_auditorReinitialize
Definition: Service.h:271
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
Definition: Service.h:56
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
virtual StatusCode reinitialize()
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
Definition: Service.cpp:292
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:218
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual StatusCode Service::sysReinitialize ( )
virtual

Re-initialize the Service.

Implements IService.

StatusCode Service::sysRestart ( )
virtual

Re-initialize the Service.

Implements IService.

Definition at line 249 of file Service.cpp.

249  {
250 
251  StatusCode sc;
252 
253  // Check that the current status is the correct one.
255  MsgStream log ( msgSvc() , name() );
256  error()
257  << "sysRestart(): cannot restart service in state " << FSMState()
258  << " -- must be RUNNING "
259  << endmsg;
260  return StatusCode::FAILURE;
261  }
262 
263  try {
264 
265  Gaudi::Guards::AuditorGuard guard(this,
266  // check if we want to audit the initialize
267  (m_auditorRestart) ? auditorSvc().get() : 0,
269  sc = restart();
270  return sc;
271  }
272  catch( const GaudiException& Exception ) {
273  fatal() << " Exception with tag=" << Exception.tag()
274  << " is caught " << endmsg;
275  error() << Exception << endmsg;
276  // Stat stat( chronoSvc() , Exception.tag() ) ;
277  }
278  catch( const std::exception& Exception ) {
279  fatal() << " Standard std::exception is caught " << endmsg;
280  error() << Exception.what() << endmsg;
281  // Stat stat( chronoSvc() , "*std::exception*" ) ;
282  }
283  catch( ... ) {
284  fatal() << "UNKNOWN Exception is caught " << endmsg;
285  // Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
286  }
287  return StatusCode::FAILURE ;
288 
289 }
virtual StatusCode restart()
Initialization (from RUNNING to RUNNING, via INITIALIZED).
Definition: Service.cpp:313
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
Define general base for Gaudi exception.
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
Definition: Service.cpp:446
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & tag() const
name tag for the exception, or exception type
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
Definition: Service.h:56
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:329
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:218
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
bool m_auditorRestart
Definition: Service.h:272
virtual StatusCode Service::sysRestart ( )
virtual

Re-initialize the Service.

Implements IService.

virtual StatusCode Service::sysStart ( )
virtual

Initialize Service.

Implements IService.

StatusCode Service::sysStart ( )
virtual

Initialize Service.

Implements IService.

Definition at line 81 of file Service.cpp.

81  {
82  StatusCode sc;
83 
84  try {
86  Gaudi::Guards::AuditorGuard guard(this,
87  // check if we want to audit the initialize
88  (m_auditorStart) ? auditorSvc().get() : 0,
90  sc = start();
91  if (sc.isSuccess())
93  return sc;
94  }
95  catch ( const GaudiException& Exception ) {
96  fatal() << "in sysStart(): exception with tag=" << Exception.tag()
97  << " is caught" << endmsg;
98  error() << Exception << endmsg;
99  // Stat stat( chronoSvc() , Exception.tag() );
100  }
101  catch( const std::exception& Exception ) {
102  fatal() << "in sysStart(): standard std::exception is caught" << endmsg;
103  fatal() << Exception.what() << endmsg;
104  // Stat stat( chronoSvc() , "*std::exception*" );
105  }
106  catch(...) {
107  fatal() << "in sysStart(): UNKNOWN Exception is caught" << endmsg;
108  // Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
109  }
110 
111  return StatusCode::FAILURE;
112 }
Gaudi::StateMachine::State m_targetState
Service state.
Definition: Service.h:248
Define general base for Gaudi exception.
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:246
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
Definition: Service.cpp:446
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
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...
Definition: StateMachine.cpp:8
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & tag() const
name tag for the exception, or exception type
bool m_auditorStart
Definition: Service.h:268
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
virtual StatusCode start()
Start (from INITIALIZED to RUNNING).
Definition: Service.cpp:156
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:218
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual StatusCode Service::sysStop ( )
virtual

Initialize Service.

Implements IService.

StatusCode Service::sysStop ( )
virtual

Initialize Service.

Implements IService.

Definition at line 115 of file Service.cpp.

115  {
116  StatusCode sc;
117 
118  try {
120  Gaudi::Guards::AuditorGuard guard(this,
121  // check if we want to audit the initialize
122  (m_auditorStop) ? auditorSvc().get() : 0,
124  sc = stop();
125  if (sc.isSuccess())
127  return sc;
128  }
129  catch ( const GaudiException& Exception ) {
130  fatal() << "in sysStop(): exception with tag=" << Exception.tag()
131  << " is caught" << endmsg;
132  error() << Exception << endmsg;
133  // Stat stat( chronoSvc() , Exception.tag() );
134  }
135  catch( const std::exception& Exception ) {
136  fatal() << "in sysStop(): standard std::exception is caught" << endmsg;
137  error() << Exception.what() << endmsg;
138  // Stat stat( chronoSvc() , "*std::exception*" );
139  }
140  catch(...) {
141  fatal() << "in sysStop(): UNKNOWN Exception is caught" << endmsg;
142  // Stat stat( chronoSvc() , "*UNKNOWN Exception*" ) ;
143  }
144 
145  return StatusCode::FAILURE;
146 }
Gaudi::StateMachine::State m_targetState
Service state.
Definition: Service.h:248
Define general base for Gaudi exception.
Gaudi::StateMachine::State m_state
Service state.
Definition: Service.h:246
virtual StatusCode stop()
Stop (from RUNNING to INITIALIZED).
Definition: Service.cpp:150
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
Definition: Service.cpp:446
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
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...
Definition: StateMachine.cpp:8
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual const std::string & tag() const
name tag for the exception, or exception type
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Definition: Guards.h:218
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
bool m_auditorStop
Definition: Service.h:269
virtual Gaudi::StateMachine::State Service::targetFSMState ( ) const
inlinevirtual

When we are in the middle of a transition, get the state where the transition is leading us.

Otherwise it returns the same state as state().

Implements IService.

Definition at line 57 of file Service.h.

57 { return m_targetState; }
Gaudi::StateMachine::State m_targetState
Service state.
Definition: Service.h:248
virtual Gaudi::StateMachine::State Service::targetFSMState ( ) const
inlinevirtual

When we are in the middle of a transition, get the state where the transition is leading us.

Otherwise it returns the same state as state().

Implements IService.

Definition at line 57 of file Service.h.

57 { return m_targetState; }
Gaudi::StateMachine::State m_targetState
Service state.
Definition: Service.h:248
virtual StatusCode Service::terminate ( )
inlinevirtual

Initialization (from CONFIGURED to OFFLINE).

Implements IService.

Definition at line 55 of file Service.h.

virtual StatusCode Service::terminate ( )
inlinevirtual

Initialization (from CONFIGURED to OFFLINE).

Implements IService.

Definition at line 55 of file Service.h.

Friends And Related Function Documentation

Definition at line 40 of file Service.h.

Member Data Documentation

BooleanProperty Service::m_auditInit
private

Definition at line 266 of file Service.h.

bool Service::m_auditorFinalize
private

Definition at line 270 of file Service.h.

bool Service::m_auditorInitialize
private

Definition at line 267 of file Service.h.

bool Service::m_auditorReinitialize
private

Definition at line 271 of file Service.h.

bool Service::m_auditorRestart
private

Definition at line 272 of file Service.h.

bool Service::m_auditorStart
private

Definition at line 268 of file Service.h.

bool Service::m_auditorStop
private

Definition at line 269 of file Service.h.

std::string Service::m_name
private

Service Name.

Definition at line 255 of file Service.h.

IntegerProperty Service::m_outputLevel
protected

Service output level.

Definition at line 244 of file Service.h.

SmartIF< IAuditorSvc > Service::m_pAuditorSvc
mutableprivate

Auditor Service.

Definition at line 265 of file Service.h.

PropertyMgr * Service::m_propertyMgr
private

Property Manager.

Definition at line 260 of file Service.h.

Gaudi::StateMachine::State Service::m_state
protected

Service state.

Definition at line 246 of file Service.h.

SmartIF< ISvcLocator > Service::m_svcLocator
mutableprivate

Service Locator reference.

Definition at line 257 of file Service.h.

SmartIF< ISvcManager > Service::m_svcManager
private

Definition at line 258 of file Service.h.

Gaudi::StateMachine::State Service::m_targetState
protected

Service state.

Definition at line 248 of file Service.h.


The documentation for this class was generated from the following files: