Skip to content

Commit def6286

Browse files
committed
Fix signedness
1 parent 57a95e1 commit def6286

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,14 @@ bool sbnd::crt::CRTStripHitProducer::SPECTDCReference(art::Event& e, const uint6
307307
std::vector<art::Ptr<sbnd::timing::DAQTimestamp>> TDCVec;
308308
art::fill_ptr_vector(TDCVec, TDCHandle);
309309

310-
int64_t min_diff = std::numeric_limits<int64_t>::max();
310+
uint64_t min_diff = std::numeric_limits<int64_t>::max();
311311
uint64_t min_diff_ts = 0;
312312

313313
for(auto ts : TDCVec)
314314
{
315315
if(ts->Channel() == fSPECTDCETrigChannel)
316316
{
317-
int64_t diff = raw_ts > ts->Timestamp() ? raw_ts - ts->Timestamp() : ts->Timestamp() - raw_ts;
317+
uint64_t diff = raw_ts > ts->Timestamp() ? raw_ts - ts->Timestamp() : ts->Timestamp() - raw_ts;
318318

319319
if(diff < min_diff)
320320
{
@@ -346,7 +346,7 @@ bool sbnd::crt::CRTStripHitProducer::PTBHLTReference(art::Event& e, const uint64
346346
std::vector<art::Ptr<raw::ptb::sbndptb>> PTBVec;
347347
art::fill_ptr_vector(PTBVec, PTBHandle);
348348

349-
int64_t min_diff = std::numeric_limits<int64_t>::max();
349+
uint64_t min_diff = std::numeric_limits<int64_t>::max();
350350
uint64_t min_diff_ts = 0;
351351

352352
for(auto ptb : PTBVec)
@@ -360,7 +360,7 @@ bool sbnd::crt::CRTStripHitProducer::PTBHLTReference(art::Event& e, const uint64
360360
{
361361
if(hlt_word_bitset[allowed_hlt])
362362
{
363-
int64_t diff = raw_ts > hlt_timestamp ? raw_ts - hlt_timestamp : hlt_timestamp - raw_ts;
363+
uint64_t diff = raw_ts > hlt_timestamp ? raw_ts - hlt_timestamp : hlt_timestamp - raw_ts;
364364

365365
if(diff < min_diff)
366366
{

0 commit comments

Comments
 (0)