|
Gaudi Framework, version v21r8 |
| Home | Generated: 17 Mar 2010 |
#include <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 (protected and virtual) | |
Private Types | |
| typedef std::map< GslError, unsigned int > | Counters |
| container of error counters | |
Private Attributes | |
| Counters | m_counters |
Definition at line 25 of file GslErrorCount.h.
typedef std::map<GslError,unsigned int> GslErrorCount::Counters [private] |
| GslErrorCount::GslErrorCount | ( | const std::string & | type, | |
| const std::string & | name, | |||
| const IInterface * | parent | |||
| ) |
Standard constructor.
Declaration of the Tool Factory.
| type | tool type (?) | |
| name | tool name | |
| parent | pointer to parent |
IToolFactory
IFactory Standard constructor
| type | tool type (?) | |
| name | tool name | |
| parent | pointer to parent |
Definition at line 39 of file GslErrorCount.cpp.
00042 : base_class ( type, name , parent ) 00043 , m_counters () 00044 {}
| 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 94 of file GslErrorCount.cpp.
00095 { 00096 // increase the counter 00097 m_counters[ error ] += 1 ; 00098 // 00099 return StatusCode::SUCCESS ; 00100 }
| StatusCode GslErrorCount::finalize | ( | void | ) | [virtual] |
standard finalization of Tool
Reimplemented from AlgTool.
Definition at line 60 of file GslErrorCount.cpp.
00061 { 00062 // printout the Error table 00063 MsgStream log( msgSvc() , name() ); 00064 const std::string stars( 78 , '*' ); 00065 log << MSG::INFO << stars << endmsg ; 00066 log << MSG::ERROR << m_counters.size() << " GSL errors handled" << endmsg ; 00067 for( Counters::const_iterator error = m_counters.begin() ; 00068 error != m_counters.end() ; ++error ) 00069 { 00070 log << MSG::ERROR 00071 << " #times " << error->second 00072 << " GSL code " << error->first.code 00073 << " Message '" << error->first.reason << "'" 00074 << " File '" << error->first.file << "'" 00075 << " Line " << error->first.line << endmsg ; 00076 } 00077 log << MSG::INFO << stars << endmsg ; 00078 // clear the counters 00079 m_counters.clear(); 00080 // finalize the base class 00081 return AlgTool::finalize (); 00082 }
Counters GslErrorCount::m_counters [mutable, private] |
Definition at line 61 of file GslErrorCount.h.