All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AuditorSvc Class Reference

#include <src/AuditorSvc.h>

Inheritance diagram for AuditorSvc:
Collaboration diagram for AuditorSvc:

Public Types

typedef std::list< IAuditor * > ListAudits
 
typedef std::vector< std::string > VectorName
 
- Public Types inherited from extends1< Service, IAuditorSvc >
typedef extends1 base_class
 Typedef to this class.
 
typedef extends1 base_class
 Typedef to this class.
 
typedef extend_interfaces1
< IAuditorSvc
extend_interfaces_base
 Typedef to the base of this class.
 
typedef extend_interfaces1
< IAuditorSvc
extend_interfaces_base
 Typedef to the base of this class.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
- Public Types inherited from Service
typedef
Gaudi::PluginService::Factory
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
typedef
Gaudi::PluginService::Factory
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class.
 
typedef implements3 base_class
 Typedef to this class.
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class.
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 
- Public Types inherited from extend_interfaces3< I1, I2, I3 >
typedef mpl::fold< typename
I1::iid::iids::type, typename
mpl::fold< typename
I2::iid::iids::type, typename
I3::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one.
 
typedef mpl::fold< typename
I1::iid::iids::type, typename
mpl::fold< typename
I2::iid::iids::type, typename
I3::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one.
 
- Public Types inherited from extend_interfaces1< IAuditorSvc >
typedef
IAuditorSvc::iid::iids::type 
ext_iids
 MPL set of interfaces extended by this one.
 
typedef
IAuditorSvc::iid::iids::type 
ext_iids
 MPL set of interfaces extended by this one.
 

Public Member Functions

virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
virtual void before (StandardEventType, INamedInterface *)
 The following methods are meant to be implemented by the child class...
 
virtual void before (StandardEventType, const std::string &)
 Audit the start of a standard "event" for callers that do not implement INamedInterface.
 
virtual void before (CustomEventTypeRef, INamedInterface *)
 Audit the start of a custom "event".
 
virtual void before (CustomEventTypeRef, const std::string &)
 Audit the start of a custom "event" for callers that do not implement INamedInterface.
 
virtual void after (StandardEventType, INamedInterface *, const StatusCode &)
 Audit the end of a standard "event".
 
virtual void after (StandardEventType, const std::string &, const StatusCode &)
 Audit the end of a standard "event" for callers that do not implement INamedInterface.
 
virtual void after (CustomEventTypeRef, INamedInterface *, const StatusCode &)
 Audit the end of a custom "event".
 
virtual void after (CustomEventTypeRef, const std::string &, const StatusCode &)
 Audit the end of a custom "event" for callers that do not implement INamedInterface.
 
virtual void beforeInitialize (INamedInterface *ini)
 
virtual void afterInitialize (INamedInterface *ini)
 
virtual void beforeReinitialize (INamedInterface *ini)
 
virtual void afterReinitialize (INamedInterface *ini)
 
virtual void beforeExecute (INamedInterface *ini)
 
virtual void afterExecute (INamedInterface *ini, const StatusCode &)
 
virtual void beforeBeginRun (INamedInterface *ini)
 
virtual void afterBeginRun (INamedInterface *ini)
 
virtual void beforeEndRun (INamedInterface *ini)
 
virtual void afterEndRun (INamedInterface *ini)
 
virtual void beforeFinalize (INamedInterface *ini)
 
virtual void afterFinalize (INamedInterface *ini)
 
virtual bool isEnabled () const
 Tell if the auditor is enabled or not.
 
virtual StatusCode sysInitialize ()
 Initialize Service.
 
virtual StatusCode sysFinalize ()
 Finalize Service.
 
virtual IAuditorgetAuditor (const std::string &name)
 management functionality: retrieve an Auditor
 
 AuditorSvc (const std::string &name, ISvcLocator *svc)
 
virtual ~AuditorSvc ()
 
- Public Member Functions inherited from extends1< Service, IAuditorSvc >
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments.
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments.
 
 extends1 (A1 a1)
 Templated constructor with 1 argument.
 
 extends1 ()
 Default constructor.
 
 extends1 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments.
 
 extends1 (A1 a1, A2 a2)
 Templated constructor with 2 arguments.
 
 extends1 (A1 a1)
 Templated constructor with 1 argument.
 
 extends1 ()
 Default constructor.
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast.
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast.
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface.
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface.
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames.
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames.
 
virtual ~extends1 ()
 Virtual destructor.
 
