| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Member Functions | Private Attributes | List of all members
AuditorSvc Class Reference

`#include <src/AuditorSvc.h>`

Inheritance diagram for AuditorSvc:
[legend]
Collaboration diagram for AuditorSvc:
[legend]

## Public Member Functions
StatusCode | initialize () override
StatusCode | finalize () override
void | before (StandardEventType, INamedInterface *) override
| The following methods are meant to be implemented by the child class... More...
void | before (StandardEventType, const std::string &) override
void | before (CustomEventTypeRef, INamedInterface *) override
void | before (CustomEventTypeRef, const std::string &) override
void | after (StandardEventType, INamedInterface *, const StatusCode &) override
void | after (StandardEventType, const std::string &, const StatusCode &) override
void | after (CustomEventTypeRef, INamedInterface *, const StatusCode &) override
void | after (CustomEventTypeRef, const std::string &, const StatusCode &) override
void | beforeInitialize (INamedInterface *ini) override
void | afterInitialize (INamedInterface *ini) override
void | beforeReinitialize (INamedInterface *ini) override
void | afterReinitialize (INamedInterface *ini) override
void | beforeExecute (INamedInterface *ini) override
void | afterExecute (INamedInterface *ini, const StatusCode &) override
void | beforeBeginRun (INamedInterface *ini) override
void | afterBeginRun (INamedInterface *ini) override
void | beforeEndRun (INamedInterface *ini) override
void | afterEndRun (INamedInterface *ini) override
void | beforeFinalize (INamedInterface *ini) override
void | afterFinalize (INamedInterface *ini) override
bool | isEnabled () const override
StatusCode | sysInitialize () override
StatusCode | sysFinalize () override
IAuditor * | getAuditor (const std::string &name) override
| ~AuditorSvc () override=default
Public Member Functions inherited from extends< Service, IAuditorSvc >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from Service
const std::string & | name () const override
| Retrieve name of the service. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | reinitialize () override
StatusCode | restart () override
StatusCode | sysInitialize () override
| Initialize Service. More...
StatusCode | sysStart () override
| Initialize Service. More...
StatusCode | sysStop () override
| Initialize Service. More...
StatusCode | sysFinalize () override
| Finalize Service. More...
StatusCode | sysReinitialize () override
| Re-initialize the Service. More...
StatusCode | sysRestart () override
| Re-initialize the Service. More...
| Service (std::string name, ISvcLocator *svcloc)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| Retrieve pointer to service locator. More...
StatusCode | setProperties ()
| Method for setting declared properties to the values specified for the job. More...
template<class T >
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. More...
template<class T >
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const
template<typename IFace = IService>
SmartIF< IFace > | service (const std::string &name, bool createIf=true) const
template<class T >
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const
| Access a service by name and type, creating it if it doesn't already exist. More...
template<class T >
StatusCode | declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Private tool. More...
template<class T >
StatusCode | declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Public tool. More...
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| PropertyHolder ()=default
| ~PropertyHolder () override=default
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Details::PropertyBase &prop)
| Declare a property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
| Helper to wrap a regular data member and use it as a regular property. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, TYPE &value, const std::string &doc="none") const
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
| Declare a PropertyBase instance setting name and documentation. More...
Gaudi::Details::PropertyBase * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
| Declare a remote property. More...
StatusCode | setProperty (const Gaudi::Details::PropertyBase &p) override
| set the property form another property More...
StatusCode | setProperty (const std::string &s) override
| set the property from the formatted string More...
StatusCode | setProperty (const std::string &n, const std::string &v) override
| set the property from name and the value More...
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
StatusCode | getProperty (Gaudi::Details::PropertyBase *p) const override
| get the property More...
const Gaudi::Details::PropertyBase & | getProperty (const std::string &name) const override
| get the property by name More...
StatusCode | getProperty (const std::string &n, std::string &v) const override
| convert the property to the string More...
const std::vector< Gaudi::Details::PropertyBase * > & | getProperties () const override
| get all properties More...
bool | hasProperty (const std::string &name) const override
| Return true if we have a property with the given name. More...
| PropertyHolder (const PropertyHolder &)=delete
PropertyHolder & | operator= (const PropertyHolder &)=delete
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleBase &ref, const std::string &doc="none")
| Specializations for various GaudiHandles. More...
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, GaudiHandleArrayBase &ref, const std::string &doc="none")
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, DataObjectHandleBase &ref, const std::string &doc="none")
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Private Member Functions
SmartIF< IAuditor > | newAuditor_ (MsgStream &, const std::string &)
SmartIF< IAuditor > | findAuditor_ (const std::string &)
StatusCode | syncAuditors_ ()

