| The Gaudi Framework v29r1 (5cd95fa2)

- 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 <string>
6 #include <vector>
7 // GaudiKernel
8 #include "GaudiKernel/Service.h"
9 // Include files
10 // GaudiGSL
11 #include "GaudiGSL/GslError.h"
12 #include "GaudiGSL/IGslSvc.h"
13
14 // forward declarations
15 struct IGslErrorHandler; // from GaudiGSL
16
83 class GslSvc : public extends<Service, IGslSvc>
84 {
85 public:
86 using extends::extends;
87
89 GslSvc( const GslSvc& ) = delete;
90 GslSvc& operator=( const GslSvc& ) = delete;
91
97 StatusCode handle( const GslError& error ) const override;
98
103 GslErrorHandler handler() const override;
104
110 GslErrorHandler setHandler( GslErrorHandler handler ) const override;
111
117 StatusCode status( const int error ) const override;
118
125 StatusCode initialize() override;
126
133 StatusCode finalize() override;
134
135 private:
136 Gaudi::Property<std::string> m_errorPolicy{this, "ErrorPolicy", "GSL", ""};
137 Gaudi::Property<std::vector<std::string>> m_handlersTypeNames{this, "Handlers", {}, ""};
138 Gaudi::Property<std::vector<int>> m_ignore{this, "IgnoreCodes", {}, "codes to be ignored"};
139
140 std::vector<IGslErrorHandler*> m_handlers;
141 };
142
143 // ============================================================================
144 // The END
145 // ============================================================================
146 #endif // GAUDIGSL_GSLSVC_H
147 // ============================================================================
GslSvc::m_errorPolicy
Gaudi::Property< std::string > m_errorPolicy
Definition: GslSvc.h:136
GslSvc::m_handlersTypeNames
Gaudi::Property< std::vector< std::string > > m_handlersTypeNames
Definition: GslSvc.h:137
GslError
Helper class to represent GSL errors.
Definition: GslError.h:16
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:319
IGslErrorHandler
The abstract interface for arbitrary GSL error handler.
Definition: IGslErrorHandler.h:15
GslSvc::m_ignore
Gaudi::Property< std::vector< int > > m_ignore
Definition: GslSvc.h:138
GslSvc::finalize
StatusCode finalize() override
standard service finalization
Definition: GslSvc.cpp:113
GslSvc::operator=
GslSvc & operator=(const GslSvc &)=delete
Service.h
GslSvc::setHandler
GslErrorHandler setHandler(GslErrorHandler handler) const override
set new GSL error handler
Definition: GslSvc.cpp:144
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:106
GslError.h
GslSvc::initialize
StatusCode initialize() override
standard service initialization
Definition: GslSvc.cpp:37
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
GslSvc::GslSvc
GslSvc(const GslSvc &)=delete
no copy constructor / assignment
GslSvc
The implementation of IGslSvc interface.
Definition: GslSvc.h:83
GslSvc::handle
StatusCode handle(const GslError &error) const override
handle the GSL error
Definition: GslSvc.cpp:180
std::vector< IGslErrorHandler * >
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
GslSvc::handler
GslErrorHandler handler() const override
retrieve the current GSL error handler
Definition: GslSvc.cpp:130
GslSvc::m_handlers
std::vector< IGslErrorHandler * > m_handlers
Definition: GslSvc.h:140
IGslSvc.h
GslSvc::status
StatusCode status(const int error) const override
transform GSL error code to Gaudi status code
Definition: GslSvc.cpp:161