ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CP::CorrectionCode Class Reference

Return value from object correction CP tools. More...

#include <CorrectionCode.h>

Collaboration diagram for CP::CorrectionCode:

Public Types

enum  ErrorCode { Error = 0, OutOfValidityRange = 1, Ok = 2 }
 Possible values for the correction code. More...
 

Public Member Functions

 CorrectionCode (ErrorCode code=Ok) noexcept
 Constructor with a correction code. More...
 
ErrorCode code () const noexcept
 The code stored internally. More...
 
 operator ErrorCode () const noexcept
 Automatic conversion to the enumeration value. More...
 
bool operator< (const CorrectionCode &rhs) const noexcept
 Ordering operator. More...
 
void ignore () const noexcept
 Ignore the correction code. More...
 
void setChecked () const noexcept
 Older functions for backward compatibility with the pre-nondiscard version of this class in which we tracked in the object itself whether the content was checked. More...
 

Static Public Member Functions

static void enableFailure () noexcept
 
static void disableFailure () noexcept
 

Private Attributes

ErrorCode m_code
 The stored correction code. More...
 

Detailed Description

Return value from object correction CP tools.

This class needs to be used in CP tools implementing object corrections when they implement the interface described in: https://cds.cern.ch/record/1667206 In short, all such CP tools should implement the two following functions:

CorrectionCode Tool::applyCorrection( xAODObjectType& inputObject );
CorrectionCode Tool::correctedCopy( const xAODObjectType& inputObject,
xAODObjectType*& outputObject );

Author
Nils Krumnack krumn.nosp@m.ack@.nosp@m.iasta.nosp@m.te.e.nosp@m.du
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Revision
719663
Date
2016-01-25 21:27:50 +0100 (Mon, 25 Jan 2016)

Definition at line 31 of file CorrectionCode.h.

Member Enumeration Documentation

◆ ErrorCode

Possible values for the correction code.

Enumerator
Error 

Some error happened during the object correction.

OutOfValidityRange 

Input object is out of validity range.

Ok 

The correction was done successfully.

Definition at line 35 of file CorrectionCode.h.

35  {
36  Error = 0,
37  OutOfValidityRange = 1,
38  Ok = 2
39  };

Constructor & Destructor Documentation

◆ CorrectionCode()

CP::CorrectionCode::CorrectionCode ( ErrorCode  code = Ok)
inlinenoexcept

Constructor with a correction code.

Definition at line 42 of file CorrectionCode.h.

42 : m_code( code ) { }

Member Function Documentation

◆ code()

ErrorCode CP::CorrectionCode::code ( ) const
inlinenoexcept

The code stored internally.

Definition at line 45 of file CorrectionCode.h.

45 {return m_code;}

◆ disableFailure()

static void CP::CorrectionCode::disableFailure ( )
inlinestaticnoexcept

Definition at line 65 of file CorrectionCode.h.

65 {}

◆ enableFailure()

static void CP::CorrectionCode::enableFailure ( )
inlinestaticnoexcept

Definition at line 64 of file CorrectionCode.h.

64 {}

◆ ignore()

void CP::CorrectionCode::ignore ( ) const
inlinenoexcept

Ignore the correction code.

Definition at line 57 of file CorrectionCode.h.

57 { }

◆ operator ErrorCode()

CP::CorrectionCode::operator ErrorCode ( ) const
inlinenoexcept

Automatic conversion to the enumeration value.

Definition at line 48 of file CorrectionCode.h.

48 { return code(); }

◆ operator<()

bool CP::CorrectionCode::operator< ( const CorrectionCode rhs) const
inlinenoexcept

Ordering operator.

To make it possible to use this type as an STL container key

Definition at line 52 of file CorrectionCode.h.

52  {
53  return m_code < rhs.m_code;
54  }

◆ setChecked()

void CP::CorrectionCode::setChecked ( ) const
inlinenoexcept

Older functions for backward compatibility with the pre-nondiscard version of this class in which we tracked in the object itself whether the content was checked.

These may go away at some point.

Definition at line 63 of file CorrectionCode.h.

63 { }

Member Data Documentation

◆ m_code

ErrorCode CP::CorrectionCode::m_code
private

The stored correction code.

Definition at line 68 of file CorrectionCode.h.


The documentation for this class was generated from the following file:
CP::CorrectionCode::OutOfValidityRange
@ OutOfValidityRange
Input object is out of validity range.
Definition: CorrectionCode.h:37
CP::CorrectionCode::Error
@ Error
Some error happened during the object correction.
Definition: CorrectionCode.h:36
CP::CorrectionCode::code
ErrorCode code() const noexcept
The code stored internally.
Definition: CorrectionCode.h:45
CP::CorrectionCode::m_code
ErrorCode m_code
The stored correction code.
Definition: CorrectionCode.h:68
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38