ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
HLT::ErrorCode Class Reference

The definition of error codes in HLT. This is a class (note; before was simple enum) to enable safer operations. Each ErrorCode is composed out of 3 parts: More...

#include <Enums.h>

Collaboration diagram for HLT::ErrorCode:

Public Member Functions

 ErrorCode ()
 for algo developers More...
 
 ErrorCode (Action::Code a)
 for algo developers More...
 
 ErrorCode (Action::Code a, Reason::Code r)
 for algo developers More...
 
 ErrorCode (uint32_t c)
 
 ErrorCode (const ErrorCode c, Reason::Code r)
 
 ErrorCode (Action::Code a, SteeringInternalReason::Code s)
 
 ErrorCode (const ErrorCode c, SteeringInternalReason::Code s)
 
 ErrorCode (Action::Code a, Reason::Code r, SteeringInternalReason::Code s)
 
bool operator== (const ErrorCode &ec) const
 
bool operator!= (const ErrorCode &ec) const
 
bool operator< (const ErrorCode &ec) const
 
bool operator> (const ErrorCode &ec) const
 
 operator uint32_t () const
 
Action::Code action () const
 
Reason::Code reason () const
 
SteeringInternalReason::Code steeringInternalReason () const
 
std::string str ()
 

Public Attributes

uint32_t code
 storage of error code where 4 least significant bits(0-3) are storing Reason, 2 next (4-5) are for Action and bits higher than 8 for SteeringInternalReason More...
 

Detailed Description

The definition of error codes in HLT. This is a class (note; before was simple enum) to enable safer operations. Each ErrorCode is composed out of 3 parts:

  1. desired action which is one of enums defined in class Action
  2. explnation of the reson of that action, defined in class Reason
  3. explnation of the reson which is internal to the steering rather than algorithms, defined in SteeringInternalReason

Definition at line 80 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

Constructor & Destructor Documentation

◆ ErrorCode() [1/8]

HLT::ErrorCode::ErrorCode ( )
inline

for algo developers

Definition at line 180 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

180 { code = 0; }

◆ ErrorCode() [2/8]

HLT::ErrorCode::ErrorCode ( Action::Code  a)
inline

for algo developers

Definition at line 181 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

181 { code = a << 4; }

◆ ErrorCode() [3/8]

HLT::ErrorCode::ErrorCode ( Action::Code  a,
Reason::Code  r 
)
inline

for algo developers

Definition at line 182 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

182 { code = a << 4; code |= r; }

◆ ErrorCode() [4/8]

HLT::ErrorCode::ErrorCode ( uint32_t  c)
inline

◆ ErrorCode() [5/8]

HLT::ErrorCode::ErrorCode ( const ErrorCode  c,
Reason::Code  r 
)
inline

Definition at line 186 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

186 { code = c.code; code &= 0x30; code |= r; }

◆ ErrorCode() [6/8]

HLT::ErrorCode::ErrorCode ( Action::Code  a,
SteeringInternalReason::Code  s 
)
inline

Definition at line 188 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

188 { code = a << 4; code |= s<<8; }

◆ ErrorCode() [7/8]

HLT::ErrorCode::ErrorCode ( const ErrorCode  c,
SteeringInternalReason::Code  s 
)
inline

Definition at line 189 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

189 { code = c.code; code |= s<<8; }

◆ ErrorCode() [8/8]

HLT::ErrorCode::ErrorCode ( Action::Code  a,
Reason::Code  r,
SteeringInternalReason::Code  s 
)
inline

Definition at line 191 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

191 { code = a << 4; code |= r; code |= s<<8; }

Member Function Documentation

◆ action()

HLT::Action::Code HLT::ErrorCode::action ( ) const
inline

Definition at line 204 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

204 { return HLT::Action::Code((code>>4)&0x3); }

◆ operator uint32_t()

HLT::ErrorCode::operator uint32_t ( ) const
inline

Definition at line 103 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

103 {return code;}

◆ operator!=()

bool HLT::ErrorCode::operator!= ( const ErrorCode ec) const
inline

Definition at line 195 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

195 { return !(*this == ec); }

◆ operator<()

bool HLT::ErrorCode::operator< ( const ErrorCode ec) const
inline

Definition at line 197 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

197 { return uint32_t(*this) < uint32_t(ec); }

◆ operator==()

bool HLT::ErrorCode::operator== ( const ErrorCode ec) const
inline

Definition at line 194 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

194 { return uint32_t(*this) == uint32_t(ec); }

◆ operator>()

bool HLT::ErrorCode::operator> ( const ErrorCode ec) const
inline

Definition at line 198 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.

198 { return !(*this<ec) && !(*this == ec); }

◆ reason()

HLT::Reason::Code HLT::ErrorCode::reason ( ) const
inline

◆ steeringInternalReason()

HLT::SteeringInternalReason::Code HLT::ErrorCode::steeringInternalReason ( ) const
inline

◆ str()

std::string HLT::ErrorCode::str ( )

Definition at line 134 of file Enums.cxx.

134  {
135  return strErrorCode(*this);
136 }

Member Data Documentation

◆ code

uint32_t HLT::ErrorCode::code

storage of error code where 4 least significant bits(0-3) are storing Reason, 2 next (4-5) are for Action and bits higher than 8 for SteeringInternalReason

Definition at line 112 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h.


The documentation for this class was generated from the following files:
beamspotman.r
def r
Definition: beamspotman.py:676
HLT::Reason::Code
Code
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h:26
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
HLT::SteeringInternalReason::Code
Code
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h:52
HLT::ErrorCode::code
uint32_t code
storage of error code where 4 least significant bits(0-3) are storing Reason, 2 next (4-5) are for Ac...
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h:112
HLT::strErrorCode
std::string strErrorCode(const ErrorCode code)
Definition: Enums.cxx:99
HLT::Action::Code
Code
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/Enums.h:15
a
TList * a
Definition: liststreamerinfos.cxx:10
python.compressB64.c
def c
Definition: compressB64.py:93