Skip to content

Commit

Permalink
fix bad truncation when filling TOF dia
Browse files Browse the repository at this point in the history
  • Loading branch information
noferini authored and shahor02 committed Sep 24, 2024
1 parent 373f808 commit 4fb71e5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Detectors/TOF/base/src/WindowFiller.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,14 @@ void WindowFiller::fillOutputContainer(std::vector<Digit>& digits)
// check if patterns are in the current row
unsigned int initrow = mFirstIR.orbit * Geo::NWINDOW_IN_ORBIT;
for (std::vector<PatternData>::reverse_iterator it = mCratePatterns.rbegin(); it != mCratePatterns.rend(); ++it) {
//printf("pattern row=%ld current=%ld\n",it->row - initrow,mReadoutWindowCurrent);
unsigned int irow = it->row;
// printf("pattern row=%ld (%u - %u) current=%ld\n",irow - initrow,irow,initrow,mReadoutWindowCurrent);

if (it->row - initrow > mReadoutWindowCurrent) {
if (irow - initrow > mReadoutWindowCurrent) {
break;
}

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

0 comments on commit 4fb71e5

Please sign in to comment.