From 9d6b1d58c68861a825459e3f1961f3cd019a90f3 Mon Sep 17 00:00:00 2001 From: Tamas Vami Date: Sun, 25 Aug 2024 09:49:43 -0700 Subject: [PATCH] Fix the precision of the tracking performance printouts --- Tracking/src/Tracking/Reco/CKFProcessor.cxx | 29 ++++++++++++------- .../src/Tracking/Reco/SeedFinderProcessor.cxx | 3 +- .../src/Tracking/Reco/VertexProcessor.cxx | 3 +- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Tracking/src/Tracking/Reco/CKFProcessor.cxx b/Tracking/src/Tracking/Reco/CKFProcessor.cxx index 434f79a3c..57cbeab20 100644 --- a/Tracking/src/Tracking/Reco/CKFProcessor.cxx +++ b/Tracking/src/Tracking/Reco/CKFProcessor.cxx @@ -633,19 +633,26 @@ void CKFProcessor::onProcessStart() { void CKFProcessor::onProcessEnd() { ldmx_log(info) << "found " << ntracks_ << " tracks / " << nseeds_ << " nseeds"; - ldmx_log(info) << "AVG Time/Event: " << processing_time_ / nevents_ << " ms"; + ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(4) + << processing_time_ / nevents_ << " ms"; ldmx_log(info) << "Breakdown::"; - ldmx_log(info) << "setup Avg Time/Event = " - << profiling_map_["setup"] / nevents_ << " ms"; - ldmx_log(info) << "hits Avg Time/Event = " - << profiling_map_["hits"] / nevents_ << " ms"; - ldmx_log(info) << "seeds Avg Time/Event = " - << profiling_map_["seeds"] / nevents_ << " ms"; - ldmx_log(info) << "cf_setup Avg Time/Event = " + ldmx_log(info) << "setup Avg Time/Event = " << std::fixed + << std::setprecision(4) << profiling_map_["setup"] / nevents_ + << " ms"; + ldmx_log(info) << "hits Avg Time/Event = " << std::fixed + << std::setprecision(4) << profiling_map_["hits"] / nevents_ + << " ms"; + ldmx_log(info) << "seeds Avg Time/Event = " << std::fixed + << std::setprecision(4) << profiling_map_["seeds"] / nevents_ + << " ms"; + ldmx_log(info) << "cf_setup Avg Time/Event = " << std::fixed + << std::setprecision(4) << profiling_map_["ckf_setup"] / nevents_ << " ms"; - ldmx_log(info) << "ckf_run Avg Time/Event = " - << profiling_map_["ckf_run"] / nevents_ << " ms"; - ldmx_log(info) << "result_loop Avg Time/Event = " + ldmx_log(info) << "ckf_run Avg Time/Event = " << std::fixed + << std::setprecision(4) << profiling_map_["ckf_run"] / nevents_ + << " ms"; + ldmx_log(info) << "result_loop Avg Time/Event = " << std::fixed + << std::setprecision(4) << profiling_map_["result_loop"] / nevents_ << " ms"; } diff --git a/Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx b/Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx index 71c14ba9d..55561f6ce 100644 --- a/Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx +++ b/Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx @@ -421,7 +421,8 @@ void SeedFinderProcessor::onProcessEnd() { // outputFile_->cd(); // outputTree_->Write(); // outputFile_->Close(); - ldmx_log(info) << "AVG Time/Event: " << processing_time_ / nevents_ << " ms"; + ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(4) + << processing_time_ / nevents_ << " ms"; ldmx_log(info) << "Total Seeds/Events: " << ntracks_ << "/" << nevents_; ldmx_log(info) << "Seeds discarded due to multiple hits on layers " << ndoubles_; diff --git a/Tracking/src/Tracking/Reco/VertexProcessor.cxx b/Tracking/src/Tracking/Reco/VertexProcessor.cxx index 9a94c231b..a5310cb2c 100644 --- a/Tracking/src/Tracking/Reco/VertexProcessor.cxx +++ b/Tracking/src/Tracking/Reco/VertexProcessor.cxx @@ -190,7 +190,8 @@ void VertexProcessor::onProcessEnd() { outfile->Close(); delete outfile; - ldmx_log(info) << "AVG Time/Event: " << processing_time_ / nevents_ << " ms"; + ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(4) + << processing_time_ / nevents_ << " ms"; } } // namespace reco