#include <SiStripFEDSpyBuffer.h>
Public Member Functions | |
uint16_t | adc () const |
FEDSpyChannelUnpacker (const FEDChannel &channel) | |
bool | hasData () const |
FEDSpyChannelUnpacker & | operator++ () |
FEDSpyChannelUnpacker & | operator++ (int) |
uint16_t | sampleNumber () const |
Private Attributes | |
size_t | currentOffset_ |
uint16_t | currentSample_ |
const uint32_t * | data_ |
uint16_t | valuesLeft_ |
Definition at line 67 of file SiStripFEDSpyBuffer.h.
sistrip::FEDSpyChannelUnpacker::FEDSpyChannelUnpacker | ( | const FEDChannel & | channel | ) | [inline, explicit] |
Definition at line 89 of file SiStripFEDSpyBuffer.h.
: data_(reinterpret_cast<const uint32_t*>(channel.data())), currentOffset_(channel.offset()), currentSample_(0), valuesLeft_(channel.length()) { }
uint16_t sistrip::FEDSpyChannelUnpacker::adc | ( | ) | const |
Definition at line 154 of file SiStripFEDSpyBuffer.cc.
References currentOffset_, and data_.
Referenced by sistrip::SpyUnpacker::createDigis().
{ const size_t offsetWords = currentOffset_/32; const uint8_t offsetBits = currentOffset_%32; if (offsetBits < 23) { return ( (data_[offsetWords]>>(32-10-offsetBits)) & 0x3FF ); } else { return ( ((data_[offsetWords]<<(10-32+offsetBits))&0x3FF) | ((data_[offsetWords+1]&(0xFFC00000<<(32-offsetBits)))>>(64-10-offsetBits)) ); } }
bool sistrip::FEDSpyChannelUnpacker::hasData | ( | ) | const [inline] |
Definition at line 102 of file SiStripFEDSpyBuffer.h.
References valuesLeft_.
Referenced by sistrip::SpyUnpacker::createDigis().
{ return (valuesLeft_ != 0); }
FEDSpyChannelUnpacker & sistrip::FEDSpyChannelUnpacker::operator++ | ( | void | ) | [inline] |
Definition at line 107 of file SiStripFEDSpyBuffer.h.
References currentOffset_, currentSample_, sistrip::FEDCH_PER_DELAY_CHIP, and valuesLeft_.
{ currentOffset_ += FEDCH_PER_DELAY_CHIP*10; currentSample_++; valuesLeft_--; return (*this); }
FEDSpyChannelUnpacker & sistrip::FEDSpyChannelUnpacker::operator++ | ( | int | ) | [inline] |
Definition at line 115 of file SiStripFEDSpyBuffer.h.
{ ++(*this); return *this; }
uint16_t sistrip::FEDSpyChannelUnpacker::sampleNumber | ( | ) | const [inline] |
Definition at line 97 of file SiStripFEDSpyBuffer.h.
References currentSample_.
{ return currentSample_; }
size_t sistrip::FEDSpyChannelUnpacker::currentOffset_ [private] |
Definition at line 78 of file SiStripFEDSpyBuffer.h.
Referenced by adc(), and operator++().
uint16_t sistrip::FEDSpyChannelUnpacker::currentSample_ [private] |
Definition at line 79 of file SiStripFEDSpyBuffer.h.
Referenced by operator++(), and sampleNumber().
const uint32_t* sistrip::FEDSpyChannelUnpacker::data_ [private] |
Definition at line 77 of file SiStripFEDSpyBuffer.h.
Referenced by adc().
uint16_t sistrip::FEDSpyChannelUnpacker::valuesLeft_ [private] |
Definition at line 80 of file SiStripFEDSpyBuffer.h.
Referenced by hasData(), and operator++().