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

Holds information from the FEB Error Summary. More...

#include <LArFebErrorSummary.h>

Collaboration diagram for LArFebErrorSummary:

Public Types

enum  LArFebErrorType {
  Parity, BCID, SampleHeader, EVTID,
  ScacStatus, ScaOutOfRange, GainMismatch, TypeMismatch,
  NumOfSamples, EmptyDataBlock, DspBlockSize, CheckSum,
  MissingHeader, BadGain, N_LArFebErrorType
}
 

Public Member Functions

 LArFebErrorSummary ()
 Constructor with FEB Id. More...
 
 ~LArFebErrorSummary ()
 Destructor. More...
 
bool set_feb_error (unsigned int febid, uint16_t e)
 Add another FEB error record, return true if added successfully. More...
 
uint16_t feb_error (HWIdentifier febid) const
 get error for feb
More...
 
const std::map< unsigned int, uint16_t > & get_all_febs () const
 get all febs with error More...
 
void clear ()
 clear internal map
More...
 

Static Public Member Functions

static std::string error_to_string (uint16_t error)
 interpret the error in string More...
 

Private Attributes

std::map< unsigned int, uint16_t > m_feb_errors
 error is stored in a map with key = feb id More...
 

Static Private Attributes

static const std::string m_errorStrings [N_LArFebErrorType]
 

Detailed Description

Holds information from the FEB Error Summary.

Author
Hong Ma

Definition at line 22 of file LArFebErrorSummary.h.

Member Enumeration Documentation

◆ LArFebErrorType

Enumerator
Parity 
BCID 
SampleHeader 
EVTID 
ScacStatus 
ScaOutOfRange 
GainMismatch 
TypeMismatch 
NumOfSamples 
EmptyDataBlock 
DspBlockSize 
CheckSum 
MissingHeader 
BadGain 
N_LArFebErrorType 

Definition at line 26 of file LArFebErrorSummary.h.

Constructor & Destructor Documentation

◆ LArFebErrorSummary()

LArFebErrorSummary::LArFebErrorSummary ( )
default

Constructor with FEB Id.

◆ ~LArFebErrorSummary()

LArFebErrorSummary::~LArFebErrorSummary ( )
default

Destructor.

Member Function Documentation

◆ clear()

void LArFebErrorSummary::clear ( )

clear internal map

Definition at line 52 of file LArFebErrorSummary.cxx.

53 {
54  m_feb_errors.clear();
55 }

◆ error_to_string()

std::string LArFebErrorSummary::error_to_string ( uint16_t  error)
static

interpret the error in string

Definition at line 58 of file LArFebErrorSummary.cxx.

59 {
60  std::string str_err;
61  for (int i=0;i<N_LArFebErrorType;i++)
62  {
63  if ( error & (1<<i) )
64  {
65  if (!str_err.empty()) str_err+=":" ;
66  str_err = str_err+m_errorStrings[i];
67  }
68  }
69 
70  return str_err;
71 
72 }

◆ feb_error()

uint16_t LArFebErrorSummary::feb_error ( HWIdentifier  febid) const

get error for feb

Definition at line 20 of file LArFebErrorSummary.cxx.

21 {
22 
23  std::map<unsigned int ,uint16_t>::const_iterator it = m_feb_errors.find(id.get_identifier32().get_compact() ) ;
24 
25  if (it!=m_feb_errors.end() ) {
26  return (*it).second ;
27  }
28 
29  return 0;
30 
31 }

◆ get_all_febs()

const std::map< unsigned int, uint16_t > & LArFebErrorSummary::get_all_febs ( ) const

get all febs with error

Definition at line 47 of file LArFebErrorSummary.cxx.

48 {
49  return m_feb_errors;
50 }

◆ set_feb_error()

bool LArFebErrorSummary::set_feb_error ( unsigned int  febid,
uint16_t  e 
)

Add another FEB error record, return true if added successfully.

Definition at line 34 of file LArFebErrorSummary.cxx.

34  {
35 
36  std::map<unsigned int, uint16_t>::const_iterator it = m_feb_errors.find(id) ;
37 
38  if (it!=m_feb_errors.end() ) {
39  return false;
40  }
41 
43 
44  return true ;
45 }

Member Data Documentation

◆ m_errorStrings

const std::string LArFebErrorSummary::m_errorStrings
staticprivate
Initial value:
= {
"Parity","BCID","SampleHeader","EVTID","ScacStatus","ScaOutOfRange",
"GainMismatch","TypeMismatch","NumOfSamples","EmptyDataBlock","DspBlockSize","CheckSum", "MissingHeader",
"BadGain" }

Definition at line 57 of file LArFebErrorSummary.h.

◆ m_feb_errors

std::map<unsigned int,uint16_t> LArFebErrorSummary::m_feb_errors
private

error is stored in a map with key = feb id

Definition at line 55 of file LArFebErrorSummary.h.


The documentation for this class was generated from the following files:
LArFebErrorSummary::CheckSum
@ CheckSum
Definition: LArFebErrorSummary.h:28
skel.it
it
Definition: skel.GENtoEVGEN.py:423
LArFebErrorSummary::BadGain
@ BadGain
Definition: LArFebErrorSummary.h:28
LArFebErrorSummary::m_errorStrings
static const std::string m_errorStrings[N_LArFebErrorType]
Definition: LArFebErrorSummary.h:57
LArFebErrorSummary::TypeMismatch
@ TypeMismatch
Definition: LArFebErrorSummary.h:28
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArFebErrorSummary::ScacStatus
@ ScacStatus
Definition: LArFebErrorSummary.h:27
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
LArFebErrorSummary::EmptyDataBlock
@ EmptyDataBlock
Definition: LArFebErrorSummary.h:28
LArFebErrorSummary::EVTID
@ EVTID
Definition: LArFebErrorSummary.h:27
LArFebErrorSummary::DspBlockSize
@ DspBlockSize
Definition: LArFebErrorSummary.h:28
LArFebErrorSummary::N_LArFebErrorType
@ N_LArFebErrorType
Definition: LArFebErrorSummary.h:28
LArFebErrorSummary::Parity
@ Parity
Definition: LArFebErrorSummary.h:27
LArFebErrorSummary::m_feb_errors
std::map< unsigned int, uint16_t > m_feb_errors
error is stored in a map with key = feb id
Definition: LArFebErrorSummary.h:55
LArFebErrorSummary::SampleHeader
@ SampleHeader
Definition: LArFebErrorSummary.h:27
LArFebErrorSummary::ScaOutOfRange
@ ScaOutOfRange
Definition: LArFebErrorSummary.h:27
LArFebErrorSummary::BCID
@ BCID
Definition: LArFebErrorSummary.h:27
get_generator_info.error
error
Definition: get_generator_info.py:40
error
Definition: IImpactPoint3dEstimator.h:70
LArFebErrorSummary::NumOfSamples
@ NumOfSamples
Definition: LArFebErrorSummary.h:28
LArFebErrorSummary::MissingHeader
@ MissingHeader
Definition: LArFebErrorSummary.h:28
LArFebErrorSummary::GainMismatch
@ GainMismatch
Definition: LArFebErrorSummary.h:28