diff --git a/src/THcHitList.cxx b/src/THcHitList.cxx index e0a26fd79a2d96426d60736747a821f21ce1cba0..d467ee8850b5a0f4b81db04c471c4711fb7338c2 100644 --- a/src/THcHitList.cxx +++ b/src/THcHitList.cxx @@ -74,20 +74,19 @@ void THcHitList::InitHitList(THaDetMap* detmap, } } } - // Should add another loop over fdMap and check that all detector - // channels that have a refindex, use a defined index + // Loop to check that requested refindex's are defined for (Int_t i=0; i < fdMap->GetSize(); i++) { THaDetMap::Module* d = fdMap->GetModule(i); - if(d->plane < 1000) { - Int_t refindex = d->refindex; + Int_t refindex = d->refindex; + if(d->plane < 1000 && refindex >= 0) { if(!fRefIndexMaps[refindex].defined) { cout << "Refindex " << refindex << " not defined for " << - " (" << d->crate << ", " << d->slot << - ", " << d->lo << ")" << endl; + " (" << d->crate << ", " << d->slot << + ", " << d->lo << ")" << endl; } } } - + } Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) {