Skip to content
Snippets Groups Projects
Commit b09af1d8 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'cppcheck.egammaConditions-20240314' into 'main'

egammaConditions: Fix cppcheck warnings.

See merge request atlas/athena!69791
parents 6c7188f0 d8329ea6
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/////////////////////////////////////////////////////////////////////////////
......@@ -150,7 +150,7 @@ public:
matrix if the length of the std::vector x ind n.
@param x: std::vector of length n which represents the values on all axes
@param T: value which should be recieved*/
const T* getBinContent(std::vector<double> x) const;
const T* getBinContent(const std::vector<double>& x) const;
// /** Add "T" to bin which corresponds to value std::vector x. Can only used for n-dimensional
// matrix if the length of the std::vector x ind n.
......@@ -178,7 +178,7 @@ public:
/** Clear Matrix content but not binning, dimensions and axis*/
void clearEntries();
bool isInRange(std::vector<double> x) const;
bool isInRange(const std::vector<double>& x) const;
/** The user can add a Description of what this matrix contains and how it was produced, e.g. cuts*/
void setTextDescription(const std::string& text);
......@@ -201,7 +201,7 @@ protected:
StatusCode setupEntries();
unsigned int Index(std::vector<unsigned int> x) const;
unsigned int Index(const std::vector<unsigned int>& x) const;
std::vector<unsigned int> Index(unsigned int id);
// T& Access(std::vector<unsigned int> x);
};
......
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
//#include <assert.h>
......@@ -113,7 +113,7 @@ void EMAPMatrix<T>::clear()
template <class T>
unsigned int EMAPMatrix<T>::Index(std::vector<unsigned int> x) const
unsigned int EMAPMatrix<T>::Index(const std::vector<unsigned int>& x) const
{
unsigned int index=0;
//assert(x.size()==m_dimensions);
......@@ -322,7 +322,7 @@ const T* EMAPMatrix<T>::getBinContent(double x, double y, double z, double u, do
template <class T>
const T* EMAPMatrix<T>::getBinContent(std::vector<double> x) const
const T* EMAPMatrix<T>::getBinContent(const std::vector<double>& x) const
{
bool statusCode = true;
std::vector<unsigned int> id;
......@@ -405,7 +405,7 @@ void EMAPMatrix<T>::clearEntries()
template <class T>
bool EMAPMatrix<T>::isInRange(std::vector<double> x) const
bool EMAPMatrix<T>::isInRange(const std::vector<double>& x) const
{
if (x.size()!=m_dimensions) return false;
for (unsigned int i=0;i<m_dimensions;++i) if (m_axis.at(i).isInRange(x.at(i))==false) return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment