25#define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
26#define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) )
48 if (
name() !=
"MessageSvc" ) {
57 error() <<
"Property AutoRetrieveTools must be set TRUE if CheckToolDeps is True" <<
endmsg;
70 error() <<
"Service failed to initilize ToolHandles : " << Exception <<
endmsg;
77 info() <<
" AlgTool: " << itool->name() <<
endmsg;
80 error() <<
"dcast to IDataHandleHolder failed" <<
endmsg;
84 error() <<
"Service " <<
name() <<
" holds AlgTool " << itool->name()
85 <<
" which holds at least one ReadDataHandle" <<
endmsg;
90 error() <<
"Service " <<
name() <<
" holds AlgTool " << itool->name()
91 <<
" which holds at least one WriteDataHandle" <<
endmsg;
102 fatal() <<
"in sysInitialize(): exception with tag=" << Exception.tag() <<
" is caught" <<
endmsg;
105 }
catch (
const std::exception& Exception ) {
106 fatal() <<
"in sysInitialize(): standard std::exception is caught" <<
endmsg;
110 fatal() <<
"in sysInitialize(): UNKNOWN Exception is caught" <<
endmsg;
137 fatal() <<
"in sysStart(): exception with tag=" << Exception.tag() <<
" is caught" <<
endmsg;
140 }
catch (
const std::exception& Exception ) {
141 fatal() <<
"in sysStart(): standard std::exception is caught" <<
endmsg;
145 fatal() <<
"in sysStart(): UNKNOWN Exception is caught" <<
endmsg;
165 fatal() <<
"in sysStop(): exception with tag=" << Exception.tag() <<
" is caught" <<
endmsg;
168 }
catch (
const std::exception& Exception ) {
169 fatal() <<
"in sysStop(): standard std::exception is caught" <<
endmsg;
173 fatal() <<
"in sysStop(): UNKNOWN Exception is caught" <<
endmsg;
206 fatal() <<
" Exception with tag=" << Exception.tag() <<
" is caught " <<
endmsg;
209 }
catch (
const std::exception& Exception ) {
210 fatal() <<
" Standard std::exception is caught " <<
endmsg;
214 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
235 error() <<
"sysReinitialize(): cannot reinitialize service not initialized" <<
endmsg;
248 fatal() <<
" Exception with tag=" << Exception.tag() <<
" is caught " <<
endmsg;
251 }
catch (
const std::exception& Exception ) {
252 fatal() <<
" Standard std::exception is caught " <<
endmsg;
256 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
269 error() <<
"sysRestart(): cannot restart service in state " <<
FSMState() <<
" -- must be RUNNING " <<
endmsg;
281 fatal() <<
" Exception with tag=" << Exception.tag() <<
" is caught " <<
endmsg;
284 }
catch (
const std::exception& Exception ) {
285 fatal() <<
" Standard std::exception is caught " <<
endmsg;
289 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
321 error() <<
"restart(): cannot be stopped" <<
endmsg;
326 error() <<
"restart(): cannot be started" <<
endmsg;
341 if (
m_name !=
"MessageSvc" ) {
349 appMgr->getProperty( &audit ).ignore();
372 if ( !th->isEnabled() ) {
374 debug() <<
"ToolHandle " << th->typeAndName() <<
" not used" <<
endmsg;
378 auto sc = th->retrieve();
379 if ( sc.isFailure() ) {
383 auto* tool = th->get();
385 debug() <<
"Adding " << ( th->isPublic() ?
"public" :
"private" ) <<
" ToolHandle tool " << tool->name() <<
" ("
386 << tool->type() <<
")" <<
endmsg;
392 debug() <<
"Registering all Tools in ToolHandleArray " << thArr->propertyName() <<
endmsg;
394 for (
auto toolHandle : thArr->getBaseArray() ) {
400 error() <<
"Error retrieving Tool " << toolHandle->typeAndName() <<
" in ToolHandleArray "
401 << thArr->propertyName() <<
". Not registered" <<
endmsg;
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
MSG::Level msgLevel() const
MSG::Level setUpMessaging() const
void updateMsgStreamOutputLevel(int level)
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
It is a simple guard, which "locks" the scope for the Auditor Service is am exception-safe way.
static const std::string Stop
static const std::string Initialize
static const std::string Finalize
static const std::string Start
static const std::string ReInitialize
static const std::string ReStart
Implementation of property with value of concrete type.
Define general base for Gaudi exception.
virtual const DataObjIDColl & inputDataObjs() const =0
virtual const DataObjIDColl & outputDataObjs() const =0
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
virtual SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
The ISvcManager is the interface implemented by the Service Factory in the Application Manager to sup...
void bindPropertiesTo(Gaudi::Interfaces::IOptionsSvc &optsSvc)
Gaudi::StateMachine::State FSMState() const override
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Gaudi::Property< bool > m_auditorStart
StatusCode sysFinalize() override
Finalize Service.
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
Gaudi::Property< bool > m_auditorFinalize
StatusCode sysInitialize() override
Initialize Service.
StatusCode finalize() override
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
SmartIF< ISvcManager > m_svcManager
std::once_flag m_initFlag
Gaudi::Property< int > m_outputLevel
flag indicating whether ToolHandle tools have been added to m_tools
Gaudi::Property< bool > m_auditorStop
const std::string & name() const override
Retrieve name of the service.
StatusCode stop() override
Gaudi::StateMachine::State m_targetState
Service state.
StatusCode sysReinitialize() override
Re-initialize the Service.
StatusCode reinitialize() override
std::vector< IAlgTool * > m_tools
Gaudi::Property< bool > m_auditorRestart
std::vector< BaseToolHandle * > m_toolHandles
StatusCode sysStart() override
Initialize Service.
Gaudi::StateMachine::State m_state
Service state.
StatusCode restart() override
Gaudi::Property< bool > m_checkToolDeps
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service.
void setServiceManager(ISvcManager *ism) override
Gaudi::Property< bool > m_autoRetrieveTools
StatusCode sysStop() override
Initialize Service.
SmartIF< ISvcLocator > m_svcLocator
Service Locator reference.
SmartIF< IFace > service(const std::string &name, bool createIf=true) const
StatusCode start() override
Gaudi::Property< bool > m_auditorInitialize
Gaudi::Property< bool > m_auditorReinitialize
StatusCode sysRestart() override
Re-initialize the Service.
std::string m_name
Service Name.
StatusCode initialize() override
Service(std::string name, ISvcLocator *svcloc)
Standard Constructor.
const std::vector< IAlgTool * > & tools() const
void initToolHandles() const
Small smart pointer class with automatic reference counting for IInterface.
This class is used for returning status codes from appropriate routines.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE
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...