From 844130f12aab7873dd2940bc3c29663ac4242ff8 Mon Sep 17 00:00:00 2001 From: Paolo Girotti Date: Wed, 12 Feb 2025 12:37:10 -0600 Subject: [PATCH] Better calo verifier filter printout --- .../ArtModules/CaloDataVerifier_module.cc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/otsdaq-mu2e-calorimeter/ArtModules/CaloDataVerifier_module.cc b/otsdaq-mu2e-calorimeter/ArtModules/CaloDataVerifier_module.cc index 61a2132..de3d651 100644 --- a/otsdaq-mu2e-calorimeter/ArtModules/CaloDataVerifier_module.cc +++ b/otsdaq-mu2e-calorimeter/ArtModules/CaloDataVerifier_module.cc @@ -172,9 +172,11 @@ bool mu2e::CaloDataVerifier::filter(art::Event& event){ total_failed_BeginMarker += event_failed_BeginMarker; total_failed_LastMarker += event_failed_LastMarker; - if (failedEvent && verbosity_ > 0){ - std::cout << "Failed event " << (int)eventNumber << "\n"; - std::cout << "Previous event was " << (int)(previousArtEvent->event()) << "\n"; + if (failedEvent){ + if (verbosity_ > 0){ + std::cout << "Failed event " << (int)eventNumber << "\n"; + //std::cout << "Previous event was " << (int)(previousArtEvent->event()) << "\n"; + } if (stopOnFailure_) throw cet::exception("CaloDataVerifier") << "Failure detected! Stopping."; } @@ -201,6 +203,8 @@ bool mu2e::CaloDataVerifier::filter(art::Event& event){ metrics_reporting_level_, artdaq::MetricMode::LastPoint); metricMan->sendMetric("nHits", int(nCaloHits), "Hits per event", metrics_reporting_level_, artdaq::MetricMode::LastPoint); + } else { + TLOG(TLVL_DEBUG + 6) << "WARNING: No metric manager found!"; } TLOG(TLVL_DEBUG + 6) << "[CaloDataVerifier::filter] found " << nCaloEvents << " calo subevents in event" << (int)eventNumber; @@ -652,10 +656,11 @@ void mu2e::CaloDataVerifier::printRunSummary(){ std::cout << "Total hits per channel:" << std::endl; for (auto board : totalHitMap){ - std::cout << "\tBoard " << board.first << std::endl; - for (auto channel : board.second){ - std::cout << "\t\tChannel " << channel.first << " , hits: " << channel.second << std::endl; + std::cout << "\tBoard " << board.first << ": "; + for (int channel=0; channel<20; channel++){ + std::cout << board.second[channel] << " "; } + std::cout << std::endl; } std::cout << "Failures:" << std::endl