| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

GslSvc.h
Go to the documentation of this file.
1 #ifndef GAUDIGSL_GSLSVC_H
2 #define GAUDIGSL_GSLSVC_H 1
3 // Include files
4 // STD & STL
5 #include <vector>
6 #include <string>
7 // GaudiKernel
8 #include "GaudiKernel/Service.h"
9 // Include files
10 // GaudiGSL
11 #include "GaudiGSL/IGslSvc.h"
12 #include "GaudiGSL/GslError.h"
13
14 // forward declarations
15 class IGslErrorHandler ; // from GaudiGSL
16
83 class GslSvc: public extends<Service,
84 IGslSvc> {
85 public:
86
92 StatusCode handle ( const GslError& error ) const override;
93
98 GslErrorHandler handler () const override;
99
105 GslErrorHandler setHandler ( GslErrorHandler handler ) const override;
106
112 StatusCode status ( const int error ) const override;
113
120 StatusCode initialize () override;
121
128 StatusCode finalize () override;
129
135 GslSvc ( const std::string& name ,
136 ISvcLocator* svc );
137
139 ~GslSvc() override = default;
140
141 private:
142
144 GslSvc();
146 GslSvc ( const GslSvc& );
148 GslSvc& operator= ( const GslSvc& );
149
150 private:
151
153 std::string m_errorPolicy = "GSL" ;
154
156 typedef std::vector<std::string> Names ;
157 Names m_handlersTypeNames ;
158 typedef std::vector<IGslErrorHandler*> Handlers ;
159 Handlers m_handlers ;
160
162 std::vector<int> m_ignore ;
163
164 };
165
166 // ============================================================================
167 // The END
168 // ============================================================================
169 #endif // GAUDIGSL_GSLSVC_H
170 // ============================================================================
IGslErrorHandler
The abstract interface for arbitrary GSL error handler.
Definition: IGslErrorHandler.h:15
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
GslError
Helper class to represent GSL errors.
Definition: GslError.h:15
GslSvc::m_ignore
std::vector< int > m_ignore
codes to be ignored
Definition: GslSvc.h:162
GslSvc::Names
std::vector< std::string > Names
external handlers
Definition: GslSvc.h:156
GslSvc::handle
StatusCode handle(const GslError &error) const override
handle the GSL error
Definition: GslSvc.cpp:205
GslSvc::m_handlersTypeNames
Names m_handlersTypeNames
Definition: GslSvc.h:157
GslSvc::finalize
StatusCode finalize() override
standard service finalization
Definition: GslSvc.cpp:139
std::string
STL class.
Service.h
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:118
GslError.h
GslSvc::initialize
StatusCode initialize() override
standard service initialization
Definition: GslSvc.cpp:56
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GslSvc::operator=
GslSvc & operator=(const GslSvc &)
assignment operator is private
GslSvc::m_handlers
Handlers m_handlers
Definition: GslSvc.h:159
GslSvc
The implementation of IGslSvc interface.
Definition: GslSvc.h:83
GslSvc::Handlers
std::vector< IGslErrorHandler * > Handlers
Definition: GslSvc.h:158
std::vector< std::string >
GslSvc::setHandler
GslErrorHandler setHandler(GslErrorHandler handler) const override
set new GSL error handler
Definition: GslSvc.cpp:171
GslSvc::m_errorPolicy
std::string m_errorPolicy
error policy
Definition: GslSvc.h:153
GslSvc::handler
GslErrorHandler handler() const override
retrieve the current GSL error handler
Definition: GslSvc.cpp:156
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
GslSvc::~GslSvc
~GslSvc() override=default
destructor, virtual and protected
GslSvc::GslSvc
GslSvc()
default constructor is private
IGslSvc.h
GslSvc::status
StatusCode status(const int error) const override
transform GSL error code to Gaudi status code
Definition: GslSvc.cpp:189