ATLAS Offline Software
DataError.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRIGT1CALO_DATAERROR_H
5 #define TRIGT1CALO_DATAERROR_H
6 
7 #include <string>
8 
9 namespace LVL1 {
10 
27 class DataError {
28 
29  public:
30 
31  enum ErrorBit { Overflow = 0, Parity = 1, LinkDown = 2,
32 
35  FIFOCorrupt = 10, PinParity = 11,
36 
39 
43 
45 
46  DataError();
47  explicit DataError(int error);
48 
49  ~DataError();
50 
52  void set(ErrorBit bit, int value = 1);
54  int get(ErrorBit bit) const;
56  int get(int bit) const;
58  std::string bitName(int bit) const;
60  int error() const;
61 
62  private:
63 
65  static const int s_failingBcnMask = 0x3f;
67  static const int s_ppmErrorMask = 0xff;
69  static const int s_subStatusMask = 0xff;
71  static const int s_subStatusBcn = 22;
72 
74  int m_error;
75 
76 };
77 
78 inline int DataError::error() const
79 {
80  return m_error;
81 }
82 
83 } // end namespace
84 
85 #endif
LVL1::DataError::PinParity
@ PinParity
Definition: DataError.h:35
LVL1::DataError::Timeout
@ Timeout
Definition: DataError.h:33
LVL1::DataError::s_failingBcnMask
static const int s_failingBcnMask
Mask for Failing BCN.
Definition: DataError.h:65
LVL1::DataError::LinkDown
@ LinkDown
Definition: DataError.h:31
LVL1::DataError
Error data.
Definition: DataError.h:27
LVL1::DataError::m_error
int m_error
Error word.
Definition: DataError.h:74
LVL1::DataError::ParityPhase0
@ ParityPhase0
Definition: DataError.h:37
LVL1::DataError::ModuleError
@ ModuleError
Definition: DataError.h:41
LVL1::DataError::ErrorBit
ErrorBit
Definition: DataError.h:31
athena.value
value
Definition: athena.py:124
LVL1::DataError::ParityPhase1
@ ParityPhase1
Definition: DataError.h:37
LVL1::DataError::GLinkParity
@ GLinkParity
Definition: DataError.h:40
LVL1::DataError::GLinkDown
@ GLinkDown
Definition: DataError.h:41
LVL1::DataError::MCMAbsent
@ MCMAbsent
Definition: DataError.h:33
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::DataError::SubStatusWord
@ SubStatusWord
Definition: DataError.h:44
LVL1::DataError::Overflow
@ Overflow
Definition: DataError.h:31
LVL1::DataError::GLinkProtocol
@ GLinkProtocol
Definition: DataError.h:40
LVL1::DataError::DataError
DataError()
Definition: DataError.cxx:14
LVL1::DataError::set
void set(ErrorBit bit, int value=1)
Set an error bit or data.
Definition: DataError.cxx:28
LVL1::DataError::s_subStatusMask
static const int s_subStatusMask
Mask for error bits from sub-status word.
Definition: DataError.h:69
LVL1::DataError::EventMismatch
@ EventMismatch
Definition: DataError.h:34
LVL1::DataError::ASICFull
@ ASICFull
Definition: DataError.h:34
LVL1::DataError::error
int error() const
Return the full error word.
Definition: DataError.h:78
LVL1::DataError::GLinkTimeout
@ GLinkTimeout
Definition: DataError.h:42
LVL1::DataError::FailingBCN
@ FailingBCN
Definition: DataError.h:42
LVL1::DataError::ParityMerge
@ ParityMerge
Definition: DataError.h:37
LVL1::DataError::ChannelDisabled
@ ChannelDisabled
Definition: DataError.h:33
LVL1::DataError::~DataError
~DataError()
Definition: DataError.cxx:22
LVL1::DataError::PPMErrorWord
@ PPMErrorWord
Definition: DataError.h:44
LVL1::DataError::BCNMismatch
@ BCNMismatch
Definition: DataError.h:40
LVL1::DataError::FIFOOverflow
@ FIFOOverflow
Definition: DataError.h:41
LVL1::DataError::BunchMismatch
@ BunchMismatch
Definition: DataError.h:34
LVL1::DataError::FIFOCorrupt
@ FIFOCorrupt
Definition: DataError.h:35
LVL1::DataError::ParityPhase3
@ ParityPhase3
Definition: DataError.h:38
LVL1::DataError::get
int get(ErrorBit bit) const
Return an error bit or data.
Definition: DataError.cxx:48
LVL1::DataError::s_ppmErrorMask
static const int s_ppmErrorMask
Mask for PPM error bits.
Definition: DataError.h:67
Parity
calculates the parity of a passed word
Definition: Parity.h:20
error
Definition: IImpactPoint3dEstimator.h:70
LVL1::DataError::bitName
std::string bitName(int bit) const
Return the name of an error bit or data.
Definition: DataError.cxx:70
LVL1::DataError::s_subStatusBcn
static const int s_subStatusBcn
Bit position of failing BCN in sub-status word.
Definition: DataError.h:71
LVL1::DataError::ParityPhase2
@ ParityPhase2
Definition: DataError.h:38