![]() |
The Gaudi Framework
v26r0
|
Base class from which all concrete auditor classes should be derived. More...
#include <GaudiKernel/Auditor.h>
Public Types | |
typedef Gaudi::PluginService::Factory < IAuditor *, const std::string &, ISvcLocator * > | Factory |
![]() | |
typedef implements2 | base_class |
Typedef to this class. More... | |
typedef extend_interfaces2 < IAuditor, IProperty > | extend_interfaces_base |
Typedef to the base of this class. More... | |
typedef extend_interfaces_base::ext_iids | interfaces |
MPL set of all the implemented interfaces. More... | |
![]() | |
typedef mpl::fold< typename IAuditor::iid::iids::type, typename IProperty::iid::iids::type, mpl::insert< mpl::_1, mpl::_2 > >::type | ext_iids |
MPL set of interfaces extended by this one. More... | |
![]() | |
enum | StandardEventType { Initialize, ReInitialize, Execute, BeginRun, EndRun, Finalize, Start, Stop, ReStart } |
Defines the standard (= used by the framework) auditable event types. More... | |
typedef std::string | CustomEventType |
Type used to allow users to specify a custom event to be audit. More... | |
typedef const CustomEventType & | CustomEventTypeRef |
Used in function calls for optimization purposes. More... | |
![]() | |
enum | Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR } |
Return status. More... | |
typedef Gaudi::InterfaceId < IInterface, 0, 0 > | iid |
Interface ID. More... | |
typedef mpl::set1< iid > | ext_iids |
Extra interfaces. More... | |
Public Member Functions | |
Auditor (const std::string &name, ISvcLocator *svcloc) | |
Constructor. More... | |
virtual | ~Auditor () |
Destructor. More... | |
StatusCode | sysInitialize () |
Initialization method invoked by the framework. More... | |
StatusCode | sysFinalize () |
Finalization method invoked by the framework. More... | |
virtual void | before (StandardEventType, INamedInterface *) |
The following methods are meant to be implemented by the child class... More... | |
virtual void | before (StandardEventType, const std::string &) |
Audit the start of a standard "event" for callers that do not implement INamedInterface. More... | |
virtual void | before (CustomEventTypeRef, INamedInterface *) |
Audit the start of a custom "event". More... | |
virtual void | before (CustomEventTypeRef, const std::string &) |
Audit the start of a custom "event" for callers that do not implement INamedInterface. More... | |
virtual void | after (StandardEventType, INamedInterface *, const StatusCode &) |
Audit the end of a standard "event". More... | |
virtual void | after (StandardEventType, const std::string &, const StatusCode &) |
Audit the end of a standard "event" for callers that do not implement INamedInterface. More... | |
virtual void | after (CustomEventTypeRef, INamedInterface *, const StatusCode &) |
Audit the end of a custom "event". More... | |
virtual void | after (CustomEventTypeRef, const std::string &, const StatusCode &) |
Audit the end of a custom "event" for callers that do not implement INamedInterface. More... | |
virtual void | beforeInitialize (INamedInterface *) |
virtual void | afterInitialize (INamedInterface *) |
virtual void | beforeReinitialize (INamedInterface *) |
virtual void | afterReinitialize (INamedInterface *) |
virtual void | beforeExecute (INamedInterface *) |
virtual void | afterExecute (INamedInterface *, const StatusCode &) |
virtual void | beforeFinalize (INamedInterface *) |
virtual void | afterFinalize (INamedInterface *) |
virtual void | beforeBeginRun (INamedInterface *) |
virtual void | afterBeginRun (INamedInterface *) |
virtual void | beforeEndRun (INamedInterface *) |
virtual void | afterEndRun (INamedInterface *) |
virtual StatusCode | initialize () |
virtual StatusCode | finalize () |
virtual const std::string & | name () const |
Retrieve the name of the instance. More... | |
virtual bool | isEnabled () const |
Tell if the auditor is enabled or not. More... | |
SmartIF< IMessageSvc > & | msgSvc () const |
The standard message service. More... | |
int | outputLevel () const |
Retrieve the output level of current auditor. More... | |
void | setOutputLevel (int level) |
Set the output level for current auditor. More... | |
SmartIF< ISvcLocator > & | serviceLocator () const |
The standard service locator. More... | |
template<class T > | |
StatusCode | service (const std::string &name, T *&svc, bool createIf=false) const |
Access a service by name, creating it if it doesn't already exist. More... | |
virtual StatusCode | setProperty (const Property &p) |
Set a value of a property of an auditor. More... | |
virtual StatusCode | setProperty (const std::string &s) |
Implementation of IProperty::setProperty. More... | |
virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
Implementation of IProperty::setProperty. More... | |
virtual StatusCode | getProperty (Property *p) const |
Get the value of a property. More... | |
virtual const Property & | getProperty (const std::string &name) const |
Get the property by name. More... | |
virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
Implementation of IProperty::getProperty. More... | |
const std::vector< Property * > & | getProperties () const |
Get all properties. More... | |
template<class TYPE > | |
StatusCode | setProperty (const std::string &name, const TYPE &value) |
set the property form the value More... | |
StatusCode | setProperties () |
Set the auditor's properties. More... | |
template<class T > | |
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
Declare the named property. More... | |
![]() | |
virtual | ~extend_interfaces2 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IAuditor, 3, 0) | |
InterfaceID. More... | |
![]() | |
DeclareInterfaceID (INamedInterface, 1, 0) | |
InterfaceID. More... | |
virtual | ~INamedInterface () |
Virtual destructor (always needed for abstract classes). More... | |
![]() | |
virtual void * | i_cast (const InterfaceID &) const =0 |
main cast function More... | |
virtual std::vector< std::string > | getInterfaceNames () const =0 |
Returns a vector of strings containing the names of all the implemented interfaces. More... | |
virtual unsigned long | addRef ()=0 |
Increment the reference count of Interface instance. More... | |
virtual unsigned long | release ()=0 |
Release Interface instance. More... | |
virtual unsigned long | refCount () const =0 |
Current reference count. More... | |
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp)=0 |
Set the void** to the pointer to the requested interface of the instance. More... | |
virtual | ~IInterface () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IProperty, 2, 0) | |
InterfaceID. More... | |
Private Member Functions | |
Auditor (const Auditor &a) | |
Auditor & | operator= (const Auditor &rhs) |
Private Attributes | |
std::string | m_name |
Auditor's name for identification. More... | |
SmartIF< IMessageSvc > | m_MS |
Message service. More... | |
SmartIF< ISvcLocator > | m_pSvcLocator |
Pointer to service locator service. More... | |
PropertyMgr * | m_PropertyMgr |
For management of properties. More... | |
int | m_outputLevel |
Auditor output level. More... | |
bool | m_isEnabled |
Auditor is enabled flag. More... | |
bool | m_isInitialized |
Auditor has been initialized flag. More... | |
bool | m_isFinalized |
Auditor has been finalized flag. More... | |
Additional Inherited Members | |
![]() | |
static const InterfaceID & | interfaceID () |
Return an instance of InterfaceID identifying the interface. More... | |
Base class from which all concrete auditor classes should be derived.
The only base class functionality which may be used in the constructor of a concrete auditor is the declaration of member variables as properties. All other functionality, i.e. the use of services, may be used only in initialize() and afterwards.
typedef Gaudi::PluginService::Factory<IAuditor*, const std::string&, ISvcLocator*> Auditor::Factory |
Auditor::Auditor | ( | const std::string & | name, |
ISvcLocator * | svcloc | ||
) |
Constructor.
name | The algorithm object's name |
svcloc | A pointer to a service location service |
Definition at line 14 of file Auditor.cpp.
|
virtual |
Destructor.
Definition at line 29 of file Auditor.cpp.
|
private |
|
virtual |
Audit the end of a standard "event".
Implements IAuditor.
Reimplemented in Google::AuditorBase, PerfMonAuditor, IntelProfilerAuditor, TimingAuditor, and CommonAuditor.
Definition at line 122 of file Auditor.cpp.
|
virtual |
Audit the end of a standard "event" for callers that do not implement INamedInterface.
Implements IAuditor.
Reimplemented in Google::AuditorBase, and CommonAuditor.
Definition at line 136 of file Auditor.cpp.
|
virtual |
Audit the end of a custom "event".
Implements IAuditor.
Reimplemented in Google::AuditorBase, and CommonAuditor.
Definition at line 138 of file Auditor.cpp.
|
virtual |
Audit the end of a custom "event" for callers that do not implement INamedInterface.
Implements IAuditor.
Reimplemented in Google::AuditorBase, TimingAuditor, and CommonAuditor.
Definition at line 139 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase.
Definition at line 155 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase.
Definition at line 159 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase, AlgContextAuditor, and AlgErrorAuditor.
Definition at line 151 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase, and AlgContextAuditor.
Definition at line 163 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase, and AlgContextAuditor.
Definition at line 143 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase.
Definition at line 147 of file Auditor.cpp.
|
virtual |
The following methods are meant to be implemented by the child class...
Implements IAuditor.
Reimplemented in PerfMonAuditor, Google::AuditorBase, IntelProfilerAuditor, TimingAuditor, and CommonAuditor.
Definition at line 102 of file Auditor.cpp.
|
virtual |
Audit the start of a standard "event" for callers that do not implement INamedInterface.
Implements IAuditor.
Reimplemented in Google::AuditorBase, and CommonAuditor.
Definition at line 116 of file Auditor.cpp.
|
virtual |
Audit the start of a custom "event".
Implements IAuditor.
Reimplemented in Google::AuditorBase, and CommonAuditor.
Definition at line 118 of file Auditor.cpp.
|
virtual |
Audit the start of a custom "event" for callers that do not implement INamedInterface.
Implements IAuditor.
Reimplemented in Google::AuditorBase, TimingAuditor, and CommonAuditor.
Definition at line 119 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase.
Definition at line 153 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase.
Definition at line 157 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase, AlgContextAuditor, and AlgErrorAuditor.
Definition at line 149 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase, and AlgContextAuditor.
Definition at line 161 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase, and AlgContextAuditor.
Definition at line 141 of file Auditor.cpp.
|
virtual |
Implements IAuditor.
Reimplemented in Google::AuditorBase.
Definition at line 145 of file Auditor.cpp.
|
inline |
Declare the named property.
name | the property name |
property | the property itself, |
doc | the documentation string |
Definition at line 235 of file Auditor.h.
|
virtual |
Reimplemented in PerfMonAuditor, Google::AuditorBase, TimingAuditor, AlgContextAuditor, and AlgErrorAuditor.
Definition at line 213 of file Auditor.cpp.
|
virtual |
Get all properties.
Implements IProperty.
Definition at line 274 of file Auditor.cpp.
|
virtual |
Get the value of a property.
Implements IProperty.
Definition at line 265 of file Auditor.cpp.
|
virtual |
Get the property by name.
Implements IProperty.
Definition at line 268 of file Auditor.cpp.
|
virtual |
Implementation of IProperty::getProperty.
Implements IProperty.
Definition at line 271 of file Auditor.cpp.
|
virtual |
Reimplemented in Google::HeapChecker, PerfMonAuditor, TimingAuditor, Google::AuditorBase, AlgContextAuditor, IntelProfilerAuditor, AlgErrorAuditor, ChronoAuditor, and MemStatAuditor.
Definition at line 97 of file Auditor.cpp.
|
virtual |
Tell if the auditor is enabled or not.
Implements IAuditor.
Definition at line 222 of file Auditor.cpp.
SmartIF< IMessageSvc > & Auditor::msgSvc | ( | ) | const |
The standard message service.
Returns a pointer to the standard message service. May not be invoked before sysInitialize() has been invoked.
Definition at line 226 of file Auditor.cpp.
|
virtual |
Retrieve the name of the instance.
Implements INamedInterface.
Definition at line 218 of file Auditor.cpp.
|
inline |
|
inline |
Access a service by name, creating it if it doesn't already exist.
Definition at line 119 of file Auditor.h.
SmartIF< ISvcLocator > & Auditor::serviceLocator | ( | ) | const |
The standard service locator.
Returns a pointer to the service locator service. This service may be used by an auditor to request any services it requires in addition to those provided by default.
Definition at line 236 of file Auditor.cpp.
void Auditor::setOutputLevel | ( | int | level | ) |
Set the output level for current auditor.
Definition at line 230 of file Auditor.cpp.
StatusCode Auditor::setProperties | ( | ) |
Set the auditor's properties.
This method requests the job options service to set the values of any declared properties. The method is invoked from within sysInitialize() by the framework and does not need to be explicitly called by a concrete auditor.
Definition at line 241 of file Auditor.cpp.
|
virtual |
Set a value of a property of an auditor.
Implements IProperty.
Definition at line 256 of file Auditor.cpp.
|
virtual |
Implementation of IProperty::setProperty.
Implements IProperty.
Definition at line 259 of file Auditor.cpp.
|
virtual |
Implementation of IProperty::setProperty.
Implements IProperty.
Definition at line 262 of file Auditor.cpp.
|
inline |
set the property form the value
Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only
This is very convenient in resetting of the default properties in the derived classes. E.g. without this method one needs to convert everything into strings to use IProperty::setProperty
For simple cases it is more or less ok, but for complicated properties it is just ugly..
name | name of the property |
value | value of the property |
Definition at line 195 of file Auditor.h.
|
virtual |
Finalization method invoked by the framework.
This method is responsible for any bookkeeping of initialization required by the framework itself.
RETURN !!!
catch GaudiExeption
(1) perform the printout of message
(2) print the exception itself (NB! - GaudiException is a linked list of all "previous exceptions")
catch std::exception
(1) perform the printout of message
(2) print the exception itself
catch unknown exception
(1) perform the printout
Implements IAuditor.
Definition at line 165 of file Auditor.cpp.
|
virtual |
Initialization method invoked by the framework.
This method is responsible for any bookkeeping of initialization required by the framework itself.
RETURN !!!
catch Gaudi Exception
(1) perform the printout of message
(2) print the exception itself (NB! - GaudiException is a linked list of all "previous exceptions")
catch std::exception
(1) perform the printout of message
(2) print the exception itself (NB! - GaudiException is a linked list of all "previous exceptions")
(1) perform the printout
Implements IAuditor.
Definition at line 34 of file Auditor.cpp.
|
private |
|
private |
|
private |
|
mutableprivate |
|
private |
|
private |
|
mutableprivate |