#include <SiStripFEDBufferComponents.h>
Public Member Functions | |
uint8_t | apvAddressErrorRegister () const |
uint8_t | apveAddress () const |
FEDBufferFormat | bufferFormat () const |
uint8_t | bufferFormatByte () const |
const uint8_t * | data () const |
FEDDataType | dataType () const |
FEDStatusRegister | fedStatusRegister () const |
uint16_t | fedStatusRegisterWord () const |
bool | feEnabled (const uint8_t internalFEUnitNum) const |
uint8_t | feEnableRegister () const |
bool | feOverflow (const uint8_t internalFEUnitNum) const |
uint8_t | feOverflowRegister () const |
FEDHeaderType | headerType () const |
uint8_t | headerTypeNibble () const |
bool | majorityAddressErrorForFEUnit (const uint8_t internalFEUnitNum) const |
void | print (std::ostream &os) const |
FEDReadoutMode | readoutMode () const |
TrackerSpecialHeader & | setAPVAddressErrorForFEUnit (const uint8_t internalFEUnitNum, const bool error) |
TrackerSpecialHeader & | setAPVEAddress (const uint8_t address) |
TrackerSpecialHeader & | setAPVEAddressErrorRegister (const uint8_t addressErrorRegister) |
TrackerSpecialHeader & | setBufferFormat (const FEDBufferFormat newBufferFormat) |
TrackerSpecialHeader & | setDataType (const FEDDataType dataType) |
TrackerSpecialHeader & | setFEDStatusRegister (const FEDStatusRegister fedStatusRegister) |
TrackerSpecialHeader & | setFEEnableForFEUnit (const uint8_t internalFEUnitNum, const bool enabled) |
TrackerSpecialHeader & | setFEEnableRegister (const uint8_t feEnableRegister) |
TrackerSpecialHeader & | setFEOverflowForFEUnit (const uint8_t internalFEUnitNum, const bool overflow) |
TrackerSpecialHeader & | setFEOverflowRegister (const uint8_t feOverflowRegister) |
TrackerSpecialHeader & | setHeaderType (const FEDHeaderType headerType) |
TrackerSpecialHeader & | setReadoutMode (const FEDReadoutMode readoutMode) |
uint8_t | trackerEventTypeNibble () const |
TrackerSpecialHeader () | |
TrackerSpecialHeader (const FEDBufferFormat bufferFormat, const FEDReadoutMode readoutMode, const FEDHeaderType headerType, const FEDDataType dataType, const uint8_t address=0x00, const uint8_t addressErrorRegister=0x00, const uint8_t feEnableRegister=0xFF, const uint8_t feOverflowRegister=0x00, const FEDStatusRegister fedStatusRegister=FEDStatusRegister()) | |
TrackerSpecialHeader (const uint8_t *headerPointer) | |
bool | wasSwapped () const |
Private Types | |
enum | byteIndicies { FEDSTATUS = 0, FEOVERFLOW = 2, FEENABLE = 3, ADDRESSERROR = 4, APVEADDRESS = 5, BUFFERTYPE = 6, BUFFERFORMAT = 7 } |
Private Member Functions | |
void | setBufferFormatByte (const FEDBufferFormat newBufferFormat) |
void | setDataTypeBit (const bool value) |
void | setHeaderTypeNibble (const uint8_t value) |
void | setReadoutModeBits (const uint8_t value) |
Private Attributes | |
uint8_t | specialHeader_ [8] |
bool | wordSwapped_ |
Definition at line 257 of file SiStripFEDBufferComponents.h.
enum sistrip::TrackerSpecialHeader::byteIndicies [private] |
Definition at line 306 of file SiStripFEDBufferComponents.h.
{ FEDSTATUS=0, FEOVERFLOW=2, FEENABLE=3, ADDRESSERROR=4, APVEADDRESS=5, BUFFERTYPE=6, BUFFERFORMAT=7 };
sistrip::TrackerSpecialHeader::TrackerSpecialHeader | ( | ) | [inline] |
Definition at line 671 of file SiStripFEDBufferComponents.h.
: wordSwapped_(false) { }
sistrip::TrackerSpecialHeader::TrackerSpecialHeader | ( | const uint8_t * | headerPointer | ) | [explicit] |
Definition at line 611 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_FORMAT_CODE_NEW, sistrip::BUFFER_FORMAT_CODE_OLD, BUFFERFORMAT, specialHeader_, and wordSwapped_.
{ //the buffer format byte is one of the valid values if we assume the buffer is not swapped const bool validFormatByteWhenNotWordSwapped = ( (headerPointer[BUFFERFORMAT] == BUFFER_FORMAT_CODE_NEW) || (headerPointer[BUFFERFORMAT] == BUFFER_FORMAT_CODE_OLD) ); //the buffer format byte is the old value if we assume the buffer is swapped const bool validFormatByteWhenWordSwapped = (headerPointer[BUFFERFORMAT^4] == BUFFER_FORMAT_CODE_OLD); //if the buffer format byte is valid if the buffer is not swapped or it is never valid if (validFormatByteWhenNotWordSwapped || (!validFormatByteWhenNotWordSwapped && !validFormatByteWhenWordSwapped) ) { memcpy(specialHeader_,headerPointer,8); wordSwapped_ = false; } else { memcpy(specialHeader_,headerPointer+4,4); memcpy(specialHeader_+4,headerPointer,4); wordSwapped_ = true; } }
sistrip::TrackerSpecialHeader::TrackerSpecialHeader | ( | const FEDBufferFormat | bufferFormat, |
const FEDReadoutMode | readoutMode, | ||
const FEDHeaderType | headerType, | ||
const FEDDataType | dataType, | ||
const uint8_t | address = 0x00 , |
||
const uint8_t | addressErrorRegister = 0x00 , |
||
const uint8_t | feEnableRegister = 0xFF , |
||
const uint8_t | feOverflowRegister = 0x00 , |
||
const FEDStatusRegister | fedStatusRegister = FEDStatusRegister() |
||
) |
Definition at line 788 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_FORMAT_OLD_VME, setAPVEAddress(), setAPVEAddressErrorRegister(), setBufferFormatByte(), setDataType(), setFEDStatusRegister(), setFEEnableRegister(), setFEOverflowRegister(), setHeaderType(), setReadoutMode(), specialHeader_, and wordSwapped_.
{ memset(specialHeader_,0x00,8); //determine if order is swapped in real buffer wordSwapped_ = (bufferFormat == BUFFER_FORMAT_OLD_VME); //set fields setBufferFormatByte(bufferFormat); setReadoutMode(readoutMode); setHeaderType(headerType); setDataType(dataType); setAPVEAddress(address); setAPVEAddressErrorRegister(addressErrorRegister); setFEEnableRegister(feEnableRegister); setFEOverflowRegister(feOverflowRegister); setFEDStatusRegister(fedStatusRegister); }
uint8_t sistrip::TrackerSpecialHeader::apvAddressErrorRegister | ( | ) | const [inline] |
Definition at line 688 of file SiStripFEDBufferComponents.h.
References ADDRESSERROR, and specialHeader_.
Referenced by majorityAddressErrorForFEUnit(), and setAPVAddressErrorForFEUnit().
{ return specialHeader_[ADDRESSERROR]; }
uint8_t sistrip::TrackerSpecialHeader::apveAddress | ( | ) | const [inline] |
Definition at line 685 of file SiStripFEDBufferComponents.h.
References APVEADDRESS, and specialHeader_.
Referenced by sistrip::FEDBufferBase::apveAddress(), and sistrip::FEDBufferBase::majorityAddressErrorForFEUnit().
{ return specialHeader_[APVEADDRESS]; }
FEDBufferFormat sistrip::TrackerSpecialHeader::bufferFormat | ( | ) | const |
Definition at line 629 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_FORMAT_CODE_NEW, sistrip::BUFFER_FORMAT_CODE_OLD, sistrip::BUFFER_FORMAT_INVALID, sistrip::BUFFER_FORMAT_NEW, sistrip::BUFFER_FORMAT_OLD_SLINK, sistrip::BUFFER_FORMAT_OLD_VME, bufferFormatByte(), and wordSwapped_.
Referenced by sistrip::FEDBufferBase::bufferFormat(), sistrip::FEDBufferGenerator::getBufferFormat(), sistrip::FEDBufferBase::init(), and setBufferFormat().
{ if (bufferFormatByte() == BUFFER_FORMAT_CODE_NEW) return BUFFER_FORMAT_NEW; else if (bufferFormatByte() == BUFFER_FORMAT_CODE_OLD) { if (wordSwapped_) return BUFFER_FORMAT_OLD_VME; else return BUFFER_FORMAT_OLD_SLINK; } else return BUFFER_FORMAT_INVALID; }
uint8_t sistrip::TrackerSpecialHeader::bufferFormatByte | ( | ) | const [inline] |
Definition at line 676 of file SiStripFEDBufferComponents.h.
References BUFFERFORMAT, and specialHeader_.
Referenced by bufferFormat().
{ return specialHeader_[BUFFERFORMAT]; }
const uint8_t * sistrip::TrackerSpecialHeader::data | ( | ) | const [inline] |
Definition at line 725 of file SiStripFEDBufferComponents.h.
References specialHeader_.
Referenced by sistrip::FEDBufferGenerator::fillBuffer().
{ return specialHeader_; }
FEDDataType sistrip::TrackerSpecialHeader::dataType | ( | ) | const |
Definition at line 669 of file SiStripFEDBufferComponents.cc.
References sistrip::DATA_TYPE_REAL, sistrip::READOUT_MODE_SCOPE, and trackerEventTypeNibble().
Referenced by sistrip::FEDBufferBase::dataType(), and sistrip::FEDBufferGenerator::getFEDDataType().
{ const uint8_t eventTypeNibble = trackerEventTypeNibble(); //if it is scope mode then it is always real if (eventTypeNibble == READOUT_MODE_SCOPE) return DATA_TYPE_REAL; //in other modes it is the lowest order bit of event type nibble else return FEDDataType(eventTypeNibble & 0x1); }
FEDStatusRegister sistrip::TrackerSpecialHeader::fedStatusRegister | ( | ) | const [inline] |
Definition at line 719 of file SiStripFEDBufferComponents.h.
References fedStatusRegisterWord().
Referenced by sistrip::FEDBufferBase::fedStatusRegister(), and setFEDStatusRegister().
{ return FEDStatusRegister(fedStatusRegisterWord()); }
uint16_t sistrip::TrackerSpecialHeader::fedStatusRegisterWord | ( | ) | const [inline] |
Definition at line 712 of file SiStripFEDBufferComponents.h.
References FEDSTATUS, and specialHeader_.
Referenced by fedStatusRegister().
{ //get 16 bits uint16_t statusRegister = ( (specialHeader_[(FEDSTATUS+1)]<<8) | specialHeader_[FEDSTATUS]); return statusRegister; }
bool sistrip::TrackerSpecialHeader::feEnabled | ( | const uint8_t | internalFEUnitNum | ) | const [inline] |
Definition at line 699 of file SiStripFEDBufferComponents.h.
References feEnableRegister().
Referenced by sistrip::FEDBufferBase::feEnabled().
{ return ( (0x1<<internalFEUnitNum) & feEnableRegister() ); }
uint8_t sistrip::TrackerSpecialHeader::feEnableRegister | ( | ) | const [inline] |
Definition at line 696 of file SiStripFEDBufferComponents.h.
References FEENABLE, and specialHeader_.
Referenced by feEnabled(), setFEEnableForFEUnit(), and setFEEnableRegister().
{ return specialHeader_[FEENABLE]; }
bool sistrip::TrackerSpecialHeader::feOverflow | ( | const uint8_t | internalFEUnitNum | ) | const [inline] |
Definition at line 707 of file SiStripFEDBufferComponents.h.
References feOverflowRegister().
Referenced by sistrip::FEDBufferBase::feOverflow().
{ return ( (0x1<<internalFEUnitNum) & feOverflowRegister() ); }
uint8_t sistrip::TrackerSpecialHeader::feOverflowRegister | ( | ) | const [inline] |
Definition at line 704 of file SiStripFEDBufferComponents.h.
References FEOVERFLOW, and specialHeader_.
Referenced by sistrip::FEDBufferBase::checkNoFEOverflows(), feOverflow(), setFEOverflowForFEUnit(), and setFEOverflowRegister().
{ return specialHeader_[FEOVERFLOW]; }
FEDHeaderType sistrip::TrackerSpecialHeader::headerType | ( | ) | const |
Definition at line 639 of file SiStripFEDBufferComponents.cc.
References sistrip::HEADER_TYPE_APV_ERROR, sistrip::HEADER_TYPE_FULL_DEBUG, sistrip::HEADER_TYPE_INVALID, sistrip::HEADER_TYPE_NONE, and headerTypeNibble().
Referenced by sistrip::FEDBufferGenerator::getHeaderType(), and sistrip::FEDBufferBase::headerType().
{ if ( (headerTypeNibble() == HEADER_TYPE_FULL_DEBUG) || (headerTypeNibble() == HEADER_TYPE_APV_ERROR) || (headerTypeNibble() == HEADER_TYPE_NONE) ) return FEDHeaderType(headerTypeNibble()); else return HEADER_TYPE_INVALID; }
uint8_t sistrip::TrackerSpecialHeader::headerTypeNibble | ( | ) | const [inline] |
Definition at line 679 of file SiStripFEDBufferComponents.h.
References BUFFERTYPE, and specialHeader_.
Referenced by sistrip::FEDBuffer::FEDBuffer(), and headerType().
{ return ( (specialHeader_[BUFFERTYPE] & 0xF0) >> 4 ); }
bool sistrip::TrackerSpecialHeader::majorityAddressErrorForFEUnit | ( | const uint8_t | internalFEUnitNum | ) | const [inline] |
Definition at line 691 of file SiStripFEDBufferComponents.h.
References apvAddressErrorRegister(), sistrip::READOUT_MODE_SCOPE, and readoutMode().
Referenced by sistrip::FEDBufferBase::majorityAddressErrorForFEUnit().
{ return ( !(readoutMode() == READOUT_MODE_SCOPE) && !( (0x1<<internalFEUnitNum) & apvAddressErrorRegister() ) ); }
void sistrip::TrackerSpecialHeader::print | ( | std::ostream & | os | ) | const [inline] |
Definition at line 722 of file SiStripFEDBufferComponents.h.
References sistrip::printHex(), and specialHeader_.
Referenced by sistrip::operator<<().
{ printHex(specialHeader_,8,os); }
FEDReadoutMode sistrip::TrackerSpecialHeader::readoutMode | ( | ) | const |
Definition at line 648 of file SiStripFEDBufferComponents.cc.
References alignBH_cfg::mode, sistrip::READOUT_MODE_INVALID, sistrip::READOUT_MODE_PROC_RAW, sistrip::READOUT_MODE_SCOPE, sistrip::READOUT_MODE_SPY, sistrip::READOUT_MODE_VIRGIN_RAW, sistrip::READOUT_MODE_ZERO_SUPPRESSED, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE, and trackerEventTypeNibble().
Referenced by sistrip::FEDBufferGenerator::getReadoutMode(), majorityAddressErrorForFEUnit(), sistrip::FEDBufferBase::readoutMode(), and setDataType().
{ const uint8_t eventTypeNibble = trackerEventTypeNibble(); //if it is scope mode then return as is (it cannot be fake data) if (eventTypeNibble == READOUT_MODE_SCOPE) return FEDReadoutMode(eventTypeNibble); //if not then ignore the last bit which indicates if it is real or fake else { const uint8_t mode = (eventTypeNibble & 0xE); switch(mode) { case READOUT_MODE_VIRGIN_RAW: case READOUT_MODE_PROC_RAW: case READOUT_MODE_ZERO_SUPPRESSED: case READOUT_MODE_ZERO_SUPPRESSED_LITE: case READOUT_MODE_SPY: return FEDReadoutMode(mode); default: return READOUT_MODE_INVALID; } } }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setAPVAddressErrorForFEUnit | ( | const uint8_t | internalFEUnitNum, |
const bool | error | ||
) |
Definition at line 764 of file SiStripFEDBufferComponents.cc.
References apvAddressErrorRegister(), query::result, and setAPVEAddressErrorRegister().
{ const uint8_t mask = 0x1 << internalFEUnitNum; const uint8_t result = ( (apvAddressErrorRegister() & (~mask)) | (error?mask:0x00) ); setAPVEAddressErrorRegister(result); return *this; }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setAPVEAddress | ( | const uint8_t | address | ) | [inline] |
Definition at line 750 of file SiStripFEDBufferComponents.h.
References APVEADDRESS, and specialHeader_.
Referenced by TrackerSpecialHeader().
{ specialHeader_[APVEADDRESS] = address; return *this; }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setAPVEAddressErrorRegister | ( | const uint8_t | addressErrorRegister | ) | [inline] |
Definition at line 756 of file SiStripFEDBufferComponents.h.
References ADDRESSERROR, and specialHeader_.
Referenced by setAPVAddressErrorForFEUnit(), and TrackerSpecialHeader().
{ specialHeader_[ADDRESSERROR] = addressErrorRegister; return *this; }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setBufferFormat | ( | const FEDBufferFormat | newBufferFormat | ) |
Definition at line 678 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_FORMAT_OLD_VME, bufferFormat(), setBufferFormatByte(), and wordSwapped_.
Referenced by sistrip::FEDBufferGenerator::setBufferFormat().
{ //check if order in buffer is different if ( ( (bufferFormat()==BUFFER_FORMAT_OLD_VME) && (newBufferFormat!=BUFFER_FORMAT_OLD_VME) ) || ( (bufferFormat()!=BUFFER_FORMAT_OLD_VME) && (newBufferFormat==BUFFER_FORMAT_OLD_VME) ) ) { wordSwapped_ = !wordSwapped_; } //set appropriate code setBufferFormatByte(newBufferFormat); return *this; }
void sistrip::TrackerSpecialHeader::setBufferFormatByte | ( | const FEDBufferFormat | newBufferFormat | ) | [private] |
Definition at line 690 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_FORMAT_CODE_NEW, sistrip::BUFFER_FORMAT_CODE_OLD, sistrip::BUFFER_FORMAT_NEW, sistrip::BUFFER_FORMAT_OLD_SLINK, sistrip::BUFFER_FORMAT_OLD_VME, BUFFERFORMAT, Exception, sistrip::printHex(), and specialHeader_.
Referenced by setBufferFormat(), and TrackerSpecialHeader().
{ switch (newBufferFormat) { case BUFFER_FORMAT_OLD_VME: case BUFFER_FORMAT_OLD_SLINK: specialHeader_[BUFFERFORMAT] = BUFFER_FORMAT_CODE_OLD; break; case BUFFER_FORMAT_NEW: specialHeader_[BUFFERFORMAT] = BUFFER_FORMAT_CODE_NEW; break; default: std::ostringstream ss; ss << "Invalid buffer format: "; printHex(&newBufferFormat,1,ss); throw cms::Exception("FEDBuffer") << ss.str(); } }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setDataType | ( | const FEDDataType | dataType | ) |
Definition at line 747 of file SiStripFEDBufferComponents.cc.
References sistrip::DATA_TYPE_FAKE, sistrip::DATA_TYPE_REAL, Exception, sistrip::printHex(), sistrip::READOUT_MODE_SCOPE, readoutMode(), and setDataTypeBit().
Referenced by sistrip::FEDBufferGenerator::setFEDDataType(), and TrackerSpecialHeader().
{ //if mode is scope then this bit can't be changed if (readoutMode() == READOUT_MODE_SCOPE) return *this; switch (dataType) { case DATA_TYPE_REAL: case DATA_TYPE_FAKE: setDataTypeBit(dataType); return *this; default: std::ostringstream ss; ss << "Invalid data type: "; printHex(&dataType,1,ss); throw cms::Exception("FEDBuffer") << ss.str(); } }
void sistrip::TrackerSpecialHeader::setDataTypeBit | ( | const bool | value | ) | [inline, private] |
Definition at line 745 of file SiStripFEDBufferComponents.h.
References BUFFERTYPE, and specialHeader_.
Referenced by setDataType(), and setReadoutMode().
{ specialHeader_[BUFFERTYPE] = ( (specialHeader_[BUFFERTYPE] & (~0x01)) | (value ? 0x01 : 0x00) ); }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setFEDStatusRegister | ( | const FEDStatusRegister | fedStatusRegister | ) | [inline] |
Definition at line 774 of file SiStripFEDBufferComponents.h.
References FEDSTATUS, fedStatusRegister(), and specialHeader_.
Referenced by TrackerSpecialHeader().
{ specialHeader_[FEDSTATUS] = (static_cast<uint16_t>(fedStatusRegister) & 0x00FF); specialHeader_[FEDSTATUS+1] = ( (static_cast<uint16_t>(fedStatusRegister) & 0xFF00) >> 8); return *this; }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setFEEnableForFEUnit | ( | const uint8_t | internalFEUnitNum, |
const bool | enabled | ||
) |
Definition at line 772 of file SiStripFEDBufferComponents.cc.
References feEnableRegister(), query::result, and setFEEnableRegister().
Referenced by sistrip::FEDBufferGenerator::generateBuffer().
{ const uint8_t mask = 0x1 << internalFEUnitNum; const uint8_t result = ( (feEnableRegister() & (~mask)) | (enabled?mask:0x00) ); setFEEnableRegister(result); return *this; }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setFEEnableRegister | ( | const uint8_t | feEnableRegister | ) | [inline] |
Definition at line 762 of file SiStripFEDBufferComponents.h.
References FEENABLE, feEnableRegister(), and specialHeader_.
Referenced by setFEEnableForFEUnit(), setFEOverflowForFEUnit(), and TrackerSpecialHeader().
{ specialHeader_[FEENABLE] = feEnableRegister; return *this; }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setFEOverflowForFEUnit | ( | const uint8_t | internalFEUnitNum, |
const bool | overflow | ||
) |
Definition at line 780 of file SiStripFEDBufferComponents.cc.
References feOverflowRegister(), query::result, and setFEEnableRegister().
{ const uint8_t mask = 0x1 << internalFEUnitNum; const uint8_t result = ( (feOverflowRegister() & (~mask)) | (overflow?mask:0x00) ); setFEEnableRegister(result); return *this; }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setFEOverflowRegister | ( | const uint8_t | feOverflowRegister | ) | [inline] |
Definition at line 768 of file SiStripFEDBufferComponents.h.
References FEOVERFLOW, feOverflowRegister(), and specialHeader_.
Referenced by TrackerSpecialHeader().
{ specialHeader_[FEOVERFLOW] = feOverflowRegister; return *this; }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setHeaderType | ( | const FEDHeaderType | headerType | ) |
Definition at line 708 of file SiStripFEDBufferComponents.cc.
References Exception, sistrip::HEADER_TYPE_APV_ERROR, sistrip::HEADER_TYPE_FULL_DEBUG, sistrip::HEADER_TYPE_NONE, sistrip::printHex(), and setHeaderTypeNibble().
Referenced by sistrip::FEDBufferGenerator::setHeaderType(), and TrackerSpecialHeader().
{ switch(headerType) { case HEADER_TYPE_FULL_DEBUG: case HEADER_TYPE_APV_ERROR: case HEADER_TYPE_NONE: setHeaderTypeNibble(headerType); return *this; default: std::ostringstream ss; ss << "Invalid header type: "; printHex(&headerType,1,ss); throw cms::Exception("FEDBuffer") << ss.str(); } }
void sistrip::TrackerSpecialHeader::setHeaderTypeNibble | ( | const uint8_t | value | ) | [inline, private] |
Definition at line 735 of file SiStripFEDBufferComponents.h.
References BUFFERTYPE, and specialHeader_.
Referenced by setHeaderType().
{ specialHeader_[BUFFERTYPE] = ( (specialHeader_[BUFFERTYPE] & 0x0F) | ((value<<4) & 0xF0) ); }
TrackerSpecialHeader & sistrip::TrackerSpecialHeader::setReadoutMode | ( | const FEDReadoutMode | readoutMode | ) |
Definition at line 724 of file SiStripFEDBufferComponents.cc.
References Exception, sistrip::printHex(), sistrip::READOUT_MODE_PROC_RAW, sistrip::READOUT_MODE_SCOPE, sistrip::READOUT_MODE_SPY, sistrip::READOUT_MODE_VIRGIN_RAW, sistrip::READOUT_MODE_ZERO_SUPPRESSED, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE, setDataTypeBit(), and setReadoutModeBits().
Referenced by sistrip::FEDBufferGenerator::setReadoutMode(), and TrackerSpecialHeader().
{ switch(readoutMode) { case READOUT_MODE_SCOPE: //scope mode is always real setReadoutModeBits(readoutMode); setDataTypeBit(true); case READOUT_MODE_VIRGIN_RAW: case READOUT_MODE_PROC_RAW: case READOUT_MODE_ZERO_SUPPRESSED: case READOUT_MODE_ZERO_SUPPRESSED_LITE: case READOUT_MODE_SPY: setReadoutModeBits(readoutMode); break; default: std::ostringstream ss; ss << "Invalid readout mode: "; printHex(&readoutMode,1,ss); throw cms::Exception("FEDBuffer") << ss.str(); } return *this; }
void sistrip::TrackerSpecialHeader::setReadoutModeBits | ( | const uint8_t | value | ) | [inline, private] |
Definition at line 740 of file SiStripFEDBufferComponents.h.
References BUFFERTYPE, and specialHeader_.
Referenced by setReadoutMode().
{ specialHeader_[BUFFERTYPE] = ( (specialHeader_[BUFFERTYPE] & (~0x0E)) | (value & 0x0E) ); }
uint8_t sistrip::TrackerSpecialHeader::trackerEventTypeNibble | ( | ) | const [inline] |
Definition at line 682 of file SiStripFEDBufferComponents.h.
References BUFFERTYPE, and specialHeader_.
Referenced by dataType(), and readoutMode().
{ return (specialHeader_[BUFFERTYPE] & 0x0F); }
bool sistrip::TrackerSpecialHeader::wasSwapped | ( | ) | const [inline] |
Definition at line 730 of file SiStripFEDBufferComponents.h.
References wordSwapped_.
Referenced by sistrip::FEDBufferGenerator::fillBuffer().
{ return wordSwapped_; }
uint8_t sistrip::TrackerSpecialHeader::specialHeader_[8] [private] |
Definition at line 308 of file SiStripFEDBufferComponents.h.
Referenced by apvAddressErrorRegister(), apveAddress(), bufferFormatByte(), data(), fedStatusRegisterWord(), feEnableRegister(), feOverflowRegister(), headerTypeNibble(), print(), setAPVEAddress(), setAPVEAddressErrorRegister(), setBufferFormatByte(), setDataTypeBit(), setFEDStatusRegister(), setFEEnableRegister(), setFEOverflowRegister(), setHeaderTypeNibble(), setReadoutModeBits(), trackerEventTypeNibble(), and TrackerSpecialHeader().
bool sistrip::TrackerSpecialHeader::wordSwapped_ [private] |
Definition at line 310 of file SiStripFEDBufferComponents.h.
Referenced by bufferFormat(), setBufferFormat(), TrackerSpecialHeader(), and wasSwapped().