| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ChronoAuditor Class Reference

Monitors the cpu time usage of each algorithm. More...

`#include <ChronoAuditor.h>`

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

## Public Member Functions
| ChronoAuditor (const std::string &name, ISvcLocator *pSvcLocator)
virtual | ~ChronoAuditor ()
virtual StatusCode | initialize ()
Public Member Functions inherited from CommonAuditor
| CommonAuditor (const std::string &name, ISvcLocator *svcloc)
| Constructor.
virtual | ~CommonAuditor ()
| Destructor.
virtual void | before (StandardEventType evt, const std::string &caller)
virtual void | before (StandardEventType evt, INamedInterface *caller)
| The following methods are meant to be implemented by the child class...
virtual void | before (CustomEventTypeRef evt, const std::string &caller)
virtual void | before (CustomEventTypeRef evt, INamedInterface *caller)
virtual void | after (StandardEventType evt, const std::string &caller, const StatusCode &sc)
virtual void | after (StandardEventType evt, INamedInterface *caller, const StatusCode &sc)
virtual void | after (CustomEventTypeRef evt, const std::string &caller, const StatusCode &sc)
virtual void | after (CustomEventTypeRef evt, INamedInterface *caller, const StatusCode &sc)
Public Member Functions inherited from Auditor
| Auditor (const std::string &name, ISvcLocator *svcloc)
| Constructor.
virtual | ~Auditor ()
| Destructor.
StatusCode | sysInitialize ()
| Initialization method invoked by the framework.
StatusCode | sysFinalize ()
| Finalization method invoked by the framework.
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 | finalize ()
virtual const std::string & | name () const
virtual bool | isEnabled () const
SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service.
int | outputLevel () const
| Retrieve the output level of current auditor.
void | setOutputLevel (int level)
| Set the output level for current auditor.
SmartIF< ISvcLocator > & | serviceLocator () const
| The standard service locator.
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.
virtual StatusCode | setProperty (const Property &p)
| Set a value of a property of an auditor.
virtual StatusCode | setProperty (const std::string &s)
| Implementation of IProperty::setProperty.
virtual StatusCode | setProperty (const std::string &n, const std::string &v)
| Implementation of IProperty::setProperty.
virtual StatusCode | getProperty (Property *p) const
| Get the value of a property.
virtual const Property & | getProperty (const std::string &name) const
| Get the property by name.
virtual StatusCode | getProperty (const std::string &n, std::string &v) const
| Implementation of IProperty::getProperty.
const std::vector< Property * > & | getProperties () const
| Get all properties.
template<class TYPE >
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value
StatusCode | setProperties ()
| Set the auditor's properties.
template<class T >
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const
| Declare the named property.

## Private Member Functions
virtual void | i_before (CustomEventTypeRef evt, const std::string &caller)
| Default (catch-all) "before" Auditor hook.
virtual void | i_after (CustomEventTypeRef evt, const std::string &caller, const StatusCode &sc)
| Default (catch-all) "after" Auditor hook.
std::string | i_id (CustomEventTypeRef evt, const std::string &caller)
| Compute the id string to be used for the chrono entity.
SmartIF< IChronoStatSvc > & | chronoSvc ()

## Private Attributes
SmartIF< IChronoStatSvc > | m_chronoSvc

## Additional Inherited Members
Public Types inherited from Auditor
typedef Gaudi::PluginService::Factory2 < IAuditor *, const std::string &, ISvcLocator * > | Factory
Protected Member Functions inherited from CommonAuditor
bool | i_auditEventType (const std::string &evt)
| Check if we are requested to audit the passed event type.
void | i_updateCustomTypes (Property &)
| Update handler for the obsolete property CustomEventTypes.
Protected Attributes inherited from CommonAuditor
StringArrayProperty | m_types
StringArrayProperty | m_customTypes

## Detailed Description

Monitors the cpu time usage of each algorithm.

Author
  David Quarrie
  Marco Clemencic

Definition at line 14 of file ChronoAuditor.h.

## Constructor & Destructor Documentation

ChronoAuditor::ChronoAuditor | ( | const std::string & | name,
|  | ISvcLocator * | pSvcLocator
| ) |  |

Definition at line 14 of file ChronoAuditor.cpp.

: CommonAuditor(name, pSvcLocator) {
}

ChronoAuditor::~ChronoAuditor | ( |  | ) |
| virtual

Definition at line 18 of file ChronoAuditor.cpp.

{}

## Member Function Documentation

SmartIF<IChronoStatSvc>& ChronoAuditor::chronoSvc | ( |  | ) |
| inline private

Definition at line 34 of file ChronoAuditor.h.

{ return m_chronoSvc; }

void ChronoAuditor::i_after | ( | CustomEventTypeRef | evt,
|  | const std::string & | caller,
|  | const StatusCode & | sc
| ) |  |
| private virtual

Default (catch-all) "after" Auditor hook.

Implements CommonAuditor.

Definition at line 38 of file ChronoAuditor.cpp.

{
chronoSvc()->chronoStop(i_id(evt, caller));
}

void ChronoAuditor::i_before | ( | CustomEventTypeRef | evt,
|  | const std::string & | caller
| ) |  |
| private virtual

Default (catch-all) "before" Auditor hook.

Implements CommonAuditor.

Definition at line 33 of file ChronoAuditor.cpp.

{
chronoSvc()->chronoStart(i_id(evt, caller));
}

std::string ChronoAuditor::i_id | ( | CustomEventTypeRef | evt,
|  | const std::string & | caller
| ) |  |
| inline private

Compute the id string to be used for the chrono entity.

Definition at line 30 of file ChronoAuditor.h.

{
return caller + ":" + evt;
}

StatusCode ChronoAuditor::initialize | ( |  | ) |
| virtual

Reimplemented from Auditor.

Definition at line 20 of file ChronoAuditor.cpp.

{
StatusCode sc = CommonAuditor::initialize();
if (UNLIKELY(sc.isFailure())) return sc;
m_chronoSvc = serviceLocator()->service("ChronoStatSvc");
if (UNLIKELY(!m_chronoSvc.get())) {
MsgStream log(msgSvc(), name());
log << MSG::ERROR << "Cannot get ChronoStatSvc" << endmsg;
return StatusCode::FAILURE;
}
return StatusCode::SUCCESS;
}

## Member Data Documentation

SmartIF<IChronoStatSvc> ChronoAuditor::m_chronoSvc
| private

Definition at line 35 of file ChronoAuditor.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiAud/src/ChronoAuditor.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiAud/src/ChronoAuditor.cpp