CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private 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, const uint16_t length)
 
 FEDChannel (const uint8_t *const data, const size_t offset)
 
uint16_t length () const
 
size_t offset () const
 

Private Member Functions

uint8_t packetCode () const
 

Private Attributes

const uint8_t * data_
 
uint16_t length_
 
size_t offset_
 

Friends

class FEDBuffer
 

Detailed Description

Definition at line 516 of file SiStripFEDBufferComponents.h.

Constructor & Destructor Documentation

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

Definition at line 1567 of file SiStripFEDBufferComponents.h.

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

Definition at line 1560 of file SiStripFEDBufferComponents.h.

References data_, length_, and offset_.

1561  : data_(data),
1562  offset_(offset)
1563  {
1564  length_ = ( data_[(offset_)^7] + (data_[(offset_+1)^7] << 8) );
1565  }
const uint8_t * data() const

Member Function Documentation

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

Definition at line 1400 of file SiStripFEDBufferComponents.cc.

References data_, Exception, offset_, sistrip::PACKET_CODE_ZERO_SUPPRESSED, packetCode(), query::result, and contentValuesCheck::ss.

Referenced by SiStripCMMonitorPlugin::analyze().

1401  {
1403  std::ostringstream ss;
1404  ss << "Request for CM median from channel with non-ZS packet code. "
1405  << "Packet code is " << uint16_t(packetCode()) << "."
1406  << std::endl;
1407  throw cms::Exception("FEDBuffer") << ss.str();
1408  }
1409  if (apvIndex > 1) {
1410  std::ostringstream ss;
1411  ss << "Channel APV index out of range when requesting CM median for APV. "
1412  << "Channel APV index is " << uint16_t(apvIndex) << "."
1413  << std::endl;
1414  throw cms::Exception("FEDBuffer") << ss.str();
1415  }
1416  uint16_t result = 0;
1417  //CM median is 10 bits with lowest order byte first. First APV CM median starts in 4th byte of channel data
1418  result |= data_[(offset_+3+2*apvIndex)^7];
1419  result |= ( ((data_[(offset_+4+2*apvIndex)^7]) << 8) & 0x300 );
1420  return result;
1421  }
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED
tuple result
Definition: query.py:137
const uint8_t * sistrip::FEDChannel::data ( ) const
inline
uint16_t sistrip::FEDChannel::length ( ) const
inline
size_t sistrip::FEDChannel::offset ( ) const
inline
uint8_t sistrip::FEDChannel::packetCode ( ) const
inlineprivate

Definition at line 1579 of file SiStripFEDBufferComponents.h.

References data_, and offset_.

Referenced by cmMedian().

1580  {
1581  return data_[(offset_+2)^7];
1582  }

Friends And Related Function Documentation

friend class FEDBuffer
friend

Definition at line 527 of file SiStripFEDBufferComponents.h.

Member Data Documentation

const uint8_t* sistrip::FEDChannel::data_
private

Definition at line 530 of file SiStripFEDBufferComponents.h.

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

uint16_t sistrip::FEDChannel::length_
private

Definition at line 532 of file SiStripFEDBufferComponents.h.

Referenced by FEDChannel(), and length().

size_t sistrip::FEDChannel::offset_
private

Definition at line 531 of file SiStripFEDBufferComponents.h.

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