virtual ~extends1 ()
 Virtual destructor.
 
- Public Member Functions inherited from Service
virtual unsigned long release ()
 Release Interface instance.
 
virtual const std::string & name () const
 Retrieve name of the service.
 
virtual StatusCode configure ()
 
virtual StatusCode start ()
 
virtual StatusCode stop ()
 
virtual StatusCode terminate ()
 
virtual Gaudi::StateMachine::State FSMState () const
 
virtual Gaudi::StateMachine::State targetFSMState () const
 
virtual StatusCode reinitialize ()
 
virtual StatusCode restart ()
 
virtual StatusCode sysStart ()
 Initialize Service.
 
virtual StatusCode sysStop ()
 Initialize Service.
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service.
 
virtual StatusCode sysRestart ()
 Re-initialize the Service.
 
virtual StatusCode setProperty (const Property &p)
 
virtual StatusCode setProperty (const std::string &s)
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 
virtual StatusCode getProperty (Property *p) const
 
virtual const PropertygetProperty (const std::string &name) const
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 
virtual const std::vector
< Property * > & 
getProperties () const
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor.
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator.
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job.
 
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.
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, 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.
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties.
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked.
 
virtual unsigned long release ()
 Release Interface instance.
 
virtual const std::string & name () const
 Retrieve name of the service.
 
virtual StatusCode configure ()
 
virtual StatusCode start ()
 
virtual StatusCode stop ()
 
virtual StatusCode terminate ()
 
virtual Gaudi::StateMachine::State FSMState () const
 
virtual Gaudi::StateMachine::State targetFSMState () const
 
virtual StatusCode reinitialize ()
 
virtual StatusCode restart ()
 
virtual StatusCode sysStart ()
 Initialize Service.
 
virtual StatusCode sysStop ()
 Initialize Service.
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service.
 
virtual StatusCode sysRestart ()
 Re-initialize the Service.
 
virtual StatusCode setProperty (const Property &p)
 
virtual StatusCode setProperty (const std::string &s)
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 
virtual StatusCode getProperty (Property *p) const
 
virtual const PropertygetProperty (const std::string &name) const
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 
virtual const std::vector
< Property * > & 
getProperties () const
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor.
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator.
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job.
 
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.
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, 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.
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties.
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked.
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments.
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments.
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument.
 
 CommonMessaging ()
 Default constructor.
 
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments.
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments.
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument.
 
 CommonMessaging ()
 Default constructor.
 
virtual ~CommonMessaging ()
 Virtual destructor.
 
virtual ~CommonMessaging ()
 Virtual destructor.
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream.
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts.
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream.
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts.
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS)
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS)
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL)
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL)
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING)
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING)
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO)
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO)
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG)
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG)
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE)
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE)
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO)
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO)
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream
 
- Public Member Functions inherited from extend_interfaces1< IAuditorSvc >
virtual ~extend_interfaces1 ()
 Virtual destructor.
 
virtual ~extend_interfaces1 ()
 Virtual destructor.
 
- Public Member Functions inherited from IAuditorSvc
 DeclareInterfaceIDMultiBase (IAuditorSvc, 3, 0)
 InterfaceID.
 
 DeclareInterfaceIDMultiBase (IAuditorSvc, 3, 0)
 InterfaceID.
 
- Public Member Functions inherited from extend_interfaces2< IService, IAuditor >
virtual ~extend_interfaces2 ()
 Virtual destructor.
 
virtual ~extend_interfaces2 ()
 Virtual destructor.
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID.
 
virtual StatusCode sysStart ()=0
 Start Service.
 
virtual StatusCode sysStop ()=0
 Stop Service.
 
virtual StatusCode sysReinitialize ()=0
 Re-initialize the Service.
 
virtual StatusCode sysRestart ()=0
 Re-start the Service.
 
virtual StatusCode configure ()=0
 Configuration (from OFFLINE to CONFIGURED).
 
virtual StatusCode start ()=0
 Start (from INITIALIZED to RUNNING).
 
virtual StatusCode stop ()=0
 Stop (from RUNNING to INITIALIZED).
 
virtual StatusCode terminate ()=0
 Initialization (from CONFIGURED to OFFLINE).
 
virtual StatusCode reinitialize ()=0
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
 
virtual StatusCode restart ()=0
 Initialization (from RUNNING to RUNNING, via INITIALIZED).
 
