LDMX Software
ldmx::ECONDLinkInfo Class Reference

Data from one eRx ("link") sub-packet of an ECON-D packet that is not a normal channel. More...

#include <ECONDEventInfo.h>

Public Member Functions

void set (int stat, bool is_empty, int adc_cm0, int adc_cm1, uint32_t calib)
 Set the link data.
 
int getStat () const
 3-bit Stat field, all ones is good
 
bool hasBadStat () const
 any of the Stat bits are bad
 
bool isEmpty () const
 sub-packet had no channel data
 
int getADCCM0 () const
 common mode 0 ADC
 
int getADCCM1 () const
 common mode 1 ADC
 
uint32_t getCalib () const
 calibration channel sample word (HgcrocDigiCollection::Sample format)
 

Private Member Functions

 ClassDef (ECONDLinkInfo, 1)
 

Private Attributes

int stat_ {0}
 3-bit Stat field
 
bool is_empty_ {false}
 F flag.
 
int adc_cm0_ {0}
 common mode 0 ADC
 
int adc_cm1_ {0}
 common mode 1 ADC
 
uint32_t calib_ {0}
 calibration channel sample word
 

Friends

std::ostream & operator<< (std::ostream &o, const ECONDLinkInfo &l)
 

Detailed Description

Data from one eRx ("link") sub-packet of an ECON-D packet that is not a normal channel.

Definition at line 25 of file ECONDEventInfo.h.

Member Function Documentation

◆ getADCCM0()

int ldmx::ECONDLinkInfo::getADCCM0 ( ) const
inline

common mode 0 ADC

Definition at line 54 of file ECONDEventInfo.h.

54{ return adc_cm0_; }
int adc_cm0_
common mode 0 ADC

References adc_cm0_.

◆ getADCCM1()

int ldmx::ECONDLinkInfo::getADCCM1 ( ) const
inline

common mode 1 ADC

Definition at line 56 of file ECONDEventInfo.h.

56{ return adc_cm1_; }
int adc_cm1_
common mode 1 ADC

References adc_cm1_.

◆ getCalib()

uint32_t ldmx::ECONDLinkInfo::getCalib ( ) const
inline

calibration channel sample word (HgcrocDigiCollection::Sample format)

Definition at line 58 of file ECONDEventInfo.h.

58{ return calib_; }
uint32_t calib_
calibration channel sample word

References calib_.

◆ getStat()

int ldmx::ECONDLinkInfo::getStat ( ) const
inline

3-bit Stat field, all ones is good

Definition at line 48 of file ECONDEventInfo.h.

48{ return stat_; }
int stat_
3-bit Stat field

References stat_.

◆ hasBadStat()

bool ldmx::ECONDLinkInfo::hasBadStat ( ) const
inline

any of the Stat bits are bad

Definition at line 50 of file ECONDEventInfo.h.

50{ return stat_ != 0b111; }

References stat_.

◆ isEmpty()

bool ldmx::ECONDLinkInfo::isEmpty ( ) const
inline

sub-packet had no channel data

Definition at line 52 of file ECONDEventInfo.h.

52{ return is_empty_; }

References is_empty_.

◆ set()

void ldmx::ECONDLinkInfo::set ( int stat,
bool is_empty,
int adc_cm0,
int adc_cm1,
uint32_t calib )
inline

Set the link data.

Parameters
[in]stat3-bit Stat field (HT, EBO, CRC match)
[in]is_emptyF flag, no channel data in this sub-packet
[in]adc_cm0common mode 0 ADC
[in]adc_cm1common mode 1 ADC
[in]calibcalibration channel sample word

Definition at line 39 of file ECONDEventInfo.h.

39 {
40 stat_ = stat;
41 is_empty_ = is_empty;
42 adc_cm0_ = adc_cm0;
43 adc_cm1_ = adc_cm1;
44 calib_ = calib;
45 }

References adc_cm0_, adc_cm1_, calib_, is_empty_, and stat_.

Referenced by packing::ECONDDecoder::produce().

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & o,
const ECONDLinkInfo & l )
friend

Definition at line 18 of file ECONDEventInfo.cxx.

18 {
19 return o << "ECONDLinkInfo { stat: " << l.stat_ << ", empty: " << l.is_empty_
20 << ", cm0: " << l.adc_cm0_ << ", cm1: " << l.adc_cm1_
21 << ", calib: " << l.calib_ << " }";
22}

Member Data Documentation

◆ adc_cm0_

int ldmx::ECONDLinkInfo::adc_cm0_ {0}
private

common mode 0 ADC

Definition at line 68 of file ECONDEventInfo.h.

68{0};

Referenced by getADCCM0(), and set().

◆ adc_cm1_

int ldmx::ECONDLinkInfo::adc_cm1_ {0}
private

common mode 1 ADC

Definition at line 70 of file ECONDEventInfo.h.

70{0};

Referenced by getADCCM1(), and set().

◆ calib_

uint32_t ldmx::ECONDLinkInfo::calib_ {0}
private

calibration channel sample word

Definition at line 72 of file ECONDEventInfo.h.

72{0};

Referenced by getCalib(), and set().

◆ is_empty_

bool ldmx::ECONDLinkInfo::is_empty_ {false}
private

F flag.

Definition at line 66 of file ECONDEventInfo.h.

66{false};

Referenced by isEmpty(), and set().

◆ stat_

int ldmx::ECONDLinkInfo::stat_ {0}
private

3-bit Stat field

Definition at line 64 of file ECONDEventInfo.h.

64{0};

Referenced by getStat(), hasBadStat(), and set().


The documentation for this class was generated from the following file: