CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
GEMAMC13Status Class Reference

#include <GEMAMC13Status.h>

Classes

union  Errors
 
union  Warnings
 

Public Member Functions

uint8_t errors () const
 
 GEMAMC13Status ()
 
 GEMAMC13Status (const FEDRawData &fedData)
 
void inValidAMC ()
 
bool isBad () const
 
uint8_t warnings () const
 

Private Attributes

uint8_t errors_
 
uint8_t warnings_
 

Detailed Description

Definition at line 10 of file GEMAMC13Status.h.

Constructor & Destructor Documentation

◆ GEMAMC13Status() [1/2]

GEMAMC13Status::GEMAMC13Status ( )
inline

Definition at line 32 of file GEMAMC13Status.h.

32 {}

◆ GEMAMC13Status() [2/2]

GEMAMC13Status::GEMAMC13Status ( const FEDRawData fedData)
inline

Definition at line 33 of file GEMAMC13Status.h.

33  {
34  Errors error{0};
35  if ((fedData.size() / sizeof(uint64_t)) < 5) {
36  error.InValidSize = 1;
37  } else {
38  FEDTrailer trailer(fedData.data() + fedData.size() - FEDTrailer::length);
39  error.failTrailerCheck = !trailer.check();
40  error.failFragmentLength = (trailer.fragmentLength() * sizeof(uint64_t) != fedData.size());
41  error.moreTrailers = trailer.moreTrailers();
42  error.crcModified = trailer.crcModified();
43  error.slinkError = trailer.slinkError();
44  error.wrongFedId = trailer.wrongFedId();
45  }
46  errors_ = error.codes;
47 
48  Warnings warn{0};
49  warnings_ = warn.wcodes;
50  }

References FEDRawData::data(), relativeConstraints::error, errors_, FEDTrailer::length, FEDRawData::size(), python::warn(), and warnings_.

Member Function Documentation

◆ errors()

uint8_t GEMAMC13Status::errors ( ) const
inline

Definition at line 58 of file GEMAMC13Status.h.

58 { return errors_; }

References errors_.

◆ inValidAMC()

void GEMAMC13Status::inValidAMC ( )
inline

Definition at line 51 of file GEMAMC13Status.h.

51  {
52  Warnings warn{warnings_};
53  warn.InValidAMC = 1;
54  warnings_ = warn.wcodes;
55  }

References python::warn(), and warnings_.

Referenced by GEMRawToDigiModule::produce().

◆ isBad()

bool GEMAMC13Status::isBad ( ) const
inline

Definition at line 57 of file GEMAMC13Status.h.

57 { return errors_ != 0; }

References errors_.

Referenced by GEMRawToDigiModule::produce().

◆ warnings()

uint8_t GEMAMC13Status::warnings ( ) const
inline

Definition at line 59 of file GEMAMC13Status.h.

59 { return warnings_; }

References warnings_.

Member Data Documentation

◆ errors_

uint8_t GEMAMC13Status::errors_
private

Definition at line 62 of file GEMAMC13Status.h.

Referenced by errors(), GEMAMC13Status(), and isBad().

◆ warnings_

uint8_t GEMAMC13Status::warnings_
private

Definition at line 63 of file GEMAMC13Status.h.

Referenced by GEMAMC13Status(), inValidAMC(), and warnings().

GEMAMC13Status::errors_
uint8_t errors_
Definition: GEMAMC13Status.h:62
relativeConstraints.error
error
Definition: relativeConstraints.py:53
FEDRawData::data
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
python.warn
def warn(*args, **kwargs)
Definition: __init__.py:21
FEDTrailer
Definition: FEDTrailer.h:14
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
FEDTrailer::length
static const uint32_t length
Definition: FEDTrailer.h:57
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
GEMAMC13Status::warnings_
uint8_t warnings_
Definition: GEMAMC13Status.h:63