| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

Public Member Functions | Private Types | Private Attributes

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

      : base_class ( type, name , parent )
      , m_counters ()
    {}

GslErrorCount::~GslErrorCount | ( | ) | `[virtual]`

destructor (protected and virtual)

Definition at line 50 of file GslErrorCount.cpp.

    {}

## Member Function Documentation

StatusCode GslErrorCount::finalize | ( | void | ) | `[virtual]`

standard finalization of Tool

See also:
  AlgTool
  IAlgTool

Returns:
  status code

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

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.

    {
      // increase the counter
      m_counters[ error ] += 1 ;
      //
      return StatusCode::SUCCESS ;
    }

## 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_v22r2/GaudiGSL/src/Components/GslErrorCount.h
- /afs/.cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r2/GaudiGSL/src/Components/GslErrorCount.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines