Skip to content

Commit

Permalink
Merge pull request #41528 from smuzaffar/dqm-llvm16-warn3
Browse files Browse the repository at this point in the history
[DQM] [CLANG] Fix warnings reported by llvm16 in CLANG IBs
  • Loading branch information
cmsbuild authored May 9, 2023
2 parents 120a7ed + c097a56 commit b830c71
Show file tree
Hide file tree
Showing 44 changed files with 9 additions and 257 deletions.
18 changes: 0 additions & 18 deletions DPGAnalysis/HcalTools/plugins/CMTRawAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2788,10 +2788,6 @@ void CMTRawAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iS
int mcountmin3 = 0;
int mcountmin6 = 0;
int mcountmin8 = 0;
int pnnbins1 = 0;
int pnnbins3 = 0;
int pnnbins6 = 0;
int pnnbins8 = 0;
int pnnmin1 = 999999999;
int pnnmin3 = 999999999;
int pnnmin6 = 999999999;
Expand Down Expand Up @@ -3929,7 +3925,6 @@ void CMTRawAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iS
if (pcountmin1 < pnnmin1)
pnnmin1 = pcountmin1;
pcountmin1 = 0;
pnnbins1++;
}
if (mcountmin1 > 0) {
if (mcountmin1 < mnnmin1)
Expand All @@ -3944,7 +3939,6 @@ void CMTRawAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iS
if (pcountmin3 < pnnmin3)
pnnmin3 = pcountmin3;
pcountmin3 = 0;
pnnbins3++;
}
if (mcountmin3 > 0) {
if (mcountmin3 < mnnmin3)
Expand All @@ -3959,7 +3953,6 @@ void CMTRawAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iS
if (pcountmin8 < pnnmin8)
pnnmin8 = pcountmin8;
pcountmin8 = 0;
pnnbins8++;
}
if (mcountmin8 > 0) {
if (mcountmin8 < mnnmin8)
Expand All @@ -3974,7 +3967,6 @@ void CMTRawAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iS
if (pcountmin6 < pnnmin6)
pnnmin6 = pcountmin6;
pcountmin6 = 0;
pnnbins6++;
}
if (mcountmin6 > 0) {
if (mcountmin6 < mnnmin6)
Expand Down Expand Up @@ -5367,9 +5359,6 @@ void CMTRawAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iS

//////////////////////////////////////////////////////////////////////////
// // // // // // //sumamplitudes:
int testcount1 = 0;
int testcount2 = 0;
int testcount3 = 0;
//////////////////////////////////////// // k0, k2, k3 loops LOOPS ////////// ///// ///// NO k1 loop over depthes !!!
for (int k0 = 0; k0 < nsub; k0++) {
int sumofchannels = 0;
Expand All @@ -5378,13 +5367,6 @@ void CMTRawAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iS
double sumamplitudesubdet0 = 0.;
for (int k2 = 0; k2 < neta; k2++) {
for (int k3 = 0; k3 < nphi; k3++) {
if (amplitudechannel[k0][0][k2][k3] != 0. && amplitudechannel[k0][1][k2][k3] != 0.)
testcount1++;
if (amplitudechannel[k0][0][k2][k3] != 0. && amplitudechannel[k0][1][k2][k3] == 0.)
testcount2++;
if (amplitudechannel[k0][0][k2][k3] == 0. && amplitudechannel[k0][1][k2][k3] != 0.)
testcount3++;

// HB
if (k0 == 0) {
double sumamplitudechannel_HB = amplitudechannel[k0][0][k2][k3] + amplitudechannel[k0][1][k2][k3];
Expand Down
2 changes: 0 additions & 2 deletions DQM/CSCMonitorModule/plugins/CSCDQM_StripClusterFinder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ namespace cscdqm {

for (uint32_t i = 0; i < MEStripClusters.size(); i++) {
MEStripClusters[i].localMax.clear();
int ilocal = 0;
int iLS = MEStripClusters[i].LFTBNDStrip;
int iRS = MEStripClusters[i].IRTBNDStrip;
int iLT = MEStripClusters[i].LFTBNDTime;
Expand All @@ -272,7 +271,6 @@ namespace cscdqm {
localMaxTMP.Strip = iS;
localMaxTMP.Time = jT;
MEStripClusters[i].localMax.push_back(localMaxTMP);
ilocal++;
}
}
}
Expand Down
8 changes: 0 additions & 8 deletions DQM/DTMonitorClient/src/DTOccupancyTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,8 @@ int DTOccupancyTest::runOccupancyTest(TH2F* histo, const DTChamberId& chId, floa
int totalDeadCells = 0;
int nDeadCellsInARow = 1;
int nDeadCellsInARowMax = 0;
int nCellsZeroCount = 0;
bool previousIsDead = false;

int interDeadCells = 0;

totCell += nWires;

for (int cell = firstWire; cell != (nWires + firstWire); ++cell) { // loop over cells
Expand All @@ -302,23 +299,18 @@ int DTOccupancyTest::runOccupancyTest(TH2F* histo, const DTChamberId& chId, floa
totOccup += cellOccup;

if (cellOccup == 0) {
nCellsZeroCount++;
totalDeadCells++;
if (previousIsDead) {
nDeadCellsInARow++;
} else {
// if(interDeadCells > 3) {
if (nDeadCellsInARow > nDeadCellsInARowMax)
nDeadCellsInARowMax = nDeadCellsInARow;
nDeadCellsInARow = 1;
// }
}
previousIsDead = true;
interDeadCells = 0;
LogTrace("DTDQM|DTMonitorClient|DTOccupancyTest") << " below reference" << endl;
} else {
previousIsDead = false;
interDeadCells++;
}
// // 3 cells not dead between a group of dead cells don't break the count
if (nDeadCellsInARow > nDeadCellsInARowMax)
Expand Down
2 changes: 0 additions & 2 deletions DQM/EcalCommon/src/MESetMulti.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@ namespace ecaldqm {
});

// [dim0 = 0, dim1 = 0] -> 0, [dim0 = 0, dim1 = 1] -> 1, ...
unsigned iM(0);
while (true) {
replacements.clear();
typename ReplCandidates::const_iterator rItr(replCandidates_.begin());
bool last(setReplacements(rItr));
sets_.push_back(_seed.clone(formPath(replacements)));
if (last)
break;
++iM;
}

current_ = sets_[0];
Expand Down
2 changes: 0 additions & 2 deletions DQM/HcalTasks/src/RecoRunSummary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ namespace hcaldqm {

// summary flags
std::vector<flag::Flag> sumflags;
int icrate = 0;
for (std::vector<uint32_t>::const_iterator it = _vhashCrates.begin(); it != _vhashCrates.end(); ++it) {
flag::Flag fSum("RECO");
HcalElectronicsId eid(*it);
Expand Down Expand Up @@ -164,7 +163,6 @@ namespace hcaldqm {
ft->reset();
}
sumflags.push_back(fSum);
icrate++;
}

return sumflags;
Expand Down
3 changes: 0 additions & 3 deletions DQM/L1TMonitor/src/L1TMP7ZeroSupp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ void L1TMP7ZeroSupp::analyze(const edm::Event& e, const edm::EventSetup& c) {
for (const auto& id : definedMaskCapIds_) {
evtGood[id] = true;
}
unsigned valid_count = 0;
for (const auto& fedId : fedIds_) {
const FEDRawData& l1tRcd = feds->FEDData(fedId);

Expand All @@ -193,8 +192,6 @@ void L1TMP7ZeroSupp::analyze(const edm::Event& e, const edm::EventSetup& c) {
<< fedId << ".";
}
continue;
} else {
valid_count++;
}

const unsigned char* data = l1tRcd.data();
Expand Down
3 changes: 0 additions & 3 deletions DQM/L1TMonitor/src/L1TStage2uGTCaloLayer2Comp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,8 @@ bool L1TStage2uGTCaloLayer2Comp::compareJets(const edm::Handle<l1t::JetBxCollect
return false;
}

int nJets = 0;
if (col1It != col1->end() || col2It != col2->end()) {
while (true) {
++nJets;

// object pt mismatch
if (col1It->hwPt() != col2It->hwPt()) {
comparisonNum->Fill(JETBADET);
Expand Down
2 changes: 0 additions & 2 deletions DQM/L1TMonitor/src/L1TdeStage2CaloLayer2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,8 @@ bool L1TdeStage2CaloLayer2::compareJets(const edm::Handle<l1t::JetBxCollection>&
return false;
}

int nJets = 0;
if (dataIt != dataCol->end(currBx) || emulIt != emulCol->end(currBx)) {
while (true) {
++nJets;
matchedEmulIt = emulIt;

// object pt mismatch
Expand Down
11 changes: 0 additions & 11 deletions DQM/L1TMonitorClient/src/L1EmulatorErrorFlagClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ void L1EmulatorErrorFlagClient::initialize() {
m_systemFolder.reserve(m_nrL1Systems);
m_systemErrorFlag.reserve(m_nrL1Systems);

int indexSys = 0;

for (std::vector<edm::ParameterSet>::const_iterator itSystem = m_l1Systems.begin(); itSystem != m_l1Systems.end();
++itSystem) {
m_systemLabel.push_back(itSystem->getParameter<std::string>("SystemLabel"));
Expand All @@ -52,8 +50,6 @@ void L1EmulatorErrorFlagClient::initialize() {
m_systemMask.push_back(itSystem->getParameter<unsigned int>("SystemMask"));

m_systemFolder.push_back(itSystem->getParameter<std::string>("SystemFolder"));

indexSys++;
}

// [SYS]ErrorFlag histogram
Expand Down Expand Up @@ -115,13 +111,6 @@ void L1EmulatorErrorFlagClient::dqmEndLuminosityBlock(DQMStore::IBooker& ibooker
m_summaryContent[iSys] = percAgree;
}

int numUnMaskedSystems = 0;
for (unsigned int iMon = 0; iMon < m_nrL1Systems; iMon++) {
if (m_summaryContent[iMon] != -1) {
numUnMaskedSystems++;
}
}

// fill the SummaryErrorFlagMap histogram for L1 systems
// (bin 0 - underflow, bin iSys + 1 overflow)
for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
Expand Down
8 changes: 0 additions & 8 deletions DQM/L1TMonitorClient/src/L1TEMTFEventInfoClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,7 @@ void L1TEMTFEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter&
std::cout << "Ran ibooker.setCurrentFolder(dirEventInfo" << std::endl;
// general counters:
// iAllQTest: all quality tests for all systems and objects
// iAllMon: all monitored systems and objects
int iAllQTest = 0;
int iAllMon = 0;

if (m_verbose)
std::cout << "m_nrTrackObjects = " << m_nrTrackObjects << std::endl;
Expand Down Expand Up @@ -499,8 +497,6 @@ void L1TEMTFEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter&

iAllQTest++;
}

iAllMon++;
}

for (unsigned int iMon = 0; iMon < m_nrHitObjects; ++iMon) {
Expand Down Expand Up @@ -529,8 +525,6 @@ void L1TEMTFEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter&

iAllQTest++;
}

iAllMon++;
}

// for Noisy Strips ====================================================================
Expand All @@ -553,7 +547,6 @@ void L1TEMTFEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter&

iAllQTest++;
}
iAllMon++;
}
// for Dead Strips ====================================================================
for (unsigned int iMon = 0; iMon < m_nrDeadStrip; ++iMon) {
Expand All @@ -575,7 +568,6 @@ void L1TEMTFEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter&

iAllQTest++;
}
iAllMon++;
}

if (m_verbose)
Expand Down
6 changes: 0 additions & 6 deletions DQM/L1TMonitorClient/src/L1TEventInfoClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,7 @@ void L1TEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter& ige
ibooker.setCurrentFolder(dirEventInfo + "/reportSummaryContents");
// general counters:
// iAllQTest: all quality tests for all systems and objects
// iAllMon: all monitored systems and objects
int iAllQTest = 0;
int iAllMon = 0;

for (unsigned int iMon = 0; iMon < m_nrL1Systems; ++iMon) {
m_summaryContent.push_back(dqm::qstatus::DISABLED);
Expand All @@ -331,8 +329,6 @@ void L1TEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter& ige

iAllQTest++;
}

iAllMon++;
}

for (unsigned int iMon = 0; iMon < m_nrL1Objects; ++iMon) {
Expand All @@ -349,8 +345,6 @@ void L1TEventInfoClient::book(DQMStore::IBooker& ibooker, DQMStore::IGetter& ige

iAllQTest++;
}

iAllMon++;
}

ibooker.setCurrentFolder(dirEventInfo);
Expand Down
2 changes: 0 additions & 2 deletions DQM/Physics/src/B2GDQM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ void B2GDQM::analyzeJets(const Event& iEvent, const edm::EventSetup& iSetup) {
edm::View<reco::Jet> const& pfjets = *pfJetCollection;

// Jet Correction
int countJet = 0;

for (edm::View<reco::Jet>::const_iterator jet = pfjets.begin(), jetEnd = pfjets.end(); jet != jetEnd; ++jet) {
if (jet->pt() < jetPtMins_[icoll])
Expand Down Expand Up @@ -299,7 +298,6 @@ void B2GDQM::analyzeJets(const Event& iEvent, const edm::EventSetup& iSetup) {
} // end if collection is AK8 PFJets Puppi soft-drop

} // end if basic jet != 0
countJet++;
}
}

Expand Down
2 changes: 0 additions & 2 deletions DQM/Physics/src/EwkElecDQM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ hltConfigProvider.prescaleValue(ps, trigName) ;

float jet_et = -8.0;
float jet_eta = -8.0;
int jet_count = 0;
float jet2_et = -9.0;
unsigned int jetCollectionSize = jetCollection->size();
int njets = 0;
Expand All @@ -556,7 +555,6 @@ hltConfigProvider.prescaleValue(ps, trigName) ;

if (jet.et() > eJetMin_) {
njets++;
jet_count++;
}
if (jet_current_et > jet_et) {
jet2_et = jet_et; // 2nd highest jet get's et from current highest
Expand Down
4 changes: 0 additions & 4 deletions DQM/Physics/src/EwkMuDQM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -499,16 +499,13 @@ void EwkMuDQM::analyze(const Event& ev, const EventSetup& iSet) {
bool zmuon_sel[NFLAGSZ];
bool muon4Z = false;

double number_of_muons = 0;
double number_of_goodMuons = 0;

for (unsigned int i = 0; i < muonCollectionSize; i++) {
for (int j = 0; j < NFLAGS; ++j) {
muon_sel[j] = false;
}

number_of_muons++;

const Muon& mu = muonCollection->at(i);
if (!mu.isGlobalMuon())
continue;
Expand Down Expand Up @@ -831,7 +828,6 @@ void EwkMuDQM::analyze(const Event& ev, const EventSetup& iSet) {
n_zselPt2thr_->Fill(nmuonsForZ2);
}

// nmuons_->Fill(number_of_muons);
// nmuons_->Fill(muonCollectionSize);
ngoodmuons_->Fill(number_of_goodMuons);

Expand Down
2 changes: 0 additions & 2 deletions DQM/Physics/src/EwkMuLumiMonitorDQM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ void EwkMuLumiMonitorDQM::analyze(const Event& ev, const EventSetup&) {
}
ev.getByToken(trigEvToken_, handleTriggerEvent);
const trigger::TriggerObjectCollection& toc(handleTriggerEvent->getObjects());
size_t nMuHLT = 0;
std::vector<reco::Particle> HLTMuMatched;
for (size_t ia = 0; ia < handleTriggerEvent->sizeFilters(); ++ia) {
std::string fullname = handleTriggerEvent->filterTag(ia).encode();
Expand All @@ -337,7 +336,6 @@ void EwkMuLumiMonitorDQM::analyze(const Event& ev, const EventSetup&) {
hlt_sel = true;
nhlt++;
HLTMuMatched.push_back(toc[*ki].particle());
nMuHLT++;
}
}
}
Expand Down
Loading

0 comments on commit b830c71

Please sign in to comment.