## Private Attributes
Gaudi::Property< std::vector< std::string > > | m_audNameList {this, "Auditors", {}, "list of auditors names"}
Gaudi::Property< bool > | m_isEnabled {this, "Enable", true, "enable/disable alltogether the auditors"}
std::vector< SmartIF< IAuditor > > | m_pAudList

## Additional Inherited Members
Public Types inherited from extends< Service, IAuditorSvc >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
Public Types inherited from Service
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > | Factory
Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using | PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
| Typedef used to refer to this class from derived classes, as in. More...
Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...
Protected Member Functions inherited from Service
| ~Service () override
| Standard Destructor. More...
int | outputLevel () const
| get the `Service's` output level More...
Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBase * | property (const std::string &name) const
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...
Protected Attributes inherited from Service
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::Property< int > | m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
Gaudi::Property< bool > | m_auditInit {this, "AuditServices", false, "[[deprecated]] unused"}
Gaudi::Property< bool > | m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
Gaudi::Property< bool > | m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
Gaudi::Property< bool > | m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
Gaudi::Property< bool > | m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
Gaudi::Property< bool > | m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
Gaudi::Property< bool > | m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
SmartIF< IAuditorSvc > | m_pAuditorSvc
| Auditor Service. More...

## Detailed Description

Definition at line 18 of file AuditorSvc.h.

## Constructor & Destructor Documentation

AuditorSvc::~AuditorSvc | ( |  | ) |
| override default

## Member Function Documentation

void AuditorSvc::after | ( | StandardEventType | evt,
|  | INamedInterface * | obj,
|  | const StatusCode & | sc
| ) |  |
| override

Definition at line 134 of file AuditorSvc.cpp.

134 {
135 if (!isEnabled()) return;
136 for (auto& it : m_pAudList ) {
137 if(it->isEnabled()) it->after(evt,obj,sc);
138 }
139 }
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
IOTest.evt
evt
Definition: IOTest.py:85
AuditorSvc::isEnabled
bool isEnabled() const override
Definition: AuditorSvc.cpp:191

void AuditorSvc::after | ( | StandardEventType | evt,
|  | const std::string & | name,
|  | const StatusCode & | sc
| ) |  |
| override

Definition at line 141 of file AuditorSvc.cpp.

141 {
142 if (!isEnabled()) return;
143 for (auto& it : m_pAudList ) {
144 if(it->isEnabled()) it->after(evt,name,sc);
145 }
146 }
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
IOTest.evt
evt
Definition: IOTest.py:85
AuditorSvc::isEnabled
bool isEnabled() const override
Definition: AuditorSvc.cpp:191

void AuditorSvc::after | ( | CustomEventTypeRef | evt,
|  | INamedInterface * | obj,
|  | const StatusCode & | sc
| ) |  |
| override

Definition at line 148 of file AuditorSvc.cpp.

148 {
149 if (!isEnabled()) return;
150 for (auto& it : m_pAudList ) {
151 if(it->isEnabled()) it->after(evt,obj,sc);
152 }
153 }
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
IOTest.evt
evt
Definition: IOTest.py:85
AuditorSvc::isEnabled
bool isEnabled() const override
Definition: AuditorSvc.cpp:191