virtual Gaudi::StateMachine::State FSMState () const =0
 Get the current state.
 
virtual Gaudi::StateMachine::State targetFSMState () const =0
 When we are in the middle of a transition, get the state where the transition is leading us.
 
virtual ~IService ()
 virtual destructor
 
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID.
 
virtual StatusCode sysStart ()=0
 Start Service.
 
virtual StatusCode sysStop ()=0
 Stop Service.
 
virtual StatusCode sysReinitialize ()=0
 Re-initialize the Service.
 
virtual StatusCode sysRestart ()=0
 Re-start the Service.
 
virtual StatusCode configure ()=0
 Configuration (from OFFLINE to CONFIGURED).
 
virtual StatusCode start ()=0
 Start (from INITIALIZED to RUNNING).
 
virtual StatusCode stop ()=0
 Stop (from RUNNING to INITIALIZED).
 
virtual StatusCode terminate ()=0
 Initialization (from CONFIGURED to OFFLINE).
 
virtual StatusCode reinitialize ()=0
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED).
 
virtual StatusCode restart ()=0
 Initialization (from RUNNING to RUNNING, via INITIALIZED).
 
virtual Gaudi::StateMachine::State FSMState () const =0
 Get the current state.
 
virtual Gaudi::StateMachine::State targetFSMState () const =0
 When we are in the middle of a transition, get the state where the transition is leading us.
 
virtual ~IService ()
 virtual destructor
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID.
 
virtual const std::string & name () const =0
 Retrieve the name of the instance.
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes).
 
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID.
 
virtual const std::string & name () const =0
 Retrieve the name of the instance.
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes).
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance.
 
virtual unsigned long release ()=0
 Release Interface instance.
 
virtual unsigned long refCount () const =0
 Current reference count.
 
virtual ~IInterface ()
 Virtual destructor.
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance.
 
virtual unsigned long release ()=0
 Release Interface instance.
 
virtual unsigned long refCount () const =0
 Current reference count.
 
virtual ~IInterface ()
 Virtual destructor.
 
- Public Member Functions inherited from IAuditor
 DeclareInterfaceID (IAuditor, 3, 0)
 InterfaceID.
 
 DeclareInterfaceID (IAuditor, 3, 0)
 InterfaceID.
 

Private Member Functions

IAuditornewAuditor_ (MsgStream &, const std::string &)
 
IAuditorfindAuditor_ (const std::string &)
 
StatusCode syncAuditors_ ()
 

Private Attributes

VectorName m_audNameList
 
ListAudits m_pAudList
 
bool m_isEnabled
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface.
 
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface.
 
- Protected Member Functions inherited from Service
virtual ~Service ()
 Standard Destructor.
 
int outputLevel () const
 get the Service's output level
 
virtual ~Service ()
 Standard Destructor.
 
int outputLevel () const
 get the Service's output level
 
- Protected Member Functions inherited from IService
virtual void setServiceManager (ISvcManager *)=0
 
virtual void setServiceManager (ISvcManager *)=0
 
- Protected Attributes inherited from Service
IntegerProperty m_outputLevel
 Service output level.
 
Gaudi::StateMachine::State m_state
 Service state.
 
Gaudi::StateMachine::State m_targetState
 Service state.
 

Detailed Description

Definition at line 19 of file AuditorSvc.h.

Member Typedef Documentation

typedef std::list<IAuditor*> AuditorSvc::ListAudits

Definition at line 24 of file AuditorSvc.h.

typedef std::vector<std::string> AuditorSvc::VectorName

Definition at line 25 of file AuditorSvc.h.

Constructor & Destructor Documentation

AuditorSvc::AuditorSvc ( const std::string &  name,
ISvcLocator svc 
)

Definition at line 96 of file AuditorSvc.cpp.

: base_class(name, svc) {
declareProperty("Enable", m_isEnabled = true);
m_pAudList.clear();
}
AuditorSvc::~AuditorSvc ( )
virtual

Definition at line 104 of file AuditorSvc.cpp.

{
}

Member Function Documentation

void AuditorSvc::after ( StandardEventType  ,
INamedInterface ,
const StatusCode sc 
)
virtual

Audit the end of a standard "event".

Implements IAuditor.

Definition at line 174 of file AuditorSvc.cpp.

{
if (!isEnabled()) return;
for (ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); it++) {
if((*it)->isEnabled()) {
(*it)->after(evt,obj,sc);
}
}
}
void AuditorSvc::after ( StandardEventType  ,
const std::string &  ,
const StatusCode sc 
)
virtual

