GslErrorCount.h
Go to the documentation of this file.
1 #ifndef GAUDIGSL_GSLERRORCOUNT_H
2 #define GAUDIGSL_GSLERRORCOUNT_H 1
3 // Include files
4 // from STL
5 #include <string>
6 #include <map>
7 // from GaudiKernel
8 #include "GaudiKernel/AlgTool.h"
9 // from GaudiGSL
10 #include "GaudiGSL/IGslErrorHandler.h"
11 #include "GaudiGSL/GslError.h"
12 // forward declaration
13 
23 class GslErrorCount: public extends1<AlgTool, IGslErrorHandler> {
24 public:
25 
32  StatusCode handle( const GslError& error ) const override ;
33 
39  StatusCode finalize () override ;
40 
47  ( const std::string& type ,
48  const std::string& name ,
49  const IInterface* parent );
50 
52  ~GslErrorCount( ) override = default;
53 
54 private:
55 
57  typedef std::map<GslError,unsigned int> Counters ;
58  mutable Counters m_counters ;
59 
60 
61 };
62 
63 // ============================================================================
64 // The END
65 // ============================================================================
66 #endif // GAUDIGSL_GSLERRORCOUNT_H
67 // ============================================================================
Helper class to represent GSL errors.
Definition: GslError.h:15
~GslErrorCount() override=default
destructor (protected and virtual)
StatusCode handle(const GslError &error) const override
handle the GSL error
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:26
std::map< GslError, unsigned int > Counters
container of error counters
Definition: GslErrorCount.h:57
Definition of the basic interface.
Definition: IInterface.h:234
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
Concrete GSL error handler It is just counts number of GSL errors.
Definition: GslErrorCount.h:23
Counters m_counters
Definition: GslErrorCount.h:58
StatusCode finalize() override
standard finalization of Tool
string type
Definition: gaudirun.py:151