CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
sistrip::FEDFullDebugHeader Class Referencefinal

#include <SiStripFEDBufferComponents.h>

Inheritance diagram for sistrip::FEDFullDebugHeader:
sistrip::FEDFEHeader

Public Member Functions

bool apvAddressError (const uint8_t internalFEDChannelNum, const uint8_t apvNum) const
 
bool apvAddressError (const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum, const uint8_t apvNum) const
 
bool apvError (const uint8_t internalFEDChannelNum, const uint8_t apvNum) const
 
bool apvError (const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum, const uint8_t apvNum) const
 
FEDBackendStatusRegister beStatusRegister () const
 
bool checkChannelStatusBits (const uint8_t internalFEDChannelNum) const override
 
bool checkStatusBits (const uint8_t internalFEDChannelNum, const uint8_t apvNum) const override
 
FEDFullDebugHeaderclone () const override
 
uint32_t daqRegister () const
 
uint32_t daqRegister2 () const
 
const uint8_t * data () const override
 
 FEDFullDebugHeader (const std::vector< uint16_t > &feUnitLengths=std::vector< uint16_t >(FEUNITS_PER_FED, 0), const std::vector< uint8_t > &feMajorityAddresses=std::vector< uint8_t >(FEUNITS_PER_FED, 0), const std::vector< FEDChannelStatus > &channelStatus=std::vector< FEDChannelStatus >(FEDCH_PER_FED, CHANNEL_STATUS_NO_PROBLEMS), const FEDBackendStatusRegister beStatusRegister=FEDBackendStatusRegister(), const uint32_t daqRegister=0, const uint32_t daqRegister2=0)
 
 FEDFullDebugHeader (const uint8_t *headerBuffer)
 
bool fePresent (const uint8_t internalFEUnitNum) const
 
uint16_t feUnitLength (const uint8_t internalFEUnitNum) const
 
uint8_t feUnitMajorityAddress (const uint8_t internalFEUnitNum) const
 
uint8_t * feWord (const uint8_t internalFEUnitNum)
 
const uint8_t * feWord (const uint8_t internalFEUnitNum) const
 
FEDChannelStatus getChannelStatus (const uint8_t internalFEDChannelNum) const
 
FEDChannelStatus getChannelStatus (const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum) const
 
size_t lengthInBytes () const override
 
bool outOfSync (const uint8_t internalFEDChannelNum) const
 
bool outOfSync (const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum) const
 
void print (std::ostream &os) const override
 
void set32BitReservedRegister (const uint8_t internalFEUnitNum, const uint32_t reservedRegister) override
 
void setBEStatusRegister (const FEDBackendStatusRegister beStatusRegister) override
 
void setChannelStatus (const uint8_t internalFEDChannelNum, const FEDChannelStatus status) override
 
void setDAQRegister (const uint32_t daqRegister) override
 
void setDAQRegister2 (const uint32_t daqRegister2) override
 
void setFEUnitLength (const uint8_t internalFEUnitNum, const uint16_t length) override
 
void setFEUnitMajorityAddress (const uint8_t internalFEUnitNum, const uint8_t address) override
 
bool unlocked (const uint8_t internalFEDChannelNum) const
 
bool unlocked (const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum) const
 
 ~FEDFullDebugHeader () override
 
- Public Member Functions inherited from sistrip::FEDFEHeader
bool checkChannelStatusBits (const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum) const
 
bool checkStatusBits (const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum, const uint8_t apvNum) const
 
void setChannelStatus (const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum, const FEDChannelStatus status)
 
virtual ~FEDFEHeader ()
 

Static Public Member Functions

static uint32_t get32BitWordFrom (const uint8_t *startOfWord)
 
- Static Public Member Functions inherited from sistrip::FEDFEHeader
static std::unique_ptr< FEDFEHeadernewFEFakeHeader (const FEDHeaderType headerType)
 
static std::unique_ptr< FEDFEHeadernewFEHeader (const FEDHeaderType headerType)
 
static std::unique_ptr< FEDFEHeadernewFEHeader (const FEDHeaderType headerType, const uint8_t *headerBuffer)
 

Private Member Functions

bool apvAddressErrorFromBit (const uint8_t internalFEDChannelNum, const uint8_t apvNum) const
 
bool apvErrorFromBit (const uint8_t internalFEDChannelNum, const uint8_t apvNum) const
 
bool getBit (const uint8_t internalFEDChannelNum, const uint8_t bit) const
 
bool outOfSyncFromBit (const uint8_t internalFEDChannelNum) const
 
void setAPVAddressError (const uint8_t internalFEDChannelNum, const uint8_t apvNum, const bool value)
 
void setAPVError (const uint8_t internalFEDChannelNum, const uint8_t apvNum, const bool value)
 
void setBit (const uint8_t internalFEDChannelNum, const uint8_t bit, const bool value)
 
