Skip to content

Commit 0e7ad1e

Browse files
committed
fix wrong long_to_int converstion in TOF readout window indexing
1 parent 3df669b commit 0e7ad1e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Detectors/TOF/base/include/TOFBase/WindowFiller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class WindowFiller
3333

3434
unsigned long row;
3535

36-
PatternData(uint32_t patt = 0, int icr = 0, unsigned long rw = 0) : pattern(patt), icrate(icr), row(rw) {}
36+
PatternData(uint64_t patt = 0, int icr = 0, unsigned long rw = 0) : pattern(patt), icrate(icr), row(rw) {}
3737
};
3838

3939
struct CrateHeaderData {

Detectors/TOF/base/src/WindowFiller.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ void WindowFiller::fillOutputContainer(std::vector<Digit>& digits)
194194
int npatterns = 0;
195195

196196
// check if patterns are in the current row
197-
unsigned int initrow = mFirstIR.orbit * Geo::NWINDOW_IN_ORBIT;
197+
unsigned long initrow = mFirstIR.orbit * Geo::NWINDOW_IN_ORBIT;
198198
for (std::vector<PatternData>::reverse_iterator it = mCratePatterns.rbegin(); it != mCratePatterns.rend(); ++it) {
199-
unsigned int irow = it->row;
199+
unsigned long irow = it->row;
200200
// printf("pattern row=%ld (%u - %u) current=%ld\n",irow - initrow,irow,initrow,mReadoutWindowCurrent);
201201

202202
if (irow - initrow > mReadoutWindowCurrent) {

0 commit comments

Comments
 (0)