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

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

Private Attributes

uint8_t errors_
 
uint16_t vfatPosition_
 
uint8_t warnings_
 

Detailed Description

Definition at line 9 of file GEMVFATStatus.h.

Constructor & Destructor Documentation

◆ GEMVFATStatus() [1/2]

GEMVFATStatus::GEMVFATStatus ( )
inline

Definition at line 30 of file GEMVFATStatus.h.

30 {}

◆ GEMVFATStatus() [2/2]

GEMVFATStatus::GEMVFATStatus ( const GEMAMC amc,
const GEMOptoHybrid oh,
const GEMVFAT vfat,
bool  readMultiBX 
)
inline

Definition at line 31 of file GEMVFATStatus.h.

References GEMVFAT::bc(), GEMVFAT::ec(), relativeConstraints::error, errors_, GEMVFAT::header(), if(), muonGEMDigis_cfi::readMultiBX, GEMVFAT::vc(), GEMOptoHybrid::version(), GEMVFAT::version(), GEMVFAT::vfatId(), GEMOptoHybrid::vfatMask(), vfatPosition_, python::warn(), warnings_, testProducerWithPsetDescEmpty_cfi::x1, and GEMOptoHybrid::zsMask().

31  {
32  Errors error{0};
33  Warnings warn{0};
34 
35  error.EC = vfat.ec() != amc.lv1Idt();
36  if (!readMultiBX)
37  error.BC = vfat.bc() != amc.bunchCrossing();
38 
39  if (oh.version() != 0) {
40  error.vfatMask = (oh.vfatMask() >> vfat.vfatId()) ^ 0x1;
41  error.zsMask = (oh.zsMask() >> vfat.vfatId()) & 0x1;
42  }
43 
44  if (vfat.version() > 2) {
45  error.vc = vfat.vc();
46  if (vfat.header() == 0x1E)
47  warn.basicOFW = 0;
48  else if (vfat.header() == 0x5E)
49  warn.basicOFW = 1;
50  else if (vfat.header() == 0x1A)
51  warn.zeroSupOFW = 0;
52  else if (vfat.header() == 0x56)
53  warn.zeroSupOFW = 1;
54  else
55  error.InValidHeader = 1;
56  }
57  vfatPosition_ = vfat.vfatId();
58 
59  errors_ = error.codes;
60  warnings_ = warn.wcodes;
61  }
uint8_t header() const
v3
Definition: GEMVFAT.h:100
uint8_t warnings_
Definition: GEMVFATStatus.h:71
uint32_t zsMask() const
def warn(args, kwargs)
Definition: __init__.py:21
uint8_t version() const
Definition: GEMOptoHybrid.h:80
uint16_t bc() const
Definition: GEMVFAT.h:77
uint8_t ec() const
Definition: GEMVFAT.h:82
uint16_t vfatPosition_
Definition: GEMVFATStatus.h:69
uint8_t errors_
Definition: GEMVFATStatus.h:70
uint16_t vfatId() const
Definition: GEMVFAT.h:87
int version() const
Definition: GEMVFAT.h:94
uint32_t vfatMask() const
bool vc() const
Definition: GEMVFAT.h:101
Definition: AMCSpec.h:8

Member Function Documentation

◆ errors()

uint8_t GEMVFATStatus::errors ( ) const
inline

Definition at line 65 of file GEMVFATStatus.h.

References errors_.

65 { return errors_; }
uint8_t errors_
Definition: GEMVFATStatus.h:70

◆ isBad()

bool GEMVFATStatus::isBad ( ) const
inline

Definition at line 64 of file GEMVFATStatus.h.

References errors_.

Referenced by GEMRawToDigiModule::produce().

64 { return errors_ != 0; }
uint8_t errors_
Definition: GEMVFATStatus.h:70

◆ vfatPosition()

uint16_t GEMVFATStatus::vfatPosition ( ) const
inline

Definition at line 63 of file GEMVFATStatus.h.

References vfatPosition_.

63 { return vfatPosition_; }
uint16_t vfatPosition_
Definition: GEMVFATStatus.h:69

◆ warnings()

uint8_t GEMVFATStatus::warnings ( ) const
inline

Definition at line 66 of file GEMVFATStatus.h.

References warnings_.

66 { return warnings_; }
uint8_t warnings_
Definition: GEMVFATStatus.h:71

Member Data Documentation

◆ errors_

uint8_t GEMVFATStatus::errors_
private

Definition at line 70 of file GEMVFATStatus.h.

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

◆ vfatPosition_

uint16_t GEMVFATStatus::vfatPosition_
private

Definition at line 69 of file GEMVFATStatus.h.

Referenced by GEMVFATStatus(), and vfatPosition().

◆ warnings_

uint8_t GEMVFATStatus::warnings_
private

Definition at line 71 of file GEMVFATStatus.h.

Referenced by GEMVFATStatus(), and warnings().