void setOutOfSync (const uint8_t internalFEDChannelNum, const bool value)
 
void setUnlocked (const uint8_t internalFEDChannelNum, const bool value)
 
bool unlockedFromBit (const uint8_t internalFEDChannelNum) const
 

Static Private Member Functions

static void set32BitWordAt (uint8_t *startOfWord, const uint32_t value)
 

Private Attributes

uint8_t header_ [FULL_DEBUG_HEADER_SIZE_IN_BYTES]
 

Static Private Attributes

static const size_t FULL_DEBUG_HEADER_SIZE_IN_64BIT_WORDS = FEUNITS_PER_FED * 2
 
static const size_t FULL_DEBUG_HEADER_SIZE_IN_BYTES = FULL_DEBUG_HEADER_SIZE_IN_64BIT_WORDS * 8
 

Detailed Description

Definition at line 535 of file SiStripFEDBufferComponents.h.

Constructor & Destructor Documentation

◆ FEDFullDebugHeader() [1/2]

sistrip::FEDFullDebugHeader::FEDFullDebugHeader ( const uint8_t *  headerBuffer)
inlineexplicit

Definition at line 1198 of file SiStripFEDBufferComponents.h.

1198  {
1199  memcpy(header_, headerBuffer, FULL_DEBUG_HEADER_SIZE_IN_BYTES);
1200  }

References FULL_DEBUG_HEADER_SIZE_IN_BYTES, and header_.

Referenced by clone().

◆ ~FEDFullDebugHeader()

sistrip::FEDFullDebugHeader::~FEDFullDebugHeader ( )
override

Definition at line 1121 of file SiStripFEDBufferComponents.cc.

1121 {}

◆ FEDFullDebugHeader() [2/2]

sistrip::FEDFullDebugHeader::FEDFullDebugHeader ( const std::vector< uint16_t > &  feUnitLengths = std::vector<uint16_t>(FEUNITS_PER_FED, 0),
const std::vector< uint8_t > &  feMajorityAddresses = std::vector<uint8_t>(FEUNITS_PER_FED, 0),
const std::vector< FEDChannelStatus > &  channelStatus = std::vector<FEDChannelStatus>(FEDCH_PER_FEDCHANNEL_STATUS_NO_PROBLEMS),
const FEDBackendStatusRegister  beStatusRegister = FEDBackendStatusRegister(),
const uint32_t  daqRegister = 0,
const uint32_t  daqRegister2 = 0 
)

Definition at line 1187 of file SiStripFEDBufferComponents.cc.

1192  {
1197  for (uint8_t iFE = 0; iFE < FEUNITS_PER_FED; iFE++) {
1198  setFEUnitLength(iFE, feUnitLengths[iFE]);
1199  setFEUnitMajorityAddress(iFE, feMajorityAddresses[iFE]);
1200  }
1201  for (uint8_t iCh = 0; iCh < FEDCH_PER_FED; iCh++) {
1202  setChannelStatus(iCh, channelStatus[iCh]);
1203  }
1204  }

References beStatusRegister(), daqRegister(), daqRegister2(), sistrip::FEDCH_PER_FED, sistrip::FEUNITS_PER_FED, FULL_DEBUG_HEADER_SIZE_IN_BYTES, header_, setBEStatusRegister(), setChannelStatus(), setDAQRegister(), setDAQRegister2(), setFEUnitLength(), and setFEUnitMajorityAddress().

Member Function Documentation

◆ apvAddressError() [1/2]

bool sistrip::FEDFullDebugHeader::apvAddressError ( const uint8_t  internalFEDChannelNum,
const uint8_t  apvNum 
) const
inline

◆ apvAddressError() [2/2]

bool sistrip::FEDFullDebugHeader::apvAddressError ( const uint8_t  internalFEUnitNum,
const uint8_t  internalFEUnitChannelNum,
const uint8_t  apvNum 
) const
inline

Definition at line 1256 of file SiStripFEDBufferComponents.h.

1258  {
1259  return apvAddressError(internalFEDChannelNum(internalFEUnitNum, internalFEUnitChannelNum), apvNum);
1260  }

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

◆ apvAddressErrorFromBit()

bool sistrip::FEDFullDebugHeader::apvAddressErrorFromBit ( const uint8_t  internalFEDChannelNum,
const uint8_t  apvNum 
) const
inlineprivate

Definition at line 1285 of file SiStripFEDBufferComponents.h.

1286  {
1287  return !getBit(internalFEDChannelNum, 1 + 2 * apvNum);
1288  }

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

Referenced by apvAddressError().

◆ apvError() [1/2]

bool sistrip::FEDFullDebugHeader::apvError ( const uint8_t  internalFEDChannelNum,
const uint8_t  apvNum 
) const
inline

◆ apvError() [2/2]

bool sistrip::FEDFullDebugHeader::apvError ( const uint8_t  internalFEUnitNum,
const uint8_t  internalFEUnitChannelNum,
const uint8_t  apvNum 
) const
inline

