| The Gaudi Framework v28r2-patches (bc4ad17a)

- 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 class IGslErrorHandler; // from GaudiGSL
16
83 class GslSvc : public extends<Service, IGslSvc>
84 {
85 public:
91 StatusCode handle( const GslError& error ) const override;
92
97 GslErrorHandler handler() const override;
98
104 GslErrorHandler setHandler( GslErrorHandler handler ) const override;
105
111 StatusCode status( const int error ) const override;
112
119 StatusCode initialize() override;
120
127 StatusCode finalize() override;
128
129 using extends::extends;
130
132 ~GslSvc() override = default;
133
134 private:
136 GslSvc();
138 GslSvc( const GslSvc& );
140 GslSvc& operator=( const GslSvc& );
141
142 private:
143 Gaudi::Property<std::string> m_errorPolicy{this, "ErrorPolicy", "GSL", ""};
144 Gaudi::Property<std::vector<std::string>> m_handlersTypeNames{this, "Handlers", {}, ""};
145 Gaudi::Property<std::vector<int>> m_ignore{this, "IgnoreCodes", {}, "codes to be ignored"};
146
147 typedef std::vector<IGslErrorHandler*> Handlers;
148 Handlers m_handlers;
149 };
150
151 // ============================================================================
152 // The END
153 // ============================================================================
154 #endif // GAUDIGSL_GSLSVC_H
155 // ============================================================================
IGslErrorHandler
The abstract interface for arbitrary GSL error handler.
Definition: IGslErrorHandler.h:15
GslSvc::m_errorPolicy
Gaudi::Property< std::string > m_errorPolicy
Definition: GslSvc.h:143
GslSvc::m_handlersTypeNames
Gaudi::Property< std::vector< std::string > > m_handlersTypeNames
Definition: GslSvc.h:144
GslError
Helper class to represent GSL errors.
Definition: GslError.h:15
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
GslSvc::m_ignore
Gaudi::Property< std::vector< int > > m_ignore
Definition: GslSvc.h:145
GslSvc::finalize
StatusCode finalize() override
standard service finalization
Definition: GslSvc.cpp:120
Service.h
GslSvc::setHandler
GslErrorHandler setHandler(GslErrorHandler handler) const override
set new GSL error handler
Definition: GslSvc.cpp:152
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:117
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:26
GslSvc::operator=
GslSvc & operator=(const GslSvc &)
assignment operator is private
GslSvc::m_handlers
Handlers m_handlers
Definition: GslSvc.h:148
GslSvc
The implementation of IGslSvc interface.
Definition: GslSvc.h:83
GslSvc::Handlers
std::vector< IGslErrorHandler * > Handlers
Definition: GslSvc.h:147
GslSvc::handle
StatusCode handle(const GslError &error) const override
handle the GSL error
Definition: GslSvc.cpp:186
std::vector< IGslErrorHandler * >
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::handler
GslErrorHandler handler() const override
retrieve the current GSL error handler
Definition: GslSvc.cpp:137
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:170