CMS 3D CMS Logo

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

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

Definition at line 27 of file QIE11DataFrame.h.

27 : frame_(frame), i_(i) {}
edm::DataFrame::size_type i_
const edm::DataFrame & frame_

Member Function Documentation

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

Definition at line 40 of file QIE11DataFrame.h.

References frame_, i_, and MASK_ADC.

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

40 { return frame_[i_] & MASK_ADC; }
edm::DataFrame::size_type i_
static const int MASK_ADC
const edm::DataFrame & frame_
constexpr int QIE11DataFrame::Sample::capid ( ) const
inline

Definition at line 45 of file QIE11DataFrame.h.

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

Referenced by operator<<(), and HBHEPhase1Reconstructor::processData().

45  {
46  return (flavor() == FLAVOR_HB)
49  }
edm::DataFrame::size_type i_
static const int MASK_CAPID
static const int HEADER_WORDS
constexpr int flavor() const
static const int OFFSET_CAPID_HB
const edm::DataFrame & frame_
static const int OFFSET_CAPID_HE
static const int FLAVOR_HB
constexpr int QIE11DataFrame::Sample::flavor ( ) const
inline

Definition at line 39 of file QIE11DataFrame.h.

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

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

39 { return ((frame_[0] >> OFFSET_FLAVOR) & MASK_FLAVOR); }
static const int MASK_FLAVOR
const edm::DataFrame & frame_
static const int OFFSET_FLAVOR
constexpr bool QIE11DataFrame::Sample::linkError ( ) const
inline

Definition at line 50 of file QIE11DataFrame.h.

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

50  {
51  return (flavor() == FLAVOR_HB) ? (frame_[i_] & MASK_LE_HB) : (frame_[0] & MASK_LINKERROR);
52  }
edm::DataFrame::size_type i_
constexpr int flavor() const
static const int MASK_LINKERROR
const edm::DataFrame & frame_
static const int MASK_LE_HB
static const int FLAVOR_HB
constexpr bool QIE11DataFrame::Sample::soi ( ) const
inline

Definition at line 44 of file QIE11DataFrame.h.

References frame_, i_, and MASK_SOI.

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

44 { return frame_[i_] & MASK_SOI; }
edm::DataFrame::size_type i_
const edm::DataFrame & frame_
static const int MASK_SOI
constexpr int QIE11DataFrame::Sample::tdc ( ) const
inline

Definition at line 41 of file QIE11DataFrame.h.

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

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

41  {
42  return (frame_[i_] >> OFFSET_TDC) & ((flavor() == FLAVOR_HB) ? (MASK_TDC_HB) : (MASK_TDC_HE));
43  }
edm::DataFrame::size_type i_
constexpr int flavor() const
const edm::DataFrame & frame_
static const int OFFSET_TDC
static const int MASK_TDC_HB
static const int FLAVOR_HB
static const int MASK_TDC_HE

Member Data Documentation

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

Definition at line 55 of file QIE11DataFrame.h.

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

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

Definition at line 56 of file QIE11DataFrame.h.

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

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

Definition at line 28 of file QIE11DataFrame.h.

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

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

Definition at line 34 of file QIE11DataFrame.h.

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

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

Definition at line 35 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::setCapid0().

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

Definition at line 36 of file QIE11DataFrame.h.

Referenced by QIE11DataFrame::setSample().

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

Definition at line 33 of file QIE11DataFrame.h.

Referenced by linkError().

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

Definition at line 32 of file QIE11DataFrame.h.

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

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

Definition at line 30 of file QIE11DataFrame.h.

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

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

Definition at line 29 of file QIE11DataFrame.h.

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

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

Definition at line 38 of file QIE11DataFrame.h.

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

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

Definition at line 37 of file QIE11DataFrame.h.

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

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

Definition at line 31 of file QIE11DataFrame.h.

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