Cat
Public Types | Public Member Functions | Protected Attributes | List of all members
StatusCode Class Reference

#include <GaudiKernel/StatusCode.h>

Public Types

enum  Type { FAILURE = 0, SUCCESS = 1 }
 

Public Member Functions

 StatusCode (unsigned long code=SUCCESS)
 Constructor. More...
 
bool isSuccess () const
 
bool isFailure () const
 
StatusCodeoperator= (unsigned long value)
 Assignment operator. More...
 

Protected Attributes

unsigned long d_code
 The status code. More...
 

Detailed Description

This class is used for returning status codes from appropriate routines.

Author
Iain Last
Pere Mato
Sebastien Ponce

Definition at line 16 of file StatusCode.h.

Member Enumeration Documentation

◆ Type

Enumerator
FAILURE 
SUCCESS 

Definition at line 18 of file StatusCode.h.

18  {
19  FAILURE = 0,
20  SUCCESS = 1
21  };

Constructor & Destructor Documentation

◆ StatusCode()

StatusCode::StatusCode ( unsigned long  code = SUCCESS)
inline

Constructor.

Definition at line 61 of file StatusCode.h.

61  : d_code(code) {
62 }
unsigned long d_code
The status code.
Definition: StatusCode.h:58

Member Function Documentation

◆ isFailure()

bool StatusCode::isFailure ( ) const
inline

Test for a status code of FAILURE. N.B. This is a specific type of failure where there aren't any more appropriate staus codes. To test for any failure use : if ( !StatusCode.isSuccess() ) ...

Definition at line 68 of file StatusCode.h.

References d_code, and SUCCESS.

Referenced by A3PE::clockDivision(), LSDelayChipV1::configRegBulkRead(), LSDelayChipV1::configRegBulkWrite(), A3PE::enableStorage(), export_base(), A3PE::fifoDepth(), A3PE::fifoLatency(), FEB_v1::gbtAcknowledgeConfig(), FEB_v1::gbtDLLReset(), A3PE::latencyAX(), A3PE::lengthAX(), A3PE::nTrigger(), A3PE::pipeline(), Phaser::read(), ICPhaser::read(), ICPhaser::reset(), A3PE::reset(), A3PE::setAddFromAXRam(), A3PE::setAddToAXRam(), A3PE::setAXRamUsb(), FEB_v1::setCalibCte(), FEB_v1::setClock80MHzFallingEdge(), A3PE::setClockDivision(), FEB_v1::setClockFallingEdge(), FEB_v1::setDisableSubtract(), A3PE::setFifoDepth(), A3PE::setFifoLatency(), FEB_v1::setGain4(), FEB_v1::setGbt80MHzClkEport(), FEB_v1::setGbtClockStrength(), FEB_v1::setGbtDataPath(), FEB_v1::setGbtDLLEport(), FEB_v1::setGbtEnableEport(), FEB_v1::setGbtMode(), FEB_v1::setGbtTermEport(), FEB_v1::setGbtTrackMode(), FEB_v1::setGlobalPseudoPMEnable(), FEB_v1::setInjectModeFE(), FEB_v1::setLatency(), A3PE::setLatencyAX(), FEB_v1::setLatencyLLT(), FEB_v1::setLatencyLLTCorner(), FEB_v1::setLatencyLLTSideNb(), FEB_v1::setLatencyLLTUpNb(), A3PE::setLengthAX(), FEB_v1::setMaskLLT(), FEB_v1::setMaskLLTCorner(), FEB_v1::setMaskLLTSideNb(), FEB_v1::setMaskLLTUpNb(), A3PE::setNTrigger(), FEB_v1::setOldSubtract(), FEB_v1::setOutputEport(), A3PE::setPipeline(), FEB_v1::setPseudoADCEnable(), FEB_v1::setPseudoPMEnable(), A3PE::setReadPatternFifoUsb(), A3PE::setReadToAXRamUsb(), A3PE::setReadTriggerFifoUsb(), A3PE::setSoftwareTrigger(), FEB_v1::setSpyModeFE(), FEB_v1::setStopInjLoop(), FEB_v1::setTestDuration(), FEB_v1::setThreshold(), A3PE::setTriggerDelay(), A3PE::setTriggerRate(), A3PE::setWriteFromAXRamUsb(), A3PE::setWriteStorageFifoUsb(), ICECALv3::spiRead(), ICECALv3::spiWrite(), A3PE::startSequenceAX(), ICPhaser::status(), Application::svcRunning(), A3PE::triggerDelay(), A3PE::triggerRate(), Phaser::write(), and ICPhaser::write().

68  {
69  return (d_code != SUCCESS );
70 }
unsigned long d_code
The status code.
Definition: StatusCode.h:58

◆ isSuccess()

bool StatusCode::isSuccess ( ) const
inline

Test for a status code of SUCCESS. N.B. This is the only case where a function has succeeded.

Definition at line 64 of file StatusCode.h.

References d_code, and SUCCESS.

Referenced by export_base(), and DLLMgr::load().

64  {
65  return (d_code == SUCCESS );
66 }
unsigned long d_code
The status code.
Definition: StatusCode.h:58

◆ operator=()

StatusCode & StatusCode::operator= ( unsigned long  value)
inline

Assignment operator.

Definition at line 84 of file StatusCode.h.

References d_code.

84  {
85  d_code = value;
86  return *this;
87 }
unsigned long d_code
The status code.
Definition: StatusCode.h:58

Member Data Documentation

◆ d_code

unsigned long StatusCode::d_code
protected

The status code.

Definition at line 58 of file StatusCode.h.

Referenced by isFailure(), isSuccess(), and operator=().


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