Definition at line 1245 of file SiStripFEDBufferComponents.h.

1247  {
1248  return apvError(internalFEDChannelNum(internalFEUnitNum, internalFEUnitChannelNum), apvNum);
1249  }

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

◆ apvErrorFromBit()

bool sistrip::FEDFullDebugHeader::apvErrorFromBit ( const uint8_t  internalFEDChannelNum,
const uint8_t  apvNum 
) const
inlineprivate

Definition at line 1275 of file SiStripFEDBufferComponents.h.

1275  {
1276  //Discovered March 2012: two bits inverted in firmware. Decided
1277  //to update documentation but keep firmware identical for
1278  //backward compatibility. So status bit order is actually:
1279  //apvErr1 - apvAddrErr0 - apvErr0 - apvAddrErr1 - OOS - unlocked.
1280  //Before, it was: return !getBit(internalFEDChannelNum,0+2*apvNum);
1281 
1282  return !getBit(internalFEDChannelNum, 0 + 2 * (1 - apvNum));
1283  }

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

Referenced by apvError().

◆ beStatusRegister()

FEDBackendStatusRegister sistrip::FEDFullDebugHeader::beStatusRegister ( ) const
inline

Definition at line 1206 of file SiStripFEDBufferComponents.h.

1206  {
1207  return FEDBackendStatusRegister(get32BitWordFrom(feWord(0) + 10));
1208  }

References feWord(), and get32BitWordFrom().

Referenced by FEDFullDebugHeader(), and setBEStatusRegister().

◆ checkChannelStatusBits()

bool sistrip::FEDFullDebugHeader::checkChannelStatusBits ( const uint8_t  internalFEDChannelNum) const
overridevirtual

Implements sistrip::FEDFEHeader.

Definition at line 1134 of file SiStripFEDBufferComponents.cc.

1134  {
1135  //return ( !unlockedFromBit(internalFEDChannelNum) &&
1136  // !outOfSyncFromBit(internalFEDChannelNum) &&
1137  // !apvErrorFromBit(internalFEDChannelNum,0) &&
1138  // !apvAddressErrorFromBit(internalFEDChannelNum,0) &&
1139  // !apvErrorFromBit(internalFEDChannelNum,1) &&
1140  // !apvAddressErrorFromBit(internalFEDChannelNum,1) );
1142  }

References sistrip::CHANNEL_STATUS_NO_PROBLEMS, getChannelStatus(), and sistrip::internalFEDChannelNum().

◆ checkStatusBits()

bool sistrip::FEDFullDebugHeader::checkStatusBits ( const uint8_t  internalFEDChannelNum,
const uint8_t  apvNum 
) const
overridevirtual

◆ clone()

FEDFullDebugHeader * sistrip::FEDFullDebugHeader::clone ( void  ) const
overridevirtual

Implements sistrip::FEDFEHeader.

Definition at line 1127 of file SiStripFEDBufferComponents.cc.

1127 { return new FEDFullDebugHeader(*this); }

References FEDFullDebugHeader().

◆ daqRegister()

uint32_t sistrip::FEDFullDebugHeader::daqRegister ( ) const
inline

Definition at line 1210 of file SiStripFEDBufferComponents.h.

1210 { return get32BitWordFrom(feWord(7) + 10); }

References feWord(), and get32BitWordFrom().

Referenced by FEDFullDebugHeader(), and setDAQRegister().

◆ daqRegister2()

uint32_t sistrip::FEDFullDebugHeader::daqRegister2 ( ) const
inline

Definition at line 1212 of file SiStripFEDBufferComponents.h.

1212 { return get32BitWordFrom(feWord(6) + 10); }

References feWord(), and get32BitWordFrom().

Referenced by FEDFullDebugHeader(), and setDAQRegister2().

◆ data()

const uint8_t * sistrip::FEDFullDebugHeader::data ( ) const
overridevirtual

Implements sistrip::FEDFEHeader.

Definition at line 1185 of file SiStripFEDBufferComponents.cc.

1185 { return header_; }

References header_.

◆ fePresent()

bool sistrip::FEDFullDebugHeader::fePresent ( const uint8_t  internalFEUnitNum) const
inline

Definition at line 1218 of file SiStripFEDBufferComponents.h.

1218  {
1219  return (feUnitLength(internalFEUnitNum) != 0);
1220  }

References feUnitLength().

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

◆ feUnitLength()

uint16_t sistrip::FEDFullDebugHeader::feUnitLength ( const uint8_t  internalFEUnitNum) const
inline

Definition at line 1214 of file SiStripFEDBufferComponents.h.

1214  {
1215  return ((feWord(internalFEUnitNum)[15] << 8) | (feWord(internalFEUnitNum)[14]));
1216  }

References feWord().

