Skip to content

Commit 2d0229c

Browse files
committed
[LLVM Analyzer][DQM] Fix dead assignments
1 parent 3019696 commit 2d0229c

File tree

22 files changed

+44
-93
lines changed

22 files changed

+44
-93
lines changed

DQM/BeamMonitor/plugins/BeamMonitor.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,6 @@ void BeamMonitor::FitAndFill(const LuminosityBlock& lumiSeg, int& lastlumi, int&
923923
DipPVInfo_.push_back(h_nVtx_st->getRMSError());
924924
DipPVInfo_.push_back((float)MaxPVs);
925925
DipPVInfo_.push_back((float)countTotPV_);
926-
MaxPVs = 0;
927926
} else {
928927
for (size_t i = 0; i < 7; i++) {
929928
if (i > 0) {
@@ -934,7 +933,6 @@ void BeamMonitor::FitAndFill(const LuminosityBlock& lumiSeg, int& lastlumi, int&
934933
}
935934
}
936935
theBeamFitter->SetPVInfo(DipPVInfo_);
937-
countEvtLastNLS_ = 0;
938936

939937
if (onlineMode_) { // filling LS gap
940938
// FIXME: need to add protection for the case if the gap is at the resetting LS!

DQM/DTMonitorClient/src/DTLocalTriggerTest.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,6 @@ void DTLocalTriggerTest::runClientDiagnostic(DQMStore::IBooker& ibooker, DQMStor
297297
delete QualDistr;
298298
}
299299

300-
std::map<std::string, MonitorElement*>* innerME = &(secME[sector_id]);
301-
302300
if (whME[wh].find(fullName("CorrectBXPhiOut")) == whME[wh].end()) {
303301
bookWheelHistos(ibooker, wh, "ResidualBXPhiOut");
304302
bookWheelHistos(ibooker, wh, "CorrectBXPhiOut");
@@ -307,7 +305,7 @@ void DTLocalTriggerTest::runClientDiagnostic(DQMStore::IBooker& ibooker, DQMStor
307305
bookWheelHistos(ibooker, wh, "TriggerInclusivePhiOut");
308306
}
309307

310-
innerME = &(whME[wh]);
308+
std::map<std::string, MonitorElement*>* innerME = &(whME[wh]);
311309
innerME->find(fullName("CorrectBXPhiOut"))->second->setBinContent(sect, stat, BX_OK + 0.00001);
312310
innerME->find(fullName("ResidualBXPhiOut"))
313311
->second->setBinContent(sect, stat, round(25. * (BXMean - BX_OK)) + 0.00001);

DQM/DTMonitorModule/src/DTChamberEfficiencyTask.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ void DTChamberEfficiencyTask::analyze(const edm::Event& event, const edm::EventS
215215
DTChamberId TopId14(wheel, top, 14);
216216
DTRecSegment4DCollection::range segsTop14 = segs->get(TopId14);
217217
int nSegsTop14 = segsTop14.second - segsTop14.first;
218-
nSegsTop += nSegsTop14;
219218
if (nSegsTop14) {
220219
DTRecSegment4D* pBestTopSeg14 = const_cast<DTRecSegment4D*>(&getBestSegment(segsTop14));
221220
// get best between sector 10 and 14

DQM/L1TMonitorClient/src/L1TOccupancyClient.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ double L1TOccupancyClient::getAvrg(TH2F* iHist, string iTestName, int iAxis, int
605605

606606
// median
607607
case 2:
608-
marked = hservice_->maskBins(iTestName, histo, iBinStrip, iAxis);
609608
proj = histo->ProjectionY("_py", iBinStrip, iBinStrip);
610609
for (int i = 0; i < iNBins; i++) {
611610
values.push_back(proj->GetBinContent(i + 1));
@@ -628,7 +627,6 @@ double L1TOccupancyClient::getAvrg(TH2F* iHist, string iTestName, int iAxis, int
628627
break;
629628
// median
630629
case 2:
631-
marked = hservice_->maskBins(iTestName, histo, iBinStrip, iAxis);
632630
proj = histo->ProjectionX("_px", iBinStrip, iBinStrip);
633631
for (int i = 0; i < iNBins; i++) {
634632
values.push_back(proj->GetBinContent(i + 1));

DQM/Physics/src/QcdPhotonsDQM.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ void QcdPhotonsDQM::analyze(const Event& iEvent, const EventSetup& iSetup) {
340340
float photon_eta = -9.0;
341341
float photon_phi = -9.0;
342342
bool photon_passPhotonID = false;
343-
bool found_lead_pho = false;
344343
int photon_count_bar = 0;
345344
int photon_count_end = 0;
346345
// False Assumption: reco photons are ordered by Et
@@ -389,13 +388,10 @@ void QcdPhotonsDQM::analyze(const Event& iEvent, const EventSetup& iSetup) {
389388
photon_count_end++;
390389
}
391390

392-
if (!found_lead_pho) {
393-
found_lead_pho = true;
394-
photon_passPhotonID = pho_current_passPhotonID;
395-
photon_et = pho_maxet->et();
396-
photon_eta = pho_maxet->eta();
397-
photon_phi = pho_maxet->phi();
398-
}
391+
photon_passPhotonID = pho_current_passPhotonID;
392+
photon_et = pho_maxet->et();
393+
photon_eta = pho_maxet->eta();
394+
photon_phi = pho_maxet->phi();
399395
}
400396

401397
// If user requires a photon to be found, but none is, return.

DQM/Physics/src/TopDiLeptonDQM.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ void TopDiLeptonDQM::analyze(const edm::Event& evt, const edm::EventSetup& conte
177177
bool Fired_Signal_Trigger[100] = {false};
178178
bool Fired_Control_Trigger[100] = {false};
179179

180-
int N_leptons = 0;
181180
int N_iso_mu = 0;
182181
int N_iso_el = 0;
183182

@@ -260,8 +259,6 @@ void TopDiLeptonDQM::analyze(const edm::Event& evt, const edm::EventSetup& conte
260259
if (!muons.failedToGet()) {
261260
Nmuons_->Fill(muons->size());
262261

263-
N_leptons = N_leptons + muons->size();
264-
265262
for (muon = muons->begin(); muon != muons->end(); ++muon) {
266263
float N_muons = muons->size();
267264
float Q_muon = muon->charge();
@@ -331,8 +328,6 @@ void TopDiLeptonDQM::analyze(const edm::Event& evt, const edm::EventSetup& conte
331328
if (!elecs.failedToGet()) {
332329
Nelecs_->Fill(elecs->size());
333330

334-
N_leptons = N_leptons + elecs->size();
335-
336331
for (elec = elecs->begin(); elec != elecs->end(); ++elec) {
337332
float N_elecs = elecs->size();
338333
float Q_elec = elec->charge();

DQM/SiPixelMonitorClient/src/SiPixelDataQuality.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ void SiPixelDataQuality::computeGlobalQualityFlag(
299299
digiCounterBarrel = 0, clusterCounterBarrel = 0, trackCounterBarrel = 0;
300300
digiStatsEndcap = false, clusterStatsEndcap = false, trackStatsEndcap = false;
301301
digiCounterEndcap = 0, clusterCounterEndcap = 0, trackCounterEndcap = 0;
302-
init = false;
303302
}
304303
if (nFEDs == 0)
305304
return;
@@ -652,9 +651,7 @@ void SiPixelDataQuality::computeGlobalQualityFlag(
652651
endcapFlag = endcap_errors_temp[0] * combinedCuts;
653652

654653
// Track results:
655-
combinedCuts = 1.;
656-
numerator = 0;
657-
denominator = 0;
654+
658655
me = iGetter.get("Pixel/Tracks/PixelTracksCut");
659656
if (me)
660657
pixel_cuts_temp[0] = me->getIntValue();
@@ -799,7 +796,6 @@ void SiPixelDataQuality::fillGlobalQualityPlot(DQMStore::IBooker &iBooker,
799796
if (init) {
800797
count = 0;
801798
errcount = 0;
802-
init = false;
803799
count1 = 0;
804800
count2 = 0;
805801
count3 = 0;

DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ void SiPixelClusterSource::buildStructure(const edm::EventSetup &iSetup) {
344344
thePixelStructure.insert(pair<uint32_t, SiPixelClusterModule *>(id, theModule));
345345
} else if (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) {
346346
LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
347+
/*
347348
PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder();
348349
int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName();
349350
if (disk > noOfDisks)
@@ -370,6 +371,7 @@ void SiPixelClusterSource::buildStructure(const edm::EventSetup &iSetup) {
370371
mask = false;
371372
if (isPIB && mask)
372373
continue;
374+
*/
373375
SiPixelClusterModule *theModule = new SiPixelClusterModule(id, ncols, nrows);
374376
thePixelStructure.insert(pair<uint32_t, SiPixelClusterModule *>(id, theModule));
375377
}

DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,7 @@ void SiPixelDigiSource::buildStructure(const edm::EventSetup& iSetup) {
11381138
uint32_t id = detId();
11391139
SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows);
11401140

1141+
/*
11411142
PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder();
11421143
int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName();
11431144
if (disk > noOfDisks)
@@ -1165,13 +1166,13 @@ void SiPixelDigiSource::buildStructure(const edm::EventSetup& iSetup) {
11651166
mask = false;
11661167
if (isPIB && mask)
11671168
continue;
1168-
1169+
*/
11691170
thePixelStructure.insert(pair<uint32_t, SiPixelDigiModule*>(id, theModule));
11701171
} else if ((detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (isUpgrade)) {
11711172
LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
11721173
uint32_t id = detId();
11731174
SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows);
1174-
1175+
/*
11751176
PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder();
11761177
int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName();
11771178
if (disk > noOfDisks)
@@ -1199,7 +1200,7 @@ void SiPixelDigiSource::buildStructure(const edm::EventSetup& iSetup) {
11991200
mask = false;
12001201
if (isPIB && mask)
12011202
continue;
1202-
1203+
*/
12031204
thePixelStructure.insert(pair<uint32_t, SiPixelDigiModule*>(id, theModule));
12041205
} //end_elseif(isUpgrade)
12051206
}

DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) {
188188
edm::ESHandle<TrackerGeometry> pDD = iSetup.getHandle(trackerGeomTokenBeginRun_);
189189

190190
edm::ESHandle<TrackerTopology> tTopoHandle = iSetup.getHandle(trackerTopoTokenBeginRun_);
191-
const TrackerTopology *pTT = tTopoHandle.product();
191+
// const TrackerTopology *pTT = tTopoHandle.product();
192192

193193
LogVerbatim("PixelDQM") << " *** Geometry node for TrackerGeom is " << &(*pDD) << std::endl;
194194
LogVerbatim("PixelDQM") << " *** I have " << pDD->detsPXB().size() << " barrel pixel detectors" << std::endl;
@@ -227,7 +227,7 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) {
227227
LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
228228
uint32_t id = detId();
229229
SiPixelRawDataErrorModule *theModule = new SiPixelRawDataErrorModule(id, ncols, nrows);
230-
230+
/*
231231
PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder();
232232
int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName();
233233
int blade = PixelEndcapName(DetId(id), pTT, isUpgrade).bladeName();
@@ -252,7 +252,7 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) {
252252
mask = false;
253253
if (isPIB && mask)
254254
continue;
255-
255+
*/
256256
thePixelStructure.insert(pair<uint32_t, SiPixelRawDataErrorModule *>(id, theModule));
257257
}
258258

0 commit comments

Comments
 (0)