17 #define ON_DEBUG if (msgLevel(MSG::DEBUG))
18 #define ON_VERBOSE if (msgLevel(MSG::VERBOSE))
47 fatal() <<
"in sysInitialize(): exception with tag=" << Exception.
tag()
53 fatal() <<
"in sysInitialize(): standard std::exception is caught" <<
endmsg;
58 fatal() <<
"in sysInitialize(): UNKNOWN Exception is caught" <<
endmsg;
92 fatal() <<
"in sysStart(): exception with tag=" << Exception.
tag()
98 fatal() <<
"in sysStart(): standard std::exception is caught" <<
endmsg;
103 fatal() <<
"in sysStart(): UNKNOWN Exception is caught" <<
endmsg;
126 fatal() <<
"in sysStop(): exception with tag=" << Exception.
tag()
127 <<
" is caught" <<
endmsg;
132 fatal() <<
"in sysStop(): standard std::exception is caught" <<
endmsg;
137 fatal() <<
"in sysStop(): UNKNOWN Exception is caught" <<
endmsg;
173 fatal() <<
" Exception with tag=" << Exception.
tag()
174 <<
" is caught " <<
endmsg;
179 fatal() <<
" Standard std::exception is caught " <<
endmsg;
184 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
206 <<
"sysReinitialize(): cannot reinitialize service not initialized"
221 fatal() <<
" Exception with tag=" << Exception.
tag()
222 <<
" is caught " <<
endmsg;
227 fatal() <<
" Standard std::exception is caught " <<
endmsg;
232 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
247 <<
"sysRestart(): cannot restart service in state " <<
FSMState()
248 <<
" -- must be RUNNING "
263 fatal() <<
" Exception with tag=" << Exception.
tag()
264 <<
" is caught " <<
endmsg;
269 fatal() <<
" Standard std::exception is caught " <<
endmsg;
274 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
307 error() <<
"restart(): cannot be stopped" <<
endmsg;
312 error() <<
"restart(): cannot be started" <<
endmsg;
364 const bool CREATEIF(
true);
375 if (jos->setMyProperties(
name(),
this ).isFailure()) {
387 m_name(
std::move(name) ),
388 m_svcLocator( svcloc ),
392 if ( (name !=
"MessageSvc") &&
msgSvc() ) {
406 if (
m_name !=
"IncidentSvc") {
BooleanProperty m_auditInit
Gaudi::StateMachine::State m_targetState
Service state.
StatusCode initialize() override
IntegerProperty m_outputLevel
Service output level.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Define general base for Gaudi exception.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Gaudi::StateMachine::State m_state
Service state.
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
StatusCode finalize() override
Gaudi::StateMachine::State FSMState() const override
virtual Property & declareUpdateHandler(std::function< void(Property &)> fun)
set new callback for update
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
StatusCode setProperty(const Property &p) override
set the property form another property
StatusCode start() override
The ISvcManager is the interface implemented by the Service Factory in the Application Manager to sup...
bool isSuccess() const
Test for a status code of SUCCESS.
StatusCode sysRestart() override
Re-initialize the Service.
StatusCode sysStart() override
Initialize Service.
StatusCode setProperty(const Property &p) override
SmartIF< ISvcLocator > m_svcLocator
Service Locator reference.
std::string m_name
Service Name.
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
StatusCode getProperty(Property *p) const override
get the property
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
const std::string & name() const override
Retrieve name of the service.
const std::vector< Property * > & getProperties() const override
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual int outputLevel() const =0
Retrieve the current output level threshold.
StatusCode sysStop() override
Initialize Service.
Main interface for the JobOptions service.
SmartIF< PropertyMgr > m_propertyMgr
Property Manager.
void updateMsgStreamOutputLevel(int level)
Update the output level of the cached MsgStream.
~Service() override
Standard Destructor.
This class is used for returning status codes from appropriate routines.
const std::vector< Property * > & getProperties() const override
get all properties
virtual const std::string & tag() const
name tag for the exception, or exception type
StatusCode reinitialize() override
bool m_auditorReinitialize
StatusCode stop() override
std::once_flag m_initFlag
StatusCode sysFinalize() override
Finalize Service.
const TYPE & value() const
explicit conversion
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
Property base class allowing Property* collections to be "homogeneous".
StatusCode sysReinitialize() override
Re-initialize the Service.
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)
bool hasProperty(const std::string &name) const override
StatusCode getProperty(Property *p) const override
void initOutputLevel(Property &prop)
callback for output level property
Service(std::string name, ISvcLocator *svcloc)
Standard Constructor.
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< ISvcManager > m_svcManager
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
void setServiceManager(ISvcManager *ism) override
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...
StatusCode restart() override
virtual StatusCode removeService(IService *svc)=0
Remove a service from the "active" list of services of the factory.
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 sysInitialize() override
Initialize Service.