#include <SiStripFEDBufferComponents.h>
Public Member Functions | |
uint8_t | boeNibble () const |
uint16_t | bxID () const |
const uint8_t * | data () const |
FEDDAQEventType | eventType () const |
uint8_t | eventTypeNibble () const |
FEDDAQHeader (const uint8_t *header) | |
FEDDAQHeader (const uint32_t l1ID, const uint16_t bxID, const uint16_t sourceID, const FEDDAQEventType evtType=DAQ_EVENT_TYPE_PHYSICS) | |
FEDDAQHeader () | |
bool | hBit () const |
uint32_t | l1ID () const |
bool | lastHeader () const |
void | print (std::ostream &os) const |
FEDDAQHeader & | setBXID (const uint16_t bxID) |
FEDDAQHeader & | setEventType (const FEDDAQEventType evtType) |
FEDDAQHeader & | setL1ID (const uint32_t l1ID) |
FEDDAQHeader & | setSourceID (const uint16_t sourceID) |
uint16_t | sourceID () const |
uint8_t | version () const |
Private Attributes | |
uint8_t | header_ [8] |
Definition at line 146 of file SiStripFEDBufferComponents.h.
sistrip::FEDDAQHeader::FEDDAQHeader | ( | ) | [inline] |
Definition at line 149 of file SiStripFEDBufferComponents.h.
{ }
sistrip::FEDDAQHeader::FEDDAQHeader | ( | const uint8_t * | header | ) | [inline, explicit] |
Definition at line 1215 of file SiStripFEDBufferComponents.h.
References header_.
sistrip::FEDDAQHeader::FEDDAQHeader | ( | const uint32_t | l1ID, |
const uint16_t | bxID, | ||
const uint16_t | sourceID, | ||
const FEDDAQEventType | evtType = DAQ_EVENT_TYPE_PHYSICS |
||
) |
Definition at line 856 of file SiStripFEDBufferComponents.cc.
References header_, setBXID(), setEventType(), setL1ID(), and setSourceID().
{ //clear everything (FOV,H,x,$ all set to 0) memset(header_,0x0,8); //set the BoE nibble to indicate this is the last fragment header_[7] = 0x50; //set variable fields vith values supplied setEventType(evtType); setL1ID(l1ID); setBXID(bxID); setSourceID(sourceID); }
uint8_t sistrip::FEDDAQHeader::boeNibble | ( | ) | const [inline] |
Definition at line 1220 of file SiStripFEDBufferComponents.h.
References header_.
Referenced by sistrip::FEDBufferBase::checkNoExtraHeadersOrTrailers().
{ return ( (header_[7] & 0xF0) >> 4 ); }
uint16_t sistrip::FEDDAQHeader::bxID | ( | ) | const [inline] |
Definition at line 1235 of file SiStripFEDBufferComponents.h.
References header_.
Referenced by sistrip::FEDBufferBase::daqBXID(), and sistrip::FEDBufferGenerator::getBXID().
const uint8_t * sistrip::FEDDAQHeader::data | ( | ) | const [inline] |
Definition at line 1260 of file SiStripFEDBufferComponents.h.
References header_.
Referenced by sistrip::FEDBufferGenerator::fillBuffer().
{ return header_; }
FEDDAQEventType sistrip::FEDDAQHeader::eventType | ( | ) | const |
Definition at line 812 of file SiStripFEDBufferComponents.cc.
References sistrip::DAQ_EVENT_TYPE_CALIBRATION, sistrip::DAQ_EVENT_TYPE_ERROR, sistrip::DAQ_EVENT_TYPE_INVALID, sistrip::DAQ_EVENT_TYPE_PHYSICS, sistrip::DAQ_EVENT_TYPE_SIMULATED, sistrip::DAQ_EVENT_TYPE_TECHNICAL, sistrip::DAQ_EVENT_TYPE_TEST, sistrip::DAQ_EVENT_TYPE_TRACED, and eventTypeNibble().
Referenced by sistrip::FEDBufferBase::daqEventType(), and sistrip::FEDBufferGenerator::getDAQEventType().
{ switch(eventTypeNibble()) { case DAQ_EVENT_TYPE_PHYSICS: case DAQ_EVENT_TYPE_CALIBRATION: case DAQ_EVENT_TYPE_TEST: case DAQ_EVENT_TYPE_TECHNICAL: case DAQ_EVENT_TYPE_SIMULATED: case DAQ_EVENT_TYPE_TRACED: case DAQ_EVENT_TYPE_ERROR: return FEDDAQEventType(eventTypeNibble()); default: return DAQ_EVENT_TYPE_INVALID; } }
uint8_t sistrip::FEDDAQHeader::eventTypeNibble | ( | ) | const [inline] |
Definition at line 1225 of file SiStripFEDBufferComponents.h.
References header_.
Referenced by eventType().
{ return (header_[7] & 0x0F); }
bool sistrip::FEDDAQHeader::hBit | ( | ) | const [inline] |
Definition at line 1250 of file SiStripFEDBufferComponents.h.
References header_.
Referenced by lastHeader().
{ return (header_[0] & 0x8); }
uint32_t sistrip::FEDDAQHeader::l1ID | ( | ) | const [inline] |
Definition at line 1230 of file SiStripFEDBufferComponents.h.
References header_.
Referenced by sistrip::FEDBufferBase::daqLvl1ID(), and sistrip::FEDBufferGenerator::getL1ID().
bool sistrip::FEDDAQHeader::lastHeader | ( | ) | const [inline] |
Definition at line 1255 of file SiStripFEDBufferComponents.h.
References hBit().
{ return !hBit(); }
void sistrip::FEDDAQHeader::print | ( | std::ostream & | os | ) | const [inline] |
Definition at line 1265 of file SiStripFEDBufferComponents.h.
References header_, and sistrip::printHex().
Referenced by sistrip::operator<<().
FEDDAQHeader & sistrip::FEDDAQHeader::setBXID | ( | const uint16_t | bxID | ) |
Definition at line 842 of file SiStripFEDBufferComponents.cc.
References header_.
Referenced by FEDDAQHeader(), and sistrip::FEDBufferGenerator::setBXID().
FEDDAQHeader & sistrip::FEDDAQHeader::setEventType | ( | const FEDDAQEventType | evtType | ) |
Definition at line 828 of file SiStripFEDBufferComponents.cc.
References header_.
Referenced by FEDDAQHeader(), and sistrip::FEDBufferGenerator::setDAQEventType().
FEDDAQHeader & sistrip::FEDDAQHeader::setL1ID | ( | const uint32_t | l1ID | ) |
Definition at line 834 of file SiStripFEDBufferComponents.cc.
References header_.
Referenced by FEDDAQHeader(), and sistrip::FEDBufferGenerator::setL1ID().
FEDDAQHeader & sistrip::FEDDAQHeader::setSourceID | ( | const uint16_t | sourceID | ) |
Definition at line 849 of file SiStripFEDBufferComponents.cc.
References header_.
Referenced by FEDDAQHeader(), and sistrip::FEDBufferGenerator::generateBuffer().
uint16_t sistrip::FEDDAQHeader::sourceID | ( | ) | const [inline] |
Definition at line 1240 of file SiStripFEDBufferComponents.h.
References header_.
Referenced by sistrip::FEDBufferBase::daqSourceID().
uint8_t sistrip::FEDDAQHeader::version | ( | ) | const [inline] |
Definition at line 1245 of file SiStripFEDBufferComponents.h.
References header_.
{ return ( (header_[0] & 0xF0) >> 4 ); }
uint8_t sistrip::FEDDAQHeader::header_[8] [private] |
Definition at line 172 of file SiStripFEDBufferComponents.h.
Referenced by boeNibble(), bxID(), data(), eventTypeNibble(), FEDDAQHeader(), hBit(), l1ID(), print(), setBXID(), setEventType(), setL1ID(), setSourceID(), sourceID(), and version().