ATLAS Offline Software
Loading...
Searching...
No Matches
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.
 ~LArFebErrorSummary ()
 Destructor.
bool set_feb_error (unsigned int febid, uint16_t e)
 Add another FEB error record, return true if added successfully.
uint16_t feb_error (HWIdentifier febid) const
 get error for feb
const std::map< unsigned int, uint16_t > & get_all_febs () const
 get all febs with error
void clear ()
 clear internal map

Static Public Member Functions

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

Private Attributes

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

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}
std::map< unsigned int, uint16_t > m_feb_errors
error is stored in a map with key = feb id

◆ 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}
static const std::string m_errorStrings[N_LArFebErrorType]

◆ 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 8 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: