|
Gaudi Framework, version v22r2 |
| Home | Generated: Tue May 10 2011 |
Concrete GSL error handler It is just counts number of GSL errors. More...
#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 |
Concrete GSL error handler It is just counts number of GSL errors.
Definition at line 25 of file GslErrorCount.h.
typedef std::map<GslError,unsigned int> GslErrorCount::Counters [private] |
container of error counters
Definition at line 60 of file GslErrorCount.h.
| 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 |
| type | tool type (?) |
| name | tool name |
| parent | pointer to parent |
Definition at line 39 of file GslErrorCount.cpp.
: base_class ( type, name , parent ) , m_counters () {}
| GslErrorCount::~GslErrorCount | ( | ) | [virtual] |
| StatusCode GslErrorCount::finalize | ( | void | ) | [virtual] |
standard finalization of Tool
Reimplemented from AlgTool.
Definition at line 60 of file GslErrorCount.cpp.
{
// printout the Error table
MsgStream log( msgSvc() , name() );
const std::string stars( 78 , '*' );
log << MSG::INFO << stars << endmsg ;
log << MSG::ERROR << m_counters.size() << " GSL errors handled" << endmsg ;
for( Counters::const_iterator error = m_counters.begin() ;
error != m_counters.end() ; ++error )
{
log << MSG::ERROR
<< " #times " << error->second
<< " GSL code " << error->first.code
<< " Message '" << error->first.reason << "'"
<< " File '" << error->first.file << "'"
<< " Line " << error->first.line << endmsg ;
}
log << MSG::INFO << stars << endmsg ;
// clear the counters
m_counters.clear();
// finalize the base class
return AlgTool::finalize ();
}
| 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.
{
// increase the counter
m_counters[ error ] += 1 ;
//
return StatusCode::SUCCESS ;
}
Counters GslErrorCount::m_counters [mutable, private] |
Definition at line 61 of file GslErrorCount.h.