From 2d0229c2052cd050b684abd7ae4b96b5b3064d6a Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Fri, 4 Oct 2024 09:24:04 +0200 Subject: [PATCH 1/6] [LLVM Analyzer][DQM] Fix dead assignments --- DQM/BeamMonitor/plugins/BeamMonitor.cc | 2 - DQM/DTMonitorClient/src/DTLocalTriggerTest.cc | 4 +- .../src/DTChamberEfficiencyTask.cc | 1 - .../src/L1TOccupancyClient.cc | 2 - DQM/Physics/src/QcdPhotonsDQM.cc | 12 ++--- DQM/Physics/src/TopDiLeptonDQM.cc | 5 --- .../src/SiPixelDataQuality.cc | 6 +-- .../src/SiPixelClusterSource.cc | 2 + .../src/SiPixelDigiSource.cc | 7 +-- .../src/SiPixelRawDataErrorSource.cc | 6 +-- .../src/SiPixelHitEfficiencySource.cc | 6 --- .../src/ApvTimingAlgorithm.cc | 4 -- .../src/PedsFullNoiseAlgorithm.cc | 3 -- .../src/CommissioningHistograms.cc | 2 +- .../src/SiStripApvGainsDQM.cc | 4 +- DQMOffline/Hcal/src/HcalRecHitsDQMClient.cc | 4 +- DQMOffline/JetMET/src/METAnalyzer.cc | 5 +-- DQMOffline/Muon/src/CSCOfflineMonitor.cc | 5 +-- .../Trigger/plugins/HLTInclusiveVBFSource.cc | 44 ++++++------------- .../Components/plugins/DQMFileSaver.cc | 2 +- .../Components/plugins/DQMStoreStats.cc | 8 ++-- DQMServices/Core/src/DQMNet.cc | 3 +- 22 files changed, 44 insertions(+), 93 deletions(-) diff --git a/DQM/BeamMonitor/plugins/BeamMonitor.cc b/DQM/BeamMonitor/plugins/BeamMonitor.cc index 705cbc16e02a8..1e8d3f4f9424d 100644 --- a/DQM/BeamMonitor/plugins/BeamMonitor.cc +++ b/DQM/BeamMonitor/plugins/BeamMonitor.cc @@ -923,7 +923,6 @@ void BeamMonitor::FitAndFill(const LuminosityBlock& lumiSeg, int& lastlumi, int& DipPVInfo_.push_back(h_nVtx_st->getRMSError()); DipPVInfo_.push_back((float)MaxPVs); DipPVInfo_.push_back((float)countTotPV_); - MaxPVs = 0; } else { for (size_t i = 0; i < 7; i++) { if (i > 0) { @@ -934,7 +933,6 @@ void BeamMonitor::FitAndFill(const LuminosityBlock& lumiSeg, int& lastlumi, int& } } theBeamFitter->SetPVInfo(DipPVInfo_); - countEvtLastNLS_ = 0; if (onlineMode_) { // filling LS gap // FIXME: need to add protection for the case if the gap is at the resetting LS! diff --git a/DQM/DTMonitorClient/src/DTLocalTriggerTest.cc b/DQM/DTMonitorClient/src/DTLocalTriggerTest.cc index cd0175129efa9..473c174805d83 100644 --- a/DQM/DTMonitorClient/src/DTLocalTriggerTest.cc +++ b/DQM/DTMonitorClient/src/DTLocalTriggerTest.cc @@ -297,8 +297,6 @@ void DTLocalTriggerTest::runClientDiagnostic(DQMStore::IBooker& ibooker, DQMStor delete QualDistr; } - std::map* innerME = &(secME[sector_id]); - if (whME[wh].find(fullName("CorrectBXPhiOut")) == whME[wh].end()) { bookWheelHistos(ibooker, wh, "ResidualBXPhiOut"); bookWheelHistos(ibooker, wh, "CorrectBXPhiOut"); @@ -307,7 +305,7 @@ void DTLocalTriggerTest::runClientDiagnostic(DQMStore::IBooker& ibooker, DQMStor bookWheelHistos(ibooker, wh, "TriggerInclusivePhiOut"); } - innerME = &(whME[wh]); + std::map* innerME = &(whME[wh]); innerME->find(fullName("CorrectBXPhiOut"))->second->setBinContent(sect, stat, BX_OK + 0.00001); innerME->find(fullName("ResidualBXPhiOut")) ->second->setBinContent(sect, stat, round(25. * (BXMean - BX_OK)) + 0.00001); diff --git a/DQM/DTMonitorModule/src/DTChamberEfficiencyTask.cc b/DQM/DTMonitorModule/src/DTChamberEfficiencyTask.cc index 38740f51224e6..40bfac68661a9 100644 --- a/DQM/DTMonitorModule/src/DTChamberEfficiencyTask.cc +++ b/DQM/DTMonitorModule/src/DTChamberEfficiencyTask.cc @@ -215,7 +215,6 @@ void DTChamberEfficiencyTask::analyze(const edm::Event& event, const edm::EventS DTChamberId TopId14(wheel, top, 14); DTRecSegment4DCollection::range segsTop14 = segs->get(TopId14); int nSegsTop14 = segsTop14.second - segsTop14.first; - nSegsTop += nSegsTop14; if (nSegsTop14) { DTRecSegment4D* pBestTopSeg14 = const_cast(&getBestSegment(segsTop14)); // get best between sector 10 and 14 diff --git a/DQM/L1TMonitorClient/src/L1TOccupancyClient.cc b/DQM/L1TMonitorClient/src/L1TOccupancyClient.cc index 9abb66db22879..4db94a263ed89 100644 --- a/DQM/L1TMonitorClient/src/L1TOccupancyClient.cc +++ b/DQM/L1TMonitorClient/src/L1TOccupancyClient.cc @@ -605,7 +605,6 @@ double L1TOccupancyClient::getAvrg(TH2F* iHist, string iTestName, int iAxis, int // median case 2: - marked = hservice_->maskBins(iTestName, histo, iBinStrip, iAxis); proj = histo->ProjectionY("_py", iBinStrip, iBinStrip); for (int i = 0; i < iNBins; i++) { values.push_back(proj->GetBinContent(i + 1)); @@ -628,7 +627,6 @@ double L1TOccupancyClient::getAvrg(TH2F* iHist, string iTestName, int iAxis, int break; // median case 2: - marked = hservice_->maskBins(iTestName, histo, iBinStrip, iAxis); proj = histo->ProjectionX("_px", iBinStrip, iBinStrip); for (int i = 0; i < iNBins; i++) { values.push_back(proj->GetBinContent(i + 1)); diff --git a/DQM/Physics/src/QcdPhotonsDQM.cc b/DQM/Physics/src/QcdPhotonsDQM.cc index 112aa5f7b5059..d1308efb69ca3 100644 --- a/DQM/Physics/src/QcdPhotonsDQM.cc +++ b/DQM/Physics/src/QcdPhotonsDQM.cc @@ -340,7 +340,6 @@ void QcdPhotonsDQM::analyze(const Event& iEvent, const EventSetup& iSetup) { float photon_eta = -9.0; float photon_phi = -9.0; bool photon_passPhotonID = false; - bool found_lead_pho = false; int photon_count_bar = 0; int photon_count_end = 0; // False Assumption: reco photons are ordered by Et @@ -389,13 +388,10 @@ void QcdPhotonsDQM::analyze(const Event& iEvent, const EventSetup& iSetup) { photon_count_end++; } - if (!found_lead_pho) { - found_lead_pho = true; - photon_passPhotonID = pho_current_passPhotonID; - photon_et = pho_maxet->et(); - photon_eta = pho_maxet->eta(); - photon_phi = pho_maxet->phi(); - } + photon_passPhotonID = pho_current_passPhotonID; + photon_et = pho_maxet->et(); + photon_eta = pho_maxet->eta(); + photon_phi = pho_maxet->phi(); } // If user requires a photon to be found, but none is, return. diff --git a/DQM/Physics/src/TopDiLeptonDQM.cc b/DQM/Physics/src/TopDiLeptonDQM.cc index 3bb8e971679a1..cb9c5e5693f8f 100644 --- a/DQM/Physics/src/TopDiLeptonDQM.cc +++ b/DQM/Physics/src/TopDiLeptonDQM.cc @@ -177,7 +177,6 @@ void TopDiLeptonDQM::analyze(const edm::Event& evt, const edm::EventSetup& conte bool Fired_Signal_Trigger[100] = {false}; bool Fired_Control_Trigger[100] = {false}; - int N_leptons = 0; int N_iso_mu = 0; int N_iso_el = 0; @@ -260,8 +259,6 @@ void TopDiLeptonDQM::analyze(const edm::Event& evt, const edm::EventSetup& conte if (!muons.failedToGet()) { Nmuons_->Fill(muons->size()); - N_leptons = N_leptons + muons->size(); - for (muon = muons->begin(); muon != muons->end(); ++muon) { float N_muons = muons->size(); float Q_muon = muon->charge(); @@ -331,8 +328,6 @@ void TopDiLeptonDQM::analyze(const edm::Event& evt, const edm::EventSetup& conte if (!elecs.failedToGet()) { Nelecs_->Fill(elecs->size()); - N_leptons = N_leptons + elecs->size(); - for (elec = elecs->begin(); elec != elecs->end(); ++elec) { float N_elecs = elecs->size(); float Q_elec = elec->charge(); diff --git a/DQM/SiPixelMonitorClient/src/SiPixelDataQuality.cc b/DQM/SiPixelMonitorClient/src/SiPixelDataQuality.cc index 352e6f51ec847..0455f9db3b625 100644 --- a/DQM/SiPixelMonitorClient/src/SiPixelDataQuality.cc +++ b/DQM/SiPixelMonitorClient/src/SiPixelDataQuality.cc @@ -299,7 +299,6 @@ void SiPixelDataQuality::computeGlobalQualityFlag( digiCounterBarrel = 0, clusterCounterBarrel = 0, trackCounterBarrel = 0; digiStatsEndcap = false, clusterStatsEndcap = false, trackStatsEndcap = false; digiCounterEndcap = 0, clusterCounterEndcap = 0, trackCounterEndcap = 0; - init = false; } if (nFEDs == 0) return; @@ -652,9 +651,7 @@ void SiPixelDataQuality::computeGlobalQualityFlag( endcapFlag = endcap_errors_temp[0] * combinedCuts; // Track results: - combinedCuts = 1.; - numerator = 0; - denominator = 0; + me = iGetter.get("Pixel/Tracks/PixelTracksCut"); if (me) pixel_cuts_temp[0] = me->getIntValue(); @@ -799,7 +796,6 @@ void SiPixelDataQuality::fillGlobalQualityPlot(DQMStore::IBooker &iBooker, if (init) { count = 0; errcount = 0; - init = false; count1 = 0; count2 = 0; count3 = 0; diff --git a/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc b/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc index 07c00c3efcd6f..64ef320c8827e 100644 --- a/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc +++ b/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc @@ -344,6 +344,7 @@ void SiPixelClusterSource::buildStructure(const edm::EventSetup &iSetup) { thePixelStructure.insert(pair(id, theModule)); } else if (detId.subdetId() == static_cast(PixelSubdetector::PixelEndcap)) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; + /* PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder(); int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); if (disk > noOfDisks) @@ -370,6 +371,7 @@ void SiPixelClusterSource::buildStructure(const edm::EventSetup &iSetup) { mask = false; if (isPIB && mask) continue; + */ SiPixelClusterModule *theModule = new SiPixelClusterModule(id, ncols, nrows); thePixelStructure.insert(pair(id, theModule)); } diff --git a/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc b/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc index de8f6394f9d0d..31b794891c9e7 100644 --- a/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc +++ b/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc @@ -1138,6 +1138,7 @@ void SiPixelDigiSource::buildStructure(const edm::EventSetup& iSetup) { uint32_t id = detId(); SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows); + /* PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder(); int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); if (disk > noOfDisks) @@ -1165,13 +1166,13 @@ void SiPixelDigiSource::buildStructure(const edm::EventSetup& iSetup) { mask = false; if (isPIB && mask) continue; - + */ thePixelStructure.insert(pair(id, theModule)); } else if ((detId.subdetId() == static_cast(PixelSubdetector::PixelEndcap)) && (isUpgrade)) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; uint32_t id = detId(); SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows); - + /* PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder(); int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); if (disk > noOfDisks) @@ -1199,7 +1200,7 @@ void SiPixelDigiSource::buildStructure(const edm::EventSetup& iSetup) { mask = false; if (isPIB && mask) continue; - + */ thePixelStructure.insert(pair(id, theModule)); } //end_elseif(isUpgrade) } diff --git a/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc b/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc index a5d4e2a2fca77..296db043e5c41 100644 --- a/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc +++ b/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc @@ -188,7 +188,7 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) { edm::ESHandle pDD = iSetup.getHandle(trackerGeomTokenBeginRun_); edm::ESHandle tTopoHandle = iSetup.getHandle(trackerTopoTokenBeginRun_); - const TrackerTopology *pTT = tTopoHandle.product(); + // const TrackerTopology *pTT = tTopoHandle.product(); LogVerbatim("PixelDQM") << " *** Geometry node for TrackerGeom is " << &(*pDD) << std::endl; LogVerbatim("PixelDQM") << " *** I have " << pDD->detsPXB().size() << " barrel pixel detectors" << std::endl; @@ -227,7 +227,7 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; uint32_t id = detId(); SiPixelRawDataErrorModule *theModule = new SiPixelRawDataErrorModule(id, ncols, nrows); - + /* PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder(); int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); int blade = PixelEndcapName(DetId(id), pTT, isUpgrade).bladeName(); @@ -252,7 +252,7 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) { mask = false; if (isPIB && mask) continue; - + */ thePixelStructure.insert(pair(id, theModule)); } diff --git a/DQM/SiPixelMonitorTrack/src/SiPixelHitEfficiencySource.cc b/DQM/SiPixelMonitorTrack/src/SiPixelHitEfficiencySource.cc index ab76826a26df7..372e216fbfe1c 100644 --- a/DQM/SiPixelMonitorTrack/src/SiPixelHitEfficiencySource.cc +++ b/DQM/SiPixelMonitorTrack/src/SiPixelHitEfficiencySource.cc @@ -512,12 +512,6 @@ void SiPixelHitEfficiencySource::analyze(const edm::Event &iEvent, const edm::Ev float lymatch = 9999.0; if (!expTrajMeasurements.empty()) { if (glmatch < 9999.) { // if there is any propagated trajectory for this hit - const DetId &matchhit_detId = expTrajMeasurements[imatch].recHit()->geographicalId(); - - int matchhit_ladder = PXBDetId(matchhit_detId).ladder(); - int dladder = abs(matchhit_ladder - hit_ladder); - if (dladder > 10) - dladder = 20 - dladder; LocalPoint lp = expTrajMeasurements[imatch].updatedState().localPosition(); lxmatch = fabs(lp.x() - chklp.x()); lymatch = fabs(lp.y() - chklp.y()); diff --git a/DQM/SiStripCommissioningAnalysis/src/ApvTimingAlgorithm.cc b/DQM/SiStripCommissioningAnalysis/src/ApvTimingAlgorithm.cc index 12fe67c1d719c..7ada5b2e1df31 100644 --- a/DQM/SiStripCommissioningAnalysis/src/ApvTimingAlgorithm.cc +++ b/DQM/SiStripCommissioningAnalysis/src/ApvTimingAlgorithm.cc @@ -240,7 +240,6 @@ void ApvTimingAlgorithm::analyse() { if (!found) { //Try tick mark recovery max_derivative_bin = sistrip::invalid_; - max_derivative = -1. * sistrip::invalid_; // Find rising edges_r (derivative_r across five bins > threshold) std::map edges_r; @@ -288,7 +287,6 @@ void ApvTimingAlgorithm::analyse() { // Store max derivative_r if (temp_r > max_derivative_r && ii_r < 10) { max_derivative_r = temp_r; - max_derivative = temp_r; max_derivative_bin = bin_r; } @@ -304,11 +302,9 @@ void ApvTimingAlgorithm::analyse() { // Break from loop if recovery tick mark found if (valid_r) { found_r = true; - found = true; anal->addErrorCode(sistrip::tickMarkRecovered_); } else { max_derivative_r = -1. * sistrip::invalid_; - max_derivative = -1. * sistrip::invalid_; max_derivative_bin = sistrip::invalid_; //edges_r.erase(iter_r); anal->addErrorCode(sistrip::rejectedCandidate_); diff --git a/DQM/SiStripCommissioningAnalysis/src/PedsFullNoiseAlgorithm.cc b/DQM/SiStripCommissioningAnalysis/src/PedsFullNoiseAlgorithm.cc index 2dd10d567d082..421ccf78dde98 100644 --- a/DQM/SiStripCommissioningAnalysis/src/PedsFullNoiseAlgorithm.cc +++ b/DQM/SiStripCommissioningAnalysis/src/PedsFullNoiseAlgorithm.cc @@ -361,8 +361,6 @@ void PedsFullNoiseAlgorithm::analyse() { } // Calculate the spread for noise and pedestal - apvID = -1; - for (int iStrip = 0; iStrip < histoNoiseMean->GetNbinsX(); iStrip++) { if (iStrip < histoNoiseMean->GetNbinsX() / 2) apvID = 0; @@ -380,7 +378,6 @@ void PedsFullNoiseAlgorithm::analyse() { } // loop on each strip in the lldChannel - apvID = 0; TH1S* histoResidualStrip = new TH1S("histoResidualStrip", "", histoNoise->GetNbinsX(), diff --git a/DQM/SiStripCommissioningClients/src/CommissioningHistograms.cc b/DQM/SiStripCommissioningClients/src/CommissioningHistograms.cc index 18729eef67638..862d815adea19 100644 --- a/DQM/SiStripCommissioningClients/src/CommissioningHistograms.cc +++ b/DQM/SiStripCommissioningClients/src/CommissioningHistograms.cc @@ -667,7 +667,7 @@ TH1* CommissioningHistograms::histogram(const sistrip::Monitorable& mon, // Construct histogram name std::string name = SummaryGenerator::name(task_, mon, pres, view, directory); - MonitorElement* me = bei_->get(bei_->pwd() + "/" + name); + MonitorElement* me = nullptr; // Create summary plot float high = static_cast(xbins); diff --git a/DQM/SiStripMonitorSummary/src/SiStripApvGainsDQM.cc b/DQM/SiStripMonitorSummary/src/SiStripApvGainsDQM.cc index 8ba7aa31b12d4..43a697d409dcf 100644 --- a/DQM/SiStripMonitorSummary/src/SiStripApvGainsDQM.cc +++ b/DQM/SiStripMonitorSummary/src/SiStripApvGainsDQM.cc @@ -157,10 +157,10 @@ void SiStripApvGainsDQM::fillMEsForLayer( } for (int iapv = 0; iapv < nApv; ++iapv) { - meanApvGain = meanApvGain + condObj_->getApvGain(iapv, gainRange); + // meanApvGain = meanApvGain + condObj_->getApvGain(iapv, gainRange); selME_.SummaryDistr->Fill(iBin, condObj_->getApvGain(iapv, gainRange)); } // iapv - meanApvGain = meanApvGain / nApv; + // meanApvGain = meanApvGain / nApv; // Fill the TkHistoMap with meanApvgain: // if(HistoMaps_On_ ) Tk_HM_->setBinContent(selDetId_, meanApvGain); diff --git a/DQMOffline/Hcal/src/HcalRecHitsDQMClient.cc b/DQMOffline/Hcal/src/HcalRecHitsDQMClient.cc index e0bbcc7c45b91..97e7798f8ebf1 100644 --- a/DQMOffline/Hcal/src/HcalRecHitsDQMClient.cc +++ b/DQMOffline/Hcal/src/HcalRecHitsDQMClient.cc @@ -261,10 +261,10 @@ int HcalRecHitsDQMClient::HcalRecHitsEndjob(const std::vector float cnorm; float enorm; - unsigned int vsIetaIdx = occupancy_vs_ieta.size(); + unsigned int vsIetaIdx = 0; omatched = false; - for (vsIetaIdx = 0; vsIetaIdx < occupancy_vs_ieta.size(); vsIetaIdx++) { + for (; vsIetaIdx < occupancy_vs_ieta.size(); vsIetaIdx++) { if (occupancyID[occupancyIdx] == occupancy_vs_ietaID[vsIetaIdx]) { omatched = true; break; diff --git a/DQMOffline/JetMET/src/METAnalyzer.cc b/DQMOffline/JetMET/src/METAnalyzer.cc index 3f2929008ad88..f24ad19bebbbf 100644 --- a/DQMOffline/JetMET/src/METAnalyzer.cc +++ b/DQMOffline/JetMET/src/METAnalyzer.cc @@ -1321,8 +1321,7 @@ void METAnalyzer::dqmEndRun(const edm::Run& iRun, const edm::EventSetup& iSetup) TH1F* tlumisec; - MonitorElement* meLumiSec = map_dijet_MEs["aaa"]; - meLumiSec = map_dijet_MEs["JetMET/lumisec"]; + MonitorElement* meLumiSec = map_dijet_MEs["JetMET/lumisec"]; int totlsec = 0; int totlssecsum = 0; @@ -2145,7 +2144,7 @@ void METAnalyzer::fillMonitorElement(const edm::Event& iEvent, //protection for VERY special case where Z-Pt==0 double u_par = 0; - double u_perp = sqrt(u_x * u_x + u_y * u_y); + double u_perp = 0; double e_Z_x = 0; double e_Z_y = 0; if (zCand.Pt() != 0) { diff --git a/DQMOffline/Muon/src/CSCOfflineMonitor.cc b/DQMOffline/Muon/src/CSCOfflineMonitor.cc index c4ace6258bb24..5bbf3992bc708 100644 --- a/DQMOffline/Muon/src/CSCOfflineMonitor.cc +++ b/DQMOffline/Muon/src/CSCOfflineMonitor.cc @@ -1114,8 +1114,8 @@ void CSCOfflineMonitor::doPedestalNoise(edm::Handle stri // for ganged ME11A if ((kStation == 1 && kRing == 4) && cscGeom->gangedStrips()) { kRing = 1; - if (myStrip <= 16) - myStrip += 64; // no trapping for any bizarreness + // if (myStrip <= 16) + // myStrip += 64; // no trapping for any bizarreness } if (TotalADC > threshold) { @@ -1848,7 +1848,6 @@ void CSCOfflineMonitor::doBXMonitor(edm::Handle alcts, if (length >= 32) { ///if fed has data then unpack it CSCDCCExaminer* examiner = nullptr; std::stringstream examiner_out, examiner_err; - goodEvent = true; examiner = new CSCDCCExaminer(); if (examinerMask & 0x40000) examiner->crcCFEB(true); diff --git a/DQMOffline/Trigger/plugins/HLTInclusiveVBFSource.cc b/DQMOffline/Trigger/plugins/HLTInclusiveVBFSource.cc index 499cbb6c2f3f9..66cbf97fa5c41 100644 --- a/DQMOffline/Trigger/plugins/HLTInclusiveVBFSource.cc +++ b/DQMOffline/Trigger/plugins/HLTInclusiveVBFSource.cc @@ -588,36 +588,20 @@ void HLTInclusiveVBFSource::bookHistograms(DQMStore::IBooker& iBooker, edm::Run std::string trigPath = "(" + v.getPath() + ")"; iBooker.setCurrentFolder(subdirName); - MonitorElement* RECO_deltaEta_DiJet; - MonitorElement* RECO_deltaPhi_DiJet; - MonitorElement* RECO_invMass_DiJet; - MonitorElement* HLT_deltaEta_DiJet; - MonitorElement* HLT_deltaPhi_DiJet; - MonitorElement* HLT_invMass_DiJet; - MonitorElement* RECO_deltaEta_DiJet_Match; - MonitorElement* RECO_deltaPhi_DiJet_Match; - MonitorElement* RECO_invMass_DiJet_Match; - MonitorElement* RECOHLT_deltaEta; - MonitorElement* RECOHLT_deltaPhi; - MonitorElement* RECOHLT_invMass; - MonitorElement* NumberOfMatches; - MonitorElement* NumberOfEvents; - - //dummy = iBooker.bookFloat("dummy"); - RECO_deltaEta_DiJet = iBooker.bookFloat("RECO_deltaEta_DiJet"); - RECO_deltaPhi_DiJet = iBooker.bookFloat("RECO_deltaPhi_DiJet"); - RECO_invMass_DiJet = iBooker.bookFloat("RECO_invMass_DiJet"); - HLT_deltaEta_DiJet = iBooker.bookFloat("HLT_deltaEta_DiJet"); - HLT_deltaPhi_DiJet = iBooker.bookFloat("HLT_deltaPhi_DiJet "); - HLT_invMass_DiJet = iBooker.bookFloat("HLT_invMass_DiJet"); - RECO_deltaEta_DiJet_Match = iBooker.bookFloat("RECO_deltaEta_DiJet_Match"); - RECO_deltaPhi_DiJet_Match = iBooker.bookFloat("RECO_deltaPhi_DiJet_Match"); - RECO_invMass_DiJet_Match = iBooker.bookFloat("RECO_invMass_DiJet_Match"); - RECOHLT_deltaEta = iBooker.bookFloat("RECOHLT_deltaEta"); - RECOHLT_deltaPhi = iBooker.bookFloat("RECOHLT_deltaPhi "); - RECOHLT_invMass = iBooker.bookFloat("RECOHLT_invMass"); - NumberOfMatches = iBooker.bookFloat("NumberOfMatches"); - NumberOfEvents = iBooker.bookFloat("NumberOfEvents"); + MonitorElement* RECO_deltaEta_DiJet = nullptr; + MonitorElement* RECO_deltaPhi_DiJet = nullptr; + MonitorElement* RECO_invMass_DiJet = nullptr; + MonitorElement* HLT_deltaEta_DiJet = nullptr; + MonitorElement* HLT_deltaPhi_DiJet = nullptr; + MonitorElement* HLT_invMass_DiJet = nullptr; + MonitorElement* RECO_deltaEta_DiJet_Match = nullptr; + MonitorElement* RECO_deltaPhi_DiJet_Match = nullptr; + MonitorElement* RECO_invMass_DiJet_Match = nullptr; + MonitorElement* RECOHLT_deltaEta = nullptr; + MonitorElement* RECOHLT_deltaPhi = nullptr; + MonitorElement* RECOHLT_invMass = nullptr; + MonitorElement* NumberOfMatches = nullptr; + MonitorElement* NumberOfEvents = nullptr; std::string labelname("ME"); std::string histoname(labelname + ""); diff --git a/DQMServices/Components/plugins/DQMFileSaver.cc b/DQMServices/Components/plugins/DQMFileSaver.cc index 9c5ae46737c11..7f0921148ad24 100644 --- a/DQMServices/Components/plugins/DQMFileSaver.cc +++ b/DQMServices/Components/plugins/DQMFileSaver.cc @@ -105,7 +105,7 @@ void DQMFileSaver::saveForOffline(const std::string &workflow, int run, int lumi // do this, because ProvInfo is not yet run in offline DQM MonitorElement *me = dbe_->get("Info/ProvInfo/CMSSW"); if (!me) - me = dbe_->bookString("CMSSW", edm::getReleaseVersion().c_str()); + dbe_->bookString("CMSSW", edm::getReleaseVersion().c_str()); me = dbe_->get("Info/ProvInfo/runIsComplete"); if (!me) diff --git a/DQMServices/Components/plugins/DQMStoreStats.cc b/DQMServices/Components/plugins/DQMStoreStats.cc index d58e8cbf841fb..b850ed2628846 100644 --- a/DQMServices/Components/plugins/DQMStoreStats.cc +++ b/DQMServices/Components/plugins/DQMStoreStats.cc @@ -62,25 +62,25 @@ class DQMStoreStatsSubfolder { ++totalHistos_; totalBins_ += nBins; totalEmptyBins_ += nEmptyBins; - totalMemory_ += (nBins *= sizeof(float)); + totalMemory_ += (nBins * sizeof(float)); } void AddBinsS(unsigned int nBins, unsigned int nEmptyBins) { ++totalHistos_; totalBins_ += nBins; totalEmptyBins_ += nEmptyBins; - totalMemory_ += (nBins *= sizeof(short)); + totalMemory_ += (nBins * sizeof(short)); } void AddBinsD(unsigned int nBins, unsigned int nEmptyBins) { ++totalHistos_; totalBins_ += nBins; totalEmptyBins_ += nEmptyBins; - totalMemory_ += (nBins *= sizeof(double)); + totalMemory_ += (nBins * sizeof(double)); } void AddBinsI(unsigned int nBins, unsigned int nEmptyBins) { ++totalHistos_; totalBins_ += nBins; totalEmptyBins_ += nEmptyBins; - totalMemory_ += (nBins *= sizeof(int)); + totalMemory_ += (nBins * sizeof(int)); } }; diff --git a/DQMServices/Core/src/DQMNet.cc b/DQMServices/Core/src/DQMNet.cc index 396db6f8bfac9..5e75afc91821b 100644 --- a/DQMServices/Core/src/DQMNet.cc +++ b/DQMServices/Core/src/DQMNet.cc @@ -860,9 +860,8 @@ bool DQMNet::onPeerConnect(IOSelectEvent *ev) { bool DQMNet::onLocalNotify(IOSelectEvent *ev) { // Discard the data in the pipe, we care only about the wakeup. try { - IOSize sz; unsigned char buf[1024]; - while ((sz = ev->source->read(buf, sizeof(buf)))) + while ((ev->source->read(buf, sizeof(buf)))) ; } catch (Error &e) { auto *next = dynamic_cast(e.next()); From c56fb8c5e7eaa1d71578c04c61f2ce80064b52e5 Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Tue, 8 Oct 2024 12:14:09 +0200 Subject: [PATCH 2/6] Changes after review --- .../src/SiPixelClusterSource.cc | 28 --------- .../src/SiPixelDigiSource.cc | 59 ------------------- .../src/SiPixelRawDataErrorSource.cc | 26 -------- DQMOffline/Muon/src/CSCOfflineMonitor.cc | 4 -- 4 files changed, 117 deletions(-) diff --git a/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc b/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc index 64ef320c8827e..17b3124e74c60 100644 --- a/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc +++ b/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc @@ -344,34 +344,6 @@ void SiPixelClusterSource::buildStructure(const edm::EventSetup &iSetup) { thePixelStructure.insert(pair(id, theModule)); } else if (detId.subdetId() == static_cast(PixelSubdetector::PixelEndcap)) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; - /* - PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder(); - int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); - if (disk > noOfDisks) - noOfDisks = disk; - int blade = PixelEndcapName(DetId(id), pTT, isUpgrade).bladeName(); - int panel = PixelEndcapName(DetId(id), pTT, isUpgrade).pannelName(); - int module = PixelEndcapName(DetId(id), pTT, isUpgrade).plaquetteName(); - char sside[80]; - sprintf(sside, "HalfCylinder_%i", side); - char sdisk[80]; - sprintf(sdisk, "Disk_%i", disk); - char sblade[80]; - sprintf(sblade, "Blade_%02i", blade); - char spanel[80]; - sprintf(spanel, "Panel_%i", panel); - char smodule[80]; - sprintf(smodule, "Module_%i", module); - std::string side_str = sside; - std::string disk_str = sdisk; - bool mask = side_str.find("HalfCylinder_1") != string::npos || - side_str.find("HalfCylinder_2") != string::npos || - side_str.find("HalfCylinder_4") != string::npos || disk_str.find("Disk_2") != string::npos; - // clutch to take all of FPIX, but no BPIX: - mask = false; - if (isPIB && mask) - continue; - */ SiPixelClusterModule *theModule = new SiPixelClusterModule(id, ncols, nrows); thePixelStructure.insert(pair(id, theModule)); } diff --git a/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc b/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc index 31b794891c9e7..38a485893c991 100644 --- a/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc +++ b/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc @@ -1137,70 +1137,11 @@ void SiPixelDigiSource::buildStructure(const edm::EventSetup& iSetup) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; uint32_t id = detId(); SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows); - - /* - PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder(); - int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); - if (disk > noOfDisks) - noOfDisks = disk; - int blade = PixelEndcapName(DetId(id), pTT, isUpgrade).bladeName(); - int panel = PixelEndcapName(DetId(id), pTT, isUpgrade).pannelName(); - int module = PixelEndcapName(DetId(id), pTT, isUpgrade).plaquetteName(); - - char sside[80]; - sprintf(sside, "HalfCylinder_%i", side); - char sdisk[80]; - sprintf(sdisk, "Disk_%i", disk); - char sblade[80]; - sprintf(sblade, "Blade_%02i", blade); - char spanel[80]; - sprintf(spanel, "Panel_%i", panel); - char smodule[80]; - sprintf(smodule, "Module_%i", module); - std::string side_str = sside; - std::string disk_str = sdisk; - bool mask = side_str.find("HalfCylinder_1") != string::npos || - side_str.find("HalfCylinder_2") != string::npos || - side_str.find("HalfCylinder_4") != string::npos || disk_str.find("Disk_2") != string::npos; - // clutch to take all of FPIX, but no BPIX: - mask = false; - if (isPIB && mask) - continue; - */ thePixelStructure.insert(pair(id, theModule)); } else if ((detId.subdetId() == static_cast(PixelSubdetector::PixelEndcap)) && (isUpgrade)) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; uint32_t id = detId(); SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows); - /* - PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder(); - int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); - if (disk > noOfDisks) - noOfDisks = disk; - int blade = PixelEndcapName(DetId(id), pTT, isUpgrade).bladeName(); - int panel = PixelEndcapName(DetId(id), pTT, isUpgrade).pannelName(); - int module = PixelEndcapName(DetId(id), pTT, isUpgrade).plaquetteName(); - - char sside[80]; - sprintf(sside, "HalfCylinder_%i", side); - char sdisk[80]; - sprintf(sdisk, "Disk_%i", disk); - char sblade[80]; - sprintf(sblade, "Blade_%02i", blade); - char spanel[80]; - sprintf(spanel, "Panel_%i", panel); - char smodule[80]; - sprintf(smodule, "Module_%i", module); - std::string side_str = sside; - std::string disk_str = sdisk; - bool mask = side_str.find("HalfCylinder_1") != string::npos || - side_str.find("HalfCylinder_2") != string::npos || - side_str.find("HalfCylinder_4") != string::npos || disk_str.find("Disk_2") != string::npos; - // clutch to take all of FPIX, but no BPIX: - mask = false; - if (isPIB && mask) - continue; - */ thePixelStructure.insert(pair(id, theModule)); } //end_elseif(isUpgrade) } diff --git a/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc b/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc index 296db043e5c41..8f08a3a21b58b 100644 --- a/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc +++ b/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc @@ -227,32 +227,6 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; uint32_t id = detId(); SiPixelRawDataErrorModule *theModule = new SiPixelRawDataErrorModule(id, ncols, nrows); - /* - PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId(id), pTT, isUpgrade).halfCylinder(); - int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); - int blade = PixelEndcapName(DetId(id), pTT, isUpgrade).bladeName(); - int panel = PixelEndcapName(DetId(id), pTT, isUpgrade).pannelName(); - int module = PixelEndcapName(DetId(id), pTT, isUpgrade).plaquetteName(); - - char sside[80]; - sprintf(sside, "HalfCylinder_%i", side); - char sdisk[80]; - sprintf(sdisk, "Disk_%i", disk); - char sblade[80]; - sprintf(sblade, "Blade_%02i", blade); - char spanel[80]; - sprintf(spanel, "Panel_%i", panel); - char smodule[80]; - sprintf(smodule, "Module_%i", module); - std::string side_str = sside; - std::string disk_str = sdisk; - bool mask = side_str.find("HalfCylinder_1") != string::npos || side_str.find("HalfCylinder_2") != string::npos || - side_str.find("HalfCylinder_4") != string::npos || disk_str.find("Disk_2") != string::npos; - // clutch to take all of FPIX, but no BPIX: - mask = false; - if (isPIB && mask) - continue; - */ thePixelStructure.insert(pair(id, theModule)); } diff --git a/DQMOffline/Muon/src/CSCOfflineMonitor.cc b/DQMOffline/Muon/src/CSCOfflineMonitor.cc index 5bbf3992bc708..f6712b89ae621 100644 --- a/DQMOffline/Muon/src/CSCOfflineMonitor.cc +++ b/DQMOffline/Muon/src/CSCOfflineMonitor.cc @@ -1110,12 +1110,8 @@ void CSCOfflineMonitor::doPedestalNoise(edm::Handle stri (1. / 6) * (myADCVals[2] + myADCVals[3] + myADCVals[4] + myADCVals[5] + myADCVals[6] + myADCVals[7]); float threshold = 13.3; - // Why is this code block even here? Doesn't use myStrip after setting it (converts channel to strip - // for ganged ME11A if ((kStation == 1 && kRing == 4) && cscGeom->gangedStrips()) { kRing = 1; - // if (myStrip <= 16) - // myStrip += 64; // no trapping for any bizarreness } if (TotalADC > threshold) { From 3053aded6a6ac2111bee0802245b4a30b6996823 Mon Sep 17 00:00:00 2001 From: iarspider Date: Fri, 11 Oct 2024 14:35:55 +0200 Subject: [PATCH 3/6] Update DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc Co-authored-by: Andrea Perrotta --- DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc b/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc index 8f08a3a21b58b..b73c1a0045f9b 100644 --- a/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc +++ b/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc @@ -188,7 +188,6 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) { edm::ESHandle pDD = iSetup.getHandle(trackerGeomTokenBeginRun_); edm::ESHandle tTopoHandle = iSetup.getHandle(trackerTopoTokenBeginRun_); - // const TrackerTopology *pTT = tTopoHandle.product(); LogVerbatim("PixelDQM") << " *** Geometry node for TrackerGeom is " << &(*pDD) << std::endl; LogVerbatim("PixelDQM") << " *** I have " << pDD->detsPXB().size() << " barrel pixel detectors" << std::endl; From 41cf6ff3627f6e38ceb369d73d8e516ee54627f4 Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Mon, 21 Oct 2024 11:47:31 +0200 Subject: [PATCH 4/6] Restore call to maskBins but discard the result --- DQM/L1TMonitorClient/src/L1TOccupancyClient.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DQM/L1TMonitorClient/src/L1TOccupancyClient.cc b/DQM/L1TMonitorClient/src/L1TOccupancyClient.cc index 4db94a263ed89..641ccf1c9567e 100644 --- a/DQM/L1TMonitorClient/src/L1TOccupancyClient.cc +++ b/DQM/L1TMonitorClient/src/L1TOccupancyClient.cc @@ -605,6 +605,7 @@ double L1TOccupancyClient::getAvrg(TH2F* iHist, string iTestName, int iAxis, int // median case 2: + hservice_->maskBins(iTestName, histo, iBinStrip, iAxis); proj = histo->ProjectionY("_py", iBinStrip, iBinStrip); for (int i = 0; i < iNBins; i++) { values.push_back(proj->GetBinContent(i + 1)); @@ -627,6 +628,7 @@ double L1TOccupancyClient::getAvrg(TH2F* iHist, string iTestName, int iAxis, int break; // median case 2: + hservice_->maskBins(iTestName, histo, iBinStrip, iAxis); proj = histo->ProjectionX("_px", iBinStrip, iBinStrip); for (int i = 0; i < iNBins; i++) { values.push_back(proj->GetBinContent(i + 1)); From 00c1137fa1d22e5133892cf6c23a8ba0c7cf94f0 Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Mon, 21 Oct 2024 12:17:06 +0200 Subject: [PATCH 5/6] Restore accidentally deleted code in SiPixelDigiSource and SiPixelClusterSource --- DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc | 3 +++ DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc b/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc index 17b3124e74c60..411b3f6664103 100644 --- a/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc +++ b/DQM/SiPixelMonitorCluster/src/SiPixelClusterSource.cc @@ -344,6 +344,9 @@ void SiPixelClusterSource::buildStructure(const edm::EventSetup &iSetup) { thePixelStructure.insert(pair(id, theModule)); } else if (detId.subdetId() == static_cast(PixelSubdetector::PixelEndcap)) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; + int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); + if (disk > noOfDisks) + noOfDisks = disk; SiPixelClusterModule *theModule = new SiPixelClusterModule(id, ncols, nrows); thePixelStructure.insert(pair(id, theModule)); } diff --git a/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc b/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc index 38a485893c991..78c55a4d544ef 100644 --- a/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc +++ b/DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc @@ -1137,11 +1137,19 @@ void SiPixelDigiSource::buildStructure(const edm::EventSetup& iSetup) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; uint32_t id = detId(); SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows); + + int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); + if (disk > noOfDisks) + noOfDisks = disk; thePixelStructure.insert(pair(id, theModule)); } else if ((detId.subdetId() == static_cast(PixelSubdetector::PixelEndcap)) && (isUpgrade)) { LogDebug("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl; uint32_t id = detId(); SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows); + + int disk = PixelEndcapName(DetId(id), pTT, isUpgrade).diskName(); + if (disk > noOfDisks) + noOfDisks = disk; thePixelStructure.insert(pair(id, theModule)); } //end_elseif(isUpgrade) } From 9e5e2cc4f445a34ac0f355336a467c4ed05628b8 Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Mon, 21 Oct 2024 14:27:17 +0200 Subject: [PATCH 6/6] Cleanup --- DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc b/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc index b73c1a0045f9b..22ec5aa500d8a 100644 --- a/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc +++ b/DQM/SiPixelMonitorRawData/src/SiPixelRawDataErrorSource.cc @@ -187,8 +187,6 @@ void SiPixelRawDataErrorSource::buildStructure(const edm::EventSetup &iSetup) { edm::ESHandle pDD = iSetup.getHandle(trackerGeomTokenBeginRun_); - edm::ESHandle tTopoHandle = iSetup.getHandle(trackerTopoTokenBeginRun_); - LogVerbatim("PixelDQM") << " *** Geometry node for TrackerGeom is " << &(*pDD) << std::endl; LogVerbatim("PixelDQM") << " *** I have " << pDD->detsPXB().size() << " barrel pixel detectors" << std::endl; LogVerbatim("PixelDQM") << " *** I have " << pDD->detsPXF().size() << " endcap pixel detectors" << std::endl;