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

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

Private Attributes

int chamberType_
 
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,
int  chamberType,
bool  readMultiBX 
)
inline

Definition at line 31 of file GEMVFATStatus.h.

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

33  Errors error{0};
34  Warnings warn{0};
35 
36  error.EC = vfat.ec() != amc.lv1Idt();
37  if (!readMultiBX)
38  error.BC = vfat.bc() != amc.bunchCrossing();
39 
40  if (oh.version() != 0) {
41  error.vfatMask = (oh.vfatMask() >> vfat.vfatId()) ^ 0x1;
42  error.zsMask = (oh.zsMask() >> vfat.vfatId()) & 0x1;
43  }
44 
45  if (vfat.version() > 2) {
46  error.vc = vfat.vc();
47  if (vfat.header() == 0x1E)
48  warn.basicOFW = 0;
49  else if (vfat.header() == 0x5E)
50  warn.basicOFW = 1;
51  else if (vfat.header() == 0x1A)
52  warn.zeroSupOFW = 0;
53  else if (vfat.header() == 0x56)
54  warn.zeroSupOFW = 1;
55  else
56  error.InValidHeader = 1;
57  }
58  vfatPosition_ = vfat.vfatId();
59 
60  errors_ = error.codes;
61  warnings_ = warn.wcodes;
62  }
uint8_t header() const
v3
Definition: GEMVFAT.h:100
uint8_t warnings_
Definition: GEMVFATStatus.h:74
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:72
uint8_t errors_
Definition: GEMVFATStatus.h:73
uint16_t vfatId() const
Definition: GEMVFAT.h:87
int chamberType() const
Definition: GEMVFATStatus.h:68
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

◆ chamberType()

int GEMVFATStatus::chamberType ( ) const
inline

Definition at line 68 of file GEMVFATStatus.h.

References chamberType_.

68 { return chamberType_; }

◆ errors()

uint8_t GEMVFATStatus::errors ( ) const
inline

Definition at line 66 of file GEMVFATStatus.h.

References errors_.

66 { return errors_; }
uint8_t errors_
Definition: GEMVFATStatus.h:73

◆ isBad()

bool GEMVFATStatus::isBad ( ) const
inline

Definition at line 65 of file GEMVFATStatus.h.

References errors_.

Referenced by GEMRawToDigiModule::produce().

65 { return errors_ != 0; }
uint8_t errors_
Definition: GEMVFATStatus.h:73

◆ vfatPosition()

uint16_t GEMVFATStatus::vfatPosition ( ) const
inline

Definition at line 64 of file GEMVFATStatus.h.

References vfatPosition_.

64 { return vfatPosition_; }
uint16_t vfatPosition_
Definition: GEMVFATStatus.h:72

◆ warnings()

uint8_t GEMVFATStatus::warnings ( ) const
inline

Definition at line 67 of file GEMVFATStatus.h.

References warnings_.

67 { return warnings_; }
uint8_t warnings_
Definition: GEMVFATStatus.h:74

Member Data Documentation

◆ chamberType_

int GEMVFATStatus::chamberType_
private

Definition at line 71 of file GEMVFATStatus.h.

Referenced by chamberType().

◆ errors_

uint8_t GEMVFATStatus::errors_
private

Definition at line 73 of file GEMVFATStatus.h.

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

◆ vfatPosition_

uint16_t GEMVFATStatus::vfatPosition_
private

Definition at line 72 of file GEMVFATStatus.h.

Referenced by GEMVFATStatus(), and vfatPosition().

◆ warnings_

uint8_t GEMVFATStatus::warnings_
private

Definition at line 74 of file GEMVFATStatus.h.

Referenced by GEMVFATStatus(), and warnings().