| The Gaudi Framework v32r1 (f65d50dc)

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::RetCodeGuard | ( | const SmartIF< IProperty > & | appmgr,
|  | int | retcode
| ) |  |
| inline

Definition at line 11 of file RetCodeGuard.h.

11 : m_appmgr( appmgr ), m_retcode( retcode ) {}
gaudirun.retcode
retcode
Definition: gaudirun.py:582
RetCodeGuard::m_retcode
int m_retcode
Definition: RetCodeGuard.h:19
RetCodeGuard::m_appmgr
SmartIF< IProperty > m_appmgr
Definition: RetCodeGuard.h:18

## ◆ ~RetCodeGuard()

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

Definition at line 13 of file RetCodeGuard.h.

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

## Member Function Documentation

## ◆ ignore()

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

Definition at line 12 of file RetCodeGuard.h.

12 { m_retcode = Gaudi::ReturnCode::Success; }
RetCodeGuard::m_retcode
int m_retcode
Definition: RetCodeGuard.h:19
Gaudi::ReturnCode::Success
constexpr int Success
Definition: AppReturnCode.h:16

## Member Data Documentation

## ◆ m_appmgr

SmartIF<IProperty> RetCodeGuard::m_appmgr
| private

Definition at line 18 of file RetCodeGuard.h.

## ◆ m_retcode

int RetCodeGuard::m_retcode
| private

Definition at line 19 of file RetCodeGuard.h.

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

- GaudiHive/src/RetCodeGuard.h