| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# GslErrorCount Class Reference

Concrete GSL error handler It is just counts number of GSL errors. More...

`#include <GslErrorCount.h>`

Inheritance diagram for GslErrorCount:

[legend]
Collaboration diagram for GslErrorCount:

[legend]

List of all members.

## 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

## Detailed Description

Concrete GSL error handler It is just counts number of GSL errors.

Author:
  Vanya Belyaev Ivan.Belyaev@itep.ru

Date:
  30/04/2002

Definition at line 25 of file GslErrorCount.h.

## Member Typedef Documentation

typedef std::map<GslError,unsigned int> GslErrorCount::Counters`[private]`

container of error counters

Definition at line 60 of file GslErrorCount.h.

## Constructor & Destructor Documentation

GslErrorCount::GslErrorCount | ( | const std::string & | type,
|  | const std::string & | name,
|  | const IInterface * | parent |
| ) |  |  |

Standard constructor.

Declaration of the Tool Factory.

Parameters:

  | type | tool type (?)
  | name | tool name
  | parent | pointer to parent

See also:
  ToolFactory

  IToolFactory

  IFactory Standard constructor

Parameters:

  | 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]`

destructor (protected and virtual)

Definition at line 50 of file GslErrorCount.cpp.

    00050 {}

## Member Function Documentation

StatusCode GslErrorCount::handle | ( | const GslError & | error | ) | const`[virtual]`

handle the GSL error

See also:
  IGslErrorHandler

Parameters:

  | error | error to be handled

See also:
  GslError

Returns:
  status code

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 | ( |  | ) | `[virtual]`

standard finalization of Tool

See also:
  AlgTool

  IAlgTool

Returns:
  status code

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 }

## Member Data Documentation

Counters GslErrorCount::m_counters`[mutable, private]`

Definition at line 61 of file GslErrorCount.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r10p1/GaudiGSL/src/Components/GslErrorCount.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r10p1/GaudiGSL/src/Components/GslErrorCount.cpp