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 | 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

sistrip::FEDChannel::FEDChannel ( const uint8_t *const  data,
const uint32_t  offset,
const uint16_t  length 
)
inline
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

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  }
tuple result
Definition: mps_fire.py:311
const uint8_t * sistrip::FEDChannel::data ( ) const
inline
uint16_t sistrip::FEDChannel::length ( ) const
inline
uint32_t sistrip::FEDChannel::offset ( ) const
inline
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

friend class FEDBuffer
friend

Definition at line 636 of file SiStripFEDBufferComponents.h.

Member Data Documentation

const uint8_t* sistrip::FEDChannel::data_
private

Definition at line 637 of file SiStripFEDBufferComponents.h.

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

uint16_t sistrip::FEDChannel::length_
private

Definition at line 639 of file SiStripFEDBufferComponents.h.

Referenced by FEDChannel(), and length().

uint32_t sistrip::FEDChannel::offset_
private

Definition at line 638 of file SiStripFEDBufferComponents.h.

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