![]() |
|
|
Generated: 8 Jan 2009 |
#include <GslErrorCount.h>


Definition at line 25 of file GslErrorCount.h.
Public Member Functions | |
| virtual StatusCode | handle (const GslError &error) const |
| handle the GSL error | |
| virtual StatusCode | finalize () |
| standard finalization of Tool | |
| GslErrorCount (const std::string &type, const std::string &name, const IInterface *parent) | |
| Standard constructor. | |
| virtual | ~GslErrorCount () |
| destructor (protetced and virtual) | |
Private Types | |
| typedef std::map< GslError, unsigned int > | Counters |
| container of error counters | |
Private Attributes | |
| Counters | m_counters |
typedef std::map<GslError,unsigned int> GslErrorCount::Counters [private] |
| GslErrorCount::GslErrorCount | ( | const std::string & | type, | |
| const std::string & | name, | |||
| const IInterface * | parent | |||
| ) |
Standard constructor.
| type | tool type (?) | |
| name | tool name | |
| parent | pointer to parent |
Definition at line 40 of file GslErrorCount.cpp.
00043 : AlgTool ( type, name , parent ) 00044 , m_counters () 00045 { declareInterface<IGslErrorHandler> (this);};
| GslErrorCount::~GslErrorCount | ( | ) | [virtual] |
| StatusCode GslErrorCount::handle | ( | const GslError & | error | ) | const [virtual] |
handle the GSL error
| error | error to be handled |
Implements IGslErrorHandler.
Definition at line 95 of file GslErrorCount.cpp.
00096 { 00097 // increase the counter 00098 m_counters[ error ] += 1 ; 00099 // 00100 return StatusCode::SUCCESS ; 00101 };
| StatusCode GslErrorCount::finalize | ( | void | ) | [virtual] |
standard finalization of Tool
Reimplemented from AlgTool.
Definition at line 61 of file GslErrorCount.cpp.
00062 { 00063 // printout the Error table 00064 MsgStream log( msgSvc() , name() ); 00065 const std::string stars( 78 , '*' ); 00066 log << MSG::INFO << stars << endreq ; 00067 log << MSG::ERROR << m_counters.size() << " GSL errors handled" << endreq ; 00068 for( Counters::const_iterator error = m_counters.begin() ; 00069 error != m_counters.end() ; ++error ) 00070 { 00071 log << MSG::ERROR 00072 << " #times " << error->second 00073 << " GSL code " << error->first.code 00074 << " Message '" << error->first.reason << "'" 00075 << " File '" << error->first.file << "'" 00076 << " Line " << error->first.line << endreq ; 00077 } 00078 log << MSG::INFO << stars << endreq ; 00079 // clear the counters 00080 m_counters.clear(); 00081 // finalze the base class 00082 return AlgTool::finalize (); 00083 };
Counters GslErrorCount::m_counters [mutable, private] |
Definition at line 64 of file GslErrorCount.h.