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 { diff --git a/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.cxx b/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.cxx index 4411a0e51..47af88838 100644 --- a/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.cxx +++ b/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.cxx @@ -13,7 +13,7 @@ namespace flashmatch{ #include "flashmatch/Base/FMWKTools/PhotonVisibilityService.h" namespace flashmatch{ - DetectorSpecs::DetectorSpecs(std::string filename) { + DetectorSpecs::DetectorSpecs(const std::string& filename) { assert(!filename.empty()); if(filename.find("/") != 0) @@ -68,7 +68,7 @@ namespace flashmatch{ #else namespace flashmatch{ - DetectorSpecs::DetectorSpecs(std::string filename){ + DetectorSpecs::DetectorSpecs(const std::string& filename){ ::art::ServiceHandle const geo; auto const clock_data = ::art::ServiceHandle()->DataForJob(); auto const det_prop = ::art::ServiceHandle()->DataForJob(clock_data); diff --git a/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h b/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h index 5d7a97958..483ba9393 100644 --- a/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h +++ b/sbncode/OpT0Finder/flashmatch/Base/FMWKInterface.h @@ -38,15 +38,16 @@ namespace flashmatch { class DetectorSpecs { public: - DetectorSpecs(std::string filename="specs.cfg"); - ~DetectorSpecs(){} + DetectorSpecs(const std::string& filename); - inline static DetectorSpecs& GetME(std::string filename="detector_specs.cfg") + inline static DetectorSpecs& GetME(const 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); }