@@ -60,8 +60,8 @@ class RawPixelDecoder final : public PixelReader
6060 void collectROFCableData (int iru);
6161 int decodeNextTrigger () final ;
6262
63- template <class DigitContainer , class ROFContainer , class STATVEC >
64- int fillDecodedDigits (DigitContainer& digits, ROFContainer& rofs, STATVEC& chipStatus );
63+ template <class DigitContainer , class ROFContainer >
64+ int fillDecodedDigits (DigitContainer& digits, ROFContainer& rofs);
6565
6666 template <class STATVEC >
6767 void fillChipsStatus (STATVEC& chipStatus);
@@ -128,6 +128,7 @@ class RawPixelDecoder final : public PixelReader
128128
129129 uint16_t getSquashingDepth () { return 0 ; }
130130 bool doIRMajorityPoll ();
131+ bool isRampUpStage () const { return mROFRampUpStage ; }
131132 void reset ();
132133
133134 private:
@@ -179,8 +180,8 @@ class RawPixelDecoder final : public PixelReader
179180// /______________________________________________________________
180181// / Fill decoded digits to global vector
181182template <class Mapping >
182- template <class DigitContainer , class ROFContainer , class STATVEC >
183- int RawPixelDecoder<Mapping>::fillDecodedDigits(DigitContainer& digits, ROFContainer& rofs, STATVEC& chipStatus )
183+ template <class DigitContainer , class ROFContainer >
184+ int RawPixelDecoder<Mapping>::fillDecodedDigits(DigitContainer& digits, ROFContainer& rofs)
184185{
185186 if (mInteractionRecord .isDummy ()) {
186187 return 0 ; // nothing was decoded
@@ -190,7 +191,6 @@ int RawPixelDecoder<Mapping>::fillDecodedDigits(DigitContainer& digits, ROFConta
190191 for (unsigned int iru = 0 ; iru < mRUDecodeVec .size (); iru++) {
191192 for (int ic = 0 ; ic < mRUDecodeVec [iru].nChipsFired ; ic++) {
192193 const auto & chip = mRUDecodeVec [iru].chipsData [ic];
193- chipStatus[chip.getChipID ()] = 1 ;
194194 for (const auto & hit : mRUDecodeVec [iru].chipsData [ic].getData ()) {
195195 digits.emplace_back (chip.getChipID (), hit.getRow (), hit.getCol ());
196196 }
@@ -205,8 +205,8 @@ int RawPixelDecoder<Mapping>::fillDecodedDigits(DigitContainer& digits, ROFConta
205205// /______________________________________________________________
206206// / Fill decoded digits to global vector
207207template <>
208- template <class DigitContainer , class ROFContainer , class STATVEC >
209- int RawPixelDecoder<ChipMappingMFT>::fillDecodedDigits(DigitContainer& digits, ROFContainer& rofs, STATVEC& chipStatus )
208+ template <class DigitContainer , class ROFContainer >
209+ int RawPixelDecoder<ChipMappingMFT>::fillDecodedDigits(DigitContainer& digits, ROFContainer& rofs)
210210{
211211 if (mInteractionRecord .isDummy ()) {
212212 return 0 ; // nothing was decoded
@@ -216,7 +216,6 @@ int RawPixelDecoder<ChipMappingMFT>::fillDecodedDigits(DigitContainer& digits, R
216216 for (auto chipData = mOrderedChipsPtr .rbegin (); chipData != mOrderedChipsPtr .rend (); ++chipData) {
217217 assert (mLastReadChipID < (*chipData)->getChipID ());
218218 mLastReadChipID = (*chipData)->getChipID ();
219- chipStatus[mLastReadChipID ] = 1 ;
220219 for (const auto & hit : (*chipData)->getData ()) {
221220 digits.emplace_back (mLastReadChipID , hit.getRow (), hit.getCol ());
222221 }
@@ -233,13 +232,12 @@ template <class Mapping>
233232template <class STATVEC >
234233void RawPixelDecoder<Mapping>::fillChipsStatus(STATVEC& chipStatus)
235234{
236- if (mInteractionRecord .isDummy ()) {
235+ if (mInteractionRecord .isDummy () || mROFRampUpStage ) {
237236 return ; // nothing was decoded
238237 }
239238 for (unsigned int iru = 0 ; iru < mRUDecodeVec .size (); iru++) {
240- for (int ic = 0 ; ic < mRUDecodeVec [iru].nChipsFired ; ic++) {
241- const auto & chip = mRUDecodeVec [iru].chipsData [ic];
242- chipStatus[chip.getChipID ()] = 1 ;
239+ for (auto chID : mRUDecodeVec [iru].seenChipIDs ) {
240+ chipStatus[chID] = 1 ;
243241 }
244242 }
245243}
0 commit comments