21 const IInterface* parent) :
22 base_class(
type, name, parent)
48 ATH_CHECK(detStore()->retrieve(sctDetManager,
"SCT"));
52 if (element->swapPhiReadoutDirection()) {
57 return StatusCode::SUCCESS;
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;
171 const EventContext& ctx,
172 const std::vector<IdentifierHash>* vecHash)
const
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) & 0x1)};
181 if (rodSimulatedData)
ATH_CHECK(
addRODError(robID, SCT_ByteStreamErrors::RODSimulatedData, errs));
184 const bool superCondensedMode{
static_cast<bool>((rodDataType >> 21) & 0x1)};
186 StatusCode
sc{StatusCode::SUCCESS};
189 if (robFrag.nstatus()!=0) {
190 const uint32_t* robStatus;
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) & 0x1) {
200 ATH_MSG_DEBUG(
"ROB status word for robID " << std::hex << robID
201 << std::dec <<
" indicates data truncation.");
206 if ((((*robStatus) >> 29) & 0x1) or (((*robStatus) >> 31) & 0x1)) {
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) & 0x1)};
226 const int bocClockError{
static_cast<int>((statusWord >> 17) & 0x1)};
227 if (timClockError or bocClockError) {
228 ATH_MSG_DEBUG(
" Clock error in ROD status word: " << timClockError <<
" " << bocClockError);
231 sc=StatusCode::RECOVERABLE;
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) == 0x1) {
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) == 0x2) {
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()) {
351 ATH_CHECK(
data.writeHandleMap[hash].addOrDelete(std::move(rdoColl)));
354 if (
sc.isFailure())
ATH_MSG_DEBUG(
"One or more ByteStream errors found ");
367 if (rdoColl==
nullptr)
return 0;
372 <<
" in collection " <<
data.linkIDHash <<
" (= " <<
m_cabling->getSerialNumberFromHash(
data.linkIDHash) <<
") out of range. Will not make RDO");
385 std::vector<IdentifierHash>::const_iterator hashIDIterator{
find(cache.
vecHash->begin(),
388 if (hashIDIterator == cache.
vecHash->end()) {
405 if (not
m_sctID->is_sct(digitID)) {
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()
413 <<
":-> " <<
m_sctID->print_to_string(digitID) << std::dec);
423 rdoColl->
push_back(std::make_unique<SCT3_RawData>(digitID, rawDataWord, &(
data.errorHit)));
432 const std::unordered_set<IdentifierHash>* foundHashes)
const
434 std::vector<IdentifierHash> hashIDs;
435 m_cabling->getHashesForRod(hashIDs, rodID);
439 if ((
error==SCT_ByteStreamErrors::MissingLinkHeaderError) and
440 foundHashes and foundHashes->count(hash)) {
450 const auto & [link0Good, link1Good] =
m_configTool->badLinks(hash);
452 const bool result{side==0 ? not link0Good : not link1Good};
457 return StatusCode::SUCCESS;
467 ATH_MSG_INFO(
"addSingleError hashID " << hashID <<
" is invalid.");
468 return StatusCode::SUCCESS;
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)};
482 m_sctID->get_other_side(hashID, otherSide);
484 ATH_MSG_DEBUG(
"Adding error to side " << 1-side <<
" for module with RX redundancy " << otherSide);
488 return StatusCode::SUCCESS;
494 unsigned int firstTempMaskedChip,
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;
519 m_sctID->get_other_side(hashSide0, hashSide1);
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
648 <<
" barrel_ec " <<
m_sctID->barrel_ec(waferID)
649 <<
" layer_disk " <<
m_sctID->layer_disk(waferID)
650 <<
" eta_module " <<
m_sctID->eta_module(waferID)
651 <<
" phi_module " <<
m_sctID->phi_module(waferID)
652 <<
" side " <<
m_sctID->side(waferID)
653 <<
" firstTempMaskedChip " << firstTempMaskedChip);
654 return StatusCode::SUCCESS;
658 const uint32_t robID,
666 const EventContext& ctx)
const
668 StatusCode
sc{StatusCode::SUCCESS};
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);
707 hash =
m_cabling->getHashFromOnlineId(onlineID, ctx);
708 if (hash.is_valid()) {
709 data.setCollection(
m_sctID, hash, rdoIDCont, dataItemsPool, errs);
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) & 0x1) {
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);
770 const uint32_t robID,
777 const EventContext& ctx)
const
779 StatusCode
sc{StatusCode::SUCCESS};
786 const int chip{(inData>>11) & 0x7};
787 data.side = ((inData>>14) & 0x1);
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)};
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;
866 const uint32_t robID,
873 const EventContext& ctx)
const
875 StatusCode
sc{StatusCode::SUCCESS};
877 const int chip{(inData>>11) & 0x7};
878 data.side = ((inData>>14) & 0x1);
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 & 0x1)) {
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);
1000 const uint32_t robID,
1007 const EventContext& ctx)
const
1009 StatusCode
sc{StatusCode::SUCCESS};
1012 if (not (inData & 0x8)) {
1014 chip = ((inData>>11) & 0x7);
1015 data.side = ((inData>>14) & 0x1);
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);
1112 const uint32_t robID,
1115 bool& hasError)
const
1117 StatusCode
sc{StatusCode::SUCCESS};
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!=0x1 and abcError!=0x2 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());
1178 const uint32_t robID,
1181 bool& hasError)
const
1183 StatusCode
sc{StatusCode::SUCCESS};
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 ");
1206 bool& hasError)
const
1208 StatusCode
sc{StatusCode::SUCCESS};
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);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
InDetRawDataCollection< SCT_RDORawData > SCT_RDO_Collection
InDetRawDataContainer< InDetRawDataCollection< SCT_RDORawData > > SCT_RDO_Container
a typed memory pool that saves time spent allocation small object.
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
value_type push_back(value_type pElem)
IDC like storage for BS errors, TODO, customise implementation further so that we store int rather th...
This is a "hash" representation of an Identifier.
bool is_valid() const
Check if id is in a valid state.
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated SCT in...
virtual const SiDetectorElementCollection * getDetectorElementCollection() const override
access to whole collectiom
Class to hold the SiDetectorElement objects to be put in the detector store.
Class to hold geometrical description of a silicon detector element.
allows to accumulate errors in one fillColection call
void add(const IdentifierHash id, SCT_ByteStreamErrors::ErrorType etype)
void removeIfEmpty(const IdentifierHash id)
void noerror(const IdentifierHash id)
std::atomic_uint m_firstExpHitNumber
Total number of first strips with hit decoded in expanded mode.
StatusCode addSingleError(const IdentifierHash &hashID, SCT_ByteStreamErrors::ErrorType error, SCT_RodDecoderErrorsHelper &errs) const
Add single eror.
std::atomic_uint m_singleCondHitNumber
Total number of single strips with hit decoded in condensed mode.
std::atomic_uint m_nHits
Total number of SCT hits in ByteStream.
StatusCode processRawData(const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RodDecoderErrorsHelper &errs, bool &hasError) const
Process raw data word.
ToolHandle< ISCT_ConfigurationConditionsTool > m_configTool
Service that keeps track of configuration conditions.
std::atomic_uint m_pairedCondHitNumber
Total number of paired strips with hit decoded in condensed mode.
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.
std::atomic_uint m_headNumber
Total number of decoded header data.
StatusCode setFirstTempMaskedChip(const IdentifierHash &hashID, unsigned int firstTempMaskedChip, SCT_RodDecoderErrorsHelper &errs) const
Set first temporarily masked chip information from byte stream trailer.
IdContext m_contextSCT
"Context" of an expanded identifier (ExpandedIdentifier) for compact or hash versions (Identifier32 o...
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_headErrorFormatter
Total number of formatter errors in the header data.
std::atomic_uint m_headErrorLvl1ID
Total number of Lvl1ID errors in the header data.
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.
std::atomic_uint m_truncatedRODNumber
Total number of truncated ROBFragments.
std::atomic_uint m_flagErrorBit
Total number of flag error data.
std::atomic_uint m_maskedRODNumber
Total number of masked RDOs.
std::atomic_uint m_headErrorTimeout
Total number of timeout errors in the header data.
std::atomic_uint m_trailerErrorBit
Total number of trailer bit errors.
StatusCode processABCDError(const uint16_t inData, const uint32_t robID, SharedData &data, SCT_RodDecoderErrorsHelper &errs, bool &hasError) const
Process ABCD error.
SCT_RodDecoder(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
std::atomic_uint m_rodClockErrorNumber
Total number of ROD clock errors.
std::atomic_uint m_trailerErrorOverflow
Total number of overflow errors in the trailer data.
const SCT_ID * m_sctID
Identifier helper class for the SCT subdetector that creates compact Identifier objects and Identifie...
std::atomic_uint m_headErrorPreamble
Total number of preamble errors in the header data.
std::vector< bool > m_swapPhiReadoutDirection
Swap phi readout direction.
std::atomic_uint m_condHit1Error
Total number of first hit data errors.
virtual StatusCode finalize() override
Finalize.
std::atomic_uint m_chipNumberError
Total number of chip number errors.
virtual StatusCode initialize() override
Initialize.
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_maskedLinkNumber
Total number of masked links in the header data.
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.
std::atomic_uint m_nRDOs
Total number of SCT RDOs created.
std::atomic_uint m_unknownDataFormat
Total number of unknown data formats.
std::atomic_uint m_headErrorBCID
Total number of BCID errors in the header data.
std::atomic_uint m_lastExpHitNumber
Total number of last consecutive strips with hit decoded in expanded mode.
ToolHandle< ISCT_CablingTool > m_cabling
Providing mappings of online and offline identifiers and also serial numbers.
std::atomic_uint m_trailerNumber
Total number of decoded trailer data.
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_configDataBit
Total number of configuration data for raw data.
int makeRDO(const bool isOld, SharedData &data, CacheHelper &cache, DataPool< SCT3_RawData > *dataItemsPool) const
Builds RawData RDO and adds to RDO container.
virtual StatusCode fillCollection(const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment &robFrag, SCT_RDO_Container &rdoIDCont, IDCInDetBSErrContainer &errs, DataPool< SCT3_RawData > *dataItemsPool, const EventContext &ctx, const std::vector< IdentifierHash > *vecHash=nullptr) const override
Fill SCT RDO Collection with decoded ROB data.
std::atomic_uint m_evenExpHitNumber
Total number of consecutive paired strips with hit decoded in expanded mode.
std::atomic_uint m_numMissingLinkHeader
Total number of missing link headers.
std::atomic_uint m_trailerErrorLimit
Total number of header trailer limit errors in the trailer data.
std::atomic_uint m_condHit2Error
Total number second hit data errors.
std::string find(const std::string &s)
return a remapped string
const DataType * PointerType
eformat::ROBFragment< PointerType > ROBFragment
ErrorType
SCT byte stream error type enums used in SCT_RodDecoder, SCT_ByteStreamErrorsTool,...
ErrorType TempMaskedChipToBit(const int chip)
Temp object to help with trigger caching.
const std::vector< IdentifierHash > * vecHash
Struct to hold data shared in methods used in fillCollection method.