CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Attributes
QIE11DataFrame::Sample Class Reference

#include <QIE11DataFrame.h>

Public Member Functions

constexpr int adc () const
 
constexpr int capid () const
 
constexpr int flavor () const
 
constexpr bool linkError () const
 
constexpr Sample (const edm::DataFrame &frame, edm::DataFrame::size_type i)
 
constexpr bool soi () const
 
constexpr int tdc () const
 

Static Public Attributes

static const int MASK_ADC = 0xFF
 
static const int MASK_CAPID = 0x3
 
static const int MASK_CAPID_INV_HB = 0xF3FF
 
static const int MASK_CAPID_KEEP_HB = 0x0C00
 
static const int MASK_LE_HB = 0x2000
 
static const int MASK_SOI = 0x4000
 
static const int MASK_TDC_HB = 0x3
 
static const int MASK_TDC_HE = 0x3F
 
static const int OFFSET_CAPID_HB = 10
 
static const int OFFSET_CAPID_HE = 8
 
static const int OFFSET_TDC = 8
 

Private Attributes

const edm::DataFrameframe_
 
edm::DataFrame::size_type i_
 

Detailed Description

Definition at line 25 of file QIE11DataFrame.h.

Constructor & Destructor Documentation

◆ Sample()

constexpr QIE11DataFrame::Sample::Sample ( const edm::DataFrame frame,
edm::DataFrame::size_type  i 
)
inlineconstexpr

Definition at line 27 of file QIE11DataFrame.h.

27 : frame_(frame), i_(i) {}

Member Function Documentation

◆ adc()

constexpr int QIE11DataFrame::Sample::adc ( ) const
inlineconstexpr

Definition at line 40 of file QIE11DataFrame.h.

40 { return frame_[i_] & MASK_ADC; }

References frame_, i_, and MASK_ADC.

Referenced by QIE11DataFrame::copyContent(), and operator<<().

◆ capid()

constexpr int QIE11DataFrame::Sample::capid ( ) const
inlineconstexpr

Definition at line 45 of file QIE11DataFrame.h.

45  {
46  return (flavor() == FLAVOR_HB)
49  }

References flavor(), QIE11DataFrame::FLAVOR_HB, frame_, QIE11DataFrame::HEADER_WORDS, i_, MASK_CAPID, OFFSET_CAPID_HB, and OFFSET_CAPID_HE.

Referenced by operator<<().

◆ flavor()

constexpr int QIE11DataFrame::Sample::flavor ( ) const
inlineconstexpr

Definition at line 39 of file QIE11DataFrame.h.

39 { return ((frame_[0] >> OFFSET_FLAVOR) & MASK_FLAVOR); }

References frame_, QIE11DataFrame::MASK_FLAVOR, and QIE11DataFrame::OFFSET_FLAVOR.

Referenced by capid(), linkError(), and tdc().

◆ linkError()

constexpr bool QIE11DataFrame::Sample::linkError ( ) const
inlineconstexpr

Definition at line 50 of file QIE11DataFrame.h.

50  {
51  return (flavor() == FLAVOR_HB) ? (frame_[i_] & MASK_LE_HB) : (frame_[0] & MASK_LINKERROR);
52  }

References flavor(), QIE11DataFrame::FLAVOR_HB, frame_, i_, MASK_LE_HB, and QIE11DataFrame::MASK_LINKERROR.

◆ soi()

constexpr bool QIE11DataFrame::Sample::soi ( ) const
inlineconstexpr

Definition at line 44 of file QIE11DataFrame.h.

44 { return frame_[i_] & MASK_SOI; }

References frame_, i_, and MASK_SOI.

Referenced by QIE11DataFrame::copyContent(), and operator<<().

◆ tdc()

constexpr int QIE11DataFrame::Sample::tdc ( ) const
inlineconstexpr

Definition at line 41 of file QIE11DataFrame.h.

41  {
42  return (frame_[i_] >> OFFSET_TDC) & ((flavor() == FLAVOR_HB) ? (MASK_TDC_HB) : (MASK_TDC_HE));
43  }

References flavor(), QIE11DataFrame::FLAVOR_HB, frame_, i_, MASK_TDC_HB, MASK_TDC_HE, and OFFSET_TDC.

Referenced by QIE11DataFrame::copyContent(), and operator<<().

Member Data Documentation

◆ frame_

const edm::DataFrame& QIE11DataFrame::Sample::frame_
private

Definition at line 55 of file QIE11DataFrame.h.

Referenced by adc(), capid(), flavor(), linkError(), soi(), and tdc().

◆ i_

edm::DataFrame::size_type QIE11DataFrame::Sample::i_
private

Definition at line 56 of file QIE11DataFrame.h.

