| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# NameAuditor Class Reference

`#include <NameAuditor.h>`

Inheritance diagram for NameAuditor:

[legend]
Collaboration diagram for NameAuditor:

[legend]

List of all members.

## Detailed Description

Prints the name of each algorithm before entering the algorithm and after leaving it.

Author:
  M. Shapiro, LBNL

Definition at line 14 of file NameAuditor.h.

## Public Member Functions
| NameAuditor (const std::string &name, ISvcLocator *pSvcLocator)
virtual | ~NameAuditor ()
"before" Auditor hooks
virtual void | before (StandardEventType evt, const std::string &caller)
| Audit the start of a standard "event" for callers that do not implement INamedInterface.
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)
| Audit the start of a custom "event" for callers that do not implement INamedInterface.
virtual void | before (CustomEventTypeRef evt, INamedInterface *caller)
| Audit the start of a custom "event".
"after" Auditor hooks
virtual void | after (StandardEventType evt, const std::string &caller, const StatusCode &sc)
| Audit the end of a standard "event" for callers that do not implement INamedInterface.
virtual void | after (StandardEventType evt, INamedInterface *caller, const StatusCode &sc)
| Audit the end of a standard "event".
virtual void | after (CustomEventTypeRef evt, const std::string &caller, const StatusCode &)
| Audit the end of a custom "event" for callers that do not implement INamedInterface.
virtual void | after (CustomEventTypeRef evt, INamedInterface *caller, const StatusCode &sc)
| Audit the end of a custom "event".
## Private Types
enum | Action { BEFORE, AFTER }
## Private Member Functions
void | i_doAudit (const std::string &evt, const std::string &caller, Action action)
| Implementation of the auditor.
## Private Attributes
StringArrayProperty | m_types
| Filter for custom event types.

## Member Enumeration Documentation

enum NameAuditor::Action`[private]`

Enumerator:

  BEFORE |
  AFTER |

Definition at line 16 of file NameAuditor.h.

    00016 { BEFORE, AFTER };

## Constructor & Destructor Documentation

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

Definition at line 15 of file NameAuditor.cpp.

    00015                                                                         :
    00016   Auditor(name, pSvcLocator)
    00017 {
    00018
    00019   declareProperty("CustomEventTypes", m_types,
    00020                   "List of custom event types to audit ([]=all, ['none']=none");
    00021
    00022 }

NameAuditor::~NameAuditor | ( |  | ) | `[virtual]`

Definition at line 24 of file NameAuditor.cpp.

    00024                          {
    00025 }

## Member Function Documentation

void NameAuditor::before | ( | StandardEventType | ,
|  | const std::string & |  |
| ) |  |  | `[virtual]`

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

Reimplemented from Auditor.

Definition at line 28 of file NameAuditor.cpp.

    00029 {
    00030   std::ostringstream oss;
    00031   oss << evt;
    00032   before(oss.str(), caller);
    00033 }

virtual void NameAuditor::before | ( | StandardEventType | evt,
|  | INamedInterface * | obj |
| ) |  |  | `[inline, virtual]`

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

Reimplemented from Auditor.

Definition at line 26 of file NameAuditor.h.

    00026                                                                       {
    00027     if (caller) before(evt, caller->name());
    00028   }

virtual void NameAuditor::before | ( | CustomEventTypeRef | ,
|  | const std::string & |  |
| ) |  |  | `[inline, virtual]`

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

Reimplemented from Auditor.

Definition at line 29 of file NameAuditor.h.

    00029                                                                        {
    00030     i_doAudit(evt, caller, BEFORE);
    00031   }

virtual void NameAuditor::before | ( | CustomEventTypeRef | ,
|  | INamedInterface * |  |
| ) |  |  | `[inline, virtual]`

Audit the start of a custom "event".

Reimplemented from Auditor.

Definition at line 32 of file NameAuditor.h.

    00032                                                                        {
    00033     if (caller) before(evt, caller->name());
    00034   }

void NameAuditor::after | ( | StandardEventType | ,
|  | const std::string & | ,
|  | const StatusCode & | sc |
| ) |  |  | `[virtual]`

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

Reimplemented from Auditor.

Definition at line 36 of file NameAuditor.cpp.

    00037 {
    00038   std::ostringstream oss;
    00039   oss << evt;
    00040   after(oss.str(), caller, sc);
    00041 }

virtual void NameAuditor::after | ( | StandardEventType | ,
|  | INamedInterface * | ,
|  | const StatusCode & | sc |
| ) |  |  | `[inline, virtual]`

Audit the end of a standard "event".

Reimplemented from Auditor.

Definition at line 41 of file NameAuditor.h.

    00041                                                                                            {
    00042     if (caller) after(evt, caller->name(), sc);
    00043   }

virtual void NameAuditor::after | ( | CustomEventTypeRef | ,
|  | const std::string & | ,
|  | const StatusCode & | sc |
| ) |  |  | `[inline, virtual]`

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

Reimplemented from Auditor.

Definition at line 44 of file NameAuditor.h.

    00044                                                                                          {
    00045     i_doAudit(evt, caller, AFTER);
    00046   }

virtual void NameAuditor::after | ( | CustomEventTypeRef | ,
|  | INamedInterface * | ,
|  | const StatusCode & | sc |
| ) |  |  | `[inline, virtual]`

Audit the end of a custom "event".

Reimplemented from Auditor.

Definition at line 47 of file NameAuditor.h.

    00047                                                                                             {
    00048     if (caller) after(evt, caller->name(), sc);
    00049   }

void NameAuditor::i_doAudit | ( | const std::string & | evt,
|  | const std::string & | caller,
|  | Action | action |
| ) |  |  | `[private]`

Implementation of the auditor.

Definition at line 44 of file NameAuditor.cpp.

    00045 {
    00046   if (m_types.value().size() != 0) {
    00047     if ( (m_types.value())[0] == "none") {
    00048       return;
    00049     }
    00050
    00051     if ( find(m_types.value().begin(), m_types.value().end(), evt) ==
    00052          m_types.value().end() ) {
    00053       return;
    00054     }
    00055   }
    00056
    00057   MsgStream log( msgSvc(), name() );
    00058   if ( action==BEFORE ) {
    00059     log << MSG::INFO << "About to Enter " << caller << " with auditor trigger "
    00060         << evt << endreq;
    00061   }
    00062   else {
    00063     log << MSG::INFO << "Just Exited " << caller << " with auditor trigger "
    00064         << evt << endreq;
    00065   }
    00066 }

## Member Data Documentation

StringArrayProperty NameAuditor::m_types`[private]`

Filter for custom event types.

Definition at line 57 of file NameAuditor.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r4/GaudiAud/src/NameAuditor.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r4/GaudiAud/src/NameAuditor.cpp