diff --git a/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrectionTool.h b/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrectionTool.h index 09d476020d4f0ac94e07789849b99f678432a154..e2d84da91411ca0b4dd78cc2cf4768eae022439c 100644 --- a/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrectionTool.h +++ b/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrectionTool.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ // contact: jmaurer@cern.ch @@ -84,7 +84,7 @@ private: SG::AuxElement::ConstAccessor<char> decorator; std::size_t hash; bool suffixed; - TagDecorator(const std::string& name, std::size_t hash, bool suffixed) : decorator(name), hash(hash), suffixed(suffixed) {} + TagDecorator(const std::string& name, std::size_t the_hash, bool suffixed) : decorator(name), hash(the_hash), suffixed(suffixed) {} }; struct CachedRanking { diff --git a/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrection/Trigger.h b/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrection/Trigger.h index 649e1730339343e85e8df11f2df6133ff2531e5c..1da9c42b3d6fff5ed5cae146bbe4702866eef90e 100644 --- a/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrection/Trigger.h +++ b/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/TrigGlobalEfficiencyCorrection/Trigger.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ // contact: jmaurer@cern.ch @@ -69,7 +69,7 @@ public: template<typename Array> void loadLegs(const ImportData::TrigDef& src, Array& dest) { - if(src.type != m_type) throw; /// can't be thrown due to bad user action -- only in case of a bug in the Calculator class + if(src.type != m_type) throw std::runtime_error ("Calculator bug"); /// can't be thrown due to bad user action -- only in case of a bug in the Calculator class std::fill(dest.begin(), dest.end(), 0); if(m_type==TT_2E_MU_SYM || m_type==TT_2E_G_SYM || m_type==TT_2MU_G_SYM) /// special case needed to skip the duplicated leg for 2X_Y triggers { diff --git a/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/util/TrigGlobEffCorrValidation.cxx b/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/util/TrigGlobEffCorrValidation.cxx index 1647bcbfe59326c526fb84aca094e5b03f1dc38d..86923febd5664ef254245b46be825065fbf8600f 100644 --- a/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/util/TrigGlobEffCorrValidation.cxx +++ b/Trigger/TrigAnalysis/TrigGlobalEfficiencyCorrection/util/TrigGlobEffCorrValidation.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ // contact: jmaurer@cern.ch @@ -135,7 +135,7 @@ struct Config double expectedEfficiencyTolerance = 1e-6; bool debug = false; - Config(const char* name) : testName(name) { leptonPtValues = {30e4f}; } + Config(const char* name) : testName(name), leptonPtValues {30e4f} { } Config& setTriggers(const std::string& t) { triggers = t; return *this; } Config& setLeptonPDF(unsigned nmin, unsigned nmax, std::initializer_list<float> ptvalues) { @@ -567,8 +567,7 @@ bool run_test(const Config& cfg, int toy_to_debug) std::vector<const xAOD::Muon*> muons; std::vector<const xAOD::Photon*> photons; std::vector<const xAOD::IParticle*> particles; - double sum_eff = 0., sum_eff_toys[nToySamples]; - std::fill(std::begin(sum_eff_toys), std::end(sum_eff_toys), 0.); + double sum_eff = 0., sum_eff_toys[nToySamples] = {0}; for(int toy=0; toy<nToysPerTest; ++toy) { do