Skip to content
Snippets Groups Projects
Commit e98e6065 authored by Johannes Elmsheuser's avatar Johannes Elmsheuser
Browse files

Merge branch 'cppcheck.G4UserActions-20240507' into 'main'

G4UserActions: Fix cppcheck warnings.

See merge request atlas/athena!71230
parents 80014761 7949baaa
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
*/
#ifndef G4UserActions_LengthIntegrator_H
......@@ -45,7 +45,10 @@ namespace G4UA
public:
/// Constructor takes the name of the histogram service as argument.
LengthIntegrator(const std::string& histSvcName, bool doHistos);
LengthIntegrator(const std::string& histSvcName, bool doHistos);
LengthIntegrator(const LengthIntegrator&) = delete;
LengthIntegrator& operator=(const LengthIntegrator&) = delete;
/// Called at beginning of G4 event to cache some details about the
/// current primary vertex and particle. Also resets some measurements.
......
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "RadLengthAction.h"
......@@ -281,7 +281,7 @@ namespace G4UA
}
// how variables should be dumped in variables map
void RadLengthAction::fillVariables(std::vector<double> varvec, const std::string& name){
void RadLengthAction::fillVariables(const std::vector<double>& varvec, const std::string& name){
// first three components should be added (deltaenergy, radlength, intlength)
for(unsigned int i = 0; i<3; i++) variables[name].at(i) += varvec.at(i);
// other components should be overwritten
......
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#ifndef G4UserActions_RadLengthAction_H
......@@ -78,7 +78,7 @@ namespace G4UA
ServiceHandle<ITHistSvc> m_hSvc;
// methode to fill vector stored in variables map (index volume name)
void fillVariables(std::vector<double> varvec, const std::string& name);
void fillVariables(const std::vector<double>& varvec, const std::string& name);
}; //class RadLengthAction
} //namespace G4UA
......
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