Skip to content

Commit 2dd3745

Browse files
committed
ChipMappingMFT::cableHW2SW return 0xff for invalid HW cable ID
1 parent e311d14 commit 2dd3745

File tree

1 file changed

+1
-1
lines changed
  • Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction

1 file changed

+1
-1
lines changed

Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/ChipMappingMFT.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class ChipMappingMFT
127127
uint8_t cableHW2Pos(uint8_t ruType, uint8_t hwid) const { return mCableHW2Pos[ruType][hwid]; }
128128

129129
///< convert HW cable ID to SW ID for give RU type
130-
uint8_t cableHW2SW(uint8_t ruType, uint8_t hwid) const { return mCableHW2SW[ruType][hwid]; }
130+
uint8_t cableHW2SW(uint8_t ruType, uint8_t hwid) const { return hwid < mCableHW2SW[ruType].size() ? mCableHW2SW[ruType][hwid] : 0xff; }
131131

132132
///< convert cable iterator ID to its position on the ActiveLanes word in the GBT.header for given RU type
133133
uint8_t cablePos(uint8_t ruType, uint8_t id) const { return mCablePos[ruType][id]; }

0 commit comments

Comments
 (0)