Skip to content

Commit 4fb71e5

Browse files
noferinishahor02
authored andcommitted
fix bad truncation when filling TOF dia
1 parent 373f808 commit 4fb71e5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Detectors/TOF/base/src/WindowFiller.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,14 @@ void WindowFiller::fillOutputContainer(std::vector<Digit>& digits)
196196
// check if patterns are in the current row
197197
unsigned int initrow = mFirstIR.orbit * Geo::NWINDOW_IN_ORBIT;
198198
for (std::vector<PatternData>::reverse_iterator it = mCratePatterns.rbegin(); it != mCratePatterns.rend(); ++it) {
199-
//printf("pattern row=%ld current=%ld\n",it->row - initrow,mReadoutWindowCurrent);
199+
unsigned int irow = it->row;
200+
// printf("pattern row=%ld (%u - %u) current=%ld\n",irow - initrow,irow,initrow,mReadoutWindowCurrent);
200201

201-
if (it->row - initrow > mReadoutWindowCurrent) {
202+
if (irow - initrow > mReadoutWindowCurrent) {
202203
break;
203204
}
204205

205-
if (it->row - initrow < mReadoutWindowCurrent) { // this should not happen
206+
if (irow - initrow < mReadoutWindowCurrent) { // this should not happen
206207
LOG(error) << "One pattern skipped because appears to occur early of the current row " << it->row << " < " << mReadoutWindowCurrent << " ?!";
207208
} else {
208209
uint32_t cpatt = it->pattern;

0 commit comments

Comments
 (0)