Go to the documentation of this file.
26 #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
27 #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;
86 for (
auto& obj : idh->
inputDataObjs() ) { error() <<
" -> InputHandle: " << obj <<
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;
103 error() << Exception <<
endmsg;
106 fatal() <<
"in sysInitialize(): standard std::exception is caught" <<
endmsg;
107 error() << Exception.what() <<
endmsg;
110 fatal() <<
"in sysInitialize(): UNKNOWN Exception is caught" <<
endmsg;
119 ON_DEBUG debug() <<
"Service base class initialized successfully" <<
endmsg;
137 fatal() <<
"in sysStart(): exception with tag=" << Exception.tag() <<
" is caught" <<
endmsg;
138 error() << Exception <<
endmsg;
141 fatal() <<
"in sysStart(): standard std::exception is caught" <<
endmsg;
142 fatal() << Exception.what() <<
endmsg;
145 fatal() <<
"in sysStart(): UNKNOWN Exception is caught" <<
endmsg;
165 fatal() <<
"in sysStop(): exception with tag=" << Exception.tag() <<
" is caught" <<
endmsg;
166 error() << Exception <<
endmsg;
169 fatal() <<
"in sysStop(): standard std::exception is caught" <<
endmsg;
170 error() << Exception.what() <<
endmsg;
173 fatal() <<
"in sysStop(): UNKNOWN Exception is caught" <<
endmsg;
205 fatal() <<
" Exception with tag=" << Exception.tag() <<
" is caught " <<
endmsg;
206 error() << Exception <<
endmsg;
209 fatal() <<
" Standard std::exception is caught " <<
endmsg;
210 error() << Exception.what() <<
endmsg;
213 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
234 error() <<
"sysReinitialize(): cannot reinitialize service not initialized" <<
endmsg;
247 fatal() <<
" Exception with tag=" << Exception.tag() <<
" is caught " <<
endmsg;
248 error() << Exception <<
endmsg;
251 fatal() <<
" Standard std::exception is caught " <<
endmsg;
252 error() << Exception.what() <<
endmsg;
255 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
268 error() <<
"sysRestart(): cannot restart service in state " <<
FSMState() <<
" -- must be RUNNING " <<
endmsg;
280 fatal() <<
" Exception with tag=" << Exception.tag() <<
" is caught " <<
endmsg;
281 error() << Exception <<
endmsg;
284 fatal() <<
" Standard std::exception is caught " <<
endmsg;
285 error() << Exception.what() <<
endmsg;
288 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
320 error() <<
"restart(): cannot be stopped" <<
endmsg;
325 error() <<
"restart(): cannot be started" <<
endmsg;
340 if (
m_name !=
"MessageSvc" ) {
370 if ( !th->isEnabled() ) {
372 debug() <<
"ToolHandle " << th->typeAndName() <<
" not used" <<
endmsg;
376 auto sc = th->retrieve();
377 if ( sc.isFailure() ) {
381 auto*
tool = th->get();
383 debug() <<
"Adding " << ( th->isPublic() ?
"public" :
"private" ) <<
" ToolHandle tool " <<
tool->name() <<
" ("
390 debug() <<
"Registering all Tools in ToolHandleArray " << thArr->propertyName() <<
endmsg;
392 for (
auto toolHandle : thArr->getBaseArray() ) {
398 error() <<
"Error retrieving Tool " << toolHandle->typeAndName() <<
" in ToolHandleArray "
399 << thArr->propertyName() <<
". Not registered" <<
endmsg;
Gaudi::Property< bool > m_auditorStart
Gaudi::Property< bool > m_auditorStop
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
SmartIF< IAuditorSvc > m_pAuditorSvc
Auditor Service
std::vector< GaudiHandleArrayBase * > m_toolHandleArrays
StatusCode initialize() override
StatusCode sysInitialize() override
Initialize Service
StatusCode sysRestart() override
Re-initialize the Service.
StatusCode sysStart() override
Initialize Service
Gaudi::StateMachine::State m_state
Service state
StatusCode start() override
get
decorate the vector of properties
Gaudi::Property< bool > m_auditorInitialize
SmartIF< ISvcLocator > m_svcLocator
Service Locator reference
Gaudi::Property< bool > m_auditorReinitialize
void initToolHandles() const
bool assign(const Details::PropertyBase &source) override
get the value from another property
virtual const DataObjIDColl & inputDataObjs() const =0
StatusCode sysStop() override
Initialize Service
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
StatusCode finalize() override
Gaudi::StateMachine::State FSMState() const override
void bindPropertiesTo(Gaudi::Interfaces::IOptionsSvc &optsSvc)
std::string m_name
Service Name
Gaudi::Property< bool > m_auditInit
const std::vector< IAlgTool * > & tools() const
std::once_flag m_initFlag
~Service() override
Standard Destructor
MSG::Level setUpMessaging() const
Set up local caches.
const std::string & name() const override
Retrieve name of the service
std::vector< IAlgTool * > m_tools
Gaudi::Property< bool > m_auditorFinalize
virtual const DataObjIDColl & outputDataObjs() const =0
Gaudi::Property< bool > m_auditorRestart
Details::PropertyBase & declareUpdateHandler(std::function< void(Details::PropertyBase &)> fun) override
set new callback for update
const ValueType & value() const
void updateMsgStreamOutputLevel(int level)
Update the output level of the cached MsgStream.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
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...
constexpr static const auto SUCCESS
StatusCode stop() override
Gaudi::Property< bool > m_autoRetrieveTools
StatusCode sysFinalize() override
Finalize Service
SmartIF< ISvcManager > m_svcManager
StatusCode reinitialize() override
Service(std::string name, ISvcLocator *svcloc)
Standard Constructor
void setServiceManager(ISvcManager *ism) override
StatusCode sysReinitialize() override
Re-initialize the Service.
Gaudi::StateMachine::State m_targetState
Service state
constexpr static const auto FAILURE
SmartIF< IAuditorSvc > & auditorSvc() const
The standard auditor service.May not be invoked before sysInitialize() has been invoked.
StatusCode restart() override
Gaudi::Property< bool > m_checkToolDeps
Gaudi::Property< int > m_outputLevel
flag indicating whether ToolHandle tools have been added to m_tools
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
std::vector< BaseToolHandle * > m_toolHandles