![]() |
![]() |
#include <EventFilter/SiStripRawToDigi/interface/SiStripFEDBuffer.h>
Public Member Functions | |
uint16_t | adc () const |
FEDRawChannelUnpacker (const FEDChannel &channel) | |
bool | hasData () const |
FEDRawChannelUnpacker & | operator++ (int) |
FEDRawChannelUnpacker & | operator++ () |
uint8_t | strip () 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 (uint16_t length) |
Private Attributes | |
size_t | currentOffset_ |
uint8_t | currentStrip_ |
const uint8_t * | data_ |
uint8_t | valuesLeft_ |
Definition at line 207 of file SiStripFEDBuffer.h.
sistrip::FEDRawChannelUnpacker::FEDRawChannelUnpacker | ( | const FEDChannel & | channel | ) | [inline] |
Definition at line 288 of file SiStripFEDBuffer.h.
References sistrip::FEDChannel::length(), and throwBadChannelLength().
Referenced by procRawModeUnpacker(), scopeModeUnpacker(), and virginRawModeUnpacker().
00289 : data_(channel.data()), 00290 currentOffset_(channel.offset()+3), 00291 currentStrip_(0), 00292 valuesLeft_((channel.length()-3)/2) 00293 { 00294 if ((channel.length()-3)%2) throwBadChannelLength(channel.length()); 00295 }
uint16_t sistrip::FEDRawChannelUnpacker::adc | ( | ) | const [inline] |
Definition at line 215 of file SiStripFEDBuffer.h.
References currentOffset_, and data_.
00215 { return ( data_[currentOffset_^7] + ((data_[(currentOffset_+1)^7]&0x03)<<8) ); }
bool sistrip::FEDRawChannelUnpacker::hasData | ( | ) | const [inline] |
Definition at line 216 of file SiStripFEDBuffer.h.
References valuesLeft_.
00216 { return valuesLeft_; }
FEDRawChannelUnpacker& sistrip::FEDRawChannelUnpacker::operator++ | ( | int | ) | [inline] |
FEDRawChannelUnpacker & sistrip::FEDRawChannelUnpacker::operator++ | ( | void | ) | [inline] |
Definition at line 297 of file SiStripFEDBuffer.h.
References currentOffset_, currentStrip_, and valuesLeft_.
00298 { 00299 currentOffset_ += 2; 00300 currentStrip_++; 00301 valuesLeft_--; 00302 return (*this); 00303 }
static FEDRawChannelUnpacker sistrip::FEDRawChannelUnpacker::procRawModeUnpacker | ( | const FEDChannel & | channel | ) | [inline, static] |
Definition at line 212 of file SiStripFEDBuffer.h.
References FEDRawChannelUnpacker().
00212 { return FEDRawChannelUnpacker(channel); }
static FEDRawChannelUnpacker sistrip::FEDRawChannelUnpacker::scopeModeUnpacker | ( | const FEDChannel & | channel | ) | [inline, static] |
Definition at line 210 of file SiStripFEDBuffer.h.
References FEDRawChannelUnpacker().
00210 { return FEDRawChannelUnpacker(channel); }
uint8_t sistrip::FEDRawChannelUnpacker::strip | ( | void | ) | const [inline] |
Definition at line 214 of file SiStripFEDBuffer.h.
References currentStrip_.
00214 { return currentStrip_; }
void sistrip::FEDRawChannelUnpacker::throwBadChannelLength | ( | uint16_t | length | ) | [static, private] |
Definition at line 513 of file SiStripFEDBuffer.cc.
References lat::endl(), Exception, and ss.
Referenced by FEDRawChannelUnpacker().
00514 { 00515 std::stringstream ss; 00516 ss << "Channel length is invalid. Raw channels have 3 header bytes and 2 bytes per sample. " 00517 << "Channel length is " << uint16_t(length) << "." 00518 << std::endl; 00519 throw cms::Exception("FEDBuffer") << ss.str(); 00520 }
static FEDRawChannelUnpacker sistrip::FEDRawChannelUnpacker::virginRawModeUnpacker | ( | const FEDChannel & | channel | ) | [inline, static] |
Definition at line 211 of file SiStripFEDBuffer.h.
References FEDRawChannelUnpacker().
00211 { return FEDRawChannelUnpacker(channel); }
size_t sistrip::FEDRawChannelUnpacker::currentOffset_ [private] |
uint8_t sistrip::FEDRawChannelUnpacker::currentStrip_ [private] |
const uint8_t* sistrip::FEDRawChannelUnpacker::data_ [private] |
uint8_t sistrip::FEDRawChannelUnpacker::valuesLeft_ [private] |