Audit the end of a standard "event" for callers that do not implement INamedInterface.

Implements IAuditor.

Definition at line 183 of file AuditorSvc.cpp.

{
if (!isEnabled()) return;
for (ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); it++) {
if((*it)->isEnabled()) {
(*it)->after(evt,name,sc);
}
}
}
void AuditorSvc::after ( CustomEventTypeRef  ,
INamedInterface ,
const StatusCode sc 
)
virtual

Audit the end of a custom "event".

Implements IAuditor.

Definition at line 192 of file AuditorSvc.cpp.

{
if (!isEnabled()) return;
for (ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); it++) {
if((*it)->isEnabled()) {
(*it)->after(evt,obj,sc);
}
}
}
void AuditorSvc::after ( CustomEventTypeRef  ,
const std::string &  ,
const StatusCode sc 
)
virtual

Audit the end of a custom "event" for callers that do not implement INamedInterface.

Implements IAuditor.

Definition at line 201 of file AuditorSvc.cpp.

{
if (!isEnabled()) return;
for (ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); it++) {
if((*it)->isEnabled()) {
(*it)->after(evt,name,sc);
}
}
}
virtual void AuditorSvc::afterBeginRun ( INamedInterface )
virtual
Deprecated:
use after

Implements IAuditor.

virtual void AuditorSvc::afterEndRun ( INamedInterface )
virtual
Deprecated:
use after

Implements IAuditor.

void AuditorSvc::afterExecute ( INamedInterface ,
const StatusCode  
)
virtual
Deprecated:
use after

Implements IAuditor.

Definition at line 224 of file AuditorSvc.cpp.

{
throw GaudiException("The method afterExecute is obsolete do not call it.",
"AuditorSvc::afterExecute" , StatusCode::FAILURE);
}
virtual void AuditorSvc::afterFinalize ( INamedInterface )
virtual
Deprecated:
use after

Implements IAuditor.

virtual void AuditorSvc::afterInitialize ( INamedInterface )
virtual
Deprecated:
use after

Implements IAuditor.

virtual void AuditorSvc::afterReinitialize ( INamedInterface )
virtual
Deprecated:
use after

Implements IAuditor.

void AuditorSvc::before ( StandardEventType  evt,
INamedInterface obj 
)
virtual

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

Implements IAuditor.

Definition at line 137 of file AuditorSvc.cpp.

{
if (!isEnabled()) return;
for (ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); it++) {
if((*it)->isEnabled()) {
(*it)->before(evt,obj);
}
}
}
void AuditorSvc::before ( StandardEventType  ,
const std::string &   
)
virtual

Audit the start of a standard "event" for callers that do not implement INamedInterface.

Implements IAuditor.

Definition at line 146 of file AuditorSvc.cpp.

{
if (!isEnabled()) return;
for (ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); it++) {
if((*it)->isEnabled()) {
(*it)->before(evt,name);
}
}
}
void AuditorSvc::before ( CustomEventTypeRef  ,
INamedInterface  
)
virtual

Audit the start of a custom "event".

Implements IAuditor.

Definition at line 155 of file AuditorSvc.cpp.

{
if (!isEnabled()) return;
for (ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); it++) {
if((*it)->isEnabled()) {
(*it)->before(evt,obj);
}
}
}
void AuditorSvc::before ( CustomEventTypeRef  ,
const std::string &   
)
virtual

Audit the start of a custom "event" for callers that do not implement INamedInterface.

Implements IAuditor.

Definition at line 164 of file AuditorSvc.cpp.

{
if (!isEnabled()) return;
for (ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); it++) {
if((*it)->isEnabled()) {
(*it)->before(evt,name);
}
}
}
virtual void AuditorSvc::beforeBeginRun ( INamedInterface )
virtual
Deprecated:
use before

Implements IAuditor.

virtual void AuditorSvc::beforeEndRun ( INamedInterface )
virtual
Deprecated:
use before

Implements IAuditor.

virtual void AuditorSvc::beforeExecute ( INamedInterface )
virtual
Deprecated:
use before

Implements IAuditor.

virtual void AuditorSvc::beforeFinalize ( INamedInterface )
virtual
Deprecated:
use before

Implements IAuditor.

virtual void AuditorSvc::beforeInitialize ( INamedInterface )
virtual
Deprecated:
use before

Implements IAuditor.

virtual void AuditorSvc::beforeReinitialize ( INamedInterface )
virtual
Deprecated:
use before

