Gaudi Framework, version v24r2
Home
Generated: Wed Dec 4 2013
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiKernel
GaudiKernel
AppReturnCode.h
Go to the documentation of this file.
1
6
#ifndef APPRETURNCODE_H_
7
#define APPRETURNCODE_H_
8
9
#include "
GaudiKernel/IProperty.h
"
10
#include "
GaudiKernel/Property.h
"
11
12
namespace
Gaudi
{
14
namespace
ReturnCode {
15
16
const
int
Success
= 0x00;
17
18
const
int
GenericFailure
= 0x01;
19
23
const
int
FailInput
= 0x02;
//< Error opening file
24
const
int
AlgorithmFailure
= 0x03;
//<
25
const
int
ScheduledStop
= 0x04;
//< Loop terminated because of user request
26
const
int
IncidentFailure
= 0x05;
//< Fatal error in Incident handling
27
const
int
UnhandledException
= 0x06;
//<
28
const
int
CorruptedInput
= 0x10;
//< Input file showed a corruption
32
const
int
FinalizationFailure
= 0x0b;
34
const
int
SignalOffset
= 0x80;
//< Offset for signal-related return codes
35
36
}
37
50
inline
StatusCode
setAppReturnCode
(
SmartIF<IProperty>
&appmgr,
int
value,
bool
force =
false
) {
51
if
(appmgr) {
52
IntegerProperty
returnCode(
"ReturnCode"
, 0);
53
if
(appmgr->getProperty(&returnCode).isSuccess()) {
54
if
(returnCode.
value
() == 0 || force) {
55
returnCode.
setValue
(value);
56
return
appmgr->setProperty(returnCode);
57
}
58
// Consider is a success if we do already have an error code.
59
return
StatusCode::SUCCESS
;
60
}
61
}
62
return
StatusCode::FAILURE
;
63
}
64
70
inline
int
getAppReturnCode
(
const
SmartIF<IProperty>
&appmgr) {
71
if
(appmgr) {
72
IntegerProperty
returnCode(
"ReturnCode"
, 0);
73
if
(appmgr->getProperty(&returnCode).isSuccess())
74
return
returnCode.
value
();
75
}
76
return
0;
77
}
78
}
79
#endif
/* APPRETURNCODE_H_ */
Generated at Wed Dec 4 2013 14:33:08 for Gaudi Framework, version v24r2 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004