|
ATLAS Offline Software
|
Athena Algorithm Tool to decode the SCT binary format to create RDOs and inserts them to the collection.
More...
#include <SCT_RodDecoder.h>
|
int | makeRDO (const bool isOld, SharedData &data, CacheHelper &cache, DataPool< SCT3_RawData > *dataItemsPool) const |
| Builds RawData RDO and adds to RDO container. More...
|
|
StatusCode | addRODError (uint32_t rodID, SCT_ByteStreamErrors::ErrorType error, SCT_RodDecoderErrorsHelper &errs, const std::unordered_set< IdentifierHash > *foundHashes=nullptr) const |
| Add an error for each wafer in the problematic ROD. More...
|
|
StatusCode | addSingleError (const IdentifierHash &hashID, SCT_ByteStreamErrors::ErrorType error, SCT_RodDecoderErrorsHelper &errs) const |
| Add single eror. More...
|
|
StatusCode | setFirstTempMaskedChip (const IdentifierHash &hashID, unsigned int firstTempMaskedChip, SCT_RodDecoderErrorsHelper &errs) const |
| Set first temporarily masked chip information from byte stream trailer. More...
|
|
StatusCode | processHeader (const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RDO_Container &rdoIDCont, DataPool< SCT3_RawData > *dataItemsPool, CacheHelper &cache, SCT_RodDecoderErrorsHelper &errs, bool &hasError, bool &breakNow, const EventContext &ctx) const |
| Process header word. More...
|
|
StatusCode | processSuperCondensedHit (const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RDO_Container &rdoIDCont, DataPool< SCT3_RawData > *dataItemsPool, CacheHelper &cache, SCT_RodDecoderErrorsHelper &errs, bool &hasError, const EventContext &ctx) const |
| Process hit word in Super-Condensed mode. More...
|
|
StatusCode | processCondensedHit (const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RDO_Container &rdoIDCont, DataPool< SCT3_RawData > *dataItemsPool, CacheHelper &cache, SCT_RodDecoderErrorsHelper &errs, bool &hasError, const EventContext &ctx) const |
| Process hit word in Condensed mode. More...
|
|
StatusCode | processExpandedHit (const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RDO_Container &rdoIDCont, DataPool< SCT3_RawData > *dataItemsPool, CacheHelper &cache, SCT_RodDecoderErrorsHelper &errs, bool &hasError, const EventContext &ctx) const |
| Process hit word in Expanded mode. More...
|
|
StatusCode | processABCDError (const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RodDecoderErrorsHelper &errs, bool &hasError) const |
| Process ABCD error. More...
|
|
StatusCode | processRawData (const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RodDecoderErrorsHelper &errs, bool &hasError) const |
| Process raw data word. More...
|
|
StatusCode | processTrailer (const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RodDecoderErrorsHelper &errs, bool &hasError) const |
| Process trailer word. More...
|
|
Athena Algorithm Tool to decode the SCT binary format to create RDOs and inserts them to the collection.
This tool is used by the SCTRawCollByteStreamTool.
Definition at line 76 of file SCT_RodDecoder.h.
◆ SCT_DecoderNumbers
Define frequently used magic numbers.
Enumerator |
---|
N_SIDES | |
N_CHIPS_PER_SIDE | |
N_STRIPS_PER_CHIP | |
N_STRIPS_PER_SIDE | |
Definition at line 122 of file SCT_RodDecoder.h.
◆ SCT_RodDecoder()
SCT_RodDecoder::SCT_RodDecoder |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~SCT_RodDecoder()
virtual SCT_RodDecoder::~SCT_RodDecoder |
( |
| ) |
|
|
virtualdefault |
◆ addRODError()
Add an error for each wafer in the problematic ROD.
- Parameters
-
rodID | Identifer of ROD. |
errorType | Error type info. |
errs | Byte stream error container. |
foundHashes | FE-links whose headers are found. Used only for MissingLinkHeaderError. |
Definition at line 430 of file SCT_RodDecoder.cxx.
434 std::vector<IdentifierHash> hashIDs;
435 m_cabling->getHashesForRod(hashIDs, rodID);
439 if ((
error==SCT_ByteStreamErrors::MissingLinkHeaderError) and
440 foundHashes and foundHashes->count(
hash)) {
452 const bool result{
side==0 ? not link0Good : not link1Good};
457 return StatusCode::SUCCESS;
◆ addSingleError()
Add single eror.
- Parameters
-
hashID | Identifier for hash. |
bsErrorType | Byte Stream error type info. |
errs | Byte stream error container. |
error in a module using RX redundancy - add an error for the other link as well!! However, ABCDError_Chip0-ABCDError_Chip5 and TempMaskedChip0-TempMaskedChip5 are not common for two links.
Definition at line 462 of file SCT_RodDecoder.cxx.
467 ATH_MSG_INFO(
"addSingleError hashID " << hashID <<
" is invalid.");
468 return StatusCode::SUCCESS;
473 if ((error<SCT_ByteStreamErrors::ABCDError_Chip0 || error>SCT_ByteStreamErrors::ABCDError_Chip5) and
474 (error<SCT_ByteStreamErrors::TempMaskedChip0 || error>SCT_ByteStreamErrors::TempMaskedChip5)) {
475 std::pair<bool, bool> badLinks{
m_configTool->badLinks(hashID)};
477 bool result{(
side==0 ? badLinks.first : badLinks.second) and (badLinks.first xor badLinks.second)};
484 ATH_MSG_DEBUG(
"Adding error to side " << 1-
side <<
" for module with RX redundancy " << otherSide);
488 return StatusCode::SUCCESS;
◆ fillCollection()
Fill SCT RDO Collection with decoded ROB data.
Decode the rob data fragment and fill the collection SCT_RDO_Collection with the RDO built by the makeRDO(..) method. rdoIdc, and errs are updated based on robFrag and vecHash.
- Parameters
-
robFrag | ROB fragment. |
rdoIDCont | RDO ID Container to be filled. |
errs | Byte stream error container. |
vecHash | Vector of hashes. |
Unknown
Definition at line 167 of file SCT_RodDecoder.cxx.
176 const uint32_t robID{robFrag.rod_source_id()};
179 const uint32_t rodDataType{robFrag.rod_detev_type()};
180 const bool rodSimulatedData{
static_cast<bool>((rodDataType >> 20) & 0
x1)};
181 if (rodSimulatedData)
ATH_CHECK(
addRODError(robID, SCT_ByteStreamErrors::RODSimulatedData, errs));
184 const bool superCondensedMode{
static_cast<bool>((rodDataType >> 21) & 0
x1)};
189 if (robFrag.nstatus()!=0) {
191 robFrag.status(robStatus);
192 if ((*robStatus)!=0) {
193 ATH_MSG_DEBUG(
"ROB status word for robID " << std::hex << robID
194 <<
" is non-zero " << (*robStatus) << std::dec);
197 sc = StatusCode::RECOVERABLE;
199 if (((*robStatus) >> 27) & 0
x1) {
200 ATH_MSG_DEBUG(
"ROB status word for robID " << std::hex << robID
201 << std::dec <<
" indicates data truncation.");
206 if ((((*robStatus) >> 29) & 0
x1) or (((*robStatus) >> 31) & 0
x1)) {
207 ATH_MSG_DEBUG(
"ROB status word for robID " << std::hex << robID
208 << std::dec <<
" indicates resource was masked off.");
218 const long unsigned int vecRODStatusSize{robFrag.rod_nstatus()};
220 robFrag.rod_status(vecRODStatus);
221 for (
long unsigned int i{0};
i<vecRODStatusSize;
i++) {
222 const uint32_t statusWord{vecRODStatus[
i]};
225 const int timClockError{
static_cast<int>((statusWord >> 16) & 0
x1)};
226 const int bocClockError{
static_cast<int>((statusWord >> 17) & 0
x1)};
227 if (timClockError or bocClockError) {
228 ATH_MSG_DEBUG(
" Clock error in ROD status word: " << timClockError <<
" " << bocClockError);
231 sc=StatusCode::RECOVERABLE;
243 cache.vecHash = vecHash;
246 const unsigned long int vecROBDataSize{robFrag.rod_ndata()};
247 if (vecROBDataSize > robFrag.payload_size_word()) {
248 ATH_MSG_WARNING(
"The ROB data does not seem to fit in the payload. Rejecting fragment (ndata size " << vecROBDataSize <<
" !< payload size " << robFrag.payload_size_word()
249 <<
" header size: " << robFrag.rod_header_size_word()
250 <<
" trailer size: " << robFrag.rod_trailer_size_word()
251 <<
" fragment size: " << robFrag.rod_fragment_size_word()
253 return StatusCode::RECOVERABLE;
255 robFrag.rod_data(vecROBData);
258 for (
unsigned long int i{0};
i<vecROBDataSize;
i++) {
261 data16[0] = ((vecROBData[
i] >> 16) & 0xFFFF);
262 data16[1] = ( vecROBData[
i] & 0xFFFF);
264 for (
int n{0};
n<2;
n++) {
265 bool hasError{
false};
266 if (((data16[
n]>>13) & 0x7) == 0
x1) {
267 bool breakNow{
false};
269 if (hasError)
sc = StatusCode::RECOVERABLE;
273 else if (data16[
n] & 0x8000) {
274 if (not
data.foundHeader) {
275 ATH_MSG_INFO(
" Missing link header in ROD " << std::hex << robID << std::dec);
276 data.foundMissingLinkHeaderError =
true;
278 sc = StatusCode::RECOVERABLE;
282 if (superCondensedMode) {
284 if (hasError)
sc = StatusCode::RECOVERABLE;
287 else if (
data.condensedMode) {
289 if (hasError)
sc = StatusCode::RECOVERABLE;
294 if (hasError)
sc = StatusCode::RECOVERABLE;
298 else if (((data16[
n]>>13) & 0x7) == 0x0) {
300 if (hasError)
sc = StatusCode::RECOVERABLE;
303 else if (((data16[
n]>>13) & 0x7) == 0x3) {
305 if (hasError)
sc = StatusCode::RECOVERABLE;
308 else if (((data16[
n]>>13) & 0x7) == 0
x2) {
310 if (hasError)
sc = StatusCode::RECOVERABLE;
317 sc = StatusCode::RECOVERABLE;
323 if (
data.isStripValid()) {
324 if (not
data.isSaved(
false) and
data.isOldStripValid()) {
325 const int rdoMade{
makeRDO(
false,
data, cache, dataItemsPool)};
327 sc = StatusCode::RECOVERABLE;
331 data.setSaved(
false, rdoMade);
338 if (
data.foundMissingLinkHeaderError) {
342 for (
auto& [
hash, rdoColl] :
data.rdoCollMap) {
343 if (rdoColl==
nullptr)
continue;
345 if (rdoColl->empty()) {
347 errs.removeIfEmpty(
hash);
354 if (
sc.isFailure())
ATH_MSG_DEBUG(
"One or more ByteStream errors found ");
◆ finalize()
StatusCode SCT_RodDecoder::finalize |
( |
| ) |
|
|
overridevirtual |
Finalize.
Definition at line 62 of file SCT_RodDecoder.cxx.
137 ATH_MSG_INFO(
"SCT BytestreamCnv summary: unknown data-> "
142 ATH_MSG_INFO(
"SCT BytestreamCnv summary: ROD status word-> "
146 ATH_MSG_INFO(
"SCT BytestreamCnv summary: ROB status word-> "
150 ATH_MSG_INFO(
"SCT BytestreamCnv summary: ROB status word-> "
162 return StatusCode::SUCCESS;
◆ initialize()
StatusCode SCT_RodDecoder::initialize |
( |
| ) |
|
|
overridevirtual |
Initialize.
Definition at line 28 of file SCT_RodDecoder.cxx.
52 if (element->swapPhiReadoutDirection()) {
57 return StatusCode::SUCCESS;
◆ makeRDO()
Builds RawData RDO and adds to RDO container.
Method that builds the RawData RDO and add it to the collection rdoIdc and cache are updated based on other arguments.
- Returns
- Method has 3 possible return values: 1 if RDO was successfully created 0 if collection was deliberately skipped (for trigger) -1 if there was an error in the decoding - will be passed on as StatusCode::RECOVERABLE by fillCollection()
- Parameters
-
isOld | if true use data.oldStrip, otherwise use data.strip. |
data | Struct to hold data shared in methods used in fillCollection method |
cache | Cache. |
Definition at line 360 of file SCT_RodDecoder.cxx.
367 if (rdoColl==
nullptr)
return 0;
372 <<
" in collection " <<
data.linkIDHash <<
" out of range. Will not make RDO");
378 if (
data.linkIDHash == cache.skipHash) {
382 else if (
data.linkIDHash != cache.lastHash) {
383 cache.lastHash =
data.linkIDHash;
385 std::vector<IdentifierHash>::const_iterator hashIDIterator{
find(cache.vecHash->begin(),
386 cache.vecHash->end(),
388 if (hashIDIterator == cache.vecHash->end()) {
391 cache.skipHash =
data.linkIDHash;
410 const unsigned int rawDataWord{
static_cast<unsigned int>(
data.groupSize | (
strip << 11) | (
data.timeBin <<22) | (
data.errors << 25))};
412 ATH_MSG_DEBUG(
"Output Raw Data " << std::hex <<
" Coll " <<
data.collID.getString()
421 rdoColl->push_back(sct_rdo);
423 rdoColl->push_back(std::make_unique<SCT3_RawData>(digitID, rawDataWord, &(
data.errorHit)));
◆ processABCDError()
Process ABCD error.
- Parameters
-
inData | input 16 bit data word for header |
robID | ROB ID |
data | Struct to hold data shared in methods used in fillCollection method |
errs | SCT_RodDecoderErrorsHelper to fill IDCInDetBSErrContainer |
hasError | false means no error, true means at least one error |
Definition at line 1111 of file SCT_RodDecoder.cxx.
1119 if (not
data.foundHeader) {
1120 ATH_MSG_INFO(
" Missing link header in ROD " << std::hex << robID << std::dec);
1121 data.foundMissingLinkHeaderError =
true;
1127 const int chip{(inData>>3) & 0xF};
1128 const int abcError{inData & 0x7};
1130 <<
" Error code abcError " << abcError <<
" Link Number (or Stream) " <<
data.linkNumber);
1133 if (abcError!=0
x1 and abcError!=0
x2 and abcError!=0x4 and abcError!=0x7) {
1134 ATH_MSG_DEBUG(
"ABCD error has an invalid error code " << abcError
1135 <<
" the 16-bit word is 0x" << std::hex << inData << std::dec
1136 <<
" for hash " <<
data.linkIDHash);
1141 const unsigned int sideABCDError{
static_cast<unsigned int>(chip/8)};
1142 if (
data.linkIDHash.value()%2!=sideABCDError) {
1146 ATH_MSG_DEBUG(
"ABCD error and online ID have different side information for hash " <<
data.linkIDHash <<
". "
1147 << sideABCDError <<
" from ABCD error and " <<
data.linkIDHash.value()%2 <<
" from online ID");
1148 data.linkIDHash = (
data.linkIDHash.value()/2)*2+sideABCDError;
1153 ATH_MSG_DEBUG(
"ABCD error has an invalid chip 0x" << std::hex << chip << std::dec
1154 <<
" the 16-bit word is 0x" << std::hex << inData << std::dec
1155 <<
" for hash " <<
data.linkIDHash.value());
◆ processCondensedHit()
Process hit word in Condensed mode.
- Parameters
-
inData | input 16 bit data word for header |
robID | ROB ID |
data | Struct to hold data shared in methods used in fillCollection method |
rdoIDCont | RDO ID Container to be filled. |
cache | Cache. |
errs | SCT_RodDecoderErrorsHelper to fill IDCInDetBSErrContainer |
hasError | false means no error, true means at least one error |
Definition at line 865 of file SCT_RodDecoder.cxx.
877 const int chip{(inData>>11) & 0x7};
878 data.side = ((inData>>14) & 0
x1);
883 << std::hex << inData);
891 bool secondSide{
false};
892 if ((
data.side==1) and ((
data.linkNumber%2)==0)) {
895 const int rdoMade{
makeRDO(
true,
data, cache, dataItemsPool)};
901 data.setSaved(
true, rdoMade);
908 else if ((
data.side==0) and ((
data.linkNumber%2)!=0)) {
911 const int rdoMade{
makeRDO(
true,
data, cache, dataItemsPool)};
917 data.setSaved(
true, rdoMade);
925 const uint32_t onlineID{(robID & 0xFFFFFF) | (
data.linkNumber << 24)};
926 data.setCollection(
m_sctID,
m_cabling->getHashFromOnlineId(onlineID, ctx), rdoIDCont, dataItemsPool, errs);
929 if (
data.groupSize == 0) {
933 if (not (inData & 0
x1)) {
937 const int rdoMade{
makeRDO(
true,
data, cache, dataItemsPool)};
943 data.setSaved(
true, rdoMade);
949 ATH_MSG_DEBUG(
" Hit condensed : xxx ERROR in 1-hit " << std::hex << inData);
950 data.errorHit.push_back(
data.groupSize);
955 data.groupSize = (
data.groupSize>=2 ?
data.groupSize : 1);
969 const int rdoMade{
makeRDO(
true,
data, cache, dataItemsPool)};
975 data.setSaved(
true, rdoMade);
980 ATH_MSG_DEBUG(
" Hit condensed : xxx ERROR in 1st hit" << std::hex << inData);
981 data.errorHit.push_back(
data.groupSize);
987 ATH_MSG_DEBUG(
" Hit condensed : xxx ERROR in 2nd hit" << std::hex << inData);
988 data.errorHit.push_back(
data.groupSize);
◆ processExpandedHit()
Process hit word in Expanded mode.
- Parameters
-
inData | input 16 bit data word for header |
robID | ROB ID |
data | Struct to hold data shared in methods used in fillCollection method |
rdoIDCont | RDO ID Container to be filled. |
cache | Cache. |
errs | SCT_RodDecoderErrorsHelper to fill IDCInDetBSErrContainer |
hasError | false means no error, true means at least one error |
Definition at line 999 of file SCT_RodDecoder.cxx.
1012 if (not (inData & 0x8)) {
1014 chip = ((inData>>11) & 0x7);
1015 data.side = ((inData>>14) & 0
x1);
1017 data.timeBin = (inData & 0x7);
1027 bool secondSide{
false};
1028 if ((
data.side==1) and ((
data.linkNumber%2)==0)) {
1032 else if ((
data.side==0) and ((
data.linkNumber%2)!=0)) {
1037 const uint32_t onlineID{(robID & 0xFFFFFF) | (
data.linkNumber << 24)};
1038 data.setCollection(
m_sctID,
m_cabling->getHashFromOnlineId(onlineID, ctx), rdoIDCont, dataItemsPool, errs);
1041 const int rdoMade{
makeRDO(
false,
data, cache, dataItemsPool)};
1042 if (rdoMade == -1) {
1047 data.setSaved(
false, rdoMade);
1052 if (inData & 0x80) {
1062 data.timeBin = (inData & 0x7);
1064 const int rdoMade1{
makeRDO(
false,
data, cache, dataItemsPool)};
1065 if (rdoMade1 == -1) {
1070 data.setSaved(
false, rdoMade1);
1074 data.timeBin = ((inData >> 4) & 0x7);
1075 const int rdoMade2{
makeRDO(
false,
data, cache, dataItemsPool)};
1076 if (rdoMade2 == -1) {
1081 data.setSaved(
false, rdoMade2);
1094 data.timeBin = (inData & 0x7);
1096 const int rdoMade{
makeRDO(
false,
data, cache, dataItemsPool)};
1097 if (rdoMade == -1) {
1102 data.setSaved(
false, rdoMade);
◆ processHeader()
Process header word.
- Parameters
-
inData | input 16 bit data word for header |
robID | ROB ID |
data | Struct to hold data shared in methods used in fillCollection method |
rdoIDCont | RDO ID Container to be filled. |
cache | Cache. |
errs | SCT_RodDecoderErrorsHelper to fill IDCInDetBSErrContainer |
hasError | false means no error, true means at least one error |
breakNow | to tell if need to break after this method execution. |
Definition at line 657 of file SCT_RodDecoder.cxx.
670 data.foundHeader =
true;
674 if (
data.isStripValid()) {
675 if (not
data.isSaved(
false) and
data.isOldStripValid()) {
677 const int rdoMade{
makeRDO(
false,
data, cache, dataItemsPool)};
683 data.setSaved(
false, rdoMade);
692 const int rodlinkNumber{
static_cast<int>(inData & 0x7F)};
695 data.linkNumber = (((rodlinkNumber >>4)&0x7)*12+(rodlinkNumber &0xF));
696 const uint32_t onlineID{(robID & 0xFFFFFF) | (
data.linkNumber << 24)};
698 if ((onlineID ==0) or (
data.linkNumber > 95)) {
701 ATH_MSG_DEBUG(
"Header: xxx Link number out of range (skipping following data)"
702 << std::dec <<
data.linkNumber);
708 if (
hash.is_valid()) {
712 std::stringstream
msg;
713 msg <<std::hex << onlineID;
714 ATH_MSG_WARNING(
"Rob fragment (rob=" << robID <<
") with invalid onlineID " <<
msg.str() <<
" -> " <<
hash <<
".");
718 if ((inData >> 7) & 0
x1) {
723 if (inData & 0x800) {
730 if (inData & 0x1000) {
737 if (inData & 0x400) {
744 if (inData & 0x200) {
751 if ((inData & 0xF) > 11) {
757 if (!hasError and not
hash.is_valid()) {
758 std::stringstream
msg;
759 msg <<std::hex << onlineID;
760 ATH_MSG_WARNING(
"Rob fragment (rob=" << robID <<
") with invalid onlineID " <<
msg.str() <<
" -> " <<
hash <<
".");
764 data.condensedMode =
static_cast<bool>(inData & 0x100);
◆ processRawData()
Process raw data word.
- Parameters
-
inData | input 16 bit data word for header |
robID | ROB ID |
data | Struct to hold data shared in methods used in fillCollection method |
errs | SCT_RodDecoderErrorsHelper to fill IDCInDetBSErrContainer |
hasError | false means no error, true means at least one error |
Definition at line 1177 of file SCT_RodDecoder.cxx.
1185 if (not
data.foundHeader) {
1186 ATH_MSG_INFO(
" Missing link header in ROD " << std::hex << robID << std::dec);
1187 data.foundMissingLinkHeaderError =
true;
1193 ATH_MSG_DEBUG(
" xxx Raw Data Mode " << std::hex << inData << std::dec <<
": Config Data Mode ");
◆ processSuperCondensedHit()
Process hit word in Super-Condensed mode.
- Parameters
-
inData | input 16 bit data word for header |
robID | ROB ID |
data | Struct to hold data shared in methods used in fillCollection method |
rdoIDCont | RDO ID Container to be filled. |
cache | Cache. |
errs | SCT_RodDecoderErrorsHelper to fill IDCInDetBSErrContainer |
hasError | false means no error, true means at least one error |
Definition at line 769 of file SCT_RodDecoder.cxx.
786 const int chip{(inData>>11) & 0x7};
787 data.side = ((inData>>14) & 0
x1);
790 const int nStripsInWord{(inData & 0xF)+1};
793 << std::hex << inData);
801 bool secondSide{
false};
802 if ((
data.side==1) and ((
data.linkNumber%2)==0)) {
805 const int rdoMade{
makeRDO(
true,
data, cache, dataItemsPool)};
811 data.setSaved(
true, rdoMade);
818 else if ((
data.side==0) and ((
data.linkNumber%2)!=0)) {
821 const int rdoMade{
makeRDO(
true,
data, cache, dataItemsPool)};
827 data.setSaved(
true, rdoMade);
835 const uint32_t onlineID{(robID & 0xFFFFFF) | (
data.linkNumber << 24)};
837 if (!id_hash.is_valid()) {
841 data.setCollection(
m_sctID, id_hash, rdoIDCont, dataItemsPool, errs);
844 if (
data.groupSize == 0) {
850 const int rdoMade{
makeRDO(
true,
data, cache, dataItemsPool)};
856 data.setSaved(
true, rdoMade);
860 data.groupSize += nStripsInWord;
◆ processTrailer()
Process trailer word.
- Parameters
-
inData | input 16 bit data word for header |
robID | ROB ID |
data | Struct to hold data shared in methods used in fillCollection method |
errs | SCT_RodDecoderErrorsHelper to fill IDCInDetBSErrContainer |
hasError | false means no error, true means at least one error |
Definition at line 1202 of file SCT_RodDecoder.cxx.
1218 data.foundHeader =
false;
1222 if (inData & 0x1000) {
1223 ATH_MSG_DEBUG(
" Trailer: xxx Trailer ERROR " << std::hex << inData);
1229 if (inData & 0x800) {
1233 ATH_MSG_DEBUG(
" Trailer: xxx Header-Trailer limit ERROR " << std::hex << inData);
1239 if (inData & 0x400) {
1241 ATH_MSG_DEBUG(
" Trailer: xxx Data Overflow ERROR " << std::hex << inData);
◆ setFirstTempMaskedChip()
Set first temporarily masked chip information from byte stream trailer.
- Parameters
-
hashID | Identifier for hash. |
firstTempMaskedChip | Firt temporarily masked chip info. |
errs | Byte stream error container. |
Definition at line 493 of file SCT_RodDecoder.cxx.
498 ATH_MSG_INFO(
"setFirstTempMaskedChip hashID " << hashID <<
" is invalid.");
499 return StatusCode::RECOVERABLE;
501 if (firstTempMaskedChip==0) {
502 ATH_MSG_WARNING(
"setFirstTempMaskedChip: firstTempMaskedChip should be greater than 0. firstTempMaskedChip is "
503 << firstTempMaskedChip);
504 return StatusCode::RECOVERABLE;
514 unsigned int firstTempMaskedChipSide0{0};
515 if (hashID==hashSide0) firstTempMaskedChipSide0 = firstTempMaskedChip;
520 unsigned int firstTempMaskedChipSide1{0};
521 if (hashID==hashSide1) firstTempMaskedChipSide1 = firstTempMaskedChip;
525 const std::pair<bool, bool> badLinks{
m_configTool->badLinks(hashID)};
526 if (badLinks.first xor badLinks.second) {
528 if (badLinks.first and not badLinks.second) {
532 else if (badLinks.second and not badLinks.first) {
536 else if (badLinks.first and badLinks.second) {
538 ATH_MSG_WARNING(
"setFirstTempMaskedChip: Both link-0 and link-1 are working. But Rx redundancy is used... Why?");
539 return StatusCode::RECOVERABLE;
543 ATH_MSG_WARNING(
"setFirstTempMaskedChip: Both link-0 and link-1 are broken. But data are coming... Why?");
544 return StatusCode::RECOVERABLE;
553 const unsigned long long fullSerialNumber{
m_cabling->getSerialNumberFromHash(hashID).to_ulonglong()};
555 fullSerialNumber==20220170200183 or
556 fullSerialNumber==20220330200606 or
557 fullSerialNumber==20220330200693
559 if (
type!=1)
ATH_MSG_WARNING(
"Link-0 is broken but modified module readingout link-0, inconsistent");
568 fullSerialNumber==20220170200653 or
569 fullSerialNumber==20220330200117 or
570 fullSerialNumber==20220330200209 or
571 fullSerialNumber==20220330200505 or
572 fullSerialNumber==20220330200637 or
573 fullSerialNumber==20220330200701
575 if (
type!=2)
ATH_MSG_WARNING(
"Link-1 is broken but modified module readingout link-1, inconsistent");
588 {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11},
590 {6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5},
592 {0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 6},
594 {6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 0}
611 ( 0<firstTempMaskedChipSide1 and firstTempMaskedChipSide1<=
N_CHIPS_PER_SIDE)) {
612 const unsigned int swapFirstTempMaskedChipSide0{firstTempMaskedChipSide0};
613 firstTempMaskedChipSide0 = firstTempMaskedChipSide1;
614 firstTempMaskedChipSide1 = swapFirstTempMaskedChipSide0;
617 if (firstTempMaskedChipSide0>0) {
618 for (
unsigned int iChip{firstTempMaskedChipSide0-1}; iChip<
N_CHIPS_PER_SIDE; iChip++) {
630 bool toBeMasked{
false};
632 int jChip{chipOrder[
type][iChip]};
633 if (jChip==
static_cast<int>(firstTempMaskedChip-1)) toBeMasked =
true;
646 <<
" SerialNumber " <<
m_cabling->getSerialNumberFromHash(hashID).str()
647 <<
" moduleID " << moduleID
653 <<
" firstTempMaskedChip " << firstTempMaskedChip);
654 return StatusCode::SUCCESS;
◆ m_cabling
Initial value:{this,
"SCT_CablingTool",
"SCT_CablingTool",
"Tool to retrieve SCT Cabling"}
Providing mappings of online and offline identifiers and also serial numbers.
Definition at line 428 of file SCT_RodDecoder.h.
◆ m_chipNumberError
std::atomic_uint SCT_RodDecoder::m_chipNumberError {0} |
|
mutableprivate |
◆ m_condHit1Error
std::atomic_uint SCT_RodDecoder::m_condHit1Error {0} |
|
mutableprivate |
◆ m_condHit2Error
std::atomic_uint SCT_RodDecoder::m_condHit2Error {0} |
|
mutableprivate |
◆ m_configDataBit
std::atomic_uint SCT_RodDecoder::m_configDataBit {0} |
|
mutableprivate |
Total number of configuration data for raw data.
Definition at line 485 of file SCT_RodDecoder.h.
◆ m_configTool
Initial value:{this,
"ConfigTool",
"SCT_ConfigurationConditionsTool/InDetSCT_ConfigurationConditionsTool",
"Tool to retrieve SCT Configuration Tool"}
Service that keeps track of configuration conditions.
Definition at line 434 of file SCT_RodDecoder.h.
◆ m_contextSCT
◆ m_evenExpHitNumber
std::atomic_uint SCT_RodDecoder::m_evenExpHitNumber {0} |
|
mutableprivate |
Total number of consecutive paired strips with hit decoded in expanded mode.
Definition at line 449 of file SCT_RodDecoder.h.
◆ m_firstExpHitNumber
std::atomic_uint SCT_RodDecoder::m_firstExpHitNumber {0} |
|
mutableprivate |
Total number of first strips with hit decoded in expanded mode.
Definition at line 446 of file SCT_RodDecoder.h.
◆ m_flagErrorBit
std::atomic_uint SCT_RodDecoder::m_flagErrorBit {0} |
|
mutableprivate |
◆ m_headErrorBCID
std::atomic_uint SCT_RodDecoder::m_headErrorBCID {0} |
|
mutableprivate |
Total number of BCID errors in the header data.
Definition at line 461 of file SCT_RodDecoder.h.
◆ m_headErrorFormatter
std::atomic_uint SCT_RodDecoder::m_headErrorFormatter {0} |
|
mutableprivate |
Total number of formatter errors in the header data.
Definition at line 470 of file SCT_RodDecoder.h.
◆ m_headErrorLvl1ID
std::atomic_uint SCT_RodDecoder::m_headErrorLvl1ID {0} |
|
mutableprivate |
Total number of Lvl1ID errors in the header data.
Definition at line 464 of file SCT_RodDecoder.h.
◆ m_headErrorPreamble
std::atomic_uint SCT_RodDecoder::m_headErrorPreamble {0} |
|
mutableprivate |
Total number of preamble errors in the header data.
Definition at line 473 of file SCT_RodDecoder.h.
◆ m_headErrorTimeout
std::atomic_uint SCT_RodDecoder::m_headErrorTimeout {0} |
|
mutableprivate |
Total number of timeout errors in the header data.
Definition at line 467 of file SCT_RodDecoder.h.
◆ m_headNumber
std::atomic_uint SCT_RodDecoder::m_headNumber {0} |
|
mutableprivate |
◆ m_lastExpHitNumber
std::atomic_uint SCT_RodDecoder::m_lastExpHitNumber {0} |
|
mutableprivate |
Total number of last consecutive strips with hit decoded in expanded mode.
Definition at line 452 of file SCT_RodDecoder.h.
◆ m_maskedLinkNumber
std::atomic_uint SCT_RodDecoder::m_maskedLinkNumber {0} |
|
mutableprivate |
Total number of masked links in the header data.
Definition at line 509 of file SCT_RodDecoder.h.
◆ m_maskedRODNumber
std::atomic_uint SCT_RodDecoder::m_maskedRODNumber {0} |
|
mutableprivate |
◆ m_nHits
std::atomic_uint SCT_RodDecoder::m_nHits {0} |
|
mutableprivate |
◆ m_nRDOs
std::atomic_uint SCT_RodDecoder::m_nRDOs {0} |
|
mutableprivate |
◆ m_numMissingLinkHeader
std::atomic_uint SCT_RodDecoder::m_numMissingLinkHeader {0} |
|
mutableprivate |
◆ m_pairedCondHitNumber
std::atomic_uint SCT_RodDecoder::m_pairedCondHitNumber {0} |
|
mutableprivate |
Total number of paired strips with hit decoded in condensed mode.
Definition at line 443 of file SCT_RodDecoder.h.
◆ m_rodClockErrorNumber
std::atomic_uint SCT_RodDecoder::m_rodClockErrorNumber {0} |
|
mutableprivate |
◆ m_sctID
◆ m_singleCondHitNumber
std::atomic_uint SCT_RodDecoder::m_singleCondHitNumber {0} |
|
mutableprivate |
Total number of single strips with hit decoded in condensed mode.
Definition at line 440 of file SCT_RodDecoder.h.
◆ m_swapPhiReadoutDirection
std::vector<bool> SCT_RodDecoder::m_swapPhiReadoutDirection {} |
|
private |
◆ m_trailerErrorBit
std::atomic_uint SCT_RodDecoder::m_trailerErrorBit {0} |
|
mutableprivate |
◆ m_trailerErrorLimit
std::atomic_uint SCT_RodDecoder::m_trailerErrorLimit {0} |
|
mutableprivate |
Total number of header trailer limit errors in the trailer data.
Definition at line 479 of file SCT_RodDecoder.h.
◆ m_trailerErrorOverflow
std::atomic_uint SCT_RodDecoder::m_trailerErrorOverflow {0} |
|
mutableprivate |
Total number of overflow errors in the trailer data.
Definition at line 476 of file SCT_RodDecoder.h.
◆ m_trailerNumber
std::atomic_uint SCT_RodDecoder::m_trailerNumber {0} |
|
mutableprivate |
◆ m_truncatedRODNumber
std::atomic_uint SCT_RodDecoder::m_truncatedRODNumber {0} |
|
mutableprivate |
◆ m_unknownDataFormat
std::atomic_uint SCT_RodDecoder::m_unknownDataFormat {0} |
|
mutableprivate |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
StatusCode processRawData(const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RodDecoderErrorsHelper &errs, bool &hasError) const
Process raw data word.
std::atomic_uint m_headErrorPreamble
Total number of preamble errors in the header data.
char data[hepevt_bytes_allocation_ATLAS]
std::atomic_uint m_nHits
Total number of SCT hits in ByteStream.
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
StatusCode processHeader(const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RDO_Container &rdoIDCont, DataPool< SCT3_RawData > *dataItemsPool, CacheHelper &cache, SCT_RodDecoderErrorsHelper &errs, bool &hasError, bool &breakNow, const EventContext &ctx) const
Process header word.
std::atomic_uint m_condHit2Error
Total number second hit data errors.
std::string find(const std::string &s)
return a remapped string
std::atomic_uint m_maskedLinkNumber
Total number of masked links in the header data.
bool is_sct(Identifier id) const
std::atomic_uint m_trailerErrorLimit
Total number of header trailer limit errors in the trailer data.
void add(const IdentifierHash id, SCT_ByteStreamErrors::ErrorType etype)
std::atomic_uint m_trailerErrorOverflow
Total number of overflow errors in the trailer data.
std::atomic_uint m_maskedRODNumber
Total number of masked RDOs.
std::atomic_uint m_pairedCondHitNumber
Total number of paired strips with hit decoded in condensed mode.
std::atomic_uint m_flagErrorBit
Total number of flag error data.
std::atomic_uint m_headErrorTimeout
Total number of timeout errors in the header data.
IdContext m_contextSCT
"Context" of an expanded identifier (ExpandedIdentifier) for compact or hash versions (Identifier32 o...
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int phi_module(const Identifier &id) const
#define ATH_MSG_VERBOSE(x)
StatusCode processExpandedHit(const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RDO_Container &rdoIDCont, DataPool< SCT3_RawData > *dataItemsPool, CacheHelper &cache, SCT_RodDecoderErrorsHelper &errs, bool &hasError, const EventContext &ctx) const
Process hit word in Expanded mode.
Identifier module_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
ErrorType TempMaskedChipToBit(const int chip)
std::atomic_uint m_unknownDataFormat
Total number of unknown data formats.
StatusCode processTrailer(const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RodDecoderErrorsHelper &errs, bool &hasError) const
Process trailer word.
std::atomic_uint m_headErrorFormatter
Total number of formatter errors in the header data.
std::atomic_uint m_firstExpHitNumber
Total number of first strips with hit decoded in expanded mode.
std::atomic_uint m_truncatedRODNumber
Total number of truncated ROBFragments.
StatusCode setFirstTempMaskedChip(const IdentifierHash &hashID, unsigned int firstTempMaskedChip, SCT_RodDecoderErrorsHelper &errs) const
Set first temporarily masked chip information from byte stream trailer.
const DataType * PointerType
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
std::atomic_uint m_condHit1Error
Total number of first hit data errors.
std::atomic_uint m_trailerNumber
Total number of decoded trailer data.
StatusCode processABCDError(const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RodDecoderErrorsHelper &errs, bool &hasError) const
Process ABCD error.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::atomic_uint m_singleCondHitNumber
Total number of single strips with hit decoded in condensed mode.
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const override final
Create hash id from compact id (return == 0 for OK)
std::atomic_uint m_rodClockErrorNumber
Total number of ROD clock errors.
IdContext wafer_context(void) const
int get_other_side(const IdentifierHash &id, IdentifierHash &other) const
Wafer hash on other side.
ToolHandle< ISCT_CablingTool > m_cabling
Providing mappings of online and offline identifiers and also serial numbers.
ToolHandle< ISCT_ConfigurationConditionsTool > m_configTool
Service that keeps track of configuration conditions.
std::atomic_uint m_configDataBit
Total number of configuration data for raw data.
bool is_valid() const
Check if id is in a valid state.
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
std::atomic_uint m_headNumber
Total number of decoded header data.
std::atomic_uint m_evenExpHitNumber
Total number of consecutive paired strips with hit decoded in expanded mode.
size_type wafer_hash_max(void) const
int layer_disk(const Identifier &id) const
allows to accumulate errors in one fillColection call
std::atomic_uint m_numMissingLinkHeader
Total number of missing link headers.
#define ATH_MSG_WARNING(x)
std::atomic_uint m_headErrorLvl1ID
Total number of Lvl1ID errors in the header data.
std::atomic_uint m_headErrorBCID
Total number of BCID errors in the header data.
std::vector< bool > m_swapPhiReadoutDirection
Swap phi readout direction.
std::atomic_uint m_trailerErrorBit
Total number of trailer bit errors.
int eta_module(const Identifier &id) const
std::atomic_uint m_lastExpHitNumber
Total number of last consecutive strips with hit decoded in expanded mode.
StatusCode processSuperCondensedHit(const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RDO_Container &rdoIDCont, DataPool< SCT3_RawData > *dataItemsPool, CacheHelper &cache, SCT_RodDecoderErrorsHelper &errs, bool &hasError, const EventContext &ctx) const
Process hit word in Super-Condensed mode.
int side(const Identifier &id) const
StatusCode addSingleError(const IdentifierHash &hashID, SCT_ByteStreamErrors::ErrorType error, SCT_RodDecoderErrorsHelper &errs) const
Add single eror.
std::atomic_uint m_chipNumberError
Total number of chip number errors.
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const SCT_ID * m_sctID
Identifier helper class for the SCT subdetector that creates compact Identifier objects and Identifie...
int makeRDO(const bool isOld, SharedData &data, CacheHelper &cache, DataPool< SCT3_RawData > *dataItemsPool) const
Builds RawData RDO and adds to RDO container.
StatusCode processCondensedHit(const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RDO_Container &rdoIDCont, DataPool< SCT3_RawData > *dataItemsPool, CacheHelper &cache, SCT_RodDecoderErrorsHelper &errs, bool &hasError, const EventContext &ctx) const
Process hit word in Condensed mode.
void noerror(const IdentifierHash id)
StatusCode addRODError(uint32_t rodID, SCT_ByteStreamErrors::ErrorType error, SCT_RodDecoderErrorsHelper &errs, const std::unordered_set< IdentifierHash > *foundHashes=nullptr) const
Add an error for each wafer in the problematic ROD.
std::atomic_uint m_nRDOs
Total number of SCT RDOs created.
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.