CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
sistrip::FEDBufferBase Class Reference

#include <SiStripFEDBufferComponents.h>

Inheritance diagram for sistrip::FEDBufferBase:
sistrip::FEDBuffer sistrip::FEDSpyBuffer

Public Member Functions

uint8_t apveAddress () const
 
FEDBufferFormat bufferFormat () const
 
size_t bufferSize () const
 
uint16_t calcCRC () const
 
const FEDChannelchannel (const uint8_t internalFEDChannelNum) const
 
const FEDChannelchannel (const uint8_t internalFEUnitNum, const uint8_t internalChannelNum) const
 
virtual bool channelGood (const uint8_t internalFEDChannelNum) const
 
bool channelGood (const uint8_t internalFEUnitNum, const uint8_t internalChannelNum) const
 
bool checkAPVEAddressValid () const
 
bool checkBufferFormat () const
 
bool checkCRC () const
 
bool checkHeaderType () const
 
bool checkLengthFromTrailer () const
 
bool checkMajorityAddresses () const
 
bool checkNoExtraHeadersOrTrailers () const
 
bool checkNoFEOverflows () const
 
bool checkNoSlinkCRCError () const
 
bool checkNoSLinkTransmissionError () const
 
bool checkNoUnexpectedSourceID () const
 
bool checkReadoutMode () const
 
bool checkSourceIDs () const
 
virtual std::string checkSummary () const
 
uint16_t daqBXID () const
 
uint16_t daqCRC () const
 
uint32_t daqEventLengthIn64bitWords () const
 
uint32_t daqEventLengthInBytes () const
 
FEDDAQEventType daqEventType () const
 
FEDDAQHeader daqHeader () const
 
uint32_t daqLvl1ID () const
 
uint16_t daqSourceID () const
 
FEDDAQTrailer daqTrailer () const
 
FEDTTSBits daqTTSState () const
 
virtual bool doChecks () const
 
bool doDAQHeaderAndTrailerChecks () const
 
bool doTrackerSpecialHeaderChecks () const
 
void dump (std::ostream &os) const
 
void dumpOriginalBuffer (std::ostream &os) const
 
 FEDBufferBase (const FEDRawData &fedBuffer)
 
FEDStatusRegister fedStatusRegister () const
 
bool feEnabled (const uint8_t internalFEUnitNum) const
 
bool feOverflow (const uint8_t internalFEUnitNum) const
 
FEDHeaderType headerType () const
 
FEDLegacyReadoutMode legacyReadoutMode () const
 
bool majorityAddressErrorForFEUnit (const uint8_t internalFEUnitNum) const
 
uint8_t nFEUnitsEnabled () const
 
uint8_t packetCode (bool legacy=false, const uint8_t internalFEDChannelNum=0) const
 
virtual void print (std::ostream &os) const
 
FEDReadoutMode readoutMode () const
 
uint16_t sourceID () const
 
TrackerSpecialHeader trackerSpecialHeader () const
 
virtual ~FEDBufferBase ()
 

Protected Member Functions

 FEDBufferBase (const FEDRawData &fedBuffer, const bool fillChannelVector)
 
const uint8_t * getPointerToByteAfterEndOfPayload () const
 
const uint8_t * getPointerToDataAfterTrackerSpecialHeader () const
 

Protected Attributes

std::vector< FEDChannelchannels_
 

Private Member Functions

void init ()
 

Private Attributes

const size_t bufferSize_
 
FEDDAQHeader daqHeader_
 
FEDDAQTrailer daqTrailer_
 
const uint8_t * orderedBuffer_
 
const uint8_t * originalBuffer_
 
TrackerSpecialHeader specialHeader_
 

Detailed Description

Definition at line 643 of file SiStripFEDBufferComponents.h.

Constructor & Destructor Documentation

◆ FEDBufferBase() [1/2]

sistrip::FEDBufferBase::FEDBufferBase ( const FEDRawData fedBuffer)
explicit

constructor from a FEDRawData buffer

The sistrip::preconstructCheckFEDBufferBase() method should be used to check the validity of the fedBuffer before constructing a sistrip::FEDBufferBase.

See also
sistrip::preconstructCheckFEDBufferBase()

Definition at line 1248 of file SiStripFEDBufferComponents.cc.

1249  : channels_(FEDCH_PER_FED, FEDChannel(nullptr, 0, 0)),
1250  originalBuffer_(fedBuffer.data()),
1251  bufferSize_(fedBuffer.size()) {
1252  init();
1253  }

References init().

◆ ~FEDBufferBase()

sistrip::FEDBufferBase::~FEDBufferBase ( )
virtual

Definition at line 1304 of file SiStripFEDBufferComponents.cc.

1304  {
1305  //if the buffer was coppied and swapped then delete the copy
1307  delete[] orderedBuffer_;
1308  }

References orderedBuffer_, and originalBuffer_.

◆ FEDBufferBase() [2/2]

sistrip::FEDBufferBase::FEDBufferBase ( const FEDRawData fedBuffer,
const bool  fillChannelVector 
)
protected

Definition at line 1255 of file SiStripFEDBufferComponents.cc.

1256  : originalBuffer_(fedBuffer.data()), bufferSize_(fedBuffer.size()) {
1257  init();
1258  if (fillChannelVector)
1259  channels_.assign(FEDCH_PER_FED, FEDChannel(nullptr, 0, 0));
1260  }

References channels_, sistrip::FEDCH_PER_FED, and init().

Member Function Documentation

◆ apveAddress()

uint8_t sistrip::FEDBufferBase::apveAddress ( ) const
inline

◆ bufferFormat()

FEDBufferFormat sistrip::FEDBufferBase::bufferFormat ( ) const
inline

◆ bufferSize()

size_t sistrip::FEDBufferBase::bufferSize ( ) const
inline