Referenced by sistrip::FEDBuffer::checkFEUnitLengths(), sistrip::FEDBuffer::checkSummary(), and fePresent().

◆ feUnitMajorityAddress()

uint8_t sistrip::FEDFullDebugHeader::feUnitMajorityAddress ( const uint8_t  internalFEUnitNum) const
inline

Definition at line 1202 of file SiStripFEDBufferComponents.h.

1202  {
1203  return feWord(internalFEUnitNum)[9];
1204  }

References feWord().

Referenced by sistrip::FEDBuffer::checkFEUnitAPVAddresses(), and sistrip::FEDBuffer::checkSummary().

◆ feWord() [1/2]

uint8_t * sistrip::FEDFullDebugHeader::feWord ( const uint8_t  internalFEUnitNum)
inline

◆ feWord() [2/2]

const uint8_t * sistrip::FEDFullDebugHeader::feWord ( const uint8_t  internalFEUnitNum) const
inline

Definition at line 1304 of file SiStripFEDBufferComponents.h.

1304  {
1305  return header_ + internalFEUnitNum * 2 * 8;
1306  }

References header_.

◆ get32BitWordFrom()

uint32_t sistrip::FEDFullDebugHeader::get32BitWordFrom ( const uint8_t *  startOfWord)
inlinestatic

Definition at line 1296 of file SiStripFEDBufferComponents.h.

1296  {
1297  return (startOfWord[0] | (startOfWord[1] << 8) | (startOfWord[2] << 16) | (startOfWord[3] << 24));
1298  }

Referenced by beStatusRegister(), daqRegister(), and daqRegister2().

◆ getBit()

bool sistrip::FEDFullDebugHeader::getBit ( const uint8_t  internalFEDChannelNum,
const uint8_t  bit 
) const
inlineprivate

Definition at line 1290 of file SiStripFEDBufferComponents.h.

1290  {
1291  const uint8_t* pFEWord = feWord(internalFEDChannelNum / FEDCH_PER_FEUNIT);
1292  const uint8_t bitInFeWord = ((FEDCH_PER_FEUNIT - 1) - (internalFEDChannelNum % FEDCH_PER_FEUNIT)) * 6 + bit;
1293  return (pFEWord[bitInFeWord / 8] & (0x1 << (bitInFeWord % 8)));
1294  }

References sistrip::FEDCH_PER_FEUNIT, feWord(), sistrip::internalFEDChannelNum(), and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by apvAddressErrorFromBit(), apvErrorFromBit(), outOfSyncFromBit(), and unlockedFromBit().

◆ getChannelStatus() [1/2]

FEDChannelStatus sistrip::FEDFullDebugHeader::getChannelStatus ( const uint8_t  internalFEDChannelNum) const

Definition at line 1144 of file SiStripFEDBufferComponents.cc.

1144  {
1145  const uint8_t* pFEWord = feWord(internalFEDChannelNum / FEDCH_PER_FEUNIT);
1146  const uint8_t feUnitChanNum = internalFEDChannelNum % FEDCH_PER_FEUNIT;
1147  const uint8_t startByteInFEWord = (FEDCH_PER_FEUNIT - 1 - feUnitChanNum) * 6 / 8;
1148  switch ((FEDCH_PER_FEUNIT - 1 - feUnitChanNum) % 4) {
1149  case 0:
1150  return FEDChannelStatus(pFEWord[startByteInFEWord] & 0x3F);
1151  case 1:
1152  return FEDChannelStatus(((pFEWord[startByteInFEWord] & 0xC0) >> 6) |
1153  ((pFEWord[startByteInFEWord + 1] & 0x0F) << 2));
1154  case 2:
1155  return FEDChannelStatus(((pFEWord[startByteInFEWord] & 0xF0) >> 4) |
1156  ((pFEWord[startByteInFEWord + 1] & 0x03) << 4));
1157  case 3:
1158  return FEDChannelStatus((pFEWord[startByteInFEWord] & 0xFC) >> 2);
1159  //stop compiler warning
1160  default:
1161  return FEDChannelStatus(0);
1162  }
1163  /*const uint8_t feUnitChanNum = internalFEDChannelNum / FEDCH_PER_FEUNIT;
1164  const uint8_t* pFEWord = feWord(feUnitChanNum);
1165  const uint8_t startByteInFEWord = feUnitChanNum * 3 / 4;
1166  //const uint8_t shift = ( 6 - ((feUnitChanNum-1)%4) );
1167  //const uint16_t mask = ( 0x003F << shift );
1168  //uint8_t result = ( (pFEWord[startByteInFEWord] & (mask&0x00FF)) >> shift );
1169  //result |= ( (pFEWord[startByteInFEWord+1] & (mask>>8)) << (8-shift) );
1170  switch (feUnitChanNum % 4) {
1171  case 0:
1172  return FEDChannelStatus( pFEWord[startByteInFEWord] & 0x3F );
1173  case 1:
1174  return FEDChannelStatus( ((pFEWord[startByteInFEWord] & 0xC0) >> 6) | ((pFEWord[startByteInFEWord+1] & 0x0F) << 2) );
1175  case 2:
1176  return FEDChannelStatus( ((pFEWord[startByteInFEWord] & 0xF0) >> 4) | ((pFEWord[startByteInFEWord+1] & 0x03) << 4) );
1177  case 3:
1178  return FEDChannelStatus( (pFEWord[startByteInFEWord] & 0xFC) >> 2 );
1179  //stop compiler warning
1180  default:
1181  return FEDChannelStatus(0);
1182  }*/
1183  }

