5#ifndef PATINTERFACES_CORRECTIONCODE_H
6#define PATINTERFACES_CORRECTIONCODE_H
53 return m_code < rhs.m_code;
78 template<
typename T>
struct CheckHelper;
bool operator<(const DataVector< T > &a, const DataVector< T > &b)
Vector ordering relation.
Return value from object correction CP tools.
ErrorCode
Possible values for the correction code.
@ Error
Some error happened during the object correction.
@ OutOfValidityRange
Input object is out of validity range.
@ Ok
The correction was done successfully.
void setChecked() const noexcept
Older functions for backward compatibility with the pre-nondiscard version of this class in which we ...
static void disableFailure() noexcept
ErrorCode code() const noexcept
The code stored internally.
ErrorCode m_code
The stored correction code.
CorrectionCode(ErrorCode code=Ok) noexcept
Constructor with a correction code.
static void enableFailure() noexcept
void ignore() const noexcept
Ignore the correction code.
Return value from object correction CP tools.
CorrectionCode(ErrorCode code=Ok) noexcept
Constructor with a correction code.
Select isolated Photons, Electrons and Muons.
Macro wrapping the [[nodiscard]] attribute.
static bool isSuccess(const CP::CorrectionCode &sc)
whether the status code reports a success
static CP::CorrectionCode successCode()
produce a status code to report success
static bool isOutOfValidityRange(const CP::CorrectionCode &sc)
whether the status code reports out of validity
static CP::CorrectionCode failureCode()
produce a status code to report failure
this is an internal traits class for status codes used by the ANA_CHECK* macros