From cebf88327284dc5d6a2432d2e262783181c5b315 Mon Sep 17 00:00:00 2001 From: Herbert Greenlee Date: Wed, 2 Sep 2026 12:21:44 -0500 Subject: [PATCH 1/3] Workaround to silence dangling reference warning. --- sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h b/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h index 5d7a97958..103fb2d54 100644 --- a/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h +++ b/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h @@ -41,12 +41,14 @@ namespace flashmatch { DetectorSpecs(std::string filename="specs.cfg"); ~DetectorSpecs(){} - inline static DetectorSpecs& GetME(std::string filename="detector_specs.cfg") + inline static DetectorSpecs& GetME(std::string filename) { if(!_me) _me = new DetectorSpecs(filename); return *_me; } + inline static DetectorSpecs& GetME() { return GetME("detector_specs.cfg"); } + /// PMT XYZ position filler inline const geoalgo::Point_t& PMTPosition(size_t opch) { return _pmt_v.at(opch); } From d850e7e332bebc95ee38d7951a3101e34f9fac02 Mon Sep 17 00:00:00 2001 From: Herbert Greenlee Date: Wed, 2 Sep 2026 12:30:12 -0500 Subject: [PATCH 2/3] Get rid of pragmas. --- sbncode/OpT0Finder/flashmatch/Algorithms/ChargeAnalytical.cxx | 2 -- sbncode/OpT0Finder/flashmatch/Algorithms/LightPath.cxx | 2 -- sbncode/OpT0Finder/flashmatch/Algorithms/QLLMatch.cxx | 2 -- 3 files changed, 6 deletions(-) diff --git a/sbncode/OpT0Finder/flashmatch/Algorithms/ChargeAnalytical.cxx b/sbncode/OpT0Finder/flashmatch/Algorithms/ChargeAnalytical.cxx index 2fcc5a0d5..8d4cc75c4 100644 --- a/sbncode/OpT0Finder/flashmatch/Algorithms/ChargeAnalytical.cxx +++ b/sbncode/OpT0Finder/flashmatch/Algorithms/ChargeAnalytical.cxx @@ -3,8 +3,6 @@ #include "ChargeAnalytical.h" -#pragma GCC diagnostic ignored "-Wdangling-reference" - namespace flashmatch { static ChargeAnalyticalFactory __global_ChargeAnalyticalFactory__; diff --git a/sbncode/OpT0Finder/flashmatch/Algorithms/LightPath.cxx b/sbncode/OpT0Finder/flashmatch/Algorithms/LightPath.cxx index 959183e8b..af03469d8 100644 --- a/sbncode/OpT0Finder/flashmatch/Algorithms/LightPath.cxx +++ b/sbncode/OpT0Finder/flashmatch/Algorithms/LightPath.cxx @@ -3,8 +3,6 @@ #include "LightPath.h" -#pragma GCC diagnostic ignored "-Wdangling-reference" - namespace flashmatch { static LightPathFactory __global_LightPathFactory__; diff --git a/sbncode/OpT0Finder/flashmatch/Algorithms/QLLMatch.cxx b/sbncode/OpT0Finder/flashmatch/Algorithms/QLLMatch.cxx index 76c5533fc..87e7fa494 100644 --- a/sbncode/OpT0Finder/flashmatch/Algorithms/QLLMatch.cxx +++ b/sbncode/OpT0Finder/flashmatch/Algorithms/QLLMatch.cxx @@ -3,8 +3,6 @@ #include "QLLMatch.h" -#pragma GCC diagnostic ignored "-Wdangling-reference" - using namespace std::chrono; namespace flashmatch { From 86ddb234752bd56725ebd0b57daa6614d476735f Mon Sep 17 00:00:00 2001 From: Herbert Greenlee Date: Thu, 3 Sep 2026 11:32:41 -0500 Subject: [PATCH 3/3] Remove redundant/incorrect default constructor argument. --- sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h b/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h index 103fb2d54..53cde65d6 100644 --- a/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h +++ b/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h @@ -38,7 +38,8 @@ namespace flashmatch { class DetectorSpecs { public: - DetectorSpecs(std::string filename="specs.cfg"); + DetectorSpecs() = delete; + DetectorSpecs(std::string filename); ~DetectorSpecs(){} inline static DetectorSpecs& GetME(std::string filename)