CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker Class Reference

#include <Phase2TrackerFEDRawChannelUnpacker.h>

Public Member Functions

bool hasData () const
 
Phase2TrackerFEDRawChannelUnpackeroperator++ ()
 
Phase2TrackerFEDRawChannelUnpackeroperator++ (int)
 
 Phase2TrackerFEDRawChannelUnpacker (const Phase2TrackerFEDChannel &channel)
 
uint8_t stripIndex () const
 
bool stripOn () const
 

Private Attributes

uint8_t bitInWord_
 
uint8_t currentOffset_
 
uint8_t currentStrip_
 
uint8_t currentWord_
 
const uint8_t * data_
 
uint16_t valuesLeft_
 

Detailed Description

Definition at line 13 of file Phase2TrackerFEDRawChannelUnpacker.h.

Constructor & Destructor Documentation

◆ Phase2TrackerFEDRawChannelUnpacker()

Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::Phase2TrackerFEDRawChannelUnpacker ( const Phase2TrackerFEDChannel channel)
inline

Definition at line 31 of file Phase2TrackerFEDRawChannelUnpacker.h.

32  : data_(channel.data()),
33  currentOffset_(channel.offset()),
34  currentStrip_(0),
35  valuesLeft_((channel.length()) * 8 - STRIPS_PADDING),
36  currentWord_(channel.data()[currentOffset_ ^ 7]),
37  bitInWord_(0) {}

Member Function Documentation

◆ hasData()

bool Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::hasData ( ) const
inline

Definition at line 18 of file Phase2TrackerFEDRawChannelUnpacker.h.

18 { return valuesLeft_; }

References valuesLeft_.

Referenced by Phase2Tracker::Phase2TrackerDigiProducer::produce().

◆ operator++() [1/2]

Phase2TrackerFEDRawChannelUnpacker & Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::operator++ ( void  )
inline

Definition at line 39 of file Phase2TrackerFEDRawChannelUnpacker.h.

39  {
40  bitInWord_++;
41  currentStrip_++;
42  if (bitInWord_ > 7) {
43  bitInWord_ = 0;
46  }
47  valuesLeft_--;
48  return (*this);
49  }

References bitInWord_, currentOffset_, currentStrip_, currentWord_, data_, and valuesLeft_.

◆ operator++() [2/2]

Phase2TrackerFEDRawChannelUnpacker & Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::operator++ ( int  )
inline

Definition at line 51 of file Phase2TrackerFEDRawChannelUnpacker.h.

51  {
52  ++(*this);
53  return *this;
54  }

◆ stripIndex()

uint8_t Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::stripIndex ( ) const
inline

Definition at line 16 of file Phase2TrackerFEDRawChannelUnpacker.h.

16 { return currentStrip_; }

References currentStrip_.

Referenced by Phase2Tracker::Phase2TrackerDigiProducer::produce().

◆ stripOn()

bool Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::stripOn ( ) const
inline

Member Data Documentation

◆ bitInWord_

uint8_t Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::bitInWord_
private

Definition at line 28 of file Phase2TrackerFEDRawChannelUnpacker.h.

Referenced by operator++(), and stripOn().

◆ currentOffset_

uint8_t Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::currentOffset_
private

Definition at line 24 of file Phase2TrackerFEDRawChannelUnpacker.h.

Referenced by operator++().

◆ currentStrip_

uint8_t Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::currentStrip_
private

Definition at line 25 of file Phase2TrackerFEDRawChannelUnpacker.h.

Referenced by operator++(), and stripIndex().

◆ currentWord_

uint8_t Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::currentWord_
private

Definition at line 27 of file Phase2TrackerFEDRawChannelUnpacker.h.

Referenced by operator++(), and stripOn().

◆ data_

const uint8_t* Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::data_
private

Definition at line 23 of file Phase2TrackerFEDRawChannelUnpacker.h.

Referenced by operator++().

◆ valuesLeft_

uint16_t Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::valuesLeft_
private

Definition at line 26 of file Phase2TrackerFEDRawChannelUnpacker.h.

Referenced by hasData(), and operator++().

Phase2Tracker::STRIPS_PADDING
static const int STRIPS_PADDING
Definition: utils.h:27
electrons_cff.bool
bool
Definition: electrons_cff.py:393
Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::valuesLeft_
uint16_t valuesLeft_
Definition: Phase2TrackerFEDRawChannelUnpacker.h:26
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::currentOffset_
uint8_t currentOffset_
Definition: Phase2TrackerFEDRawChannelUnpacker.h:24
Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::data_
const uint8_t * data_
Definition: Phase2TrackerFEDRawChannelUnpacker.h:23
Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::bitInWord_
uint8_t bitInWord_
Definition: Phase2TrackerFEDRawChannelUnpacker.h:28
Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::currentStrip_
uint8_t currentStrip_
Definition: Phase2TrackerFEDRawChannelUnpacker.h:25
Phase2Tracker::Phase2TrackerFEDRawChannelUnpacker::currentWord_
uint8_t currentWord_
Definition: Phase2TrackerFEDRawChannelUnpacker.h:27