19 #define ON_DEBUG if (UNLIKELY(outputLevel() <= MSG::DEBUG))
20 #define ON_VERBOSE if (UNLIKELY(outputLevel() <= MSG::VERBOSE))
26 const unsigned long count = (m_refCount) ? --m_refCount : m_refCount;
46 if ((
name() !=
"MessageSvc") &&
msgSvc().isValid())
54 fatal() <<
"in sysInitialize(): exception with tag=" << Exception.
tag()
59 catch(
const std::exception& Exception ) {
60 fatal() <<
"in sysInitialize(): standard std::exception is caught" <<
endmsg;
65 fatal() <<
"in sysInitialize(): UNKNOWN Exception is caught" <<
endmsg;
98 fatal() <<
"in sysStart(): exception with tag=" << Exception.
tag()
103 catch(
const std::exception& Exception ) {
104 fatal() <<
"in sysStart(): standard std::exception is caught" <<
endmsg;
109 fatal() <<
"in sysStart(): UNKNOWN Exception is caught" <<
endmsg;
132 fatal() <<
"in sysStop(): exception with tag=" << Exception.
tag()
133 <<
" is caught" <<
endmsg;
137 catch(
const std::exception& Exception ) {
138 fatal() <<
"in sysStop(): standard std::exception is caught" <<
endmsg;
143 fatal() <<
"in sysStop(): UNKNOWN Exception is caught" <<
endmsg;
179 fatal() <<
" Exception with tag=" << Exception.
tag()
180 <<
" is caught " <<
endmsg;
184 catch(
const std::exception& Exception ) {
185 fatal() <<
" Standard std::exception is caught " <<
endmsg;
190 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
214 <<
"sysReinitialize(): cannot reinitialize service not initialized"
230 fatal() <<
" Exception with tag=" << Exception.
tag()
231 <<
" is caught " <<
endmsg;
235 catch(
const std::exception& Exception ) {
237 fatal() <<
" Standard std::exception is caught " <<
endmsg;
243 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
259 <<
"sysRestart(): cannot restart service in state " <<
FSMState()
260 <<
" -- must be RUNNING "
275 fatal() <<
" Exception with tag=" << Exception.
tag()
276 <<
" is caught " <<
endmsg;
280 catch(
const std::exception& Exception ) {
281 fatal() <<
" Standard std::exception is caught " <<
endmsg;
286 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
319 error() <<
"restart(): cannot be stopped" <<
endmsg;
324 error() <<
"restart(): cannot be started" <<
endmsg;
372 const bool CREATEIF(
true);
383 if (jos->setMyProperties(
name(),
this ).isFailure()) {
401 if ( (name !=
"MessageSvc") &&
msgSvc().isValid() ) {
414 const Property& prop = appMgr->getProperty(
"AuditServices");
415 if (
m_name !=
"IncidentSvc") {
433 if ( (
name() !=
"MessageSvc") &&
msgSvc().isValid() ) {
virtual ~Service()
Standard Destructor.
virtual StatusCode restart()
Initialization (from RUNNING to RUNNING, via INITIALIZED).
BooleanProperty m_auditInit
Gaudi::StateMachine::State m_targetState
Service state.
Definition of the MsgStream class used to transmit messages.
IntegerProperty m_outputLevel
Service output level.
StatusCode setProperty(const Property &p)
set the property form another property
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.
virtual StatusCode stop()
Stop (from RUNNING to INITIALIZED).
virtual StatusCode setProperty(const Property &p)
Set the property by property.
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
The ISvcManager is the interface implemented by the Service Factory in the Application Manager to sup...
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
virtual StatusCode getProperty(Property *p) const
Get the property by property.
SmartIF< ISvcLocator > m_svcLocator
Service Locator reference.
std::string m_name
Service Name.
virtual StatusCode sysFinalize()
Finalize Service.
Property manager helper class.
bool isFailure() const
Test for a status code of FAILURE.
GAUDI_API bool isGaudiThreaded(const std::string &name)
test if current Gaudi object is running /will run in a thread
virtual void declareUpdateHandler(PropertyCallbackFunctor *pf)
set new callback for update
bool isValid() const
Allow for check if smart pointer is valid.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
void updateMsgStreamOutputLevel(int level)
Update the output level of the cached MsgStream.
This class is used for returning status codes from appropriate routines.
StatusCode getProperty(Property *p) const
get the property
virtual const std::string & tag() const
name tag for the exception, or exception type
virtual StatusCode sysStop()
Initialize Service.
bool m_auditorReinitialize
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
const TYPE & value() const
explicit conversion
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
virtual const std::string & name() const
Retrieve name of the service.
virtual StatusCode sysInitialize()
Initialize Service.
virtual StatusCode reinitialize()
Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
PropertyMgr * m_propertyMgr
Property Manager.
const std::vector< Property * > & getProperties() const
get all properties
Property base class allowing Property* collections to be "homogeneous".
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
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...
virtual unsigned long release()
Release Interface instance.
virtual StatusCode sysRestart()
Re-initialize the Service.
void initOutputLevel(Property &prop)
callback for output level property
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
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.
virtual StatusCode sysReinitialize()
Re-initialize the Service.
virtual StatusCode start()
Start (from INITIALIZED to RUNNING).
SmartIF< ISvcManager > m_svcManager
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way...
Service(const std::string &name, ISvcLocator *svcloc)
Standard Constructor.
virtual StatusCode sysStart()
Initialize Service.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void setServiceManager(ISvcManager *ism)
GAUDI_API std::string getGaudiThreadGenericName(const std::string &name)
helper function to extract Gaudi instance name from thread copy name
virtual const std::vector< Property * > & getProperties() const
Get list of properties.
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.