Skip to content

Commit

Permalink
Merge pull request #11177 from slava77/CMSSW_7_4_X_2015-09-07-1100/pu…
Browse files Browse the repository at this point in the history
…MVAetc-valgrind

cleanup of uninitialized reads reported by valgrind (backport of #11173 )
  • Loading branch information
cmsbuild committed Sep 16, 2015
2 parents 3279435 + d4f9a57 commit 886c2d0
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Expand Up @@ -1288,7 +1288,7 @@ namespace cscdqm {
// CSCCFEBData * cfebData[N_CFEBs];
// CSCCFEBTimeSlice * timeSlice[N_CFEBs][16];
// CSCCFEBDataWord * timeSample[N_CFEBs][16][6][16];
int Pedestal[N_CFEBs][6][16];
int Pedestal[N_CFEBs][6][16]; memset(Pedestal, 0, sizeof(Pedestal));
#ifdef __clang__
std::vector<std::array<std::array<std::pair<int,int>, 6>, 16>> CellPeak(N_CFEBs);
std::fill(CellPeak.begin(), CellPeak.end(), std::array<std::array<std::pair<int,int>, 6>, 16>{});
Expand Down
2 changes: 1 addition & 1 deletion DQM/CSCMonitorModule/plugins/CSCDQM_StripClusterFinder.cc
Expand Up @@ -381,7 +381,7 @@ void StripClusterFinder::printClusters(void)
std::cout << "======================================================================" << std::endl;
return;
}
bool StripClusterFinder::Sort::operator()(StripClusterFitData a , StripClusterFitData b) const
bool StripClusterFinder::Sort::operator()(const StripClusterFitData& a , const StripClusterFitData& b) const
{return a.channel_ < b.channel_;}

}
2 changes: 1 addition & 1 deletion DQM/CSCMonitorModule/plugins/CSCDQM_StripClusterFinder.h
Expand Up @@ -30,7 +30,7 @@ class StripClusterFinder {
public:
class Sort{
public:
bool operator()(StripClusterFitData a,StripClusterFitData b) const;
bool operator()(const StripClusterFitData& a, const StripClusterFitData& b) const;
};
std::vector<StripCluster> MEStripClusters;
ClusterLocalMax localMaxTMP;
Expand Down
1 change: 1 addition & 0 deletions DQM/Physics/src/B2GDQM.cc
Expand Up @@ -123,6 +123,7 @@ B2GDQM::B2GDQM(const edm::ParameterSet& ps) {
ps.getParameter<std::string>("muonSelect")));

semiE_HadJetPtCut_ = ps.getParameter<double>("semiE_HadJetPtCut");
semiE_LepJetPtCut_ = ps.getParameter<double>("semiE_LepJetPtCut");
semiE_dphiHadCut_ = ps.getParameter<double>("semiE_dphiHadCut");
semiE_dRMin_ = ps.getParameter<double>("semiE_dRMin");
semiE_ptRel_ = ps.getParameter<double>("semiE_ptRel");
Expand Down
7 changes: 3 additions & 4 deletions DataFormats/JetReco/src/PileupJetIdentifier.cc
@@ -1,13 +1,11 @@
#include "DataFormats/JetReco/interface/PileupJetIdentifier.h"

#include <iostream>
#include <sstream>
#include <iomanip>
#include <limits>
#include <cstring>

// ------------------------------------------------------------------------------------------
StoredPileupJetIdentifier::StoredPileupJetIdentifier()
{
memset(this, 0, sizeof(StoredPileupJetIdentifier));
}

// ------------------------------------------------------------------------------------------
Expand All @@ -18,6 +16,7 @@ StoredPileupJetIdentifier::~StoredPileupJetIdentifier()
// ------------------------------------------------------------------------------------------
PileupJetIdentifier::PileupJetIdentifier()
{
memset(this, 0, sizeof(PileupJetIdentifier));
}

// ------------------------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc
Expand Up @@ -333,7 +333,7 @@ std::vector<float> EcalClusterLazyToolsBase::getESHits(double X, double Y, doubl
for (int i=0; i<31; ++i) esHits.push_back(0);
} else {
it = rechits_map.find(strip);
if (it->second.energy() > 1.0e-10 && it != rechits_map.end()) esHits.push_back(it->second.energy());
if (it != rechits_map.end() && it->second.energy() > 1.0e-10) esHits.push_back(it->second.energy());
else esHits.push_back(0);
//cout<<"center : "<<strip<<" "<<it->second.energy()<<endl;

Expand All @@ -344,7 +344,7 @@ std::vector<float> EcalClusterLazyToolsBase::getESHits(double X, double Y, doubl
next = theESNav.east();
if (next != ESDetId(0)) {
it = rechits_map.find(next);
if (it->second.energy() > 1.0e-10 && it != rechits_map.end()) esHits.push_back(it->second.energy());
if (it != rechits_map.end() && it->second.energy() > 1.0e-10) esHits.push_back(it->second.energy());
else esHits.push_back(0);
//cout<<"east "<<i<<" : "<<next<<" "<<it->second.energy()<<endl;
} else {
Expand All @@ -361,7 +361,7 @@ std::vector<float> EcalClusterLazyToolsBase::getESHits(double X, double Y, doubl
next = theESNav.west();
if (next != ESDetId(0)) {
it = rechits_map.find(next);
if (it->second.energy() > 1.0e-10 && it != rechits_map.end()) esHits.push_back(it->second.energy());
if (it != rechits_map.end() && it->second.energy() > 1.0e-10) esHits.push_back(it->second.energy());
else esHits.push_back(0);
//cout<<"west "<<i<<" : "<<next<<" "<<it->second.energy()<<endl;
} else {
Expand All @@ -379,7 +379,7 @@ std::vector<float> EcalClusterLazyToolsBase::getESHits(double X, double Y, doubl
next = theESNav.north();
if (next != ESDetId(0)) {
it = rechits_map.find(next);
if (it->second.energy() > 1.0e-10 && it != rechits_map.end()) esHits.push_back(it->second.energy());
if (it != rechits_map.end() && it->second.energy() > 1.0e-10) esHits.push_back(it->second.energy());
else esHits.push_back(0);
//cout<<"north "<<i<<" : "<<next<<" "<<it->second.energy()<<endl;
} else {
Expand All @@ -396,7 +396,7 @@ std::vector<float> EcalClusterLazyToolsBase::getESHits(double X, double Y, doubl
next = theESNav.south();
if (next != ESDetId(0)) {
it = rechits_map.find(next);
if (it->second.energy() > 1.0e-10 && it != rechits_map.end()) esHits.push_back(it->second.energy());
if (it != rechits_map.end() && it->second.energy() > 1.0e-10) esHits.push_back(it->second.energy());
else esHits.push_back(0);
//cout<<"south "<<i<<" : "<<next<<" "<<it->second.energy()<<endl;
} else {
Expand Down

0 comments on commit 886c2d0

Please sign in to comment.