CMS 3D CMS Logo

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

#include <GEMVFATStatus.h>

Classes

union  Errors
 
union  Warnings
 

Public Member Functions

uint16_t errors () const
 
 GEMVFATStatus ()
 
 GEMVFATStatus (const GEMAMC &amc, const GEMVFAT &vfat, uint16_t position, bool readMultiBX)
 
bool isBad () const
 
uint16_t vfatPosition () const
 
uint8_t warnings () const
 

Private Attributes

uint16_t errors_
 
uint16_t vfatPosition_
 
uint8_t warnings_
 

Detailed Description

Definition at line 8 of file GEMVFATStatus.h.

Constructor & Destructor Documentation

◆ GEMVFATStatus() [1/2]

GEMVFATStatus::GEMVFATStatus ( )
inline

Definition at line 27 of file GEMVFATStatus.h.

27 {}

◆ GEMVFATStatus() [2/2]

GEMVFATStatus::GEMVFATStatus ( const GEMAMC amc,
const GEMVFAT vfat,
uint16_t  position,
bool  readMultiBX 
)
inline

Definition at line 28 of file GEMVFATStatus.h.

References GEMVFAT::bc(), GEMVFAT::ec(), relativeConstraints::error, errors_, GEMVFAT::header(), if(), position, muonGEMDigis_cfi::readMultiBX, GEMVFAT::vc(), GEMVFAT::version(), vfatPosition_, python::warn(), and warnings_.

28  {
29  Errors error{0};
30  Warnings warn{0};
31 
32  error.EC = vfat.ec() != amc.lv1Idt();
33  if (!readMultiBX)
34  error.BC = vfat.bc() != amc.bunchCrossing();
35 
36  if (vfat.version() > 2) {
37  error.vc = vfat.vc();
38  if (vfat.header() == 0x1E)
39  warn.basicOFW = 0;
40  else if (vfat.header() == 0x5E)
41  warn.basicOFW = 1;
42  else if (vfat.header() == 0x1A)
43  warn.zeroSupOFW = 0;
44  else if (vfat.header() == 0x56)
45  warn.zeroSupOFW = 1;
46  else
47  error.InValidHeader = 1;
48  }
50 
51  errors_ = error.codes;
52  warnings_ = warn.wcodes;
53  }
uint8_t header() const
v3
Definition: GEMVFAT.h:100
uint16_t errors_
Definition: GEMVFATStatus.h:62
uint8_t warnings_
Definition: GEMVFATStatus.h:63
def warn(args, kwargs)
Definition: __init__.py:21
uint16_t bc() const
Definition: GEMVFAT.h:77
uint8_t ec() const
Definition: GEMVFAT.h:82
uint16_t vfatPosition_
Definition: GEMVFATStatus.h:61
int version() const
Definition: GEMVFAT.h:94
static int position[264][3]
Definition: ReadPGInfo.cc:289
bool vc() const
Definition: GEMVFAT.h:101
Definition: AMCSpec.h:8

Member Function Documentation

◆ errors()

uint16_t GEMVFATStatus::errors ( ) const
inline

Definition at line 57 of file GEMVFATStatus.h.

References errors_.

57 { return errors_; }
uint16_t errors_
Definition: GEMVFATStatus.h:62

◆ isBad()

bool GEMVFATStatus::isBad ( ) const
inline

Definition at line 56 of file GEMVFATStatus.h.

References errors_.

56 { return errors_ != 0; }
uint16_t errors_
Definition: GEMVFATStatus.h:62

◆ vfatPosition()

uint16_t GEMVFATStatus::vfatPosition ( ) const
inline

Definition at line 55 of file GEMVFATStatus.h.

References vfatPosition_.

55 { return vfatPosition_; }
uint16_t vfatPosition_
Definition: GEMVFATStatus.h:61

◆ warnings()

uint8_t GEMVFATStatus::warnings ( ) const
inline

Definition at line 58 of file GEMVFATStatus.h.

References warnings_.

58 { return warnings_; }
uint8_t warnings_
Definition: GEMVFATStatus.h:63

Member Data Documentation

◆ errors_

uint16_t GEMVFATStatus::errors_
private

Definition at line 62 of file GEMVFATStatus.h.

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

◆ vfatPosition_

uint16_t GEMVFATStatus::vfatPosition_
private

Definition at line 61 of file GEMVFATStatus.h.

Referenced by GEMVFATStatus(), and vfatPosition().

◆ warnings_

uint8_t GEMVFATStatus::warnings_
private

Definition at line 63 of file GEMVFATStatus.h.

Referenced by GEMVFATStatus(), and warnings().