From 948471f01a4b9ea4448a2b0c3ac45c16b9be5d5a Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Thu, 30 Jul 2026 12:59:22 -0500 Subject: [PATCH] [spack mpd] Changes needed to built with gcc@12.5.0 --- CMakeLists.txt | 2 +- ubreco/DetectorSystematics/WireModifier_module.cc | 8 ++++---- ubreco/LLSelectionTool/OpT0Finder/Algorithms/QLLMatch.cxx | 2 +- ubreco/MichelReco/Algo/ConeHitFinder.cxx | 4 ++-- ubreco/MichelReco/Algo/PhotonFinder.cxx | 4 ++-- ubreco/MichelReco/Fmwk/ClusterVectorCalculator.cxx | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e23dc5624..ec99fb8ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ cet_cmake_env() cet_set_compiler_flags(DIAGS CAUTIOUS WERROR NO_UNDEFINED - EXTRA_FLAGS -pedantic -Wno-unused-local-typedefs + EXTRA_FLAGS -pedantic -Wno-unused-local-typedefs -Wno-error=array-bounds ) cet_report_compiler_flags(REPORT_THRESHOLD VERBOSE) diff --git a/ubreco/DetectorSystematics/WireModifier_module.cc b/ubreco/DetectorSystematics/WireModifier_module.cc index ec9598b00..2d6f6e701 100644 --- a/ubreco/DetectorSystematics/WireModifier_module.cc +++ b/ubreco/DetectorSystematics/WireModifier_module.cc @@ -907,22 +907,22 @@ void sys::WireModifier::ModifyROI(std::vector & roi_data, } - if(isnan(q_orig)) { + if(std::isnan(q_orig)) { std::cout << "WARNING: obtained q_orig = NaN... setting to zero" << std::endl; q_orig = 0.; } - if(isnan(q_mod)) { + if(std::isnan(q_mod)) { std::cout << "WARNING: obtained q_mod = NaN... setting to zero" << std::endl; q_mod = 0.; } scale_ratio = q_mod / q_orig; - if(isnan(scale_ratio)) { + if(std::isnan(scale_ratio)) { std::cout << "WARNING: obtained scale_ratio = " << q_mod << " / " << q_orig << " = NaN... setting to 1" << std::endl; scale_ratio = 1.; } - if(isinf(scale_ratio)) { + if(std::isinf(scale_ratio)) { std::cout << "WARNING: obtained scale_ratio = " << q_mod << " / " << q_orig << " = inf... setting to 1" << std::endl; scale_ratio = 1.0; } diff --git a/ubreco/LLSelectionTool/OpT0Finder/Algorithms/QLLMatch.cxx b/ubreco/LLSelectionTool/OpT0Finder/Algorithms/QLLMatch.cxx index 4d2815888..53ae00ab8 100644 --- a/ubreco/LLSelectionTool/OpT0Finder/Algorithms/QLLMatch.cxx +++ b/ubreco/LLSelectionTool/OpT0Finder/Algorithms/QLLMatch.cxx @@ -262,7 +262,7 @@ namespace flashana { if(_mode == kLLHD) { /* Replaced block to be used in uboonecode _current_llhd -= std::log10(TMath::Poisson(O,H)); - if(std::isnan(_current_llhd) || isinf(_current_llhd)) _current_llhd = 1.e6; + if(std::isnan(_current_llhd) || std::isinf(_current_llhd)) _current_llhd = 1.e6; */ // Updated block double arg = TMath::Poisson(O,H); diff --git a/ubreco/MichelReco/Algo/ConeHitFinder.cxx b/ubreco/MichelReco/Algo/ConeHitFinder.cxx index 8d84a5db6..c6454f3f0 100644 --- a/ubreco/MichelReco/Algo/ConeHitFinder.cxx +++ b/ubreco/MichelReco/Algo/ConeHitFinder.cxx @@ -44,9 +44,9 @@ namespace michel { // fit michel to a straight line auto fitinfo = _clusterCalc.GetLinearFit(michel); - if ( isnan(fitinfo.first) == true) + if ( std::isnan(fitinfo.first) == true) return true; - if (isnan(fitinfo.second) == true) + if (std::isnan(fitinfo.second) == true) return true; auto start = michel._start; diff --git a/ubreco/MichelReco/Algo/PhotonFinder.cxx b/ubreco/MichelReco/Algo/PhotonFinder.cxx index bff2e8125..2d5d9b6ba 100644 --- a/ubreco/MichelReco/Algo/PhotonFinder.cxx +++ b/ubreco/MichelReco/Algo/PhotonFinder.cxx @@ -52,9 +52,9 @@ namespace michel { // fit michel to a straight line auto fitinfo = _clusterCalc.GetLinearFit(michel); - if ( isnan(fitinfo.first) == true) + if ( std::isnan(fitinfo.first) == true) return true; - if (isnan(fitinfo.second) == true) + if (std::isnan(fitinfo.second) == true) return true; auto start = michel._start; diff --git a/ubreco/MichelReco/Fmwk/ClusterVectorCalculator.cxx b/ubreco/MichelReco/Fmwk/ClusterVectorCalculator.cxx index e7854036a..56477dc44 100644 --- a/ubreco/MichelReco/Fmwk/ClusterVectorCalculator.cxx +++ b/ubreco/MichelReco/Fmwk/ClusterVectorCalculator.cxx @@ -285,12 +285,12 @@ namespace michel { << "r: " << r << std::endl; Print(msg::kDEBUG,__FUNCTION__,ss.str()); } - if(isnan(r)) r = 0.0; + if(std::isnan(r)) r = 0.0; R.push_back(r); // if(R.size() != 1 && R.size() != hits.size()) - // if(isnan(r)) Print(msg::kEXCEPTION,__FUNCTION__,"Covariance is nan not on edge"); + // if(std::isnan(r)) Print(msg::kEXCEPTION,__FUNCTION__,"Covariance is nan not on edge"); X.clear(); Y.clear(); }