Go to the documentation of this file.
26 #define ON_DEBUG if ( msgLevel( MSG::DEBUG ) )
27 #define ON_VERBOSE if ( msgLevel( MSG::VERBOSE ) )
49 if (
name() !=
"MessageSvc" ) {
58 error() <<
"Property AutoRetrieveTools must be set TRUE if CheckToolDeps is True" <<
endmsg;
71 error() <<
"Service failed to initilize ToolHandles : " << Exception <<
endmsg;
78 info() <<
" AlgTool: " << itool->name() <<
endmsg;
81 error() <<
"dcast to IDataHandleHolder failed" <<
endmsg;
85 error() <<
"Service " <<
name() <<
" holds AlgTool " << itool->name()
86 <<
" which holds at least one ReadDataHandle" <<
endmsg;
87 for (
auto& obj : idh->
inputDataObjs() ) { error() <<
" -> InputHandle: " << obj <<
endmsg; }
91 error() <<
"Service " <<
name() <<
" holds AlgTool " << itool->name()
92 <<
" which holds at least one WriteDataHandle" <<
endmsg;
103 fatal() <<
"in sysInitialize(): exception with tag=" << Exception.tag() <<
" is caught" <<
endmsg;
104 error() << Exception <<
endmsg;
106 }
catch (
const std::exception& Exception ) {
107 fatal() <<
"in sysInitialize(): standard std::exception is caught" <<
endmsg;
108 error() << Exception.what() <<
endmsg;
111 fatal() <<
"in sysInitialize(): UNKNOWN Exception is caught" <<
endmsg;
120 ON_DEBUG debug() <<
"Service base class initialized successfully" <<
endmsg;
138 fatal() <<
"in sysStart(): exception with tag=" << Exception.tag() <<
" is caught" <<
endmsg;
139 error() << Exception <<
endmsg;
141 }
catch (
const std::exception& Exception ) {
142 fatal() <<
"in sysStart(): standard std::exception is caught" <<
endmsg;
143 fatal() << Exception.what() <<
endmsg;
146 fatal() <<
"in sysStart(): UNKNOWN Exception is caught" <<
endmsg;
166 fatal() <<
"in sysStop(): exception with tag=" << Exception.tag() <<
" is caught" <<
endmsg;
167 error() << Exception <<
endmsg;
169 }
catch (
const std::exception& Exception ) {
170 fatal() <<
"in sysStop(): standard std::exception is caught" <<
endmsg;
171 error() << Exception.what() <<
endmsg;
174 fatal() <<
"in sysStop(): UNKNOWN Exception is caught" <<
endmsg;
207 fatal() <<
" Exception with tag=" << Exception.tag() <<
" is caught " <<
endmsg;
208 error() << Exception <<
endmsg;
210 }
catch (
const std::exception& Exception ) {
211 fatal() <<
" Standard std::exception is caught " <<
endmsg;
212 error() << Exception.what() <<
endmsg;
215 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
236 error() <<
"sysReinitialize(): cannot reinitialize service not initialized" <<
endmsg;
249 fatal() <<
" Exception with tag=" << Exception.tag() <<
" is caught " <<
endmsg;
250 error() << Exception <<
endmsg;
252 }
catch (
const std::exception& Exception ) {
253 fatal() <<
" Standard std::exception is caught " <<
endmsg;
254 error() << Exception.what() <<
endmsg;
257 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
270 error() <<
"sysRestart(): cannot restart service in state " <<
FSMState() <<
" -- must be RUNNING " <<
endmsg;
282 fatal() <<
" Exception with tag=" << Exception.tag() <<
" is caught " <<
endmsg;
283 error() << Exception <<
endmsg;
285 }
catch (
const std::exception& Exception ) {
286 fatal() <<
" Standard std::exception is caught " <<
endmsg;
287 error() << Exception.what() <<
endmsg;
290 fatal() <<
"UNKNOWN Exception is caught " <<
endmsg;
322 error() <<
"restart(): cannot be stopped" <<
endmsg;
327 error() <<
"restart(): cannot be started" <<
endmsg;
342 if (
m_name !=
"MessageSvc" ) {
350 appMgr->getProperty( &audit ).ignore();
373 if ( !th->isEnabled() ) {
375 debug() <<
"ToolHandle " << th->typeAndName() <<
" not used" <<
endmsg;
379 auto sc = th->retrieve();
380 if ( sc.isFailure() ) {
384 auto*
tool = th->get();
386 debug() <<
"Adding " << ( th->isPublic() ?
"public" :
"private" ) <<
" ToolHandle tool " <<
tool->name() <<
" ("
393 debug() <<
"Registering all Tools in ToolHandleArray " << thArr->propertyName() <<
endmsg;
395 for (
auto toolHandle : thArr->getBaseArray() ) {
401 error() <<
"Error retrieving Tool " << toolHandle->typeAndName() <<
" in ToolHandleArray "
402 << 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
static constexpr std::string Start
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
static constexpr std::string Finalize
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
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
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
static constexpr std::string ReStart
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
static constexpr std::string ReInitialize
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.
static constexpr std::string Stop
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
static constexpr std::string Initialize
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