Skip to content

Commit

Permalink
Better calo verifier filter printout
Browse files Browse the repository at this point in the history
  • Loading branch information
giro94 authored and rrivera747 committed Feb 12, 2025
1 parent 584396d commit 844130f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions otsdaq-mu2e-calorimeter/ArtModules/CaloDataVerifier_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
}
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 844130f

Please sign in to comment.