diff --git a/src/THcHitList.cxx b/src/THcHitList.cxx index a48d75514a1077fe8b55f2add13f7efa42b8c7b2..a62908ceedad51df21d950a6d2c47ec8e811c59c 100644 --- a/src/THcHitList.cxx +++ b/src/THcHitList.cxx @@ -135,7 +135,7 @@ multiple signal types (e.g. ADC+, ADC-, TDC+, TDC-), or multiplehits for multihi The hit list is sorted (by plane, counter) after filling. */ -Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) { +Int_t THcHitList::DecodeToHitList( const THaEvData& evdata, Bool_t suppresswarnings ) { // cout << " Clearing TClonesArray " << endl; fRawHitList->Clear( ); @@ -235,21 +235,25 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) { Int_t reftime = evdata.GetData(d->crate, d->slot, d->refchan, 0); rawhit->SetReference(signal, reftime); } else { - cout << "HitList(event=" << evdata.GetEvNum() << "): refchan " << d->refchan << - " missing for (" << d->crate << ", " << d->slot << - ", " << chan << ")" << endl; + if(!suppresswarnings) { + cout << "HitList(event=" << evdata.GetEvNum() << "): refchan " << d->refchan << + " missing for (" << d->crate << ", " << d->slot << + ", " << chan << ")" << endl; + } } } else { if(d->refindex >=0 && d->refindex < fNRefIndex) { if(fRefIndexMaps[d->refindex].hashit) { rawhit->SetReference(signal, fRefIndexMaps[d->refindex].reftime); } else { - cout << "HitList(event=" << evdata.GetEvNum() << "): refindex " << d->refindex << - " (" << fRefIndexMaps[d->refindex].crate << - ", " << fRefIndexMaps[d->refindex].slot << - ", " << fRefIndexMaps[d->refindex].channel << ")" << - " missing for (" << d->crate << ", " << d->slot << - ", " << chan << ")" << endl; + if(!suppresswarnings) { + cout << "HitList(event=" << evdata.GetEvNum() << "): refindex " << d->refindex << + " (" << fRefIndexMaps[d->refindex].crate << + ", " << fRefIndexMaps[d->refindex].slot << + ", " << fRefIndexMaps[d->refindex].channel << ")" << + " missing for (" << d->crate << ", " << d->slot << + ", " << chan << ")" << endl; + } } } } @@ -288,21 +292,25 @@ Int_t THcHitList::DecodeToHitList( const THaEvData& evdata ) { Int_t reftime = evdata.GetData(Decoder::kPulseTime, d->crate, d->slot, d->refchan, 0); rawhit->SetReference(signal, reftime); } else { - cout << "HitList(event=" << evdata.GetEvNum() << "): refchan " << d->refchan << - " missing for (" << d->crate << ", " << d->slot << - ", " << chan << ")" << endl; + if(!suppresswarnings) { + cout << "HitList(event=" << evdata.GetEvNum() << "): refchan " << d->refchan << + " missing for (" << d->crate << ", " << d->slot << + ", " << chan << ")" << endl; + } } } else { if(d->refindex >=0 && d->refindex < fNRefIndex) { if(fRefIndexMaps[d->refindex].hashit) { rawhit->SetReference(signal, fRefIndexMaps[d->refindex].reftime); } else { - cout << "HitList(event=" << evdata.GetEvNum() << "): refindex " << d->refindex << - " (" << fRefIndexMaps[d->refindex].crate << - ", " << fRefIndexMaps[d->refindex].slot << - ", " << fRefIndexMaps[d->refindex].channel << ")" << - " missing for (" << d->crate << ", " << d->slot << - ", " << chan << ")" << endl; + if(!suppresswarnings) { + cout << "HitList(event=" << evdata.GetEvNum() << "): refindex " << d->refindex << + " (" << fRefIndexMaps[d->refindex].crate << + ", " << fRefIndexMaps[d->refindex].slot << + ", " << fRefIndexMaps[d->refindex].channel << ")" << + " missing for (" << d->crate << ", " << d->slot << + ", " << chan << ")" << endl; + } } } } diff --git a/src/THcHitList.h b/src/THcHitList.h index 9ab07220b2f1707f138523071c75c88b46a06833..7611e14101b2178294a695f11ded538308668a06 100644 --- a/src/THcHitList.h +++ b/src/THcHitList.h @@ -28,7 +28,7 @@ public: THcHitList(); - virtual Int_t DecodeToHitList( const THaEvData& ); + virtual Int_t DecodeToHitList( const THaEvData&, Bool_t suppress=kFALSE ); void InitHitList(THaDetMap* detmap, const char *hitclass, Int_t maxhits);