References sistrip::FEDCH_PER_FEUNIT, feWord(), and sistrip::internalFEDChannelNum().

Referenced by checkChannelStatusBits(), sistrip::FEDBuffer::checkSummary(), and getChannelStatus().

◆ getChannelStatus() [2/2]

FEDChannelStatus sistrip::FEDFullDebugHeader::getChannelStatus ( const uint8_t  internalFEUnitNum,
const uint8_t  internalFEUnitChannelNum 
) const
inline

Definition at line 1262 of file SiStripFEDBufferComponents.h.

1263  {
1264  return getChannelStatus(internalFEDChannelNum(internalFEUnitNum, internalFEUnitChannelNum));
1265  }

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

◆ lengthInBytes()

size_t sistrip::FEDFullDebugHeader::lengthInBytes ( ) const
overridevirtual

◆ outOfSync() [1/2]

bool sistrip::FEDFullDebugHeader::outOfSync ( const uint8_t  internalFEDChannelNum) const
inline

Definition at line 1231 of file SiStripFEDBufferComponents.h.

1231  {
1233  }

References sistrip::internalFEDChannelNum(), outOfSyncFromBit(), and unlocked().

Referenced by outOfSync().

◆ outOfSync() [2/2]

bool sistrip::FEDFullDebugHeader::outOfSync ( const uint8_t  internalFEUnitNum,
const uint8_t  internalFEUnitChannelNum 
) const
inline

Definition at line 1235 of file SiStripFEDBufferComponents.h.

1236  {
1237  return outOfSync(internalFEDChannelNum(internalFEUnitNum, internalFEUnitChannelNum));
1238  }

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

◆ outOfSyncFromBit()

bool sistrip::FEDFullDebugHeader::outOfSyncFromBit ( const uint8_t  internalFEDChannelNum) const
inlineprivate

Definition at line 1271 of file SiStripFEDBufferComponents.h.

1271  {
1272  return !getBit(internalFEDChannelNum, 4);
1273  }

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

Referenced by apvAddressError(), apvError(), checkStatusBits(), and outOfSync().

◆ print()

void sistrip::FEDFullDebugHeader::print ( std::ostream &  os) const
overridevirtual

◆ set32BitReservedRegister()

void sistrip::FEDFullDebugHeader::set32BitReservedRegister ( const uint8_t  internalFEUnitNum,
const uint32_t  reservedRegister 
)
overridevirtual

Implements sistrip::FEDFEHeader.

Definition at line 1230 of file SiStripFEDBufferComponents.cc.

1230  {
1231  set32BitWordAt(feWord(internalFEUnitNum) + 10, reservedRegister);
1232  }

References feWord(), and set32BitWordAt().

◆ set32BitWordAt()

void sistrip::FEDFullDebugHeader::set32BitWordAt ( uint8_t *  startOfWord,
const uint32_t  value 
)
inlinestaticprivate

Definition at line 1300 of file SiStripFEDBufferComponents.h.

1300  {
1301  memcpy(startOfWord, &value, 4);
1302  }

Referenced by set32BitReservedRegister(), setBEStatusRegister(), setDAQRegister(), and setDAQRegister2().

◆ setAPVAddressError()

void sistrip::FEDFullDebugHeader::setAPVAddressError ( const uint8_t  internalFEDChannelNum,
const uint8_t  apvNum,
const bool  value 
)
inlineprivate

Definition at line 1321 of file SiStripFEDBufferComponents.h.

1323  {
1324  setBit(internalFEDChannelNum, 1 + 2 * apvNum, !value);
1325  }

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

Referenced by setChannelStatus().

◆ setAPVError()

void sistrip::FEDFullDebugHeader::setAPVError ( const uint8_t  internalFEDChannelNum,
const uint8_t  apvNum,
const bool  value 
)
inlineprivate

Definition at line 1327 of file SiStripFEDBufferComponents.h.

1329  {
1330  //Discovered March 2012: two bits inverted in firmware. Decided
1331  //to update documentation but keep firmware identical for
1332  //backward compatibility. So status bit order is actually:
1333  //apvErr1 - apvAddrErr0 - apvErr0 - apvAddrErr1 - OOS - unlocked.
1334  //Before, it was: return !getBit(internalFEDChannelNum,0+2*apvNum);
1335 
1336  setBit(internalFEDChannelNum, 0 + 2 * (1 - apvNum), !value);
1337  }

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

