CMS 3D CMS Logo

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

#include <Phase2TrackerFEDZSChannelUnpacker.h>

Public Member Functions

uint8_t clusterIndex () const
 
uint8_t clusterLength () const
 
bool hasData () const
 
Phase2TrackerFEDZSChannelUnpackeroperator++ ()
 
Phase2TrackerFEDZSChannelUnpackeroperator++ (int)
 
 Phase2TrackerFEDZSChannelUnpacker (const Phase2TrackerFEDChannel &channel)
 

Private Attributes

uint8_t currentOffset_
 
const uint8_t * data_
 
uint16_t valuesLeft_
 

Detailed Description

Definition at line 11 of file Phase2TrackerFEDZSChannelUnpacker.h.

Constructor & Destructor Documentation

◆ Phase2TrackerFEDZSChannelUnpacker()

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

Definition at line 27 of file Phase2TrackerFEDZSChannelUnpacker.h.

28  : data_(channel.data()), currentOffset_(channel.offset()), valuesLeft_(channel.length() / 2) {}

Member Function Documentation

◆ clusterIndex()

uint8_t Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::clusterIndex ( ) const
inline

Definition at line 14 of file Phase2TrackerFEDZSChannelUnpacker.h.

14 { return data_[currentOffset_ ^ 7]; }

References currentOffset_, and data_.

◆ clusterLength()

uint8_t Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::clusterLength ( ) const
inline

Definition at line 15 of file Phase2TrackerFEDZSChannelUnpacker.h.

15 { return data_[(currentOffset_ + 1) ^ 7]; }

References currentOffset_, and data_.

◆ hasData()

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

Definition at line 16 of file Phase2TrackerFEDZSChannelUnpacker.h.

16 { return valuesLeft_; }

References valuesLeft_.

◆ operator++() [1/2]

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

Definition at line 30 of file Phase2TrackerFEDZSChannelUnpacker.h.

30  {
32  valuesLeft_--;
33  return (*this);
34  }

References currentOffset_, and valuesLeft_.

◆ operator++() [2/2]

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

Definition at line 36 of file Phase2TrackerFEDZSChannelUnpacker.h.

36  {
37  ++(*this);
38  return *this;
39  }

Member Data Documentation

◆ currentOffset_

uint8_t Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::currentOffset_
private

Definition at line 22 of file Phase2TrackerFEDZSChannelUnpacker.h.

Referenced by clusterIndex(), clusterLength(), and operator++().

◆ data_

const uint8_t* Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::data_
private

Definition at line 21 of file Phase2TrackerFEDZSChannelUnpacker.h.

Referenced by clusterIndex(), and clusterLength().

◆ valuesLeft_

uint16_t Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::valuesLeft_
private

Definition at line 23 of file Phase2TrackerFEDZSChannelUnpacker.h.

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

Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::valuesLeft_
uint16_t valuesLeft_
Definition: Phase2TrackerFEDZSChannelUnpacker.h:23
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::data_
const uint8_t * data_
Definition: Phase2TrackerFEDZSChannelUnpacker.h:21
Phase2Tracker::Phase2TrackerFEDZSChannelUnpacker::currentOffset_
uint8_t currentOffset_
Definition: Phase2TrackerFEDZSChannelUnpacker.h:22