Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple comp warnings for unused variables #20841

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion Calibration/Tools/src/HouseholderDecomposition.cc
Expand Up @@ -40,7 +40,6 @@ std::vector<float> HouseholderDecomposition::runRegional(const std::vector<std::
std::vector<float> totalSolution(Nchannels,1.);
std::vector<float> iterSolution(Nchannels,1.);
std::vector<std::vector<float> > myEventMatrix(eventMatrix);
const std::vector<float>& myEnergyVector(energyVector);

// loop over nIter
for (int iter=1;iter<=nIter;iter++)
Expand Down
2 changes: 0 additions & 2 deletions CondTools/SiStrip/plugins/SiStripBadChannelBuilder.cc
Expand Up @@ -26,8 +26,6 @@ void SiStripBadChannelBuilder::algoAnalyze(const edm::Event & event, const edm::

SiStripDetInfoFileReader reader(fp_.fullPath());

const std::vector<uint32_t>& DetIds = reader.getAllDetIds();

for(Parameters::iterator iBadComponent = BadComponentList_.begin(); iBadComponent != BadComponentList_.end(); ++iBadComponent ) {

uint32_t BadModule_ = iBadComponent->getParameter<uint32_t>("BadModule");
Expand Down
2 changes: 0 additions & 2 deletions CondTools/SiStrip/plugins/SiStripBadFiberBuilder.cc
Expand Up @@ -27,8 +27,6 @@ void SiStripBadFiberBuilder::algoAnalyze(const edm::Event & event, const edm::Ev

SiStripDetInfoFileReader reader(fp_.fullPath());

const std::vector<uint32_t>& DetIds = reader.getAllDetIds();

std::stringstream ss;
for(Parameters::iterator iBadComponent = BadComponentList_.begin(); iBadComponent != BadComponentList_.end(); ++iBadComponent ) {

Expand Down
1 change: 0 additions & 1 deletion DPGAnalysis/Skims/interface/MatchedProbeMaker.h
Expand Up @@ -115,7 +115,6 @@ void MatchedProbeMaker<T>::produce(edm::Event& iEvent, const edm::EventSetup& iS
for (unsigned j=0; j<Refs->size(); j++) {
//const edm::Ref< collection > RefRef = (*Refs)[j];
RefToBase<Candidate> RefRef(Refs, j);
const reco::CandidateBaseRef& refBaseRef( RefRef );

if(overlap(*CandRef,*RefRef)) {
ppass = true;
Expand Down
1 change: 0 additions & 1 deletion DQM/BeamMonitor/plugins/BeamSpotProblemMonitor.cc
Expand Up @@ -334,7 +334,6 @@ void BeamSpotProblemMonitor::FillPlots(const LuminosityBlock& lumiSeg,int &lastl
/* S.Dutta : Commenting out these variables are not used and giving error with "-Werror=unused-variable" option
float qtresult = BeamSpotQReport->getQTresult();
int qtstatus = BeamSpotQReport->getStatus() ; // get QT status value (see table below) */
const std::string& qtmessage = BeamSpotQReport->getMessage() ; // get the whole QT result message
}


Expand Down
2 changes: 0 additions & 2 deletions DQM/L1TMonitorClient/src/L1TEventInfoClient.cc
Expand Up @@ -519,7 +519,6 @@ void L1TEventInfoClient::readQtResults(DQMStore::IBooker &ibooker, DQMStore::IGe

if (qHist) {
const std::vector<QReport*> qtVec = qHist->getQReports();
const std::string& hName = qHist->getName();

if (m_verbose) {

Expand Down Expand Up @@ -639,7 +638,6 @@ void L1TEventInfoClient::readQtResults(DQMStore::IBooker &ibooker, DQMStore::IGe

if (qHist) {
const std::vector<QReport*> qtVec = qHist->getQReports();
const std::string& hName = qHist->getName();

if (m_verbose) {

Expand Down
10 changes: 0 additions & 10 deletions DQMOffline/Muon/src/MuonTestSummary.cc
Expand Up @@ -498,7 +498,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "Chi2Report exists!!";
float qtresult = myQReport->getQTresult(); // get QT result value
int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReport->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult << " qtstatus "<<qtstatus<<endl;
chi2TestSummaryMap->setBinContent(bin,1,qtresult);
}
Expand All @@ -509,7 +508,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "Chi2Report Kolmogorov exists!!";
float qtresult = myQReportKolmo->getQTresult(); // get QT result value
int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReportKolmo->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
KolmogorovTestSummaryMap->setBinContent(bin,1,qtresult);
}
Expand Down Expand Up @@ -558,7 +556,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "EtaReport exists!!";
float qtresult = myQReport->getQTresult(); // get QT result value
int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReport->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult << " qtstatus "<<qtstatus<<endl;
chi2TestSummaryMap->setBinContent(bin,2,qtresult);
}
Expand All @@ -570,7 +567,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "EtaReport Kolmogorov exists!!";
float qtresult = myQReportKolmo->getQTresult(); // get QT result value
int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReportKolmo->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
KolmogorovTestSummaryMap->setBinContent(bin,2,qtresult);
}
Expand Down Expand Up @@ -619,7 +615,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "PhiReport exists!!";
float qtresult = myQReport->getQTresult(); // get QT result value
int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReport->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
chi2TestSummaryMap->setBinContent(bin,3,qtresult);
}
Expand All @@ -631,7 +626,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "PhiReport Kolmogorov exists!!";
float qtresult = myQReportKolmo->getQTresult(); // get QT result value
int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReportKolmo->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
KolmogorovTestSummaryMap->setBinContent(bin,3,qtresult);
}
Expand All @@ -657,7 +651,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "PtReport exists!!";
float qtresult = myQReport->getQTresult(); // get QT result value
int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReport->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
chi2TestSummaryMap->setBinContent(bin,4,qtresult);
}
Expand All @@ -669,7 +662,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "PtReport Kolmogorov exists!!";
float qtresult = myQReportKolmo->getQTresult(); // get QT result value
int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReportKolmo->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
KolmogorovTestSummaryMap->setBinContent(bin,4,qtresult);
}
Expand All @@ -694,7 +686,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "qReport exists!!";
float qtresult = myQReport->getQTresult(); // get QT result value
int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReport->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
chi2TestSummaryMap->setBinContent(bin,5,qtresult);
}
Expand All @@ -706,7 +697,6 @@ void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muon
LogTrace(metname) << "qReport Kolmogorov exists!!";
float qtresult = myQReportKolmo->getQTresult(); // get QT result value
int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
const std::string& qtmessage = myQReportKolmo->getMessage() ; // get the whole QT result message
LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
KolmogorovTestSummaryMap->setBinContent(bin,5,qtresult);
}
Expand Down
1 change: 0 additions & 1 deletion HLTriggerOffline/JetMET/src/HLTJetMETValidation.cc
Expand Up @@ -397,7 +397,6 @@ void HLTJetMETValidation::getHLTResults(const edm::TriggerResults& hltresults,
HLTinit_=true;

for (int itrig = 0; itrig != ntrigs; ++itrig){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrodozov , we should delete the for loop too.

const std::string& trigName = triggerNames.triggerName(itrig);
// std::cout << "trigger " << itrig << ": " << trigName << std::endl;
}
}
Expand Down
1 change: 0 additions & 1 deletion RecoTauTag/RecoTau/interface/RecoTauCrossCleaning.h
Expand Up @@ -106,7 +106,6 @@ class FilterPFCandByParticleId {
id_(particleId){};
template<typename PFCandCompatiblePtrType>
bool operator()(const PFCandCompatiblePtrType& ptr) const {
const PFCandidatePtr& pfptr(ptr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roger-wolf (just checking): wasn't this meant to check the particleId() of a PFCandidate (i.e. the particle type) even in case of different particleId() methods implemented for a generic PFCandCompatiblePtrType (that could even be pdgId instead of particle type)?

If so, the fix shold be returning here
return pfptr->particleId() == id_;

Otherwise, removing this line is perfectly fine.

return ptr->particleId() == id_;
}
private:
Expand Down
1 change: 0 additions & 1 deletion RecoTracker/TrackProducer/src/DAFTrackProducerAlgorithm.cc
Expand Up @@ -289,7 +289,6 @@ bool DAFTrackProducerAlgorithm::buildTrack (const Trajectory vtraj,
int DAFTrackProducerAlgorithm::countingGoodHits(const Trajectory traj) const{

int ngoodhits = 0;
const Trajectory& myTraj = traj;
std::vector<TrajectoryMeasurement> vtm = traj.measurements();

for (std::vector<TrajectoryMeasurement>::const_iterator tm = vtm.begin(); tm != vtm.end(); tm++){
Expand Down
Expand Up @@ -42,7 +42,6 @@ std::pair<AlgebraicMatrix, AlgebraicVector> MultipleKinematicConstraint::derivat
if(exPoint.num_row() ==0 ) throw VertexException("MultipleKinematicConstraint::value requested for zero Linearization point");

//security check for extended cartesian parametrization
const AlgebraicVector& expansion = exPoint;
int inSize = exPoint.num_row();
if((inSize%7) !=0) throw VertexException("MultipleKinematicConstraint::linearization point has a wrong dimension");

Expand Down