Referenced by adc(), capid(), linkError(), soi(), and tdc().

◆ MASK_ADC

const int QIE11DataFrame::Sample::MASK_ADC = 0xFF
static

Definition at line 28 of file QIE11DataFrame.h.

Referenced by adc(), and QIE11DataFrame::setSample().

◆ MASK_CAPID

const int QIE11DataFrame::Sample::MASK_CAPID = 0x3
static

Definition at line 34 of file QIE11DataFrame.h.

Referenced by capid(), and QIE11DataFrame::setCapid0().

◆ MASK_CAPID_INV_HB

const int QIE11DataFrame::Sample::MASK_CAPID_INV_HB = 0xF3FF
static

Definition at line 35 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::setCapid0().

◆ MASK_CAPID_KEEP_HB

const int QIE11DataFrame::Sample::MASK_CAPID_KEEP_HB = 0x0C00
static

Definition at line 36 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::setSample().

◆ MASK_LE_HB

const int QIE11DataFrame::Sample::MASK_LE_HB = 0x2000
static

Definition at line 33 of file QIE11DataFrame.h.

Referenced by linkError().

◆ MASK_SOI

const int QIE11DataFrame::Sample::MASK_SOI = 0x4000
static

Definition at line 32 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::setSample(), and soi().

◆ MASK_TDC_HB

const int QIE11DataFrame::Sample::MASK_TDC_HB = 0x3
static

Definition at line 30 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::setSample(), and tdc().

◆ MASK_TDC_HE

const int QIE11DataFrame::Sample::MASK_TDC_HE = 0x3F
static

Definition at line 29 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::setSample(), and tdc().

◆ OFFSET_CAPID_HB

const int QIE11DataFrame::Sample::OFFSET_CAPID_HB = 10
static

Definition at line 38 of file QIE11DataFrame.h.

Referenced by capid(), and QIE11DataFrame::setCapid0().

◆ OFFSET_CAPID_HE

const int QIE11DataFrame::Sample::OFFSET_CAPID_HE = 8
static

Definition at line 37 of file QIE11DataFrame.h.

Referenced by capid(), and QIE11DataFrame::setCapid0().

◆ OFFSET_TDC

const int QIE11DataFrame::Sample::OFFSET_TDC = 8
static

Definition at line 31 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::setSample(), and tdc().

QIE11DataFrame::Sample::MASK_CAPID
static const int MASK_CAPID
Definition: QIE11DataFrame.h:34
mps_fire.i
i
Definition: mps_fire.py:428
QIE11DataFrame::OFFSET_FLAVOR
static const int OFFSET_FLAVOR
Definition: QIE11DataFrame.h:17
QIE11DataFrame::Sample::flavor
constexpr int flavor() const
Definition: QIE11DataFrame.h:39
QIE11DataFrame::Sample::i_
edm::DataFrame::size_type i_
Definition: QIE11DataFrame.h:56
QIE11DataFrame::FLAVOR_HB
static const int FLAVOR_HB
Definition: QIE11DataFrame.h:19
QIE11DataFrame::Sample::MASK_TDC_HB
static const int MASK_TDC_HB
Definition: QIE11DataFrame.h:30
QIE11DataFrame::Sample::OFFSET_TDC
static const int OFFSET_TDC
Definition: QIE11DataFrame.h:31
QIE11DataFrame::HEADER_WORDS
static const int HEADER_WORDS
Definition: QIE11DataFrame.h:14
QIE11DataFrame::MASK_FLAVOR
static const int MASK_FLAVOR
Definition: QIE11DataFrame.h:18
QIE11DataFrame::Sample::OFFSET_CAPID_HE
static const int OFFSET_CAPID_HE
Definition: QIE11DataFrame.h:37
QIE11DataFrame::Sample::OFFSET_CAPID_HB
static const int OFFSET_CAPID_HB
Definition: QIE11DataFrame.h:38
QIE11DataFrame::MASK_LINKERROR
static const int MASK_LINKERROR
Definition: QIE11DataFrame.h:20
QIE11DataFrame::Sample::frame_
const edm::DataFrame & frame_
Definition: QIE11DataFrame.h:55
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
QIE11DataFrame::Sample::MASK_TDC_HE
static const int MASK_TDC_HE
Definition: QIE11DataFrame.h:29
QIE11DataFrame::Sample::MASK_LE_HB
static const int MASK_LE_HB
Definition: QIE11DataFrame.h:33
QIE11DataFrame::Sample::MASK_SOI
static const int MASK_SOI
Definition: QIE11DataFrame.h:32
QIE11DataFrame::Sample::MASK_ADC
static const int MASK_ADC
Definition: QIE11DataFrame.h:28