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 size_t offset)
 
 FEDChannel (const uint8_t *const data, const size_t offset, const uint16_t length)
 
uint16_t length () const
 
size_t offset () const
 
uint8_t packetCode () const
 

Private Attributes

const uint8_t * data_
 
uint16_t length_
 
size_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 size_t  offset,
const uint16_t  length 
)
inline

Definition at line 1560 of file SiStripFEDBufferComponents.h.

◆ FEDChannel() [2/2]

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

Definition at line 1556 of file SiStripFEDBufferComponents.h.

1556  : data_(data), offset_(offset) {
1557  length_ = (data_[(offset_) ^ 7] + (data_[(offset_ + 1) ^ 7] << 8));
1558  }

References data_, length_, and offset_.

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 1567 of file SiStripFEDBufferComponents.h.

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

References data_, offset_, and mps_fire::result.

Referenced by SiStripCMMonitorPlugin::analyze().

◆ data()

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

◆ length()

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

◆ offset()

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

◆ packetCode()

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

Definition at line 1565 of file SiStripFEDBufferComponents.h.

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

References data_, and offset_.

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

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_

size_t sistrip::FEDChannel::offset_
private

Definition at line 638 of file SiStripFEDBufferComponents.h.

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

sistrip::FEDChannel::offset
size_t offset() const
Definition: SiStripFEDBufferComponents.h:1577
sistrip::FEDChannel::data
const uint8_t * data() const
Definition: SiStripFEDBufferComponents.h:1575
sistrip::FEDChannel::offset_
size_t offset_
Definition: SiStripFEDBufferComponents.h:638
sistrip::FEDChannel::length
uint16_t length() const
Definition: SiStripFEDBufferComponents.h:1563
sistrip::FEDChannel::length_
uint16_t length_
Definition: SiStripFEDBufferComponents.h:639
sistrip::FEDChannel::data_
const uint8_t * data_
Definition: SiStripFEDBufferComponents.h:637
mps_fire.result
result
Definition: mps_fire.py:303