| The Gaudi Framework v28r2p1 (f1a77ff4)

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Attributes | List of all members
RetCodeGuard Class Reference

Helper class to set the application return code in case of early exit (e.g. More...

`#include <src/RetCodeGuard.h>`

Collaboration diagram for RetCodeGuard:
[legend]

## Public Member Functions
| RetCodeGuard (const SmartIF< IProperty > &appmgr, int retcode)
void | ignore ()
| ~RetCodeGuard ()

## Private Attributes
SmartIF< IProperty > | m_appmgr
int | m_retcode

## Detailed Description

Helper class to set the application return code in case of early exit (e.g.

exception).

Definition at line 9 of file RetCodeGuard.h.

## Constructor & Destructor Documentation

RetCodeGuard::RetCodeGuard | ( | const SmartIF< IProperty > & | appmgr,
|  | int | retcode
| ) |  |
| inline

Definition at line 11 of file RetCodeGuard.h.

11 :
12 m_appmgr(appmgr), m_retcode(retcode) {}
gaudirun.retcode
retcode
Definition: gaudirun.py:478
RetCodeGuard::m_retcode
int m_retcode
Definition: RetCodeGuard.h:23
RetCodeGuard::m_appmgr
SmartIF< IProperty > m_appmgr
Definition: RetCodeGuard.h:22

RetCodeGuard::~RetCodeGuard | ( |  | ) |
| inline

Definition at line 16 of file RetCodeGuard.h.

16 {
17 if (UNLIKELY(Gaudi::ReturnCode::Success != m_retcode)) {
18 Gaudi::setAppReturnCode(m_appmgr, m_retcode);
19 }
20 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
RetCodeGuard::m_retcode
int m_retcode
Definition: RetCodeGuard.h:23
RetCodeGuard::m_appmgr
SmartIF< IProperty > m_appmgr
Definition: RetCodeGuard.h:22
Gaudi::setAppReturnCode
StatusCode setAppReturnCode(SmartIF< IProperty > &appmgr, int value, bool force=false)
Set the application return code.
Definition: AppReturnCode.h:51
Gaudi::ReturnCode::Success
constexpr int Success
Definition: AppReturnCode.h:18

## Member Function Documentation

void RetCodeGuard::ignore | ( |  | ) |
| inline

Definition at line 13 of file RetCodeGuard.h.

13 {
14 m_retcode = Gaudi::ReturnCode::Success;
15 }
RetCodeGuard::m_retcode
int m_retcode
Definition: RetCodeGuard.h:23
Gaudi::ReturnCode::Success
constexpr int Success
Definition: AppReturnCode.h:18

## Member Data Documentation

SmartIF<IProperty> RetCodeGuard::m_appmgr
| private

Definition at line 22 of file RetCodeGuard.h.

int RetCodeGuard::m_retcode
| private

Definition at line 23 of file RetCodeGuard.h.

The documentation for this class was generated from the following file:

- GaudiHive/src/RetCodeGuard.h