CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::GEMAMCStatus ( )
inline

Definition at line 32 of file GEMAMCStatus.h.

32 {}
GEMAMCStatus::GEMAMCStatus ( const GEMAMC13 amc13,
const GEMAMC amc 
)
inline

Definition at line 33 of file GEMAMCStatus.h.

References GEMAMC::amcNum(), amcNum_, GEMAMC::backPressure(), GEMAMC::bc0locked(), GEMAMC::bunchCrossing(), GEMAMC13::bunchCrossing(), GEMAMC::daqClockLocked(), GEMAMC::daqReady(), relativeConstraints::error, errors_, GEMAMC::lv1Id(), GEMAMC13::lv1Id(), GEMAMC::mmcmLocked(), GEMAMC::orbitNumber(), GEMAMC13::orbitNumber(), GEMAMC::runType(), python::warn(), and warnings_.

33  {
34  amcNum_ = amc.amcNum();
35  Errors error{0};
36  error.badEC = (amc13->lv1Id() != amc.lv1Id());
37  error.badBC = (amc13->bunchCrossing() != amc.bunchCrossing());
38  error.badRunType = amc.runType() != 0x1;
39  error.badOC = (uint16_t(amc13->orbitNumber()) != amc.orbitNumber());
40  error.MMCMlocked = !amc.mmcmLocked();
41  error.DAQclocklocked = !amc.daqClockLocked();
42  error.DAQnotReday = !amc.daqReady();
43  error.BC0locked = !amc.bc0locked();
44  errors_ = error.ecodes;
45 
46  Warnings warn{0};
47  warn.backPressure = amc.backPressure();
48  warnings_ = warn.wcodes;
49  }
uint8_t bc0locked() const
Definition: GEMAMC.h:111
uint8_t daqReady() const
Definition: GEMAMC.h:112
uint32_t lv1Id() const
Definition: GEMAMC.h:92
uint8_t mmcmLocked() const
Definition: GEMAMC.h:114
uint8_t amcNum() const
Definition: GEMAMC.h:93
uint16_t orbitNumber() const
Definition: GEMAMC.h:96
uint8_t runType() const
Definition: GEMAMC.h:100
uint8_t warnings_
Definition: GEMAMCStatus.h:65
uint16_t errors_
Definition: GEMAMCStatus.h:64
uint32_t orbitNumber() const
Definition: GEMAMC13.h:98
uint8_t daqClockLocked() const
Definition: GEMAMC.h:113
uint32_t lv1Id() const
Definition: GEMAMC13.h:95
uint8_t amcNum_
Definition: GEMAMCStatus.h:63
def warn
Definition: __init__.py:21
uint16_t bunchCrossing() const
Definition: GEMAMC13.h:94
uint16_t bunchCrossing() const
Definition: GEMAMC.h:91
uint8_t backPressure() const
Definition: GEMAMC.h:115

Member Function Documentation

uint8_t GEMAMCStatus::amcNumber ( ) const
inline

Definition at line 57 of file GEMAMCStatus.h.

References amcNum_.

57 { return amcNum_; };
uint8_t amcNum_
Definition: GEMAMCStatus.h:63
uint16_t GEMAMCStatus::errors ( ) const
inline

Definition at line 59 of file GEMAMCStatus.h.

References errors_.

Referenced by operator<<().

59 { return errors_; }
uint16_t errors_
Definition: GEMAMCStatus.h:64
void GEMAMCStatus::inValidOH ( )
inline

Definition at line 51 of file GEMAMCStatus.h.

References python::warn(), and warnings_.

51  {
52  Warnings warn{warnings_};
53  warn.InValidOH = 1;
54  warnings_ = warn.wcodes;
55  }
uint8_t warnings_
Definition: GEMAMCStatus.h:65
def warn
Definition: __init__.py:21
bool GEMAMCStatus::isBad ( ) const
inline

Definition at line 58 of file GEMAMCStatus.h.

References errors_.

58 { return errors_ != 0; }
uint16_t errors_
Definition: GEMAMCStatus.h:64
uint8_t GEMAMCStatus::warnings ( ) const
inline

Definition at line 60 of file GEMAMCStatus.h.

References warnings_.

Referenced by operator<<().

60 { return warnings_; }
uint8_t warnings_
Definition: GEMAMCStatus.h:65

Member Data Documentation

uint8_t GEMAMCStatus::amcNum_
private

Definition at line 63 of file GEMAMCStatus.h.

Referenced by amcNumber(), and GEMAMCStatus().

uint16_t GEMAMCStatus::errors_
private

Definition at line 64 of file GEMAMCStatus.h.

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

uint8_t GEMAMCStatus::warnings_
private

Definition at line 65 of file GEMAMCStatus.h.

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