#include <SiStripFEDBuffer.h>
Public Member Functions | |
uint16_t | adc () const |
FEDRawChannelUnpacker (const FEDChannel &channel) | |
bool | hasData () const |
FEDRawChannelUnpacker & | operator++ () |
FEDRawChannelUnpacker & | operator++ (int) |
uint8_t | sampleNumber () const |
Static Public Member Functions | |
static FEDRawChannelUnpacker | procRawModeUnpacker (const FEDChannel &channel) |
static FEDRawChannelUnpacker | scopeModeUnpacker (const FEDChannel &channel) |
static FEDRawChannelUnpacker | virginRawModeUnpacker (const FEDChannel &channel) |
Static Private Member Functions | |
static void | throwBadChannelLength (const uint16_t length) |
Private Attributes | |
size_t | currentOffset_ |
uint8_t | currentStrip_ |
const uint8_t * | data_ |
uint16_t | valuesLeft_ |
Definition at line 107 of file SiStripFEDBuffer.h.
sistrip::FEDRawChannelUnpacker::FEDRawChannelUnpacker | ( | const FEDChannel & | channel | ) | [inline, explicit] |
Definition at line 160 of file SiStripFEDBuffer.h.
References sistrip::FEDChannel::length(), and throwBadChannelLength().
Referenced by procRawModeUnpacker(), scopeModeUnpacker(), and virginRawModeUnpacker().
: data_(channel.data()), currentOffset_(channel.offset()+3), currentStrip_(0), valuesLeft_((channel.length()-3)/2) { if ((channel.length()-3)%2) throwBadChannelLength(channel.length()); }
uint16_t sistrip::FEDRawChannelUnpacker::adc | ( | ) | const [inline] |
Definition at line 174 of file SiStripFEDBuffer.h.
References currentOffset_, and data_.
Referenced by sistrip::RawToDigiUnpacker::createDigis(), and sistrip::RawToClustersLazyUnpacker::fill().
{ return ( data_[currentOffset_^7] + ((data_[(currentOffset_+1)^7]&0x03)<<8) ); }
bool sistrip::FEDRawChannelUnpacker::hasData | ( | ) | const [inline] |
Definition at line 179 of file SiStripFEDBuffer.h.
References valuesLeft_.
Referenced by sistrip::RawToDigiUnpacker::createDigis(), and sistrip::RawToClustersLazyUnpacker::fill().
{ return valuesLeft_; }
FEDRawChannelUnpacker & sistrip::FEDRawChannelUnpacker::operator++ | ( | int | ) | [inline] |
Definition at line 192 of file SiStripFEDBuffer.h.
{ ++(*this); return *this; }
FEDRawChannelUnpacker & sistrip::FEDRawChannelUnpacker::operator++ | ( | void | ) | [inline] |
Definition at line 184 of file SiStripFEDBuffer.h.
References currentOffset_, currentStrip_, and valuesLeft_.
{ currentOffset_ += 2; currentStrip_++; valuesLeft_--; return (*this); }
static FEDRawChannelUnpacker sistrip::FEDRawChannelUnpacker::procRawModeUnpacker | ( | const FEDChannel & | channel | ) | [inline, static] |
Definition at line 112 of file SiStripFEDBuffer.h.
References FEDRawChannelUnpacker().
Referenced by sistrip::RawToDigiUnpacker::createDigis(), and sistrip::RawToClustersLazyUnpacker::fill().
{ return FEDRawChannelUnpacker(channel); }
uint8_t sistrip::FEDRawChannelUnpacker::sampleNumber | ( | ) | const [inline] |
Definition at line 169 of file SiStripFEDBuffer.h.
References currentStrip_.
{ return currentStrip_; }
static FEDRawChannelUnpacker sistrip::FEDRawChannelUnpacker::scopeModeUnpacker | ( | const FEDChannel & | channel | ) | [inline, static] |
Definition at line 110 of file SiStripFEDBuffer.h.
References FEDRawChannelUnpacker().
Referenced by sistrip::RawToDigiUnpacker::createDigis().
{ return FEDRawChannelUnpacker(channel); }
void sistrip::FEDRawChannelUnpacker::throwBadChannelLength | ( | const uint16_t | length | ) | [static, private] |
Definition at line 422 of file SiStripFEDBuffer.cc.
References Exception.
Referenced by FEDRawChannelUnpacker().
{ std::ostringstream ss; ss << "Channel length is invalid. Raw channels have 3 header bytes and 2 bytes per sample. " << "Channel length is " << uint16_t(length) << "." << std::endl; throw cms::Exception("FEDBuffer") << ss.str(); }
static FEDRawChannelUnpacker sistrip::FEDRawChannelUnpacker::virginRawModeUnpacker | ( | const FEDChannel & | channel | ) | [inline, static] |
Definition at line 111 of file SiStripFEDBuffer.h.
References FEDRawChannelUnpacker().
Referenced by sistrip::RawToDigiUnpacker::createDigis(), and sistrip::RawToClustersLazyUnpacker::fill().
{ return FEDRawChannelUnpacker(channel); }
size_t sistrip::FEDRawChannelUnpacker::currentOffset_ [private] |
Definition at line 122 of file SiStripFEDBuffer.h.
Referenced by adc(), and operator++().
uint8_t sistrip::FEDRawChannelUnpacker::currentStrip_ [private] |
Definition at line 123 of file SiStripFEDBuffer.h.
Referenced by operator++(), and sampleNumber().
const uint8_t* sistrip::FEDRawChannelUnpacker::data_ [private] |
Definition at line 121 of file SiStripFEDBuffer.h.
Referenced by adc().
uint16_t sistrip::FEDRawChannelUnpacker::valuesLeft_ [private] |
Definition at line 124 of file SiStripFEDBuffer.h.
Referenced by hasData(), and operator++().