![]() |
The Gaudi Framework
v26r0
|
Base for Google Auditors. More...
#include <GoogleAuditor.cpp>
Public Member Functions | |
AuditorBase (const std::string &name, ISvcLocator *pSvcLocator) | |
Constructor. More... | |
virtual | ~AuditorBase () |
Destructor. More... | |
StatusCode | initialize () |
Initialize the auditor base. More... | |
StatusCode | finalize () |
Finalize the auditor base. More... | |
void | handle (const Incident &incident) |
Implement the handle method for the Incident service. More... | |
void | before (StandardEventType type, INamedInterface *i) |
The following methods are meant to be implemented by the child class... More... | |
void | before (CustomEventTypeRef type, INamedInterface *i) |
Audit the start of a custom "event". More... | |
void | before (StandardEventType type, const std::string &s) |
Audit the start of a standard "event" for callers that do not implement INamedInterface. More... | |
void | before (CustomEventTypeRef type, const std::string &s) |
Audit the start of a custom "event" for callers that do not implement INamedInterface. More... | |
void | after (StandardEventType type, INamedInterface *i, const StatusCode &sc) |
Audit the end of a standard "event". More... | |
void | after (CustomEventTypeRef type, INamedInterface *i, const StatusCode &sc) |
Audit the end of a custom "event". More... | |
void | after (StandardEventType type, const std::string &s, const StatusCode &sc) |
Audit the end of a standard "event" for callers that do not implement INamedInterface. More... | |
void | after (CustomEventTypeRef type, const std::string &s, const StatusCode &) |
Audit the end of a custom "event" for callers that do not implement INamedInterface. More... | |
void | beforeInitialize (INamedInterface *i) |
void | beforeReinitialize (INamedInterface *i) |
void | beforeExecute (INamedInterface *i) |
void | beforeBeginRun (INamedInterface *i) |
void | beforeEndRun (INamedInterface *i) |
void | beforeFinalize (INamedInterface *i) |
void | afterInitialize (INamedInterface *i) |
void | afterReinitialize (INamedInterface *i) |
void | afterExecute (INamedInterface *i, const StatusCode &s) |
void | afterBeginRun (INamedInterface *i) |
void | afterEndRun (INamedInterface *i) |
void | afterFinalize (INamedInterface *i) |
![]() | |
extends1 (A1 a1, A2 a2, A3 a3) | |
Templated constructor with 3 arguments. More... | |
extends1 (A1 a1, A2 a2) | |
Templated constructor with 2 arguments. More... | |
extends1 (A1 a1) | |
Templated constructor with 1 argument. More... | |
extends1 () | |
Default constructor. More... | |
virtual void * | i_cast (const InterfaceID &tid) const |
Implementation of IInterface::i_cast. More... | |
virtual StatusCode | queryInterface (const InterfaceID &ti, void **pp) |
Implementation of IInterface::queryInterface. More... | |
virtual std::vector< std::string > | getInterfaceNames () const |
Implementation of IInterface::getInterfaceNames. More... | |
virtual | ~extends1 () |
Virtual destructor. More... | |
![]() | |
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 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 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 | ~IInterface () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IProperty, 2, 0) | |
InterfaceID. More... | |
![]() | |
virtual | ~extend_interfaces1 () |
Virtual destructor. More... | |
![]() | |
DeclareInterfaceID (IIncidentListener, 2, 0) | |
InterfaceID. More... | |
Protected Member Functions | |
virtual void | google_before (const std::string &s)=0 |
Start the google tool. More... | |
virtual void | google_after (const std::string &s)=0 |
stop the google tool More... | |
virtual bool | alreadyRunning ()=0 |
check if we are already running the tool More... | |
Protected Attributes | |
MsgStream | m_log |
Messaging object. More... | |
Private Member Functions | |
void | startAudit () |
Start a full event audit. More... | |
void | stopAudit () |
stop a full event audit More... | |
bool | isSequencer (INamedInterface *i) const |
Check if the component in question is a GaudiSequencer or a Sequencer. More... | |
bool | isPhaseEnabled (const CustomEventTypeRef &type) const |
Check if auditing is enabled for the current processing phase. More... | |
bool | isComponentEnabled (const std::string &name) const |
Check if auditing is enabled for the given component. More... | |
std::string | getDumpName (const CustomEventTypeRef &type, const std::string &name) const |
Private Attributes | |
std::vector< std::string > | m_when |
When to audit the algorithms. More... | |
std::vector< std::string > | m_veto |
Veto list. Any component in this list will not be audited. More... | |
std::vector< std::string > | m_list |
Any component in this list will be audited. If empty, all will be done. More... | |
unsigned long long | m_eventsToSkip |
Number of events to skip before auditing. More... | |
bool | m_skipSequencers |
Boolean indicating if sequencers should be skipped or not. More... | |
int | m_freq |
The frequency to audit events. -1 means all events. More... | |
bool | m_audit |
Internal flag to say if auditing is enabled or not for the current event. More... | |
unsigned long long | m_nEvts |
Number of events processed. More... | |
bool | m_fullEventAudit |
Flag to indicate if full event auditing is enabled or not. More... | |
unsigned long long | m_nSampleEvents |
Number of events to include in a full event audit. More... | |
unsigned long long | m_sampleEventCount |
Internal count of the number of events currently processed during an audit. More... | |
bool | m_inFullAudit |
Internal flag to indicate if we are current in a full event audit. More... | |
std::string | m_startedBy |
Name of the component we are currently auditing. More... | |
Additional Inherited Members | |
![]() | |
typedef extends1 | base_class |
Typedef to this class. More... | |
typedef extend_interfaces1 < IIncidentListener > | 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 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... | |
![]() | |
typedef IIncidentListener::iid::iids::type | ext_iids |
MPL set of interfaces extended by this one. More... | |
![]() | |
static const InterfaceID & | interfaceID () |
Return an instance of InterfaceID identifying the interface. More... | |
Google::AuditorBase::AuditorBase | ( | const std::string & | name, |
ISvcLocator * | pSvcLocator | ||
) |
Constructor.
Definition at line 306 of file GoogleAuditor.cpp.
|
inlinevirtual |
|
inlinevirtual |
Audit the end of a standard "event".
Reimplemented from Auditor.
Definition at line 214 of file GoogleAuditor.cpp.
|
inlinevirtual |
Audit the end of a custom "event".
Reimplemented from Auditor.
Definition at line 224 of file GoogleAuditor.cpp.
|
inlinevirtual |
Audit the end of a standard "event" for callers that do not implement INamedInterface.
Reimplemented from Auditor.
Definition at line 232 of file GoogleAuditor.cpp.
|
inlinevirtual |
Audit the end of a custom "event" for callers that do not implement INamedInterface.
Reimplemented from Auditor.
Definition at line 239 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 259 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 260 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 258 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 261 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 256 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 257 of file GoogleAuditor.cpp.
|
protectedpure virtual |
check if we are already running the tool
Implemented in Google::CPUProfiler, Google::HeapChecker, and Google::HeapProfiler.
|
inlinevirtual |
The following methods are meant to be implemented by the child class...
Reimplemented from Auditor.
Definition at line 169 of file GoogleAuditor.cpp.
|
inlinevirtual |
Audit the start of a custom "event".
Reimplemented from Auditor.
Definition at line 177 of file GoogleAuditor.cpp.
|
inlinevirtual |
Audit the start of a standard "event" for callers that do not implement INamedInterface.
Reimplemented from Auditor.
Definition at line 185 of file GoogleAuditor.cpp.
|
inlinevirtual |
Audit the start of a custom "event" for callers that do not implement INamedInterface.
Reimplemented from Auditor.
Definition at line 192 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 252 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 253 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 251 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 254 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 249 of file GoogleAuditor.cpp.
|
inlinevirtual |
Reimplemented from Auditor.
Definition at line 250 of file GoogleAuditor.cpp.
|
inlinevirtual |
Finalize the auditor base.
Reimplemented from Auditor.
Definition at line 64 of file GoogleAuditor.cpp.
|
inlineprivate |
Definition at line 118 of file GoogleAuditor.cpp.
|
protectedpure virtual |
stop the google tool
Implemented in Google::CPUProfiler, Google::HeapChecker, and Google::HeapProfiler.
|
protectedpure virtual |
Start the google tool.
Implemented in Google::CPUProfiler, Google::HeapChecker, and Google::HeapProfiler.
|
inlinevirtual |
Implement the handle method for the Incident service.
This is used to inform the tool of software incidents.
incident | The incident identifier |
Implements IIncidentListener.
Definition at line 134 of file GoogleAuditor.cpp.
|
inlinevirtual |
Initialize the auditor base.
Reimplemented from Auditor.
Reimplemented in Google::HeapChecker.
Definition at line 46 of file GoogleAuditor.cpp.
|
inlineprivate |
Check if auditing is enabled for the given component.
Definition at line 110 of file GoogleAuditor.cpp.
|
inlineprivate |
Check if auditing is enabled for the current processing phase.
Definition at line 104 of file GoogleAuditor.cpp.
|
inlineprivate |
Check if the component in question is a GaudiSequencer or a Sequencer.
Definition at line 97 of file GoogleAuditor.cpp.
|
inlineprivate |
Start a full event audit.
Definition at line 73 of file GoogleAuditor.cpp.
|
inlineprivate |
stop a full event audit
Definition at line 85 of file GoogleAuditor.cpp.
|
private |
Internal flag to say if auditing is enabled or not for the current event.
Definition at line 290 of file GoogleAuditor.cpp.
|
private |
Number of events to skip before auditing.
Definition at line 284 of file GoogleAuditor.cpp.
|
private |
The frequency to audit events. -1 means all events.
Definition at line 288 of file GoogleAuditor.cpp.
|
private |
Flag to indicate if full event auditing is enabled or not.
Definition at line 294 of file GoogleAuditor.cpp.
|
private |
Internal flag to indicate if we are current in a full event audit.
Definition at line 300 of file GoogleAuditor.cpp.
|
private |
Any component in this list will be audited. If empty, all will be done.
Definition at line 282 of file GoogleAuditor.cpp.
|
mutableprotected |
Messaging object.
Definition at line 276 of file GoogleAuditor.cpp.
|
private |
Number of events processed.
Definition at line 292 of file GoogleAuditor.cpp.
|
private |
Number of events to include in a full event audit.
Definition at line 296 of file GoogleAuditor.cpp.
|
private |
Internal count of the number of events currently processed during an audit.
Definition at line 298 of file GoogleAuditor.cpp.
|
private |
Boolean indicating if sequencers should be skipped or not.
Definition at line 286 of file GoogleAuditor.cpp.
|
private |
Name of the component we are currently auditing.
Definition at line 302 of file GoogleAuditor.cpp.
|
private |
Veto list. Any component in this list will not be audited.
Definition at line 281 of file GoogleAuditor.cpp.
|
private |
When to audit the algorithms.
Definition at line 280 of file GoogleAuditor.cpp.