Referenced by setChannelStatus().

◆ setBEStatusRegister()

void sistrip::FEDFullDebugHeader::setBEStatusRegister ( const FEDBackendStatusRegister  beStatusRegister)
overridevirtual

Implements sistrip::FEDFEHeader.

Definition at line 1219 of file SiStripFEDBufferComponents.cc.

1219  {
1221  }

References beStatusRegister(), feWord(), and set32BitWordAt().

Referenced by FEDFullDebugHeader().

◆ setBit()

void sistrip::FEDFullDebugHeader::setBit ( const uint8_t  internalFEDChannelNum,
const uint8_t  bit,
const bool  value 
)
private

Definition at line 1239 of file SiStripFEDBufferComponents.cc.

1239  {
1240  const uint8_t bitInFeWord = (FEDCH_PER_FEUNIT - 1 - (internalFEDChannelNum % FEDCH_PER_FEUNIT)) * 6 + bit;
1241  uint8_t& byte = *(feWord(internalFEDChannelNum / FEDCH_PER_FEUNIT) + (bitInFeWord / 8));
1242  const uint8_t mask = (0x1 << bitInFeWord % 8);
1243  byte = ((byte & (~mask)) | (value ? mask : 0x0));
1244  }

References sistrip::FEDCH_PER_FEUNIT, feWord(), and sistrip::internalFEDChannelNum().

Referenced by setAPVAddressError(), setAPVError(), setOutOfSync(), and setUnlocked().

◆ setChannelStatus()

void sistrip::FEDFullDebugHeader::setChannelStatus ( const uint8_t  internalFEDChannelNum,
const FEDChannelStatus  status 
)
overridevirtual

◆ setDAQRegister()

void sistrip::FEDFullDebugHeader::setDAQRegister ( const uint32_t  daqRegister)
overridevirtual

Implements sistrip::FEDFEHeader.

Definition at line 1223 of file SiStripFEDBufferComponents.cc.

1223 { set32BitWordAt(feWord(7) + 10, daqRegister); }

References daqRegister(), feWord(), and set32BitWordAt().

Referenced by FEDFullDebugHeader().

◆ setDAQRegister2()

void sistrip::FEDFullDebugHeader::setDAQRegister2 ( const uint32_t  daqRegister2)
overridevirtual

Implements sistrip::FEDFEHeader.

Definition at line 1225 of file SiStripFEDBufferComponents.cc.

1225  {
1227  }

References daqRegister2(), feWord(), and set32BitWordAt().

Referenced by FEDFullDebugHeader().

◆ setFEUnitLength()

void sistrip::FEDFullDebugHeader::setFEUnitLength ( const uint8_t  internalFEUnitNum,
const uint16_t  length 
)
overridevirtual

Implements sistrip::FEDFEHeader.

Definition at line 1234 of file SiStripFEDBufferComponents.cc.

1234  {
1235  feWord(internalFEUnitNum)[15] = ((length & 0xFF00) >> 8);
1236  feWord(internalFEUnitNum)[14] = (length & 0x00FF);
1237  }

References feWord().

Referenced by FEDFullDebugHeader().

◆ setFEUnitMajorityAddress()

void sistrip::FEDFullDebugHeader::setFEUnitMajorityAddress ( const uint8_t  internalFEUnitNum,
const uint8_t  address 
)
overridevirtual

Implements sistrip::FEDFEHeader.

Definition at line 1215 of file SiStripFEDBufferComponents.cc.

1215  {
1216  feWord(internalFEUnitNum)[9] = address;
1217  }

References feWord().

Referenced by FEDFullDebugHeader().

◆ setOutOfSync()

void sistrip::FEDFullDebugHeader::setOutOfSync ( const uint8_t  internalFEDChannelNum,
const bool  value 
)
inlineprivate

Definition at line 1317 of file SiStripFEDBufferComponents.h.

1317  {
1319  }

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

Referenced by setChannelStatus().

◆ setUnlocked()

void sistrip::FEDFullDebugHeader::setUnlocked ( const uint8_t  internalFEDChannelNum,
const bool  value 
)
inlineprivate

Definition at line 1313 of file SiStripFEDBufferComponents.h.

1313  {
1315  }

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

Referenced by setChannelStatus().

◆ unlocked() [1/2]

bool sistrip::FEDFullDebugHeader::unlocked ( const uint8_t  internalFEDChannelNum) const
inline

Definition at line 1222 of file SiStripFEDBufferComponents.h.

1222  {
1224  }

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

Referenced by outOfSync(), and unlocked().

◆ unlocked() [2/2]

bool sistrip::FEDFullDebugHeader::unlocked ( const uint8_t  internalFEUnitNum,
const uint8_t  internalFEUnitChannelNum 
) const
inline

