#include <Monitor.h>
Public Member Functions | |
Monitor (const std::string &name, ISvcLocator *pSvcLocator) | |
virtual | ~Monitor () |
virtual StatusCode | initialize () |
virtual StatusCode | execute () |
virtual StatusCode | finalize () |
Private Attributes | |
int | m_nEvents |
int | m_frequency |
string | m_comment |
Definition at line 20 of file Monitor.h.
Atlfast::Monitor::Monitor | ( | const std::string & | name, | |
ISvcLocator * | pSvcLocator | |||
) |
Standard Athena-Algorithm Constructor
Definition at line 26 of file Monitor.cxx.
00030 : Algorithm( name, pSvcLocator ) 00031 { 00032 00033 // Set the parameter defaults. 00034 00035 // Declare the paramemters to Gaudi so that 00036 // they can be over-written via the job options file 00037 m_frequency = 50; 00038 m_comment ="no comment"; 00039 declareProperty( "Frequency",m_frequency ); 00040 declareProperty( "Comment", m_comment ); 00041 00042 }
Atlfast::Monitor::~Monitor | ( | ) | [virtual] |
Default Destructor
Definition at line 48 of file Monitor.cxx.
00048 { 00049 MsgStream log( messageService(), name() ) ; 00050 log << MSG::INFO << "destructor, deleting smearer" << endreq; 00051 }
StatusCode Atlfast::Monitor::initialize | ( | ) | [virtual] |
Standard Athena-Algorithm method
Definition at line 56 of file Monitor.cxx.
00057 { 00058 00059 m_nEvents=0; 00060 return StatusCode::SUCCESS ; 00061 }
StatusCode Atlfast::Monitor::execute | ( | ) | [virtual] |
Standard Athena-Algorithm method
Definition at line 77 of file Monitor.cxx.
00078 { 00079 00080 MsgStream log( messageService(), name() ) ; 00081 00082 ++m_nEvents; 00083 // Counter of events processed 00084 if( m_nEvents % m_frequency == 0) { 00085 log << MSG::INFO << " processing event number " 00086 << m_nEvents <<" "<<m_comment<<endreq; 00087 } 00088 00089 return StatusCode::SUCCESS; 00090 }
StatusCode Atlfast::Monitor::finalize | ( | ) | [virtual] |
Standard Athena-Algorithm method
Definition at line 67 of file Monitor.cxx.
00068 { 00069 00070 MsgStream log( messageService(), name() ) ; 00071 00072 log << MSG::INFO << "Finalizing" << endreq; 00073 00074 return StatusCode::SUCCESS ; 00075 }
int Atlfast::Monitor::m_nEvents [private] |
int Atlfast::Monitor::m_frequency [private] |
string Atlfast::Monitor::m_comment [private] |