CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
sistrip::FEDChannel Class Reference

#include <SiStripFEDBufferComponents.h>

Public Member Functions

uint16_t cmMedian (const uint8_t apvIndex) const
 
const uint8_t * data () const
 
 FEDChannel (const uint8_t *const data, const uint32_t offset, const uint16_t length)
 
 FEDChannel (const uint8_t *const data, const uint32_t offset)
 
uint16_t length () const
 
uint32_t offset () const
 
uint8_t packetCode () const
 

Private Attributes

const uint8_t * data_
 
uint16_t length_
 
uint32_t offset_
 

Friends

class FEDBuffer
 

Detailed Description

Definition at line 616 of file SiStripFEDBufferComponents.h.

Constructor & Destructor Documentation

◆ FEDChannel() [1/2]

sistrip::FEDChannel::FEDChannel ( const uint8_t *const  data,
const uint32_t  offset,
const uint16_t  length 
)
inline

◆ FEDChannel() [2/2]

sistrip::FEDChannel::FEDChannel ( const uint8_t *const  data,
const uint32_t  offset 
)
inline

Definition at line 1558 of file SiStripFEDBufferComponents.h.

References data_, length_, and offset_.

1558  : data_(data), offset_(offset) {
1559  length_ = (data_[(offset_) ^ 7] + (data_[(offset_ + 1) ^ 7] << 8));
1560  }
const uint8_t * data() const

Member Function Documentation

◆ cmMedian()

uint16_t sistrip::FEDChannel::cmMedian ( const uint8_t  apvIndex) const
inline

Retrieve the APV CM median for a non-lite zero-suppressed channel

apvIndex should be either 0 or 1 (there are, by construction, two APVs on every channel) No additional checks are done here, so the caller should check the readout mode and/or packet code.

Definition at line 1569 of file SiStripFEDBufferComponents.h.

References data_, offset_, and mps_fire::result.

Referenced by SiStripCMMonitorPlugin::analyze().

1569  {
1570  uint16_t result = 0;
1571  //CM median is 10 bits with lowest order byte first. First APV CM median starts in 4th byte of channel data
1572  result |= data_[(offset_ + 3 + 2 * apvIndex) ^ 7];
1573  result |= (((data_[(offset_ + 4 + 2 * apvIndex) ^ 7]) << 8) & 0x300);
1574  return result;
1575  }

◆ data()

const uint8_t * sistrip::FEDChannel::data ( ) const
inline

◆ length()

uint16_t sistrip::FEDChannel::length ( ) const
inline

◆ offset()

uint32_t sistrip::FEDChannel::offset ( ) const
inline

◆ packetCode()

uint8_t sistrip::FEDChannel::packetCode ( ) const
inline

Definition at line 1567 of file SiStripFEDBufferComponents.h.

References data_, and offset_.

Referenced by sistrip::FEDBufferBase::packetCode().

1567 { return data_[(offset_ + 2) ^ 7]; }

Friends And Related Function Documentation

◆ FEDBuffer

friend class FEDBuffer
friend

Definition at line 636 of file SiStripFEDBufferComponents.h.

Member Data Documentation

◆ data_

const uint8_t* sistrip::FEDChannel::data_
private

Definition at line 637 of file SiStripFEDBufferComponents.h.

Referenced by cmMedian(), data(), FEDChannel(), and packetCode().

◆ length_

uint16_t sistrip::FEDChannel::length_
private

Definition at line 639 of file SiStripFEDBufferComponents.h.

Referenced by FEDChannel(), and length().

◆ offset_

uint32_t sistrip::FEDChannel::offset_
private

Definition at line 638 of file SiStripFEDBufferComponents.h.

Referenced by cmMedian(), FEDChannel(), offset(), and packetCode().