Gaudi Framework, version v20r3

Generated: 24 Nov 2008

Auditor Class Reference

#include <GaudiKernel/Auditor.h>

Inheritance diagram for Auditor:

Inheritance graph
[legend]
Collaboration diagram for Auditor:

Collaboration graph
[legend]

List of all members.


Detailed Description

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 initialise() and afterwards.

Author:
David Quarrie
Date:
2000
Author:
Marco Clemencic
Date:
2008-03

Definition at line 34 of file Auditor.h.


Public Member Functions

 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 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 *)
virtual void before (CustomEventTypeRef, const std::string &)
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 &)
virtual void after (CustomEventTypeRef, const std::string &, const StatusCode &)
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.
virtual bool isEnabled () const
 Tell if the auditor is enabled or not.
IMessageSvcmsgSvc () const
 The standard message service.
int outputLevel () const
 Retrieve the outputlevel of current auditor.
void setOutputLevel (int level)
 Set the outputlevel for current auditor.
ISvcLocatorserviceLocator () 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 PropertygetProperty (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>
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
unsigned long addRef ()
 Methods for IInterface.
unsigned long release ()
 Release Interface instance.
StatusCode queryInterface (const InterfaceID &riid, void **)
 Query interfaces of Interface.

Private Member Functions

 Auditor (const Auditor &a)
Auditoroperator= (const Auditor &rhs)

Private Attributes

long m_refCount
 Counter for references to Auditor.
std::string m_name
 Auditor's name for identification.
IMessageSvcm_MS
 Message service.
ISvcLocatorm_pSvcLocator
 Pointer to service locator service.
PropertyMgrm_PropertyMgr
 For management of properties.
int m_outputLevel
 Auditor output level.
bool m_isEnabled
 Auditor is enabled flag.
bool m_isInitialized
 Auditor has been initialized flag.
bool m_isFinalized
 Auditor has been finalized flag.

Constructor & Destructor Documentation

Auditor::Auditor ( const std::string &  name,
ISvcLocator svcloc 
)

Constructor.

Parameters:
name The algorithm object's name
svcloc A pointer to a service location service

Definition at line 15 of file Auditor.cpp.

00016 : m_refCount(0),
00017   m_name(name),
00018   m_MS (0),
00019   m_pSvcLocator(pSvcLocator),
00020   m_isEnabled(true),
00021   m_isInitialized(false),
00022   m_isFinalized(false)
00023 {
00024   m_PropertyMgr = new PropertyMgr();
00025 
00026   // Declare common Auditor properties with their defaults
00027   declareProperty( "OutputLevel", m_outputLevel = MSG::NIL);
00028   declareProperty( "Enable", m_isEnabled = true);
00029 
00030 }

Auditor::~Auditor (  )  [virtual]

Destructor.

Definition at line 33 of file Auditor.cpp.

00033                   {
00034   delete m_PropertyMgr;
00035 }

Auditor::Auditor ( const Auditor a  )  [private]


Member Function Documentation

StatusCode Auditor::sysInitialize (  )  [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 38 of file Auditor.cpp.

00038                                   {
00039   StatusCode sc;
00040 
00041   // Bypass the initialization if the auditor is disabled or
00042   // has already been initialized.
00043   if ( isEnabled( ) && ! m_isInitialized ) {
00044 
00045     // Setup the default service ... this should be upgraded so as to be configurable.
00046     if( 0 == m_pSvcLocator )
00047       return StatusCode::FAILURE;
00048 
00049     // Set up message service
00050     sc = m_pSvcLocator->getService("MessageSvc", IID_IMessageSvc, *pp_cast<IInterface>(&m_MS));
00051     if( !sc.isSuccess() )  return StatusCode::FAILURE;
00052 
00053     // Set the Auditor's properties
00054     sc = setProperties();
00055     if( !sc.isSuccess() )  return StatusCode::FAILURE;
00056 
00057     // Check current outputLevel to evetually inform the MessagsSvc
00058     if( m_outputLevel != MSG::NIL ) {
00059       setOutputLevel( m_outputLevel );
00060     }
00061 
00062     {
00063       try{
00064         // Invoke the initialize() method of the derived class
00065         sc = initialize();
00066         if( !sc.isSuccess() )  return StatusCode::FAILURE;
00067         m_isInitialized = true;
00068 
00069         return sc;                                               
00070       }
00071       catch ( const GaudiException& Exception )                  
00072         {
00074           MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
00075           log << MSG::FATAL << " Exception with tag=" << Exception.tag() << " is catched " << endreq;
00077           MsgStream logEx ( msgSvc() , Exception.tag() );
00078           logEx << MSG::ERROR << Exception  << endreq;
00079         }
00080       catch( const std::exception& Exception )                   
00081         {
00083           MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
00084           log << MSG::FATAL << " Standard std::exception is catched " << endreq;
00086           MsgStream logEx ( msgSvc() , name() + "*std::exception*" );
00087           logEx << MSG::ERROR << Exception.what()  << endreq;
00088         }
00089       catch(...)
00090         {
00092           MsgStream log ( msgSvc() , name() + ".sysInitialize()" );
00093           log << MSG::FATAL << " UNKNOWN Exception is  catched " << endreq;
00094         }
00095     }
00096   }
00098   return StatusCode::FAILURE;
00099 }

StatusCode Auditor::sysFinalize (  )  [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.

Reimplemented in MemoryAuditor, and MemStatAuditor.

Definition at line 169 of file Auditor.cpp.

00169                                 {
00170   StatusCode sc = StatusCode::SUCCESS;
00171   try{
00172     //
00173     // Invoke the finalize() method of the derived class if
00174     // it has been initilized.
00175     if ( m_isInitialized && ! m_isFinalized ) {
00176       m_isFinalized = true;
00177       sc = finalize();
00178       if( !sc.isSuccess() )  return StatusCode::FAILURE;
00179     }
00180     return sc;                                               
00181     //
00182   }
00183   catch( const GaudiException& Exception )                   
00184     {
00186       MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
00187       log << MSG::FATAL
00188           << " Exception with tag=" << Exception.tag() << " is catched " << endreq;
00191       MsgStream logEx ( msgSvc() , Exception.tag() );
00192       logEx << MSG::ERROR
00193             << Exception  << endreq;
00194     }
00195   catch( const std::exception& Exception )                   
00196     {
00198       MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
00199       log << MSG::FATAL
00200           << " Standard std::exception is catched " << endreq;
00202       MsgStream logEx ( msgSvc() , name() + "*std::exception*" );
00203       logEx << MSG::ERROR
00204             << Exception.what()  << endreq;
00205     }
00206   catch( ... )                                                
00207     {
00209       MsgStream log ( msgSvc() , name() + ".sysFinalize()" );
00210       log << MSG::FATAL
00211           << " UNKNOWN Exception is  catched " << endreq;
00212     }
00214   return StatusCode::FAILURE ;
00215 }

void Auditor::before ( StandardEventType  evt,
INamedInterface obj 
) [virtual]

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

Implements IAuditor.

Reimplemented in TimingAuditor.

Definition at line 106 of file Auditor.cpp.

00106                                                                {
00107   switch (evt) {
00108   case Initialize:   beforeInitialize(obj);   break;
00109   case ReInitialize: beforeReinitialize(obj); break;
00110   case Execute:      beforeExecute(obj);      break;
00111   case BeginRun:     beforeBeginRun(obj);     break;
00112   case EndRun:       beforeEndRun(obj);       break;
00113   case Finalize:     beforeFinalize(obj);     break;
00114   case Start:        break;
00115   case Stop:         break;
00116   case ReStart:      break;
00117   default: ;// do nothing
00118   }
00119 }

void Auditor::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 120 of file Auditor.cpp.

00120 {}

void Auditor::before ( CustomEventTypeRef  ,
INamedInterface  
) [virtual]

Definition at line 122 of file Auditor.cpp.

00122 {}

void Auditor::before ( CustomEventTypeRef  ,
const std::string &   
) [virtual]

Reimplemented in TimingAuditor, ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 123 of file Auditor.cpp.

00123 {}

void Auditor::after ( StandardEventType  ,
INamedInterface ,
const StatusCode sc 
) [virtual]

Audit the end of a standard "event".

Implements IAuditor.

Reimplemented in TimingAuditor.

Definition at line 126 of file Auditor.cpp.

00126                                                                                     {
00127   switch (evt) {
00128   case Initialize:   afterInitialize(obj);   break;
00129   case ReInitialize: afterReinitialize(obj); break;
00130   case Execute:      afterExecute(obj, sc);  break;
00131   case BeginRun:     afterBeginRun(obj);     break;
00132   case EndRun:       afterEndRun(obj);       break;
00133   case Finalize:     afterFinalize(obj);     break;
00134   case Start:        break;
00135   case Stop:         break;
00136   case ReStart:      break;
00137   default: ;// do nothing
00138   }
00139 }

void Auditor::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 140 of file Auditor.cpp.

00140 {}

void Auditor::after ( CustomEventTypeRef  ,
INamedInterface ,
const StatusCode  
) [virtual]

Definition at line 142 of file Auditor.cpp.

00142 {}

void Auditor::after ( CustomEventTypeRef  ,
const std::string &  ,
const StatusCode  
) [virtual]

Reimplemented in TimingAuditor, ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 143 of file Auditor.cpp.

00143 {}

void Auditor::beforeInitialize ( INamedInterface  )  [virtual]

Deprecated:
use before

Implements IAuditor.

Reimplemented in AlgContextAuditor, ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 145 of file Auditor.cpp.

00145 {}

void Auditor::afterInitialize ( INamedInterface  )  [virtual]

Deprecated:
use after

Implements IAuditor.

Reimplemented in AlgContextAuditor, ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 147 of file Auditor.cpp.

00147 {}

void Auditor::beforeReinitialize ( INamedInterface  )  [virtual]

Deprecated:
use before

Implements IAuditor.

Reimplemented in ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 149 of file Auditor.cpp.

00149 {}

void Auditor::afterReinitialize ( INamedInterface  )  [virtual]

Deprecated:
use after

Implements IAuditor.

Reimplemented in ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 151 of file Auditor.cpp.

00151 {}

void Auditor::beforeExecute ( INamedInterface  )  [virtual]

Deprecated:
use before

Implements IAuditor.

Reimplemented in AlgContextAuditor, AlgErrorAuditor, ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 153 of file Auditor.cpp.

00153 {}

void Auditor::afterExecute ( INamedInterface ,
const StatusCode  
) [virtual]

Deprecated:
use after

Implements IAuditor.

Reimplemented in AlgContextAuditor, AlgErrorAuditor, ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 155 of file Auditor.cpp.

00155 {}

void Auditor::beforeFinalize ( INamedInterface  )  [virtual]

Deprecated:
use before

Implements IAuditor.

Reimplemented in AlgContextAuditor, ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 165 of file Auditor.cpp.

00165 {}

void Auditor::afterFinalize ( INamedInterface  )  [virtual]

Deprecated:
use after

Implements IAuditor.

Reimplemented in AlgContextAuditor, ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 167 of file Auditor.cpp.

00167 {}

void Auditor::beforeBeginRun ( INamedInterface  )  [virtual]

Deprecated:
use before

Implements IAuditor.

Reimplemented in ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 157 of file Auditor.cpp.

00157 {}

void Auditor::afterBeginRun ( INamedInterface  )  [virtual]

Deprecated:
use after

Implements IAuditor.

Reimplemented in ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 159 of file Auditor.cpp.

00159 {}

void Auditor::beforeEndRun ( INamedInterface  )  [virtual]

Deprecated:
use before

Implements IAuditor.

Reimplemented in ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 161 of file Auditor.cpp.

00161 {}

void Auditor::afterEndRun ( INamedInterface  )  [virtual]

Deprecated:
use after

Implements IAuditor.

Reimplemented in ChronoAuditor, MemoryAuditor, MemStatAuditor, and NameAuditor.

Definition at line 163 of file Auditor.cpp.

00163 {}

StatusCode Auditor::initialize (  )  [virtual]

Reimplemented in TimingAuditor, AlgContextAuditor, and AlgErrorAuditor.

Definition at line 101 of file Auditor.cpp.

00101                                {
00102   return StatusCode::SUCCESS;
00103 }

StatusCode Auditor::finalize ( void   )  [virtual]

Reimplemented in TimingAuditor, AlgContextAuditor, and AlgErrorAuditor.

Definition at line 217 of file Auditor.cpp.

00217                              {
00218   if( m_MS ) {
00219     m_MS->release();
00220     m_MS = 0;
00221   }
00222   return StatusCode::SUCCESS;
00223 }

const std::string & Auditor::name (  )  const [virtual]

Retrieve the name of the instance.

Implements INamedInterface.

Definition at line 225 of file Auditor.cpp.

00225                                      {
00226   return m_name;
00227 }

bool Auditor::isEnabled (  )  const [virtual]

Tell if the auditor is enabled or not.

Implements IAuditor.

Definition at line 229 of file Auditor.cpp.

00229                                {
00230   return m_isEnabled;
00231 }

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 233 of file Auditor.cpp.

00233                                    {
00234   return m_MS;
00235 }

int Auditor::outputLevel (  )  const [inline]

Retrieve the outputlevel of current auditor.

Definition at line 101 of file Auditor.h.

00101 { return m_outputLevel; }

void Auditor::setOutputLevel ( int  level  ) 

Set the outputlevel for current auditor.

Definition at line 237 of file Auditor.cpp.

00237                                         {
00238   if( m_MS != 0) {
00239     m_MS->setOutputLevel( name(), level );
00240   }
00241 }

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 243 of file Auditor.cpp.

00243                                             {
00244   return m_pSvcLocator;
00245 }

template<class T>
StatusCode Auditor::service ( const std::string &  name,
T *&  svc,
bool  createIf = false 
) const [inline]

Access a service by name, creating it if it doesn't already exist.

Definition at line 115 of file Auditor.h.

00115                                                                                     {
00116     IService* theSvc;
00117     StatusCode sc = serviceLocator()->getService( name, theSvc, createIf );
00118     if ( sc.isSuccess() ) {
00119       return theSvc->queryInterface(T::interfaceID(), (void**)&svc);
00120     }
00121     svc = 0;
00122     return sc;
00123   }

StatusCode Auditor::setProperty ( const Property p  )  [virtual]

Set a value of a property of an auditor.

Implements IProperty.

Definition at line 299 of file Auditor.cpp.

00299                                                  {
00300         return m_PropertyMgr->setProperty(p);
00301 }

StatusCode Auditor::setProperty ( const std::string &  s  )  [virtual]

Implementation of IProperty::setProperty.

Implements IProperty.

Definition at line 302 of file Auditor.cpp.

00302                                                   {
00303         return m_PropertyMgr->setProperty(s);
00304 }

StatusCode Auditor::setProperty ( const std::string &  n,
const std::string &  v 
) [virtual]

Implementation of IProperty::setProperty.

Implements IProperty.

Definition at line 305 of file Auditor.cpp.

00305                                                                       {
00306         return m_PropertyMgr->setProperty(n,v);
00307 }

StatusCode Auditor::getProperty ( Property p  )  const [virtual]

Get the value of a property.

Implements IProperty.

Definition at line 308 of file Auditor.cpp.

00308                                                  {
00309         return m_PropertyMgr->getProperty(p);
00310 }

const Property & Auditor::getProperty ( const std::string &  name  )  const [virtual]

Get the property by name.

Implements IProperty.

Definition at line 311 of file Auditor.cpp.

00311                                                                 {
00312         return m_PropertyMgr->getProperty(name);
00313 }

StatusCode Auditor::getProperty ( const std::string &  n,
std::string &  v 
) const [virtual]

Implementation of IProperty::getProperty.

Implements IProperty.

Definition at line 314 of file Auditor.cpp.

00314                                                                        {
00315         return m_PropertyMgr->getProperty(n,v);
00316 }

const std::vector< Property * > & Auditor::getProperties (  )  const [virtual]

Get all properties.

Implements IProperty.

Definition at line 317 of file Auditor.cpp.

00317                                                           {
00318         return m_PropertyMgr->getProperties();
00319 }

template<class TYPE>
StatusCode Auditor::setProperty ( const std::string &  name,
const TYPE &  value 
) [inline]

set the property form the value

  std::vector<double> data = ... ;
  setProperty( "Data" , data ) ;

  std::map<std::string,double> cuts = ... ;
  setProperty( "Cuts" , cuts ) ;

  std::map<std::string,std::string> dict = ... ;
  setProperty( "Dictionary" , dict ) ;

Note: the interface IProperty allows setting of the properties either directly from other properties or from strings only

This is very convinient 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

    setProperty ( "OutputLevel" , "1"    ) ;
    setProperty ( "Enable"      , "True" ) ;
    setProperty ( "ErrorMax"    , "10"   ) ;

For simple cases it is more or less ok, but for complicated properties it is just ugly..

Parameters:
name name of the property
value value of the property
See also:
Gaudi::Utils::setProperty
Author:
Vanya BELYAEV ibelyaev@physics.syr.edu
Date:
2007-05-13

Definition at line 189 of file Auditor.h.

00191   { return Gaudi::Utils::setProperty ( m_PropertyMgr , name , value ) ; }

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 284 of file Auditor.cpp.

00284                                   {
00285   if( 0 != m_pSvcLocator )    {
00286     IJobOptionsSvc* jos;
00287     StatusCode sc = service("JobOptionsSvc", jos);
00288     if( sc.isSuccess() )    {
00289       jos->setMyProperties( name(), this ).ignore();
00290       jos->release();
00291       return StatusCode::SUCCESS;
00292     }
00293   }
00294   return StatusCode::FAILURE;
00295 }

template<class T>
Property* Auditor::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
) const [inline]

Declare the named property.

  MyAuditor( ... )
     : Auditor ( ...  )
     , m_property1   ( ... )
     , m_property2   ( ... )
   {
     // declare the property
     declareProperty( "Property1" , m_property1 , "Doc fro property #1" ) ;

     // declare the property and attach the handler  to it
     declareProperty( "Property2" , m_property2 , "Doc for property #2" )
        -> declareUpdateHandler( &MyAlg::handler_2 ) ;

   }

See also:
PropertyMgr

PropertyMgr::declareProperty

Parameters:
name the property name
proeprty the property itself,
doc the documentation string
Returns:
the actual property objects

Definition at line 229 of file Auditor.h.

00230                                                                   {
00231         return m_PropertyMgr->declareProperty(name, property, doc);
00232   }

unsigned long Auditor::addRef (  )  [virtual]

Methods for IInterface.

Implements IInterface.

Definition at line 249 of file Auditor.cpp.

00249                               {
00250   return ++m_refCount;
00251 }

unsigned long Auditor::release (  )  [virtual]

Release Interface instance.

Implements IInterface.

Definition at line 253 of file Auditor.cpp.

00253                                {
00254   long count = --m_refCount;
00255   if( count <= 0) {
00256     delete this;
00257   }
00258   return count;
00259 }

StatusCode Auditor::queryInterface ( const InterfaceID riid,
void **  ppvInterface 
) [virtual]

Query interfaces of Interface.

Parameters:
riid ID of Interface to be retrieved
ppvInterface Pointer to Location for interface pointer

Implements IInterface.

Reimplemented in TimingAuditor.

Definition at line 262 of file Auditor.cpp.

00264 {
00265   if ( 0 == ppISvc ) { return StatusCode::FAILURE ; } // RETURN
00266 
00267   if      ( IAuditor        ::interfaceID() . versionMatch ( riid ) )
00268   { *ppISvc = static_cast<IAuditor*>         ( this ) ; }
00269   else if ( IProperty       ::interfaceID() . versionMatch ( riid ) )
00270   { *ppISvc = static_cast<IProperty*>        ( this ) ; }
00271   else if ( INamedInterface ::interfaceID() . versionMatch ( riid ) )
00272   { *ppISvc = static_cast<INamedInterface*>  ( this ) ; }
00273   else if ( IInterface      ::interfaceID() . versionMatch ( riid ) )
00274   { *ppISvc = static_cast<IInterface*>       ( this ) ; }
00275   else { *ppISvc = 0 ; return StatusCode::FAILURE; } // RETURN
00276   // increment the reference counter
00277   addRef();
00278   //
00279   return StatusCode::SUCCESS;
00280 }

Auditor& Auditor::operator= ( const Auditor rhs  )  [private]


Member Data Documentation

long Auditor::m_refCount [private]

Counter for references to Auditor.

Definition at line 241 of file Auditor.h.

std::string Auditor::m_name [private]

Auditor's name for identification.

Definition at line 242 of file Auditor.h.

Message service.

Definition at line 244 of file Auditor.h.

Pointer to service locator service.

Definition at line 245 of file Auditor.h.

For management of properties.

Definition at line 246 of file Auditor.h.

int Auditor::m_outputLevel [private]

Auditor output level.

Definition at line 247 of file Auditor.h.

bool Auditor::m_isEnabled [private]

Auditor is enabled flag.

Definition at line 248 of file Auditor.h.

bool Auditor::m_isInitialized [private]

Auditor has been initialized flag.

Definition at line 249 of file Auditor.h.

bool Auditor::m_isFinalized [private]

Auditor has been finalized flag.

Definition at line 250 of file Auditor.h.


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

Generated at Mon Nov 24 14:44:57 2008 for Gaudi Framework, version v20r3 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004