All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GslErrorCount.h
Go to the documentation of this file.
1 // $Id: GslErrorCount.h,v 1.2 2006/11/30 10:40:53 mato Exp $
2 // ============================================================================
3 #ifndef GAUDIGSL_GSLERRORCOUNT_H
4 #define GAUDIGSL_GSLERRORCOUNT_H 1
5 // Include files
6 // from STL
7 #include <string>
8 #include <map>
9 // from GaudiKernel
10 #include "GaudiKernel/AlgTool.h"
11 // from GaudiGSL
13 #include "GaudiGSL/GslError.h"
14 // forward declaration
15 
25 class GslErrorCount: public extends1<AlgTool, IGslErrorHandler> {
26 public:
27 
34  virtual StatusCode handle
35  ( const GslError& error ) const ;
36 
42  virtual StatusCode finalize () ;
43 
50  ( const std::string& type ,
51  const std::string& name ,
52  const IInterface* parent );
53 
55  virtual ~GslErrorCount( );
56 
57 private:
58 
60  typedef std::map<GslError,unsigned int> Counters ;
61  mutable Counters m_counters ;
62 
63 
64 };
65 
66 // ============================================================================
67 // The END
68 // ============================================================================
69 #endif // GAUDIGSL_GSLERRORCOUNT_H
70 // ============================================================================
Helper class to represent GSL errors.
Definition: GslError.h:17
virtual const std::string & type() const
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:58
virtual ~GslErrorCount()
destructor (protected and virtual)
virtual StatusCode finalize()
standard finalization of Tool
GslErrorCount(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
std::map< GslError, unsigned int > Counters
container of error counters
Definition: GslErrorCount.h:60
Definition of the basic interface.
Definition: IInterface.h:160
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
virtual StatusCode handle(const GslError &error) const
handle the GSL error
Concrete GSL error handler It is just counts number of GSL errors.
Definition: GslErrorCount.h:25
virtual const IInterface * parent() const
Retrieve parent of the sub-algtool.
Definition: AlgTool.cpp:65
Counters m_counters
Definition: GslErrorCount.h:61
virtual const std::string & name() const
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:51