| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

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

- Search for |

- File List
- File Members

# NameAuditor.cpp

Go to the documentation of this file.

    00001 // NameAuditor:
    00002 //  An auditor that prints the name of each algorithm method before
    00003 // and after it is called///
    00004
    00005 #include "NameAuditor.h"
    00006
    00007 #include "GaudiKernel/MsgStream.h"
    00008 #include "GaudiKernel/INamedInterface.h"
    00009 #include "GaudiKernel/AudFactory.h"
    00010
    00011 DECLARE_AUDITOR_FACTORY(NameAuditor);
    00012
    00013 NameAuditor::NameAuditor(const std::string& name, ISvcLocator* pSvcLocator) :
    00014   Auditor(name, pSvcLocator)
    00015 {
    00016 }
    00017
    00018 NameAuditor::~NameAuditor(){
    00019 }
    00020
    00021 void NameAuditor::beforeInitialize(INamedInterface* alg) {
    00022   MsgStream log(msgSvc(), name());
    00023   log << MSG::INFO << " About to Enter " << alg->name() <<
    00024   " Initialization Method" << endreq;
    00025 }
    00026 void NameAuditor:: afterInitialize(INamedInterface* alg){
    00027   MsgStream log(msgSvc(), name());
    00028   log << MSG::INFO << "Just Exited " << alg->name() <<
    00029   " Initialization Method" << endreq;
    00030 }
    00031
    00032 void NameAuditor::beforeReinitialize(INamedInterface *alg) {
    00033   MsgStream log(msgSvc(), name());
    00034   log << MSG::INFO << " About to Enter " << alg->name() <<
    00035   " Reinitialization Method" << endreq;
    00036 }
    00037 void NameAuditor:: afterReinitialize(INamedInterface *alg){
    00038   MsgStream log(msgSvc(), name());
    00039   log << MSG::INFO << "Just Exited " << alg->name() <<
    00040   " Reinitialization Method" << endreq;
    00041 }
    00042
    00043 void NameAuditor:: beforeExecute(INamedInterface* alg){
    00044   MsgStream log(msgSvc(), name());
    00045   log <<  MSG::INFO << "About to Enter " << alg->name() <<
    00046   " Execute Method" << endreq;
    00047 }
    00048 void NameAuditor:: afterExecute(INamedInterface* alg, const StatusCode& ) {
    00049   MsgStream log(msgSvc(), name());
    00050   log <<  MSG::INFO << "Just Exited " << alg->name() <<
    00051   " Execute Method" << endreq;
    00052 }
    00053
    00054 void NameAuditor::beforeBeginRun(INamedInterface *alg) {
    00055   MsgStream log(msgSvc(), name());
    00056   log << MSG::INFO << " About to Enter " << alg->name() <<
    00057   " BeginRun Method" << endreq;
    00058 }
    00059 void NameAuditor:: afterBeginRun(INamedInterface *alg){
    00060   MsgStream log(msgSvc(), name());
    00061   log << MSG::INFO << "Just Exited " << alg->name() <<
    00062   " BeginRun Method" << endreq;
    00063 }
    00064 void NameAuditor::beforeEndRun(INamedInterface *alg) {
    00065   MsgStream log(msgSvc(), name());
    00066   log << MSG::INFO << " About to Enter " << alg->name() <<
    00067   " EndRun Method" << endreq;
    00068 }
    00069 void NameAuditor:: afterEndRun(INamedInterface *alg){
    00070   MsgStream log(msgSvc(), name());
    00071   log << MSG::INFO << "Just Exited " << alg->name() <<
    00072   " EndRun Method" << endreq;
    00073 }
    00074
    00075 void NameAuditor:: beforeFinalize(INamedInterface* alg) {
    00076   MsgStream log(msgSvc(), name());
    00077   log <<  MSG::INFO << "About to Enter " << alg->name() <<
    00078   " Finalize Method" << endreq;
    00079 }
    00080 void NameAuditor:: afterFinalize(INamedInterface* alg){
    00081   MsgStream log(msgSvc(), name());
    00082   log << MSG::INFO << "Just Exited " << alg->name() <<
    00083   " Finalize Method" << endreq;
    00084 }
    00085