Definition at line 1226 of file SiStripFEDBufferComponents.h.

1227  {
1228  return unlocked(internalFEDChannelNum(internalFEUnitNum, internalFEUnitChannelNum));
1229  }

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

◆ unlockedFromBit()

bool sistrip::FEDFullDebugHeader::unlockedFromBit ( const uint8_t  internalFEDChannelNum) const
inlineprivate

Definition at line 1267 of file SiStripFEDBufferComponents.h.

1267  {
1268  return !getBit(internalFEDChannelNum, 5);
1269  }

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

Referenced by apvAddressError(), apvError(), checkStatusBits(), and unlocked().

Member Data Documentation

◆ FULL_DEBUG_HEADER_SIZE_IN_64BIT_WORDS

const size_t sistrip::FEDFullDebugHeader::FULL_DEBUG_HEADER_SIZE_IN_64BIT_WORDS = FEUNITS_PER_FED * 2
staticprivate

Definition at line 610 of file SiStripFEDBufferComponents.h.

◆ FULL_DEBUG_HEADER_SIZE_IN_BYTES

const size_t sistrip::FEDFullDebugHeader::FULL_DEBUG_HEADER_SIZE_IN_BYTES = FULL_DEBUG_HEADER_SIZE_IN_64BIT_WORDS * 8
staticprivate

Definition at line 611 of file SiStripFEDBufferComponents.h.

Referenced by FEDFullDebugHeader(), lengthInBytes(), and print().

◆ header_

uint8_t sistrip::FEDFullDebugHeader::header_[FULL_DEBUG_HEADER_SIZE_IN_BYTES]
private

Definition at line 612 of file SiStripFEDBufferComponents.h.

Referenced by data(), FEDFullDebugHeader(), feWord(), and print().