Definition at line 1405 of file SiStripFEDBufferComponents.h.

1405 { return bufferSize_; }

References bufferSize_.

Referenced by checkLengthFromTrailer(), sistrip::FEDSpyBuffer::findChannels(), and print().

◆ calcCRC()

uint16_t sistrip::FEDBufferBase::calcCRC ( ) const
inline

◆ channel() [1/2]

const FEDChannel & sistrip::FEDBufferBase::channel ( const uint8_t  internalFEDChannelNum) const
inline

Definition at line 1504 of file SiStripFEDBufferComponents.h.

1504  {
1506  }

References channels_, and sistrip::internalFEDChannelNum().

Referenced by channel(), and packetCode().

◆ channel() [2/2]

const FEDChannel & sistrip::FEDBufferBase::channel ( const uint8_t  internalFEUnitNum,
const uint8_t  internalChannelNum 
) const
inline

Definition at line 1508 of file SiStripFEDBufferComponents.h.

1509  {
1510  return channel(internalFEDChannelNum(internalFEUnitNum, internalChannelNum));
1511  }

References channel(), and sistrip::internalFEDChannelNum().

◆ channelGood() [1/2]

bool sistrip::FEDBufferBase::channelGood ( const uint8_t  internalFEDChannelNum) const
virtual

Reimplemented in sistrip::FEDSpyBuffer.

Definition at line 1351 of file SiStripFEDBufferComponents.cc.

1351  {
1352  const uint8_t feUnit = internalFEDChannelNum / FEDCH_PER_FEUNIT;
1353  return (!majorityAddressErrorForFEUnit(feUnit) && feEnabled(feUnit) && !feOverflow(feUnit));
1354  }

References sistrip::FEDCH_PER_FEUNIT, feEnabled(), feOverflow(), sistrip::internalFEDChannelNum(), and majorityAddressErrorForFEUnit().

Referenced by channelGood().

◆ channelGood() [2/2]

bool sistrip::FEDBufferBase::channelGood ( const uint8_t  internalFEUnitNum,
const uint8_t  internalChannelNum 
) const
inline

Definition at line 1500 of file SiStripFEDBufferComponents.h.

1500  {
1501  return channelGood(internalFEDChannelNum(internalFEUnitNum, internalChannelNum));
1502  }

References channelGood(), and sistrip::internalFEDChannelNum().

◆ checkAPVEAddressValid()

bool sistrip::FEDBufferBase::checkAPVEAddressValid ( ) const
inline

Definition at line 1532 of file SiStripFEDBufferComponents.h.

1532 { return (apveAddress() <= APV_MAX_ADDRESS); }

References sistrip::APV_MAX_ADDRESS, and apveAddress().

◆ checkBufferFormat()

bool sistrip::FEDBufferBase::checkBufferFormat ( ) const
inline

◆ checkCRC()

bool sistrip::FEDBufferBase::checkCRC ( ) const
inline

◆ checkHeaderType()

bool sistrip::FEDBufferBase::checkHeaderType ( ) const
inline

Definition at line 1528 of file SiStripFEDBufferComponents.h.

1528 { return (headerType() != HEADER_TYPE_INVALID); }

References sistrip::HEADER_TYPE_INVALID, and headerType().

Referenced by checkSummary(), and doTrackerSpecialHeaderChecks().

◆ checkLengthFromTrailer()

bool sistrip::FEDBufferBase::checkLengthFromTrailer ( ) const
inline

Definition at line 1546 of file SiStripFEDBufferComponents.h.

1546 { return (bufferSize() == daqEventLengthInBytes()); }

References bufferSize(), and daqEventLengthInBytes().

Referenced by checkSummary(), and doDAQHeaderAndTrailerChecks().

◆ checkMajorityAddresses()

bool sistrip::FEDBufferBase::checkMajorityAddresses ( ) const

Definition at line 1341 of file SiStripFEDBufferComponents.cc.

1341  {
1342  for (uint8_t iFE = 0; iFE < FEUNITS_PER_FED; iFE++) {
1343  if (!feEnabled(iFE))
1344  continue;
1346  return false;
1347  }
1348  return true;
1349  }

References feEnabled(), sistrip::FEUNITS_PER_FED, and majorityAddressErrorForFEUnit().

Referenced by checkSummary().

◆ checkNoExtraHeadersOrTrailers()

bool sistrip::FEDBufferBase::checkNoExtraHeadersOrTrailers ( ) const
inline

Definition at line 1542 of file SiStripFEDBufferComponents.h.

1542  {
1543  return ((daqHeader_.boeNibble() == 0x5) && (daqTrailer_.eoeNibble() == 0xA));
1544  }

References sistrip::FEDDAQHeader::boeNibble(), daqHeader_, daqTrailer_, and sistrip::FEDDAQTrailer::eoeNibble().

Referenced by checkSummary(), and doDAQHeaderAndTrailerChecks().

◆ checkNoFEOverflows()

bool sistrip::FEDBufferBase::checkNoFEOverflows ( ) const
inline

◆ checkNoSlinkCRCError()

bool sistrip::FEDBufferBase::checkNoSlinkCRCError ( ) const
inline

Definition at line 1536 of file SiStripFEDBufferComponents.h.

1536 { return !daqTrailer_.slinkCRCError(); }

References daqTrailer_, and sistrip::FEDDAQTrailer::slinkCRCError().

Referenced by checkCRC(), and checkSummary().

◆ checkNoSLinkTransmissionError()

bool sistrip::FEDBufferBase::checkNoSLinkTransmissionError ( ) const
inline

◆ checkNoUnexpectedSourceID()

bool sistrip::FEDBufferBase::checkNoUnexpectedSourceID ( ) const
inline

◆ checkReadoutMode()

bool sistrip::FEDBufferBase::checkReadoutMode ( ) const
inline

