| The Gaudi Framework v29r1 (5cd95fa2)

- 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 12 of file RetCodeGuard.h.

12 : m_appmgr( appmgr ), m_retcode( retcode ) {}
gaudirun.retcode
retcode
Definition: gaudirun.py:499
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 14 of file RetCodeGuard.h.

15 {
16 if ( UNLIKELY( Gaudi::ReturnCode::Success != m_retcode ) ) {
17 Gaudi::setAppReturnCode( m_appmgr, m_retcode );
18 }
19 }
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:128
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 { m_retcode = Gaudi::ReturnCode::Success; }
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