Skip to content
Snippets Groups Projects
Commit b85a3c6f authored by Scott Snyder's avatar Scott Snyder Committed by Johannes Elmsheuser
Browse files

BCM_Digitization: Fix cppcheck warning.

BCM_Digitization: Fix cppcheck warning.

Pass container by const reference, not by value.
parent a9895bf5
No related branches found
No related tags found
No related merge requests found
......@@ -291,7 +291,7 @@ float BCM_DigitizationTool::computeEnergy(float simEner, const HepGeom::Point3D<
//----------------------------------------------------------------------
// CreateAnalog method:
//----------------------------------------------------------------------
std::vector<float> BCM_DigitizationTool::createAnalog(int iMod, std::vector<float> enerVect, std::vector<float> timeVect)
std::vector<float> BCM_DigitizationTool::createAnalog(int iMod, const std::vector<float>& enerVect, const std::vector<float>& timeVect)
{
std::vector<float> analog(64,0);
for (unsigned int iHit=0; iHit<enerVect.size(); ++iHit) {
......
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#ifndef BCM_DIGITIZATION_BCM_DIGITIZATIONTOOL_H
......@@ -59,7 +59,7 @@ class BCM_DigitizationTool : public PileUpToolBase {
float computeEnergy(float simEner, const HepGeom::Point3D<double>& startPos, const HepGeom::Point3D<double>& endPos);
/** Fill in hit pulses on analog waveform */
std::vector<float> createAnalog(int mod, std::vector<float> enerVect, std::vector<float> timeVect);
std::vector<float> createAnalog(int mod, const std::vector<float>& enerVect, const std::vector<float>& timeVect);
/** Add noise to analog waveform */
void addNoise(int mod, std::vector<float> &analog, CLHEP::HepRandomEngine *randomEngine);
......
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