◆ checkSourceIDs()

bool sistrip::FEDBufferBase::checkSourceIDs ( ) const

Definition at line 1337 of file SiStripFEDBufferComponents.cc.

1337  {
1338  return ((daqSourceID() >= FED_ID_MIN) && (daqSourceID() <= FED_ID_MAX));
1339  }

References daqSourceID(), sistrip::FED_ID_MAX, and sistrip::FED_ID_MIN.

Referenced by checkSummary(), and doDAQHeaderAndTrailerChecks().

◆ checkSummary()

std::string sistrip::FEDBufferBase::checkSummary ( ) const
virtual

Reimplemented in sistrip::FEDBuffer.

Definition at line 1358 of file SiStripFEDBufferComponents.cc.

1358  {
1359  std::ostringstream summary;
1360  summary << "Check buffer type valid: " << (checkBufferFormat() ? "passed" : "FAILED") << std::endl;
1361  summary << "Check header format valid: " << (checkHeaderType() ? "passed" : "FAILED") << std::endl;
1362  summary << "Check readout mode valid: " << (checkReadoutMode() ? "passed" : "FAILED") << std::endl;
1363  //summary << "Check APVe address valid: " << ( checkAPVEAddressValid() ? "passed" : "FAILED" ) << std::endl;
1364  summary << "Check FE unit majority addresses: " << (checkMajorityAddresses() ? "passed" : "FAILED") << std::endl;
1365  if (!checkMajorityAddresses()) {
1366  summary << "FEs with majority address error: ";
1367  unsigned int badFEs = 0;
1368  for (uint8_t iFE = 0; iFE < FEUNITS_PER_FED; iFE++) {
1369  if (!feEnabled(iFE))
1370  continue;
1371  if (majorityAddressErrorForFEUnit(iFE)) {
1372  summary << uint16_t(iFE) << " ";
1373  badFEs++;
1374  }
1375  }
1376  summary << std::endl;
1377  summary << "Number of FE Units with bad addresses: " << badFEs << std::endl;
1378  }
1379  summary << "Check for FE unit buffer overflows: " << (checkNoFEOverflows() ? "passed" : "FAILED") << std::endl;
1380  if (!checkNoFEOverflows()) {
1381  summary << "FEs which overflowed: ";
1382  unsigned int badFEs = 0;
1383  for (uint8_t iFE = 0; iFE < FEUNITS_PER_FED; iFE++) {
1384  if (feOverflow(iFE)) {
1385  summary << uint16_t(iFE) << " ";
1386  badFEs++;
1387  }
1388  }
1389  summary << std::endl;
1390  summary << "Number of FE Units which overflowed: " << badFEs << std::endl;
1391  }
1392  summary << "Check for S-Link CRC errors: " << (checkNoSlinkCRCError() ? "passed" : "FAILED") << std::endl;
1393  summary << "Check for S-Link transmission error: " << (checkNoSLinkTransmissionError() ? "passed" : "FAILED")
1394  << std::endl;
1395  summary << "Check CRC: " << (checkCRC() ? "passed" : "FAILED") << std::endl;
1396  summary << "Check source ID is FED ID: " << (checkSourceIDs() ? "passed" : "FAILED") << std::endl;
1397  summary << "Check for unexpected source ID at FRL: " << (checkNoUnexpectedSourceID() ? "passed" : "FAILED")
1398  << std::endl;
1399  summary << "Check there are no extra headers or trailers: "
1400  << (checkNoExtraHeadersOrTrailers() ? "passed" : "FAILED") << std::endl;
1401  summary << "Check length from trailer: " << (checkLengthFromTrailer() ? "passed" : "FAILED") << std::endl;
1402  return summary.str();
1403  }

References checkBufferFormat(), checkCRC(), checkHeaderType(), checkLengthFromTrailer(), checkMajorityAddresses(), checkNoExtraHeadersOrTrailers(), checkNoFEOverflows(), checkNoSlinkCRCError(), checkNoSLinkTransmissionError(), checkNoUnexpectedSourceID(), checkReadoutMode(), checkSourceIDs(), feEnabled(), feOverflow(), sistrip::FEUNITS_PER_FED, majorityAddressErrorForFEUnit(), and edmLumisInFiles::summary.

Referenced by sistrip::FEDBuffer::checkSummary().

◆ daqBXID()

uint16_t sistrip::FEDBufferBase::daqBXID ( ) const
inline

Definition at line 1413 of file SiStripFEDBufferComponents.h.

1413 { return daqHeader_.bxID(); }

References sistrip::FEDDAQHeader::bxID(), and daqHeader_.

Referenced by print().

◆ daqCRC()

uint16_t sistrip::FEDBufferBase::daqCRC ( ) const
inline

Definition at line 1421 of file SiStripFEDBufferComponents.h.

1421 { return daqTrailer_.crc(); }

References sistrip::FEDDAQTrailer::crc(), and daqTrailer_.

Referenced by checkCRC().

◆ daqEventLengthIn64bitWords()

uint32_t sistrip::FEDBufferBase::daqEventLengthIn64bitWords ( ) const
inline

◆ daqEventLengthInBytes()

uint32_t sistrip::FEDBufferBase::daqEventLengthInBytes ( ) const
inline

◆ daqEventType()

FEDDAQEventType sistrip::FEDBufferBase::daqEventType ( ) const
inline

◆ daqHeader()

FEDDAQHeader sistrip::FEDBufferBase::daqHeader ( ) const
inline

Definition at line 1401 of file SiStripFEDBufferComponents.h.

1401 { return daqHeader_; }

References daqHeader_.

Referenced by sistrip::RawToDigiUnpacker::updateEventSummary().

◆ daqLvl1ID()

uint32_t sistrip::FEDBufferBase::daqLvl1ID ( ) const
inline

Definition at line 1411 of file SiStripFEDBufferComponents.h.

1411 { return daqHeader_.l1ID(); }

References daqHeader_, and sistrip::FEDDAQHeader::l1ID().

Referenced by print().

◆ daqSourceID()

uint16_t sistrip::FEDBufferBase::daqSourceID ( ) const
inline

Definition at line 1415 of file SiStripFEDBufferComponents.h.

1415 { return daqHeader_.sourceID(); }

References daqHeader_, and sistrip::FEDDAQHeader::sourceID().

Referenced by checkSourceIDs(), and print().

◆ daqTrailer()

FEDDAQTrailer sistrip::FEDBufferBase::daqTrailer ( ) const
inline

Definition at line 1403 of file SiStripFEDBufferComponents.h.

1403 { return daqTrailer_; }

References daqTrailer_.

◆ daqTTSState()

FEDTTSBits sistrip::FEDBufferBase::daqTTSState ( ) const
inline

Definition at line 1423 of file SiStripFEDBufferComponents.h.

1423 { return daqTrailer_.ttsBits(); }

References daqTrailer_, and sistrip::FEDDAQTrailer::ttsBits().

Referenced by print().

◆ doChecks()

bool sistrip::FEDBufferBase::doChecks ( ) const
virtual

◆ doDAQHeaderAndTrailerChecks()

bool sistrip::FEDBufferBase::doDAQHeaderAndTrailerChecks ( ) const
inline

◆ doTrackerSpecialHeaderChecks()

bool sistrip::FEDBufferBase::doTrackerSpecialHeaderChecks ( ) const
inline

Definition at line 1513 of file SiStripFEDBufferComponents.h.

1513  {
1514  return (checkBufferFormat() && checkHeaderType() && checkReadoutMode() &&
1515  //checkAPVEAddressValid() &&
1516  checkNoFEOverflows());
1517  }

References checkBufferFormat(), checkHeaderType(), checkNoFEOverflows(), and checkReadoutMode().

Referenced by doChecks().

◆ dump()

void sistrip::FEDBufferBase::dump ( std::ostream &  os) const
inline

◆ dumpOriginalBuffer()

void sistrip::FEDBufferBase::dumpOriginalBuffer ( std::ostream &  os) const
inline

◆ fedStatusRegister()

FEDStatusRegister sistrip::FEDBufferBase::fedStatusRegister ( ) const
inline

◆ feEnabled()

bool sistrip::FEDBufferBase::feEnabled ( const uint8_t  internalFEUnitNum) const
inline

◆ feOverflow()

bool sistrip::FEDBufferBase::feOverflow ( const uint8_t  internalFEUnitNum) const
inline

◆ getPointerToByteAfterEndOfPayload()

const uint8_t * sistrip::FEDBufferBase::getPointerToByteAfterEndOfPayload ( ) const
inlineprotected

Definition at line 1550 of file SiStripFEDBufferComponents.h.

1550  {
1551  return orderedBuffer_ + bufferSize_ - 8;
1552  }

References bufferSize_, and orderedBuffer_.

Referenced by sistrip::FEDBuffer::FEDBuffer().

◆ getPointerToDataAfterTrackerSpecialHeader()

const uint8_t * sistrip::FEDBufferBase::getPointerToDataAfterTrackerSpecialHeader ( ) const
inlineprotected

Definition at line 1548 of file SiStripFEDBufferComponents.h.

1548 { return orderedBuffer_ + 16; }

References orderedBuffer_.

Referenced by sistrip::FEDBuffer::FEDBuffer(), and sistrip::FEDSpyBuffer::globalRunNumber().

◆ headerType()

FEDHeaderType sistrip::FEDBufferBase::headerType ( ) const
inline

◆ init()

void sistrip::FEDBufferBase::init ( void  )
private

Definition at line 1262 of file SiStripFEDBufferComponents.cc.

1262  {
1263  //construct tracker special header using second 64 bit word
1264  specialHeader_ = TrackerSpecialHeader(originalBuffer_ + 8);
1265 
1266  //check the buffer format
1268  //swap the buffer words so that the whole buffer is in slink ordering
1270  uint8_t* newBuffer = new uint8_t[bufferSize_];
1271  const uint32_t* originalU32 = reinterpret_cast<const uint32_t*>(originalBuffer_);
1272  const size_t sizeU32 = bufferSize_ / 4;
1273  uint32_t* newU32 = reinterpret_cast<uint32_t*>(newBuffer);
1275  //swap whole buffer
1276  for (size_t i = 0; i < sizeU32; i += 2) {
1277  newU32[i] = originalU32[i + 1];
1278  newU32[i + 1] = originalU32[i];
1279  }
1280  }
1282  //copy DAQ header
1283  memcpy(newU32, originalU32, 8);
1284  //copy DAQ trailer
1285  memcpy(newU32 + sizeU32 - 2, originalU32 + sizeU32 - 2, 8);
1286  //swap the payload
1287  for (size_t i = 2; i < sizeU32 - 2; i += 2) {
1288  newU32[i] = originalU32[i + 1];
1289  newU32[i + 1] = originalU32[i];
1290  }
1291  }
1292  orderedBuffer_ = newBuffer;
1293  } //if ( (bufferFormat == BUFFER_FORMAT_OLD_VME) || (bufferFormat == BUFFER_FORMAT_NEW) )
1294  else {
1296  }
1297 
1298  //construct header object at begining of buffer
1299  daqHeader_ = FEDDAQHeader(orderedBuffer_);
1300  //construct trailer object using last 64 bit word of buffer
1301  daqTrailer_ = FEDDAQTrailer(orderedBuffer_ + bufferSize_ - 8);
1302  }

References sistrip::BUFFER_FORMAT_NEW, sistrip::BUFFER_FORMAT_OLD_VME, sistrip::TrackerSpecialHeader::bufferFormat(), bufferFormat(), bufferSize_, daqHeader_, daqTrailer_, mps_fire::i, orderedBuffer_, originalBuffer_, and specialHeader_.