void AuditorSvc::after | ( | CustomEventTypeRef | evt,
|  | const std::string & | name,
|  | const StatusCode & | sc
| ) |  |
| override

Definition at line 155 of file AuditorSvc.cpp.

155 {
156 if (!isEnabled()) return;
157 for (auto& it : m_pAudList) {
158 if(it->isEnabled()) it->after(evt,name,sc);
159 }
160 }
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
IOTest.evt
evt
Definition: IOTest.py:85
AuditorSvc::isEnabled
bool isEnabled() const override
Definition: AuditorSvc.cpp:191

void AuditorSvc::afterBeginRun | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::afterEndRun | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::afterExecute | ( | INamedInterface * | ini,
|  | const StatusCode & |
| ) |  |
| override

Definition at line 176 of file AuditorSvc.cpp.

176 {
177 throw GaudiException("The method afterExecute is obsolete do not call it.",
178 "AuditorSvc::afterExecute" , StatusCode::FAILURE);
179 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
StatusCode::FAILURE
Definition: StatusCode.h:29

void AuditorSvc::afterFinalize | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::afterInitialize | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::afterReinitialize | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::before | ( | StandardEventType | evt,
|  | INamedInterface * | obj
| ) |  |
| override

The following methods are meant to be implemented by the child class...

Definition at line 105 of file AuditorSvc.cpp.

105 {
106 if (!isEnabled()) return;
107 for (auto& it : m_pAudList ) {
108 if(it->isEnabled()) it->before(evt,obj);
109 }
110 }
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
IOTest.evt
evt
Definition: IOTest.py:85
AuditorSvc::isEnabled
bool isEnabled() const override
Definition: AuditorSvc.cpp:191

void AuditorSvc::before | ( | StandardEventType | evt,
|  | const std::string & | name
| ) |  |
| override

Definition at line 112 of file AuditorSvc.cpp.

112 {
113 if (!isEnabled()) return;
114 for (auto& it : m_pAudList ) {
115 if(it->isEnabled()) it->before(evt,name);
116 }
117 }
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
IOTest.evt
evt
Definition: IOTest.py:85
AuditorSvc::isEnabled
bool isEnabled() const override
Definition: AuditorSvc.cpp:191

void AuditorSvc::before | ( | CustomEventTypeRef | evt,
|  | INamedInterface * | obj
| ) |  |
| override

Definition at line 119 of file AuditorSvc.cpp.

119 {
120 if (!isEnabled()) return;
121 for (auto& it : m_pAudList) {
122 if(it->isEnabled()) it->before(evt,obj);
123 }
124 }
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
IOTest.evt
evt
Definition: IOTest.py:85
AuditorSvc::isEnabled
bool isEnabled() const override
Definition: AuditorSvc.cpp:191

void AuditorSvc::before | ( | CustomEventTypeRef | evt,
|  | const std::string & | name
| ) |  |
| override

Definition at line 126 of file AuditorSvc.cpp.

126 {
127 if (!isEnabled()) return;
128 for (auto& it : m_pAudList ) {
129 if(it->isEnabled()) it->before(evt,name);
130 }
131 }
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
IOTest.evt
evt
Definition: IOTest.py:85
AuditorSvc::isEnabled
bool isEnabled() const override
Definition: AuditorSvc.cpp:191

void AuditorSvc::beforeBeginRun | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::beforeEndRun | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::beforeExecute | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::beforeFinalize | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::beforeInitialize | ( | INamedInterface * | ini | ) |
| override

void AuditorSvc::beforeReinitialize | ( | INamedInterface * | ini | ) |
| override

StatusCode AuditorSvc::finalize | ( |  | ) |
| override

Definition at line 93 of file AuditorSvc.cpp.

93 {
94
95 for (auto& it : m_pAudList ) {
96 if(it->isEnabled()) it->sysFinalize().ignore();
97 }
98 m_pAudList.clear();
99
100 // Finalize this specific service
101 return Service::finalize();
102 }
Service::finalize
StatusCode finalize() override
Definition: Service.cpp:174
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98

SmartIF< IAuditor > AuditorSvc::findAuditor_ | ( | const std::string & | name | ) |
| private

Definition at line 41 of file AuditorSvc.cpp.

41 {
42 // find an auditor by name, return 0 on error
43 const std::string item_name = Gaudi::Utils::TypeNameString(name).name();
44 auto it = std::find_if( std::begin(m_pAudList), std::end(m_pAudList),
45 [&](const IAuditor* i) { return i->name() == item_name; });
46 return SmartIF<IAuditor>{ it != std::end(m_pAudList) ? *it : nullptr };
47 }
SmartIF< IAuditor >
std::end
T end(T...args)
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
std::string
STL class.
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:12
std::find_if
T find_if(T...args)
std::begin
T begin(T...args)
Gaudi::Utils::TypeNameString::name
const std::string & name() const
Definition: TypeNameString.h:40
IAuditor
The IAuditor is the interface implmented by the AlgAuditor base class.
Definition: IAuditor.h:18
INamedInterface::name
virtual const std::string & name() const =0
Retrieve the name of the instance.

IAuditor * AuditorSvc::getAuditor | ( | const std::string & | name | ) |
| override

Definition at line 203 of file AuditorSvc.cpp.

203 {
204 // by interactively setting properties, auditors might be out of sync
205 if ( !syncAuditors_().isSuccess() ) {
206 // as we didn't manage to sync auditors, the safest bet is to assume the
207 // worse...
208 // So don't let clients play with an AuditorSvc in an inconsistent state
209 return nullptr;
210 }
211
212 // search available auditors, returns 0 on error
213 return findAuditor_( name );
214 }
AuditorSvc::findAuditor_
SmartIF< IAuditor > findAuditor_(const std::string &)
Definition: AuditorSvc.cpp:41
AuditorSvc::syncAuditors_
StatusCode syncAuditors_()
Definition: AuditorSvc.cpp:49

StatusCode AuditorSvc::initialize | ( |  | ) |
| override

Definition at line 81 of file AuditorSvc.cpp.

81 {
82 StatusCode sc = Service::initialize();
83 if ( sc.isFailure() )
84 return sc;
85
86 // create auditor objects for all named auditors
87 sc = syncAuditors_();
88
89 return sc;
90 }
Service::initialize
StatusCode initialize() override
Definition: Service.cpp:64
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
AuditorSvc::syncAuditors_
StatusCode syncAuditors_()
Definition: AuditorSvc.cpp:49

bool AuditorSvc::isEnabled | ( |  | ) | const
| override

Definition at line 191 of file AuditorSvc.cpp.

191 {
192 return m_isEnabled;
193 }
AuditorSvc::m_isEnabled
Gaudi::Property< bool > m_isEnabled
Definition: AuditorSvc.h:95

SmartIF< IAuditor > AuditorSvc::newAuditor_ | ( | MsgStream & | log,
|  | const std::string & | name
| ) |  |
| private

Definition at line 22 of file AuditorSvc.cpp.

22 {
23 // locate the auditor factory, instantiate a new auditor, initialize it
24 StatusCode sc;
25 Gaudi::Utils::TypeNameString item(name) ;
26 SmartIF<IAuditor> aud{ Auditor::Factory::create( item.type(), item.name(), serviceLocator().get() ) };
27 if ( aud ) {
28 if ( m_targetState >= Gaudi::StateMachine::INITIALIZED ) {
29 sc = aud->sysInitialize();
30 if ( sc.isFailure() ) {
31 log << MSG::WARNING << "Failed to initialize Auditor " << name << endmsg;
32 aud.reset();
33 }
34 }
35 } else {
36 log << MSG::WARNING << "Unable to retrieve factory for Auditor " << name << endmsg;
37 }
38 return aud;
39 }
Service::m_targetState
Gaudi::StateMachine::State m_targetState
Service state.
Definition: Service.h:193
Gaudi::StateMachine::INITIALIZED
Definition: StateMachine.h:15
SmartIF< IAuditor >
StatusCode::isFailure
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:84
SmartIF::get
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
Gaudi::Utils::TypeNameString
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:12
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
MSG::WARNING
Definition: IMessageSvc.h:20
Service::serviceLocator
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:292
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244

StatusCode AuditorSvc::syncAuditors_ | ( |  | ) |
| private

Definition at line 49 of file AuditorSvc.cpp.

49 {
50 if ( m_audNameList.size() == m_pAudList.size() )
51 return StatusCode::SUCCESS;
52
53 StatusCode sc;
54
55 // if ( sc.isFailure() ) {
56 // error() << "Unable to locate ObjectManager Service" << endmsg;
57 // return sc;
58 // }
59
60 // create all declared Auditors that do not yet exist
61 for ( auto& it : m_audNameList ) {
62
63 // this is clumsy, but the PropertyHolder won't tell us when my property changes right
64 // under my nose, so I'll have to figure this out the hard way
65 if ( !findAuditor_( it ) ) { // if auditor does not yet exist
66 auto aud = newAuditor_( msgStream(), it );
67 if ( aud ) {
68 m_pAudList.push_back( std::move(aud) );
69 } else {
70 error() << "Error constructing Auditor " << it << endmsg;
71 sc = StatusCode::FAILURE;
72 }
73 }
74 }
75 return sc;
76 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode::FAILURE
Definition: StatusCode.h:29
AuditorSvc::m_pAudList
std::vector< SmartIF< IAuditor > > m_pAudList
Definition: AuditorSvc.h:98
std::vector::push_back
T push_back(T...args)
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:117
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::move
T move(T...args)
AuditorSvc::findAuditor_
SmartIF< IAuditor > findAuditor_(const std::string &)
Definition: AuditorSvc.cpp:41
std::vector::size
T size(T...args)
CommonMessagingBase::msgStream
MsgStream & msgStream() const
Return an uninitialized MsgStream.
Definition: CommonMessaging.h:88
AuditorSvc::newAuditor_
SmartIF< IAuditor > newAuditor_(MsgStream &, const std::string &)
Definition: AuditorSvc.cpp:22
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
AuditorSvc::m_audNameList
Gaudi::Property< std::vector< std::string > > m_audNameList
Definition: AuditorSvc.h:94

StatusCode AuditorSvc::sysFinalize | ( |  | ) |
| override

Definition at line 198 of file AuditorSvc.cpp.

198 {
199 return Service::sysFinalize();
200 }
Service::sysFinalize
StatusCode sysFinalize() override
Finalize Service.
Definition: Service.cpp:144

StatusCode AuditorSvc::sysInitialize | ( |  | ) |
| override

Definition at line 195 of file AuditorSvc.cpp.

195 {
196 return Service::sysInitialize();
197 }
Service::sysInitialize
StatusCode sysInitialize() override
Initialize Service.
Definition: Service.cpp:26

## Member Data Documentation

Gaudi::Property<std::vector<std::string> > AuditorSvc::m_audNameList {this, "Auditors", {}, "list of auditors names"}
| private

Definition at line 94 of file AuditorSvc.h.

Gaudi::Property<bool> AuditorSvc::m_isEnabled {this, "Enable", true, "enable/disable alltogether the auditors"}
| private

Definition at line 95 of file AuditorSvc.h.

std::vector<SmartIF<IAuditor> > AuditorSvc::m_pAudList
| private

Definition at line 98 of file AuditorSvc.h.

The documentation for this class was generated from the following files:

- GaudiCommonSvc/src/AuditorSvc.h
- GaudiCommonSvc/src/AuditorSvc.cpp