Implements IAuditor.

StatusCode AuditorSvc::finalize ( )
virtual

Reimplemented from Service.

Definition at line 122 of file AuditorSvc.cpp.

{
for (ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); it++) {
if((*it)->isEnabled()) {
(*it)->sysFinalize().ignore();
}
(*it)->release();
}
m_pAudList.clear();
// Finalize this specific service
}
IAuditor * AuditorSvc::findAuditor_ ( const std::string &  name)
private

Definition at line 46 of file AuditorSvc.cpp.

{
// find an auditor by name, return 0 on error
IAuditor* aud = 0;
const std::string item_name = Gaudi::Utils::TypeNameString(name).name();
for ( ListAudits::iterator it = m_pAudList.begin() ; it != m_pAudList.end(); ++it ) {
if ( (*it)->name() == item_name ) {
(*it)->addRef();
aud = *it;
break;
}
}
return aud;
}
IAuditor * AuditorSvc::getAuditor ( const std::string &  name)
virtual

management functionality: retrieve an Auditor

Implements IAuditorSvc.

Definition at line 251 of file AuditorSvc.cpp.

{
// by interactively setting properties, auditors might be out of sync
if ( !syncAuditors_().isSuccess() ) {
// as we didn't manage to sync auditors, the safest bet is to assume the
// worse...
// So don't let clients play with an AuditorSvc in an inconsistent state
return 0;
}
// search available auditors, returns 0 on error
return findAuditor_( name );
}
StatusCode AuditorSvc::initialize ( )
virtual

Reimplemented from Service.

Definition at line 110 of file AuditorSvc.cpp.

{
if ( sc.isFailure() )
return sc;
// create auditor objects for all named auditors
sc = syncAuditors_();
return sc;
}
bool AuditorSvc::isEnabled ( ) const
virtual

Tell if the auditor is enabled or not.

Implements IAuditor.

Definition at line 239 of file AuditorSvc.cpp.

{
return m_isEnabled;
}
IAuditor * AuditorSvc::newAuditor_ ( MsgStream log,
const std::string &  name 
)
private

Definition at line 22 of file AuditorSvc.cpp.

{
// locate the auditor factory, instantiate a new auditor, initialize it
IAuditor* aud = 0;
Gaudi::Utils::TypeNameString item(name) ;
aud = Auditor::Factory::create( item.type(), item.name(), serviceLocator().get() );
if ( aud ) {
aud->addRef();
sc = aud->sysInitialize();
if ( sc.isFailure() ) {
log << MSG::WARNING << "Failed to initialize Auditor " << name << endmsg;
aud->release();
aud = 0;
}
}
}
else {
log << MSG::WARNING << "Unable to retrieve factory for Auditor " << name << endmsg;
}
return aud;
}
StatusCode AuditorSvc::syncAuditors_ ( )
private

Definition at line 61 of file AuditorSvc.cpp.

{
if ( m_audNameList.size() == m_pAudList.size() )
// if ( sc.isFailure() ) {
// log << MSG::ERROR << "Unable to locate ObjectManager Service" << endmsg;
// return sc;
// }
// create all declared Auditors that do not yet exist
for ( VectorName::iterator it = m_audNameList.begin(); it != m_audNameList.end(); it++ ) {
// this is clumsy, but the PropertyMgr won't tell us when my property changes right
// under my nose, so I'll have to figure this out the hard way
if ( !findAuditor_( *it ) ) { // if auditor does not yet exist
IAuditor* aud = newAuditor_( log, *it );
if ( aud != 0 ) {
m_pAudList.push_back( aud );
}
else {
log << MSG::ERROR << "Error constructing Auditor " << *it << endmsg;
}
}
}
return sc;
}
StatusCode AuditorSvc::sysFinalize ( )
virtual

Finalize Service.

Reimplemented from Service.

Definition at line 246 of file AuditorSvc.cpp.

{
}
StatusCode AuditorSvc::sysInitialize ( )
virtual

Initialize Service.

Reimplemented from Service.

Definition at line 243 of file AuditorSvc.cpp.

{
}

Member Data Documentation

VectorName AuditorSvc::m_audNameList
private

Definition at line 104 of file AuditorSvc.h.

bool AuditorSvc::m_isEnabled
private

Definition at line 110 of file AuditorSvc.h.

ListAudits AuditorSvc::m_pAudList
private

Definition at line 107 of file AuditorSvc.h.


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