Referenced by FEDBufferBase().

◆ legacyReadoutMode()

FEDLegacyReadoutMode sistrip::FEDBufferBase::legacyReadoutMode ( ) const
inline

◆ majorityAddressErrorForFEUnit()

bool sistrip::FEDBufferBase::majorityAddressErrorForFEUnit ( const uint8_t  internalFEUnitNum) const
inline

◆ nFEUnitsEnabled()

uint8_t sistrip::FEDBufferBase::nFEUnitsEnabled ( ) const

Definition at line 1328 of file SiStripFEDBufferComponents.cc.

1328  {
1329  uint8_t result = 0;
1330  for (uint8_t iFE = 0; iFE < FEUNITS_PER_FED; iFE++) {
1331  if (feEnabled(iFE))
1332  result++;
1333  }
1334  return result;
1335  }

References feEnabled(), sistrip::FEUNITS_PER_FED, and mps_fire::result.

Referenced by print().

◆ packetCode()

uint8_t sistrip::FEDBufferBase::packetCode ( bool  legacy = false,
const uint8_t  internalFEDChannelNum = 0 
) const
inline

Definition at line 1433 of file SiStripFEDBufferComponents.h.

1433  {
1434  if (legacy) {
1436  switch (mode) {
1438  return PACKET_CODE_SCOPE;
1441  return PACKET_CODE_VIRGIN_RAW;
1444  return PACKET_CODE_PROC_RAW;
1453  default:
1454  return 0;
1455  }
1456  } else {
1458  switch (mode) {
1459  case READOUT_MODE_SCOPE:
1460  return PACKET_CODE_SCOPE;
1463  case READOUT_MODE_PROC_RAW:
1464  return PACKET_CODE_PROC_RAW;
1476  case READOUT_MODE_SPY:
1477  case READOUT_MODE_INVALID:
1478  default:
1479  return 0;
1480  }
1481  }
1482  }