sistrip::FEDFullDebugHeader::unlockedFromBit
bool unlockedFromBit(const uint8_t internalFEDChannelNum) const
Definition: SiStripFEDBufferComponents.h:1267
sistrip::FEDFullDebugHeader::setDAQRegister2
void setDAQRegister2(const uint32_t daqRegister2) override
Definition: SiStripFEDBufferComponents.cc:1225
sistrip::CHANNEL_STATUS_IN_SYNC
Definition: SiStripFEDBufferComponents.h:130
sistrip::FEDFullDebugHeader::setDAQRegister
void setDAQRegister(const uint32_t daqRegister) override
Definition: SiStripFEDBufferComponents.cc:1223
sistrip::CHANNEL_STATUS_APV0_ADDRESS_GOOD
Definition: SiStripFEDBufferComponents.h:133
sistrip::FEDFullDebugHeader::setAPVError
void setAPVError(const uint8_t internalFEDChannelNum, const uint8_t apvNum, const bool value)
Definition: SiStripFEDBufferComponents.h:1327
mps_update.status
status
Definition: mps_update.py:69
sistrip::CHANNEL_STATUS_NO_PROBLEMS
Definition: SiStripFEDBufferComponents.h:135
sistrip::FEDFullDebugHeader::setBEStatusRegister
void setBEStatusRegister(const FEDBackendStatusRegister beStatusRegister) override
Definition: SiStripFEDBufferComponents.cc:1219
sistrip::FEDFullDebugHeader::get32BitWordFrom
static uint32_t get32BitWordFrom(const uint8_t *startOfWord)
Definition: SiStripFEDBufferComponents.h:1296
sistrip::FEDFullDebugHeader::apvErrorFromBit
bool apvErrorFromBit(const uint8_t internalFEDChannelNum, const uint8_t apvNum) const
Definition: SiStripFEDBufferComponents.h:1275
sistrip::internalFEDChannelNum
uint8_t internalFEDChannelNum(const uint8_t internalFEUnitNum, const uint8_t internalFEUnitChannelNum)
Definition: SiStripFEDBufferComponents.h:785
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
sistrip::FEDFullDebugHeader::getBit
bool getBit(const uint8_t internalFEDChannelNum, const uint8_t bit) const
Definition: SiStripFEDBufferComponents.h:1290
sistrip::FEDFullDebugHeader::daqRegister
uint32_t daqRegister() const
Definition: SiStripFEDBufferComponents.h:1210
sistrip::FEDFullDebugHeader::apvError
bool apvError(const uint8_t internalFEDChannelNum, const uint8_t apvNum) const
Definition: SiStripFEDBufferComponents.h:1240
sistrip::FEDFullDebugHeader::feWord
uint8_t * feWord(const uint8_t internalFEUnitNum)
Definition: SiStripFEDBufferComponents.h:1309
sistrip::FEUNITS_PER_FED
static const uint16_t FEUNITS_PER_FED
Definition: ConstantsForHardwareSystems.h:29
sistrip::FEDFullDebugHeader::setAPVAddressError
void setAPVAddressError(const uint8_t internalFEDChannelNum, const uint8_t apvNum, const bool value)
Definition: SiStripFEDBufferComponents.h:1321
sistrip::CHANNEL_STATUS_APV1_NO_ERROR_BIT
Definition: SiStripFEDBufferComponents.h:134
sistrip::FEDFullDebugHeader::feUnitLength
uint16_t feUnitLength(const uint8_t internalFEUnitNum) const
Definition: SiStripFEDBufferComponents.h:1214
sistrip::FEDFullDebugHeader::setChannelStatus
void setChannelStatus(const uint8_t internalFEDChannelNum, const FEDChannelStatus status) override
Definition: SiStripFEDBufferComponents.cc:1206
sistrip::FEDFullDebugHeader::apvAddressErrorFromBit
bool apvAddressErrorFromBit(const uint8_t internalFEDChannelNum, const uint8_t apvNum) const
Definition: SiStripFEDBufferComponents.h:1285
sistrip::FEDFullDebugHeader::header_
uint8_t header_[FULL_DEBUG_HEADER_SIZE_IN_BYTES]
Definition: SiStripFEDBufferComponents.h:612
value
Definition: value.py:1
sistrip::FEDFullDebugHeader::setUnlocked
void setUnlocked(const uint8_t internalFEDChannelNum, const bool value)
Definition: SiStripFEDBufferComponents.h:1313
sistrip::printHex
void printHex(const void *pointer, const size_t length, std::ostream &os)
Definition: SiStripFEDBufferComponents.cc:26
sistrip::FEDFullDebugHeader::FULL_DEBUG_HEADER_SIZE_IN_BYTES
static const size_t FULL_DEBUG_HEADER_SIZE_IN_BYTES
Definition: SiStripFEDBufferComponents.h:611
sistrip::CHANNEL_STATUS_APV1_ADDRESS_GOOD
Definition: SiStripFEDBufferComponents.h:131
sistrip::FEDFullDebugHeader::unlocked
bool unlocked(const uint8_t internalFEDChannelNum) const
Definition: SiStripFEDBufferComponents.h:1222
sistrip::FEDChannelStatus
FEDChannelStatus
Definition: SiStripFEDBufferComponents.h:128
sistrip::FEDFullDebugHeader::setBit
void setBit(const uint8_t internalFEDChannelNum, const uint8_t bit, const bool value)
Definition: SiStripFEDBufferComponents.cc:1239
sistrip::FEDFullDebugHeader::set32BitWordAt
static void set32BitWordAt(uint8_t *startOfWord, const uint32_t value)
Definition: SiStripFEDBufferComponents.h:1300
sistrip::FEDFullDebugHeader::outOfSync
bool outOfSync(const uint8_t internalFEDChannelNum) const
Definition: SiStripFEDBufferComponents.h:1231
sistrip::FEDFullDebugHeader::apvAddressError
bool apvAddressError(const uint8_t internalFEDChannelNum, const uint8_t apvNum) const
Definition: SiStripFEDBufferComponents.h:1251
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::CHANNEL_STATUS_LOCKED
Definition: SiStripFEDBufferComponents.h:129
sistrip::FEDFullDebugHeader::daqRegister2
uint32_t daqRegister2() const
Definition: SiStripFEDBufferComponents.h:1212
sistrip::FEDFullDebugHeader::outOfSyncFromBit
bool outOfSyncFromBit(const uint8_t internalFEDChannelNum) const
Definition: SiStripFEDBufferComponents.h:1271
sistrip::FEDFullDebugHeader::beStatusRegister
FEDBackendStatusRegister beStatusRegister() const
Definition: SiStripFEDBufferComponents.h:1206
sistrip::FEDFullDebugHeader::setOutOfSync
void setOutOfSync(const uint8_t internalFEDChannelNum, const bool value)
Definition: SiStripFEDBufferComponents.h:1317
sistrip::CHANNEL_STATUS_APV0_NO_ERROR_BIT
Definition: SiStripFEDBufferComponents.h:132
sistrip::FEDFullDebugHeader::FEDFullDebugHeader
FEDFullDebugHeader(const uint8_t *headerBuffer)
Definition: SiStripFEDBufferComponents.h:1198
sistrip::FEDFullDebugHeader::setFEUnitLength
void setFEUnitLength(const uint8_t internalFEUnitNum, const uint16_t length) override
Definition: SiStripFEDBufferComponents.cc:1234
sistrip::FEDFullDebugHeader::setFEUnitMajorityAddress
void setFEUnitMajorityAddress(const uint8_t internalFEUnitNum, const uint8_t address) override
Definition: SiStripFEDBufferComponents.cc:1215
sistrip::FEDFullDebugHeader::getChannelStatus
FEDChannelStatus getChannelStatus(const uint8_t internalFEDChannelNum) const
Definition: SiStripFEDBufferComponents.cc:1144