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 gem::AMC13Event *amc13, const gem::AMCdata &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 32 of file GEMAMCStatus.h.

32 {}

◆ GEMAMCStatus() [2/2]

GEMAMCStatus::GEMAMCStatus ( const gem::AMC13Event amc13,
const gem::AMCdata amc 
)
inline

Definition at line 33 of file GEMAMCStatus.h.

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 = (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  }

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

Member Function Documentation

◆ amcNumber()

uint8_t GEMAMCStatus::amcNumber ( ) const
inline

Definition at line 57 of file GEMAMCStatus.h.

57 { return amcNum_; };

References amcNum_.

◆ errors()

uint16_t GEMAMCStatus::errors ( ) const
inline

Definition at line 59 of file GEMAMCStatus.h.

59 { return errors_; }

References errors_.

◆ inValidOH()

void GEMAMCStatus::inValidOH ( )
inline

Definition at line 51 of file GEMAMCStatus.h.

51  {
52  Warnings warn{warnings_};
53  warn.InValidOH = 1;
54  warnings_ = warn.wcodes;
55  }

References python::warn(), and warnings_.

◆ isBad()

bool GEMAMCStatus::isBad ( ) const
inline

Definition at line 58 of file GEMAMCStatus.h.

58 { return errors_ != 0; }

References errors_.

◆ warnings()

uint8_t GEMAMCStatus::warnings ( ) const
inline

Definition at line 60 of file GEMAMCStatus.h.

60 { return warnings_; }

References warnings_.

Member Data Documentation

◆ amcNum_

uint8_t GEMAMCStatus::amcNum_
private

Definition at line 63 of file GEMAMCStatus.h.

Referenced by amcNumber(), and GEMAMCStatus().

◆ errors_

uint16_t GEMAMCStatus::errors_
private

Definition at line 64 of file GEMAMCStatus.h.

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

◆ warnings_

uint8_t GEMAMCStatus::warnings_
private

Definition at line 65 of file GEMAMCStatus.h.

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

GEMAMCStatus::warnings_
uint8_t warnings_
Definition: GEMAMCStatus.h:65
GEMAMCStatus::errors_
uint16_t errors_
Definition: GEMAMCStatus.h:64
amc13
Definition: AMC13Spec.h:14
relativeConstraints.error
error
Definition: relativeConstraints.py:53
GEMAMCStatus::amcNum_
uint8_t amcNum_
Definition: GEMAMCStatus.h:63
python.warn
def warn(*args, **kwargs)
Definition: __init__.py:21
amc
Definition: AMCSpec.h:8