CMS 3D CMS Logo

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

#include <GEMAMCStatus.h>

Classes

union  Errors
 
union  Warnings
 

Public Member Functions

uint8_t amcNumber () const
 
uint16_t errors () const
 
 GEMAMCStatus ()
 
 GEMAMCStatus (const GEMAMC13 *amc13, const GEMAMC &amc)
 
void inValidOH ()
 
bool isBad () const
 
uint8_t warnings () const
 

Private Attributes

uint8_t amcNum_
 
uint16_t errors_
 
uint8_t warnings_
 

Detailed Description

Definition at line 8 of file GEMAMCStatus.h.

Constructor & Destructor Documentation

◆ GEMAMCStatus() [1/2]

GEMAMCStatus::GEMAMCStatus ( )
inline

Definition at line 35 of file GEMAMCStatus.h.

35 {}

◆ GEMAMCStatus() [2/2]

GEMAMCStatus::GEMAMCStatus ( const GEMAMC13 amc13,
const GEMAMC amc 
)
inline

Definition at line 36 of file GEMAMCStatus.h.

References amcNum_, relativeConstraints::error, errors_, GEMAMC13::lastBC, python::warn(), and warnings_.

36  {
37  amcNum_ = amc.amcNum();
38  Errors error{0};
39  error.badEC = (amc13->lv1Id() != amc.lv1Id());
40  // Last BC in AMC13 is different to TCDS, AMC, and VFAT
41  error.badBC = !((amc13->bunchCrossing() == amc.bunchCrossing()) ||
42  (amc13->bunchCrossing() == 0 && amc.bunchCrossing() == GEMAMC13::lastBC));
43  error.badRunType = amc.runType() != 0x1;
44  if (amc.formatVer() == 0)
45  // Last OC in AMC13 is different to TCDS, AMC, and VFAT
46  error.badOC =
47  !((uint16_t(amc13->orbitNumber()) == amc.orbitNumber()) ||
48  (amc13->bunchCrossing() == 0 && uint16_t(amc.orbitNumber() + 1) == uint16_t(amc13->orbitNumber())));
49  else
50  error.badOC = (amc13->orbitNumber() != amc.orbitNumber());
51  error.MMCMlocked = !amc.mmcmLocked();
52  error.DAQclocklocked = !amc.daqClockLocked();
53  error.DAQnotReday = !amc.daqReady();
54  error.BC0locked = !amc.bc0locked();
55  error.badFEDId = (amc13->sourceId() != amc.softSrcId() and amc.formatVer() != 0);
56  error.L1AFull = (amc.l1aF() and amc.formatVer() != 0);
57  errors_ = error.ecodes;
58 
59  Warnings warn{0};
60  warn.backPressure = amc.backPressure();
61  warn.L1ANearFull = (amc.l1aNF() and amc.formatVer() != 0);
62  warnings_ = warn.wcodes;
63  }
def warn(args, kwargs)
Definition: __init__.py:21
static const int lastBC
Definition: GEMAMC13.h:112
uint8_t warnings_
Definition: GEMAMCStatus.h:79
uint16_t errors_
Definition: GEMAMCStatus.h:78
uint8_t amcNum_
Definition: GEMAMCStatus.h:77
Definition: AMCSpec.h:8

Member Function Documentation

◆ amcNumber()

uint8_t GEMAMCStatus::amcNumber ( ) const
inline

Definition at line 71 of file GEMAMCStatus.h.

References amcNum_.

71 { return amcNum_; };
uint8_t amcNum_
Definition: GEMAMCStatus.h:77

◆ errors()

uint16_t GEMAMCStatus::errors ( ) const
inline

Definition at line 73 of file GEMAMCStatus.h.

References errors_.

73 { return errors_; }
uint16_t errors_
Definition: GEMAMCStatus.h:78

◆ inValidOH()

void GEMAMCStatus::inValidOH ( )
inline

Definition at line 65 of file GEMAMCStatus.h.

References python::warn(), and warnings_.

65  {
66  Warnings warn{warnings_};
67  warn.InValidOH = 1;
68  warnings_ = warn.wcodes;
69  }
def warn(args, kwargs)
Definition: __init__.py:21
uint8_t warnings_
Definition: GEMAMCStatus.h:79

◆ isBad()

bool GEMAMCStatus::isBad ( ) const
inline

Definition at line 72 of file GEMAMCStatus.h.

References errors_.

72 { return errors_ != 0; }
uint16_t errors_
Definition: GEMAMCStatus.h:78

◆ warnings()

uint8_t GEMAMCStatus::warnings ( ) const
inline

Definition at line 74 of file GEMAMCStatus.h.

References warnings_.

74 { return warnings_; }
uint8_t warnings_
Definition: GEMAMCStatus.h:79

Member Data Documentation

◆ amcNum_

uint8_t GEMAMCStatus::amcNum_
private

Definition at line 77 of file GEMAMCStatus.h.

Referenced by amcNumber(), and GEMAMCStatus().

◆ errors_

uint16_t GEMAMCStatus::errors_
private

Definition at line 78 of file GEMAMCStatus.h.

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

◆ warnings_

uint8_t GEMAMCStatus::warnings_
private

Definition at line 79 of file GEMAMCStatus.h.

Referenced by GEMAMCStatus(), inValidOH(), and warnings().