Skip to content
Snippets Groups Projects
Commit d2879a76 authored by Andrii Verbytskyi's avatar Andrii Verbytskyi Committed by Chandler Robert Baker
Browse files

Fix defects ( passed by value) reported by cppcheck

Fix defects ( passed by value) reported by cppcheck
parent e56a8a1d
No related branches found
No related tags found
No related merge requests found
...@@ -409,7 +409,7 @@ void Maketag(string& info,cellbin bin,int index,string& webadd,list<string>& myw ...@@ -409,7 +409,7 @@ void Maketag(string& info,cellbin bin,int index,string& webadd,list<string>& myw
myweblist.unique(); myweblist.unique();
} }
void Output(const clusterbin& clb,vector<cellbin> problemCellbinSummary,int initial_pos,string& webadd,list<string>& myweblist){ void Output(const clusterbin& clb, const vector<cellbin>& problemCellbinSummary,int initial_pos,string& webadd,list<string>& myweblist){
if(problemCellbinSummary.size()==initial_pos) return; if(problemCellbinSummary.size()==initial_pos) return;
for(int i=initial_pos;i<problemCellbinSummary.size();i++){ for(int i=initial_pos;i<problemCellbinSummary.size();i++){
string info; string info;
......
...@@ -126,7 +126,7 @@ void printHanLimits(TDirectory *limitDir) ...@@ -126,7 +126,7 @@ void printHanLimits(TDirectory *limitDir)
} }
string printResults(TDirectory *resultsDir, string histoName) string printResults(TDirectory *resultsDir, const string& histoName)
{ {
if (detailedOutput) if (detailedOutput)
cout << "Results:" << endl; cout << "Results:" << endl;
......
...@@ -102,7 +102,7 @@ void EvtBCLFF::getvectorff(EvtId parent, EvtId daughter, double t, double, doubl ...@@ -102,7 +102,7 @@ void EvtBCLFF::getvectorff(EvtId parent, EvtId daughter, double t, double, doubl
return (term1 - term2) / (term1 + term2); return (term1 - term2) / (term1 + term2);
}; };
auto sum = [&z](decltype(t) q2, std::vector<double> par) { auto sum = [&z](decltype(t) q2, const std::vector<double>& par) {
double tot = 0; double tot = 0;
for (unsigned int n = 0; n < par.size(); ++n) { for (unsigned int n = 0; n < par.size(); ++n) {
tot += par[n] * std::pow(z(q2) - z(0), n); tot += par[n] * std::pow(z(q2) - z(0), n);
......
...@@ -398,7 +398,7 @@ bool doEvt (int evtnr) { ...@@ -398,7 +398,7 @@ bool doEvt (int evtnr) {
return keep_event; return keep_event;
} }
void write_and_delete (std::vector< TH1I* > vec) { void write_and_delete (std::vector< TH1I* >& vec) {
for (TH1I* _h: vec) { for (TH1I* _h: vec) {
_h->Write(); _h->Write();
delete _h; delete _h;
......
...@@ -39,7 +39,7 @@ namespace muCombUtil { ...@@ -39,7 +39,7 @@ namespace muCombUtil {
} }
double getMuFastRes(std::vector<double> vec, const MuonFeature* feature) { double getMuFastRes(const std::vector<double>& vec, const MuonFeature* feature) {
double ptGev = feature->pt(); double ptGev = feature->pt();
double pt = ptGev*1000.; //muFast Pt(MeV) double pt = ptGev*1000.; //muFast Pt(MeV)
......
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