References channel(), sistrip::internalFEDChannelNum(), legacyReadoutMode(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, sistrip::PACKET_CODE_PROC_RAW, sistrip::PACKET_CODE_SCOPE, sistrip::PACKET_CODE_VIRGIN_RAW, sistrip::PACKET_CODE_ZERO_SUPPRESSED, sistrip::FEDChannel::packetCode(), sistrip::READOUT_MODE_INVALID, sistrip::READOUT_MODE_LEGACY_INVALID, sistrip::READOUT_MODE_LEGACY_PREMIX_RAW, sistrip::READOUT_MODE_LEGACY_PROC_RAW_FAKE, sistrip::READOUT_MODE_LEGACY_PROC_RAW_REAL, sistrip::READOUT_MODE_LEGACY_SCOPE, sistrip::READOUT_MODE_LEGACY_SPY, sistrip::READOUT_MODE_LEGACY_VIRGIN_RAW_FAKE, sistrip::READOUT_MODE_LEGACY_VIRGIN_RAW_REAL, sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_FAKE, sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_LITE_FAKE, sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_LITE_REAL, sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_REAL, sistrip::READOUT_MODE_PREMIX_RAW, 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_LITE10, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10_CMOVERRIDE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT_CMOVERRIDE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_CMOVERRIDE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT_CMOVERRIDE, and readoutMode().

Referenced by sistrip::FEDBuffer::checkChannelPacketCodes(), sistrip::FEDBuffer::checkSummary(), and sistrip::FEDBuffer::getCorrectPacketCode().

◆ print()

void sistrip::FEDBufferBase::print ( std::ostream &  os) const
virtual

Reimplemented in sistrip::FEDBuffer, and sistrip::FEDSpyBuffer.

Definition at line 1310 of file SiStripFEDBufferComponents.cc.

1310  {
1311  os << "buffer format: " << bufferFormat() << std::endl;
1312  os << "Buffer size: " << bufferSize() << " bytes" << std::endl;
1313  os << "Event length from DAQ trailer: " << daqEventLengthInBytes() << " bytes" << std::endl;
1314  os << "Source ID: " << daqSourceID() << std::endl;
1315  os << "Header type: " << headerType() << std::endl;
1316  os << "Readout mode: " << readoutMode() << std::endl;
1317  os << "DAQ event type: " << daqEventType() << std::endl;
1318  os << "TTS state: " << daqTTSState() << std::endl;
1319  os << "L1 ID: " << daqLvl1ID() << std::endl;
1320  os << "BX ID: " << daqBXID() << std::endl;
1321  os << "FED status register flags: ";
1323  os << std::endl;
1324  os << "APVe Address: " << uint16_t(apveAddress()) << std::endl;
1325  os << "Enabled FE units: " << uint16_t(nFEUnitsEnabled()) << std::endl;
1326  }

References apveAddress(), bufferFormat(), bufferSize(), daqBXID(), daqEventLengthInBytes(), daqEventType(), daqLvl1ID(), daqSourceID(), daqTTSState(), fedStatusRegister(), headerType(), nFEUnitsEnabled(), sistrip::FEDStatusRegister::printFlags(), and readoutMode().

Referenced by sistrip::FEDSpyBuffer::print(), and sistrip::FEDBuffer::print().

◆ readoutMode()

FEDReadoutMode sistrip::FEDBufferBase::readoutMode ( ) const
inline

◆ sourceID()

uint16_t sistrip::FEDBufferBase::sourceID ( ) const

◆ trackerSpecialHeader()

TrackerSpecialHeader sistrip::FEDBufferBase::trackerSpecialHeader ( ) const
inline

Definition at line 1407 of file SiStripFEDBufferComponents.h.

1407 { return specialHeader_; }

References specialHeader_.

Member Data Documentation

◆ bufferSize_

const size_t sistrip::FEDBufferBase::bufferSize_
private

◆ channels_

std::vector<FEDChannel> sistrip::FEDBufferBase::channels_
protected

◆ daqHeader_

FEDDAQHeader sistrip::FEDBufferBase::daqHeader_
private

◆ daqTrailer_

FEDDAQTrailer sistrip::FEDBufferBase::daqTrailer_
private

◆ orderedBuffer_

const uint8_t* sistrip::FEDBufferBase::orderedBuffer_
private

◆ originalBuffer_

const uint8_t* sistrip::FEDBufferBase::originalBuffer_
private

Definition at line 734 of file SiStripFEDBufferComponents.h.

Referenced by dumpOriginalBuffer(), init(), and ~FEDBufferBase().

◆ specialHeader_

TrackerSpecialHeader sistrip::FEDBufferBase::specialHeader_
private
sistrip::FEDBufferBase::daqSourceID
uint16_t daqSourceID() const
Definition: SiStripFEDBufferComponents.h:1415
sistrip::FEDBufferBase::checkLengthFromTrailer
bool checkLengthFromTrailer() const
Definition: SiStripFEDBufferComponents.h:1546
mps_fire.i
i
Definition: mps_fire.py:355
sistrip::READOUT_MODE_PREMIX_RAW
Definition: SiStripFEDBufferComponents.h:61
sistrip::FEDBufferBase::legacyReadoutMode
FEDLegacyReadoutMode legacyReadoutMode() const
Definition: SiStripFEDBufferComponents.h:1429
sistrip::FEDBufferBase::checkNoFEOverflows
bool checkNoFEOverflows() const
Definition: SiStripFEDBufferComponents.h:1534
sistrip::FEDDAQTrailer::badSourceID
bool badSourceID() const
Definition: SiStripFEDBufferComponents.h:244
sistrip::READOUT_MODE_LEGACY_PREMIX_RAW
Definition: SiStripFEDBufferComponents.h:76
sistrip::FEDBufferBase::fedStatusRegister
FEDStatusRegister fedStatusRegister() const
Definition: SiStripFEDBufferComponents.h:1498
sistrip::READOUT_MODE_LEGACY_SPY
Definition: SiStripFEDBufferComponents.h:75
sistrip::READOUT_MODE_LEGACY_PROC_RAW_FAKE
Definition: SiStripFEDBufferComponents.h:70
sistrip::READOUT_MODE_SCOPE
Definition: SiStripFEDBufferComponents.h:47
sistrip::FEDBufferBase::daqTTSState
FEDTTSBits daqTTSState() const
Definition: SiStripFEDBufferComponents.h:1423
sistrip::FEDDAQTrailer::eventLengthIn64BitWords
uint32_t eventLengthIn64BitWords() const
Definition: SiStripFEDBufferComponents.h:1369
sistrip::FEDBufferBase::daqEventLengthInBytes
uint32_t daqEventLengthInBytes() const
Definition: SiStripFEDBufferComponents.h:1419
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
sistrip::READOUT_MODE_SPY
Definition: SiStripFEDBufferComponents.h:60
sistrip::TrackerSpecialHeader::feOverflow
bool feOverflow(const uint8_t internalFEUnitNum) const
Definition: SiStripFEDBufferComponents.h:901
sistrip::FEDBufferBase::channelGood
virtual bool channelGood(const uint8_t internalFEDChannelNum) const
Definition: SiStripFEDBufferComponents.cc:1351
sistrip::calculateFEDBufferCRC
uint16_t calculateFEDBufferCRC(const uint8_t *buffer, const size_t lengthInBytes)
Definition: SiStripFEDBufferComponents.cc:62
sistrip::FEDDAQTrailer::slinkCRCError
bool slinkCRCError() const
Definition: SiStripFEDBufferComponents.h:253
sistrip::FEDDAQHeader::boeNibble
uint8_t boeNibble() const
Definition: SiStripFEDBufferComponents.h:1343
sistrip::FED_ID_MIN
static const uint16_t FED_ID_MIN
Definition: ConstantsForHardwareSystems.h:21
sistrip::PACKET_CODE_ZERO_SUPPRESSED
static const uint8_t PACKET_CODE_ZERO_SUPPRESSED
Definition: SiStripFEDBufferComponents.h:88
sistrip::FEDBufferBase::nFEUnitsEnabled
uint8_t nFEUnitsEnabled() const
Definition: SiStripFEDBufferComponents.cc:1328
sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_LITE_REAL
Definition: SiStripFEDBufferComponents.h:73
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT
Definition: SiStripFEDBufferComponents.h:51
FEDRawData::data
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10_CMOVERRIDE
Definition: SiStripFEDBufferComponents.h:50
sistrip::HEADER_TYPE_INVALID
Definition: SiStripFEDBufferComponents.h:38
sistrip::FEDBufferBase::daqBXID
uint16_t daqBXID() const
Definition: SiStripFEDBufferComponents.h:1413
sistrip::FEDDAQHeader::l1ID
uint32_t l1ID() const
Definition: SiStripFEDBufferComponents.h:1347
sistrip::PACKET_CODE_SCOPE
static const uint8_t PACKET_CODE_SCOPE
Definition: SiStripFEDBufferComponents.h:79
sistrip::FEDReadoutMode
FEDReadoutMode
Definition: SiStripFEDBufferComponents.h:45
sistrip::FEDDAQHeader::sourceID
uint16_t sourceID() const
Definition: SiStripFEDBufferComponents.h:1351
sistrip::FEDBufferBase::feEnabled
bool feEnabled(const uint8_t internalFEUnitNum) const
Definition: SiStripFEDBufferComponents.h:1490
sistrip::internalFEDChannelNum
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
Definition: SiStripFEDBufferComponents.h:785
sistrip::READOUT_MODE_LEGACY_VIRGIN_RAW_FAKE
Definition: SiStripFEDBufferComponents.h:68
sistrip::FEDBufferBase::readoutMode
FEDReadoutMode readoutMode() const
Definition: SiStripFEDBufferComponents.h:1431
sistrip::APV_MAX_ADDRESS
static const uint8_t APV_MAX_ADDRESS
Definition: SiStripFEDBufferComponents.h:22
sistrip::FEDBufferBase::orderedBuffer_
const uint8_t * orderedBuffer_
Definition: SiStripFEDBufferComponents.h:735
sistrip::FEDBufferBase::daqTrailer_
FEDDAQTrailer daqTrailer_
Definition: SiStripFEDBufferComponents.h:738
sistrip::FEDDAQTrailer::ttsBits
FEDTTSBits ttsBits() const
Definition: SiStripFEDBufferComponents.cc:964
sistrip::TrackerSpecialHeader::majorityAddressErrorForFEUnit
bool majorityAddressErrorForFEUnit(const uint8_t internalFEUnitNum) const
Definition: SiStripFEDBufferComponents.h:889
sistrip::READOUT_MODE_LEGACY_VIRGIN_RAW_REAL
Definition: SiStripFEDBufferComponents.h:67
sistrip::READOUT_MODE_PROC_RAW
Definition: SiStripFEDBufferComponents.h:52
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8
Definition: SiStripFEDBufferComponents.h:58
sistrip::FEDBufferBase::checkMajorityAddresses
bool checkMajorityAddresses() const
Definition: SiStripFEDBufferComponents.cc:1341
sistrip::FEDBufferBase::checkReadoutMode
bool checkReadoutMode() const
Definition: SiStripFEDBufferComponents.h:1530
sistrip::TrackerSpecialHeader::fedStatusRegister
FEDStatusRegister fedStatusRegister() const
Definition: SiStripFEDBufferComponents.h:911
sistrip::FEDBufferBase::doTrackerSpecialHeaderChecks
bool doTrackerSpecialHeaderChecks() const
Definition: SiStripFEDBufferComponents.h:1513
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT_CMOVERRIDE
Definition: SiStripFEDBufferComponents.h:59
sistrip::BUFFER_FORMAT_NEW
Definition: SiStripFEDBufferComponents.h:30
sistrip::FEDBufferBase::checkNoExtraHeadersOrTrailers
bool checkNoExtraHeadersOrTrailers() const
Definition: SiStripFEDBufferComponents.h:1542
sistrip::FEDBufferBase::daqEventType
FEDDAQEventType daqEventType() const
Definition: SiStripFEDBufferComponents.h:1409
sistrip::FEDDAQTrailer::slinkTransmissionError
bool slinkTransmissionError() const
Definition: SiStripFEDBufferComponents.h:241
sistrip::TrackerSpecialHeader::feOverflowRegister
uint8_t feOverflowRegister() const
Definition: SiStripFEDBufferComponents.h:899
sistrip::FEDBufferBase::daqCRC
uint16_t daqCRC() const
Definition: SiStripFEDBufferComponents.h:1421
sistrip::FEDLegacyReadoutMode
FEDLegacyReadoutMode
Definition: SiStripFEDBufferComponents.h:64
sistrip::FEUNITS_PER_FED
static const uint16_t FEUNITS_PER_FED
Definition: ConstantsForHardwareSystems.h:29
sistrip::FEDBufferBase::daqLvl1ID
uint32_t daqLvl1ID() const
Definition: SiStripFEDBufferComponents.h:1411
sistrip::FEDBufferBase::checkNoSlinkCRCError
bool checkNoSlinkCRCError() const
Definition: SiStripFEDBufferComponents.h:1536
sistrip::FEDBufferBase::bufferSize_
const size_t bufferSize_
Definition: SiStripFEDBufferComponents.h:736
sistrip::FEDDAQTrailer::eventLengthInBytes
uint32_t eventLengthInBytes() const
Definition: SiStripFEDBufferComponents.h:1373
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10
Definition: SiStripFEDBufferComponents.h:49
sistrip::FEDBufferBase::headerType
FEDHeaderType headerType() const
Definition: SiStripFEDBufferComponents.h:1427
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT_CMOVERRIDE
Definition: SiStripFEDBufferComponents.h:53
sistrip::FEDBufferBase::calcCRC
uint16_t calcCRC() const
Definition: SiStripFEDBufferComponents.h:1399
sistrip::FEDBufferBase::specialHeader_
TrackerSpecialHeader specialHeader_
Definition: SiStripFEDBufferComponents.h:739
sistrip::FEDStatusRegister::printFlags
void printFlags(std::ostream &os) const
Definition: SiStripFEDBufferComponents.cc:554
sistrip::TrackerSpecialHeader::feEnabled
bool feEnabled(const uint8_t internalFEUnitNum) const
Definition: SiStripFEDBufferComponents.h:895
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT
Definition: SiStripFEDBufferComponents.h:55
sistrip::FEDBufferBase::checkCRC
bool checkCRC() const
Definition: SiStripFEDBufferComponents.h:1524
sistrip::TrackerSpecialHeader::legacyReadoutMode
FEDLegacyReadoutMode legacyReadoutMode() const
Definition: SiStripFEDBufferComponents.cc:775
sistrip::FEDBufferBase::majorityAddressErrorForFEUnit
bool majorityAddressErrorForFEUnit(const uint8_t internalFEUnitNum) const
Definition: SiStripFEDBufferComponents.h:1486
sistrip::FEDBufferBase::bufferFormat
FEDBufferFormat bufferFormat() const
Definition: SiStripFEDBufferComponents.h:1425
sistrip::FEDBufferBase::checkSourceIDs
bool checkSourceIDs() const
Definition: SiStripFEDBufferComponents.cc:1337
sistrip::FEDBufferBase::channels_
std::vector< FEDChannel > channels_
Definition: SiStripFEDBufferComponents.h:730
edmLumisInFiles.summary
summary
Definition: edmLumisInFiles.py:39
sistrip::PACKET_CODE_PROC_RAW
static const uint8_t PACKET_CODE_PROC_RAW
Definition: SiStripFEDBufferComponents.h:84
sistrip::READOUT_MODE_VIRGIN_RAW
Definition: SiStripFEDBufferComponents.h:48
sistrip::printHex
void printHex(const void *pointer, const size_t length, std::ostream &os)
Definition: SiStripFEDBufferComponents.cc:26
sistrip::TrackerSpecialHeader::bufferFormat
FEDBufferFormat bufferFormat() const
Definition: SiStripFEDBufferComponents.cc:763
sistrip::FEDBufferBase::bufferSize
size_t bufferSize() const
Definition: SiStripFEDBufferComponents.h:1405
sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_LITE_FAKE
Definition: SiStripFEDBufferComponents.h:74
sistrip::FEDChannel::packetCode
uint8_t packetCode() const
Definition: SiStripFEDBufferComponents.h:1565
sistrip::READOUT_MODE_INVALID
Definition: SiStripFEDBufferComponents.h:46
sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_FAKE
Definition: SiStripFEDBufferComponents.h:72
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
sistrip::FED_ID_MAX
static const uint16_t FED_ID_MAX
Definition: ConstantsForHardwareSystems.h:22
sistrip::FEDBufferBase::checkNoUnexpectedSourceID
bool checkNoUnexpectedSourceID() const
Definition: SiStripFEDBufferComponents.h:1540
sistrip::FEDBufferBase::channel
const FEDChannel & channel(const uint8_t internalFEDChannelNum) const
Definition: SiStripFEDBufferComponents.h:1504
sistrip::FEDBufferFormat
FEDBufferFormat
Definition: SiStripFEDBufferComponents.h:26
sistrip::FEDBufferBase::checkHeaderType
bool checkHeaderType() const
Definition: SiStripFEDBufferComponents.h:1528
sistrip::FEDBufferBase::originalBuffer_
const uint8_t * originalBuffer_
Definition: SiStripFEDBufferComponents.h:734
sistrip::READOUT_MODE_LEGACY_INVALID
Definition: SiStripFEDBufferComponents.h:65
sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_REAL
Definition: SiStripFEDBufferComponents.h:71
sistrip::FEDDAQHeader::eventType
FEDDAQEventType eventType() const
Definition: SiStripFEDBufferComponents.cc:910
sistrip::FEDBufferBase::feOverflow
bool feOverflow(const uint8_t internalFEUnitNum) const
Definition: SiStripFEDBufferComponents.h:1494
sistrip::FEDBufferBase::doDAQHeaderAndTrailerChecks
bool doDAQHeaderAndTrailerChecks() const
Definition: SiStripFEDBufferComponents.h:1519
sistrip::FEDBufferBase::checkNoSLinkTransmissionError
bool checkNoSLinkTransmissionError() const
Definition: SiStripFEDBufferComponents.h:1538
sistrip::BUFFER_FORMAT_OLD_VME
Definition: SiStripFEDBufferComponents.h:28
sistrip::FEDDAQTrailer::eoeNibble
uint8_t eoeNibble() const
Definition: SiStripFEDBufferComponents.h:1367
sistrip::TrackerSpecialHeader::headerType
FEDHeaderType headerType() const
Definition: SiStripFEDBufferComponents.h:840
sistrip::TrackerSpecialHeader::readoutMode
FEDReadoutMode readoutMode() const
Definition: SiStripFEDBufferComponents.h:854
sistrip::FEDCH_PER_FED
static const uint16_t FEDCH_PER_FED
Definition: ConstantsForHardwareSystems.h:30
sistrip::FEDCH_PER_FEUNIT
static const uint16_t FEDCH_PER_FEUNIT
Definition: ConstantsForHardwareSystems.h:28
sistrip::FEDBufferBase::checkBufferFormat
bool checkBufferFormat() const
Definition: SiStripFEDBufferComponents.h:1526
mps_fire.result
result
Definition: mps_fire.py:303
sistrip::READOUT_MODE_LEGACY_PROC_RAW_REAL
Definition: SiStripFEDBufferComponents.h:69
sistrip::FEDBufferBase::init
void init()
Definition: SiStripFEDBufferComponents.cc:1262
sistrip::PACKET_CODE_VIRGIN_RAW
static const uint8_t PACKET_CODE_VIRGIN_RAW
Definition: SiStripFEDBufferComponents.h:80
sistrip::FEDBufferBase::apveAddress
uint8_t apveAddress() const
Definition: SiStripFEDBufferComponents.h:1484
sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_CMOVERRIDE
Definition: SiStripFEDBufferComponents.h:54
sistrip::TrackerSpecialHeader::apveAddress
uint8_t apveAddress() const
Definition: SiStripFEDBufferComponents.h:885
sistrip::BUFFER_FORMAT_INVALID
Definition: SiStripFEDBufferComponents.h:27
sistrip::FEDDAQTrailer::crc
uint16_t crc() const
Definition: SiStripFEDBufferComponents.h:1375
sistrip::READOUT_MODE_LEGACY_SCOPE
Definition: SiStripFEDBufferComponents.h:66
sistrip::FEDBufferBase::daqHeader_
FEDDAQHeader daqHeader_
Definition: SiStripFEDBufferComponents.h:737
sistrip::FEDDAQHeader::bxID
uint16_t bxID() const
Definition: SiStripFEDBufferComponents.h:1349
sistrip::READOUT_MODE_ZERO_SUPPRESSED
Definition: SiStripFEDBufferComponents.h:56