From 71ca6cc2c05f6ac6aa84b51976d1a06c9b6719a4 Mon Sep 17 00:00:00 2001 From: David Lange Date: Sat, 4 Nov 2017 06:18:16 +0100 Subject: [PATCH 1/8] clang check cleanup pass --- .../interface/AlignableBeamSpot.h | 36 +- .../interface/AlignableDetOrUnitPtr.h | 12 +- .../interface/AlignableNavigator.h | 4 +- .../interface/SurveyResidual.h | 2 +- .../CommonAlignment/plugins/FilterOutLowPt.cc | 4 +- Alignment/CommonAlignment/src/Alignable.cc | 12 +- .../CommonAlignment/src/AlignableBeamSpot.cc | 2 +- .../src/AlignableDetOrUnitPtr.cc | 2 +- .../CommonAlignment/src/AlignableNavigator.cc | 2 +- .../src/MisalignmentScenarioBuilder.cc | 4 +- .../interface/AlignmentIORoot.h | 24 +- .../plugins/AlignmentMonitorAsAnalyzer.cc | 14 +- .../plugins/GlobalTrackerMuonAlignment.cc | 30 +- .../LaserAlignment/plugins/LaserAlignment.h | 10 +- .../interface/MuonAlignmentInputDB.h | 4 +- .../plugins/MisalignedMuonESProducer.cc | 2 +- .../plugins/TrackerGeometryCompare.h | 8 +- .../plugins/TrackerGeometryIntoNtuples.cc | 8 +- .../CandAlgos/interface/NewCandMatcher.h | 2 +- .../interface/FsmwClusterizer1D.h | 6 +- .../interface/OutermostClusterizer1D.h | 6 +- .../interface/TrivialWeightEstimator.h | 4 +- .../interface/ConditionDBWriter.h | 18 +- .../UtilAlgos/interface/InputTagDistributor.h | 4 +- CommonTools/UtilAlgos/interface/NewMatcher.h | 4 +- .../UtilAlgos/interface/PhysObjectMatcher.h | 4 +- .../interface/SingleObjectRefSelector.h | 2 +- .../interface/StringCutEventSelector.h | 14 +- CondCore/PopCon/interface/PopConAnalyzer.h | 8 +- .../PopCon/interface/PopConSourceHandler.h | 4 +- .../interface/L1ConfigOnlineProdBase.h | 2 +- .../interface/L1ConfigOnlineProdBaseExt.h | 2 +- .../BTauReco/interface/CATopJetTagInfo.h | 4 +- .../BTauReco/interface/CombinedTauTagInfo.h | 6 +- .../BTauReco/interface/EMIsolatedTauTagInfo.h | 6 +- .../BTauReco/interface/HTTTopJetTagInfo.h | 4 +- .../BTauReco/interface/ShallowTagInfo.h | 8 +- .../Candidate/interface/CandidateWithRef.h | 6 +- DataFormats/Candidate/interface/component.h | 2 +- DataFormats/Common/interface/AssociationMap.h | 2 +- .../Common/interface/BaseVectorHolder.h | 8 +- DataFormats/Common/interface/DetSetNew.h | 6 +- .../Common/interface/DetSetVectorNew.h | 2 +- DataFormats/Common/interface/OwnVector.h | 4 +- DataFormats/Common/interface/Ptr.h | 6 +- DataFormats/Common/interface/PtrVector.h | 2 +- DataFormats/Common/interface/Ref.h | 4 +- DataFormats/Common/interface/RefProd.h | 2 +- DataFormats/Common/interface/RefToBaseProd.h | 8 +- .../Common/interface/RefToBaseVector.h | 2 +- DataFormats/Common/interface/RefVector.h | 2 +- DataFormats/Common/interface/Trie.h | 16 +- DataFormats/Common/interface/Wrapper.h | 2 +- DataFormats/DTDigi/interface/DTControlData.h | 4 +- .../EcalDetId/interface/EcalContainer.h | 4 +- .../interface/DeepCopyPointerByClone.h | 4 +- .../GeometrySurface/interface/OpenBounds.h | 18 +- .../interface/SimpleConeBounds.h | 12 +- .../Histograms/interface/MEtoEDMFormat.h | 2 +- DataFormats/JetReco/interface/FFTAnyJet.h | 4 +- .../interface/L1CSCSPStatusDigi.h | 2 +- .../interface/AnomalousECALVariables.h | 4 +- .../MuonSeed/interface/L3MuonTrajectorySeed.h | 2 +- .../ParticleFlowReco/interface/ConvBremSeed.h | 4 +- .../PatCandidates/interface/Hemisphere.h | 2 +- .../PatCandidates/interface/PATObject.h | 2 +- .../PatCandidates/interface/UserData.h | 2 +- .../Scouting/interface/ScoutingVertex.h | 2 +- DataFormats/TrackReco/interface/DeDxHitInfo.h | 2 +- .../implementations_stage2/BMTFSetup.h | 12 +- FWCore/Framework/interface/Callback.h | 4 +- .../Framework/interface/DataProxyTemplate.h | 8 +- FWCore/Framework/interface/ESHandle.h | 2 +- FWCore/Framework/interface/ESWatcher.h | 4 +- FWCore/Framework/interface/EventSetup.h | 2 +- FWCore/Framework/interface/EventSetupRecord.h | 8 +- .../interface/eventSetupGetImplementation.h | 2 +- .../Framework/interface/global/implementors.h | 8 +- .../Utilities/interface/ConstRespectingPtr.h | 4 +- .../Utilities/interface/ThreadSafeRegistry.h | 4 +- .../AMPTInterface/interface/AMPTHadronizer.h | 6 +- .../AMPTInterface/src/AMPTHadronizer.cc | 8 +- .../interface/BeamHaloProducer.h | 10 +- .../BeamHaloGenerator/src/BeamHaloProducer.cc | 4 +- .../plugins/Cascade2Hadronizer.cc | 6 +- .../plugins/Cascade2Hadronizer.h | 6 +- .../CascadeInterface/plugins/CascadeWrapper.h | 2 +- .../Core/interface/EmbeddingHepMCFilter.h | 4 +- .../Core/interface/FortranCallback.h | 10 +- .../interface/GenFilterEfficiencyAnalyzer.h | 8 +- .../Core/interface/GenXSecAnalyzer.h | 16 +- .../Core/interface/GeneratorFilter.h | 20 +- .../Core/interface/GeneratorSmearedProducer.h | 2 +- .../Core/interface/GenericDauHepMCFilter.h | 4 +- .../Core/interface/HadronizerFilter.h | 22 +- .../Core/interface/ParameterCollector.h | 4 +- .../interface/PartonShowerBsHepMCFilter.h | 4 +- .../plugins/GenFilterEfficiencyProducer.cc | 8 +- GeneratorInterface/Core/src/BaseHadronizer.cc | 4 +- .../Core/src/EmbeddingHepMCFilter.cc | 2 +- .../Core/src/FortranInstance.cc | 6 +- .../Core/src/HepMCFilterDriver.cc | 2 +- .../interface/CosMuoGenProducer.h | 10 +- .../interface/CosmicMuonGenerator.h | 2 +- .../CosmicMuonGenerator/interface/sim.h | 4 +- .../CosmicMuonGenerator/src/CMSCGEN.cc | 8 +- .../src/CosmicMuonGenerator.cc | 4 +- .../interface/DataCardFileWriter.h | 8 +- .../interface/EvtGenInterface.h | 10 +- .../interface/myEvtRandomEngine.h | 4 +- .../plugins/DataCardFileWriter.cc | 2 +- .../ExhumeInterface/interface/DiPhoton.h | 6 +- .../ExhumeInterface/interface/Event.h | 4 +- .../interface/ExhumeHadronizer.h | 6 +- .../ExhumeInterface/interface/GG.h | 6 +- .../ExhumeInterface/interface/Higgs.h | 12 +- .../ExhumeInterface/interface/QQ.h | 6 +- .../ExhumeInterface/interface/TwoSpace.h | 16 +- .../ExternalDecays/src/ExternalDecayDriver.cc | 12 +- .../GenFilters/interface/BCToEFilter.h | 4 +- .../GenFilters/interface/BHFilter.h | 4 +- .../GenFilters/interface/BdecayFilter.h | 4 +- .../GenFilters/interface/BsJpsiPhiFilter.h | 4 +- .../interface/ComphepSingletopFilter.h | 8 +- .../interface/ComphepSingletopFilterPy8.h | 8 +- .../interface/CosmicGenFilterHelix.h | 8 +- .../interface/CosmicGenFilterLowE.h | 4 +- .../GenFilters/interface/EMEnrichingFilter.h | 4 +- .../GenFilters/interface/GenLeadTrackFilter.h | 6 +- .../GenFilters/interface/HZZ4lFilter.h | 4 +- .../interface/HeavyQuarkFromMPIFilter.h | 4 +- .../interface/HerwigMaxPtPartonFilter.h | 4 +- .../interface/HighETPhotonsFilter.h | 4 +- .../GenFilters/interface/JGJFilter.h | 8 +- .../interface/JetFlavourCutFilter.h | 4 +- .../GenFilters/interface/JetFlavourFilter.h | 4 +- .../GenFilters/interface/LHEDYdecayFilter.h | 4 +- .../GenFilters/interface/LHEGenericFilter.h | 6 +- .../GenFilters/interface/LQGenFilter.h | 8 +- .../interface/MCDecayingPionKaonFilter.h | 4 +- .../GenFilters/interface/MCDijetResonance.h | 6 +- .../interface/MCLongLivedParticles.h | 4 +- .../interface/MCMultiParticleFilter.h | 6 +- .../GenFilters/interface/MCPdgIndexFilter.h | 4 +- .../GenFilters/interface/MCProcessFilter.h | 4 +- .../interface/MCProcessRangeFilter.h | 4 +- .../interface/MCSingleParticleYPt.h | 4 +- .../interface/MCSmartSingleParticleFilter.h | 4 +- .../GenFilters/interface/MCZll.h | 6 +- .../GenFilters/interface/MinimumBiasFilter.h | 4 +- .../GenFilters/interface/PythiaFilterEMJet.h | 4 +- .../interface/PythiaFilterEMJetHeep.h | 8 +- .../interface/PythiaFilterGammaJet.h | 4 +- .../interface/PythiaFilterGammaJetIsoPi0.h | 4 +- .../interface/PythiaFilterGammaJetWithBg.h | 4 +- .../interface/PythiaFilterGammaJetWithOutBg.h | 4 +- .../GenFilters/interface/PythiaFilterHT.h | 4 +- .../interface/PythiaFilterIsolatedTrack.h | 6 +- .../GenFilters/interface/PythiaFilterTTBar.h | 4 +- .../GenFilters/interface/PythiaFilterZJet.h | 4 +- .../interface/PythiaFilterZJetWithOutBg.h | 4 +- .../GenFilters/interface/PythiaFilterZgamma.h | 4 +- .../interface/PythiaHLTSoupFilter.h | 4 +- .../GenFilters/interface/RecoDiMuon.h | 6 +- .../GenFilters/interface/STFilter.h | 8 +- .../interface/TotalKinematicsFilter.h | 4 +- .../GenFilters/interface/TwoVBGenFilter.h | 8 +- .../GenFilters/interface/XtoFFbarFilter.h | 6 +- .../GenFilters/interface/ZgMassFilter.h | 4 +- .../GenFilters/interface/ZgammaMassFilter.h | 4 +- .../GenFilters/interface/Zto2lFilter.h | 6 +- .../interface/doubleEMEnrichingFilter.h | 4 +- .../GenFilters/src/BdecayFilter.cc | 10 +- .../GenFilters/src/BsJpsiPhiFilter.cc | 10 +- .../GenFilters/src/ComphepSingletopFilter.cc | 12 +- .../src/ComphepSingletopFilterPy8.cc | 40 +- .../GenFilters/src/DJpsiFilter.cc | 4 +- .../GenFilters/src/FourLepFilter.cc | 4 +- .../GenFilters/src/GenHTFilter.cc | 4 +- .../GenFilters/src/HerwigMaxPtPartonFilter.cc | 2 +- .../GenFilters/src/JetFlavourCutFilter.cc | 2 +- .../GenFilters/src/JetFlavourFilter.cc | 2 +- .../GenFilters/src/MCLongLivedParticles.cc | 4 +- GeneratorInterface/GenFilters/src/NJetsMC.cc | 8 +- .../GenFilters/src/PhotonEnrichmentFilter.cc | 8 +- .../GenFilters/src/PythiaFilterEMJet.cc | 4 +- .../GenFilters/src/PythiaFilterGammaJet.cc | 4 +- .../src/PythiaFilterGammaJetIsoPi0.cc | 4 +- .../src/PythiaFilterGammaJetWithBg.cc | 4 +- .../src/PythiaFilterGammaJetWithOutBg.cc | 4 +- .../GenFilters/src/UEDMultiLeptonFilter.cc | 14 +- .../GenFilters/src/XtoFFbarFilter.cc | 2 +- .../GenFilters/src/ZgammaMassFilter.cc | 2 +- .../interface/Herwig6Instance.h | 2 +- .../plugins/Herwig6Hadronizer.cc | 42 +- .../Herwig6Interface/src/Herwig6Instance.cc | 42 +- .../src/fastjetfortran_madfks.cc | 10 +- .../interface/EcalGenEvtSelector.h | 4 +- .../interface/EcalGenEvtSelectorFrag.h | 4 +- .../interface/HadronDecayGenEvtSelector.h | 4 +- .../interface/MultiCandGenEvtSelector.h | 4 +- .../PartonHadronDecayGenEvtSelector.h | 4 +- .../plugins/BetaBoostEvtVtxGenerator.cc | 14 +- .../HiGenCommon/plugins/GenHIEventProducer.cc | 4 +- .../plugins/HiCentralityBiasFilter.cc | 8 +- .../plugins/HighMultiplicityGenFilter.cc | 8 +- .../plugins/MixBoostEvtVtxGenerator.cc | 16 +- .../src/HiGenEvtSelectorFactory.cc | 2 +- .../interface/HijingHadronizer.h | 8 +- .../HijingInterface/src/HijingHadronizer.cc | 6 +- .../interface/Hydjet2Hadronizer.h | 12 +- .../Hydjet2Interface/interface/MathUtil.h | 2 +- .../Hydjet2Interface/interface/Particle.h | 2 +- .../Hydjet2Interface/interface/ParticlePDG.h | 2 +- .../Hydjet2Interface/src/DatabasePDG.cc | 10 +- .../Hydjet2Interface/src/Hydjet2Hadronizer.cc | 12 +- .../interface/HydjetHadronizer.h | 8 +- .../HydjetInterface/src/HydjetHadronizer.cc | 6 +- .../LHEInterface/interface/LHEProxy.h | 4 +- .../plugins/ExternalLHEAsciiDumper.cc | 6 +- .../plugins/LHE2HepMCConverter.cc | 8 +- .../plugins/LHECOMWeightProducer.cc | 8 +- .../LHEInterface/plugins/LHEFilter.cc | 4 +- .../LHEInterface/plugins/LHEWriter.cc | 8 +- .../LHEInterface/src/LHEEvent.cc | 6 +- .../LHEInterface/src/LHEProxy.cc | 2 +- .../LHEInterface/src/LHEReader.cc | 28 +- .../LHEInterface/src/LHERunInfo.cc | 14 +- .../LHEInterface/src/XMLUtils.h | 32 +- .../MCatNLOInterface/plugins/MCatNLOSource.h | 12 +- .../PartonShowerVeto/interface/JetMatching.h | 2 +- .../interface/JetMatchingAlpgen.h | 12 +- .../interface/JetMatchingMGFastJet.h | 16 +- .../interface/JetMatchingMadgraph.h | 14 +- .../src/JetMatchingMGFastJet.cc | 2 +- .../interface/PhotosInterface.h | 14 +- .../interface/PhotosppInterface.h | 16 +- .../plugins/PhotosInterface.cc | 2 +- .../plugins/PhotosppInterface.cc | 4 +- .../interface/PomwigHadronizer.h | 6 +- .../interface/PyquenHadronizer.h | 8 +- .../PyquenInterface/src/PyquenHadronizer.cc | 4 +- .../interface/Pythia6Service.h | 4 +- .../Pythia6Interface/plugins/Pythia6EGun.h | 4 +- .../Pythia6Interface/plugins/Pythia6Gun.cc | 6 +- .../Pythia6Interface/plugins/Pythia6Gun.h | 2 +- .../plugins/Pythia6Hadronizer.cc | 10 +- .../plugins/Pythia6Hadronizer.h | 6 +- .../Pythia6Interface/plugins/Pythia6JetGun.h | 4 +- .../plugins/Pythia6ParticleGun.h | 2 +- .../plugins/Pythia6PartonEGun.h | 4 +- .../plugins/Pythia6PartonGun.h | 2 +- .../plugins/Pythia6PartonPtGun.h | 4 +- .../Pythia6Interface/plugins/Pythia6PtGun.h | 4 +- .../plugins/Pythia6PtYDistGun.cc | 2 +- .../plugins/Pythia6PtYDistGun.h | 4 +- .../Pythia6Interface/src/Pythia6Service.cc | 12 +- .../Pythia8Interface/interface/P8RndmEngine.h | 2 +- .../Pythia8Interface/interface/Py8GunBase.h | 8 +- .../interface/Py8InterfaceBase.h | 2 +- .../plugins/EmissionVetoHook1.h | 20 +- .../plugins/JetMatchingHook.cc | 4 +- .../plugins/JetMatchingHook.h | 12 +- .../plugins/LHAupLesHouches.cc | 4 +- .../plugins/LHAupLesHouches.h | 10 +- .../Pythia8Interface/plugins/PowhegResHook.h | 6 +- .../Pythia8Interface/plugins/Py8EGun.cc | 2 +- .../Pythia8Interface/plugins/Py8JetGun.cc | 2 +- .../Pythia8Interface/plugins/Py8PtGun.cc | 2 +- .../Pythia8Interface/plugins/Py8toJetInput.h | 8 +- .../Pythia8Interface/src/Py8GunBase.cc | 4 +- .../interface/EPOS_Wrapper.h | 2 +- .../interface/IO_EPOS.h | 8 +- .../interface/ReggeGribovPartonMC.h | 4 +- .../interface/ReggeGribovPartonMCHadronizer.h | 6 +- .../src/7zFile.cc | 10 +- .../ReggeGribovPartonMCInterface/src/7zFile.h | 2 +- .../src/7zStream.cc | 2 +- .../ReggeGribovPartonMCInterface/src/Alloc.cc | 4 +- .../ReggeGribovPartonMCInterface/src/Alloc.h | 2 +- .../src/IO_EPOS.cc | 10 +- .../src/LzmaDec.cc | 14 +- .../ReggeGribovPartonMCInterface/src/Types.h | 2 +- .../ReggeGribovPartonMCInterface/src/read.cc | 6 +- .../RivetInterface/interface/DQMRivetClient.h | 8 +- .../interface/ParticleLevelProducer.h | 2 +- .../RivetInterface/interface/RivetAnalysis.h | 6 +- .../interface/RivetHarvesting.h | 12 +- .../RivetInterface/plugins/DQMRivetClient.cc | 2 +- .../plugins/GenParticles2HepMCConverter.cc | 2 +- .../plugins/ParticleLevelProducer.cc | 2 +- .../src/CMS_2013_I1224539_DIJET.cc | 6 +- .../interface/SherpackFetcher.h | 2 +- .../interface/SherpackUtilities.h | 8 +- .../SherpaInterface/src/SherpackUtilities.cc | 16 +- .../TauolaInterface/interface/TauSpinnerCMS.h | 8 +- .../interface/TauSpinnerFilter.h | 4 +- .../interface/TauolappInterface.h | 18 +- .../plugins/TauSpinner/TauSpinnerCMS.cc | 4 +- .../TauSpinner/read_particles_from_HepMC.cc | 6 +- .../plugins/Tauolapp/TauolappInterface.cc | 14 +- .../Onia2MuMu/interface/Onia2MuMuPAT.h | 8 +- .../interface/OniaAddV0TracksProducer.h | 4 +- .../interface/OniaPhotonConversionProducer.h | 4 +- .../Onia2MuMu/src/Onia2MuMuPAT.cc | 6 +- .../Onia2MuMu/src/OniaVtxReProducer.cc | 2 +- .../RecoDecay/interface/BPHDecayVertex.h | 4 +- .../RecoDecay/interface/BPHFitSelect.h | 4 +- .../RecoDecay/interface/BPHKinematicFit.h | 4 +- .../RecoDecay/interface/BPHMomentumSelect.h | 4 +- .../RecoDecay/interface/BPHMultiSelect.h | 18 +- .../interface/BPHPlusMinusCandidate.h | 14 +- .../RecoDecay/interface/BPHPlusMinusVertex.h | 4 +- .../RecoDecay/interface/BPHRecoBuilder.h | 10 +- .../RecoDecay/interface/BPHRecoCandidate.h | 4 +- .../RecoDecay/interface/BPHRecoSelect.h | 4 +- .../RecoDecay/interface/BPHTrackReference.h | 78 +-- .../RecoDecay/interface/BPHVertexSelect.h | 4 +- .../RecoDecay/src/BPHDecayMomentum.cc | 10 +- .../RecoDecay/src/BPHDecayVertex.cc | 10 +- .../RecoDecay/src/BPHKinematicFit.cc | 36 +- .../RecoDecay/src/BPHPlusMinusCandidate.cc | 6 +- .../RecoDecay/src/BPHPlusMinusVertex.cc | 6 +- .../RecoDecay/src/BPHRecoBuilder.cc | 6 +- .../RecoDecay/src/BPHRecoSelect.cc | 4 +- .../Skimming/plugins/Tau3MuSkim.h | 8 +- .../Skimming/src/Combinatorics.cc | 8 +- .../interface/BPHBdToJPsiKxBuilder.h | 4 +- .../interface/BPHBsToJPsiPhiBuilder.h | 4 +- .../interface/BPHBuToJPsiKBuilder.h | 4 +- .../SpecificDecay/interface/BPHChi2Select.h | 8 +- .../interface/BPHKx0ToKPiBuilder.h | 4 +- .../interface/BPHMassFitSelect.h | 24 +- .../SpecificDecay/interface/BPHMassSelect.h | 8 +- .../interface/BPHMassSymSelect.h | 8 +- .../interface/BPHMuonEtaSelect.h | 10 +- .../SpecificDecay/interface/BPHMuonPtSelect.h | 10 +- .../interface/BPHOniaToMuMuBuilder.h | 12 +- .../interface/BPHParticleEtaSelect.h | 8 +- .../interface/BPHParticleNeutralVeto.h | 8 +- .../interface/BPHParticlePtSelect.h | 8 +- .../interface/BPHPhiToKKBuilder.h | 4 +- .../plugins/BPHHistoSpecificDecay.cc | 56 +- .../plugins/BPHHistoSpecificDecay.h | 10 +- .../plugins/BPHWriteSpecificDecay.cc | 26 +- .../plugins/BPHWriteSpecificDecay.h | 12 +- .../SpecificDecay/src/BPHKx0ToKPiBuilder.cc | 2 +- .../SpecificDecay/src/BPHOniaToMuMuBuilder.cc | 12 +- .../Streamer/interface/StreamerInputModule.h | 8 +- .../interface/JetCorrectorImplMakerBase.h | 4 +- .../Algorithms/interface/L1FastjetCorrector.h | 14 +- .../interface/L1FastjetCorrectorImpl.h | 6 +- .../interface/L1JPTOffsetCorrector.h | 14 +- .../interface/L1JPTOffsetCorrectorImpl.h | 6 +- .../Algorithms/interface/L1OffsetCorrector.h | 14 +- .../interface/L1OffsetCorrectorImpl.h | 6 +- .../Algorithms/interface/L6SLBCorrector.h | 14 +- .../Algorithms/interface/L6SLBCorrectorImpl.h | 8 +- .../Algorithms/interface/LXXXCorrector.h | 10 +- .../Algorithms/interface/LXXXCorrectorImpl.h | 6 +- .../Algorithms/src/L1JPTOffsetCorrector.cc | 2 +- .../src/L1JPTOffsetCorrectorImpl.cc | 2 +- .../Algorithms/src/L6SLBCorrector.cc | 6 +- .../Algorithms/src/L6SLBCorrectorImpl.cc | 4 +- .../plugins/FFTJetCorrectionESProducer.h | 2 +- .../plugins/FFTJetCorrectorDBReader.cc | 10 +- .../plugins/FFTJetCorrectorDBWriter.cc | 10 +- .../plugins/FFTJetLookupTableESProducer.cc | 2 +- .../interface/AbsFFTJetScaleCalculator.h | 4 +- .../interface/AbsFFTSpecificScaleCalculator.h | 2 +- .../interface/FFTGenericScaleCalculator.h | 6 +- .../FFTJetObjects/interface/FFTJetAdjusters.h | 18 +- .../FFTJetCorrectorParametersLoader.h | 2 +- .../interface/FFTJetCorrectorResult.h | 2 +- .../interface/FFTJetCorrectorSequenceLoader.h | 12 +- .../interface/FFTJetCorrectorTransient.h | 2 +- .../FFTJetLookupTableSequenceLoader.h | 2 +- .../interface/FFTJetObjectFactory.h | 10 +- .../FFTJetObjects/interface/FFTJetRcdMapper.h | 12 +- .../interface/FFTJetScaleCalculators.h | 6 +- .../interface/L2AbsScaleCalculator.h | 6 +- .../interface/L2RecoScaleCalculator.h | 6 +- .../interface/L2ResScaleCalculator.h | 6 +- .../InterpolationTables/interface/ArrayND.h | 52 +- .../interface/ArrayNDScanner.h | 4 +- .../interface/CoordinateSelector.h | 10 +- .../InterpolationTables/interface/DualAxis.h | 6 +- .../interface/DualHistoAxis.h | 8 +- .../interface/EquidistantSequence.h | 4 +- .../InterpolationTables/interface/HistoAxis.h | 2 +- .../InterpolationTables/interface/HistoND.h | 28 +- .../interface/LinInterpolatedTableND.h | 18 +- .../interface/NUHistoAxis.h | 4 +- .../interface/NpstatException.h | 10 +- .../interface/SimpleFunctors.h | 18 +- .../interface/StorableHistoNDFunctor.h | 14 +- .../interface/StorableInterpolationFunctor.h | 26 +- .../interface/StorableMultivariateFunctor.h | 2 +- .../StorableMultivariateFunctorReader.h | 2 +- .../interface/UniformAxis.h | 2 +- .../interface/allocators.h | 2 +- .../InterpolationTables/src/ArrayRange.cc | 2 +- .../src/StorableMultivariateFunctor.cc | 2 +- .../JetParton/interface/JetPartonCorrector.h | 6 +- .../JetParton/src/JetPartonCorrector.cc | 4 +- .../interface/JetVertexAssociation.h | 4 +- .../src/JetVertexAssociation.cc | 4 +- .../JetVertexAssociation/src/JetVertexMain.cc | 2 +- JetMETCorrections/MCJet/bin/L2Correction.cc | 2 +- JetMETCorrections/MCJet/bin/L3Correction.cc | 2 +- JetMETCorrections/MCJet/bin/ReadTree.cc | 2 +- JetMETCorrections/MCJet/bin/ResponseFitter.cc | 2 +- JetMETCorrections/MCJet/bin/Utilities.h | 2 +- .../MCJet/plugins/CaloMCTruthTreeProducer.cc | 6 +- .../MCJet/plugins/CaloMCTruthTreeProducer.h | 8 +- .../MCJet/plugins/PFMCTruthTreeProducer.cc | 6 +- .../MCJet/plugins/PFMCTruthTreeProducer.h | 8 +- .../Modules/interface/CorrectedJetProducer.h | 4 +- .../Modules/interface/JetCorrectionESChain.h | 2 +- .../interface/JetCorrectionESProducer.h | 2 +- .../Modules/interface/JetCorrectionESSource.h | 4 +- .../Modules/interface/JetCorrectionProducer.h | 6 +- .../interface/JetResolutionESProducer.h | 4 +- .../interface/QGLikelihoodESProducer.h | 2 +- .../QGLikelihoodSystematicsESProducer.h | 2 +- .../plugins/ChainedJetCorrectorProducer.cc | 10 +- .../plugins/FactorizedJetCorrectorDemo.cc | 8 +- .../Modules/plugins/JetCorrectorDBReader.cc | 8 +- .../Modules/plugins/JetCorrectorDBWriter.cc | 10 +- .../Modules/plugins/JetCorrectorDemo.cc | 10 +- .../Modules/plugins/JetCorrectorOnTheFly.cc | 8 +- .../Modules/plugins/JetResolutionDBReader.cc | 10 +- .../Modules/plugins/JetResolutionDBWriter.cc | 8 +- .../Modules/plugins/JetResolutionDemo.cc | 6 +- .../Modules/plugins/METCorrectorDBReader.cc | 8 +- .../Modules/plugins/METCorrectorDBWriter.cc | 10 +- .../Modules/plugins/QGLikelihoodDBReader.cc | 8 +- .../Modules/plugins/QGLikelihoodDBWriter.cc | 10 +- .../QGLikelihoodSystematicsDBReader.cc | 8 +- .../QGLikelihoodSystematicsDBWriter.cc | 8 +- .../Objects/interface/ChainedJetCorrector.h | 18 +- .../TauJet/interface/TauJetCorrector.h | 8 +- .../TauJet/plugins/TauJetCorrectorExample.cc | 8 +- .../TauJet/src/TauJetCorrector.cc | 4 +- .../interface/CaloJetMETcorrInputProducerT.h | 2 +- .../interface/JetCleanerForType1METT.h | 6 +- .../interface/METCorrectionAlgorithm.h | 8 +- .../interface/PFJetMETcorrInputProducerT.h | 12 +- .../plugins/CorrectedCaloMETProducer.cc | 2 +- .../plugins/CorrectedPFMETProducer.cc | 2 +- .../plugins/CorrectedPatMETProducer.cc | 2 +- .../plugins/MultShiftMETcorrDBInputProducer.h | 2 +- .../plugins/MultShiftMETcorrInputProducer.h | 2 +- .../plugins/MuonMETcorrInputProducer.h | 4 +- .../plugins/PFCandMETcorrInputProducer.h | 4 +- .../plugins/PFchsMETcorrInputProducer.h | 4 +- .../Type1MET/plugins/ScaleCorrMETData.cc | 2 +- .../plugins/SysShiftMETcorrInputProducer.cc | 4 +- .../plugins/SysShiftMETcorrInputProducer.h | 4 +- .../plugins/Type0PFMETcorrInputProducer.cc | 2 +- .../plugins/Type0PFMETcorrInputProducer.h | 4 +- .../plugins/Type2CorrectionProducer.cc | 12 +- .../Type1MET/src/METCorrectionAlgorithm.cc | 4 +- .../interface/CSCTriggerGeomManager.h | 2 +- L1Trigger/CSCCommonTrigger/interface/vlib.h | 6 +- .../src/CSCTriggerGeomManager.cc | 2 +- L1Trigger/CSCCommonTrigger/src/vlib.cc | 28 +- .../CSCTrackFinder/interface/CSCTFPtLUT.h | 2 +- .../CSCTrackFinder/interface/CSCTFPtMethods.h | 2 +- .../plugins/CSCTFCandidateProducer.cc | 2 +- .../plugins/CSCTFCandidateProducer.h | 4 +- .../plugins/CSCTFTrackProducer.cc | 8 +- .../plugins/CSCTFTrackProducer.h | 6 +- .../CSCTrackFinder/plugins/CSCTFanalyzer.cc | 2 +- .../CSCTrackFinder/plugins/CSCTFanalyzer.h | 8 +- .../src/CSCSectorReceiverLUT.cc | 36 +- .../src/CSCSectorReceiverMiniLUT.cc | 2 +- .../src/CSCTFCandidateBuilder.h | 2 +- L1Trigger/CSCTrackFinder/src/CSCTFPtLUT.cc | 2 +- .../CSCTrackFinder/src/CSCTFSPCoreLogic.cc | 2 +- .../src/CSCTFSectorProcessor.cc | 16 +- .../CSCTrackFinder/src/CSCTFTrackBuilder.cc | 4 +- .../CSCTrackFinder/src/CSCTFTrackBuilder.h | 2 +- .../src/CSCTriggerPrimitivesBuilder.cc | 2 +- L1Trigger/DTBti/interface/DTBtiCard.h | 6 +- L1Trigger/DTBti/interface/DTBtiTrig.h | 6 +- L1Trigger/DTBti/interface/DTBtiTrigData.h | 6 +- L1Trigger/DTBti/src/DTBtiCard.cc | 12 +- L1Trigger/DTBti/src/DTBtiChip.cc | 14 +- L1Trigger/DTBti/src/DTBtiChipEquations.cc | 14 +- L1Trigger/DTBti/src/DTBtiHit.cc | 2 +- .../DTSectorCollector/interface/DTSectColl.h | 4 +- .../interface/DTSectCollPhSegm.h | 6 +- .../interface/DTSectCollThSegm.h | 6 +- L1Trigger/DTSectorCollector/src/DTSC.cc | 34 +- .../DTSectorCollector/src/DTSCTrigUnit.cc | 2 +- L1Trigger/DTSectorCollector/src/DTSectColl.cc | 32 +- .../DTSectorCollector/src/DTSectCollPhCand.cc | 2 +- .../DTSectorCollector/src/DTSectCollPhSegm.cc | 2 +- .../DTSectorCollector/src/DTSectCollThCand.cc | 2 +- .../DTTrackFinder/interface/L1MuDTTrack.h | 8 +- .../DTTrackFinder/plugins/DTTrackFinder.h | 4 +- .../DTTrackFinder/src/L1MuDTAssignmentUnit.cc | 20 +- .../DTTrackFinder/src/L1MuDTAssignmentUnit.h | 6 +- .../DTTrackFinder/src/L1MuDTDataBuffer.cc | 4 +- L1Trigger/DTTrackFinder/src/L1MuDTERS.cc | 4 +- L1Trigger/DTTrackFinder/src/L1MuDTERS.h | 6 +- L1Trigger/DTTrackFinder/src/L1MuDTEUX.cc | 8 +- L1Trigger/DTTrackFinder/src/L1MuDTEUX.h | 12 +- .../DTTrackFinder/src/L1MuDTEtaProcessor.cc | 10 +- .../src/L1MuDTExtrapolationUnit.cc | 6 +- .../src/L1MuDTExtrapolationUnit.h | 6 +- .../DTTrackFinder/src/L1MuDTMuonSorter.cc | 10 +- .../DTTrackFinder/src/L1MuDTMuonSorter.h | 6 +- L1Trigger/DTTrackFinder/src/L1MuDTSEU.cc | 8 +- L1Trigger/DTTrackFinder/src/L1MuDTSEU.h | 6 +- .../DTTrackFinder/src/L1MuDTSecProcMap.cc | 2 +- .../src/L1MuDTSectorProcessor.cc | 2 +- .../DTTrackFinder/src/L1MuDTSectorReceiver.cc | 2 +- .../DTTrackFinder/src/L1MuDTTrackAssembler.h | 6 +- .../DTTrackFinder/src/L1MuDTTrackFinder.cc | 10 +- .../DTTrackFinder/src/L1MuDTWedgeSorter.cc | 6 +- .../DTTrackFinder/src/L1MuDTWedgeSorter.h | 6 +- L1Trigger/DTTraco/interface/DTTracoCard.h | 8 +- L1Trigger/DTTraco/interface/DTTracoTrig.h | 6 +- L1Trigger/DTTraco/interface/DTTracoTrigData.h | 6 +- L1Trigger/DTTraco/interface/Lut.h | 2 +- L1Trigger/DTTraco/src/DTTracoCard.cc | 12 +- L1Trigger/DTTraco/src/DTTracoChip.cc | 50 +- L1Trigger/DTTrigger/interface/DTTrigProd.h | 2 +- L1Trigger/DTTrigger/interface/DTTrigTest.h | 10 +- L1Trigger/DTTrigger/src/DTTrig.cc | 34 +- L1Trigger/DTTrigger/src/DTTrigProd.cc | 2 +- L1Trigger/DTTrigger/src/DTTrigTest.cc | 8 +- .../interface/DTChambPhSegm.h | 6 +- .../DTTriggerServerPhi/interface/DTTSPhi.h | 8 +- .../DTTriggerServerPhi/src/DTChambPhSegm.cc | 2 +- L1Trigger/DTTriggerServerPhi/src/DTTSCand.cc | 2 +- L1Trigger/DTTriggerServerPhi/src/DTTSM.cc | 34 +- L1Trigger/DTTriggerServerPhi/src/DTTSPhi.cc | 14 +- L1Trigger/DTTriggerServerPhi/src/DTTSS.cc | 38 +- .../interface/DTChambThSegm.h | 6 +- .../interface/DTTSTheta.h | 10 +- .../DTTriggerServerTheta/src/DTTSTheta.cc | 8 +- .../interface/L1GctElectronFinalSort.h | 12 +- .../interface/L1GctElectronSorter.h | 12 +- .../interface/L1GctEmLeafCard.h | 12 +- .../interface/L1GctGlobalEnergyAlgos.h | 12 +- .../interface/L1GctGlobalHfSumAlgos.h | 12 +- .../interface/L1GctHardwareJetFinder.h | 12 +- .../interface/L1GctHfBitCountsLut.h | 4 +- .../interface/L1GctHfEtSumsLut.h | 6 +- .../interface/L1GctHtMissLut.h | 6 +- .../interface/L1GctJetEtCalibrationLut.h | 4 +- .../interface/L1GctJetFinalStage.h | 12 +- .../interface/L1GctJetFinderBase.h | 12 +- .../interface/L1GctJetLeafCard.h | 12 +- .../interface/L1GctNullJetFinder.h | 12 +- .../interface/L1GctTdrJetFinder.h | 12 +- .../interface/L1GctWheelEnergyFpga.h | 12 +- .../interface/L1GctWheelJetFpga.h | 12 +- .../plugins/L1GctEmulator.cc | 8 +- .../GlobalCaloTrigger/plugins/L1GctEmulator.h | 8 +- .../plugins/L1GctPrintLuts.cc | 6 +- .../plugins/L1GctPrintLuts.h | 8 +- .../plugins/L1GctValidation.cc | 2 +- .../plugins/L1GctValidation.h | 8 +- .../src/L1GctElectronFinalSort.cc | 6 +- .../src/L1GctGlobalEnergyAlgos.cc | 12 +- .../src/L1GctGlobalHfSumAlgos.cc | 10 +- .../src/L1GctHfBitCountsLut.cc | 2 +- .../GlobalCaloTrigger/src/L1GctHfEtSumsLut.cc | 8 +- .../GlobalCaloTrigger/src/L1GctHtMissLut.cc | 10 +- .../src/L1GctJetEtCalibrationLut.cc | 2 +- .../src/L1GctJetFinalStage.cc | 8 +- .../src/L1GctJetFinderBase.cc | 6 +- L1Trigger/GlobalCaloTrigger/src/L1GctMet.cc | 4 +- .../src/L1GctWheelEnergyFpga.cc | 2 +- .../src/L1GctWheelJetFpga.cc | 10 +- .../src/L1GlobalCaloTrigger.cc | 42 +- .../interface/L1MuGlobalMuonTrigger.h | 6 +- .../GlobalMuonTrigger/src/L1MuGMTConfig.cc | 84 +-- .../src/L1MuGMTDebugBlock.cc | 4 +- .../src/L1MuGMTEtaProjectionUnit.cc | 10 +- .../src/L1MuGMTHWFileReader.cc | 2 +- .../src/L1MuGMTHWFileReader.h | 6 +- .../src/L1MuGMTInputEvent.cc | 2 +- .../src/L1MuGMTLFCOUDeltaEtaLUT.h | 4 +- .../src/L1MuGMTLFDeltaEtaLUT.h | 4 +- .../src/L1MuGMTLFDisableHotLUT.h | 4 +- .../src/L1MuGMTLFEtaConvLUT.h | 4 +- .../src/L1MuGMTLFMatchQualLUT.h | 4 +- .../src/L1MuGMTLFMergeRankCombineLUT.h | 4 +- .../src/L1MuGMTLFMergeRankEtaPhiLUT.h | 4 +- .../src/L1MuGMTLFMergeRankEtaQLUT.h | 4 +- .../src/L1MuGMTLFMergeRankPtQLUT.h | 4 +- .../src/L1MuGMTLFOvlEtaConvLUT.h | 4 +- .../src/L1MuGMTLFPhiProEtaConvLUT.h | 4 +- .../src/L1MuGMTLFPhiProLUT.h | 4 +- .../GlobalMuonTrigger/src/L1MuGMTLFPtMixLUT.h | 4 +- .../src/L1MuGMTLFSortRankCombineLUT.h | 4 +- .../src/L1MuGMTLFSortRankEtaPhiLUT.h | 4 +- .../src/L1MuGMTLFSortRankEtaQLUT.h | 4 +- .../src/L1MuGMTLFSortRankPtQLUT.h | 4 +- L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.cc | 10 +- L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.h | 8 +- .../src/L1MuGMTLUTHelpers.cc | 2 +- .../GlobalMuonTrigger/src/L1MuGMTLUTHelpers.h | 4 +- .../src/L1MuGMTMIAUEtaConvLUT.h | 4 +- .../src/L1MuGMTMIAUEtaProLUT.h | 4 +- .../src/L1MuGMTMIAUPhiPro1LUT.h | 4 +- .../src/L1MuGMTMIAUPhiPro2LUT.h | 4 +- .../GlobalMuonTrigger/src/L1MuGMTMatcher.cc | 8 +- .../GlobalMuonTrigger/src/L1MuGMTMatrix.h | 8 +- .../GlobalMuonTrigger/src/L1MuGMTMerger.cc | 12 +- .../GlobalMuonTrigger/src/L1MuGMTMipIsoAU.cc | 2 +- L1Trigger/GlobalMuonTrigger/src/L1MuGMTPSB.cc | 6 +- .../src/L1MuGMTPhiProjectionUnit.cc | 8 +- L1Trigger/GlobalMuonTrigger/src/L1MuGMTReg.h | 16 +- .../src/L1MuGMTSortRankUnit.cc | 6 +- .../GlobalMuonTrigger/src/L1MuGMTSorter.cc | 2 +- .../src/L1MuGlobalMuonTrigger.cc | 8 +- .../interface/L1GtBptxCondition.h | 6 +- .../interface/L1GtCaloCondition.h | 6 +- .../interface/L1GtCastorCondition.h | 6 +- .../interface/L1GtCorrelationCondition.h | 6 +- .../interface/L1GtEnergySumCondition.h | 6 +- .../interface/L1GtExternalCondition.h | 6 +- .../interface/L1GtHfBitCountsCondition.h | 6 +- .../interface/L1GtHfRingEtSumsCondition.h | 6 +- .../interface/L1GtJetCountsCondition.h | 6 +- .../interface/L1GtMuonCondition.h | 6 +- .../plugins/CompareToObjectMapRecord.cc | 4 +- .../plugins/CompareToObjectMapRecord.h | 4 +- .../plugins/ConvertObjectMapRecord.h | 4 +- .../GlobalTrigger/plugins/L1GTPrescaler.cc | 10 +- .../GlobalTrigger/plugins/L1GlobalTrigger.h | 4 +- .../GlobalTrigger/src/L1GlobalTriggerGTL.cc | 6 +- .../GlobalTrigger/src/L1GlobalTriggerPSB.cc | 28 +- .../src/L1GtAlgorithmEvaluation.cc | 2 +- .../GlobalTrigger/src/L1GtCaloCondition.cc | 4 +- .../src/L1GtCorrelationCondition.cc | 18 +- .../src/L1GtEnergySumCondition.cc | 8 +- .../src/L1GtHfBitCountsCondition.cc | 2 +- .../src/L1GtHfRingEtSumsCondition.cc | 2 +- .../src/L1GtJetCountsCondition.cc | 2 +- .../interface/L1GtAnalyzer.h | 20 +- .../interface/L1GtBeamModeFilter.h | 4 +- .../interface/L1GtDataEmulAnalyzer.h | 8 +- .../interface/L1GtPackUnpackAnalyzer.h | 8 +- .../interface/L1GtPatternGenerator.h | 8 +- .../interface/L1GtTrigReport.h | 8 +- .../GlobalTriggerAnalyzer/src/L1GtAnalyzer.cc | 2 +- .../src/L1GtDataEmulAnalyzer.cc | 12 +- .../src/L1GtPatternGenerator.cc | 4 +- .../src/L1GtTrigReport.cc | 8 +- .../GlobalTriggerAnalyzer/src/L1GtUtils.cc | 16 +- .../src/L1RetrieveL1Extra.cc | 48 +- .../HardwareValidation/interface/DEutils.h | 6 +- .../interface/L1Comparator.h | 10 +- .../interface/L1ComparatorRun2.h | 4 +- .../HardwareValidation/plugins/L1DEFilter.h | 8 +- .../plugins/L1DummyProducer.h | 18 +- .../HardwareValidation/plugins/L1EmulBias.h | 8 +- .../HardwareValidation/src/L1Comparator.cc | 18 +- .../interface/L1ExtraParticleMapProd.h | 4 +- .../interface/L1ExtraParticlesProd.h | 4 +- .../src/L1ExtraParticleMapProd.cc | 6 +- .../src/L1ExtraTestAnalyzer.cc | 4 +- .../L1GctAnalyzer/interface/DumpGctDigis.h | 4 +- .../interface/GctFibreAnalyzer.h | 4 +- .../interface/GctTimingAnalyzer.h | 4 +- .../L1GctAnalyzer/interface/compareCands.h | 8 +- .../interface/compareMissingEnergySums.h | 8 +- .../interface/compareTotalEnergySums.h | 4 +- L1Trigger/L1GctAnalyzer/src/DumpGctDigis.cc | 2 +- .../L1GctAnalyzer/src/GctErrorAnalyzer.cc | 60 +- .../L1GctAnalyzer/src/compareBitCounts.cc | 4 +- .../L1GctAnalyzer/src/compareRingSums.cc | 4 +- .../plugins/L1TCaloLayer1Validator.cc | 8 +- L1Trigger/L1TCaloLayer1/src/UCTCard.cc | 8 +- L1Trigger/L1TCaloLayer1/src/UCTCrate.cc | 8 +- L1Trigger/L1TCaloLayer1/src/UCTGeometry.cc | 4 +- L1Trigger/L1TCaloLayer1/src/UCTLayer1.cc | 12 +- L1Trigger/L1TCaloLayer1/src/UCTRegion.cc | 6 +- .../interface/AccumulatingSort.h | 2 +- L1Trigger/L1TCalorimeter/interface/Cordic.h | 2 +- .../L1TCalorimeter/interface/CordicXilinx.h | 2 +- .../L1TCalorimeter/interface/L1GObject.h | 2 +- .../Stage1Layer2EGammaAlgorithmImp.h | 18 +- .../interface/Stage1Layer2EtSumAlgorithmImp.h | 18 +- .../Stage1Layer2HFBitCountAlgorithmImp.h | 6 +- .../Stage1Layer2HFRingSumAlgorithmImp.h | 18 +- .../interface/Stage1Layer2JetAlgorithmImp.h | 18 +- .../Stage1Layer2MainProcessorFirmware.h | 6 +- .../interface/Stage1Layer2TauAlgorithmImp.h | 18 +- .../interface/Stage1TauIsolationLUT.h | 2 +- .../Stage2Layer2ClusterAlgorithmFirmware.h | 4 +- .../Stage2Layer2DemuxEGAlgoFirmware.h | 6 +- .../Stage2Layer2DemuxJetAlgoFirmware.h | 6 +- .../Stage2Layer2DemuxSumsAlgoFirmware.h | 6 +- .../Stage2Layer2DemuxTauAlgoFirmware.h | 6 +- .../Stage2Layer2EGammaAlgorithmFirmware.h | 4 +- .../Stage2Layer2EtSumAlgorithmFirmware.h | 6 +- .../Stage2Layer2JetAlgorithmFirmware.h | 6 +- .../Stage2Layer2JetSumAlgorithmFirmware.h | 6 +- .../Stage2Layer2TauAlgorithmFirmware.h | 6 +- .../interface/Stage2MainProcessorFirmware.h | 6 +- .../interface/Stage2PreProcessorFirmware.h | 6 +- .../Stage2TowerCompressAlgorithmFirmware.h | 6 +- .../Stage2TowerDecompressAlgorithmFirmware.h | 6 +- .../plugins/CaloConfigWriter.cc | 4 +- .../plugins/CaloParamsWriter.cc | 4 +- .../plugins/L1TCaloConfigESProducer.cc | 2 +- .../plugins/L1TCaloParamsESProducer.cc | 2 +- .../plugins/L1TCaloParamsWriter.cc | 4 +- .../plugins/L1TCaloRCTToUpgradeConverter.h | 8 +- .../plugins/L1TCaloStage1LutWriter.cc | 8 +- .../plugins/L1TCaloUpgradeToGCTConverter.h | 2 +- .../plugins/L1TPhysicalEtAdder.h | 4 +- .../plugins/L1TStage1Layer2Producer.cc | 12 +- .../plugins/L1TStage2CaloAnalyzer.cc | 14 +- .../plugins/L1TStage2InputPatternWriter.cc | 10 +- L1Trigger/L1TCalorimeter/src/L1RecoMatch.cc | 4 +- .../L1TCalorimeter/src/firmware/Cordic.cc | 4 +- .../src/firmware/CordicXilinx.cc | 2 +- .../firmware/Stage1Layer2DiTauAlgorithm.cc | 2 +- .../Stage1Layer2MainProcessorFirmwareImp1.cc | 2 +- .../Stage2Layer2DemuxSumsAlgoFirmwareImp1.cc | 2 +- ...Stage2Layer2EGammaAlgorithmFirmwareImp1.cc | 2 +- .../Stage2Layer2EtSumAlgorithmFirmwareImp1.cc | 4 +- .../Stage2Layer2JetAlgorithmFirmwareImp1.cc | 2 +- ...Stage2Layer2JetSumAlgorithmFirmwareImp1.cc | 2 +- .../Stage2Layer2TauAlgorithmFirmwareImp1.cc | 14 +- L1Trigger/L1TCommon/interface/Parameter.h | 2 +- L1Trigger/L1TCommon/interface/TriggerSystem.h | 2 +- L1Trigger/L1TCommon/plugins/L1TBasicDemo.cc | 4 +- L1Trigger/L1TCommon/plugins/L1TComparison.cc | 16 +- .../L1TCommon/plugins/L1TConfigDumper.cc | 8 +- .../plugins/L1TMuonLegacyConverter.h | 4 +- L1Trigger/L1TCommon/plugins/L1TSummary.cc | 16 +- L1Trigger/L1TCommon/src/Parameter.cc | 20 +- L1Trigger/L1TGlobal/interface/CaloCondition.h | 6 +- L1Trigger/L1TGlobal/interface/CaloTemplate.h | 4 +- L1Trigger/L1TGlobal/interface/CorrCondition.h | 6 +- .../CorrWithOverlapRemovalCondition.h | 6 +- .../L1TGlobal/interface/CorrelationTemplate.h | 4 +- .../CorrelationWithOverlapRemovalTemplate.h | 4 +- .../L1TGlobal/interface/EnergySumCondition.h | 6 +- .../L1TGlobal/interface/EnergySumTemplate.h | 4 +- .../L1TGlobal/interface/ExternalCondition.h | 6 +- .../L1TGlobal/interface/ExternalTemplate.h | 4 +- L1Trigger/L1TGlobal/interface/MuCondition.h | 6 +- L1Trigger/L1TGlobal/interface/MuonTemplate.h | 4 +- .../plugins/BXVectorInputProducer.cc | 12 +- .../L1TGlobal/plugins/FakeInputProducer.cc | 12 +- .../L1TGlobal/plugins/GenToInputProducer.cc | 14 +- L1Trigger/L1TGlobal/plugins/GtInputDump.cc | 4 +- L1Trigger/L1TGlobal/plugins/GtRecordDump.cc | 6 +- .../plugins/L1TExtCondLegacyToStage2.cc | 4 +- .../L1TGlobal/plugins/L1TExtCondProducer.cc | 4 +- .../L1TGlobal/plugins/L1TGlobalAnalyzer.cc | 8 +- .../L1TGlobalPrescalesVetosESProducer.cc | 6 +- .../L1TGlobal/plugins/L1TGlobalProducer.h | 4 +- .../L1TGlobal/plugins/L1TGlobalSummary.cc | 8 +- .../plugins/L1TUtmTriggerMenuDumper.cc | 20 +- .../plugins/L1TUtmTriggerMenuESProducer.cc | 6 +- .../StableParametersTrivialProducer.cc | 2 +- .../L1TGlobal/plugins/TriggerMenuParser.cc | 18 +- .../L1TGlobal/src/AlgorithmEvaluation.cc | 2 +- L1Trigger/L1TGlobal/src/CaloCondition.cc | 4 +- L1Trigger/L1TGlobal/src/CorrCondition.cc | 24 +- .../src/CorrWithOverlapRemovalCondition.cc | 28 +- L1Trigger/L1TGlobal/src/GlobalBoard.cc | 12 +- L1Trigger/L1TGlobal/src/GlobalDefinitions.cc | 6 +- L1Trigger/L1TGlobal/src/GlobalParamsHelper.cc | 2 +- .../L1TGlobal/src/PrescalesVetosHelper.cc | 2 +- .../HGCalTriggerBackendAlgorithmBase.h | 2 +- .../interface/HGCalTriggerFECodecBase.h | 18 +- .../HGCalTriggerGeometryGenericMapping.h | 30 +- .../HGCalTriggerCellCalibration.h | 2 +- .../plugins/HGCalTriggerDigiFEReproducer.cc | 6 +- .../plugins/HGCalTriggerDigiProducer.cc | 8 +- .../plugins/HGCalTriggerGeometryESProducer.cc | 2 +- .../be_algorithms/FullModuleSumAlgo.cc | 8 +- .../plugins/be_algorithms/HGCClusterAlgo.cc | 8 +- .../plugins/be_algorithms/HGCalSimCluster.cc | 10 +- .../be_algorithms/RandomClusterAlgo.cc | 10 +- .../be_algorithms/SingleCellClusterAlgo.cc | 10 +- .../plugins/fe_codecs/HGCalBestChoiceCodec.cc | 4 +- .../HGCalTriggerCellBestChoiceCodec.cc | 4 +- .../HGCalTriggerCellThresholdCodec.cc | 6 +- .../geometries/HGCalTriggerGeometryHexImp1.cc | 2 +- .../geometries/HGCalTriggerGeometryHexImp2.cc | 36 +- .../HGCalTriggerGeometryHexLayerBasedImp1.cc | 32 +- .../geometries/HGCalTriggerGeometryImp1.cc | 2 +- .../plugins/geometries/NullGeometry.cc | 2 +- .../plugins/geometries/TrivialGeometry.cc | 2 +- .../ntuples/HGCalTriggerNtupleEvent.cc | 6 +- .../plugins/ntuples/HGCalTriggerNtupleGen.cc | 6 +- .../ntuples/HGCalTriggerNtupleGenJet.cc | 6 +- .../ntuples/HGCalTriggerNtupleGenTau.cc | 6 +- .../ntuples/HGCalTriggerNtupleHGCClusters.cc | 8 +- .../ntuples/HGCalTriggerNtupleHGCDigis.cc | 8 +- .../HGCalTriggerNtupleHGCMulticlusters.cc | 8 +- .../HGCalTriggerNtupleHGCTriggerCells.cc | 8 +- .../ntuples/HGCalTriggerNtupleManager.cc | 8 +- .../src/HGCalTriggerBackendProcessor.cc | 2 +- .../src/be_algorithms/HGCalClusteringImpl.cc | 4 +- .../be_algorithms/HGCalMulticlusteringImpl.cc | 2 +- .../src/fe_codecs/HGCalBestChoiceCodecImpl.cc | 4 +- .../HGCalTriggerCellBestChoiceCodecImpl.cc | 8 +- .../HGCalTriggerCellThresholdCodecImpl.cc | 8 +- .../interface/deprecate/CSCCollector.h | 6 +- .../L1TMuon/interface/deprecate/DTCollector.h | 6 +- .../interface/deprecate/RPCCollector.h | 6 +- L1Trigger/L1TMuon/plugins/DTCollector.cc | 4 +- .../interface/L1TMuonBarrelParamsHelper.h | 2 +- .../plugins/L1TMuonBarrelParamsESProducer.cc | 2 +- .../L1TMuonBarrel/src/L1MuBMLUTHandler.cc | 2 +- .../src/L1TMuonBarrelParamsHelper.cc | 2 +- .../L1TMuonEndCap/interface/TrackTools.h | 2 +- .../interface/bdt/LossFunctions.h | 8 +- .../L1TMuonOverlap/interface/OMTFinputMaker.h | 2 +- .../plugins/L1TMuonOverlapParamsDBProducer.h | 10 +- .../plugins/L1TMuonOverlapParamsESProducer.h | 2 +- .../plugins/L1TMuonOverlapTrackProducer.h | 10 +- .../plugins/OMTFPatternMaker.cc | 4 +- .../L1TMuonOverlap/plugins/OMTFPatternMaker.h | 12 +- L1Trigger/L1TMuonOverlap/src/GoldenPattern.cc | 10 +- .../L1TMuonOverlap/src/OMTFConfigMaker.cc | 4 +- L1Trigger/L1TMuonOverlap/src/OMTFProcessor.cc | 4 +- .../L1TMuonOverlap/src/OMTFReconstruction.cc | 4 +- .../L1TMuonOverlap/src/XMLConfigReader.cc | 32 +- .../L1TMuonOverlap/src/XMLConfigWriter.cc | 10 +- .../L1AnalysisRecoMetFilterDataFormat.h | 16 +- .../plugins/L1CaloTowerTreeProducer.cc | 8 +- .../plugins/L1ElectronRecoTreeProducer.cc | 8 +- .../L1TNtuples/plugins/L1EventTreeProducer.cc | 8 +- .../L1TNtuples/plugins/L1ExtraTreeProducer.cc | 8 +- .../L1TNtuples/plugins/L1GenTreeProducer.cc | 8 +- .../L1TNtuples/plugins/L1HOTreeProducer.cc | 8 +- .../plugins/L1JetRecoTreeProducer.cc | 8 +- .../L1TNtuples/plugins/L1MenuTreeProducer.cc | 12 +- .../plugins/L1MetFilterRecoTreeProducer.cc | 10 +- .../plugins/L1Muon2RecoTreeProducer.cc | 10 +- .../plugins/L1MuonRecoTreeProducer.cc | 16 +- .../L1TNtuples/plugins/L1RecoTreeProducer.cc | 8 +- .../plugins/L1TauRecoTreeProducer.cc | 8 +- .../plugins/L1UpgradeTfMuonTreeProducer.cc | 8 +- .../plugins/L1UpgradeTreeProducer.cc | 8 +- .../L1TNtuples/plugins/L1uGTTreeProducer.cc | 10 +- L1Trigger/L1TNtuples/src/L1AnalysisCaloTP.cc | 4 +- L1Trigger/L1TNtuples/src/L1AnalysisDTTF.cc | 4 +- L1Trigger/L1TNtuples/src/L1AnalysisEvent.cc | 2 +- L1Trigger/L1TNtuples/src/L1AnalysisGT.cc | 4 +- L1Trigger/L1TNtuples/src/L1AnalysisL1Extra.cc | 2 +- .../ME0Trigger/plugins/ME0TriggerProducer.h | 4 +- L1Trigger/ME0Trigger/src/ME0TriggerBuilder.cc | 2 +- .../interface/LogicFactory.h | 4 +- .../interface/ProcessTestSignal.h | 8 +- .../interface/RBCBasicConfig.h | 6 +- .../interface/RBCBoardSpecsIO.h | 4 +- .../interface/RBCChamberORLogic.h | 8 +- .../RPCTechnicalTrigger/interface/RBCInput.h | 2 +- .../interface/RBCLinkBoardGLSignal.h | 4 +- .../interface/RBCLinkBoardSignal.h | 4 +- .../interface/RBCLogicUnit.h | 2 +- .../interface/RBCPatternLogic.h | 8 +- .../interface/RBCProcessRPCDigis.h | 8 +- .../interface/RBCProcessRPCSimDigis.h | 8 +- .../interface/RBCProcessTestSignal.h | 8 +- .../interface/RBCTestLogic.h | 8 +- .../RPCTechnicalTrigger/interface/RPCData.h | 2 +- .../interface/RPCTechnicalTrigger.h | 8 +- .../interface/TTUBasicConfig.h | 6 +- .../interface/TTUBoardSpecsIO.h | 4 +- .../interface/TTUGlobalSignal.h | 4 +- .../interface/TTULogicUnit.h | 2 +- .../interface/TTUPointingLogic.h | 6 +- .../interface/TTUSectorORLogic.h | 6 +- .../interface/TTUTrackingAlg.h | 6 +- .../interface/TTUTwoORLogic.h | 6 +- .../interface/TTUWedgeORLogic.h | 6 +- .../RPCTechnicalTrigger/src/RBCBasicConfig.cc | 4 +- .../RPCTechnicalTrigger/src/RBCEmulator.cc | 8 +- L1Trigger/RPCTechnicalTrigger/src/RBCInput.cc | 4 +- .../src/RBCLinkBoardGLSignal.cc | 2 +- .../RPCTechnicalTrigger/src/RBCLogicUnit.cc | 6 +- .../src/RBCPatternLogic.cc | 8 +- .../src/RBCProcessRPCDigis.cc | 4 +- .../src/RBCProcessRPCSimDigis.cc | 4 +- .../RPCTechnicalTrigger/src/RBCTestLogic.cc | 4 +- .../src/RPCTechnicalTrigger.cc | 2 +- .../RPCTechnicalTrigger/src/RPCWheelMap.cc | 2 +- .../RPCTechnicalTrigger/src/TTUBasicConfig.cc | 2 +- .../RPCTechnicalTrigger/src/TTUEmulator.cc | 2 +- .../src/TTUGlobalSignal.cc | 2 +- .../RPCTechnicalTrigger/src/TTULogicUnit.cc | 6 +- .../RPCTechnicalTrigger/src/TTUTrackingAlg.cc | 2 +- L1Trigger/RPCTrigger/interface/MuonsGrabber.h | 4 +- .../RPCTrigger/interface/RPCBasicTrigConfig.h | 20 +- .../RPCTrigger/interface/RPCConeBuilder.h | 2 +- .../RPCTrigger/interface/RPCPatternsParser.h | 6 +- .../RPCTrigger/interface/RPCStripsRing.h | 2 +- L1Trigger/RPCTrigger/interface/RPCTrigger.h | 4 +- .../RPCTrigger/plugins/RPCConeBuilder.cc | 2 +- L1Trigger/RPCTrigger/plugins/RPCTrigger.cc | 6 +- L1Trigger/RPCTrigger/src/MuonsGrabber.cc | 30 +- .../RPCTrigger/src/RPCBasicTrigConfig.cc | 2 +- L1Trigger/RPCTrigger/src/RPCConst.cc | 6 +- L1Trigger/RPCTrigger/src/RPCHalfSorter.cc | 8 +- L1Trigger/RPCTrigger/src/RPCLogCone.cc | 2 +- L1Trigger/RPCTrigger/src/RPCPac.cc | 4 +- L1Trigger/RPCTrigger/src/RPCPacData.cc | 4 +- L1Trigger/RPCTrigger/src/RPCPatternsParser.cc | 2 +- L1Trigger/RPCTrigger/src/RPCTBGhostBuster.cc | 2 +- L1Trigger/RPCTrigger/src/RPCTriggerBoard.cc | 4 +- .../interface/L1RCTCrate.h | 2 +- .../interface/L1RCTElectronIsolationCard.h | 2 +- .../interface/L1RCTInputProducer.h | 4 +- .../interface/L1RCTJetSummaryCard.h | 2 +- .../interface/L1RCTLookupTables.h | 2 +- .../interface/L1RCTLutWriter.h | 6 +- .../interface/L1RCTProducer.h | 8 +- .../interface/L1RCTReceiverCard.h | 2 +- .../interface/L1RCTRelValAnalyzer.h | 4 +- .../interface/L1RCTSaveInput.h | 4 +- .../interface/L1RCTTPGProvider.h | 6 +- .../interface/L1RCTTestAnalyzer.h | 4 +- .../interface/MaskedRctInputDigiProducer.h | 6 +- .../plugins/L1RCTInputProducer.cc | 8 +- .../plugins/L1RCTLutWriter.cc | 10 +- .../plugins/L1RCTProducer.cc | 14 +- .../plugins/L1RCTSaveInput.cc | 4 +- L1Trigger/RegionalCaloTrigger/src/L1RCT.cc | 4 +- .../src/L1RCTJetSummaryCard.cc | 8 +- .../src/L1RCTLookupTables.cc | 20 +- L1Trigger/Skimmer/src/L1Filter.cc | 4 +- .../TextToDigi/plugins/GctDigiToPsbText.h | 4 +- .../TextToDigi/plugins/GtPsbTextToDigi.cc | 18 +- .../TextToDigi/plugins/GtPsbTextToDigi.h | 6 +- L1Trigger/TextToDigi/plugins/RawToText.h | 8 +- .../TextToDigi/plugins/RctDigiToRctText.cc | 2 +- .../TextToDigi/plugins/RctDigiToRctText.h | 4 +- .../plugins/RctDigiToSourceCardText.h | 4 +- .../TextToDigi/plugins/RctInputTextToDigi.cc | 2 +- .../TextToDigi/plugins/RctInputTextToDigi.h | 8 +- .../TextToDigi/plugins/RctTextToRctDigi.cc | 4 +- .../TextToDigi/plugins/RctTextToRctDigi.h | 4 +- .../plugins/SourceCardTextToRctDigi.h | 4 +- L1Trigger/TextToDigi/plugins/TextToRaw.h | 8 +- .../interface/TTClusterAlgorithm_neighbor.h | 6 +- .../interface/TTClusterAlgorithm_official.h | 6 +- .../interface/TTStubAlgorithm_cbc3.h | 6 +- .../interface/TTStubAlgorithm_official.h | 6 +- .../TrackTrigger/plugins/TTClusterBuilder.h | 8 +- .../interface/CSCTFAlignmentOnlineProd.h | 4 +- .../interface/CSCTFConfigOnlineProd.h | 4 +- .../interface/CSCTFConfigProducer.h | 2 +- .../interface/CSCTFObjectKeysOnlineProd.h | 4 +- .../interface/L1MuCSCPtLutConfigOnlineProd.h | 4 +- .../interface/L1MuCSCTFParametersTester.h | 4 +- .../src/CSCTFConfigProducer.cc | 4 +- .../src/CSCTFConfigTestAnalyzer.cc | 8 +- .../DTTPGConfig/interface/BitArray.h | 16 +- .../DTTPGConfig/interface/DTConfigBti.h | 2 +- .../DTTPGConfig/interface/DTConfigLUTs.h | 2 +- .../DTTPGConfig/interface/DTConfigPedestals.h | 4 +- .../DTTPGConfig/interface/DTConfigSectColl.h | 2 +- .../DTTPGConfig/interface/DTConfigTSPhi.h | 2 +- .../DTTPGConfig/interface/DTConfigTSTheta.h | 2 +- .../DTTPGConfig/interface/DTConfigTraco.h | 2 +- .../DTTPGConfig/interface/DTConfigTrigUnit.h | 2 +- .../DTTPGConfig/src/DTConfigBti.cc | 6 +- .../DTTPGConfig/src/DTConfigLUTs.cc | 4 +- .../DTTPGConfig/src/DTConfigManager.cc | 18 +- .../DTTPGConfig/src/DTConfigPedestals.cc | 2 +- .../DTTPGConfig/src/DTConfigSectColl.cc | 4 +- .../DTTPGConfig/src/DTConfigTSPhi.cc | 4 +- .../DTTPGConfig/src/DTConfigTraco.cc | 6 +- .../plugins/DTTPGParamsWriter.h | 6 +- .../src/DTConfigDBProducer.h | 2 +- .../DTTPGConfigProducers/src/DTConfigTester.h | 4 +- .../src/DTConfigTrivialProducer.h | 2 +- .../interface/DTEtaPatternLutTester.h | 4 +- .../DTTrackFinder/interface/DTExtLutTester.h | 4 +- .../DTTrackFinder/interface/DTPhiLutTester.h | 4 +- .../DTTrackFinder/interface/DTPtaLutTester.h | 4 +- .../interface/DTQualPatternLutTester.h | 4 +- .../DTTrackFinder/interface/DTTFMasksTester.h | 4 +- .../interface/DTTFParametersTester.h | 4 +- .../interface/DTTrackFinderConfig.h | 2 +- .../src/DTEtaPatternLutOnlineProd.cc | 4 +- .../DTTrackFinder/src/DTExtLutOnlineProd.cc | 4 +- .../DTTrackFinder/src/DTPhiLutOnlineProd.cc | 4 +- .../DTTrackFinder/src/DTPtaLutOnlineProd.cc | 4 +- .../src/DTQualPatternLutOnlineProd.cc | 4 +- .../DTTrackFinder/src/DTTFMasksOnlineProd.cc | 8 +- .../src/DTTFParametersOnlineProd.cc | 4 +- .../DTTrackFinder/src/DTTFRSKeysOnlineProd.cc | 4 +- .../src/DTTFTSCObjectKeysOnlineProd.cc | 4 +- .../L1MuGMTParametersOnlineProducer.h | 4 +- .../interface/L1MuGMTParametersProducer.h | 2 +- .../interface/RecordHelper.h | 4 +- .../src/L1MuGMTChannelMaskOnlineProducer.cc | 4 +- .../src/L1MuGMTParametersKeysOnlineProd.cc | 4 +- .../src/L1MuGMTRSKeysOnlineProd.cc | 4 +- .../interface/L1GctConfigDump.h | 4 +- .../interface/L1GctConfigProducers.h | 2 +- .../src/L1GctChannelMaskOnlineProd.cc | 4 +- .../src/L1GctJetFinderParamsOnlineProd.cc | 4 +- .../src/L1GctRSObjectKeysOnlineProd.cc | 4 +- .../src/L1GctTSCObjectKeysOnlineProd.cc | 4 +- .../L1CSCTriggerPrimitivesConfigProducer.h | 2 +- .../interface/L1CaloGeometryProd.h | 2 +- .../src/L1CaloGeometryDump.cc | 8 +- .../interface/L1GtBoardMapsTester.h | 4 +- .../interface/L1GtBoardMapsTrivialProducer.h | 2 +- .../L1GtParametersConfigOnlineProd.h | 4 +- .../interface/L1GtParametersTester.h | 4 +- .../interface/L1GtParametersTrivialProducer.h | 2 +- ...tPrescaleFactorsAlgoTrigConfigOnlineProd.h | 4 +- ...GtPrescaleFactorsAlgoTrigTrivialProducer.h | 2 +- .../L1GtPrescaleFactorsAndMasksTester.h | 16 +- ...tPrescaleFactorsTechTrigConfigOnlineProd.h | 4 +- ...GtPrescaleFactorsTechTrigTrivialProducer.h | 2 +- .../interface/L1GtPsbSetupConfigOnlineProd.h | 4 +- .../interface/L1GtPsbSetupTester.h | 4 +- .../interface/L1GtPsbSetupTrivialProducer.h | 2 +- .../interface/L1GtRsObjectKeysOnlineProd.h | 4 +- .../interface/L1GtStableParametersTester.h | 4 +- .../L1GtStableParametersTrivialProducer.h | 2 +- .../L1GtTriggerMaskAlgoTrigConfigOnlineProd.h | 4 +- .../L1GtTriggerMaskAlgoTrigTrivialProducer.h | 2 +- .../L1GtTriggerMaskTechTrigConfigOnlineProd.h | 4 +- .../L1GtTriggerMaskTechTrigTrivialProducer.h | 2 +- ...GtTriggerMaskVetoAlgoTrigTrivialProducer.h | 2 +- ...tTriggerMaskVetoTechTrigConfigOnlineProd.h | 4 +- ...GtTriggerMaskVetoTechTrigTrivialProducer.h | 2 +- .../L1GtTriggerMenuConfigOnlineProd.h | 4 +- .../interface/L1GtTriggerMenuTester.h | 16 +- .../interface/L1GtTriggerMenuXmlParser.h | 4 +- .../interface/L1GtTriggerMenuXmlProducer.h | 2 +- .../interface/L1GtTscObjectKeysOnlineProd.h | 4 +- .../interface/L1GtVhdlWriter.h | 4 +- .../interface/L1GtVhdlWriterCore.h | 2 +- .../interface/L1GtVmeWriterCore.h | 2 +- .../src/L1GtTriggerMenuTester.cc | 4 +- .../src/L1GtTriggerMenuXmlParser.cc | 162 +++--- .../src/L1GtVhdlWriterCore.cc | 4 +- .../interface/L1CaloInputScaleTester.h | 8 +- .../interface/L1CaloInputScalesGenerator.h | 8 +- .../interface/L1CaloInputScalesProducer.h | 2 +- .../interface/L1MuGMTScalesProducer.h | 2 +- .../interface/L1MuScalesTester.h | 4 +- .../L1MuTriggerPtScaleOnlineProducer.h | 4 +- .../interface/L1MuTriggerPtScaleProducer.h | 2 +- .../L1MuTriggerScalesOnlineProducer.h | 6 +- .../interface/L1MuTriggerScalesProducer.h | 2 +- .../interface/L1ScalesTester.h | 4 +- .../interface/L1ScalesTrivialProducer.h | 2 +- .../src/L1CaloEcalScaleConfigOnlineProd.cc | 6 +- .../src/L1CaloHcalScaleConfigOnlineProd.cc | 6 +- .../src/L1EmEtScaleOnlineProd.cc | 4 +- .../src/L1HfRingEtScaleOnlineProd.cc | 4 +- .../src/L1HtMissScaleOnlineProd.cc | 4 +- .../src/L1JetEtScaleOnlineProd.cc | 4 +- .../src/L1MuTriggerScaleKeysOnlineProd.cc | 4 +- .../src/L1TCaloParamsObjectKeysOnlineProd.cc | 4 +- ...lobalPrescalesVetosObjectKeysOnlineProd.cc | 4 +- .../src/L1TMuonBarrelObjectKeysOnlineProd.cc | 4 +- .../src/L1TMuonGlobalObjectKeysOnlineProd.cc | 4 +- .../src/L1TMuonGlobalParamsOnlineProd.cc | 4 +- .../src/L1TMuonOverlapObjectKeysOnlineProd.cc | 4 +- .../src/L1TMuonOverlapParamsOnlineProd.cc | 4 +- .../src/L1TMuonOverlapParamsOnlineProxy.cc | 2 +- .../L1TUtmTriggerMenuObjectKeysOnlineProd.cc | 4 +- .../src/L1TUtmTriggerMenuOnlineProd.cc | 4 +- .../src/OnlineDBqueryHelper.cc | 2 +- .../src/L1RCTChannelMaskOnlineProd.cc | 4 +- .../src/L1RCTChannelMaskTester.cc | 6 +- .../src/L1RCTOmdsFedVectorProducer.cc | 2 +- .../src/L1RCTParametersOnlineProd.cc | 4 +- .../src/L1RCTParametersTester.cc | 4 +- .../src/L1RCT_RSKeysOnlineProd.cc | 6 +- .../src/RCTConfigProducers.cc | 2 +- .../src/RCTObjectKeysOnlineProd.cc | 4 +- .../src/L1RPCBxOrConfigOnlineProd.cc | 4 +- .../src/L1RPCConeDefinitionOnlineProd.cc | 4 +- .../src/L1RPCConeDefinitionProducer.cc | 2 +- .../src/L1RPCHsbConfigOnlineProd.cc | 4 +- .../src/RPCConfigOnlineProd.cc | 4 +- .../src/RPCObjectKeysOnlineProd.cc | 4 +- .../src/RPCTriggerBxOrConfig.cc | 2 +- .../RPCTriggerConfig/src/RPCTriggerConfig.cc | 2 +- .../src/RPCTriggerHsbConfig.cc | 2 +- .../src/RPCTriggerHwConfig.cc | 2 +- .../Utilities/src/L1KeyListWriter.cc | 4 +- L1TriggerConfig/Utilities/src/L1KeyWriter.cc | 4 +- L1TriggerConfig/Utilities/src/L1MenuReader.cc | 4 +- L1TriggerConfig/Utilities/src/L1MenuWriter.cc | 4 +- .../Utilities/src/L1TCaloParamsUpdater.cc | 4 +- .../Utilities/src/L1TCaloParamsViewer.cc | 18 +- .../Utilities/src/L1TCaloParamsWriter.cc | 4 +- .../src/L1TGlobalPrescalesVetosViewer.cc | 14 +- .../src/L1TGlobalPrescalesVetosWriter.cc | 4 +- .../src/L1TMuonBarrelParamsWriter.cc | 4 +- .../src/L1TMuonGlobalParamsViewer.cc | 6 +- .../src/L1TMuonGlobalParamsWriter.cc | 4 +- .../Utilities/src/L1TMuonOverlapReader.cc | 20 +- .../Utilities/src/L1TMuonOverlapWriter.cc | 4 +- .../Utilities/src/L1TriggerKeyExtReader.cc | 4 +- .../src/L1TriggerKeyListExtReader.cc | 4 +- .../CSCCondDB/interface/CSCAFEBAnalyzer.h | 4 +- .../interface/CSCAFEBConnectAnalysis.h | 2 +- .../CSCCondDB/interface/CSCAFEBThrAnalysis.h | 2 +- .../interface/CSCChamberIndexValues.h | 4 +- .../CSCCondDB/interface/CSCChamberMapValues.h | 4 +- .../CSCChamberTimeCorrectionsReadTest.h | 8 +- .../CSCChamberTimeCorrectionsValues.h | 4 +- .../CSCCondDB/interface/CSCCrateMapValues.h | 4 +- .../CSCCondDB/interface/CSCDDUMapValues.h | 4 +- OnlineDB/CSCCondDB/interface/CSCMap1Read.h | 8 +- OnlineDB/CSCCondDB/interface/CSCOnlineDB.h | 6 +- .../CSCCondDB/interface/CSCThrTurnOnFcn.h | 4 +- .../CSCCondDB/src/CSCAFEBConnectAnalysis.cc | 6 +- OnlineDB/CSCCondDB/src/CSCAFEBThrAnalysis.cc | 6 +- .../interface/CaliCrystalIntercalDat.h | 6 +- .../EcalCondDB/interface/CaliGainRatioDat.h | 6 +- .../EcalCondDB/interface/CaliGeneralDat.h | 6 +- .../EcalCondDB/interface/CaliHVScanRatioDat.h | 6 +- OnlineDB/EcalCondDB/interface/CaliIOV.h | 6 +- OnlineDB/EcalCondDB/interface/CaliTag.h | 6 +- OnlineDB/EcalCondDB/interface/CaliTempDat.h | 6 +- OnlineDB/EcalCondDB/interface/DCSPTMTemp.h | 2 +- .../EcalCondDB/interface/DCSPTMTempList.h | 2 +- OnlineDB/EcalCondDB/interface/DCUCCSDat.h | 6 +- .../EcalCondDB/interface/DCUCapsuleTempDat.h | 6 +- .../interface/DCUCapsuleTempRawDat.h | 6 +- OnlineDB/EcalCondDB/interface/DCUIDarkDat.h | 6 +- .../EcalCondDB/interface/DCUIDarkPedDat.h | 6 +- OnlineDB/EcalCondDB/interface/DCUIOV.h | 6 +- .../EcalCondDB/interface/DCULVRBTempsDat.h | 6 +- .../EcalCondDB/interface/DCULVRTempsDat.h | 6 +- .../EcalCondDB/interface/DCULVRVoltagesDat.h | 6 +- OnlineDB/EcalCondDB/interface/DCUTag.h | 6 +- OnlineDB/EcalCondDB/interface/DCUVFETempDat.h | 6 +- OnlineDB/EcalCondDB/interface/DateHandler.h | 2 +- .../interface/EcalCondDBInterface.h | 16 +- .../interface/FEConfigBadStripDat.h | 6 +- .../interface/FEConfigBadStripInfo.h | 6 +- .../EcalCondDB/interface/FEConfigBadTTDat.h | 6 +- .../EcalCondDB/interface/FEConfigBadTTInfo.h | 6 +- .../EcalCondDB/interface/FEConfigBadXTDat.h | 6 +- .../EcalCondDB/interface/FEConfigBadXTInfo.h | 6 +- .../EcalCondDB/interface/FEConfigFgrDat.h | 6 +- .../interface/FEConfigFgrEEStripDat.h | 6 +- .../interface/FEConfigFgrEETowerDat.h | 6 +- .../interface/FEConfigFgrGroupDat.h | 6 +- .../EcalCondDB/interface/FEConfigFgrInfo.h | 6 +- .../interface/FEConfigFgrParamDat.h | 6 +- .../EcalCondDB/interface/FEConfigLUTDat.h | 6 +- .../interface/FEConfigLUTGroupDat.h | 6 +- .../EcalCondDB/interface/FEConfigLUTInfo.h | 6 +- .../interface/FEConfigLUTParamDat.h | 6 +- .../EcalCondDB/interface/FEConfigLinDat.h | 6 +- .../EcalCondDB/interface/FEConfigLinInfo.h | 6 +- .../interface/FEConfigLinParamDat.h | 6 +- .../EcalCondDB/interface/FEConfigMainInfo.h | 6 +- .../EcalCondDB/interface/FEConfigParamDat.h | 6 +- .../EcalCondDB/interface/FEConfigPedDat.h | 6 +- .../EcalCondDB/interface/FEConfigPedInfo.h | 6 +- .../EcalCondDB/interface/FEConfigSlidingDat.h | 6 +- .../interface/FEConfigSlidingInfo.h | 6 +- .../EcalCondDB/interface/FEConfigSpikeDat.h | 6 +- .../EcalCondDB/interface/FEConfigSpikeInfo.h | 6 +- .../EcalCondDB/interface/FEConfigTimingDat.h | 6 +- .../EcalCondDB/interface/FEConfigTimingInfo.h | 6 +- .../EcalCondDB/interface/FEConfigWeightDat.h | 6 +- .../interface/FEConfigWeightGroupDat.h | 6 +- .../EcalCondDB/interface/FEConfigWeightInfo.h | 6 +- OnlineDB/EcalCondDB/interface/IDBObject.h | 2 +- OnlineDB/EcalCondDB/interface/IDataItem.h | 10 +- OnlineDB/EcalCondDB/interface/IODConfig.h | 8 +- OnlineDB/EcalCondDB/interface/ITimingDat.h | 16 +- OnlineDB/EcalCondDB/interface/LMFClsDat.h | 14 +- OnlineDB/EcalCondDB/interface/LMFColor.h | 14 +- .../EcalCondDB/interface/LMFColoredTable.h | 6 +- .../interface/LMFCorrCoefDatComponent.h | 10 +- OnlineDB/EcalCondDB/interface/LMFCorrVers.h | 12 +- OnlineDB/EcalCondDB/interface/LMFDat.h | 10 +- OnlineDB/EcalCondDB/interface/LMFDefFabric.h | 2 +- OnlineDB/EcalCondDB/interface/LMFIOV.h | 16 +- .../EcalCondDB/interface/LMFLaserConfigDat.h | 2 +- .../EcalCondDB/interface/LMFLaserPulseDat.h | 8 +- OnlineDB/EcalCondDB/interface/LMFLmrSubIOV.h | 10 +- OnlineDB/EcalCondDB/interface/LMFPnPrimDat.h | 10 +- OnlineDB/EcalCondDB/interface/LMFPrimDat.h | 8 +- OnlineDB/EcalCondDB/interface/LMFPrimVers.h | 12 +- OnlineDB/EcalCondDB/interface/LMFRunDat.h | 4 +- OnlineDB/EcalCondDB/interface/LMFRunIOV.h | 14 +- OnlineDB/EcalCondDB/interface/LMFRunTag.h | 14 +- OnlineDB/EcalCondDB/interface/LMFSeqDat.h | 14 +- OnlineDB/EcalCondDB/interface/LMFSeqVers.h | 12 +- .../interface/LMFTestPulseConfigDat.h | 2 +- OnlineDB/EcalCondDB/interface/LMFTrigType.h | 12 +- OnlineDB/EcalCondDB/interface/LMFUnique.h | 10 +- OnlineDB/EcalCondDB/interface/LocationDef.h | 6 +- OnlineDB/EcalCondDB/interface/MODCCSFEDat.h | 6 +- OnlineDB/EcalCondDB/interface/MODCCSHFDat.h | 8 +- OnlineDB/EcalCondDB/interface/MODCCSTRDat.h | 6 +- .../EcalCondDB/interface/MODDCCDetailsDat.h | 6 +- .../EcalCondDB/interface/MODDCCOperationDat.h | 6 +- OnlineDB/EcalCondDB/interface/MODRunIOV.h | 6 +- .../interface/MonCrystalConsistencyDat.h | 6 +- .../EcalCondDB/interface/MonDelaysTTDat.h | 6 +- .../interface/MonH4TablePositionDat.h | 6 +- .../EcalCondDB/interface/MonLaserBlueDat.h | 6 +- .../EcalCondDB/interface/MonLaserGreenDat.h | 6 +- .../EcalCondDB/interface/MonLaserIRedDat.h | 6 +- .../EcalCondDB/interface/MonLaserPulseDat.h | 6 +- .../EcalCondDB/interface/MonLaserRedDat.h | 6 +- .../EcalCondDB/interface/MonLaserStatusDat.h | 6 +- OnlineDB/EcalCondDB/interface/MonLed1Dat.h | 6 +- OnlineDB/EcalCondDB/interface/MonLed2Dat.h | 6 +- .../interface/MonMemChConsistencyDat.h | 6 +- .../interface/MonMemTTConsistencyDat.h | 6 +- .../EcalCondDB/interface/MonOccupancyDat.h | 6 +- OnlineDB/EcalCondDB/interface/MonPNBlueDat.h | 6 +- OnlineDB/EcalCondDB/interface/MonPNGreenDat.h | 6 +- OnlineDB/EcalCondDB/interface/MonPNIRedDat.h | 6 +- OnlineDB/EcalCondDB/interface/MonPNLed1Dat.h | 6 +- OnlineDB/EcalCondDB/interface/MonPNLed2Dat.h | 6 +- OnlineDB/EcalCondDB/interface/MonPNMGPADat.h | 6 +- OnlineDB/EcalCondDB/interface/MonPNPedDat.h | 6 +- OnlineDB/EcalCondDB/interface/MonPNRedDat.h | 6 +- .../interface/MonPedestalOffsetsDat.h | 6 +- .../EcalCondDB/interface/MonPedestalsDat.h | 6 +- .../interface/MonPedestalsOnlineDat.h | 6 +- .../EcalCondDB/interface/MonPulseShapeDat.h | 6 +- OnlineDB/EcalCondDB/interface/MonRunDat.h | 6 +- OnlineDB/EcalCondDB/interface/MonRunIOV.h | 6 +- OnlineDB/EcalCondDB/interface/MonRunList.h | 2 +- .../EcalCondDB/interface/MonRunOutcomeDef.h | 6 +- OnlineDB/EcalCondDB/interface/MonRunTag.h | 6 +- .../EcalCondDB/interface/MonShapeQualityDat.h | 6 +- .../interface/MonTTConsistencyDat.h | 6 +- .../EcalCondDB/interface/MonTestPulseDat.h | 6 +- .../interface/MonTimingCrystalDat.h | 2 +- .../interface/MonTimingLaserBlueCrystalDat.h | 2 +- .../interface/MonTimingLaserBlueTTDat.h | 2 +- .../interface/MonTimingLaserGreenCrystalDat.h | 2 +- .../interface/MonTimingLaserGreenTTDat.h | 2 +- .../interface/MonTimingLaserIRedCrystalDat.h | 2 +- .../interface/MonTimingLaserIRedTTDat.h | 2 +- .../interface/MonTimingLaserRedCrystalDat.h | 2 +- .../interface/MonTimingLaserRedTTDat.h | 2 +- .../interface/MonTimingLed1CrystalDat.h | 2 +- .../EcalCondDB/interface/MonTimingLed1TTDat.h | 2 +- .../interface/MonTimingLed2CrystalDat.h | 2 +- .../EcalCondDB/interface/MonTimingLed2TTDat.h | 2 +- .../EcalCondDB/interface/MonTimingTTDat.h | 2 +- OnlineDB/EcalCondDB/interface/MonVersionDef.h | 6 +- OnlineDB/EcalCondDB/interface/ODBadTTDat.h | 6 +- OnlineDB/EcalCondDB/interface/ODBadTTInfo.h | 6 +- OnlineDB/EcalCondDB/interface/ODBadXTDat.h | 6 +- OnlineDB/EcalCondDB/interface/ODBadXTInfo.h | 6 +- OnlineDB/EcalCondDB/interface/ODCCSConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODCCSCycle.h | 6 +- .../EcalCondDB/interface/ODCond2ConfInfo.h | 6 +- OnlineDB/EcalCondDB/interface/ODDCCConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODDCCCycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODDCUConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODDCUCycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODDelaysDat.h | 6 +- OnlineDB/EcalCondDB/interface/ODEcalCycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODFEDAQConfig.h | 6 +- .../EcalCondDB/interface/ODFEDelaysInfo.h | 6 +- .../interface/ODFEPedestalOffsetInfo.h | 6 +- .../EcalCondDB/interface/ODFEWeightsInfo.h | 6 +- .../interface/ODGolBiasCurrentDat.h | 6 +- .../interface/ODGolBiasCurrentInfo.h | 6 +- OnlineDB/EcalCondDB/interface/ODJBH4Config.h | 6 +- OnlineDB/EcalCondDB/interface/ODJBH4Cycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODLTCConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODLTCCycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODLTSConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODLTSCycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODLaserConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODLaserCycle.h | 6 +- .../interface/ODPedestalOffsetsDat.h | 6 +- .../interface/ODRunConfigCycleInfo.h | 6 +- .../EcalCondDB/interface/ODRunConfigInfo.h | 6 +- .../EcalCondDB/interface/ODRunConfigSeqInfo.h | 6 +- OnlineDB/EcalCondDB/interface/ODSRPConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODSRPCycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODScanConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODScanCycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODTCCConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODTCCCycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODTCCEEConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODTCCEECycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODTTCFConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODTTCFCycle.h | 6 +- OnlineDB/EcalCondDB/interface/ODTTCciConfig.h | 6 +- OnlineDB/EcalCondDB/interface/ODTTCciCycle.h | 6 +- .../interface/ODTowersToByPassDat.h | 6 +- .../interface/ODTowersToByPassInfo.h | 6 +- .../EcalCondDB/interface/ODVfeToRejectDat.h | 6 +- .../EcalCondDB/interface/ODVfeToRejectInfo.h | 6 +- OnlineDB/EcalCondDB/interface/ODWeightsDat.h | 6 +- .../interface/ODWeightsSamplesDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunCommentDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunConfigDat.h | 6 +- .../interface/RunCrystalErrorsDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunDCSHVDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunDCSLVDat.h | 6 +- .../EcalCondDB/interface/RunDCSMagnetDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunDat.h | 6 +- .../EcalCondDB/interface/RunFEConfigDat.h | 6 +- .../interface/RunH4TablePositionDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunIOV.h | 6 +- .../EcalCondDB/interface/RunLaserRunDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunList.h | 2 +- .../EcalCondDB/interface/RunMemChErrorsDat.h | 6 +- .../EcalCondDB/interface/RunMemTTErrorsDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunModeDef.h | 6 +- .../EcalCondDB/interface/RunPNErrorsDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunPTMTempDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunSeqDef.h | 6 +- .../EcalCondDB/interface/RunTPGConfigDat.h | 6 +- .../EcalCondDB/interface/RunTTErrorsDat.h | 6 +- OnlineDB/EcalCondDB/interface/RunTag.h | 6 +- OnlineDB/EcalCondDB/interface/RunTypeDef.h | 6 +- OnlineDB/EcalCondDB/interface/Tm.h | 6 +- .../EcalCondDB/src/CaliCrystalIntercalDat.cc | 6 +- OnlineDB/EcalCondDB/src/CaliGainRatioDat.cc | 6 +- OnlineDB/EcalCondDB/src/CaliGeneralDat.cc | 6 +- OnlineDB/EcalCondDB/src/CaliHVScanRatioDat.cc | 6 +- OnlineDB/EcalCondDB/src/CaliIOV.cc | 2 +- OnlineDB/EcalCondDB/src/CaliTag.cc | 4 +- OnlineDB/EcalCondDB/src/CaliTempDat.cc | 6 +- OnlineDB/EcalCondDB/src/DCSPTMTemp.cc | 2 +- OnlineDB/EcalCondDB/src/DCSPTMTempList.cc | 2 +- OnlineDB/EcalCondDB/src/DCUCCSDat.cc | 8 +- OnlineDB/EcalCondDB/src/DCUCapsuleTempDat.cc | 8 +- .../EcalCondDB/src/DCUCapsuleTempRawDat.cc | 8 +- OnlineDB/EcalCondDB/src/DCUIDarkDat.cc | 8 +- OnlineDB/EcalCondDB/src/DCUIDarkPedDat.cc | 8 +- OnlineDB/EcalCondDB/src/DCUIOV.cc | 2 +- OnlineDB/EcalCondDB/src/DCULVRBTempsDat.cc | 8 +- OnlineDB/EcalCondDB/src/DCULVRTempsDat.cc | 8 +- OnlineDB/EcalCondDB/src/DCULVRVoltagesDat.cc | 8 +- OnlineDB/EcalCondDB/src/DCUTag.cc | 4 +- OnlineDB/EcalCondDB/src/DCUVFETempDat.cc | 8 +- OnlineDB/EcalCondDB/src/EcalCommon.cc | 2 +- .../EcalCondDB/src/EcalCondDBInterface.cc | 6 +- OnlineDB/EcalCondDB/src/EcalDBConnection.cc | 2 +- OnlineDB/EcalCondDB/src/EcalLogicID.cc | 2 +- .../EcalCondDB/src/FEConfigBadStripDat.cc | 8 +- .../EcalCondDB/src/FEConfigBadStripInfo.cc | 10 +- OnlineDB/EcalCondDB/src/FEConfigBadTTDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigBadTTInfo.cc | 10 +- OnlineDB/EcalCondDB/src/FEConfigBadXTDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigBadXTInfo.cc | 10 +- OnlineDB/EcalCondDB/src/FEConfigFgrDat.cc | 8 +- .../EcalCondDB/src/FEConfigFgrEEStripDat.cc | 8 +- .../EcalCondDB/src/FEConfigFgrEETowerDat.cc | 8 +- .../EcalCondDB/src/FEConfigFgrGroupDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigFgrInfo.cc | 10 +- .../EcalCondDB/src/FEConfigFgrParamDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigLUTDat.cc | 8 +- .../EcalCondDB/src/FEConfigLUTGroupDat.cc | 10 +- OnlineDB/EcalCondDB/src/FEConfigLUTInfo.cc | 10 +- .../EcalCondDB/src/FEConfigLUTParamDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigLinDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigLinInfo.cc | 10 +- .../EcalCondDB/src/FEConfigLinParamDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigMainInfo.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigParamDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigPedDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigPedInfo.cc | 10 +- OnlineDB/EcalCondDB/src/FEConfigSlidingDat.cc | 8 +- .../EcalCondDB/src/FEConfigSlidingInfo.cc | 10 +- OnlineDB/EcalCondDB/src/FEConfigSpikeDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigSpikeInfo.cc | 10 +- OnlineDB/EcalCondDB/src/FEConfigTimingDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigTimingInfo.cc | 10 +- OnlineDB/EcalCondDB/src/FEConfigWeightDat.cc | 8 +- .../EcalCondDB/src/FEConfigWeightGroupDat.cc | 8 +- OnlineDB/EcalCondDB/src/FEConfigWeightInfo.cc | 10 +- OnlineDB/EcalCondDB/src/LMFCorrCoefDat.cc | 12 +- .../EcalCondDB/src/LMFCorrCoefDatComponent.cc | 2 +- OnlineDB/EcalCondDB/src/LMFDat.cc | 14 +- OnlineDB/EcalCondDB/src/LMFDefFabric.cc | 2 +- OnlineDB/EcalCondDB/src/LMFIOV.cc | 4 +- OnlineDB/EcalCondDB/src/LMFLmrSubIOV.cc | 2 +- OnlineDB/EcalCondDB/src/LMFRunIOV.cc | 8 +- OnlineDB/EcalCondDB/src/LMFSeqDat.cc | 4 +- OnlineDB/EcalCondDB/src/LMFUnique.cc | 4 +- OnlineDB/EcalCondDB/src/LocationDef.cc | 4 +- OnlineDB/EcalCondDB/src/MODCCSFEDat.cc | 8 +- OnlineDB/EcalCondDB/src/MODCCSHFDat.cc | 10 +- OnlineDB/EcalCondDB/src/MODCCSTRDat.cc | 8 +- OnlineDB/EcalCondDB/src/MODDCCDetailsDat.cc | 8 +- OnlineDB/EcalCondDB/src/MODDCCOperationDat.cc | 8 +- OnlineDB/EcalCondDB/src/MODRunIOV.cc | 2 +- .../src/MonCrystalConsistencyDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonDelaysTTDat.cc | 10 +- .../EcalCondDB/src/MonH4TablePositionDat.cc | 8 +- OnlineDB/EcalCondDB/src/MonLaserBlueDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonLaserGreenDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonLaserIRedDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonLaserPulseDat.cc | 8 +- OnlineDB/EcalCondDB/src/MonLaserRedDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonLaserStatusDat.cc | 8 +- OnlineDB/EcalCondDB/src/MonLed1Dat.cc | 10 +- OnlineDB/EcalCondDB/src/MonLed2Dat.cc | 10 +- .../EcalCondDB/src/MonMemChConsistencyDat.cc | 10 +- .../EcalCondDB/src/MonMemTTConsistencyDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonOccupancyDat.cc | 8 +- OnlineDB/EcalCondDB/src/MonPNBlueDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonPNGreenDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonPNIRedDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonPNLed1Dat.cc | 10 +- OnlineDB/EcalCondDB/src/MonPNLed2Dat.cc | 10 +- OnlineDB/EcalCondDB/src/MonPNMGPADat.cc | 10 +- OnlineDB/EcalCondDB/src/MonPNPedDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonPNRedDat.cc | 10 +- .../EcalCondDB/src/MonPedestalOffsetsDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonPedestalsDat.cc | 10 +- .../EcalCondDB/src/MonPedestalsOnlineDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonPulseShapeDat.cc | 8 +- OnlineDB/EcalCondDB/src/MonRunDat.cc | 8 +- OnlineDB/EcalCondDB/src/MonRunIOV.cc | 2 +- OnlineDB/EcalCondDB/src/MonRunList.cc | 2 +- OnlineDB/EcalCondDB/src/MonRunOutcomeDef.cc | 4 +- OnlineDB/EcalCondDB/src/MonRunTag.cc | 4 +- OnlineDB/EcalCondDB/src/MonShapeQualityDat.cc | 8 +- .../EcalCondDB/src/MonTTConsistencyDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonTestPulseDat.cc | 10 +- OnlineDB/EcalCondDB/src/MonVersionDef.cc | 4 +- OnlineDB/EcalCondDB/src/ODBadTTDat.cc | 8 +- OnlineDB/EcalCondDB/src/ODBadTTInfo.cc | 10 +- OnlineDB/EcalCondDB/src/ODBadXTDat.cc | 8 +- OnlineDB/EcalCondDB/src/ODBadXTInfo.cc | 10 +- OnlineDB/EcalCondDB/src/ODCCSConfig.cc | 10 +- OnlineDB/EcalCondDB/src/ODCCSCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODCond2ConfInfo.cc | 10 +- OnlineDB/EcalCondDB/src/ODDCCConfig.cc | 12 +- OnlineDB/EcalCondDB/src/ODDCCCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODDCUConfig.cc | 8 +- OnlineDB/EcalCondDB/src/ODDCUCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODDelaysDat.cc | 8 +- OnlineDB/EcalCondDB/src/ODEcalCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODFEDAQConfig.cc | 10 +- OnlineDB/EcalCondDB/src/ODFEDelaysInfo.cc | 10 +- .../EcalCondDB/src/ODFEPedestalOffsetInfo.cc | 10 +- OnlineDB/EcalCondDB/src/ODFEWeightsInfo.cc | 10 +- .../EcalCondDB/src/ODGolBiasCurrentDat.cc | 8 +- .../EcalCondDB/src/ODGolBiasCurrentInfo.cc | 10 +- OnlineDB/EcalCondDB/src/ODJBH4Config.cc | 8 +- OnlineDB/EcalCondDB/src/ODJBH4Cycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODLTCConfig.cc | 10 +- OnlineDB/EcalCondDB/src/ODLTCCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODLTSConfig.cc | 8 +- OnlineDB/EcalCondDB/src/ODLTSCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODLaserConfig.cc | 14 +- OnlineDB/EcalCondDB/src/ODLaserCycle.cc | 8 +- .../EcalCondDB/src/ODPedestalOffsetsDat.cc | 8 +- .../EcalCondDB/src/ODRunConfigCycleInfo.cc | 8 +- OnlineDB/EcalCondDB/src/ODRunConfigInfo.cc | 4 +- OnlineDB/EcalCondDB/src/ODRunConfigSeqInfo.cc | 8 +- OnlineDB/EcalCondDB/src/ODSRPConfig.cc | 8 +- OnlineDB/EcalCondDB/src/ODSRPCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODScanConfig.cc | 10 +- OnlineDB/EcalCondDB/src/ODScanCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODTCCConfig.cc | 8 +- OnlineDB/EcalCondDB/src/ODTCCCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODTCCEEConfig.cc | 8 +- OnlineDB/EcalCondDB/src/ODTCCEECycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODTTCFConfig.cc | 8 +- OnlineDB/EcalCondDB/src/ODTTCFCycle.cc | 8 +- OnlineDB/EcalCondDB/src/ODTTCciConfig.cc | 10 +- OnlineDB/EcalCondDB/src/ODTTCciCycle.cc | 8 +- .../EcalCondDB/src/ODTowersToByPassDat.cc | 8 +- .../EcalCondDB/src/ODTowersToByPassInfo.cc | 10 +- OnlineDB/EcalCondDB/src/ODVfeToRejectDat.cc | 8 +- OnlineDB/EcalCondDB/src/ODVfeToRejectInfo.cc | 10 +- OnlineDB/EcalCondDB/src/ODWeightsDat.cc | 8 +- .../EcalCondDB/src/ODWeightsSamplesDat.cc | 8 +- OnlineDB/EcalCondDB/src/RunCommentDat.cc | 6 +- OnlineDB/EcalCondDB/src/RunConfigDat.cc | 8 +- .../EcalCondDB/src/RunCrystalErrorsDat.cc | 8 +- OnlineDB/EcalCondDB/src/RunDCSHVDat.cc | 22 +- OnlineDB/EcalCondDB/src/RunDCSLVDat.cc | 14 +- OnlineDB/EcalCondDB/src/RunDCSMagnetDat.cc | 12 +- OnlineDB/EcalCondDB/src/RunDat.cc | 6 +- OnlineDB/EcalCondDB/src/RunFEConfigDat.cc | 8 +- .../EcalCondDB/src/RunH4TablePositionDat.cc | 8 +- OnlineDB/EcalCondDB/src/RunIOV.cc | 2 +- OnlineDB/EcalCondDB/src/RunLaserRunDat.cc | 6 +- OnlineDB/EcalCondDB/src/RunList.cc | 2 +- OnlineDB/EcalCondDB/src/RunMemChErrorsDat.cc | 10 +- OnlineDB/EcalCondDB/src/RunMemTTErrorsDat.cc | 10 +- OnlineDB/EcalCondDB/src/RunModeDef.cc | 4 +- OnlineDB/EcalCondDB/src/RunPNErrorsDat.cc | 10 +- OnlineDB/EcalCondDB/src/RunPTMTempDat.cc | 8 +- OnlineDB/EcalCondDB/src/RunSeqDef.cc | 4 +- OnlineDB/EcalCondDB/src/RunTPGConfigDat.cc | 8 +- OnlineDB/EcalCondDB/src/RunTTErrorsDat.cc | 10 +- OnlineDB/EcalCondDB/src/RunTag.cc | 4 +- OnlineDB/EcalCondDB/src/RunTypeDef.cc | 4 +- OnlineDB/EcalCondDB/src/Tm.cc | 8 +- .../SiStripConfigDb/src/SiStripConfigDb.cc | 16 +- .../SiStripConfigDb/src/SiStripPartition.cc | 2 +- .../SiStripFedCablingBuilderFromDb.h | 8 +- .../interface/SiStripGainBuilderFromDb.h | 4 +- .../interface/SiStripNoiseBuilderFromDb.h | 4 +- .../interface/SiStripPedestalsBuilderFromDb.h | 4 +- .../src/SiStripFedCablingBuilderFromDb.cc | 2 +- .../plugins/SiStripPayloadHandler.cc | 6 +- .../plugins/SiStripPayloadMapTableCreator.cc | 6 +- .../plugins/SiStripPopConConfigDbObjHandler.h | 10 +- .../SiStripPopConHandlerUnitTestGain.h | 14 +- .../SiStripPopConHandlerUnitTestNoise.h | 14 +- .../Callgrind/plugins/CallgrindAnalyzer.cc | 8 +- .../Callgrind/plugins/ProfilerAnalyzer.cc | 16 +- PerfTools/EdmEvent/src/EdmEventSize.cc | 16 +- .../plugins/EventShapeVarsProducer.h | 8 +- .../CandUtils/interface/CandMatcherNew.h | 8 +- .../CondLiteIO/interface/RecordWriter.h | 4 +- .../plugins/FWLiteESRecordWriterAnalyzer.cc | 28 +- .../CondLiteIO/plugins/FWLiteESSource.cc | 28 +- PhysicsTools/CondLiteIO/src/RecordWriter.cc | 6 +- PhysicsTools/FWLite/bin/FWLiteHistograms.cc | 2 +- .../FWLite/bin/FWLiteWithPythonConfig.cc | 2 +- .../FWLite/bin/FWLiteWithSelectorUtils.cc | 2 +- .../FWLite/interface/EventContainer.h | 24 +- PhysicsTools/FWLite/interface/TFileService.h | 2 +- PhysicsTools/FWLite/interface/WSelector.h | 8 +- PhysicsTools/FWLite/src/CommandLineParser.cc | 14 +- PhysicsTools/FWLite/src/EventContainer.cc | 4 +- PhysicsTools/FWLite/src/ScannerHelpers.cc | 22 +- PhysicsTools/FWLite/src/TH1Store.cc | 8 +- .../interface/FlavorHistoryFilter.h | 6 +- .../interface/FlavorHistoryProducer.h | 2 +- .../HepMCCandAlgos/interface/HFFilter.h | 6 +- .../HepMCCandAlgos/interface/MCTruthHelper.h | 30 +- .../interface/MCTruthPairSelector.h | 2 +- .../HepMCCandAlgos/interface/ModelFilter.h | 8 +- .../plugins/FlavorHistoryProducer.cc | 2 +- .../plugins/GenParticleProducer.cc | 22 +- .../plugins/GenParticlePruner.cc | 8 +- .../plugins/GenPlusSimParticleProducer.cc | 10 +- .../plugins/MCTruthCompositeMatcherNew.cc | 2 +- .../HepMCCandAlgos/plugins/ModelFilter.cc | 2 +- .../plugins/ParticleDecayDrawer.cc | 8 +- .../plugins/ParticleListDrawer.cc | 2 +- .../plugins/ParticleTreeDrawer.cc | 6 +- PhysicsTools/Heppy/interface/Davismt2.h | 2 +- PhysicsTools/Heppy/src/Apc.cc | 6 +- .../Heppy/src/EGammaMvaEleEstimatorFWLite.cc | 8 +- PhysicsTools/Heppy/src/JetUtils.cc | 2 +- PhysicsTools/Heppy/src/Megajet.cc | 2 +- PhysicsTools/Heppy/src/TriggerBitChecker.cc | 4 +- PhysicsTools/Heppy/src/mt2w_bisect.cc | 2 +- .../interface/EventDependentAbsVeto.h | 2 +- .../interface/EventDependentAbsVetos.h | 26 +- .../interface/IsolationProducer.h | 4 +- .../interface/IsolationProducerNew.h | 6 +- .../plugins/CITKPFIsolationSumProducer.cc | 6 +- .../CITKPFIsolationSumProducerForPUPPI.cc | 10 +- .../plugins/CandIsoDepositProducer.cc | 8 +- .../plugins/CandIsoDepositProducer.h | 4 +- .../plugins/CandIsolatorFromDeposits.cc | 4 +- .../plugins/CandIsolatorFromDeposits.h | 4 +- .../plugins/CandViewExtractor.h | 16 +- .../IsolationAlgos/plugins/PFTauExtractor.cc | 6 +- .../IsolationAlgos/plugins/PFTauExtractor.h | 8 +- .../src/IsoDepositVetoFactory.cc | 18 +- .../interface/ConeAreaFunction.h | 8 +- .../interface/ConeAreaRootFunction.h | 2 +- .../interface/IntegralOverPhiFunction.h | 8 +- .../interface/IntegrandThetaFunction.h | 8 +- .../JetCharge/plugins/JetChargeProducer.h | 2 +- .../interface/Herwig6PartonSelector.h | 4 +- .../interface/HerwigppPartonSelector.h | 4 +- .../interface/Pythia6PartonSelector.h | 4 +- .../interface/Pythia8PartonSelector.h | 4 +- .../interface/SherpaPartonSelector.h | 4 +- .../plugins/CandOneToManyDeltaRMatcher.cc | 4 +- .../plugins/CandOneToOneDeltaRMatcher.cc | 2 +- .../JetMCAlgos/plugins/GenHFHadronMatcher.cc | 14 +- .../JetMCAlgos/plugins/GenJetBCEnergyRatio.cc | 6 +- .../plugins/HadronAndPartonSelector.cc | 4 +- .../plugins/JetFlavourClustering.cc | 14 +- .../plugins/JetFlavourIdentifier.cc | 20 +- .../JetMCAlgos/plugins/PartonSelector.cc | 4 +- .../JetMCAlgos/plugins/TauGenJetProducer.cc | 2 +- .../JetMCAlgos/plugins/TauGenJetProducer.h | 4 +- .../KinFitter/interface/TAbsFitConstraint.h | 4 +- .../KinFitter/interface/TAbsFitParticle.h | 2 +- .../KinFitter/interface/TFitConstraintEp.h | 18 +- .../KinFitter/interface/TFitConstraintM.h | 24 +- .../KinFitter/interface/TFitConstraintMGaus.h | 12 +- .../KinFitter/interface/TFitParticleCart.h | 12 +- .../KinFitter/interface/TFitParticleECart.h | 12 +- .../KinFitter/interface/TFitParticleEMomDev.h | 12 +- .../interface/TFitParticleEScaledMomDev.h | 12 +- .../KinFitter/interface/TFitParticleESpher.h | 12 +- .../interface/TFitParticleEtEtaPhi.h | 12 +- .../interface/TFitParticleEtThetaPhi.h | 12 +- .../KinFitter/interface/TFitParticleMCCart.h | 12 +- .../interface/TFitParticleMCMomDev.h | 12 +- .../interface/TFitParticleMCPInvSpher.h | 12 +- .../KinFitter/interface/TFitParticleMCSpher.h | 12 +- .../KinFitter/interface/TFitParticleMomDev.h | 12 +- .../KinFitter/interface/TFitParticleSpher.h | 12 +- PhysicsTools/KinFitter/interface/TKinFitter.h | 14 +- PhysicsTools/KinFitter/interface/TSLToyGen.h | 2 +- .../KinFitter/src/TAbsFitConstraint.cc | 8 +- PhysicsTools/KinFitter/src/TAbsFitParticle.cc | 8 +- PhysicsTools/KinFitter/src/TFitConstraintM.cc | 2 +- .../KinFitter/src/TFitConstraintMGaus.cc | 2 +- .../KinFitter/src/TFitParticleCart.cc | 10 +- .../KinFitter/src/TFitParticleECart.cc | 10 +- .../KinFitter/src/TFitParticleEMomDev.cc | 10 +- .../src/TFitParticleEScaledMomDev.cc | 10 +- .../KinFitter/src/TFitParticleESpher.cc | 10 +- .../KinFitter/src/TFitParticleEtEtaPhi.cc | 10 +- .../KinFitter/src/TFitParticleEtThetaPhi.cc | 10 +- .../KinFitter/src/TFitParticleMCCart.cc | 10 +- .../KinFitter/src/TFitParticleMCMomDev.cc | 10 +- .../KinFitter/src/TFitParticleMCPInvSpher.cc | 10 +- .../KinFitter/src/TFitParticleMCSpher.cc | 10 +- .../KinFitter/src/TFitParticleMomDev.cc | 10 +- .../KinFitter/src/TFitParticleSpher.cc | 10 +- PhysicsTools/KinFitter/src/TKinFitter.cc | 44 +- PhysicsTools/KinFitter/src/TSLToyGen.cc | 4 +- PhysicsTools/MVAComputer/interface/AtomicId.h | 4 +- PhysicsTools/MVAComputer/interface/BitSet.h | 10 +- .../interface/MVAComputerESSourceBase.h | 2 +- .../interface/MVAComputerESSourceImpl.h | 4 +- .../MVAComputer/interface/ProcessRegistry.h | 2 +- .../MVAComputer/interface/TreeReader.h | 6 +- .../MVAComputer/interface/VarProcessor.h | 4 +- .../MVAComputer/interface/memstream.h | 8 +- PhysicsTools/MVAComputer/interface/zstream.h | 14 +- PhysicsTools/MVAComputer/plugins/ProcTMVA.cc | 6 +- PhysicsTools/MVAComputer/src/AtomicId.cc | 2 +- PhysicsTools/MVAComputer/src/MVAComputer.cc | 4 +- PhysicsTools/MVAComputer/src/ProcCategory.cc | 6 +- PhysicsTools/MVAComputer/src/ProcClassed.cc | 6 +- PhysicsTools/MVAComputer/src/ProcCount.cc | 6 +- PhysicsTools/MVAComputer/src/ProcForeach.cc | 16 +- .../MVAComputer/src/ProcLikelihood.cc | 16 +- PhysicsTools/MVAComputer/src/ProcLinear.cc | 8 +- PhysicsTools/MVAComputer/src/ProcMLP.cc | 12 +- PhysicsTools/MVAComputer/src/ProcMatrix.cc | 10 +- PhysicsTools/MVAComputer/src/ProcMultiply.cc | 10 +- PhysicsTools/MVAComputer/src/ProcNormalize.cc | 8 +- PhysicsTools/MVAComputer/src/ProcOptional.cc | 8 +- PhysicsTools/MVAComputer/src/ProcSort.cc | 10 +- PhysicsTools/MVAComputer/src/ProcSplitter.cc | 8 +- PhysicsTools/MVAComputer/src/Spline.cc | 4 +- PhysicsTools/MVAComputer/src/TreeReader.cc | 12 +- PhysicsTools/MVAComputer/src/VarProcessor.cc | 8 +- .../MVATrainer/interface/Interceptor.h | 2 +- .../MVATrainer/interface/MVATrainer.h | 2 +- .../interface/MVATrainerContainer.h | 8 +- .../interface/MVATrainerContainerSave.h | 6 +- .../MVATrainer/interface/MVATrainerFileSave.h | 6 +- .../interface/MVATrainerFileSaveImpl.h | 4 +- .../MVATrainer/interface/MVATrainerLooper.h | 16 +- .../interface/MVATrainerLooperImpl.h | 4 +- .../MVATrainer/interface/MVATrainerSave.h | 6 +- .../MVATrainer/interface/MVATrainerSaveImpl.h | 16 +- .../MVATrainer/interface/TrainProcessor.h | 6 +- .../MVATrainer/interface/TrainerMonitoring.h | 6 +- .../MVATrainer/interface/XMLDocument.h | 4 +- PhysicsTools/MVATrainer/plugins/MLP.cc | 6 +- PhysicsTools/MVATrainer/plugins/ProcMLP.cc | 16 +- PhysicsTools/MVATrainer/plugins/ProcTMVA.cc | 24 +- PhysicsTools/MVATrainer/plugins/mlp_gen.cc | 122 ++-- .../MVATrainer/plugins/mlp_sigmoide.cc | 2 +- PhysicsTools/MVATrainer/src/Interceptor.cc | 8 +- PhysicsTools/MVATrainer/src/MVATrainer.cc | 74 +-- .../MVATrainer/src/MVATrainerContainerSave.cc | 6 +- .../MVATrainer/src/MVATrainerLooper.cc | 2 +- PhysicsTools/MVATrainer/src/MVATrainerSave.cc | 2 +- PhysicsTools/MVATrainer/src/ProcCategory.cc | 6 +- PhysicsTools/MVATrainer/src/ProcClassed.cc | 6 +- PhysicsTools/MVATrainer/src/ProcCount.cc | 6 +- PhysicsTools/MVATrainer/src/ProcForeach.cc | 6 +- PhysicsTools/MVATrainer/src/ProcLikelihood.cc | 22 +- PhysicsTools/MVATrainer/src/ProcLinear.cc | 20 +- PhysicsTools/MVATrainer/src/ProcMatrix.cc | 22 +- PhysicsTools/MVATrainer/src/ProcMultiply.cc | 6 +- PhysicsTools/MVATrainer/src/ProcNormalize.cc | 18 +- PhysicsTools/MVATrainer/src/ProcOptional.cc | 6 +- PhysicsTools/MVATrainer/src/ProcSort.cc | 6 +- PhysicsTools/MVATrainer/src/ProcSplitter.cc | 6 +- .../MVATrainer/src/SourceVariableSet.cc | 4 +- PhysicsTools/MVATrainer/src/TrainProcessor.cc | 6 +- PhysicsTools/MVATrainer/src/TreeSaver.cc | 16 +- PhysicsTools/MVATrainer/src/XMLDocument.cc | 24 +- .../interface/TSelectorAnalyzer.h | 2 +- .../interface/TrackTSelector.h | 4 +- .../src/TrackAnalysisAlgorithm.cc | 2 +- .../PatAlgos/interface/IsoDepositIsolator.h | 10 +- PhysicsTools/PatAlgos/interface/OverlapTest.h | 8 +- .../PatAlgos/interface/PATUserDataMerger.h | 2 +- .../PatAlgos/interface/SimpleIsolator.h | 10 +- .../interface/StringResolutionProvider.h | 4 +- .../PatAlgos/plugins/CaloJetSlimmer.cc | 4 +- .../PatAlgos/plugins/CandidateSummaryTable.cc | 4 +- .../plugins/DuplicatedElectronCleaner.cc | 4 +- .../PatAlgos/plugins/GenMETExtractor.cc | 2 +- .../PatAlgos/plugins/GenMETExtractor.h | 6 +- .../PatAlgos/plugins/JetCorrFactorsProducer.h | 4 +- .../PatAlgos/plugins/ModifiedObjectProducer.h | 6 +- PhysicsTools/PatAlgos/plugins/PATCleaner.h | 4 +- .../plugins/PATCompositeCandidateProducer.h | 4 +- .../PatAlgos/plugins/PATConversionProducer.h | 4 +- .../PatAlgos/plugins/PATElectronSlimmer.cc | 6 +- .../PATGenCandsFromSimTracksProducer.cc | 14 +- .../plugins/PATGenericParticleProducer.h | 4 +- .../PatAlgos/plugins/PATHeavyIonProducer.cc | 4 +- .../PatAlgos/plugins/PATHemisphereProducer.h | 4 +- .../PatAlgos/plugins/PATJetProducer.h | 4 +- .../PatAlgos/plugins/PATJetSelector.h | 8 +- .../PatAlgos/plugins/PATJetSlimmer.cc | 6 +- .../PatAlgos/plugins/PATJetUpdater.cc | 4 +- PhysicsTools/PatAlgos/plugins/PATJetUpdater.h | 4 +- .../PatAlgos/plugins/PATLeptonCountFilter.h | 4 +- .../PatAlgos/plugins/PATLostTracks.cc | 4 +- .../PatAlgos/plugins/PATMHTProducer.cc | 4 +- .../PatAlgos/plugins/PATMHTProducer.h | 4 +- .../PatAlgos/plugins/PATMuonSlimmer.cc | 6 +- .../PatAlgos/plugins/PATPFParticleProducer.h | 4 +- .../PatAlgos/plugins/PATPhotonSlimmer.cc | 6 +- .../plugins/PATSecondaryVertexSlimmer.cc | 4 +- .../plugins/PATSingleVertexSelector.cc | 2 +- .../plugins/PATSingleVertexSelector.h | 4 +- .../PatAlgos/plugins/PATTauIDEmbedder.cc | 4 +- .../PatAlgos/plugins/PATTauSlimmer.cc | 6 +- .../plugins/PATTriggerEventProducer.h | 8 +- .../plugins/PATTriggerMatchEmbedder.cc | 4 +- .../PATTriggerObjectStandAloneSlimmer.cc | 4 +- .../PATTriggerObjectStandAloneUnpacker.cc | 4 +- .../PatAlgos/plugins/PATTriggerProducer.cc | 14 +- .../PatAlgos/plugins/PATTriggerProducer.h | 8 +- .../plugins/PackedPFCandidateRefMixer.cc | 4 +- .../plugins/PileupSummaryInfoSlimmer.cc | 2 +- .../PatAlgos/plugins/RecoMETExtractor.cc | 2 +- .../PatAlgos/plugins/RecoMETExtractor.h | 6 +- .../plugins/TauJetCorrFactorsProducer.cc | 4 +- .../plugins/TauJetCorrFactorsProducer.h | 4 +- .../plugins/TrackAndVertexUnpacker.cc | 4 +- .../plugins/VertexAssociationProducer.cc | 4 +- .../PatAlgos/src/IsoDepositIsolator.cc | 4 +- PhysicsTools/PatAlgos/src/MultiIsolator.cc | 4 +- PhysicsTools/PatAlgos/src/OverlapTest.cc | 2 +- PhysicsTools/PatAlgos/src/VertexingHelper.cc | 4 +- .../PatExamples/bin/PatBasicFWLiteAnalyzer.cc | 2 +- .../bin/PatBasicFWLiteJetAnalyzer.cc | 4 +- .../bin/PatBasicFWLiteJetAnalyzer_Selector.cc | 8 +- .../bin/PatBasicFWLiteJetUnitTest.cc | 2 +- .../PatExamples/bin/PatCleaningExercise.cc | 2 +- .../PatExamples/bin/PatMuonEDMAnalyzer.cc | 2 +- .../interface/AnalysisTasksAnalyzerBTag.h | 8 +- .../interface/AnalysisTasksAnalyzerJEC.h | 8 +- .../PatExamples/interface/PatMuonAnalyzer.h | 8 +- .../PatExamples/plugins/JetEnergyShift.cc | 4 +- .../PatExamples/plugins/MuonAnalyzer.cc | 2 +- .../PatExamples/plugins/MuonAnalyzer.h | 8 +- .../PatExamples/plugins/PatBJetTagAnalyzer.cc | 6 +- .../plugins/PatBJetTrackAnalyzer.cc | 6 +- .../plugins/PatBJetVertexAnalyzer.cc | 8 +- .../PatExamples/plugins/PatBTagAnalyzer.cc | 8 +- .../PatExamples/plugins/PatBasicAnalyzer.cc | 8 +- .../plugins/PatElectronAnalyzer.cc | 8 +- .../PatExamples/plugins/PatJPsiProducer.cc | 8 +- .../PatExamples/plugins/PatJetAnalyzer.cc | 8 +- .../PatExamples/plugins/PatMCMatching.cc | 8 +- .../plugins/PatMCMatchingExtended.cc | 8 +- .../PatExamples/plugins/PatTauAnalyzer.cc | 2 +- .../PatExamples/plugins/PatTauAnalyzer.h | 8 +- .../plugins/PatTopSelectionAnalyzer.cc | 14 +- .../PatExamples/plugins/PatTrackAnalyzer.cc | 6 +- .../PatExamples/plugins/PatTriggerAnalyzer.cc | 8 +- .../plugins/PatTriggerTagAndProbe.cc | 8 +- .../PatExamples/plugins/PatVertexAnalyzer.cc | 6 +- .../PatExamples/plugins/PatZToMuMuAnalyzer.cc | 8 +- .../plugins/PatZjetsElectronAnalyzer.cc | 8 +- .../plugins/PatZjetsJetAnalyzer.cc | 8 +- .../PatUtils/interface/BoostedJetMerger.h | 6 +- .../PatUtils/interface/EventHypothesisTools.h | 16 +- .../PatUtils/interface/PATDiObjectProxy.h | 2 +- .../PatUtils/interface/RazorComputer.h | 6 +- .../PatUtils/interface/ShiftedJetProducerT.h | 10 +- .../interface/ShiftedParticleProducerT.h | 6 +- .../PatUtils/interface/SmearedJetProducerT.h | 2 +- .../PatUtils/plugins/CorrMETDataExtractor.cc | 2 +- .../plugins/CorrectedPATMETProducer.cc | 2 +- .../PatUtils/plugins/JetCollectionReducer.cc | 6 +- .../plugins/PFMatchedCandidateRefExtractor.cc | 4 +- .../ShiftedJetProducerByMatchedObject.h | 4 +- .../plugins/ShiftedMETcorrInputProducer.h | 4 +- ...hiftedPFCandidateProducerByMatchedObject.h | 4 +- ...ftedPFCandidateProducerForNoPileUpPFMEt.cc | 4 +- ...iftedPFCandidateProducerForNoPileUpPFMEt.h | 4 +- .../ShiftedPFCandidateProducerForPFMVAMEt.h | 4 +- .../ShiftedPFCandidateProducerForPFNoPUMEt.cc | 2 +- .../ShiftedPFCandidateProducerForPFNoPUMEt.h | 4 +- .../ShiftedParticleMETcorrInputProducer.h | 4 +- .../plugins/ShiftedParticleProducer.h | 4 +- .../PatUtils/src/LeptonVertexSignificance.cc | 2 +- .../PatUtils/src/ObjectResolutionCalc.cc | 2 +- .../PatUtils/src/TrackerIsolationPt.cc | 2 +- .../interface/MassKinFitterCandProducer.h | 4 +- .../plugins/ConstrainedFitCandProducer.h | 2 +- .../src/MassKinFitterCandProducer.cc | 2 +- .../interface/CandCommonVertexFitter.h | 4 +- .../interface/CandKinematicVertexFitter.h | 2 +- .../RecoUtils/plugins/HLTEventSelector.h | 4 +- .../RecoUtils/plugins/TriggerVariables.h | 10 +- .../RecoUtils/src/CandCommonVertexFitter.cc | 8 +- .../src/CandKinematicVertexFitter.cc | 8 +- .../RecoUtils/src/CandMassKinFitter.cc | 6 +- .../interface/BinomialNoncentralInterval.h | 4 +- .../ClopperPearsonBinomialInterval.h | 4 +- .../RooStatsCms/interface/ExclusionBandPlot.h | 8 +- .../FeldmanCousinsBinomialInterval.h | 2 +- .../RooStatsCms/interface/LEPBandPlot.h | 12 +- .../RooStatsCms/interface/StatisticalPlot.h | 2 +- .../interface/SterneBinomialInterval.h | 2 +- .../RooStatsCms/src/ExclusionBandPlot.cc | 8 +- PhysicsTools/RooStatsCms/src/LEPBandPlot.cc | 28 +- .../interface/CutApplicatorBase.h | 6 +- .../CutApplicatorWithEventContentBase.h | 2 +- .../ElectronVPlusJetsIDSelectionFunctor.h | 2 +- .../interface/JetIDSelectionFunctor.h | 2 +- .../MuonVPlusJetsIDSelectionFunctor.h | 8 +- .../interface/PFElectronSelector.h | 2 +- .../interface/PFJetIDSelectionFunctor.h | 8 +- .../SelectorUtils/interface/PFMuonSelector.h | 2 +- .../interface/PVObjectSelector.h | 2 +- .../SelectorUtils/interface/PVSelector.h | 4 +- .../SelectorUtils/interface/RunLumiSelector.h | 2 +- ...SimpleCutBasedElectronIDSelectionFunctor.h | 2 +- .../interface/VersionedIdProducer.h | 4 +- .../interface/VersionedSelector.h | 10 +- .../interface/WPlusJetsEventSelector.h | 2 +- .../SelectorUtils/interface/strbitset.h | 2 +- .../SelectorUtils/plugins/EtaMultiRangeCut.cc | 4 +- .../plugins/ExpressionEvaluatorCut.cc | 10 +- .../ExpressionEvaluatorCutWithEventContent.cc | 14 +- .../SelectorUtils/plugins/MaxAbsEtaCut.cc | 4 +- .../SelectorUtils/plugins/MinPtCut.cc | 4 +- .../plugins/MinPtCutInEtaRanges.cc | 4 +- .../src/WPlusJetsEventSelector.cc | 8 +- .../TagAndProbe/interface/BaseTreeFiller.h | 2 +- .../ElectronMatchedCandidateProducer.h | 8 +- .../TagAndProbe/interface/RooCBExGaussShape.h | 6 +- .../TagAndProbe/interface/RooCMSShape.h | 6 +- .../TagAndProbe/interface/TagProbeFitter.h | 4 +- .../interface/TriggerCandProducer.h | 10 +- .../interface/ZGeneratorLineShape.h | 6 +- .../TagAndProbe/plugins/AnythingToValueMap.h | 8 +- .../plugins/ColinsSoperVariablesComputer.cc | 10 +- .../plugins/DeltaRNearestObjectComputer.cc | 4 +- .../ElectronConversionRejectionVars.cc | 4 +- .../plugins/NearbyCandCountComputer.cc | 4 +- .../plugins/ObjectMultiplicityCounter.cc | 4 +- .../TagAndProbe/plugins/ObjectViewCleaner.cc | 2 +- .../TagAndProbe/plugins/ObjectViewMatcher.cc | 4 +- .../plugins/OtherObjectVariableComputer.cc | 4 +- .../plugins/ProbeMulteplicityProducer.cc | 4 +- .../TagAndProbe/plugins/ProbeTreeProducer.cc | 12 +- .../plugins/TagProbeFitTreeAnalyzer.cc | 8 +- .../plugins/TagProbeFitTreeProducer.cc | 10 +- .../TagAndProbe/src/BaseTreeFiller.cc | 8 +- .../TagAndProbe/src/TagProbeFitter.cc | 48 +- .../TagAndProbe/src/TagProbePairMaker.cc | 4 +- .../TagAndProbe/src/ZGeneratorLineShape.cc | 2 +- .../UtilAlgos/interface/BasicMuonAnalyzer.h | 8 +- .../UtilAlgos/interface/CachingVariable.h | 34 +- .../UtilAlgos/interface/CompleteNTupler.h | 8 +- .../UtilAlgos/interface/ConfigurableHisto.h | 28 +- .../UtilAlgos/interface/EDAnalyzerWrapper.h | 8 +- .../interface/EDFilterObjectWrapper.h | 6 +- .../UtilAlgos/interface/EDFilterWrapper.h | 4 +- .../interface/FWLiteAnalyzerWrapper.h | 2 +- .../UtilAlgos/interface/InputTagDistributor.h | 4 +- PhysicsTools/UtilAlgos/interface/Plotter.h | 14 +- PhysicsTools/UtilAlgos/interface/Selections.h | 12 +- .../UtilAlgos/interface/StringBasedNTupler.h | 10 +- .../UtilAlgos/interface/VariableHelper.h | 4 +- .../UtilAlgos/interface/VariableNTupler.h | 8 +- .../UtilAlgos/plugins/ConfigurableAnalysis.cc | 14 +- .../UtilAlgos/plugins/ErrorSummaryFilter.cc | 4 +- .../UtilAlgos/plugins/NTuplingDevice.cc | 8 +- .../UtilAlgos/plugins/PlottingDevice.cc | 8 +- .../UtilAlgos/plugins/VariableEventSelector.h | 4 +- PhysicsTools/UtilAlgos/src/VariableHelper.cc | 2 +- .../Utilities/plugins/NumberPerLSFilter.cc | 8 +- PhysicsTools/Utilities/src/LumiReWeighting.cc | 12 +- .../Utilities/src/SideBandSubtraction.cc | 48 +- .../BTagTools/src/SignedImpactParameter3D.cc | 4 +- .../src/SignedTransverseImpactParameter.cc | 4 +- RecoBTag/CTagging/interface/CharmTagger.h | 6 +- RecoBTag/CTagging/src/CharmTagger.cc | 2 +- .../interface/CandidateChargeBTagComputer.h | 2 +- .../interface/CombinedMVAV2JetTagComputer.h | 4 +- .../plugins/DeepCMVATagInfoProducer.cc | 8 +- .../plugins/DeepFlavourJetTagsProducer.cc | 14 +- .../Combined/plugins/DeepNNTagInfoProducer.cc | 8 +- .../src/CombinedMVAV2JetTagComputer.cc | 2 +- .../interface/PromptTrackCountingComputer.h | 2 +- .../TemplatedJetBProbabilityComputer.h | 2 +- .../TemplatedJetProbabilityComputer.h | 2 +- .../TemplatedNegativeTrackCountingComputer.h | 2 +- .../TemplatedTrackCountingComputer.h | 2 +- RecoBTag/ImpactParameter/plugins/IPProducer.h | 10 +- .../BTagPerformaceRootProducerFromSQLITE.cc | 8 +- .../plugins/BtagPerformanceESProducer.h | 2 +- ...erformanceDBWriterFromFile_WPandPayload.cc | 10 +- ...rmanceDBWriterFromFile_WPandPayload_IOV.cc | 10 +- ...rmanceDBWriterTFormula_fromfile_WPandPL.cc | 10 +- .../interface/CombinedSVComputer.h | 6 +- .../interface/CombinedSVSoftLeptonComputer.h | 2 +- .../interface/TemplatedSecondaryVertex.h | 2 +- .../TemplatedSimpleSecondaryVertexComputer.h | 2 +- .../SecondaryVertex/interface/VertexSorting.h | 4 +- .../SecondaryVertex/plugins/BVertexFilter.cc | 6 +- .../plugins/BoostedDoubleSVProducer.cc | 18 +- .../plugins/BtoCharmDecayVertexMerger.cc | 4 +- .../TemplatedSecondaryVertexProducer.cc | 22 +- .../SecondaryVertex/src/GhostTrackComputer.cc | 12 +- .../Skimming/interface/BTagSkimLeptonJet.h | 6 +- RecoBTag/Skimming/interface/BTagSkimMC.h | 4 +- .../SoftLepton/interface/ElectronTagger.h | 2 +- .../interface/GenericSelectorByValueMap.h | 2 +- .../SoftLepton/interface/LeptonTaggerByIP.h | 4 +- .../SoftLepton/interface/LeptonTaggerByPt.h | 4 +- .../interface/LeptonTaggerDistance.h | 4 +- RecoBTag/SoftLepton/interface/MuonTagger.h | 2 +- .../SoftLepton/interface/MuonTaggerNoIP.h | 4 +- RecoBTag/SoftLepton/plugins/SoftLepton.cc | 2 +- RecoBTag/SoftLepton/plugins/SoftLepton.h | 4 +- .../plugins/SoftPFElectronTagInfoProducer.cc | 2 +- .../plugins/SoftPFElectronTagInfoProducer.h | 4 +- .../plugins/SoftPFMuonTagInfoProducer.cc | 2 +- .../plugins/SoftPFMuonTagInfoProducer.h | 4 +- .../src/HistogramProbabilityEstimator.cc | 2 +- .../interface/CalibratedHistogramXML.h | 8 +- .../XMLCalibration/interface/CalibrationXML.h | 4 +- .../src/CalibratedHistogramXML.cc | 2 +- RecoBTag/XMLCalibration/src/CalibrationXML.cc | 4 +- .../GenericMVAJetTagComputerWrapper.h | 20 +- .../Selectors/interface/CaloConeSelector.h | 2 +- .../interface/CaloDualConeSelector.h | 2 +- .../interface/ParticleTowerProducer.h | 8 +- .../HiJetAlgos/src/ParticleTowerProducer.cc | 2 +- .../TkSeedGenerator/interface/FastCircleFit.h | 2 +- .../interface/TrackVertexArbitratration.h | 2 +- .../ColinearityKinematicConstraintT.h | 12 +- .../KinematicConstrainedVertexFitterT.h | 8 +- .../KinematicConstrainedVertexUpdatorT.h | 2 +- .../interface/defaultRKPropagator.h | 4 +- .../DetLayers/interface/DetLayerException.h | 2 +- ...GeneralBinFinderInZforGeometricSearchDet.h | 6 +- .../interface/PeriodicBinFinderInZ.h | 6 +- .../interface/GenericBinFinderInZ.h | 6 +- .../interface/PeriodicBinFinderInPhi.h | 6 +- .../CSCRecHits/src/CSCRecHit2DValidation.cc | 2 +- .../CSCRecHits/src/CSCRecHit2DValidation.h | 4 +- .../CSCRecHits/src/CSCRecHitValidation.cc | 6 +- .../CSCRecHits/src/CSCRecHitValidation.h | 4 +- .../CSCRecHits/src/CSCSegmentValidation.cc | 4 +- .../CSCRecHits/src/CSCSegmentValidation.h | 4 +- .../CaloTowers/interface/CaloTowersClient.h | 6 +- .../interface/CaloTowersValidation.h | 6 +- Validation/CaloTowers/src/CaloTowersClient.cc | 6 +- .../CaloTowers/src/CaloTowersValidation.cc | 2 +- .../CheckOverlap/interface/CheckOverlap.h | 4 +- Validation/CheckOverlap/src/CheckOverlap.cc | 8 +- .../DTRecHits/plugins/DT2DSegmentClients.h | 8 +- .../DTRecHits/plugins/DT4DSegmentClients.h | 6 +- .../DTRecHits/plugins/DTRecHitClients.h | 8 +- .../DTRecHits/plugins/DTRecHitQuality.cc | 20 +- .../DTRecHits/plugins/DTRecHitQuality.h | 10 +- .../DTRecHits/plugins/DTSegment2DQuality.cc | 8 +- .../DTRecHits/plugins/DTSegment2DQuality.h | 8 +- .../plugins/DTSegment2DSLPhiQuality.cc | 4 +- .../plugins/DTSegment2DSLPhiQuality.h | 10 +- .../DTRecHits/plugins/DTSegment4DQuality.cc | 10 +- .../DTRecHits/plugins/DTSegment4DQuality.h | 10 +- Validation/DTRecHits/plugins/Histograms.h | 236 ++++---- Validation/DTRecHits/src/DTHitQualityUtils.cc | 14 +- .../interface/ContainmentCorrectionAnalyzer.h | 8 +- .../interface/EgammaBasicClusters.h | 2 +- .../interface/EgammaSuperClusters.h | 2 +- .../interface/EnergyScaleAnalyzer.h | 8 +- .../src/ContainmentCorrectionAnalyzer.cc | 22 +- .../EcalClusters/src/EgammaBasicClusters.cc | 30 +- .../EcalClusters/src/EgammaSuperClusters.cc | 112 ++-- .../interface/EcalBarrelDigisValidation.h | 2 +- .../EcalDigis/interface/EcalDigisValidation.h | 2 +- .../interface/EcalEndcapDigisValidation.h | 6 +- .../interface/EcalMixingModuleValidation.h | 2 +- .../EcalSelectiveReadoutValidation.h | 4 +- .../src/EcalBarrelDigisValidation.cc | 26 +- .../EcalDigis/src/EcalDigisValidation.cc | 32 +- .../src/EcalEndcapDigisValidation.cc | 30 +- .../src/EcalMixingModuleValidation.cc | 44 +- .../src/EcalPreshowerDigisValidation.cc | 4 +- .../src/EcalPreshowerNoiseDistrib.cc | 4 +- .../src/EcalSelectiveReadoutValidation.cc | 68 +-- .../interface/EcalBarrelSimHitsValidation.h | 8 +- .../interface/EcalEndcapSimHitsValidation.h | 8 +- .../EcalPreshowerSimHitsValidation.h | 8 +- .../interface/EcalSimHitsValidProducer.h | 14 +- .../interface/EcalSimHitsValidation.h | 8 +- .../src/EcalBarrelSimHitsValidation.cc | 52 +- .../src/EcalEndcapSimHitsValidation.cc | 58 +- .../src/EcalPreshowerSimHitsValidation.cc | 34 +- .../EcalHits/src/EcalSimHitsValidProducer.cc | 12 +- .../EcalHits/src/EcalSimHitsValidation.cc | 18 +- .../interface/EcalBarrelRecHitsValidation.h | 2 +- .../interface/EcalEndcapRecHitsValidation.h | 2 +- .../EcalPreshowerRecHitsValidation.h | 2 +- .../interface/EcalRecHitsValidation.h | 2 +- .../EcalRecHits/interface/EcalTBValidation.h | 4 +- .../src/EcalBarrelRecHitsValidation.cc | 36 +- .../src/EcalEndcapRecHitsValidation.cc | 36 +- .../src/EcalPreshowerRecHitsValidation.cc | 38 +- .../EcalRecHits/src/EcalRecHitsValidation.cc | 138 ++--- .../EcalRecHits/src/EcalTBValidation.cc | 54 +- .../EcalTriggerPrimitives/src/TPGCheck.cc | 8 +- .../interface/BPhysicsSpectrum.h | 8 +- .../interface/BPhysicsValidation.h | 8 +- .../interface/BasicGenParticleValidation.h | 6 +- .../interface/BasicHepMCHeavyIonValidation.h | 6 +- .../interface/BasicHepMCValidation.h | 8 +- .../interface/DrellYanValidation.h | 8 +- .../interface/DuplicationChecker.h | 6 +- .../interface/HiggsValidation.h | 8 +- .../interface/TTbarSpinCorrHepMCAnalyzer.h | 6 +- .../interface/TTbar_GenJetAnalyzer.h | 6 +- .../interface/TTbar_GenLepAnalyzer.h | 6 +- .../interface/TTbar_Kinematics.h | 6 +- .../EventGenerator/interface/TauValidation.h | 8 +- .../EventGenerator/interface/WValidation.h | 8 +- .../plugins/BasicHepMCValidation.cc | 2 +- .../plugins/DrellYanValidation.cc | 4 +- .../EventGenerator/plugins/HiggsValidation.cc | 2 +- .../plugins/MBUEandQCDValidation.cc | 2 +- .../plugins/MBUEandQCDValidation.h | 8 +- .../plugins/TTbarSpinCorrHepMCAnalyzer.cc | 8 +- .../EventGenerator/plugins/TauValidation.cc | 2 +- .../EventGenerator/plugins/WValidation.cc | 4 +- .../EventGenerator/plugins/WeightManager.cc | 2 +- .../EventGenerator/src/CaloCellManager.cc | 2 +- .../src/HepMCValidationHelper.cc | 2 +- .../EventGenerator/src/WeightManager.cc | 2 +- .../Geometry/interface/MaterialBudget.h | 14 +- .../Geometry/interface/MaterialBudgetAction.h | 12 +- .../interface/MaterialBudgetEcalHistos.h | 8 +- .../interface/MaterialBudgetForward.h | 14 +- .../Geometry/interface/MaterialBudgetHcal.h | 14 +- .../Geometry/interface/MaterialBudgetHistos.h | 8 +- .../interface/MaterialBudgetTrackerHistos.h | 8 +- .../Geometry/interface/MaterialBudgetTree.h | 8 +- .../Geometry/interface/MaterialBudgetTxt.h | 8 +- Validation/Geometry/src/MaterialBudget.cc | 6 +- .../Geometry/src/MaterialBudgetAction.cc | 8 +- .../src/MaterialBudgetCastorHistos.cc | 2 +- Validation/Geometry/src/MaterialBudgetData.cc | 8 +- .../Geometry/src/MaterialBudgetForward.cc | 6 +- Validation/Geometry/src/MaterialBudgetHcal.cc | 2 +- .../Geometry/src/MaterialBudgetHcalHistos.cc | 2 +- Validation/Geometry/src/TestHistoMgr.cc | 8 +- .../interface/GlobalDigisAnalyzer.h | 6 +- .../interface/GlobalDigisHistogrammer.h | 8 +- .../interface/GlobalDigisProducer.h | 10 +- .../GlobalDigis/src/GlobalDigisAnalyzer.cc | 66 +-- .../src/GlobalDigisHistogrammer.cc | 56 +- .../GlobalDigis/src/GlobalDigisProducer.cc | 6 +- .../interface/GlobalHitsHistogrammer.h | 6 +- .../interface/GlobalHitsProdHistStripper.h | 14 +- .../GlobalHits/interface/GlobalHitsTester.h | 6 +- .../GlobalHits/src/GlobalHitsHistogrammer.cc | 96 ++-- .../src/GlobalHitsProdHistStripper.cc | 6 +- Validation/GlobalHits/src/GlobalHitsTester.cc | 16 +- .../interface/GlobalRecHitsAnalyzer.h | 8 +- .../interface/GlobalRecHitsHistogrammer.h | 8 +- .../interface/GlobalRecHitsProducer.h | 12 +- .../src/GlobalRecHitsAnalyzer.cc | 36 +- .../src/GlobalRecHitsHistogrammer.cc | 32 +- .../src/GlobalRecHitsProducer.cc | 4 +- .../plugins/HGCGeometryClient.cc | 6 +- .../plugins/HGCGeometryValidation.cc | 6 +- .../HGCalValidation/plugins/HGCalDigiClient.h | 6 +- .../plugins/HGCalDigiValidation.cc | 6 +- .../plugins/HGCalDigiValidation.h | 2 +- .../HGCalValidation/plugins/HGCalHitClient.cc | 6 +- .../plugins/HGCalHitValidation.cc | 6 +- .../plugins/HGCalRecHitValidation.cc | 2 +- .../plugins/HGCalRecHitValidation.h | 2 +- .../plugins/HGCalRecHitsClient.h | 6 +- .../plugins/HGCalSimHitValidation.h | 2 +- .../plugins/HGCalSimHitsClient.h | 6 +- .../plugins/SimG4HGCalValidation.cc | 20 +- .../HcalDigis/interface/Digi2Raw2Digi.h | 6 +- .../HcalDigis/interface/HcalDigiTester.h | 6 +- .../HcalDigis/interface/HcalDigisClient.h | 4 +- Validation/HcalDigis/interface/ZDCDigiStudy.h | 8 +- Validation/HcalDigis/src/Digi2Raw2Digi.cc | 2 +- Validation/HcalDigis/src/HcalDigiTester.cc | 2 +- Validation/HcalDigis/src/HcalDigisClient.cc | 8 +- .../HcalHits/interface/HcalSimHitStudy.h | 6 +- .../HcalHits/interface/HcalSimHitsClient.h | 6 +- .../interface/HcalSimHitsValidation.h | 6 +- .../HcalHits/interface/SimG4HcalValidation.h | 18 +- .../interface/SimHitsValidationHcal.h | 6 +- .../HcalHits/interface/ZdcSimHitStudy.h | 8 +- Validation/HcalHits/src/HcalSimHitsClient.cc | 8 +- .../HcalHits/src/HcalSimHitsValidation.cc | 2 +- .../HcalHits/src/SimG4HcalHitJetFinder.cc | 2 +- .../HcalHits/src/SimG4HcalValidation.cc | 14 +- .../HcalRecHits/interface/HcalRecHitsClient.h | 4 +- .../interface/HcalRecHitsValidation.h | 6 +- Validation/HcalRecHits/interface/NoiseRates.h | 6 +- .../HcalRecHits/interface/NoiseRatesClient.h | 4 +- .../HcalRecHits/src/HcalRecHitsValidation.cc | 2 +- .../HcalRecHits/src/NoiseRatesClient.cc | 2 +- Validation/Mixing/interface/GlobalTest.h | 4 +- .../interface/MixCollectionValidation.h | 4 +- Validation/Mixing/interface/TestSuite.h | 8 +- .../Mixing/src/MixCollectionValidation.cc | 16 +- Validation/Mixing/src/TestSuite.cc | 4 +- .../MuonCSCDigis/src/CSCALCTDigiValidation.h | 4 +- .../MuonCSCDigis/src/CSCBaseValidation.cc | 6 +- .../MuonCSCDigis/src/CSCCLCTDigiValidation.h | 4 +- .../src/CSCComparatorDigiValidation.h | 4 +- .../MuonCSCDigis/src/CSCDigiValidation.cc | 12 +- .../MuonCSCDigis/src/CSCDigiValidation.h | 4 +- .../src/CSCStripDigiValidation.cc | 6 +- .../MuonCSCDigis/src/CSCStripDigiValidation.h | 4 +- .../MuonCSCDigis/src/CSCWireDigiValidation.h | 4 +- Validation/MuonDTDigis/src/MuonDTDigis.cc | 46 +- Validation/MuonDTDigis/src/MuonDTDigis.h | 2 +- .../MuonGEMDigis/interface/GEMCheckGeometry.h | 4 +- .../interface/GEMCoPadDigiValidation.h | 2 +- .../interface/GEMDigiTrackMatch.h | 2 +- .../interface/GEMPadDigiValidation.h | 2 +- .../interface/GEMStripDigiValidation.h | 2 +- .../plugins/MuonGEMDigisHarvestor.cc | 2 +- .../plugins/MuonGEMDigisHarvestor.h | 4 +- .../src/GEMCoPadDigiValidation.cc | 2 +- .../MuonGEMDigis/src/GEMPadDigiValidation.cc | 2 +- .../MuonGEMHits/interface/GEMBaseValidation.h | 4 +- .../MuonGEMHits/interface/GEMHitsValidation.h | 2 +- .../MuonGEMHits/interface/GEMSimTrackMatch.h | 2 +- .../MuonGEMHits/interface/GEMTrackMatch.h | 4 +- .../plugins/MuonGEMHitsHarvestor.cc | 6 +- .../plugins/MuonGEMHitsHarvestor.h | 4 +- .../MuonGEMHits/src/GEMBaseValidation.cc | 2 +- Validation/MuonGEMHits/src/SimHitMatcher.cc | 6 +- .../interface/GEMRecHitTrackMatch.h | 2 +- .../interface/GEMRecHitsValidation.h | 2 +- .../plugins/MuonGEMRecHitsHarvestor.cc | 2 +- .../plugins/MuonGEMRecHitsHarvestor.h | 4 +- .../MuonHits/src/MuonSimHitsValidAnalyzer.cc | 66 +-- .../MuonHits/src/MuonSimHitsValidAnalyzer.h | 6 +- .../MuonIdentification/interface/MuonIdVal.h | 4 +- .../MuonIsolation/interface/MuIsoValidation.h | 4 +- .../MuonIsolation/src/MuIsoValidation.cc | 4 +- .../interface/ME0BaseValidation.h | 4 +- .../interface/ME0DigisValidation.h | 2 +- .../interface/ME0HitsValidation.h | 2 +- .../interface/ME0RecHitsValidation.h | 2 +- .../interface/ME0SegmentsValidation.h | 2 +- .../plugins/MuonME0DigisHarvestor.cc | 2 +- .../plugins/MuonME0DigisHarvestor.h | 4 +- .../plugins/MuonME0SegHarvestor.cc | 2 +- .../plugins/MuonME0SegHarvestor.h | 4 +- .../src/ME0SegmentsValidation.cc | 2 +- .../MuonRPCDigis/interface/RPCDigiValid.h | 2 +- .../plugins/RPCGeometryServTest.cc | 2 +- .../plugins/RPCGeometryServTest.h | 4 +- .../MuonRPCGeometry/plugins/RPCPhiEff.h | 8 +- .../interface/PerformanceAnalyzer.h | 4 +- .../RPCRecHits/interface/RPCPointVsRecHit.h | 2 +- .../RPCRecHits/interface/RPCRecHitValid.h | 2 +- .../interface/RPCRecHitValidClient.h | 4 +- Validation/RPCRecHits/src/RPCRecHitValid.cc | 8 +- .../RPCRecHits/src/RPCValidHistograms.cc | 32 +- .../BDHadronTrackMonitoringAnalyzer.cc | 6 +- .../plugins/BDHadronTrackMonitoringAnalyzer.h | 6 +- .../BDHadronTrackMonitoringHarvester.h | 4 +- .../plugins/BTagPerformanceAnalyzerMC.cc | 2 +- .../RecoB/plugins/BTagPerformanceAnalyzerMC.h | 4 +- .../recoBSVTagInfoValidationAnalyzer.cc | 4 +- Validation/RecoB/src/HistoCompare.cc | 2 +- .../plugins/ConversionPostprocessing.cc | 6 +- .../plugins/ConversionPostprocessing.h | 12 +- .../RecoEgamma/plugins/EgammaObjects.cc | 144 ++--- Validation/RecoEgamma/plugins/EgammaObjects.h | 8 +- .../ElectronConversionRejectionValidator.h | 4 +- .../plugins/ElectronMcFakePostValidator.h | 4 +- .../plugins/ElectronMcFakeValidator.h | 6 +- .../ElectronMcMiniAODSignalPostValidator.h | 4 +- .../ElectronMcMiniAODSignalValidator.cc | 80 +-- .../ElectronMcMiniAODSignalValidator.h | 6 +- .../plugins/ElectronMcSignalPostValidator.h | 4 +- .../plugins/ElectronMcSignalValidator.h | 6 +- .../plugins/PhotonPostprocessing.cc | 2 +- .../RecoEgamma/plugins/PhotonPostprocessing.h | 12 +- .../RecoEgamma/plugins/PhotonValidator.cc | 58 +- .../RecoEgamma/plugins/PhotonValidator.h | 8 +- .../plugins/PhotonValidatorMiniAOD.h | 8 +- .../RecoEgamma/plugins/TkConvValidator.h | 8 +- Validation/RecoHI/plugins/HiBasicGenTest.h | 6 +- Validation/RecoJets/plugins/JetTester.cc | 284 +++++----- Validation/RecoJets/plugins/JetTester.h | 6 +- .../RecoJets/plugins/JetTesterPostProcessor.h | 8 +- .../RecoJets/plugins/JetTester_HeavyIons.cc | 468 ++++++++-------- .../RecoJets/plugins/JetTester_HeavyIons.h | 2 +- Validation/RecoMET/plugins/METTester.cc | 116 ++-- Validation/RecoMET/plugins/METTester.h | 2 +- .../RecoMET/plugins/METTesterPostProcessor.cc | 22 +- .../RecoMET/plugins/METTesterPostProcessor.h | 8 +- .../METTesterPostProcessorHarvesting.h | 8 +- .../RecoMuon/plugins/MuonTrackValidator.cc | 18 +- .../RecoMuon/plugins/MuonTrackValidator.h | 8 +- .../RecoMuon/plugins/NewMuonTrackValidator.h | 2 +- .../RecoMuon/src/GlobalMuonMatchAnalyzer.cc | 20 +- .../RecoMuon/src/GlobalMuonMatchAnalyzer.h | 6 +- Validation/RecoMuon/src/HTrack.cc | 94 ++-- Validation/RecoMuon/src/Histograms.h | 18 +- Validation/RecoMuon/src/MuonSeedTrack.h | 8 +- Validation/RecoMuon/src/MuonTrackAnalyzer.cc | 28 +- Validation/RecoMuon/src/MuonTrackAnalyzer.h | 2 +- .../RecoMuon/src/MuonTrackResidualAnalyzer.cc | 4 +- .../RecoMuon/src/MuonTrackResidualAnalyzer.h | 4 +- Validation/RecoMuon/src/RecoMuonValidator.h | 8 +- .../RecoParticleFlow/interface/Comparator.h | 6 +- .../RecoParticleFlow/interface/TH2Analyzer.h | 22 +- .../plugins/GenericBenchmarkAnalyzer.cc | 6 +- .../plugins/GenericBenchmarkAnalyzer.h | 8 +- .../RecoParticleFlow/plugins/PFFilter.h | 8 +- .../plugins/PFJetBenchmarkAnalyzer.cc | 8 +- .../RecoParticleFlow/plugins/PFJetFilter.cc | 4 +- .../RecoParticleFlow/plugins/PFJetFilter.h | 8 +- .../plugins/PFMETBenchmarkAnalyzer.cc | 8 +- .../RecoParticleFlow/plugins/PFMETFilter.h | 8 +- .../PFTauElecRejectionBenchMarkAnalyzer.cc | 8 +- .../RecoParticleFlow/plugins/PFTester.cc | 4 +- .../RecoParticleFlow/plugins/PFTester.h | 8 +- Validation/RecoParticleFlow/src/Comparator.cc | 8 +- .../RecoParticleFlow/src/TH2Analyzer.cc | 4 +- .../RecoTau/interface/TauTagValidation.h | 4 +- Validation/RecoTau/plugins/DQMFileLoader.h | 8 +- .../RecoTau/plugins/DQMHistEffProducer.cc | 12 +- .../RecoTau/plugins/DQMHistEffProducer.h | 8 +- .../RecoTau/plugins/DQMHistNormalizer.cc | 10 +- Validation/RecoTau/plugins/DQMHistPlotter.cc | 14 +- Validation/RecoTau/plugins/DQMHistPlotter.h | 8 +- .../RecoTau/plugins/DQMSimpleFileSaver.h | 6 +- Validation/RecoTau/plugins/Selectors.cc | 8 +- Validation/RecoTau/src/TauTagValidation.cc | 4 +- .../RecoTrack/interface/MultiTrackValidator.h | 2 +- .../interface/MultiTrackValidatorGenPs.h | 4 +- .../interface/SiPixelTrackingRecHitsValid.h | 6 +- .../interface/SiStripTrackingRecHitsValid.h | 14 +- .../plugins/CrossingFramePSimHitToPSimHits.cc | 2 +- .../RecoTrack/plugins/MultiTrackValidator.cc | 4 +- .../plugins/MultiTrackValidatorGenPs.cc | 8 +- .../plugins/SiPixelTrackingRecHitsValid.cc | 12 +- .../plugins/TrackFromSeedProducer.cc | 4 +- .../src/SiStripTrackingRecHitsValid.cc | 526 +++++++++--------- Validation/RecoVertex/bin/BSvsPVPlots.cc | 2 +- .../RecoVertex/bin/PrimaryVertexPlots.cc | 2 +- .../PrimaryVertexAnalyzer4PUSlimmed.h | 6 +- .../interface/TrackParameterAnalyzer.h | 8 +- Validation/RecoVertex/interface/V0Validator.h | 4 +- .../src/AnotherPrimaryVertexAnalyzer.cc | 16 +- Validation/RecoVertex/src/BSvsPVAnalyzer.cc | 14 +- .../RecoVertex/src/BSvsPVHistogramMaker.cc | 6 +- Validation/RecoVertex/src/BeamSpotAnalyzer.cc | 12 +- .../RecoVertex/src/BeamSpotHistogramMaker.cc | 6 +- .../RecoVertex/src/MCVerticesAnalyzer.cc | 4 +- Validation/RecoVertex/src/MCVerticesWeight.cc | 4 +- .../src/MCvsRecoVerticesAnalyzer.cc | 6 +- .../src/PrimaryVertexAnalyzer4PUSlimmed.cc | 14 +- Validation/RecoVertex/src/V0Validator.cc | 13 +- .../RecoVertex/src/VertexHistogramMaker.cc | 6 +- Validation/RecoVertex/src/VertexWeighter.cc | 2 +- .../interface/SiPixelPhase1DigisV.h | 2 +- .../interface/SiPixelPhase1HitsV.h | 2 +- .../interface/SiPixelPhase1RecHitsV.h | 2 +- .../interface/SiPixelPhase1TrackClustersV.h | 2 +- .../TrackerDigis/interface/SiPixelDigiValid.h | 6 +- .../TrackerDigis/interface/SiStripDigiValid.h | 6 +- .../TrackerDigis/plugins/SiPixelDigiValid.cc | 4 +- .../TrackerDigis/plugins/SiStripDigiValid.cc | 4 +- .../interface/TrackerHitAnalyzer.h | 6 +- .../interface/TrackerHitProducer.h | 8 +- .../TrackerHits/src/TrackerHitAnalyzer.cc | 8 +- .../TrackerHits/src/TrackerHitProducer.cc | 2 +- .../interface/SiPixelRecHitsValid.h | 6 +- .../TrackerRecHits/src/SiPixelRecHitsValid.cc | 2 +- .../interface/TrackingTruthValid.h | 6 +- .../plugins/TrackingTruthValid.cc | 4 +- 2319 files changed, 9610 insertions(+), 9611 deletions(-) diff --git a/Alignment/CommonAlignment/interface/AlignableBeamSpot.h b/Alignment/CommonAlignment/interface/AlignableBeamSpot.h index 876cf20c2a289..2f9a95ca9f4de 100644 --- a/Alignment/CommonAlignment/interface/AlignableBeamSpot.h +++ b/Alignment/CommonAlignment/interface/AlignableBeamSpot.h @@ -24,64 +24,64 @@ class AlignableBeamSpot : public Alignable AlignableBeamSpot(); /// Destructor - virtual ~AlignableBeamSpot(); + ~AlignableBeamSpot() override; /// Add a component and set its mother to this alignable. /// (Note: The component will be adopted, e.g. later deleted.) /// Also find average position of this composite from its modules' positions. - virtual void addComponent( Alignable* component ) {} + void addComponent( Alignable* component ) override {} /// Return vector of direct components - virtual Alignables components() const { return std::vector(); } + Alignables components() const override { return std::vector(); } /// Provide all components, subcomponents etc. (cf. description in base class) - virtual void recursiveComponents(Alignables &result) const { } + void recursiveComponents(Alignables &result) const override { } /// Move with respect to the global reference frame - virtual void move( const GlobalVector& displacement ); + void move( const GlobalVector& displacement ) override; /// Rotation interpreted in global reference frame - virtual void rotateInGlobalFrame( const RotationType& rotation ); + void rotateInGlobalFrame( const RotationType& rotation ) override; /// Set the AlignmentPositionError and, if (propagateDown), to all components - virtual void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown); + void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override; /// Add (or set if it does not exist yet) the AlignmentPositionError, /// if (propagateDown), add also to all components - virtual void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown); + void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override; /// Add (or set if it does not exist yet) the AlignmentPositionError /// resulting from a rotation in the global reference frame, /// if (propagateDown), add also to all components - virtual void addAlignmentPositionErrorFromRotation(const RotationType &rot, bool propagateDown); + void addAlignmentPositionErrorFromRotation(const RotationType &rot, bool propagateDown) override; /// Add the AlignmentPositionError resulting from local rotation (if this Alignable is a Det) and, /// if (propagateDown), add to all the components of the composite - virtual void addAlignmentPositionErrorFromLocalRotation( const RotationType& rotation, - bool propagateDown ); + void addAlignmentPositionErrorFromLocalRotation( const RotationType& rotation, + bool propagateDown ) override; /// Return the alignable type identifier - virtual StructureType alignableObjectId() const { return align::BeamSpot; } + StructureType alignableObjectId() const override { return align::BeamSpot; } /// Recursive printout of alignable structure - virtual void dump() const; + void dump() const override; /// Return vector of alignment data - virtual Alignments* alignments() const; + Alignments* alignments() const override; /// Return vector of alignment errors - virtual AlignmentErrorsExtended* alignmentErrors() const; + AlignmentErrorsExtended* alignmentErrors() const override; /// alignment position error - for checking only, otherwise use alignmentErrors() above! const AlignmentPositionError* alignmentPositionError() const { return theAlignmentPositionError;} /// Return surface deformations - virtual int surfaceDeformationIdPairs(std::vector > &) const { return 0; } + int surfaceDeformationIdPairs(std::vector > &) const override { return 0; } /// do no use, for compatibility only - virtual void setSurfaceDeformation(const SurfaceDeformation*, bool); + void setSurfaceDeformation(const SurfaceDeformation*, bool) override; /// do no use, for compatibility only - virtual void addSurfaceDeformation(const SurfaceDeformation*, bool); + void addSurfaceDeformation(const SurfaceDeformation*, bool) override; /// initialize the alignable with the passed beam spot parameters void initialize(double x, double y, double z, diff --git a/Alignment/CommonAlignment/interface/AlignableDetOrUnitPtr.h b/Alignment/CommonAlignment/interface/AlignableDetOrUnitPtr.h index 9a92efe7954bd..8f11116370e9c 100644 --- a/Alignment/CommonAlignment/interface/AlignableDetOrUnitPtr.h +++ b/Alignment/CommonAlignment/interface/AlignableDetOrUnitPtr.h @@ -33,24 +33,24 @@ class AlignableDetOrUnitPtr /// Constructor from AlignableBeamSpot* (non-explicit: for automatic conversions) inline AlignableDetOrUnitPtr(AlignableBeamSpot *aliBeamSpot) - : theAliBeamSpot(aliBeamSpot), theAliDet(0), theAliDetUnit(0) {} + : theAliBeamSpot(aliBeamSpot), theAliDet(nullptr), theAliDetUnit(nullptr) {} /// Constructor from AlignableDet* (non-explicit: for automatic conversions) inline AlignableDetOrUnitPtr(AlignableDet *aliDet) - : theAliBeamSpot(0), theAliDet(aliDet), theAliDetUnit(0) {} + : theAliBeamSpot(nullptr), theAliDet(aliDet), theAliDetUnit(nullptr) {} /// Constructor from AlignableDetUnit* (non-explicit: for automatic conversions) inline AlignableDetOrUnitPtr(AlignableDetUnit *aliDetUnit) - : theAliBeamSpot(0), theAliDet(0), theAliDetUnit(aliDetUnit) {} + : theAliBeamSpot(nullptr), theAliDet(nullptr), theAliDetUnit(aliDetUnit) {} /// Non-virtual destructor: do not use as base class inline ~AlignableDetOrUnitPtr() {} inline AlignableDetOrUnitPtr& operator = (AlignableBeamSpot* aliBeamSpot) { - theAliBeamSpot = aliBeamSpot; theAliDet = 0; theAliDetUnit = 0; return *this;} + theAliBeamSpot = aliBeamSpot; theAliDet = nullptr; theAliDetUnit = nullptr; return *this;} inline AlignableDetOrUnitPtr& operator = (AlignableDet* aliDet) { - theAliBeamSpot = 0; theAliDet = aliDet; theAliDetUnit = 0; return *this;} + theAliBeamSpot = nullptr; theAliDet = aliDet; theAliDetUnit = nullptr; return *this;} inline AlignableDetOrUnitPtr& operator = (AlignableDetUnit* aliDetUnit) { - theAliBeamSpot = 0; theAliDet = 0; theAliDetUnit = aliDetUnit; return *this;} + theAliBeamSpot = nullptr; theAliDet = nullptr; theAliDetUnit = aliDetUnit; return *this;} // Default operator= and default copy constructor are fine, no need to code them here. // conversions to Alignable* etc. diff --git a/Alignment/CommonAlignment/interface/AlignableNavigator.h b/Alignment/CommonAlignment/interface/AlignableNavigator.h index 93324d21ce735..e6ce7fb7ef7ce 100644 --- a/Alignment/CommonAlignment/interface/AlignableNavigator.h +++ b/Alignment/CommonAlignment/interface/AlignableNavigator.h @@ -28,10 +28,10 @@ class AlignableNavigator public: /// Constructor from one or two Alignables - explicit AlignableNavigator(Alignable* tracker, Alignable* muon = 0); + explicit AlignableNavigator(Alignable* tracker, Alignable* muon = nullptr); /// Constructor from one or two Alignables - explicit AlignableNavigator(AlignableExtras* extras, Alignable* tracker, Alignable* muon = 0); + explicit AlignableNavigator(AlignableExtras* extras, Alignable* tracker, Alignable* muon = nullptr); /// Constructor from list of Alignbable explicit AlignableNavigator( const std::vector& alignables ); diff --git a/Alignment/CommonAlignment/interface/SurveyResidual.h b/Alignment/CommonAlignment/interface/SurveyResidual.h index 3137a126d3780..7c06674067b50 100644 --- a/Alignment/CommonAlignment/interface/SurveyResidual.h +++ b/Alignment/CommonAlignment/interface/SurveyResidual.h @@ -83,7 +83,7 @@ class SurveyResidual bool SurveyResidual::valid() const { - return theMother != 0; + return theMother != nullptr; } #endif diff --git a/Alignment/CommonAlignment/plugins/FilterOutLowPt.cc b/Alignment/CommonAlignment/plugins/FilterOutLowPt.cc index 46838e8f20b0b..132f215491d21 100644 --- a/Alignment/CommonAlignment/plugins/FilterOutLowPt.cc +++ b/Alignment/CommonAlignment/plugins/FilterOutLowPt.cc @@ -30,13 +30,13 @@ class FilterOutLowPt : public edm::stream::EDFilter<> { public: explicit FilterOutLowPt( const edm::ParameterSet & ); - ~FilterOutLowPt(); + ~FilterOutLowPt() override; static void fillDescriptions(edm::ConfigurationDescriptions&); private: virtual void beginJob() ; - virtual bool filter ( edm::Event &, const edm::EventSetup&); + bool filter ( edm::Event &, const edm::EventSetup&) override; virtual void endJob() ; // ----------member data -------- diff --git a/Alignment/CommonAlignment/src/Alignable.cc b/Alignment/CommonAlignment/src/Alignable.cc index 6db26357466a0..4e0f7b2c54e0b 100644 --- a/Alignment/CommonAlignment/src/Alignable.cc +++ b/Alignment/CommonAlignment/src/Alignable.cc @@ -21,9 +21,9 @@ Alignable::Alignable(align::ID id, const AlignableSurface& surf): theId(id), // (finally get rid of one of the IDs!) theSurface(surf), theCachedSurface(surf), - theAlignmentParameters(0), - theMother(0), - theSurvey(0) + theAlignmentParameters(nullptr), + theMother(nullptr), + theSurvey(nullptr) { } @@ -33,9 +33,9 @@ Alignable::Alignable(align::ID id, const RotationType& rot): theId(id), theSurface(PositionType(), rot), theCachedSurface(PositionType(), rot), - theAlignmentParameters(0), - theMother(0), - theSurvey(0) + theAlignmentParameters(nullptr), + theMother(nullptr), + theSurvey(nullptr) { } diff --git a/Alignment/CommonAlignment/src/AlignableBeamSpot.cc b/Alignment/CommonAlignment/src/AlignableBeamSpot.cc index 15128e1bc525b..8b6937a32fbe1 100644 --- a/Alignment/CommonAlignment/src/AlignableBeamSpot.cc +++ b/Alignment/CommonAlignment/src/AlignableBeamSpot.cc @@ -20,7 +20,7 @@ //__________________________________________________________________________________________________ AlignableBeamSpot::AlignableBeamSpot() : Alignable( AlignableBeamSpot::detId().rawId(), AlignableSurface() ), - theAlignmentPositionError(0), + theAlignmentPositionError(nullptr), theInitializedFlag(false) { diff --git a/Alignment/CommonAlignment/src/AlignableDetOrUnitPtr.cc b/Alignment/CommonAlignment/src/AlignableDetOrUnitPtr.cc index b1face53218a3..1f45284abf683 100644 --- a/Alignment/CommonAlignment/src/AlignableDetOrUnitPtr.cc +++ b/Alignment/CommonAlignment/src/AlignableDetOrUnitPtr.cc @@ -38,6 +38,6 @@ const AlignmentPositionError* AlignableDetOrUnitPtr::alignmentPositionError() co if (theAliBeamSpot) return theAliBeamSpot->alignmentPositionError(); else if (theAliDet) return theAliDet->alignmentPositionError(); else if (theAliDetUnit) return theAliDetUnit->alignmentPositionError(); - else return 0; + else return nullptr; } diff --git a/Alignment/CommonAlignment/src/AlignableNavigator.cc b/Alignment/CommonAlignment/src/AlignableNavigator.cc index 865a287103775..f346693eec1a2 100644 --- a/Alignment/CommonAlignment/src/AlignableNavigator.cc +++ b/Alignment/CommonAlignment/src/AlignableNavigator.cc @@ -103,7 +103,7 @@ AlignableDetOrUnitPtr AlignableNavigator::alignableFromDetId( const DetId& detid throw cms::Exception("BadLogic") << "[AlignableNavigator::alignableDetFromDetId] DetId " << detid.rawId() << " not found"; - return static_cast(0); + return static_cast(nullptr); } //_____________________________________________________________________________ diff --git a/Alignment/CommonAlignment/src/MisalignmentScenarioBuilder.cc b/Alignment/CommonAlignment/src/MisalignmentScenarioBuilder.cc index 140daeed34188..1d22db0fea815 100644 --- a/Alignment/CommonAlignment/src/MisalignmentScenarioBuilder.cc +++ b/Alignment/CommonAlignment/src/MisalignmentScenarioBuilder.cc @@ -9,7 +9,7 @@ #include #include #include -#include +#include // Framework #include "FWCore/Utilities/interface/Exception.h" @@ -108,7 +108,7 @@ void MisalignmentScenarioBuilder::decodeMovements_(const edm::ParameterSet &pSet // Apply movements to components std::vector parameterSetNames; localParameters.getParameterSetNames( parameterSetNames, true ); - if ( (*iter)->size() > 0 && parameterSetNames.size() > 0 ) + if ( (*iter)->size() > 0 && !parameterSetNames.empty() ) // Has components and remaining parameter sets this->decodeMovements_( localParameters, (*iter)->components() ); } diff --git a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORoot.h b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORoot.h index 60acd9c6da5bc..b02a35844d41d 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORoot.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORoot.h @@ -17,50 +17,50 @@ class AlignmentIORoot : public AlignmentIO { public: - virtual ~AlignmentIORoot() = default; + ~AlignmentIORoot() override = default; /// write AlignmentParameters void writeAlignmentParameters (const align::Alignables& alivec, - const char* filename, int iter, bool validCheck, int& ierr ); + const char* filename, int iter, bool validCheck, int& ierr ) override; /// read AlignmentParameters align::Parameters readAlignmentParameters (const align::Alignables& alivec, - const char* filename, int iter, int& ierr); + const char* filename, int iter, int& ierr) override; /// write RigidBodyAlignmentParameters as applied on top of original positions void writeOrigRigidBodyAlignmentParameters (const align::Alignables& alivec, const char* filename, - int iter, bool validCheck, int& ierr); + int iter, bool validCheck, int& ierr) override; /// write Correlations void writeCorrelations (const align::Correlations& cormap, - const char* filename, int iter, bool validCheck, int& ierr); + const char* filename, int iter, bool validCheck, int& ierr) override; /// read Correlations align::Correlations readCorrelations (const align::Alignables& alivec, - const char* filename, int iter, int& ierr); + const char* filename, int iter, int& ierr) override; /// write Alignable current absolute positions void writeAlignableAbsolutePositions (const align::Alignables& alivec, - const char* filename, int iter, bool validCheck, int& ierr); + const char* filename, int iter, bool validCheck, int& ierr) override; /// read Alignable current absolute positions AlignablePositions readAlignableAbsolutePositions (const align::Alignables& alivec, - const char* filename, int iter, int& ierr); + const char* filename, int iter, int& ierr) override; /// write Alignable original (before misalignment) absolute positions void writeAlignableOriginalPositions (const align::Alignables& alivec, - const char* filename, int iter, bool validCheck, int& ierr); + const char* filename, int iter, bool validCheck, int& ierr) override; /// read Alignable original (before misalignment) absolute positions AlignablePositions readAlignableOriginalPositions (const align::Alignables& alivec, - const char* filename, int iter, int& ierr); + const char* filename, int iter, int& ierr) override; /// write Alignable relative positions (shift,rotation) void writeAlignableRelativePositions (const align::Alignables& alivec, - const char* filename, int iter, bool validCheck, int& ierr); + const char* filename, int iter, bool validCheck, int& ierr) override; /// read Alignable relative positions (shift,rotation) AlignableShifts readAlignableRelativePositions (const align::Alignables& alivec, - const char* filename, int iter, int& ierr); + const char* filename, int iter, int& ierr) override; }; diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorAsAnalyzer.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorAsAnalyzer.cc index 1ed3713e561b7..f3a8e041dac9a 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorAsAnalyzer.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorAsAnalyzer.cc @@ -66,15 +66,15 @@ class AlignmentMonitorAsAnalyzer : public edm::EDAnalyzer { public: explicit AlignmentMonitorAsAnalyzer(const edm::ParameterSet&); - ~AlignmentMonitorAsAnalyzer(); + ~AlignmentMonitorAsAnalyzer() override; typedef std::pair ConstTrajTrackPair; typedef std::vector ConstTrajTrackPairCollection; private: - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; // ----------member data --------------------------- edm::InputTag m_tjTag; @@ -103,9 +103,9 @@ class AlignmentMonitorAsAnalyzer : public edm::EDAnalyzer { AlignmentMonitorAsAnalyzer::AlignmentMonitorAsAnalyzer(const edm::ParameterSet& iConfig) : m_tjTag(iConfig.getParameter("tjTkAssociationMapTag")) , m_aliParamStoreCfg(iConfig.getParameter("ParameterStore")) - , m_alignableTracker(NULL) - , m_alignableMuon(NULL) - , m_alignmentParameterStore(NULL) + , m_alignableTracker(nullptr) + , m_alignableMuon(nullptr) + , m_alignmentParameterStore(nullptr) { std::vector monitors = iConfig.getUntrackedParameter >( "monitors" ); diff --git a/Alignment/CommonAlignmentProducer/plugins/GlobalTrackerMuonAlignment.cc b/Alignment/CommonAlignmentProducer/plugins/GlobalTrackerMuonAlignment.cc index a6bc8cff6aa4d..3ce672b602f2a 100644 --- a/Alignment/CommonAlignmentProducer/plugins/GlobalTrackerMuonAlignment.cc +++ b/Alignment/CommonAlignmentProducer/plugins/GlobalTrackerMuonAlignment.cc @@ -94,7 +94,7 @@ #include #include -#include +#include #include #include @@ -109,7 +109,7 @@ using namespace reco; class GlobalTrackerMuonAlignment : public edm::EDAnalyzer { public: explicit GlobalTrackerMuonAlignment(const edm::ParameterSet&); - ~GlobalTrackerMuonAlignment(); + ~GlobalTrackerMuonAlignment() override; void analyzeTrackTrack(const edm::Event&, const edm::EventSetup&); void analyzeTrackTrajectory(const edm::Event&, const edm::EventSetup&); @@ -145,9 +145,9 @@ class GlobalTrackerMuonAlignment : public edm::EDAnalyzer { private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- @@ -2993,21 +2993,21 @@ GlobalTrackerMuonAlignment::trackFitter(reco::TrackRef alongTr, reco::TransientT alongTTr.outermostMeasurementState()); this->debugTrajectorySOS(" initialTSOS for theFitter ", initialTSOS); std::cout<<" . . . . . trajVec.size() "<debugTrajectory(" theFitter trajectory ", trajVec[0]); + if(!trajVec.empty()) this->debugTrajectory(" theFitter trajectory ", trajVec[0]); } if(!smooth){ - if(trajVec.size()) trackFittedTSOS = trajVec[0].lastMeasurement().updatedState();} + if(!trajVec.empty()) trackFittedTSOS = trajVec[0].lastMeasurement().updatedState();} else{ std::vector trajSVec; - if (trajVec.size()){ + if (!trajVec.empty()){ if(direction == alongMomentum) trajSVec = theSmoother->trajectories(*(trajVec.begin())); else trajSVec = theSmootherOp->trajectories(*(trajVec.begin())); } if(info) std::cout<<" . . . . trajSVec.size() "<debugTrajectorySOSv("smoothed geom InnermostState", + if(!trajSVec.empty()) this->debugTrajectorySOSv("smoothed geom InnermostState", trajSVec[0].geometricalInnermostState()); - if(trajSVec.size()) trackFittedTSOS = trajSVec[0].geometricalInnermostState(); + if(!trajSVec.empty()) trackFittedTSOS = trajSVec[0].geometricalInnermostState(); } if(info) this->debugTrajectorySOSv(" trackFittedTSOS ", trackFittedTSOS); @@ -3090,21 +3090,21 @@ GlobalTrackerMuonAlignment::muonFitter(reco::TrackRef alongTr, reco::TransientTr alongTTr.outermostMeasurementState()); this->debugTrajectorySOS(" initialTSOS for theFitter ", initialTSOS); std::cout<<" . . . . . trajVec.size() "<debugTrajectory(" theFitter trajectory ", trajVec[0]); + if(!trajVec.empty()) this->debugTrajectory(" theFitter trajectory ", trajVec[0]); } if(!smooth){ - if(trajVec.size()) trackFittedTSOS = trajVec[0].lastMeasurement().updatedState();} + if(!trajVec.empty()) trackFittedTSOS = trajVec[0].lastMeasurement().updatedState();} else{ std::vector trajSVec; - if (trajVec.size()){ + if (!trajVec.empty()){ if(direction == alongMomentum) trajSVec = theSmoother->trajectories(*(trajVec.begin())); else trajSVec = theSmootherOp->trajectories(*(trajVec.begin())); } if(info) std::cout<<" . . . . trajSVec.size() "<debugTrajectorySOSv("smoothed geom InnermostState", + if(!trajSVec.empty()) this->debugTrajectorySOSv("smoothed geom InnermostState", trajSVec[0].geometricalInnermostState()); - if(trajSVec.size()) trackFittedTSOS = trajSVec[0].geometricalInnermostState(); + if(!trajSVec.empty()) trackFittedTSOS = trajSVec[0].geometricalInnermostState(); } } // end of muonFitter diff --git a/Alignment/LaserAlignment/plugins/LaserAlignment.h b/Alignment/LaserAlignment/plugins/LaserAlignment.h index 5ae0d8a403abd..60ef76ff647fa 100644 --- a/Alignment/LaserAlignment/plugins/LaserAlignment.h +++ b/Alignment/LaserAlignment/plugins/LaserAlignment.h @@ -85,11 +85,11 @@ class LaserAlignment : public edm::one::EDProducer { public: explicit LaserAlignment( edm::ParameterSet const& theConf ); - ~LaserAlignment(); - virtual void beginJob() override; - virtual void produce( edm::Event&, edm::EventSetup const& ) override; - virtual void endJob() override; - virtual void endRunProduce(edm::Run&, const edm::EventSetup& ) override; + ~LaserAlignment() override; + void beginJob() override; + void produce( edm::Event&, edm::EventSetup const& ) override; + void endJob() override; + void endRunProduce(edm::Run&, const edm::EventSetup& ) override; /// for debugging & testing only, will disappear.. void testRoutine( void ); diff --git a/Alignment/MuonAlignment/interface/MuonAlignmentInputDB.h b/Alignment/MuonAlignment/interface/MuonAlignmentInputDB.h index 938ee5320b30d..85a6c711e2643 100644 --- a/Alignment/MuonAlignment/interface/MuonAlignmentInputDB.h +++ b/Alignment/MuonAlignment/interface/MuonAlignmentInputDB.h @@ -41,9 +41,9 @@ class MuonAlignmentInputDB: public MuonAlignmentInputMethod { AlignableMuon *newAlignableMuon(const edm::EventSetup &iSetup) const override; private: - MuonAlignmentInputDB(const MuonAlignmentInputDB&); // stop default + MuonAlignmentInputDB(const MuonAlignmentInputDB&) = delete; // stop default - const MuonAlignmentInputDB& operator=(const MuonAlignmentInputDB&); // stop default + const MuonAlignmentInputDB& operator=(const MuonAlignmentInputDB&) = delete; // stop default // ---------- member data -------------------------------- diff --git a/Alignment/MuonAlignment/plugins/MisalignedMuonESProducer.cc b/Alignment/MuonAlignment/plugins/MisalignedMuonESProducer.cc index 421ae7d9792bb..f880d2bb8ef62 100755 --- a/Alignment/MuonAlignment/plugins/MisalignedMuonESProducer.cc +++ b/Alignment/MuonAlignment/plugins/MisalignedMuonESProducer.cc @@ -46,7 +46,7 @@ class MisalignedMuonESProducer: public edm::ESProducer MisalignedMuonESProducer( const edm::ParameterSet & p ); /// Destructor - virtual ~MisalignedMuonESProducer(); + ~MisalignedMuonESProducer() override; /// Produce the misaligned Muon geometry and store it edm::ESProducts< std::shared_ptr, diff --git a/Alignment/OfflineValidation/plugins/TrackerGeometryCompare.h b/Alignment/OfflineValidation/plugins/TrackerGeometryCompare.h index 0830bfecba96e..fc273be67cec1 100644 --- a/Alignment/OfflineValidation/plugins/TrackerGeometryCompare.h +++ b/Alignment/OfflineValidation/plugins/TrackerGeometryCompare.h @@ -59,14 +59,14 @@ class TrackerGeometryCompare: public edm::EDAnalyzer { ); /// Read from DB and print survey info. - virtual void beginJob(); + void beginJob() override; - virtual void endJob(); + void endJob() override; - virtual void analyze( + void analyze( const edm::Event&, const edm::EventSetup& - ); + ) override; private: diff --git a/Alignment/OfflineValidation/plugins/TrackerGeometryIntoNtuples.cc b/Alignment/OfflineValidation/plugins/TrackerGeometryIntoNtuples.cc index 4909ef1db0e93..84c9e6476eb5c 100644 --- a/Alignment/OfflineValidation/plugins/TrackerGeometryIntoNtuples.cc +++ b/Alignment/OfflineValidation/plugins/TrackerGeometryIntoNtuples.cc @@ -74,11 +74,11 @@ class TrackerGeometryIntoNtuples : public edm::EDAnalyzer { public: explicit TrackerGeometryIntoNtuples(const edm::ParameterSet&); - ~TrackerGeometryIntoNtuples(); + ~TrackerGeometryIntoNtuples() override; private: - virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override; + void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override; void addBranches(); @@ -122,7 +122,7 @@ class TrackerGeometryIntoNtuples : public edm::EDAnalyzer { // constructors and destructor // TrackerGeometryIntoNtuples::TrackerGeometryIntoNtuples(const edm::ParameterSet& iConfig) : - theCurrentTracker(0), + theCurrentTracker(nullptr), m_rawid(0), m_x(0.), m_y(0.), m_z(0.), m_alpha(0.), m_beta(0.), m_gamma(0.), @@ -131,7 +131,7 @@ TrackerGeometryIntoNtuples::TrackerGeometryIntoNtuples(const edm::ParameterSet& m_dNpar(0), m_d1(0.), m_d2(0.), m_d3(0.), m_dtype(0), - mp_dpar(0) + mp_dpar(nullptr) { m_outputFile = iConfig.getUntrackedParameter< std::string > ("outputFile"); m_outputTreename = iConfig.getUntrackedParameter< std::string > ("outputTreename"); diff --git a/CommonTools/CandAlgos/interface/NewCandMatcher.h b/CommonTools/CandAlgos/interface/NewCandMatcher.h index e130f9809200c..51edf553dbf3d 100755 --- a/CommonTools/CandAlgos/interface/NewCandMatcher.h +++ b/CommonTools/CandAlgos/interface/NewCandMatcher.h @@ -14,7 +14,7 @@ namespace reco { class CandMatcher : public Matcher { public: CandMatcher(const edm::ParameterSet & cfg ) : Matcher( cfg ) { } - ~CandMatcher() { } + ~CandMatcher() override { } }; } diff --git a/CommonTools/Clustering1D/interface/FsmwClusterizer1D.h b/CommonTools/Clustering1D/interface/FsmwClusterizer1D.h index 24a0a0dcecece..9dd9f9186e9c5 100644 --- a/CommonTools/Clustering1D/interface/FsmwClusterizer1D.h +++ b/CommonTools/Clustering1D/interface/FsmwClusterizer1D.h @@ -22,12 +22,12 @@ class FsmwClusterizer1D : public Clusterizer1D FsmwClusterizer1D ( double fraction = .05, double n_sigma_in = 3., const WeightEstimator & est = TrivialWeightEstimator() ); FsmwClusterizer1D ( const FsmwClusterizer1D & ); - ~FsmwClusterizer1D(); + ~FsmwClusterizer1D() override; std::pair < std::vector < Cluster1D >, std::vector < const T * > > - operator() ( const std::vector< Cluster1D > & ) const; + operator() ( const std::vector< Cluster1D > & ) const override; - virtual FsmwClusterizer1D * clone() const; + FsmwClusterizer1D * clone() const override; private: WeightEstimator * theEstimator; diff --git a/CommonTools/Clustering1D/interface/OutermostClusterizer1D.h b/CommonTools/Clustering1D/interface/OutermostClusterizer1D.h index da405302196d4..31951eff4fb03 100644 --- a/CommonTools/Clustering1D/interface/OutermostClusterizer1D.h +++ b/CommonTools/Clustering1D/interface/OutermostClusterizer1D.h @@ -25,12 +25,12 @@ class OutermostClusterizer1D : public Clusterizer1D OutermostClusterizer1D ( const WeightEstimator & est = TrivialWeightEstimator() ); OutermostClusterizer1D ( const OutermostClusterizer1D & ); - ~OutermostClusterizer1D(); + ~OutermostClusterizer1D() override; std::pair < std::vector < Cluster1D >, std::vector < const T * > > - operator() ( const std::vector< Cluster1D > & ) const; + operator() ( const std::vector< Cluster1D > & ) const override; - virtual OutermostClusterizer1D * clone() const; + OutermostClusterizer1D * clone() const override; private: WeightEstimator * theEstimator; diff --git a/CommonTools/Clustering1D/interface/TrivialWeightEstimator.h b/CommonTools/Clustering1D/interface/TrivialWeightEstimator.h index 67c9d4c50c54e..5b21a271ab2d4 100644 --- a/CommonTools/Clustering1D/interface/TrivialWeightEstimator.h +++ b/CommonTools/Clustering1D/interface/TrivialWeightEstimator.h @@ -13,12 +13,12 @@ template class TrivialWeightEstimator : public WeightEstimator { public: - double weight ( const std::vector < const T * > & ) const + double weight ( const std::vector < const T * > & ) const override { return 1.0; } - TrivialWeightEstimator * clone () const + TrivialWeightEstimator * clone () const override { return new TrivialWeightEstimator ( *this ); }; diff --git a/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h b/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h index 9efb946445a3f..fe9a72973284a 100644 --- a/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h +++ b/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h @@ -177,7 +177,7 @@ class ConditionDBWriter : public edm::EDAnalyzer { edm::LogError("ConditionDBWriter::endJob(): ERROR - only SinceAppendMode support!!!!"); } - virtual ~ConditionDBWriter() + ~ConditionDBWriter() override { edm::LogInfo("ConditionDBWriter::~ConditionDBWriter()") << std::endl; } @@ -204,9 +204,9 @@ class ConditionDBWriter : public edm::EDAnalyzer { //Will be called at the end of the job virtual void algoEndJob(){}; - void beginJob() {} + void beginJob() override {} - void beginRun(const edm::Run & run, const edm::EventSetup & es) + void beginRun(const edm::Run & run, const edm::EventSetup & es) override { if( firstRun_ ) { edm::LogInfo("ConditionDBWriter::beginJob") << std::endl; @@ -223,14 +223,14 @@ class ConditionDBWriter : public edm::EDAnalyzer { algoBeginRun(run,es); } - void beginLuminosityBlock(const edm::LuminosityBlock & lumiBlock, const edm::EventSetup & iSetup) + void beginLuminosityBlock(const edm::LuminosityBlock & lumiBlock, const edm::EventSetup & iSetup) override { edm::LogInfo("ConditionDBWriter::beginLuminosityBlock") << std::endl; if(LumiBlockMode_ && SinceAppendMode_) setSinceTime_=true; algoBeginLuminosityBlock(lumiBlock, iSetup); } - void analyze(const edm::Event& event, const edm::EventSetup& iSetup) + void analyze(const edm::Event& event, const edm::EventSetup& iSetup) override { if(setSinceTime_ ){ setTime(); //set new since time for possible next upload to DB @@ -239,7 +239,7 @@ class ConditionDBWriter : public edm::EDAnalyzer { algoAnalyze(event, iSetup); } - void endLuminosityBlock(const edm::LuminosityBlock & lumiBlock, const edm::EventSetup & es) + void endLuminosityBlock(const edm::LuminosityBlock & lumiBlock, const edm::EventSetup & es) override { edm::LogInfo("ConditionDBWriter::endLuminosityBlock") << std::endl; algoEndLuminosityBlock(lumiBlock, es); @@ -259,7 +259,7 @@ class ConditionDBWriter : public edm::EDAnalyzer { virtual void algoEndLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &){}; - void endRun(const edm::Run & run, const edm::EventSetup & es) + void endRun(const edm::Run & run, const edm::EventSetup & es) override { edm::LogInfo("ConditionDBWriter::endRun") << std::endl; @@ -279,7 +279,7 @@ class ConditionDBWriter : public edm::EDAnalyzer { } } - void endJob() + void endJob() override { edm::LogInfo("ConditionDBWriter::endJob") << std::endl; @@ -349,7 +349,7 @@ class ConditionDBWriter : public edm::EDAnalyzer { void storeOnDbNow() { - T * objPointer = 0; + T * objPointer = nullptr; if(AlgoDrivenMode_){ diff --git a/CommonTools/UtilAlgos/interface/InputTagDistributor.h b/CommonTools/UtilAlgos/interface/InputTagDistributor.h index ccad12a1a6479..bfe87037646d9 100644 --- a/CommonTools/UtilAlgos/interface/InputTagDistributor.h +++ b/CommonTools/UtilAlgos/interface/InputTagDistributor.h @@ -60,7 +60,7 @@ class InputTagDistributorService{ if (f != multipleInstance_.end()) SetInputTagDistributorUniqueInstance_ = f->second; else{ //do not say anything but set it to zero to get a safe crash in get() if ever called - SetInputTagDistributorUniqueInstance_=0;} + SetInputTagDistributorUniqueInstance_=nullptr;} } /* InputTagDistributor & set(std::string & user){ std::map::iterator f=multipleInstance_.find(user); @@ -83,7 +83,7 @@ class InputTagDistributorService{ edm::InputTag retrieve(std::string src,const edm::ParameterSet & pset){ //if used without setting any InputTag mapping - if (multipleInstance_.size()==0) + if (multipleInstance_.empty()) return pset.getParameter(src); // some mapping was setup diff --git a/CommonTools/UtilAlgos/interface/NewMatcher.h b/CommonTools/UtilAlgos/interface/NewMatcher.h index 0dd0c9457f575..26ae4045984b3 100755 --- a/CommonTools/UtilAlgos/interface/NewMatcher.h +++ b/CommonTools/UtilAlgos/interface/NewMatcher.h @@ -24,7 +24,7 @@ namespace reco { class Matcher : public edm::EDProducer { public: Matcher(const edm::ParameterSet & cfg); - ~Matcher(); + ~Matcher() override; private: typedef typename C1::value_type T1; typedef typename C2::value_type T2; @@ -90,7 +90,7 @@ namespace reco { if (dist < distMin_) v.push_back(make_pair(m, dist)); } } - if(v.size() > 0) { + if(!v.empty()) { size_t idx = master.index(c); assert(idx < indices.size()); indices[idx] = min_element(v.begin(), v.end(), helper::SortBySecond())->first; diff --git a/CommonTools/UtilAlgos/interface/PhysObjectMatcher.h b/CommonTools/UtilAlgos/interface/PhysObjectMatcher.h index b4f2ded3d5bb1..f5564f15fbed4 100644 --- a/CommonTools/UtilAlgos/interface/PhysObjectMatcher.h +++ b/CommonTools/UtilAlgos/interface/PhysObjectMatcher.h @@ -63,7 +63,7 @@ namespace reco { class PhysObjectMatcher : public edm::stream::EDProducer<> { public: PhysObjectMatcher(const edm::ParameterSet & cfg); - ~PhysObjectMatcher(); + ~PhysObjectMatcher() override; private: typedef typename C1::value_type T1; typedef typename C2::value_type T2; @@ -148,7 +148,7 @@ namespace reco { } } // if match(es) found and no global ambiguity resolution requested - if ( matchPairs.size()>0 && !resolveByMatchQuality_ ) { + if ( !matchPairs.empty() && !resolveByMatchQuality_ ) { // look for and store best match size_t idx = master.index(c); assert(idx < indices.size()); diff --git a/CommonTools/UtilAlgos/interface/SingleObjectRefSelector.h b/CommonTools/UtilAlgos/interface/SingleObjectRefSelector.h index d2cf29689ab96..70a8fd4a71d05 100644 --- a/CommonTools/UtilAlgos/interface/SingleObjectRefSelector.h +++ b/CommonTools/UtilAlgos/interface/SingleObjectRefSelector.h @@ -25,7 +25,7 @@ class SingleObjectRefSelector : explicit SingleObjectRefSelector(const edm::ParameterSet & cfg) : ObjectSelector, OutputCollection, NonNullNumberSelector, PostProcessor>( cfg ) { } - virtual ~SingleObjectRefSelector() { } + ~SingleObjectRefSelector() override { } }; #endif diff --git a/CommonTools/UtilAlgos/interface/StringCutEventSelector.h b/CommonTools/UtilAlgos/interface/StringCutEventSelector.h index d64041a98bb4e..6aacda39cee66 100644 --- a/CommonTools/UtilAlgos/interface/StringCutEventSelector.h +++ b/CommonTools/UtilAlgos/interface/StringCutEventSelector.h @@ -20,7 +20,7 @@ class StringCutEventSelector : public EventSelector { f_(pset.getParameter("cut")), //put this guy to 0 to do the check on "all" object in the collection nFirst_(pset.getParameter("nFirst")), - order_(0) + order_(nullptr) { std::stringstream ss; ss<<"string cut based selection on collection: "<( pset.getParameter("order")); } - bool select (const edm::Event& e) const{ + bool select (const edm::Event& e) const override{ edm::Handle > oH; e.getByToken(srcToken_, oH); std::vector copyToSort(oH->size()); @@ -77,7 +77,7 @@ class StringCutsEventSelector : public EventSelector { EventSelector(pset, iC), src_(edm::Service()->retrieve("src",pset)), srcToken_(iC.consumes >(src_)), - order_(0) + order_(nullptr) { std::vector selection=pset.getParameter >("cut"); std::stringstream ss; @@ -92,23 +92,23 @@ class StringCutsEventSelector : public EventSelector { } else { - f_.push_back(0); + f_.push_back(nullptr); ss<<"["<( pset.getParameter("order")); } - ~StringCutsEventSelector(){ + ~StringCutsEventSelector() override{ unsigned int i=0; for (;i!=f_.size();i++) if (f_[i]){ - delete f_[i];f_[i]=0; + delete f_[i];f_[i]=nullptr; } if (order_) delete order_; } - bool select (const edm::Event& e) const{ + bool select (const edm::Event& e) const override{ edm::Handle > oH; e.getByToken(srcToken_, oH); std::vector copyToSort(oH->size()); diff --git a/CondCore/PopCon/interface/PopConAnalyzer.h b/CondCore/PopCon/interface/PopConAnalyzer.h index 079fad23afa7b..f38306caf552a 100644 --- a/CondCore/PopCon/interface/PopConAnalyzer.h +++ b/CondCore/PopCon/interface/PopConAnalyzer.h @@ -25,16 +25,16 @@ namespace popcon{ m_source(pset.getParameter("Source")) {} - virtual ~PopConAnalyzer(){} + ~PopConAnalyzer() override{} private: - virtual void beginJob(){} - virtual void endJob() { + void beginJob() override{} + void endJob() override { write(); } - virtual void analyze(const edm::Event&, const edm::EventSetup&){} + void analyze(const edm::Event&, const edm::EventSetup&) override{} void write() { diff --git a/CondCore/PopCon/interface/PopConSourceHandler.h b/CondCore/PopCon/interface/PopConSourceHandler.h index 351f603e7abb6..eabb50d7b1810 100644 --- a/CondCore/PopCon/interface/PopConSourceHandler.h +++ b/CondCore/PopCon/interface/PopConSourceHandler.h @@ -88,8 +88,8 @@ namespace popcon { PopConSourceHandler(): - m_tagInfo(0), - m_logDBEntry(0) + m_tagInfo(nullptr), + m_logDBEntry(nullptr) {} virtual ~PopConSourceHandler(){ diff --git a/CondTools/L1Trigger/interface/L1ConfigOnlineProdBase.h b/CondTools/L1Trigger/interface/L1ConfigOnlineProdBase.h index f103729783145..9e947df43607c 100644 --- a/CondTools/L1Trigger/interface/L1ConfigOnlineProdBase.h +++ b/CondTools/L1Trigger/interface/L1ConfigOnlineProdBase.h @@ -52,7 +52,7 @@ template< class TRcd, class TData > class L1ConfigOnlineProdBase : public edm::ESProducer { public: L1ConfigOnlineProdBase(const edm::ParameterSet&); - ~L1ConfigOnlineProdBase(); + ~L1ConfigOnlineProdBase() override; virtual std::shared_ptr< TData > produce(const TRcd& iRecord); diff --git a/CondTools/L1TriggerExt/interface/L1ConfigOnlineProdBaseExt.h b/CondTools/L1TriggerExt/interface/L1ConfigOnlineProdBaseExt.h index 417affbf86194..b4b6d6eb59923 100644 --- a/CondTools/L1TriggerExt/interface/L1ConfigOnlineProdBaseExt.h +++ b/CondTools/L1TriggerExt/interface/L1ConfigOnlineProdBaseExt.h @@ -33,7 +33,7 @@ template< class TRcd, class TData > class L1ConfigOnlineProdBaseExt : public edm::ESProducer { public: L1ConfigOnlineProdBaseExt(const edm::ParameterSet&); - ~L1ConfigOnlineProdBaseExt(); + ~L1ConfigOnlineProdBaseExt() override; std::shared_ptr< TData > produce(const TRcd& iRecord); diff --git a/DataFormats/BTauReco/interface/CATopJetTagInfo.h b/DataFormats/BTauReco/interface/CATopJetTagInfo.h index 576cacd9f5a96..78c71482b6072 100644 --- a/DataFormats/BTauReco/interface/CATopJetTagInfo.h +++ b/DataFormats/BTauReco/interface/CATopJetTagInfo.h @@ -40,9 +40,9 @@ class CATopJetProperties { CATopJetTagInfo(void) {} - virtual ~CATopJetTagInfo(void) {} + ~CATopJetTagInfo(void) override {} - virtual CATopJetTagInfo* clone(void) const { return new CATopJetTagInfo(*this); } + CATopJetTagInfo* clone(void) const override { return new CATopJetTagInfo(*this); } const properties_type & properties() const { return properties_; diff --git a/DataFormats/BTauReco/interface/CombinedTauTagInfo.h b/DataFormats/BTauReco/interface/CombinedTauTagInfo.h index ddaf316d0d636..166b67d64cba2 100644 --- a/DataFormats/BTauReco/interface/CombinedTauTagInfo.h +++ b/DataFormats/BTauReco/interface/CombinedTauTagInfo.h @@ -9,7 +9,7 @@ */ #include -#include +#include #include "CLHEP/Vector/LorentzVector.h" #include "DataFormats/BTauReco/interface/RefMacros.h" #include "DataFormats/JetReco/interface/Jet.h" @@ -52,7 +52,7 @@ namespace reco { theECALEt_o_leadTkPt=NAN; theHCALEt_o_leadTkPt=NAN; } - virtual ~CombinedTauTagInfo() {}; + ~CombinedTauTagInfo() override {}; // float discriminator() returns 0. if candidate did not pass tracker selection, // 1. if candidate passed tracker selection and did not contain neutral ECAL clus., @@ -89,7 +89,7 @@ namespace reco { const TrackRefVector& isolTks() const { return isol_Tks_; } void setisolTks(const TrackRefVector& x) { isol_Tks_=x; } - virtual CombinedTauTagInfo* clone() const{return new CombinedTauTagInfo(*this );} + CombinedTauTagInfo* clone() const override{return new CombinedTauTagInfo(*this );} bool passed_trackerselection()const{return(thecandidate_passed_trackerselection);} void setpassed_trackerselection(bool x){thecandidate_passed_trackerselection=x;} diff --git a/DataFormats/BTauReco/interface/EMIsolatedTauTagInfo.h b/DataFormats/BTauReco/interface/EMIsolatedTauTagInfo.h index 1ae08dcb4b3bb..3ecee95581502 100644 --- a/DataFormats/BTauReco/interface/EMIsolatedTauTagInfo.h +++ b/DataFormats/BTauReco/interface/EMIsolatedTauTagInfo.h @@ -25,11 +25,11 @@ namespace reco { m_jetCrystalsAssociation( jetCrystals ) { } // destructor - virtual ~EMIsolatedTauTagInfo() { }; - virtual EMIsolatedTauTagInfo* clone() const { return new EMIsolatedTauTagInfo( * this ); } + ~EMIsolatedTauTagInfo() override { }; + EMIsolatedTauTagInfo* clone() const override { return new EMIsolatedTauTagInfo( * this ); } // get the jet from the jetTag - virtual edm::RefToBase jet() const { return m_jetCrystalsAssociation->first; } + edm::RefToBase jet() const override { return m_jetCrystalsAssociation->first; } virtual EMLorentzVectorRefVector lorentzVectorRecHits() const { return m_jetCrystalsAssociation->second; } const JetCrystalsAssociationRef & jcaRef() const { return m_jetCrystalsAssociation; } diff --git a/DataFormats/BTauReco/interface/HTTTopJetTagInfo.h b/DataFormats/BTauReco/interface/HTTTopJetTagInfo.h index 8f401b58b5cb6..d78a57a62cf9a 100644 --- a/DataFormats/BTauReco/interface/HTTTopJetTagInfo.h +++ b/DataFormats/BTauReco/interface/HTTTopJetTagInfo.h @@ -73,9 +73,9 @@ class HTTTopJetProperties { HTTTopJetTagInfo(void) {} - virtual ~HTTTopJetTagInfo(void) {} + ~HTTTopJetTagInfo(void) override {} - virtual HTTTopJetTagInfo* clone(void) const { return new HTTTopJetTagInfo(*this); } + HTTTopJetTagInfo* clone(void) const override { return new HTTTopJetTagInfo(*this); } const properties_type & properties() const { return properties_; diff --git a/DataFormats/BTauReco/interface/ShallowTagInfo.h b/DataFormats/BTauReco/interface/ShallowTagInfo.h index 422335602a1eb..3713f412d8157 100644 --- a/DataFormats/BTauReco/interface/ShallowTagInfo.h +++ b/DataFormats/BTauReco/interface/ShallowTagInfo.h @@ -19,13 +19,13 @@ class ShallowTagInfo : public BaseTagInfo { list_(list), jetRef_(jetref) { } - virtual ~ShallowTagInfo(void) { } + ~ShallowTagInfo(void) override { } - virtual ShallowTagInfo* clone(void) const { return new ShallowTagInfo(*this); } + ShallowTagInfo* clone(void) const override { return new ShallowTagInfo(*this); } - virtual edm::RefToBase jet(void) const { return jetRef_; } + edm::RefToBase jet(void) const override { return jetRef_; } - virtual TaggingVariableList taggingVariables(void) const { return list_; } + TaggingVariableList taggingVariables(void) const override { return list_; } protected: /*const*/ TaggingVariableList list_; diff --git a/DataFormats/Candidate/interface/CandidateWithRef.h b/DataFormats/Candidate/interface/CandidateWithRef.h index 00c9cf952517e..4ec2e30dba526 100755 --- a/DataFormats/Candidate/interface/CandidateWithRef.h +++ b/DataFormats/Candidate/interface/CandidateWithRef.h @@ -25,9 +25,9 @@ namespace reco { CandidateWithRef( const LorentzVector & p4, Charge q = 0, const Point & vtx = Point( 0, 0, 0 ) ) : LeafCandidate( q, p4, vtx ) { } /// destructor - virtual ~CandidateWithRef(); + ~CandidateWithRef() override; /// returns a clone of the candidate - virtual CandidateWithRef * clone() const; + CandidateWithRef * clone() const override; /// set reference void setRef( const Ref & r ) { ref_ = r; } /// reference @@ -37,7 +37,7 @@ namespace reco { private: /// check overlap with another candidate - virtual bool overlap( const Candidate & ) const; + bool overlap( const Candidate & ) const override; /// reference to a CaloRecHit reference ref_; }; diff --git a/DataFormats/Candidate/interface/component.h b/DataFormats/Candidate/interface/component.h index 509b1bba5abbf..e2614ad13e247 100755 --- a/DataFormats/Candidate/interface/component.h +++ b/DataFormats/Candidate/interface/component.h @@ -26,7 +26,7 @@ namespace reco { struct SingleComponent { static T get( const Candidate & c ) { const C * dc = dynamic_cast( & c ); - if ( dc == 0 ) return T(); + if ( dc == nullptr ) return T(); return (dc->*F)(); } }; diff --git a/DataFormats/Common/interface/AssociationMap.h b/DataFormats/Common/interface/AssociationMap.h index a5249821f3fe2..18baf194063e9 100644 --- a/DataFormats/Common/interface/AssociationMap.h +++ b/DataFormats/Common/interface/AssociationMap.h @@ -78,7 +78,7 @@ namespace edm { typedef value_type * pointer; typedef value_type & reference; typedef typename map_type::const_iterator::iterator_category iterator_category; - const_iterator(): map_(0) { } + const_iterator(): map_(nullptr) { } const_iterator(const self * map, typename map_type::const_iterator mi) : map_(map), i(mi) { } const_iterator& operator++() { ++i; return *this; } diff --git a/DataFormats/Common/interface/BaseVectorHolder.h b/DataFormats/Common/interface/BaseVectorHolder.h index 09fd3d5c0f2a8..62db06eb607b5 100644 --- a/DataFormats/Common/interface/BaseVectorHolder.h +++ b/DataFormats/Common/interface/BaseVectorHolder.h @@ -54,9 +54,9 @@ namespace edm { typedef std::unique_ptr pointer; typedef std::ptrdiff_t difference_type; - const_iterator() : i(0) { } + const_iterator() : i(nullptr) { } const_iterator(const_iterator_imp* it) : i(it) { } - const_iterator(const_iterator const& it) : i(it.isValid() ? it.i->clone() : 0) { } + const_iterator(const_iterator const& it) : i(it.isValid() ? it.i->clone() : nullptr) { } ~const_iterator() { delete i; } const_iterator& operator=(const_iterator const& it) { if(this == &it) { @@ -137,8 +137,8 @@ namespace edm { i->decrease(d); return *this; } - bool isValid() const { return i != 0; } - bool isInvalid() const { return i == 0; } + bool isValid() const { return i != nullptr; } + bool isInvalid() const { return i == nullptr; } void throwInvalidReference(bool iIsInvalid, char const* iWhy) const { if (iIsInvalid) { diff --git a/DataFormats/Common/interface/DetSetNew.h b/DataFormats/Common/interface/DetSetNew.h index 23ca02010f2aa..55366378f5829 100644 --- a/DataFormats/Common/interface/DetSetNew.h +++ b/DataFormats/Common/interface/DetSetNew.h @@ -34,7 +34,7 @@ namespace edmNew { inline - DetSet() : m_id(0), m_data(0), m_offset(-1), m_size(0){} + DetSet() : m_id(0), m_data(nullptr), m_offset(-1), m_size(0){} inline DetSet(id_type i, DataContainer const & idata, size_type ioffset, size_type isize) : m_id(i), m_data(&idata), m_offset(ioffset), m_size(isize) {} @@ -42,7 +42,7 @@ namespace edmNew { inline DetSet(Container const & icont, typename Container::Item const & item, bool update) : - m_id(0), m_data(0), m_offset(-1), m_size(0){ + m_id(0), m_data(nullptr), m_offset(-1), m_size(0){ set(icont,item, update); } @@ -106,7 +106,7 @@ namespace edmNew { data_type const * data() const { if(m_offset|m_size) assert(m_data); - return m_data ? (&((*m_data)[m_offset])) : 0; + return m_data ? (&((*m_data)[m_offset])) : nullptr; } data_type * data() { diff --git a/DataFormats/Common/interface/DetSetVectorNew.h b/DataFormats/Common/interface/DetSetVectorNew.h index 61a754e23e5e8..034737582b5d4 100644 --- a/DataFormats/Common/interface/DetSetVectorNew.h +++ b/DataFormats/Common/interface/DetSetVectorNew.h @@ -172,7 +172,7 @@ namespace edmNew { struct IterHelp { typedef DetSet result_type; // IterHelp() : v(0),update(true){} - IterHelp() : m_v(0),m_update(false){} + IterHelp() : m_v(nullptr),m_update(false){} IterHelp(DetSetVector const & iv, bool iup) : m_v(&iv), m_update(iup){} result_type & operator()(Item const& item) const { diff --git a/DataFormats/Common/interface/OwnVector.h b/DataFormats/Common/interface/OwnVector.h index 903bd6110009d..63340f5ab97c1 100644 --- a/DataFormats/Common/interface/OwnVector.h +++ b/DataFormats/Common/interface/OwnVector.h @@ -394,7 +394,7 @@ namespace edm { template inline typename OwnVector::reference OwnVector::back() { T* result = data_.back(); - if (result == 0) { + if (result == nullptr) { Exception::throwThis(errors::NullPointerError, "In OwnVector::back() we have intercepted an attempt to dereference a null pointer\n" "Since OwnVector is allowed to contain null pointers, you much assure that the\n" @@ -487,7 +487,7 @@ namespace edm { size_type key = 0; for(typename base::const_iterator i=data_.begin(), e=data_.end(); i!=e; ++i, ++key) { - if (*i == 0) { + if (*i == nullptr) { Exception::throwThis(errors::NullPointerError, "In OwnVector::fillView() we have intercepted an attempt to put a null pointer\n" "into a View and that is not allowed. It is probably an error that the null\n" diff --git a/DataFormats/Common/interface/Ptr.h b/DataFormats/Common/interface/Ptr.h index 40ec44e534952..0fa5165720aed 100644 --- a/DataFormats/Common/interface/Ptr.h +++ b/DataFormats/Common/interface/Ptr.h @@ -52,7 +52,7 @@ namespace edm { // General purpose constructor from orphan handle. template Ptr(OrphanHandle const& handle, key_type itemKey, bool /*setNow*/ = true): - core_(handle.id(), getItem_(handle.product(), itemKey), 0, false), key_(itemKey) {} + core_(handle.id(), getItem_(handle.product(), itemKey), nullptr, false), key_(itemKey) {} // General purpose "constructor" from a Ref. // Use the conversion function template: @@ -136,10 +136,10 @@ namespace edm { template explicit - Ptr(Ptr const& iOther, std::enable_if_t::value> * = 0): + Ptr(Ptr const& iOther, std::enable_if_t::value> * = nullptr): core_(iOther.id(), dynamic_cast(iOther.get()), - 0, + nullptr, iOther.isTransient()), key_(iOther.key()) { } diff --git a/DataFormats/Common/interface/PtrVector.h b/DataFormats/Common/interface/PtrVector.h index 1e6ecf7f76754..2337fd46d2238 100644 --- a/DataFormats/Common/interface/PtrVector.h +++ b/DataFormats/Common/interface/PtrVector.h @@ -187,7 +187,7 @@ namespace edm { pointers.reserve(this->size()); for (const_iterator i = begin(), e = end(); i != e; ++i) { Ptr ref = *i; - T const* address = ref.isNull() ? 0 : &*ref; + T const* address = ref.isNull() ? nullptr : &*ref; pointers.push_back(address); helpers.push_back(FillViewHelperVector::value_type(ref.id(),ref.key())); } diff --git a/DataFormats/Common/interface/Ref.h b/DataFormats/Common/interface/Ref.h index 7b16baac0f18a..62b26618f8ca7 100644 --- a/DataFormats/Common/interface/Ref.h +++ b/DataFormats/Common/interface/Ref.h @@ -216,7 +216,7 @@ namespace edm { { } Ref(ProductID const& iProductID, T const* item, key_type itemKey, bool transient) : - product_(iProductID, item, 0, transient), index_(itemKey) + product_(iProductID, item, nullptr, transient), index_(itemKey) { } /// Constructor that creates an invalid ("null") Ref that is @@ -243,7 +243,7 @@ namespace edm { /// Returns C++ pointer to the item T const* get() const { - return isNull() ? 0 : this->operator->(); + return isNull() ? nullptr : this->operator->(); } /// Checks for null diff --git a/DataFormats/Common/interface/RefProd.h b/DataFormats/Common/interface/RefProd.h index 257a67c442349..6b8ca574ce677 100644 --- a/DataFormats/Common/interface/RefProd.h +++ b/DataFormats/Common/interface/RefProd.h @@ -117,7 +117,7 @@ namespace edm { /// Returns C++ pointer to the product /// Will attempt to retrieve product product_type const* product() const { - return isNull() ? 0 : this->operator->(); + return isNull() ? nullptr : this->operator->(); } RefCore const& refCore() const { diff --git a/DataFormats/Common/interface/RefToBaseProd.h b/DataFormats/Common/interface/RefToBaseProd.h index 55f0aff88d218..c3ad5becd3b23 100644 --- a/DataFormats/Common/interface/RefToBaseProd.h +++ b/DataFormats/Common/interface/RefToBaseProd.h @@ -104,7 +104,7 @@ namespace edm { template inline RefToBaseProd::RefToBaseProd(Handle > const& handle) : - product_(handle.id(), 0, 0, false){ + product_(handle.id(), nullptr, nullptr, false){ product_.setProductPtr(new View(* handle)); } @@ -113,7 +113,7 @@ namespace edm { RefToBaseProd::RefToBaseProd(const RefToBaseProd& ref) : product_(ref.product_) { if(product_.productPtr()) { - product_.setProductPtr(ref.viewPtr() ? (new View(* ref)) : 0); + product_.setProductPtr(ref.viewPtr() ? (new View(* ref)) : nullptr); } } @@ -211,11 +211,11 @@ namespace edm { template inline RefToBaseProd::RefToBaseProd(Handle const& handle) : - product_(handle.id(), handle.product(), 0, false) { + product_(handle.id(), handle.product(), nullptr, false) { std::vector pointers; FillViewHelperVector helpers; fillView(* handle, handle.id(), pointers, helpers); - product_.setProductPtr(new View(pointers, helpers,0)); + product_.setProductPtr(new View(pointers, helpers,nullptr)); } template diff --git a/DataFormats/Common/interface/RefToBaseVector.h b/DataFormats/Common/interface/RefToBaseVector.h index b8c33b1d9bd9f..bfc58a95a135c 100644 --- a/DataFormats/Common/interface/RefToBaseVector.h +++ b/DataFormats/Common/interface/RefToBaseVector.h @@ -240,7 +240,7 @@ namespace edm { helpers.reserve(this->size()); for (const_iterator i=begin(), e=end(); i!=e; ++i) { RefToBase ref = * i; - member_type const * address = ref.isNull() ? 0 : & * ref; + member_type const * address = ref.isNull() ? nullptr : & * ref; pointers.push_back(address); helpers.push_back(FillViewHelperVector::value_type(ref.id(),ref.key())); } diff --git a/DataFormats/Common/interface/RefVector.h b/DataFormats/Common/interface/RefVector.h index 6150de8088461..add8b0a4c1895 100644 --- a/DataFormats/Common/interface/RefVector.h +++ b/DataFormats/Common/interface/RefVector.h @@ -198,7 +198,7 @@ namespace edm { size_type key = 0; for(const_iterator i=begin(), e=end(); i!=e; ++i, ++key) { - member_type const* address = i->isNull() ? 0 : &**i; + member_type const* address = i->isNull() ? nullptr : &**i; pointers.push_back(address); helpers.emplace_back(i->id(),i->key()); } diff --git a/DataFormats/Common/interface/Trie.h b/DataFormats/Common/interface/Trie.h index d70a6c85c93f8..6e42abd213448 100644 --- a/DataFormats/Common/interface/Trie.h +++ b/DataFormats/Common/interface/Trie.h @@ -46,11 +46,11 @@ namespace edm private: /// avoid default constructor - TrieFactory(); + TrieFactory() = delete; /// avoid copy constructor - TrieFactory(const TrieFactory &e); + TrieFactory(const TrieFactory &e) = delete; /// avoid affectation operator - TrieFactory& operator=(const TrieFactory &e); + TrieFactory& operator=(const TrieFactory &e) = delete; public: TrieNode* newNode(const T &value); @@ -88,9 +88,9 @@ namespace edm private: /// avoid copy constructor - TrieNode(const TrieNode &e); + TrieNode(const TrieNode &e) = delete; /// avoid affectation operator - TrieNode& operator=(const TrieNode &e); + TrieNode& operator=(const TrieNode &e) = delete; public: /// set value associed to node @@ -186,11 +186,11 @@ namespace edm private: /// avoid default constructor - Trie(); + Trie() = delete; /// avoid copy constructor - Trie(const Trie &e); + Trie(const Trie &e) = delete; /// avoid affectation operator - Trie& operator=(const Trie &e); + Trie& operator=(const Trie &e) = delete; public: /// add an entry in the Trie, if entry already exist an exception diff --git a/DataFormats/Common/interface/Wrapper.h b/DataFormats/Common/interface/Wrapper.h index a1e834661e0ca..3dbe35acf8177 100644 --- a/DataFormats/Common/interface/Wrapper.h +++ b/DataFormats/Common/interface/Wrapper.h @@ -85,7 +85,7 @@ namespace edm { template Wrapper::Wrapper(std::unique_ptr ptr) : WrapperBase(), - present(ptr.get() != 0), + present(ptr.get() != nullptr), obj() { if (present) { // The following will call swap if T has such a function, diff --git a/DataFormats/DTDigi/interface/DTControlData.h b/DataFormats/DTDigi/interface/DTControlData.h index 78ee5c8b925b9..5e3ca97c0bb42 100644 --- a/DataFormats/DTDigi/interface/DTControlData.h +++ b/DataFormats/DTDigi/interface/DTControlData.h @@ -115,8 +115,8 @@ class DTDDUData { {} DTDDUData(): - theDDUHeader(0), - theDDUTrailer(0), + theDDUHeader(nullptr), + theDDUTrailer(nullptr), crcErrorBitSet(false) {} diff --git a/DataFormats/EcalDetId/interface/EcalContainer.h b/DataFormats/EcalDetId/interface/EcalContainer.h index 5f736b0d07510..921b623a41a09 100644 --- a/DataFormats/EcalDetId/interface/EcalContainer.h +++ b/DataFormats/EcalDetId/interface/EcalContainer.h @@ -51,7 +51,7 @@ class EcalContainer { void checkAndResize() { - if (m_items.size()==0) { + if (m_items.empty()) { // std::cout << "resizing to " << DetId::kSizeForDenseIndexing << std::endl; m_items.resize(DetId::kSizeForDenseIndexing); } @@ -60,7 +60,7 @@ class EcalContainer { void checkAndResize( size_t priv_size ) { // this method allows to resize the vector to a specific size forcing a specific value - if (m_items.size()==0) { + if (m_items.empty()) { // std::cout << "resizing to " << priv_size << std::endl; m_items.resize(priv_size); } diff --git a/DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h b/DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h index 3157d6fc00763..5d1f8c6b03202 100644 --- a/DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h +++ b/DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h @@ -12,12 +12,12 @@ class DeepCopyPointerByClone { public: ~DeepCopyPointerByClone() { delete theData;} - DeepCopyPointerByClone() : theData(0) {} + DeepCopyPointerByClone() : theData(nullptr) {} DeepCopyPointerByClone( T* t) : theData(t) {} DeepCopyPointerByClone( const DeepCopyPointerByClone& other) { - if (other.theData) theData = other->clone(); else theData = 0; + if (other.theData) theData = other->clone(); else theData = nullptr; } diff --git a/DataFormats/GeometrySurface/interface/OpenBounds.h b/DataFormats/GeometrySurface/interface/OpenBounds.h index 161aacfd20f41..dd1aed8ec5743 100644 --- a/DataFormats/GeometrySurface/interface/OpenBounds.h +++ b/DataFormats/GeometrySurface/interface/OpenBounds.h @@ -10,23 +10,23 @@ class OpenBounds final : public Bounds { public: - virtual float length() const { return 1000000.; } - virtual float width() const { return 1000000.; } - virtual float thickness() const { return 1000000.; } + float length() const override { return 1000000.; } + float width() const override { return 1000000.; } + float thickness() const override { return 1000000.; } // basic bounds function using Bounds::inside; - virtual bool inside( const Local3DPoint& p ) const { return true;} + bool inside( const Local3DPoint& p ) const override { return true;} - virtual bool inside( const Local3DPoint& p, - const LocalError& err, float scale) const { return true;} + bool inside( const Local3DPoint& p, + const LocalError& err, float scale) const override { return true;} - virtual bool inside( const Local2DPoint& p, - const LocalError& err, float scale) const { return true;} + bool inside( const Local2DPoint& p, + const LocalError& err, float scale) const override { return true;} - virtual Bounds* clone() const { return new OpenBounds();} + Bounds* clone() const override { return new OpenBounds();} }; diff --git a/DataFormats/GeometrySurface/interface/SimpleConeBounds.h b/DataFormats/GeometrySurface/interface/SimpleConeBounds.h index 4f7089a783655..057d2504ed7c2 100644 --- a/DataFormats/GeometrySurface/interface/SimpleConeBounds.h +++ b/DataFormats/GeometrySurface/interface/SimpleConeBounds.h @@ -38,24 +38,24 @@ class SimpleConeBounds final : public Bounds { } /// Length along Z. - virtual float length() const { return theZmax - theZmin;} + float length() const override { return theZmax - theZmin;} /// Maximum diameter. - virtual float width() const { return 2*std::max(theRmaxZmin,theRmaxZmax);} + float width() const override { return 2*std::max(theRmaxZmin,theRmaxZmax);} /// Thickness in the middle (Z center). /// Maybe it's useless, but it is pure abstract in Bounds... - virtual float thickness() const { return ((theRmaxZmin-theRminZmin)+ + float thickness() const override { return ((theRmaxZmin-theRminZmin)+ (theRmaxZmax-theRminZmax))/2.;} using Bounds::inside; - virtual bool inside( const Local3DPoint& p) const { + bool inside( const Local3DPoint& p) const override { float lrmin = (p.z()-theZmin)*(theRminZmax-theRminZmin)/(theZmax-theZmin); float lrmax = (p.z()-theZmin)*(theRmaxZmax-theRmaxZmin)/(theZmax-theZmin); return p.z() > theZmin && p.z() < theZmax && p.perp() > lrmin && p.perp() < lrmax; } - virtual bool inside( const Local3DPoint& p, const LocalError& err, float scale) const { + bool inside( const Local3DPoint& p, const LocalError& err, float scale) const override { // std::cout << "WARNING: SimpleConeBounds::inside(const Local3DPoint&, const LocalError not fully implemented" // << std::endl; // FIXME! does not check R. SimpleConeBounds tmp(theZmin - sqrt(err.yy())*scale, @@ -69,7 +69,7 @@ class SimpleConeBounds final : public Bounds { return Bounds::inside(p,err); } - virtual Bounds* clone() const { + Bounds* clone() const override { return new SimpleConeBounds(*this); } diff --git a/DataFormats/Histograms/interface/MEtoEDMFormat.h b/DataFormats/Histograms/interface/MEtoEDMFormat.h index bcb5eb4c23086..3f93e8a7e0fbd 100644 --- a/DataFormats/Histograms/interface/MEtoEDMFormat.h +++ b/DataFormats/Histograms/interface/MEtoEDMFormat.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #define METOEDMFORMAT_DEBUG 0 diff --git a/DataFormats/JetReco/interface/FFTAnyJet.h b/DataFormats/JetReco/interface/FFTAnyJet.h index 2db6cd23d6c0a..b83a048896f54 100644 --- a/DataFormats/JetReco/interface/FFTAnyJet.h +++ b/DataFormats/JetReco/interface/FFTAnyJet.h @@ -19,12 +19,12 @@ namespace reco { typedef AnyJet Base; inline FFTAnyJet() : AnyJet(), fftJetSpecific_() {} - inline virtual ~FFTAnyJet() {} + inline ~FFTAnyJet() override {} inline FFTAnyJet(const AnyJet& jet, const FFTJet& fftjet) : AnyJet(jet), fftJetSpecific_(fftjet) {} - inline virtual FFTAnyJet* clone () const + inline FFTAnyJet* clone () const override {return new FFTAnyJet(*this);} inline const FFTJet& getFFTSpecific() const diff --git a/DataFormats/L1CSCTrackFinder/interface/L1CSCSPStatusDigi.h b/DataFormats/L1CSCTrackFinder/interface/L1CSCSPStatusDigi.h index 1a3fda589dd8f..09d1bbdad91b3 100644 --- a/DataFormats/L1CSCTrackFinder/interface/L1CSCSPStatusDigi.h +++ b/DataFormats/L1CSCTrackFinder/interface/L1CSCSPStatusDigi.h @@ -1,7 +1,7 @@ #ifndef L1CSCSPStatusDigi_h #define L1CSCSPStatusDigi_h -#include +#include class CSCTFUnpacker; diff --git a/DataFormats/METReco/interface/AnomalousECALVariables.h b/DataFormats/METReco/interface/AnomalousECALVariables.h index 7efba03e99774..b684d014cf5e4 100644 --- a/DataFormats/METReco/interface/AnomalousECALVariables.h +++ b/DataFormats/METReco/interface/AnomalousECALVariables.h @@ -94,7 +94,7 @@ class AnomalousECALVariables { } } - if (passChannelLimitation || limitDeadCellToChannelStatusEB.size() == 0) { + if (passChannelLimitation || limitDeadCellToChannelStatusEB.empty()) { if (bInfo.boundaryEnergy > highestEnergyDepositAroundDeadCell) { highestEnergyDepositAroundDeadCell = bInfo.boundaryET; @@ -122,7 +122,7 @@ class AnomalousECALVariables { } } - if (passChannelLimitation || limitDeadCellToChannelStatusEE.size() == 0) { + if (passChannelLimitation || limitDeadCellToChannelStatusEE.empty()) { if (bInfo.boundaryEnergy > highestEnergyDepositAroundDeadCell){ highestEnergyDepositAroundDeadCell = bInfo.boundaryET; diff --git a/DataFormats/MuonSeed/interface/L3MuonTrajectorySeed.h b/DataFormats/MuonSeed/interface/L3MuonTrajectorySeed.h index 35b65b2508b00..025eddbacc16e 100644 --- a/DataFormats/MuonSeed/interface/L3MuonTrajectorySeed.h +++ b/DataFormats/MuonSeed/interface/L3MuonTrajectorySeed.h @@ -36,7 +36,7 @@ class L3MuonTrajectorySeed: public TrajectorySeed { TrajectorySeed(base), theL2Track(l2Ref){} /// Destructor - virtual ~L3MuonTrajectorySeed(){}; + ~L3MuonTrajectorySeed() override{}; //accessors diff --git a/DataFormats/ParticleFlowReco/interface/ConvBremSeed.h b/DataFormats/ParticleFlowReco/interface/ConvBremSeed.h index 073bfec8dd163..5fa58bd24b775 100644 --- a/DataFormats/ParticleFlowReco/interface/ConvBremSeed.h +++ b/DataFormats/ParticleFlowReco/interface/ConvBremSeed.h @@ -30,7 +30,7 @@ class ConvBremSeed: public TrajectorySeed ConvBremSeed(){} - virtual ~ConvBremSeed() {} + ~ConvBremSeed() override {} /// Constructor from TrajectorySeed @@ -43,7 +43,7 @@ class ConvBremSeed: public TrajectorySeed - ConvBremSeed * clone() const {return new ConvBremSeed( * this); } + ConvBremSeed * clone() const override {return new ConvBremSeed( * this); } private: diff --git a/DataFormats/PatCandidates/interface/Hemisphere.h b/DataFormats/PatCandidates/interface/Hemisphere.h index 4f7b2659979a8..79ae0d328cf66 100644 --- a/DataFormats/PatCandidates/interface/Hemisphere.h +++ b/DataFormats/PatCandidates/interface/Hemisphere.h @@ -19,7 +19,7 @@ namespace pat { Hemisphere () {} Hemisphere (const Candidate::LorentzVector& p4) : CompositePtrCandidate(0,p4) {} - virtual ~Hemisphere () {} + ~Hemisphere () override {} }; } diff --git a/DataFormats/PatCandidates/interface/PATObject.h b/DataFormats/PatCandidates/interface/PATObject.h index 6e4ae4cee3d58..f92dd09a302c3 100644 --- a/DataFormats/PatCandidates/interface/PATObject.h +++ b/DataFormats/PatCandidates/interface/PATObject.h @@ -612,7 +612,7 @@ namespace pat { const TriggerObjectStandAloneCollection PATObject::triggerObjectMatchesByPath( const std::string & namePath, const bool pathLastFilterAccepted, const bool pathL3FilterAccepted ) const { TriggerObjectStandAloneCollection matches; for ( size_t i = 0; i < triggerObjectMatches().size(); ++i ) { - if ( triggerObjectMatch( i ) != 0 && triggerObjectMatch( i )->hasPathName( namePath, pathLastFilterAccepted, pathL3FilterAccepted ) ) matches.push_back( *( triggerObjectMatch( i ) ) ); + if ( triggerObjectMatch( i ) != nullptr && triggerObjectMatch( i )->hasPathName( namePath, pathLastFilterAccepted, pathL3FilterAccepted ) ) matches.push_back( *( triggerObjectMatch( i ) ) ); } return matches; } diff --git a/DataFormats/PatCandidates/interface/UserData.h b/DataFormats/PatCandidates/interface/UserData.h index f33d8ec8e795d..491f8edb40e5a 100644 --- a/DataFormats/PatCandidates/interface/UserData.h +++ b/DataFormats/PatCandidates/interface/UserData.h @@ -39,7 +39,7 @@ namespace pat { barrying the use of ROOT::Reflex and all the edm::Ptr technicalities. I'd say we can live without polymorphic storage of polymorphic data */ template const T * get() const { - if (typeid(T) != typeId()) return 0; + if (typeid(T) != typeId()) return nullptr; return static_cast(data_()); } diff --git a/DataFormats/Scouting/interface/ScoutingVertex.h b/DataFormats/Scouting/interface/ScoutingVertex.h index ca7b2dbd339a7..424f5bf569dc3 100644 --- a/DataFormats/Scouting/interface/ScoutingVertex.h +++ b/DataFormats/Scouting/interface/ScoutingVertex.h @@ -12,7 +12,7 @@ class ScoutingVertex ScoutingVertex(float x, float y, float z, float zError, float xError, float yError, int tracksSize, float chi2, int ndof, bool isValidVtx): x_(x), y_(y), z_(z), zError_(zError), xError_(xError), yError_(yError), tracksSize_(tracksSize), chi2_(chi2), ndof_(ndof), isValidVtx_(isValidVtx){} //default constructor - ScoutingVertex(): x_(0), y_(0), z_(0), zError_(0), xError_(0), yError_(0), tracksSize_(0), chi2_(0), ndof_(0), isValidVtx_(0) {} + ScoutingVertex(): x_(0), y_(0), z_(0), zError_(0), xError_(0), yError_(0), tracksSize_(0), chi2_(0), ndof_(0), isValidVtx_(false) {} //accessor functions float x() const { return x_; } diff --git a/DataFormats/TrackReco/interface/DeDxHitInfo.h b/DataFormats/TrackReco/interface/DeDxHitInfo.h index 99a35c89928cd..549f4911c9f2b 100644 --- a/DataFormats/TrackReco/interface/DeDxHitInfo.h +++ b/DataFormats/TrackReco/interface/DeDxHitInfo.h @@ -75,7 +75,7 @@ namespace reco { if(isStrip && stripClusters_.size() > S){ return &(stripClusters_[S]); } - return NULL; + return nullptr; } const std::vector& stripClusters() const {return stripClusters_;} const std::vector& pixelClusters() const {return pixelClusters_;} diff --git a/EventFilter/L1TRawToDigi/plugins/implementations_stage2/BMTFSetup.h b/EventFilter/L1TRawToDigi/plugins/implementations_stage2/BMTFSetup.h index 3ed9e252b2c98..ba757bb3f8c76 100644 --- a/EventFilter/L1TRawToDigi/plugins/implementations_stage2/BMTFSetup.h +++ b/EventFilter/L1TRawToDigi/plugins/implementations_stage2/BMTFSetup.h @@ -12,12 +12,12 @@ namespace l1t { namespace stage2 { class BMTFSetup : public PackingSetup { public: - virtual std::unique_ptr registerConsumes(const edm::ParameterSet& cfg, edm::ConsumesCollector& cc) override; - virtual void fillDescription(edm::ParameterSetDescription& desc) override; - virtual PackerMap getPackers(int fed, unsigned int fw) override; - virtual void registerProducts(edm::stream::EDProducerBase& prod) override; - virtual std::unique_ptr getCollections(edm::Event& e) override; - virtual UnpackerMap getUnpackers(int fed, int board, int amc, unsigned int fw) override; + std::unique_ptr registerConsumes(const edm::ParameterSet& cfg, edm::ConsumesCollector& cc) override; + void fillDescription(edm::ParameterSetDescription& desc) override; + PackerMap getPackers(int fed, unsigned int fw) override; + void registerProducts(edm::stream::EDProducerBase& prod) override; + std::unique_ptr getCollections(edm::Event& e) override; + UnpackerMap getUnpackers(int fed, int board, int amc, unsigned int fw) override; }; } } diff --git a/FWCore/Framework/interface/Callback.h b/FWCore/Framework/interface/Callback.h index 2209a152446f7..c92ad22c5595f 100644 --- a/FWCore/Framework/interface/Callback.h +++ b/FWCore/Framework/interface/Callback.h @@ -89,7 +89,7 @@ namespace edm { template void setData(ProductsT& iProducts, const RemainingContainerT*, const DataT*) { DataT* temp = reinterpret_cast< DataT*>(proxyData_[produce::find_index::value]) ; - if(0 != temp) { copyFromTo(iProducts, *temp); } + if(nullptr != temp) { copyFromTo(iProducts, *temp); } setData(iProducts, static_cast< const typename RemainingContainerT::head_type *>(nullptr), static_cast< const typename RemainingContainerT::tail_type *>(nullptr)); } @@ -98,7 +98,7 @@ namespace edm { DataT* temp = reinterpret_cast< DataT*>(proxyData_[produce::find_index::value]) ; //std::cout <<" setData["<< produce::find_index::value<<"] "<< temp <make(static_cast(iRecord), iKey); } @@ -55,9 +55,9 @@ class DataProxyTemplate : public DataProxy virtual const DataT* make(const RecordT&, const DataKey&) = 0; private: - DataProxyTemplate(const DataProxyTemplate&); // stop default + DataProxyTemplate(const DataProxyTemplate&) = delete; // stop default - const DataProxyTemplate& operator=(const DataProxyTemplate&); // stop default + const DataProxyTemplate& operator=(const DataProxyTemplate&) = delete; // stop default // ---------- member data -------------------------------- }; diff --git a/FWCore/Framework/interface/ESHandle.h b/FWCore/Framework/interface/ESHandle.h index 087e3951ac1bc..a0caf1d6b78ca 100644 --- a/FWCore/Framework/interface/ESHandle.h +++ b/FWCore/Framework/interface/ESHandle.h @@ -78,7 +78,7 @@ class ESHandle : public ESHandleBase { typedef T value_type; ESHandle() : ESHandleBase() {} - ESHandle(T const* iData) : ESHandleBase(iData, 0) {} + ESHandle(T const* iData) : ESHandleBase(iData, nullptr) {} ESHandle(T const* iData, edm::eventsetup::ComponentDescription const* desc) : ESHandleBase(iData, desc) {} ESHandle(std::shared_ptr &&); diff --git a/FWCore/Framework/interface/ESWatcher.h b/FWCore/Framework/interface/ESWatcher.h index 0d110f4197397..f53046153ec13 100644 --- a/FWCore/Framework/interface/ESWatcher.h +++ b/FWCore/Framework/interface/ESWatcher.h @@ -64,9 +64,9 @@ namespace edm { return result; } private: - ESWatcher(const ESWatcher&); // stop default + ESWatcher(const ESWatcher&) = delete; // stop default - const ESWatcher& operator=(const ESWatcher&); // stop default + const ESWatcher& operator=(const ESWatcher&) = delete; // stop default // ---------- member data -------------------------------- std::function callback_; diff --git a/FWCore/Framework/interface/EventSetup.h b/FWCore/Framework/interface/EventSetup.h index 44738523b8efa..d6455648a36fe 100644 --- a/FWCore/Framework/interface/EventSetup.h +++ b/FWCore/Framework/interface/EventSetup.h @@ -59,7 +59,7 @@ class EventSetup const T* value = nullptr; eventSetupGetImplementation(*this, value); //NOTE: by construction, eventSetupGetImplementation should thrown an exception rather than return a null value - assert(0 != value); + assert(nullptr != value); return *value; } /** returns the Record of type T. If no such record available diff --git a/FWCore/Framework/interface/EventSetupRecord.h b/FWCore/Framework/interface/EventSetupRecord.h index 5e8b5c3c6a624..787a4794c7bbe 100644 --- a/FWCore/Framework/interface/EventSetupRecord.h +++ b/FWCore/Framework/interface/EventSetupRecord.h @@ -91,7 +91,7 @@ namespace edm { template void get(HolderT& iHolder) const { - typename HolderT::value_type const* value = 0; + typename HolderT::value_type const* value = nullptr; ComponentDescription const* desc = nullptr; std::shared_ptr whyFailedFactory; this->getImplementation(value, "", desc, iHolder.transientAccessOnly, whyFailedFactory); @@ -105,7 +105,7 @@ namespace edm { template void get(char const* iName, HolderT& iHolder) const { - typename HolderT::value_type const* value = 0; + typename HolderT::value_type const* value = nullptr; ComponentDescription const* desc = nullptr; std::shared_ptr whyFailedFactory; this->getImplementation(value, iName, desc, iHolder.transientAccessOnly, whyFailedFactory); @@ -118,7 +118,7 @@ namespace edm { } template void get(std::string const& iName, HolderT& iHolder) const { - typename HolderT::value_type const* value = 0; + typename HolderT::value_type const* value = nullptr; ComponentDescription const* desc = nullptr; std::shared_ptr whyFailedFactory; this->getImplementation(value, iName.c_str(), desc, iHolder.transientAccessOnly, whyFailedFactory); @@ -132,7 +132,7 @@ namespace edm { template void get(ESInputTag const& iTag, HolderT& iHolder) const { - typename HolderT::value_type const* value = 0; + typename HolderT::value_type const* value = nullptr; ComponentDescription const* desc = nullptr; std::shared_ptr whyFailedFactory; this->getImplementation(value, iTag.data().c_str(), desc, iHolder.transientAccessOnly, whyFailedFactory); diff --git a/FWCore/Framework/interface/eventSetupGetImplementation.h b/FWCore/Framework/interface/eventSetupGetImplementation.h index 74c84f3106954..eaa4f387122a0 100644 --- a/FWCore/Framework/interface/eventSetupGetImplementation.h +++ b/FWCore/Framework/interface/eventSetupGetImplementation.h @@ -31,7 +31,7 @@ namespace edm { template< class T> inline void eventSetupGetImplementation(EventSetup const& iEventSetup, T const*& iValue) { T const* temp = heterocontainer::find(iEventSetup); - if(0 == temp) { + if(nullptr == temp) { throw NoRecordException(iovSyncValueFrom(iEventSetup), recordDoesExist(iEventSetup, EventSetupRecordKey::makeKey())); } iValue = temp; diff --git a/FWCore/Framework/interface/global/implementors.h b/FWCore/Framework/interface/global/implementors.h index 31aee71248623..5c27deecd46e5 100644 --- a/FWCore/Framework/interface/global/implementors.h +++ b/FWCore/Framework/interface/global/implementors.h @@ -43,7 +43,7 @@ namespace edm { StreamCacheHolder() = default; StreamCacheHolder( StreamCacheHolder const&) = delete; StreamCacheHolder& operator=(StreamCacheHolder const&) = delete; - ~StreamCacheHolder() { + ~StreamCacheHolder() override { for(auto c: caches_){ delete c; } @@ -92,7 +92,7 @@ namespace edm { RunCacheHolder() = default; RunCacheHolder( RunCacheHolder const&) = delete; RunCacheHolder& operator=(RunCacheHolder const&) = delete; - ~RunCacheHolder() noexcept(false) {}; + ~RunCacheHolder() noexcept(false) override {}; protected: C const* runCache(edm::RunIndex iID) const { return cache_.get(); } private: @@ -116,7 +116,7 @@ namespace edm { LuminosityBlockCacheHolder() = default; LuminosityBlockCacheHolder( LuminosityBlockCacheHolder const&) = delete; LuminosityBlockCacheHolder& operator=(LuminosityBlockCacheHolder const&) = delete; - ~LuminosityBlockCacheHolder() noexcept(false) {}; + ~LuminosityBlockCacheHolder() noexcept(false) override {}; protected: C const* luminosityBlockCache(edm::LuminosityBlockIndex iID) const { return cache_.get(); } private: @@ -176,7 +176,7 @@ namespace edm { LuminosityBlockSummaryCacheHolder() = default; LuminosityBlockSummaryCacheHolder( LuminosityBlockSummaryCacheHolder const&) = delete; LuminosityBlockSummaryCacheHolder& operator=(LuminosityBlockSummaryCacheHolder const&) = delete; - ~LuminosityBlockSummaryCacheHolder() noexcept(false) {}; + ~LuminosityBlockSummaryCacheHolder() noexcept(false) override {}; private: friend class EndLuminosityBlockSummaryProducer; diff --git a/FWCore/Utilities/interface/ConstRespectingPtr.h b/FWCore/Utilities/interface/ConstRespectingPtr.h index 633ffa9349464..16fed99c16cce 100644 --- a/FWCore/Utilities/interface/ConstRespectingPtr.h +++ b/FWCore/Utilities/interface/ConstRespectingPtr.h @@ -49,8 +49,8 @@ namespace edm { private: - ConstRespectingPtr(ConstRespectingPtr const&); - ConstRespectingPtr& operator=(ConstRespectingPtr const&); + ConstRespectingPtr(ConstRespectingPtr const&) = delete; + ConstRespectingPtr& operator=(ConstRespectingPtr const&) = delete; edm::propagate_const m_data; }; diff --git a/FWCore/Utilities/interface/ThreadSafeRegistry.h b/FWCore/Utilities/interface/ThreadSafeRegistry.h index 401bcbba013f2..8912ce9cff4b4 100644 --- a/FWCore/Utilities/interface/ThreadSafeRegistry.h +++ b/FWCore/Utilities/interface/ThreadSafeRegistry.h @@ -85,10 +85,10 @@ namespace edm { ~ThreadSafeRegistry(); // The following two are not implemented. - ThreadSafeRegistry(ThreadSafeRegistry const&); + ThreadSafeRegistry(ThreadSafeRegistry const&) = delete; ThreadSafeRegistry& - operator= (ThreadSafeRegistry const&); + operator= (ThreadSafeRegistry const&) = delete; mutable std::mutex mutex_; collection_type data_; diff --git a/GeneratorInterface/AMPTInterface/interface/AMPTHadronizer.h b/GeneratorInterface/AMPTInterface/interface/AMPTHadronizer.h index 4260bcfa2b507..4038a9cb75fc3 100644 --- a/GeneratorInterface/AMPTInterface/interface/AMPTHadronizer.h +++ b/GeneratorInterface/AMPTInterface/interface/AMPTHadronizer.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace HepMC { class GenEvent; @@ -33,7 +33,7 @@ namespace gen class AMPTHadronizer : public BaseHadronizer { public: AMPTHadronizer(const edm::ParameterSet &); - virtual ~AMPTHadronizer(); + ~AMPTHadronizer() override; bool generatePartonsAndHadronize(); bool hadronize(); @@ -51,7 +51,7 @@ namespace gen private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; void add_heavy_ion_rec(HepMC::GenEvent *evt); HepMC::GenParticle* build_ampt( int index, int barcode ); diff --git a/GeneratorInterface/AMPTInterface/src/AMPTHadronizer.cc b/GeneratorInterface/AMPTInterface/src/AMPTHadronizer.cc index f9fb7ad68fce1..f9c242096cf59 100644 --- a/GeneratorInterface/AMPTInterface/src/AMPTHadronizer.cc +++ b/GeneratorInterface/AMPTInterface/src/AMPTHadronizer.cc @@ -32,7 +32,7 @@ extern "C" { float gen::ranart_(int *idummy) { - if(0) idummy = idummy; + if(false) idummy = idummy; float rannum = amptRandomEngine->flat(); return rannum; } @@ -42,14 +42,14 @@ extern "C" { float gen::ran1_(int *idummy) { - if(0) idummy = idummy; + if(false) idummy = idummy; return amptRandomEngine->flat(); } } AMPTHadronizer::AMPTHadronizer(const ParameterSet &pset) : BaseHadronizer(pset), - evt(0), + evt(nullptr), pset_(pset), bmax_(pset.getParameter("bMax")), bmin_(pset.getParameter("bMin")), @@ -235,7 +235,7 @@ bool AMPTHadronizer::get_particles(HepMC::GenEvent *evt ) prod_vertex = prods[ipart]; prod_vertex->add_particle_in(mother); evt->add_vertex(prod_vertex); - prods[ipart]=0; // mark to protect deletion + prods[ipart]=nullptr; // mark to protect deletion } prod_vertex->add_particle_out(part); diff --git a/GeneratorInterface/BeamHaloGenerator/interface/BeamHaloProducer.h b/GeneratorInterface/BeamHaloGenerator/interface/BeamHaloProducer.h index 2243d99ce8c11..ad041564d7030 100644 --- a/GeneratorInterface/BeamHaloGenerator/interface/BeamHaloProducer.h +++ b/GeneratorInterface/BeamHaloGenerator/interface/BeamHaloProducer.h @@ -26,7 +26,7 @@ namespace edm /// Constructor BeamHaloProducer(const ParameterSet &); /// Destructor - virtual ~BeamHaloProducer(); + ~BeamHaloProducer() override; void setRandomEngine(CLHEP::HepRandomEngine* v); @@ -38,10 +38,10 @@ namespace edm private: - virtual void produce(Event & e, const EventSetup & es) override; - virtual void endRunProduce(Run & r, const EventSetup & es) override; - virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; - virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override { } + void produce(Event & e, const EventSetup & es) override; + void endRunProduce(Run & r, const EventSetup & es) override; + void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; + void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override { } void clear(); diff --git a/GeneratorInterface/BeamHaloGenerator/src/BeamHaloProducer.cc b/GeneratorInterface/BeamHaloGenerator/src/BeamHaloProducer.cc index df12b905e9054..414c012ecb9ee 100644 --- a/GeneratorInterface/BeamHaloGenerator/src/BeamHaloProducer.cc +++ b/GeneratorInterface/BeamHaloGenerator/src/BeamHaloProducer.cc @@ -1,5 +1,5 @@ #include -#include +#include #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/Run.h" @@ -57,7 +57,7 @@ BeamHaloProducer::~BeamHaloProducer() { BeamHaloProducer::BeamHaloProducer( const ParameterSet & pset) : - evt(0), + evt(nullptr), isInitialized_(false) { diff --git a/GeneratorInterface/CascadeInterface/plugins/Cascade2Hadronizer.cc b/GeneratorInterface/CascadeInterface/plugins/Cascade2Hadronizer.cc index 74a755e0db119..ac3d30073da47 100644 --- a/GeneratorInterface/CascadeInterface/plugins/Cascade2Hadronizer.cc +++ b/GeneratorInterface/CascadeInterface/plugins/Cascade2Hadronizer.cc @@ -128,7 +128,7 @@ namespace gen { } Cascade2Hadronizer::~Cascade2Hadronizer(){ - if(fPy6Service != 0) delete fPy6Service; + if(fPy6Service != nullptr) delete fPy6Service; } void Cascade2Hadronizer::doSetRandomEngine(CLHEP::HepRandomEngine* v) { @@ -633,7 +633,7 @@ namespace gen { bool Cascade2Hadronizer::cascadeReadParameters(const string& ParameterString) { - bool accepted = 1; + bool accepted = true; if(!strncmp(ParameterString.c_str(),"KE",2)) caluco.ke = atoi(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); @@ -726,7 +726,7 @@ namespace gen { else if(!strncmp(ParameterString.c_str(),"SCALFA",6)) scalf.scalfa = atof(&ParameterString[strcspn(ParameterString.c_str(),"=")+1]); - else accepted = 0; + else accepted = false; return accepted; } diff --git a/GeneratorInterface/CascadeInterface/plugins/Cascade2Hadronizer.h b/GeneratorInterface/CascadeInterface/plugins/Cascade2Hadronizer.h index dcebad771d535..03a9cc1d92dac 100644 --- a/GeneratorInterface/CascadeInterface/plugins/Cascade2Hadronizer.h +++ b/GeneratorInterface/CascadeInterface/plugins/Cascade2Hadronizer.h @@ -26,7 +26,7 @@ namespace gen { public: Cascade2Hadronizer(edm::ParameterSet const& ps); - ~Cascade2Hadronizer(); + ~Cascade2Hadronizer() override; bool readSettings(int); bool initializeForExternalPartons(); //-- initializer for the LHE input @@ -50,8 +50,8 @@ namespace gen { private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; - virtual std::vector const& doSharedResources() const override { return theSharedResources; } + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + std::vector const& doSharedResources() const override { return theSharedResources; } static const std::vector theSharedResources; diff --git a/GeneratorInterface/CascadeInterface/plugins/CascadeWrapper.h b/GeneratorInterface/CascadeInterface/plugins/CascadeWrapper.h index 6105500c9da0c..e94dd8f3f1881 100644 --- a/GeneratorInterface/CascadeInterface/plugins/CascadeWrapper.h +++ b/GeneratorInterface/CascadeInterface/plugins/CascadeWrapper.h @@ -4,7 +4,7 @@ //-- the pyhepc routine used by Pythia to fill the HEPEVT common block //-- is using double precision and 4000 entries -#include +#include #include //-- CASCADE Common Block Declarations diff --git a/GeneratorInterface/Core/interface/EmbeddingHepMCFilter.h b/GeneratorInterface/Core/interface/EmbeddingHepMCFilter.h index a485df533e19a..2e62dff1e4f7f 100644 --- a/GeneratorInterface/Core/interface/EmbeddingHepMCFilter.h +++ b/GeneratorInterface/Core/interface/EmbeddingHepMCFilter.h @@ -85,9 +85,9 @@ class EmbeddingHepMCFilter : public BaseHepMCFilter{ public: explicit EmbeddingHepMCFilter(const edm::ParameterSet &); - ~EmbeddingHepMCFilter(); + ~EmbeddingHepMCFilter() override; - virtual bool filter(const HepMC::GenEvent* evt); + bool filter(const HepMC::GenEvent* evt) override; }; diff --git a/GeneratorInterface/Core/interface/FortranCallback.h b/GeneratorInterface/Core/interface/FortranCallback.h index 09a3dba78306f..789a7e310755d 100644 --- a/GeneratorInterface/Core/interface/FortranCallback.h +++ b/GeneratorInterface/Core/interface/FortranCallback.h @@ -52,24 +52,24 @@ namespace gen { // --** Implementation **--- -FortranCallback* FortranCallback::fInstance = 0; +FortranCallback* FortranCallback::fInstance = nullptr; FortranCallback::FortranCallback() // : fPartonLevel(0) - : fRunBlock(0), fEventBlock(0), fIterationsPerEvent(0) + : fRunBlock(nullptr), fEventBlock(nullptr), fIterationsPerEvent(0) { } FortranCallback* FortranCallback::getInstance() { - if ( fInstance == 0 ) fInstance = new FortranCallback; + if ( fInstance == nullptr ) fInstance = new FortranCallback; return fInstance; } void FortranCallback::fillHeader() { - if ( fRunBlock == 0 ) return; + if ( fRunBlock == nullptr ) return; //const lhef::HEPRUP* heprup = &(fRunBlock->heprup()); const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP(); @@ -86,7 +86,7 @@ void FortranCallback::fillEvent() //if ( fPartonLevel == 0 ) return; //const lhef::HEPEUP* hepeup = fPartonLevel->getHEPEUP(); - if ( fEventBlock == 0 ) return; + if ( fEventBlock == nullptr ) return; const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP(); diff --git a/GeneratorInterface/Core/interface/GenFilterEfficiencyAnalyzer.h b/GeneratorInterface/Core/interface/GenFilterEfficiencyAnalyzer.h index c3f51c13788cc..92812c12bcaf2 100644 --- a/GeneratorInterface/Core/interface/GenFilterEfficiencyAnalyzer.h +++ b/GeneratorInterface/Core/interface/GenFilterEfficiencyAnalyzer.h @@ -30,13 +30,13 @@ class GenFilterEfficiencyAnalyzer : public edm::EDAnalyzer { public: explicit GenFilterEfficiencyAnalyzer(const edm::ParameterSet&); - ~GenFilterEfficiencyAnalyzer(); + ~GenFilterEfficiencyAnalyzer() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override; - virtual void endJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override; + void endJob() override; edm::EDGetTokenT genFilterInfoToken_; GenFilterInfo totalGenFilterInfo_; diff --git a/GeneratorInterface/Core/interface/GenXSecAnalyzer.h b/GeneratorInterface/Core/interface/GenXSecAnalyzer.h index ae20ff363fbbb..f653f3c1b86f5 100644 --- a/GeneratorInterface/Core/interface/GenXSecAnalyzer.h +++ b/GeneratorInterface/Core/interface/GenXSecAnalyzer.h @@ -36,19 +36,19 @@ class GenXSecAnalyzer : public edm::one::EDAnalyzer::GeneratorFilter(ParameterSet const& ps) : EDFilter(), hadronizer_(ps), - decayer_(0), + decayer_(nullptr), nEventsInLumiBlock_(0) { // TODO: @@ -293,7 +293,7 @@ namespace edm GenRunInfoProduct genRunInfo = GenRunInfoProduct(hadronizer_.getGenRunInfo()); std::vector GenLumiProcess; - GenRunInfoProduct::XSec xsec = genRunInfo.internalXSec(); + const GenRunInfoProduct::XSec& xsec = genRunInfo.internalXSec(); GenLumiInfoProduct::ProcessInfo temp; temp.setProcess(0); temp.setLheXSec(xsec.value(), xsec.error()); // Pythia gives error of -1 diff --git a/GeneratorInterface/Core/interface/GeneratorSmearedProducer.h b/GeneratorInterface/Core/interface/GeneratorSmearedProducer.h index 09b290e6de983..427306fa3af57 100644 --- a/GeneratorInterface/Core/interface/GeneratorSmearedProducer.h +++ b/GeneratorInterface/Core/interface/GeneratorSmearedProducer.h @@ -18,7 +18,7 @@ class GeneratorSmearedProducer : public edm::global::EDProducer<> { explicit GeneratorSmearedProducer(edm::ParameterSet const& p); - virtual void produce(edm::StreamID, edm::Event& e, edm::EventSetup const& c) const override; + void produce(edm::StreamID, edm::Event& e, edm::EventSetup const& c) const override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: diff --git a/GeneratorInterface/Core/interface/GenericDauHepMCFilter.h b/GeneratorInterface/Core/interface/GenericDauHepMCFilter.h index 4438ed6b8bb6d..91cf7ea4d1a90 100644 --- a/GeneratorInterface/Core/interface/GenericDauHepMCFilter.h +++ b/GeneratorInterface/Core/interface/GenericDauHepMCFilter.h @@ -35,9 +35,9 @@ Description: Filter events using MotherId and ChildrenIds infos class GenericDauHepMCFilter : public BaseHepMCFilter { public: GenericDauHepMCFilter(const edm::ParameterSet&); - ~GenericDauHepMCFilter(); + ~GenericDauHepMCFilter() override; - virtual bool filter(const HepMC::GenEvent* evt); + bool filter(const HepMC::GenEvent* evt) override; private: // ----------memeber function---------------------- diff --git a/GeneratorInterface/Core/interface/HadronizerFilter.h b/GeneratorInterface/Core/interface/HadronizerFilter.h index 7b74a7aa932c1..92c9b884b99a4 100644 --- a/GeneratorInterface/Core/interface/HadronizerFilter.h +++ b/GeneratorInterface/Core/interface/HadronizerFilter.h @@ -67,16 +67,16 @@ namespace edm // Hadronizer object. explicit HadronizerFilter(ParameterSet const& ps); - virtual ~HadronizerFilter(); + ~HadronizerFilter() override; - virtual bool filter(Event& e, EventSetup const& es) override; - virtual void beginRun(Run const&, EventSetup const&) override; - virtual void endRun(Run const&, EventSetup const&) override; - virtual void endRunProduce(Run &, EventSetup const&) override; - virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; - virtual void beginLuminosityBlockProduce(LuminosityBlock&, EventSetup const&) override; - virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; - virtual void endLuminosityBlockProduce(LuminosityBlock &, EventSetup const&) override; + bool filter(Event& e, EventSetup const& es) override; + void beginRun(Run const&, EventSetup const&) override; + void endRun(Run const&, EventSetup const&) override; + void endRunProduce(Run &, EventSetup const&) override; + void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; + void beginLuminosityBlockProduce(LuminosityBlock&, EventSetup const&) override; + void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; + void endLuminosityBlockProduce(LuminosityBlock &, EventSetup const&) override; private: Hadronizer hadronizer_; @@ -98,8 +98,8 @@ namespace edm HadronizerFilter::HadronizerFilter(ParameterSet const& ps) : EDFilter(), hadronizer_(ps), - decayer_(0), - filter_(0), + decayer_(nullptr), + filter_(nullptr), runInfoProductTag_(), runInfoProductToken_(), eventProductToken_(), diff --git a/GeneratorInterface/Core/interface/ParameterCollector.h b/GeneratorInterface/Core/interface/ParameterCollector.h index 4917b1d8444eb..2fbf1fa48fe12 100644 --- a/GeneratorInterface/Core/interface/ParameterCollector.h +++ b/GeneratorInterface/Core/interface/ParameterCollector.h @@ -36,7 +36,7 @@ class ParameterCollector { public boost::iterator_facade { public: - const_iterator() : collector_(0), dump_(0) {} + const_iterator() : collector_(nullptr), dump_(nullptr) {} protected: friend class ParameterCollector; @@ -44,7 +44,7 @@ class ParameterCollector { inline const_iterator(const ParameterCollector *collector, std::vector::const_iterator begin, std::vector::const_iterator end, - bool special = false, std::ostream *dump = 0); + bool special = false, std::ostream *dump = nullptr); private: friend class boost::iterator_core_access; diff --git a/GeneratorInterface/Core/interface/PartonShowerBsHepMCFilter.h b/GeneratorInterface/Core/interface/PartonShowerBsHepMCFilter.h index 8f1e3da786ae8..8ddd0ba9930bd 100644 --- a/GeneratorInterface/Core/interface/PartonShowerBsHepMCFilter.h +++ b/GeneratorInterface/Core/interface/PartonShowerBsHepMCFilter.h @@ -18,9 +18,9 @@ class PartonShowerBsHepMCFilter : public BaseHepMCFilter{ public: PartonShowerBsHepMCFilter( const edm::ParameterSet & ); - ~PartonShowerBsHepMCFilter(); + ~PartonShowerBsHepMCFilter() override; - virtual bool filter(const HepMC::GenEvent* evt); + bool filter(const HepMC::GenEvent* evt) override; private: diff --git a/GeneratorInterface/Core/plugins/GenFilterEfficiencyProducer.cc b/GeneratorInterface/Core/plugins/GenFilterEfficiencyProducer.cc index 6ddb50987eb64..5e749d2dce8b1 100644 --- a/GeneratorInterface/Core/plugins/GenFilterEfficiencyProducer.cc +++ b/GeneratorInterface/Core/plugins/GenFilterEfficiencyProducer.cc @@ -58,14 +58,14 @@ class GenFilterEfficiencyProducer : public edm::global::EDProducer> { public: explicit GenFilterEfficiencyProducer(const edm::ParameterSet&); - ~GenFilterEfficiencyProducer(); + ~GenFilterEfficiencyProducer() override; private: - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; void globalEndLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) const override; - virtual void globalEndLuminosityBlockProduce(edm::LuminosityBlock &, const edm::EventSetup &) const override; + void globalEndLuminosityBlockProduce(edm::LuminosityBlock &, const edm::EventSetup &) const override; std::shared_ptr globalBeginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) const override; // ----------member data --------------------------- @@ -92,7 +92,7 @@ GenFilterEfficiencyProducer::GenFilterEfficiencyProducer(const edm::ParameterSet if (edm::Service().isAvailable()) { // get tns pointer tns_ = edm::Service().operator->(); - if (tns_!=0) { + if (tns_!=nullptr) { thisProcess = tns_->getProcessName(); std::vector theNames = tns_->getTrigPaths(); for ( unsigned int i = 0; i < theNames.size(); i++ ) { diff --git a/GeneratorInterface/Core/src/BaseHadronizer.cc b/GeneratorInterface/Core/src/BaseHadronizer.cc index f81cf197ba814..534ec728fb54b 100644 --- a/GeneratorInterface/Core/src/BaseHadronizer.cc +++ b/GeneratorInterface/Core/src/BaseHadronizer.cc @@ -59,7 +59,7 @@ const std::vector BaseHadronizer::theSharedResources; } void BaseHadronizer::randomizeIndex(edm::LuminosityBlock const& lumi, CLHEP::HepRandomEngine* rengine) { - if (randomInitWeights_.size()>0) { + if (!randomInitWeights_.empty()) { //randomly select from a list of provided configuration sets (for parameter scans) //seeds std 32-bit mersene twister with HepRandomEngine state plus run and lumi section numbers @@ -112,7 +112,7 @@ const std::vector BaseHadronizer::theSharedResources; argStrs[2]=nevStream.str(); argStrs[3]=randomStream.str(); argStrs[4]=std::to_string(ncpu); - std::arrayargs{ { &argStrs[0][0], &argStrs[1][0],&argStrs[2][0],&argStrs[3][0], &argStrs[4][0], NULL } }; + std::arrayargs{ { &argStrs[0][0], &argStrs[1][0],&argStrs[2][0],&argStrs[3][0], &argStrs[4][0], nullptr } }; pid_t pid = fork(); diff --git a/GeneratorInterface/Core/src/EmbeddingHepMCFilter.cc b/GeneratorInterface/Core/src/EmbeddingHepMCFilter.cc index 1ec82b0064b6b..5b791882a7aeb 100644 --- a/GeneratorInterface/Core/src/EmbeddingHepMCFilter.cc +++ b/GeneratorInterface/Core/src/EmbeddingHepMCFilter.cc @@ -53,7 +53,7 @@ EmbeddingHepMCFilter::filter(const HepMC::GenEvent* evt) for ( HepMC::GenEvent::particle_const_iterator particle = evt->particles_begin(); particle != evt->particles_end(); ++particle ) { int mom_id = 0; // No particle available with PDG ID 0 - if ((*particle)->production_vertex() != 0){ // search for the mom via the production_vertex + if ((*particle)->production_vertex() != nullptr){ // search for the mom via the production_vertex if ((*particle)->production_vertex()->particles_in_const_begin() != (*particle)->production_vertex()->particles_in_const_end()){ mom_id = (*(*particle)->production_vertex()->particles_in_const_begin())->pdg_id(); // mom was found } diff --git a/GeneratorInterface/Core/src/FortranInstance.cc b/GeneratorInterface/Core/src/FortranInstance.cc index b6533b48f01fa..b5daf8b2017c4 100644 --- a/GeneratorInterface/Core/src/FortranInstance.cc +++ b/GeneratorInterface/Core/src/FortranInstance.cc @@ -28,7 +28,7 @@ void gen::upveto_(int *veto) // static FortranInstance members; -gen::FortranInstance *gen::FortranInstance::currentInstance = 0; +gen::FortranInstance *gen::FortranInstance::currentInstance = nullptr; const std::string gen::FortranInstance::kFortranInstance = "FortranInstance"; @@ -41,7 +41,7 @@ gen::FortranInstance::~FortranInstance() noexcept(false) << edm::friendlyname::friendlyName(typeid(*this).name()) << " destroyed while it was the " "current active instance." << std::endl; - currentInstance = 0; + currentInstance = nullptr; } } @@ -88,7 +88,7 @@ void gen::FortranInstance::leave() "nesting level of zero." << std::endl; if (--instanceNesting == 0) - currentInstance = 0; + currentInstance = nullptr; } void gen::FortranInstance::throwMissingInstance() diff --git a/GeneratorInterface/Core/src/HepMCFilterDriver.cc b/GeneratorInterface/Core/src/HepMCFilterDriver.cc index 3e3cc917084ee..4eb6a5ed0b6ca 100644 --- a/GeneratorInterface/Core/src/HepMCFilterDriver.cc +++ b/GeneratorInterface/Core/src/HepMCFilterDriver.cc @@ -6,7 +6,7 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" HepMCFilterDriver::HepMCFilterDriver(const edm::ParameterSet& pset) : - filter_(0), + filter_(nullptr), numEventsPassPos_(0), numEventsPassNeg_(0), numEventsTotalPos_(0), diff --git a/GeneratorInterface/CosmicMuonGenerator/interface/CosMuoGenProducer.h b/GeneratorInterface/CosmicMuonGenerator/interface/CosMuoGenProducer.h index 061056c3d52c2..17218feb31702 100644 --- a/GeneratorInterface/CosmicMuonGenerator/interface/CosMuoGenProducer.h +++ b/GeneratorInterface/CosmicMuonGenerator/interface/CosMuoGenProducer.h @@ -20,16 +20,16 @@ namespace edm class CosMuoGenProducer : public one::EDProducer { public: CosMuoGenProducer(const ParameterSet& ); - virtual ~CosMuoGenProducer(); + ~CosMuoGenProducer() override; private: - virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; - virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override { } + void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; + void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override { } - virtual void produce(Event & e, const EventSetup& es) override; + void produce(Event & e, const EventSetup& es) override; - virtual void endRunProduce(Run & r, const EventSetup & es) override; + void endRunProduce(Run & r, const EventSetup & es) override; void clear(); // define the configurable generator parameters diff --git a/GeneratorInterface/CosmicMuonGenerator/interface/CosmicMuonGenerator.h b/GeneratorInterface/CosmicMuonGenerator/interface/CosmicMuonGenerator.h index d847ae7e80063..ce0cb4a9d6a38 100644 --- a/GeneratorInterface/CosmicMuonGenerator/interface/CosmicMuonGenerator.h +++ b/GeneratorInterface/CosmicMuonGenerator/interface/CosmicMuonGenerator.h @@ -268,7 +268,7 @@ class CosmicMuonGenerator{ // initialize the generator void setRandomEngine(CLHEP::HepRandomEngine* v); - void initialize(CLHEP::HepRandomEngine *rng = 0); + void initialize(CLHEP::HepRandomEngine *rng = nullptr); // prints rate + statistics void terminate(); // initialize, generate and terminate the Cosmic Muon Generator diff --git a/GeneratorInterface/CosmicMuonGenerator/interface/sim.h b/GeneratorInterface/CosmicMuonGenerator/interface/sim.h index 990bd5cfe54ad..8e3a817da8aca 100755 --- a/GeneratorInterface/CosmicMuonGenerator/interface/sim.h +++ b/GeneratorInterface/CosmicMuonGenerator/interface/sim.h @@ -158,7 +158,7 @@ public : TBranch *b_cerenkov_ProductionHeight; //! TBranch *b_cerenkov_Weight; //! - sim(TTree *tree=0); + sim(TTree *tree=nullptr); virtual ~sim(); virtual Int_t Cut(Long64_t entry); virtual Int_t GetEntry(Long64_t entry); @@ -176,7 +176,7 @@ sim::sim(TTree *tree) { // if parameter tree is not specified (or zero), connect the file // used to generate this class and read the Tree. - if (tree == 0) { + if (tree == nullptr) { std::cout << "sim::sim: tree = 0" << std::endl; TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("protons_150gev.root"); if (!f) { diff --git a/GeneratorInterface/CosmicMuonGenerator/src/CMSCGEN.cc b/GeneratorInterface/CosmicMuonGenerator/src/CMSCGEN.cc index 80c31df1b9601..2132517dd56ac 100644 --- a/GeneratorInterface/CosmicMuonGenerator/src/CMSCGEN.cc +++ b/GeneratorInterface/CosmicMuonGenerator/src/CMSCGEN.cc @@ -10,7 +10,7 @@ #include "GeneratorInterface/CosmicMuonGenerator/interface/CMSCGEN.h" -CMSCGEN::CMSCGEN() : initialization(0), RanGen2(0), delRanGen(false) +CMSCGEN::CMSCGEN() : initialization(0), RanGen2(nullptr), delRanGen(false) { } @@ -291,7 +291,7 @@ int CMSCGEN::generate() double c_max; double z, z_max; - while (1) + while (true) { prob = RanGen2->flat(); r1 = double(prob); @@ -435,7 +435,7 @@ int CMSCGEN::generate() // now we throw dice: - while (1) + while (true) { prob = RanGen2->flat(); r1 = double(prob); @@ -600,7 +600,7 @@ int CMSCGEN::generateNuMu() { } double ctheta, Emu; - while (1) { + while (true) { ctheta = cmin + (cmax-cmin)*RanGen2->flat(); Emu = pmin + (pmax-pmin)*RanGen2->flat(); double Enu = enumin + (enumax-enumin)*RanGen2->flat(); diff --git a/GeneratorInterface/CosmicMuonGenerator/src/CosmicMuonGenerator.cc b/GeneratorInterface/CosmicMuonGenerator/src/CosmicMuonGenerator.cc index 88b5b71f4cfc3..58ecc5d704a94 100644 --- a/GeneratorInterface/CosmicMuonGenerator/src/CosmicMuonGenerator.cc +++ b/GeneratorInterface/CosmicMuonGenerator/src/CosmicMuonGenerator.cc @@ -78,7 +78,7 @@ void CosmicMuonGenerator::initialize(CLHEP::HepRandomEngine *rng){ std::cout << std::endl; if (MultiMuon) { - MultiIn = 0; + MultiIn = nullptr; std::cout << "MultiMuonFileName.c_str()=" << MultiMuonFileName.c_str() << std::endl; MultiIn = new TFile( MultiMuonFileName.c_str() ); @@ -682,7 +682,7 @@ bool CosmicMuonGenerator::nextMultiEvent() { << " without accepting event!" << std::endl; if (Debug) { std::cout << " N(mu)=" << Id_ug.size(); - if (Id_ug.size()>=1) + if (!Id_ug.empty()) std::cout << " E[0]=" << E_ug[0] << " theta=" << acos(-Py_ug[0]/sqrt(Px_ug[0]*Px_ug[0]+Py_ug[0]*Py_ug[0]+Pz_ug[0]*Pz_ug[0])) << " R_xz=" << sqrt(Vx_sf[0]*Vx_sf[0]+Vy_sf[0]*Vy_sf[0]); diff --git a/GeneratorInterface/EvtGenInterface/interface/DataCardFileWriter.h b/GeneratorInterface/EvtGenInterface/interface/DataCardFileWriter.h index afd60842758d6..9f7f3c188ed6d 100644 --- a/GeneratorInterface/EvtGenInterface/interface/DataCardFileWriter.h +++ b/GeneratorInterface/EvtGenInterface/interface/DataCardFileWriter.h @@ -21,11 +21,11 @@ namespace gen { class DataCardFileWriter : public edm::EDAnalyzer { public: DataCardFileWriter(const edm::ParameterSet&); - ~DataCardFileWriter(){}; + ~DataCardFileWriter() override{}; - virtual void beginJob(){}; - virtual void analyze(const edm::Event&, const edm::EventSetup&){}; - virtual void endJob(){}; + void beginJob() override{}; + void analyze(const edm::Event&, const edm::EventSetup&) override{}; + void endJob() override{}; }; diff --git a/GeneratorInterface/EvtGenInterface/interface/EvtGenInterface.h b/GeneratorInterface/EvtGenInterface/interface/EvtGenInterface.h index 5c8268691a943..205f939cb9b9f 100644 --- a/GeneratorInterface/EvtGenInterface/interface/EvtGenInterface.h +++ b/GeneratorInterface/EvtGenInterface/interface/EvtGenInterface.h @@ -39,12 +39,12 @@ namespace gen { public: // ctor & dtor EvtGenInterface( const edm::ParameterSet& ); - ~EvtGenInterface(); + ~EvtGenInterface() override; - virtual void init(); - virtual const std::vector& operatesOnParticles() { return m_PDGs; } - virtual HepMC::GenEvent* decay( HepMC::GenEvent* ); - virtual void setRandomEngine(CLHEP::HepRandomEngine* v); + void init() override; + const std::vector& operatesOnParticles() override { return m_PDGs; } + HepMC::GenEvent* decay( HepMC::GenEvent* ) override; + void setRandomEngine(CLHEP::HepRandomEngine* v) override; static double flat(); private: diff --git a/GeneratorInterface/EvtGenInterface/interface/myEvtRandomEngine.h b/GeneratorInterface/EvtGenInterface/interface/myEvtRandomEngine.h index 0b2e0b8ff4aff..c89ee9c70f2e3 100644 --- a/GeneratorInterface/EvtGenInterface/interface/myEvtRandomEngine.h +++ b/GeneratorInterface/EvtGenInterface/interface/myEvtRandomEngine.h @@ -31,9 +31,9 @@ class myEvtRandomEngine : public EvtRandomEngine myEvtRandomEngine(CLHEP::HepRandomEngine* xx); - virtual ~myEvtRandomEngine(); + ~myEvtRandomEngine() override; - virtual double random(); + double random() override; void setRandomEngine(CLHEP::HepRandomEngine* v) { the_engine = v; } diff --git a/GeneratorInterface/EvtGenInterface/plugins/DataCardFileWriter.cc b/GeneratorInterface/EvtGenInterface/plugins/DataCardFileWriter.cc index 94f04b5993e60..f16c536ea88cc 100644 --- a/GeneratorInterface/EvtGenInterface/plugins/DataCardFileWriter.cc +++ b/GeneratorInterface/EvtGenInterface/plugins/DataCardFileWriter.cc @@ -5,7 +5,7 @@ #include #include #include -#include +#include using namespace gen; diff --git a/GeneratorInterface/ExhumeInterface/interface/DiPhoton.h b/GeneratorInterface/ExhumeInterface/interface/DiPhoton.h index 992d2f0325746..1523f9d5a1320 100644 --- a/GeneratorInterface/ExhumeInterface/interface/DiPhoton.h +++ b/GeneratorInterface/ExhumeInterface/interface/DiPhoton.h @@ -14,9 +14,9 @@ namespace Exhume{ DiPhoton(const edm::ParameterSet&); //declare inherited functions - double SubProcess(); - void LIPS2Amp(); - void Amp2LIPS(); + double SubProcess() override; + void LIPS2Amp() override; + void Amp2LIPS() override; private: double MatrixElement(); diff --git a/GeneratorInterface/ExhumeInterface/interface/Event.h b/GeneratorInterface/ExhumeInterface/interface/Event.h index 0b50e6e7160fb..fe8e9be58af09 100644 --- a/GeneratorInterface/ExhumeInterface/interface/Event.h +++ b/GeneratorInterface/ExhumeInterface/interface/Event.h @@ -19,7 +19,7 @@ namespace Exhume{ public: Event(CrossSection&, CLHEP::HepRandomEngine*); - ~Event(); + ~Event() override; inline void SetRandomEngine(CLHEP::HepRandomEngine* engine){ randomEngine = engine; @@ -76,7 +76,7 @@ namespace Exhume{ private: void SelectValues(); - double WeightFunc(const double&); + double WeightFunc(const double&) override; std::vector > Var; diff --git a/GeneratorInterface/ExhumeInterface/interface/ExhumeHadronizer.h b/GeneratorInterface/ExhumeInterface/interface/ExhumeHadronizer.h index c0cf01a25944e..96b07567ceddc 100644 --- a/GeneratorInterface/ExhumeInterface/interface/ExhumeHadronizer.h +++ b/GeneratorInterface/ExhumeInterface/interface/ExhumeHadronizer.h @@ -43,7 +43,7 @@ namespace gen public: ExhumeHadronizer(edm::ParameterSet const& ps); - ~ExhumeHadronizer(); + ~ExhumeHadronizer() override; // bool generatePartons(); bool generatePartonsAndHadronize(); @@ -64,8 +64,8 @@ namespace gen private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; - virtual std::vector const& doSharedResources() const override { return theSharedResources; } + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + std::vector const& doSharedResources() const override { return theSharedResources; } static const std::vector theSharedResources; diff --git a/GeneratorInterface/ExhumeInterface/interface/GG.h b/GeneratorInterface/ExhumeInterface/interface/GG.h index 2ad80ea2ea8b1..df828495fbb2e 100644 --- a/GeneratorInterface/ExhumeInterface/interface/GG.h +++ b/GeneratorInterface/ExhumeInterface/interface/GG.h @@ -14,9 +14,9 @@ namespace Exhume{ GG(const edm::ParameterSet&); //declare inherited functions - double SubProcess(); - void LIPS2Amp(); - void Amp2LIPS(); + double SubProcess() override; + void LIPS2Amp() override; + void Amp2LIPS() override; private: double EighteenPI; diff --git a/GeneratorInterface/ExhumeInterface/interface/Higgs.h b/GeneratorInterface/ExhumeInterface/interface/Higgs.h index 03af4e7ef1321..bfae35c4e1b4e 100644 --- a/GeneratorInterface/ExhumeInterface/interface/Higgs.h +++ b/GeneratorInterface/ExhumeInterface/interface/Higgs.h @@ -16,12 +16,12 @@ namespace Exhume{ Higgs(const edm::ParameterSet&); - double SubProcess(); - void SetPartons(); - void SetSubParameters(); - double SubParameterWeight(); - void MaximiseSubParameters(); - double SubParameterRange(); + double SubProcess() override; + void SetPartons() override; + void SetSubParameters() override; + double SubParameterWeight() override; + void MaximiseSubParameters() override; + double SubParameterRange() override; void SetHiggsMass(const double&); inline double GetC(){ return(C); diff --git a/GeneratorInterface/ExhumeInterface/interface/QQ.h b/GeneratorInterface/ExhumeInterface/interface/QQ.h index 888ab4c41bb65..8557a320d5ed1 100644 --- a/GeneratorInterface/ExhumeInterface/interface/QQ.h +++ b/GeneratorInterface/ExhumeInterface/interface/QQ.h @@ -14,9 +14,9 @@ namespace Exhume{ QQ(const edm::ParameterSet&); //declare inherited functions - double SubProcess(); - void LIPS2Amp(); - void Amp2LIPS(); + double SubProcess() override; + void LIPS2Amp() override; + void Amp2LIPS() override; void SetQuarkType(const int&); private: double InvSinTheta; diff --git a/GeneratorInterface/ExhumeInterface/interface/TwoSpace.h b/GeneratorInterface/ExhumeInterface/interface/TwoSpace.h index a3e0f68add155..8ee96f3ea7786 100644 --- a/GeneratorInterface/ExhumeInterface/interface/TwoSpace.h +++ b/GeneratorInterface/ExhumeInterface/interface/TwoSpace.h @@ -14,24 +14,24 @@ namespace Exhume{ public: TwoSpace(const edm::ParameterSet&); - ~TwoSpace(); - double SubParameterRange(); - void MaximiseSubParameters(); - void SetSubParameters(); - void SetPartons(); + ~TwoSpace() override; + double SubParameterRange() override; + void MaximiseSubParameters() override; + void SetSubParameters() override; + void SetPartons() override; void SetMassAtThetaScan(double _M1){ MassAtThetaScan=_M1; return; } - virtual double SubProcess()=0; - double SubParameterWeight(); + double SubProcess() override =0; + double SubParameterWeight() override; void SetThetaMin(const double &); int GetNumberOfSubParameters(); //allows user to define an amplitude (Msq) and use all our pre defined funcs //virtual double AmplitudeSq()=0; virtual void Amp2LIPS()=0; virtual void LIPS2Amp()=0; - double WeightFunc(const double&); + double WeightFunc(const double&) override; diff --git a/GeneratorInterface/ExternalDecays/src/ExternalDecayDriver.cc b/GeneratorInterface/ExternalDecays/src/ExternalDecayDriver.cc index 6cce1bd71c868..a32f8747d0885 100644 --- a/GeneratorInterface/ExternalDecays/src/ExternalDecayDriver.cc +++ b/GeneratorInterface/ExternalDecays/src/ExternalDecayDriver.cc @@ -25,9 +25,9 @@ CLHEP::HepRandomEngine* decayRandomEngine = nullptr; ExternalDecayDriver::ExternalDecayDriver( const ParameterSet& pset ) : fIsInitialized(false), - fTauolaInterface(0), - fEvtGenInterface(0), - fPhotosInterface(0) + fTauolaInterface(nullptr), + fEvtGenInterface(nullptr), + fPhotosInterface(nullptr) { std::vector extGenNames = pset.getParameter< std::vector >("parameterSets"); @@ -92,17 +92,17 @@ HepMC::GenEvent* ExternalDecayDriver::decay( HepMC::GenEvent* evt ) if ( fEvtGenInterface ) { evt = fEvtGenInterface->decay( evt ); - if ( !evt ) return 0; + if ( !evt ) return nullptr; } if ( fTauolaInterface ) { evt = fTauolaInterface->decay( evt ); - if ( !evt ) return 0; + if ( !evt ) return nullptr; } if ( fPhotosInterface ) { evt = fPhotosInterface->apply( evt ); - if ( !evt ) return 0; + if ( !evt ) return nullptr; } return evt; diff --git a/GeneratorInterface/GenFilters/interface/BCToEFilter.h b/GeneratorInterface/GenFilters/interface/BCToEFilter.h index 8acfef05c0eca..8c39182f890b9 100644 --- a/GeneratorInterface/GenFilters/interface/BCToEFilter.h +++ b/GeneratorInterface/GenFilters/interface/BCToEFilter.h @@ -25,9 +25,9 @@ class BCToEFilter : public edm::EDFilter { public: explicit BCToEFilter(const edm::ParameterSet&); - ~BCToEFilter(); + ~BCToEFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: std::unique_ptr BCToEAlgo_; diff --git a/GeneratorInterface/GenFilters/interface/BHFilter.h b/GeneratorInterface/GenFilters/interface/BHFilter.h index de77dc7ac34fa..a5f0e2ae10c9f 100644 --- a/GeneratorInterface/GenFilters/interface/BHFilter.h +++ b/GeneratorInterface/GenFilters/interface/BHFilter.h @@ -21,9 +21,9 @@ namespace cms class BHFilter : public edm::EDFilter { public: explicit BHFilter(const edm::ParameterSet& conf); - virtual ~BHFilter() {} + ~BHFilter() override {} // virtual bool filter(edm::Event & e, edm::EventSetup const& c); - bool filter(edm::Event & iEvent, edm::EventSetup const& c); + bool filter(edm::Event & iEvent, edm::EventSetup const& c) override; bool BSC1(const HepMC::FourVector&, const HepMC::FourVector&,const HepMC::FourVector&); private: diff --git a/GeneratorInterface/GenFilters/interface/BdecayFilter.h b/GeneratorInterface/GenFilters/interface/BdecayFilter.h index c96d1bd9cdff0..58fa81eb64200 100644 --- a/GeneratorInterface/GenFilters/interface/BdecayFilter.h +++ b/GeneratorInterface/GenFilters/interface/BdecayFilter.h @@ -30,9 +30,9 @@ class BdecayFilter : public edm::EDFilter public: explicit BdecayFilter(const edm::ParameterSet&); - ~BdecayFilter(); + ~BdecayFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/BsJpsiPhiFilter.h b/GeneratorInterface/GenFilters/interface/BsJpsiPhiFilter.h index a81c2a9bf42c8..cec3885f36822 100644 --- a/GeneratorInterface/GenFilters/interface/BsJpsiPhiFilter.h +++ b/GeneratorInterface/GenFilters/interface/BsJpsiPhiFilter.h @@ -30,9 +30,9 @@ class BsJpsiPhiFilter : public edm::EDFilter public: explicit BsJpsiPhiFilter(const edm::ParameterSet&); - ~BsJpsiPhiFilter(); + ~BsJpsiPhiFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/ComphepSingletopFilter.h b/GeneratorInterface/GenFilters/interface/ComphepSingletopFilter.h index 051f775358f79..a3026acee0dce 100644 --- a/GeneratorInterface/GenFilters/interface/ComphepSingletopFilter.h +++ b/GeneratorInterface/GenFilters/interface/ComphepSingletopFilter.h @@ -17,11 +17,11 @@ class ComphepSingletopFilter : public edm::EDFilter { public: explicit ComphepSingletopFilter(const edm::ParameterSet&); - ~ComphepSingletopFilter(); + ~ComphepSingletopFilter() override; private: - virtual void beginJob() ; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; private: double ptsep; unsigned int read22, read23; diff --git a/GeneratorInterface/GenFilters/interface/ComphepSingletopFilterPy8.h b/GeneratorInterface/GenFilters/interface/ComphepSingletopFilterPy8.h index cb2facb46026a..9ae8b733033b7 100644 --- a/GeneratorInterface/GenFilters/interface/ComphepSingletopFilterPy8.h +++ b/GeneratorInterface/GenFilters/interface/ComphepSingletopFilterPy8.h @@ -19,11 +19,11 @@ namespace edm { class ComphepSingletopFilterPy8 : public edm::EDFilter { public: explicit ComphepSingletopFilterPy8(const edm::ParameterSet&); - ~ComphepSingletopFilterPy8(); + ~ComphepSingletopFilterPy8() override; private: - virtual void beginJob() ; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; edm::EDGetTokenT token_; private: // edm::InputTag hepMCProductTag; diff --git a/GeneratorInterface/GenFilters/interface/CosmicGenFilterHelix.h b/GeneratorInterface/GenFilters/interface/CosmicGenFilterHelix.h index 78e1c4d880aaa..426bee1cad6fd 100644 --- a/GeneratorInterface/GenFilters/interface/CosmicGenFilterHelix.h +++ b/GeneratorInterface/GenFilters/interface/CosmicGenFilterHelix.h @@ -40,11 +40,11 @@ class Propagator; class CosmicGenFilterHelix : public edm::EDFilter { public: explicit CosmicGenFilterHelix(const edm::ParameterSet& config); - virtual ~CosmicGenFilterHelix(); + ~CosmicGenFilterHelix() override; - virtual void beginJob(); - virtual bool filter(edm::Event &event, const edm::EventSetup &eventSetup); - virtual void endJob(); + void beginJob() override; + bool filter(edm::Event &event, const edm::EventSetup &eventSetup) override; + void endJob() override; private: /// actually propagate to the defined cylinder diff --git a/GeneratorInterface/GenFilters/interface/CosmicGenFilterLowE.h b/GeneratorInterface/GenFilters/interface/CosmicGenFilterLowE.h index 45a5ec7647650..ccc81b1f197e4 100644 --- a/GeneratorInterface/GenFilters/interface/CosmicGenFilterLowE.h +++ b/GeneratorInterface/GenFilters/interface/CosmicGenFilterLowE.h @@ -16,9 +16,9 @@ class CosmicGenFilterLowE : public edm::EDFilter { public: explicit CosmicGenFilterLowE(const edm::ParameterSet& conf); - virtual ~CosmicGenFilterLowE() {} + ~CosmicGenFilterLowE() override {} //virtual bool filter(edm::Event & e, edm::EventSetup const& c); - bool filter(edm::Event & iEvent, edm::EventSetup const& c); + bool filter(edm::Event & iEvent, edm::EventSetup const& c) override; private: TRandom2 RanGen2; diff --git a/GeneratorInterface/GenFilters/interface/EMEnrichingFilter.h b/GeneratorInterface/GenFilters/interface/EMEnrichingFilter.h index 3de4ec610d287..0727976d77d55 100644 --- a/GeneratorInterface/GenFilters/interface/EMEnrichingFilter.h +++ b/GeneratorInterface/GenFilters/interface/EMEnrichingFilter.h @@ -28,9 +28,9 @@ class EMEnrichingFilter : public edm::EDFilter { public: explicit EMEnrichingFilter(const edm::ParameterSet&); - ~EMEnrichingFilter(); + ~EMEnrichingFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: EMEnrichingFilterAlgo *EMEAlgo_; diff --git a/GeneratorInterface/GenFilters/interface/GenLeadTrackFilter.h b/GeneratorInterface/GenFilters/interface/GenLeadTrackFilter.h index 15debdc81fde1..25614adffc692 100644 --- a/GeneratorInterface/GenFilters/interface/GenLeadTrackFilter.h +++ b/GeneratorInterface/GenFilters/interface/GenLeadTrackFilter.h @@ -32,11 +32,11 @@ class GenLeadTrackFilter : public edm::EDFilter { public: explicit GenLeadTrackFilter(const edm::ParameterSet&); - ~GenLeadTrackFilter(); + ~GenLeadTrackFilter() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- edm::InputTag hepMCProduct_label_; double genLeadTrackPt_, diff --git a/GeneratorInterface/GenFilters/interface/HZZ4lFilter.h b/GeneratorInterface/GenFilters/interface/HZZ4lFilter.h index 0fed3cf217be9..3502cbb7a0508 100644 --- a/GeneratorInterface/GenFilters/interface/HZZ4lFilter.h +++ b/GeneratorInterface/GenFilters/interface/HZZ4lFilter.h @@ -42,10 +42,10 @@ namespace edm { class HZZ4lFilter : public edm::EDFilter { public: explicit HZZ4lFilter(const edm::ParameterSet&); - ~HZZ4lFilter(); + ~HZZ4lFilter() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; // virtual void endJob() ; // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/HeavyQuarkFromMPIFilter.h b/GeneratorInterface/GenFilters/interface/HeavyQuarkFromMPIFilter.h index 6a7b5f570eb4f..5f2c6c4e2008e 100644 --- a/GeneratorInterface/GenFilters/interface/HeavyQuarkFromMPIFilter.h +++ b/GeneratorInterface/GenFilters/interface/HeavyQuarkFromMPIFilter.h @@ -28,9 +28,9 @@ class HeavyQuarkFromMPIFilter : public edm::EDFilter { public: explicit HeavyQuarkFromMPIFilter(const edm::ParameterSet&); - ~HeavyQuarkFromMPIFilter(); + ~HeavyQuarkFromMPIFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: HeavyQuarkFromMPIFilterAlgo *HeavyQuarkFromMPIFilterAlgo_; diff --git a/GeneratorInterface/GenFilters/interface/HerwigMaxPtPartonFilter.h b/GeneratorInterface/GenFilters/interface/HerwigMaxPtPartonFilter.h index 75b88ec017db0..711d725e48bdd 100644 --- a/GeneratorInterface/GenFilters/interface/HerwigMaxPtPartonFilter.h +++ b/GeneratorInterface/GenFilters/interface/HerwigMaxPtPartonFilter.h @@ -46,10 +46,10 @@ namespace edm { class HerwigMaxPtPartonFilter : public edm::EDFilter { public: explicit HerwigMaxPtPartonFilter(const edm::ParameterSet&); - ~HerwigMaxPtPartonFilter(); + ~HerwigMaxPtPartonFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/HighETPhotonsFilter.h b/GeneratorInterface/GenFilters/interface/HighETPhotonsFilter.h index d6da8d9e9f85d..0973aaae805f6 100644 --- a/GeneratorInterface/GenFilters/interface/HighETPhotonsFilter.h +++ b/GeneratorInterface/GenFilters/interface/HighETPhotonsFilter.h @@ -28,9 +28,9 @@ class HighETPhotonsFilter : public edm::EDFilter { public: explicit HighETPhotonsFilter(const edm::ParameterSet&); - ~HighETPhotonsFilter(); + ~HighETPhotonsFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: HighETPhotonsFilterAlgo *HighETPhotonsAlgo_; diff --git a/GeneratorInterface/GenFilters/interface/JGJFilter.h b/GeneratorInterface/GenFilters/interface/JGJFilter.h index 7d80348800b42..6311d4cfaac4c 100644 --- a/GeneratorInterface/GenFilters/interface/JGJFilter.h +++ b/GeneratorInterface/GenFilters/interface/JGJFilter.h @@ -33,12 +33,12 @@ class JGJFilter : public edm::EDFilter { public: explicit JGJFilter(const edm::ParameterSet&); - ~JGJFilter(); + ~JGJFilter() override; private: - virtual void beginJob() ; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/JetFlavourCutFilter.h b/GeneratorInterface/GenFilters/interface/JetFlavourCutFilter.h index 3e3c813e05b5d..068303187b3fb 100644 --- a/GeneratorInterface/GenFilters/interface/JetFlavourCutFilter.h +++ b/GeneratorInterface/GenFilters/interface/JetFlavourCutFilter.h @@ -28,9 +28,9 @@ class JetFlavourCutFilter : public edm::EDFilter public: explicit JetFlavourCutFilter(const edm::ParameterSet&); - ~JetFlavourCutFilter(); + ~JetFlavourCutFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/JetFlavourFilter.h b/GeneratorInterface/GenFilters/interface/JetFlavourFilter.h index 17fa639bd208e..7f350c3ee2b00 100644 --- a/GeneratorInterface/GenFilters/interface/JetFlavourFilter.h +++ b/GeneratorInterface/GenFilters/interface/JetFlavourFilter.h @@ -28,9 +28,9 @@ class JetFlavourFilter : public edm::EDFilter public: explicit JetFlavourFilter(const edm::ParameterSet&); - ~JetFlavourFilter(); + ~JetFlavourFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/LHEDYdecayFilter.h b/GeneratorInterface/GenFilters/interface/LHEDYdecayFilter.h index ebc3a4963a133..d6f146445a9b7 100644 --- a/GeneratorInterface/GenFilters/interface/LHEDYdecayFilter.h +++ b/GeneratorInterface/GenFilters/interface/LHEDYdecayFilter.h @@ -29,10 +29,10 @@ class LHEDYdecayFilter : public edm::EDFilter { public: explicit LHEDYdecayFilter(const edm::ParameterSet&); - ~LHEDYdecayFilter(); + ~LHEDYdecayFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/LHEGenericFilter.h b/GeneratorInterface/GenFilters/interface/LHEGenericFilter.h index 919cfee693bf5..2d77ee73f85ae 100644 --- a/GeneratorInterface/GenFilters/interface/LHEGenericFilter.h +++ b/GeneratorInterface/GenFilters/interface/LHEGenericFilter.h @@ -39,11 +39,11 @@ class LHEGenericFilter : public edm::EDFilter { public: explicit LHEGenericFilter(const edm::ParameterSet&); - ~LHEGenericFilter(); + ~LHEGenericFilter() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob(); + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override; // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/LQGenFilter.h b/GeneratorInterface/GenFilters/interface/LQGenFilter.h index cabe85d790471..5564a92e3aa09 100644 --- a/GeneratorInterface/GenFilters/interface/LQGenFilter.h +++ b/GeneratorInterface/GenFilters/interface/LQGenFilter.h @@ -38,12 +38,12 @@ class LQGenFilter : public edm::EDFilter { public: explicit LQGenFilter(const edm::ParameterSet&); - ~LQGenFilter(); + ~LQGenFilter() override; private: - virtual void beginJob() ; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- edm::InputTag src_; diff --git a/GeneratorInterface/GenFilters/interface/MCDecayingPionKaonFilter.h b/GeneratorInterface/GenFilters/interface/MCDecayingPionKaonFilter.h index ef23232c5210c..b0f9ceaadd2f3 100644 --- a/GeneratorInterface/GenFilters/interface/MCDecayingPionKaonFilter.h +++ b/GeneratorInterface/GenFilters/interface/MCDecayingPionKaonFilter.h @@ -41,10 +41,10 @@ namespace edm { class MCDecayingPionKaonFilter : public edm::EDFilter { public: explicit MCDecayingPionKaonFilter(const edm::ParameterSet&); - ~MCDecayingPionKaonFilter(); + ~MCDecayingPionKaonFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/MCDijetResonance.h b/GeneratorInterface/GenFilters/interface/MCDijetResonance.h index 69ea703eb40ad..b75e19faac845 100644 --- a/GeneratorInterface/GenFilters/interface/MCDijetResonance.h +++ b/GeneratorInterface/GenFilters/interface/MCDijetResonance.h @@ -41,10 +41,10 @@ namespace edm { class MCDijetResonance : public edm::EDFilter { public: explicit MCDijetResonance(const edm::ParameterSet&); - ~MCDijetResonance(); - virtual void endJob() ; + ~MCDijetResonance() override; + void endJob() override ; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- edm::EDGetTokenT token_; diff --git a/GeneratorInterface/GenFilters/interface/MCLongLivedParticles.h b/GeneratorInterface/GenFilters/interface/MCLongLivedParticles.h index 71958a916d496..cc73334ba6781 100644 --- a/GeneratorInterface/GenFilters/interface/MCLongLivedParticles.h +++ b/GeneratorInterface/GenFilters/interface/MCLongLivedParticles.h @@ -40,10 +40,10 @@ class MCLongLivedParticles : public edm::EDFilter { public: explicit MCLongLivedParticles(const edm::ParameterSet&); - ~MCLongLivedParticles(); + ~MCLongLivedParticles() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/MCMultiParticleFilter.h b/GeneratorInterface/GenFilters/interface/MCMultiParticleFilter.h index 3e6b104cc7abe..1b1b7f227e145 100644 --- a/GeneratorInterface/GenFilters/interface/MCMultiParticleFilter.h +++ b/GeneratorInterface/GenFilters/interface/MCMultiParticleFilter.h @@ -41,11 +41,11 @@ namespace edm { class MCMultiParticleFilter : public edm::EDFilter { public: explicit MCMultiParticleFilter(const edm::ParameterSet&); - ~MCMultiParticleFilter(); + ~MCMultiParticleFilter() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob(); + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override; // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/MCPdgIndexFilter.h b/GeneratorInterface/GenFilters/interface/MCPdgIndexFilter.h index 5fd3695c59b60..0d1617fabd7bb 100644 --- a/GeneratorInterface/GenFilters/interface/MCPdgIndexFilter.h +++ b/GeneratorInterface/GenFilters/interface/MCPdgIndexFilter.h @@ -24,9 +24,9 @@ namespace edm { class MCPdgIndexFilter : public edm::EDFilter { public: explicit MCPdgIndexFilter(const edm::ParameterSet&); - ~MCPdgIndexFilter() {}; + ~MCPdgIndexFilter() override {}; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: bool pass(const edm::Event&); const edm::EDGetTokenT token_; diff --git a/GeneratorInterface/GenFilters/interface/MCProcessFilter.h b/GeneratorInterface/GenFilters/interface/MCProcessFilter.h index bd87182293056..0d7e671412f8b 100644 --- a/GeneratorInterface/GenFilters/interface/MCProcessFilter.h +++ b/GeneratorInterface/GenFilters/interface/MCProcessFilter.h @@ -43,10 +43,10 @@ namespace edm { class MCProcessFilter : public edm::EDFilter { public: explicit MCProcessFilter(const edm::ParameterSet&); - ~MCProcessFilter(); + ~MCProcessFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/MCProcessRangeFilter.h b/GeneratorInterface/GenFilters/interface/MCProcessRangeFilter.h index 8394ea396bff4..071cceef9c5a7 100644 --- a/GeneratorInterface/GenFilters/interface/MCProcessRangeFilter.h +++ b/GeneratorInterface/GenFilters/interface/MCProcessRangeFilter.h @@ -42,10 +42,10 @@ namespace edm { class MCProcessRangeFilter : public edm::EDFilter { public: explicit MCProcessRangeFilter(const edm::ParameterSet&); - ~MCProcessRangeFilter(); + ~MCProcessRangeFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/MCSingleParticleYPt.h b/GeneratorInterface/GenFilters/interface/MCSingleParticleYPt.h index 7a013139e0343..74b1aecc1d618 100644 --- a/GeneratorInterface/GenFilters/interface/MCSingleParticleYPt.h +++ b/GeneratorInterface/GenFilters/interface/MCSingleParticleYPt.h @@ -39,8 +39,8 @@ namespace edm { class MCSingleParticleYPt : public edm::EDFilter { public: explicit MCSingleParticleYPt(const edm::ParameterSet&); - ~MCSingleParticleYPt(); - virtual bool filter(edm::Event&, const edm::EventSetup&); + ~MCSingleParticleYPt() override; + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/MCSmartSingleParticleFilter.h b/GeneratorInterface/GenFilters/interface/MCSmartSingleParticleFilter.h index 85c78defe22c9..434709f7fd904 100644 --- a/GeneratorInterface/GenFilters/interface/MCSmartSingleParticleFilter.h +++ b/GeneratorInterface/GenFilters/interface/MCSmartSingleParticleFilter.h @@ -39,10 +39,10 @@ namespace edm { class MCSmartSingleParticleFilter : public edm::EDFilter { public: explicit MCSmartSingleParticleFilter(const edm::ParameterSet&); - ~MCSmartSingleParticleFilter(); + ~MCSmartSingleParticleFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------memeber function---------------------- diff --git a/GeneratorInterface/GenFilters/interface/MCZll.h b/GeneratorInterface/GenFilters/interface/MCZll.h index 8a3ffdd3af4b9..82aeaedeabd35 100644 --- a/GeneratorInterface/GenFilters/interface/MCZll.h +++ b/GeneratorInterface/GenFilters/interface/MCZll.h @@ -41,10 +41,10 @@ namespace edm { class MCZll : public edm::EDFilter { public: explicit MCZll(const edm::ParameterSet&); - ~MCZll(); - virtual void endJob() ; + ~MCZll() override; + void endJob() override ; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- edm::EDGetTokenT token_; diff --git a/GeneratorInterface/GenFilters/interface/MinimumBiasFilter.h b/GeneratorInterface/GenFilters/interface/MinimumBiasFilter.h index 051c359483003..805615e978695 100644 --- a/GeneratorInterface/GenFilters/interface/MinimumBiasFilter.h +++ b/GeneratorInterface/GenFilters/interface/MinimumBiasFilter.h @@ -22,10 +22,10 @@ class MinimumBiasFilter : public edm::EDFilter { public: MinimumBiasFilter(const edm::ParameterSet&); - virtual ~MinimumBiasFilter() {}; + ~MinimumBiasFilter() override {}; private: - bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- float theEventFraction; diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterEMJet.h b/GeneratorInterface/GenFilters/interface/PythiaFilterEMJet.h index af3eb200b133f..b807d55603413 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterEMJet.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterEMJet.h @@ -28,9 +28,9 @@ namespace edm { class PythiaFilterEMJet : public edm::EDFilter { public: explicit PythiaFilterEMJet(const edm::ParameterSet&); - ~PythiaFilterEMJet(); + ~PythiaFilterEMJet() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterEMJetHeep.h b/GeneratorInterface/GenFilters/interface/PythiaFilterEMJetHeep.h index e01dabb069675..d56e183d44850 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterEMJetHeep.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterEMJetHeep.h @@ -34,12 +34,12 @@ namespace edm { class PythiaFilterEMJetHeep : public edm::EDFilter { public: explicit PythiaFilterEMJetHeep(const edm::ParameterSet&); - ~PythiaFilterEMJetHeep(); + ~PythiaFilterEMJetHeep() override; double deltaR(double eta0, double phi0, double eta, double phi); - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void beginJob(); - virtual void endJob(); + bool filter(edm::Event&, const edm::EventSetup&) override; + void beginJob() override; + void endJob() override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJet.h b/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJet.h index 3074678c3d56d..8f236638512e5 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJet.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJet.h @@ -30,9 +30,9 @@ namespace edm { class PythiaFilterGammaJet : public edm::EDFilter { public: explicit PythiaFilterGammaJet(const edm::ParameterSet&); - ~PythiaFilterGammaJet(); + ~PythiaFilterGammaJet() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetIsoPi0.h b/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetIsoPi0.h index 62c6a482c7ef1..d3daf50523778 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetIsoPi0.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetIsoPi0.h @@ -30,9 +30,9 @@ namespace edm { class PythiaFilterGammaJetIsoPi0 : public edm::EDFilter { public: explicit PythiaFilterGammaJetIsoPi0(const edm::ParameterSet&); - ~PythiaFilterGammaJetIsoPi0(); + ~PythiaFilterGammaJetIsoPi0() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetWithBg.h b/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetWithBg.h index 2df9ea9c63b13..2e1ccbd27b8fd 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetWithBg.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetWithBg.h @@ -30,9 +30,9 @@ namespace edm { class PythiaFilterGammaJetWithBg : public edm::EDFilter { public: explicit PythiaFilterGammaJetWithBg(const edm::ParameterSet&); - ~PythiaFilterGammaJetWithBg(); + ~PythiaFilterGammaJetWithBg() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetWithOutBg.h b/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetWithOutBg.h index 897e6533db38a..21ce2f7e8f36a 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetWithOutBg.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterGammaJetWithOutBg.h @@ -30,9 +30,9 @@ namespace edm { class PythiaFilterGammaJetWithOutBg : public edm::EDFilter { public: explicit PythiaFilterGammaJetWithOutBg(const edm::ParameterSet&); - ~PythiaFilterGammaJetWithOutBg(); + ~PythiaFilterGammaJetWithOutBg() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterHT.h b/GeneratorInterface/GenFilters/interface/PythiaFilterHT.h index d176e894b0121..eb47a31b22f4f 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterHT.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterHT.h @@ -41,10 +41,10 @@ namespace edm { class PythiaFilterHT : public edm::EDFilter { public: explicit PythiaFilterHT(const edm::ParameterSet&); - ~PythiaFilterHT(); + ~PythiaFilterHT() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterIsolatedTrack.h b/GeneratorInterface/GenFilters/interface/PythiaFilterIsolatedTrack.h index 9824fd97c2b1f..10b64f1c4e1c0 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterIsolatedTrack.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterIsolatedTrack.h @@ -44,14 +44,14 @@ class PythiaFilterIsolatedTrack : public edm::stream::EDFilter initializeGlobalCache(edm::ParameterSet const& ) { return std::unique_ptr(new PythiaFilterIsoTracks::Counters()); } - virtual bool filter(edm::Event&, edm::EventSetup const&) override; - virtual void endStream() override; + bool filter(edm::Event&, edm::EventSetup const&) override; + void endStream() override; static void globalEndJob(const PythiaFilterIsoTracks::Counters* counters); // helper functions diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterTTBar.h b/GeneratorInterface/GenFilters/interface/PythiaFilterTTBar.h index 3d585a0a7e8b0..f13498a26e98d 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterTTBar.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterTTBar.h @@ -55,9 +55,9 @@ class PythiaFilterTTBar : public edm::EDFilter { public: explicit PythiaFilterTTBar(const edm::ParameterSet&); - ~PythiaFilterTTBar(); + ~PythiaFilterTTBar() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterZJet.h b/GeneratorInterface/GenFilters/interface/PythiaFilterZJet.h index 2e5e2c4753043..f4d1b74d7dccd 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterZJet.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterZJet.h @@ -30,9 +30,9 @@ namespace edm { class PythiaFilterZJet : public edm::EDFilter { public: explicit PythiaFilterZJet(const edm::ParameterSet&); - ~PythiaFilterZJet(); + ~PythiaFilterZJet() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterZJetWithOutBg.h b/GeneratorInterface/GenFilters/interface/PythiaFilterZJetWithOutBg.h index 590393d9b3a92..eff355cc21f81 100755 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterZJetWithOutBg.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterZJetWithOutBg.h @@ -30,9 +30,9 @@ namespace edm { class PythiaFilterZJetWithOutBg : public edm::EDFilter { public: explicit PythiaFilterZJetWithOutBg(const edm::ParameterSet&); - ~PythiaFilterZJetWithOutBg(); + ~PythiaFilterZJetWithOutBg() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaFilterZgamma.h b/GeneratorInterface/GenFilters/interface/PythiaFilterZgamma.h index acf50238f3f54..f3f31264f361b 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaFilterZgamma.h +++ b/GeneratorInterface/GenFilters/interface/PythiaFilterZgamma.h @@ -29,9 +29,9 @@ namespace edm { class PythiaFilterZgamma : public edm::EDFilter { public: explicit PythiaFilterZgamma(const edm::ParameterSet&); - ~PythiaFilterZgamma(); + ~PythiaFilterZgamma() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/GenFilters/interface/PythiaHLTSoupFilter.h b/GeneratorInterface/GenFilters/interface/PythiaHLTSoupFilter.h index 29a3f8245a71d..17ad155956cf1 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaHLTSoupFilter.h +++ b/GeneratorInterface/GenFilters/interface/PythiaHLTSoupFilter.h @@ -42,10 +42,10 @@ namespace edm { class PythiaHLTSoupFilter : public edm::EDFilter { public: explicit PythiaHLTSoupFilter(const edm::ParameterSet&); - ~PythiaHLTSoupFilter(); + ~PythiaHLTSoupFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/RecoDiMuon.h b/GeneratorInterface/GenFilters/interface/RecoDiMuon.h index 6a56d845ebee8..2bb256cb6e03a 100644 --- a/GeneratorInterface/GenFilters/interface/RecoDiMuon.h +++ b/GeneratorInterface/GenFilters/interface/RecoDiMuon.h @@ -26,10 +26,10 @@ class RecoDiMuon : public edm::EDFilter { public: explicit RecoDiMuon(const edm::ParameterSet&); - ~RecoDiMuon(); - virtual void endJob() ; + ~RecoDiMuon() override; + void endJob() override ; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: edm::InputTag muonLabel_; diff --git a/GeneratorInterface/GenFilters/interface/STFilter.h b/GeneratorInterface/GenFilters/interface/STFilter.h index 4fdb1df7fec88..38fd97e4a0fad 100644 --- a/GeneratorInterface/GenFilters/interface/STFilter.h +++ b/GeneratorInterface/GenFilters/interface/STFilter.h @@ -13,11 +13,11 @@ class STFilter : public edm::EDFilter { public: explicit STFilter(const edm::ParameterSet&); - ~STFilter(); + ~STFilter() override; private: - virtual void beginJob() ; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; private: double pTMax_; // debug level diff --git a/GeneratorInterface/GenFilters/interface/TotalKinematicsFilter.h b/GeneratorInterface/GenFilters/interface/TotalKinematicsFilter.h index 3066da3e1bf85..8399e0e0082f2 100644 --- a/GeneratorInterface/GenFilters/interface/TotalKinematicsFilter.h +++ b/GeneratorInterface/GenFilters/interface/TotalKinematicsFilter.h @@ -28,10 +28,10 @@ class TotalKinematicsFilter : public edm::EDFilter { public: explicit TotalKinematicsFilter(const edm::ParameterSet&); - ~TotalKinematicsFilter(); + ~TotalKinematicsFilter() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/interface/TwoVBGenFilter.h b/GeneratorInterface/GenFilters/interface/TwoVBGenFilter.h index 3b816d241b3a2..05680db46a4e1 100644 --- a/GeneratorInterface/GenFilters/interface/TwoVBGenFilter.h +++ b/GeneratorInterface/GenFilters/interface/TwoVBGenFilter.h @@ -37,12 +37,12 @@ class TwoVBGenFilter : public edm::EDFilter { public: explicit TwoVBGenFilter(const edm::ParameterSet&); - ~TwoVBGenFilter(); + ~TwoVBGenFilter() override; private: - virtual void beginJob() ; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- edm::InputTag src_; diff --git a/GeneratorInterface/GenFilters/interface/XtoFFbarFilter.h b/GeneratorInterface/GenFilters/interface/XtoFFbarFilter.h index 5162cacf34fc0..e2b739a753d62 100644 --- a/GeneratorInterface/GenFilters/interface/XtoFFbarFilter.h +++ b/GeneratorInterface/GenFilters/interface/XtoFFbarFilter.h @@ -30,9 +30,9 @@ class XtoFFbarFilter : public edm::EDFilter { public: XtoFFbarFilter(const edm::ParameterSet&); - ~XtoFFbarFilter() {} + ~XtoFFbarFilter() override {} - virtual bool filter(edm::Event& iEvent, const edm::EventSetup& iSetup); + bool filter(edm::Event& iEvent, const edm::EventSetup& iSetup) override; private: @@ -46,7 +46,7 @@ class XtoFFbarFilter : public edm::EDFilter { const std::vector& idMotherX, const std::vector& idDaughterF); - virtual void endJob(); + void endJob() override; private: diff --git a/GeneratorInterface/GenFilters/interface/ZgMassFilter.h b/GeneratorInterface/GenFilters/interface/ZgMassFilter.h index bc43fd52aca5b..dc3413e621058 100644 --- a/GeneratorInterface/GenFilters/interface/ZgMassFilter.h +++ b/GeneratorInterface/GenFilters/interface/ZgMassFilter.h @@ -42,10 +42,10 @@ namespace edm { class ZgMassFilter : public edm::EDFilter { public: explicit ZgMassFilter(const edm::ParameterSet&); - ~ZgMassFilter(); + ~ZgMassFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------memeber function---------------------- int charge(const int& Id); diff --git a/GeneratorInterface/GenFilters/interface/ZgammaMassFilter.h b/GeneratorInterface/GenFilters/interface/ZgammaMassFilter.h index 520e17df35dfd..03fa41a59f922 100644 --- a/GeneratorInterface/GenFilters/interface/ZgammaMassFilter.h +++ b/GeneratorInterface/GenFilters/interface/ZgammaMassFilter.h @@ -43,10 +43,10 @@ namespace edm { class ZgammaMassFilter : public edm::EDFilter { public: explicit ZgammaMassFilter(const edm::ParameterSet&); - ~ZgammaMassFilter(); + ~ZgammaMassFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: // ----------memeber function---------------------- int charge(const int& Id); diff --git a/GeneratorInterface/GenFilters/interface/Zto2lFilter.h b/GeneratorInterface/GenFilters/interface/Zto2lFilter.h index 509ac2d44d586..ebe8960947ffa 100644 --- a/GeneratorInterface/GenFilters/interface/Zto2lFilter.h +++ b/GeneratorInterface/GenFilters/interface/Zto2lFilter.h @@ -39,11 +39,11 @@ class Zto2lFilter : public edm::EDFilter { public: explicit Zto2lFilter(const edm::ParameterSet&); - ~Zto2lFilter(); + ~Zto2lFilter() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- std::string fLabel_; diff --git a/GeneratorInterface/GenFilters/interface/doubleEMEnrichingFilter.h b/GeneratorInterface/GenFilters/interface/doubleEMEnrichingFilter.h index a1b0fc3d62a06..d228789d545f3 100644 --- a/GeneratorInterface/GenFilters/interface/doubleEMEnrichingFilter.h +++ b/GeneratorInterface/GenFilters/interface/doubleEMEnrichingFilter.h @@ -28,9 +28,9 @@ class doubleEMEnrichingFilter : public edm::EDFilter { public: explicit doubleEMEnrichingFilter(const edm::ParameterSet&); - ~doubleEMEnrichingFilter(); + ~doubleEMEnrichingFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: doubleEMEnrichingFilterAlgo *doubleEMEAlgo_; diff --git a/GeneratorInterface/GenFilters/src/BdecayFilter.cc b/GeneratorInterface/GenFilters/src/BdecayFilter.cc index bac5f8d731701..fac3432c6c2cb 100644 --- a/GeneratorInterface/GenFilters/src/BdecayFilter.cc +++ b/GeneratorInterface/GenFilters/src/BdecayFilter.cc @@ -57,7 +57,7 @@ HepMC::GenParticle * BdecayFilter::findParticle(HepMC::GenVertex* vertex, cout << "particle Id: "<end_vertex(); //*** - GenParticle * jpsi = 0; - GenParticle * phi = 0; + GenParticle * jpsi = nullptr; + GenParticle * phi = nullptr; // cout << "bs size "<particles_out_size(); @@ -106,8 +106,8 @@ bool BdecayFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) */ //*** - if( (numChildren==2) && ((jpsi = findParticle(outVertex, firstDaughter.type))!=0) && - ((phi = findParticle(outVertex, secondDaughter.type))!=0)) { + if( (numChildren==2) && ((jpsi = findParticle(outVertex, firstDaughter.type))!=nullptr) && + ((phi = findParticle(outVertex, secondDaughter.type))!=nullptr)) { cout << jpsi->momentum().rho() <<" "<momentum().eta() <<" "<momentum().rho()<<" "<momentum().eta()<end_vertex(); //*** - GenParticle * jpsi = 0; - GenParticle * phi = 0; + GenParticle * jpsi = nullptr; + GenParticle * phi = nullptr; // cout << "bs size "<particles_out_size(); @@ -103,8 +103,8 @@ bool BsJpsiPhiFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) */ //*** - if( (numChildren==2) && ((jpsi = findParticle(outVertex, 443))!=0) && - ((phi = findParticle(outVertex, 333))!=0)) { + if( (numChildren==2) && ((jpsi = findParticle(outVertex, 443))!=nullptr) && + ((phi = findParticle(outVertex, 333))!=nullptr)) { cout << jpsi->momentum().rho()<<" "<momentum().eta() <<" "<momentum().rho() <<" "<momentum().eta()<GetEvent(); // myEvt->print(); // to print the record - const GenParticle * gp_clep = NULL; + const GenParticle * gp_clep = nullptr; for (GenEvent::particle_const_iterator it = myEvt->particles_begin(); it != myEvt->particles_end(); ++it) { @@ -102,9 +102,9 @@ bool ComphepSingletopFilter::filter( } } - bool process22 = (vgp_bsec.size() == 0); + bool process22 = (vgp_bsec.empty()); - GenVertex * gv = NULL; + GenVertex * gv = nullptr; if (process22) { for (GenVertex::particle_iterator it = gv_hard->particles_begin(parents); it != gv_hard->particles_end(parents); ++it) { @@ -123,7 +123,7 @@ bool ComphepSingletopFilter::filter( } const GenParticle * gp; while (gv) { - gp = NULL; + gp = nullptr; for (GenVertex::particle_iterator it = gv->particles_begin(children); it != gv->particles_end(children); ++it) { if ((*it)->pdg_id() == -id_bdec) { @@ -136,11 +136,11 @@ bool ComphepSingletopFilter::filter( gv = gp->end_vertex(); vgp_bsec.push_back(gp); } else { - gv = NULL; + gv = nullptr; } } - if (vgp_bsec.size() == 0) { + if (vgp_bsec.empty()) { cerr << "ERROR: ComphepSingletopFilter: HepMC inconsistency" << endl; return false; } diff --git a/GeneratorInterface/GenFilters/src/ComphepSingletopFilterPy8.cc b/GeneratorInterface/GenFilters/src/ComphepSingletopFilterPy8.cc index 58b90e1d3b4af..dd4728074741f 100644 --- a/GeneratorInterface/GenFilters/src/ComphepSingletopFilterPy8.cc +++ b/GeneratorInterface/GenFilters/src/ComphepSingletopFilterPy8.cc @@ -70,26 +70,26 @@ const HepMC::GenEvent * myEvt = evt->GetEvent(); int id_bdec=0, id_lJet=0, id_b_from_top=0, id_lep = 0; //vars for lepton top -const GenParticle * gp_clep = NULL; -GenVertex * gv_hard = NULL; +const GenParticle * gp_clep = nullptr; +GenVertex * gv_hard = nullptr; -const GenParticle * gp_lep_FSR = NULL; -GenVertex * gv_lep = NULL; +const GenParticle * gp_lep_FSR = nullptr; +GenVertex * gv_lep = nullptr; vector vgp_lep; //vars for add b from top -GenVertex * gv = NULL; -const GenParticle * gp = NULL; +GenVertex * gv = nullptr; +const GenParticle * gp = nullptr; vector vgp_bsec; //vars for light Jet (light q) -GenVertex * gv_lJet= NULL; -const GenParticle * gplJet= NULL; +GenVertex * gv_lJet= nullptr; +const GenParticle * gplJet= nullptr; vector vgp_lJet; //vars for b from top -GenVertex * gv_b_t= NULL; -const GenParticle * gp_b_t= NULL; +GenVertex * gv_b_t= nullptr; +const GenParticle * gp_b_t= nullptr; vector vgp_b_t; @@ -107,7 +107,7 @@ vector vgp_b_t; // Lepton FSR while (gv_lep) { - gp_lep_FSR = NULL; + gp_lep_FSR = nullptr; for (GenVertex::particle_iterator it = gv_lep->particles_begin(children); it != gv_lep->particles_end(children); ++it) { if ((*it)->pdg_id() == id_lep) @@ -125,7 +125,7 @@ vector vgp_b_t; } else { - gv_lep = NULL; //exits the "while" loop + gv_lep = nullptr; //exits the "while" loop } } break; @@ -156,7 +156,7 @@ vector vgp_b_t; while (gv_lJet) { - gplJet = NULL; + gplJet = nullptr; for (GenVertex::particle_iterator it = gv_lJet->particles_begin(children); it != gv_lJet->particles_end(children); ++it) { if ((*it)->pdg_id() == id_lJet) @@ -175,7 +175,7 @@ vector vgp_b_t; } else { - gv_lJet = NULL; //exits the "while" loop + gv_lJet = nullptr; //exits the "while" loop } } } @@ -191,7 +191,7 @@ vector vgp_b_t; while (gv_b_t) { - gp_b_t = NULL; + gp_b_t = nullptr; for (GenVertex::particle_iterator it = gv_b_t->particles_begin(children); it != gv_b_t->particles_end(children); ++it) { if ((*it)->pdg_id() == id_b_from_top) @@ -210,7 +210,7 @@ vector vgp_b_t; } else { - gv_b_t = NULL; //exits the "while" loop + gv_b_t = nullptr; //exits the "while" loop } } } @@ -222,7 +222,7 @@ vector vgp_b_t; } -bool process22 = (vgp_bsec.size() == 0); //if there is no aditional b-quark in primary vexrtes, then it is tq-process (2->2) +bool process22 = (vgp_bsec.empty()); //if there is no aditional b-quark in primary vexrtes, then it is tq-process (2->2) if (process22) { @@ -286,7 +286,7 @@ cerr << "ERROR: ComphepSingletopFilterPy8: HepMC inconsistency (No add b vertex while (gv) { - gp = NULL; + gp = nullptr; for (GenVertex::particle_iterator it = gv->particles_begin(children); it != gv->particles_end(children); ++it) { @@ -306,13 +306,13 @@ cerr << "ERROR: ComphepSingletopFilterPy8: HepMC inconsistency (No add b vertex } else { - gv = NULL; //exits the "while" loop + gv = nullptr; //exits the "while" loop } gv_loopCount++; } - if (vgp_bsec.size() == 0) + if (vgp_bsec.empty()) { cerr << "ERROR: ComphepSingletopFilterPy8: HepMC inconsistency (vgp_bsec.size() == 0)" << endl; return false; diff --git a/GeneratorInterface/GenFilters/src/DJpsiFilter.cc b/GeneratorInterface/GenFilters/src/DJpsiFilter.cc index 4982585f80eb2..44c966849d4f8 100644 --- a/GeneratorInterface/GenFilters/src/DJpsiFilter.cc +++ b/GeneratorInterface/GenFilters/src/DJpsiFilter.cc @@ -39,13 +39,13 @@ class DJpsiFilter : public edm::EDFilter { public: explicit DJpsiFilter(const edm::ParameterSet&); - ~DJpsiFilter(); + ~DJpsiFilter() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; + bool filter(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/src/FourLepFilter.cc b/GeneratorInterface/GenFilters/src/FourLepFilter.cc index a4f6bd321ff16..31de2d43bd5a6 100644 --- a/GeneratorInterface/GenFilters/src/FourLepFilter.cc +++ b/GeneratorInterface/GenFilters/src/FourLepFilter.cc @@ -39,13 +39,13 @@ class FourLepFilter : public edm::EDFilter { public: explicit FourLepFilter(const edm::ParameterSet&); - ~FourLepFilter(); + ~FourLepFilter() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; + bool filter(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/src/GenHTFilter.cc b/GeneratorInterface/GenFilters/src/GenHTFilter.cc index ffab731be23a3..71babf96823ef 100644 --- a/GeneratorInterface/GenFilters/src/GenHTFilter.cc +++ b/GeneratorInterface/GenFilters/src/GenHTFilter.cc @@ -39,10 +39,10 @@ class GenHTFilter : public edm::EDFilter { public: explicit GenHTFilter(const edm::ParameterSet&); - ~GenHTFilter(); + ~GenHTFilter() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; + bool filter(edm::Event&, const edm::EventSetup&) override; //Member data edm::EDGetTokenT token_; diff --git a/GeneratorInterface/GenFilters/src/HerwigMaxPtPartonFilter.cc b/GeneratorInterface/GenFilters/src/HerwigMaxPtPartonFilter.cc index 553624420e0fd..69a5cecf6f2b1 100644 --- a/GeneratorInterface/GenFilters/src/HerwigMaxPtPartonFilter.cc +++ b/GeneratorInterface/GenFilters/src/HerwigMaxPtPartonFilter.cc @@ -38,7 +38,7 @@ If this is true, the event is accepted. #include "GeneratorInterface/GenFilters/interface/HerwigMaxPtPartonFilter.h" #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" -#include +#include using namespace edm; using namespace std; diff --git a/GeneratorInterface/GenFilters/src/JetFlavourCutFilter.cc b/GeneratorInterface/GenFilters/src/JetFlavourCutFilter.cc index 640122412f51a..cd74d77853f7f 100644 --- a/GeneratorInterface/GenFilters/src/JetFlavourCutFilter.cc +++ b/GeneratorInterface/GenFilters/src/JetFlavourCutFilter.cc @@ -29,7 +29,7 @@ HepMC::GenParticle * JetFlavourCutFilter::findParticle(const GenPartVect& genPar { if (requested_id == (*p)->pdg_id()) return *p; } - return 0; + return nullptr; } diff --git a/GeneratorInterface/GenFilters/src/JetFlavourFilter.cc b/GeneratorInterface/GenFilters/src/JetFlavourFilter.cc index ff90e8f7c41e5..3ae3ceb4426c9 100644 --- a/GeneratorInterface/GenFilters/src/JetFlavourFilter.cc +++ b/GeneratorInterface/GenFilters/src/JetFlavourFilter.cc @@ -29,7 +29,7 @@ HepMC::GenParticle * JetFlavourFilter::findParticle(const GenPartVect& genPartVe { if (requested_id == (*p)->pdg_id()) return *p; } - return 0; + return nullptr; } diff --git a/GeneratorInterface/GenFilters/src/MCLongLivedParticles.cc b/GeneratorInterface/GenFilters/src/MCLongLivedParticles.cc index d49448f6df9c5..f2f096a9b3cfb 100644 --- a/GeneratorInterface/GenFilters/src/MCLongLivedParticles.cc +++ b/GeneratorInterface/GenFilters/src/MCLongLivedParticles.cc @@ -42,7 +42,7 @@ bool MCLongLivedParticles::filter(edm::Event& iEvent, const edm::EventSetup& iSe for (p = generated_event->particles_begin(); p != generated_event->particles_end(); p++) { - if(((*p)->production_vertex() != 0) && ((*p)->end_vertex()!=0)) + if(((*p)->production_vertex() != nullptr) && ((*p)->end_vertex()!=nullptr)) { float dist = sqrt((((*p)->production_vertex())->position().x()-((*p)->end_vertex())->position().x())*(((*p)->production_vertex())->position().x()-((*p)->end_vertex())->position().x())+ (((*p)->production_vertex())->position().y()-((*p)->end_vertex())->position().y())*(((*p)->production_vertex())->position().y()-((*p)->end_vertex())->position().y())); @@ -50,7 +50,7 @@ bool MCLongLivedParticles::filter(edm::Event& iEvent, const edm::EventSetup& iSe pass=true; } - if(((*p)->production_vertex()==0) && (!((*p)->end_vertex()!=0))) + if(((*p)->production_vertex()==nullptr) && (!((*p)->end_vertex()!=nullptr))) { if(((*p)->end_vertex())->position().perp()>theCut) pass=true; diff --git a/GeneratorInterface/GenFilters/src/NJetsMC.cc b/GeneratorInterface/GenFilters/src/NJetsMC.cc index 9ae569e056ac0..e1894ec5c46cc 100644 --- a/GeneratorInterface/GenFilters/src/NJetsMC.cc +++ b/GeneratorInterface/GenFilters/src/NJetsMC.cc @@ -51,12 +51,12 @@ class NJetsMC : public edm::EDFilter { public: explicit NJetsMC(const edm::ParameterSet&); - ~NJetsMC(); + ~NJetsMC() override; private: - virtual void beginJob() override ; - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- diff --git a/GeneratorInterface/GenFilters/src/PhotonEnrichmentFilter.cc b/GeneratorInterface/GenFilters/src/PhotonEnrichmentFilter.cc index 2fe7e9e6651e6..9d45d9959027f 100644 --- a/GeneratorInterface/GenFilters/src/PhotonEnrichmentFilter.cc +++ b/GeneratorInterface/GenFilters/src/PhotonEnrichmentFilter.cc @@ -43,12 +43,12 @@ using namespace std; class PhotonEnrichmentFilter : public edm::EDFilter { public: explicit PhotonEnrichmentFilter(const edm::ParameterSet&); - ~PhotonEnrichmentFilter(); + ~PhotonEnrichmentFilter() override; private: - virtual void beginJob() override ; - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- bool Debug_; //bool Report_; diff --git a/GeneratorInterface/GenFilters/src/PythiaFilterEMJet.cc b/GeneratorInterface/GenFilters/src/PythiaFilterEMJet.cc index 6cbd7e1545f8a..0dab659d22799 100644 --- a/GeneratorInterface/GenFilters/src/PythiaFilterEMJet.cc +++ b/GeneratorInterface/GenFilters/src/PythiaFilterEMJet.cc @@ -117,10 +117,10 @@ bool PythiaFilterEMJet::filter(edm::Event& iEvent, const edm::EventSetup& iSetup ptEMClus = ptEM; //check if the EM particle is in the barrel - bool inEB(0); + bool inEB(false); double tgx(0); double tgy(0); - if( std::abs(etaEM)momentum().px()/(*is)->momentum().pz(); tgy=(*is)->momentum().py()/(*is)->momentum().pz(); diff --git a/GeneratorInterface/GenFilters/src/PythiaFilterGammaJet.cc b/GeneratorInterface/GenFilters/src/PythiaFilterGammaJet.cc index cebf149035e08..568459168ef0f 100644 --- a/GeneratorInterface/GenFilters/src/PythiaFilterGammaJet.cc +++ b/GeneratorInterface/GenFilters/src/PythiaFilterGammaJet.cc @@ -117,10 +117,10 @@ bool PythiaFilterGammaJet::filter(edm::Event& iEvent, const edm::EventSetup& iSe if (eta2<-etaPhotonCut2) eta2=-etaPhotonCut2; if (etaPhotoneta2) continue; - bool inEB(0); + bool inEB(false); double tgx(0); double tgy(0); - if( std::abs(etaPhoton)momentum().px()/(*is)->momentum().pz(); tgy=(*is)->momentum().py()/(*is)->momentum().pz(); diff --git a/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetIsoPi0.cc b/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetIsoPi0.cc index 66229a12ece93..4b9e754e94fd5 100644 --- a/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetIsoPi0.cc +++ b/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetIsoPi0.cc @@ -126,10 +126,10 @@ bool PythiaFilterGammaJetIsoPi0::filter(edm::Event& iEvent, const edm::EventSetu // ---------------------------------------------------------- if(dr_pi0_photon > isodr) { - bool inEB(0); + bool inEB(false); double tgx(0); double tgy(0); - if( std::abs(eta_pi0) < ebEtaMax) inEB=1; + if( std::abs(eta_pi0) < ebEtaMax) inEB=true; else{ tgx=myGenEvent->barcode_to_particle(pi0_id)->momentum().px()/myGenEvent->barcode_to_particle(pi0_id)->momentum().pz(); tgy=myGenEvent->barcode_to_particle(pi0_id)->momentum().py()/myGenEvent->barcode_to_particle(pi0_id)->momentum().pz(); diff --git a/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetWithBg.cc b/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetWithBg.cc index 664b6703df72c..76023d3c04b85 100644 --- a/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetWithBg.cc +++ b/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetWithBg.cc @@ -146,10 +146,10 @@ bool PythiaFilterGammaJetWithBg::filter(edm::Event& iEvent, const edm::EventSetu // std::cout<<"Reject eta"<momentum().px()/(*is)->momentum().pz(); tgy=(*is)->momentum().py()/(*is)->momentum().pz(); diff --git a/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetWithOutBg.cc b/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetWithOutBg.cc index a46959df46a3c..06dd7613145d8 100644 --- a/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetWithOutBg.cc +++ b/GeneratorInterface/GenFilters/src/PythiaFilterGammaJetWithOutBg.cc @@ -144,10 +144,10 @@ bool PythiaFilterGammaJetWithOutBg::filter(edm::Event& iEvent, const edm::EventS // std::cout<<"Reject eta"<momentum().px()/(*is)->momentum().pz(); tgy=(*is)->momentum().py()/(*is)->momentum().pz(); diff --git a/GeneratorInterface/GenFilters/src/UEDMultiLeptonFilter.cc b/GeneratorInterface/GenFilters/src/UEDMultiLeptonFilter.cc index dac2b6b081c6d..0fc5f2c9715c2 100644 --- a/GeneratorInterface/GenFilters/src/UEDMultiLeptonFilter.cc +++ b/GeneratorInterface/GenFilters/src/UEDMultiLeptonFilter.cc @@ -49,12 +49,12 @@ class UEDMultiLeptonFilter : public edm::EDFilter { public: explicit UEDMultiLeptonFilter(const edm::ParameterSet&); - ~UEDMultiLeptonFilter(); + ~UEDMultiLeptonFilter() override; private: - virtual void beginJob() override ; - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; bool isLepton(HepMC::GenVertex::particles_out_const_iterator part); bool isLeptonPlus(HepMC::GenVertex::particles_out_const_iterator part); bool isLeptonMinus(HepMC::GenVertex::particles_out_const_iterator part); @@ -321,7 +321,7 @@ UEDMultiLeptonFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) //debug std::cout << "UED particle ID: " << (*i)->pdg_id() << " status: "<< (*i)->status()<< std::endl; HepMC::GenVertex* vertex = (*i)->end_vertex(); - if(vertex!=0){ + if(vertex!=nullptr){ for(HepMC::GenVertex::particles_out_const_iterator part = vertex->particles_out_const_begin(); part != vertex->particles_out_const_end(); part++ ){ //debug std::cout << " Outgoing particle id :"<< (*part)->pdg_id() << " status: " << (*part)->status() << std::endl; @@ -329,7 +329,7 @@ UEDMultiLeptonFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) if((*part)->status()==1){//debug std::cout << "Final State Lepton " << std::endl; } HepMC::GenVertex* lepton_vertex = (*part)->end_vertex(); - if(lepton_vertex!=0){ + if(lepton_vertex!=nullptr){ for(HepMC::GenVertex::particles_out_const_iterator lepton_part = lepton_vertex->particles_out_const_begin(); lepton_part != lepton_vertex->particles_out_const_end(); lepton_part++ ){ //debug std::cout << " Part Id: "<< (*lepton_part)->pdg_id() << " status: "<< (*lepton_part)->status()<< std::endl; @@ -369,7 +369,7 @@ UEDMultiLeptonFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) nSSdileptons++; if(SSDiLepFilter==1)return AcceptEvent(); //Vetoed decays - if((leptonIDplus.size()==2 && leptonIDminus.size()==0) || (leptonIDplus.size()==0 && leptonIDminus.size()==2)){ + if((leptonIDplus.size()==2 && leptonIDminus.empty()) || (leptonIDplus.empty() && leptonIDminus.size()==2)){ int e=0; int mu=0; diff --git a/GeneratorInterface/GenFilters/src/XtoFFbarFilter.cc b/GeneratorInterface/GenFilters/src/XtoFFbarFilter.cc index f92f560ed09b5..0f28bc89bb6e4 100644 --- a/GeneratorInterface/GenFilters/src/XtoFFbarFilter.cc +++ b/GeneratorInterface/GenFilters/src/XtoFFbarFilter.cc @@ -12,7 +12,7 @@ XtoFFbarFilter::XtoFFbarFilter(const edm::ParameterSet& iConfig) : xTotal_(0), xSumPt_(0.), xSumR_(0.), xSumCtau_(0.), totalEvents_(0),rejectedEvents_(0) { // Note if if not searching for Y --> g-gbar. - requireY_ = (idMotherY_.size() > 0 && idDaughterG_.size() > 0); + requireY_ = (!idMotherY_.empty() && !idDaughterG_.empty()); } diff --git a/GeneratorInterface/GenFilters/src/ZgammaMassFilter.cc b/GeneratorInterface/GenFilters/src/ZgammaMassFilter.cc index ff2f33ecd36bf..8dbe81c991311 100644 --- a/GeneratorInterface/GenFilters/src/ZgammaMassFilter.cc +++ b/GeneratorInterface/GenFilters/src/ZgammaMassFilter.cc @@ -95,7 +95,7 @@ bool ZgammaMassFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) // std::cout << "\n" << std::endl; if ( - Photon.size() > 0 && Lepton.size() > 1 && + !Photon.empty() && Lepton.size() > 1 && Photon[0].Pt() > minPhotonPt && Lepton[0].Pt() > minLeptonPt && Lepton[1].Pt() > minLeptonPt && diff --git a/GeneratorInterface/Herwig6Interface/interface/Herwig6Instance.h b/GeneratorInterface/Herwig6Interface/interface/Herwig6Instance.h index 7a7d04f8406aa..d1d28d28ee66e 100644 --- a/GeneratorInterface/Herwig6Interface/interface/Herwig6Instance.h +++ b/GeneratorInterface/Herwig6Interface/interface/Herwig6Instance.h @@ -18,7 +18,7 @@ extern "C" { class Herwig6Instance : public FortranInstance { public: Herwig6Instance(); - virtual ~Herwig6Instance(); + ~Herwig6Instance() override; // passes a configuration parameter bool give(const std::string &line); diff --git a/GeneratorInterface/Herwig6Interface/plugins/Herwig6Hadronizer.cc b/GeneratorInterface/Herwig6Interface/plugins/Herwig6Hadronizer.cc index 2deb638794c96..a0428ad9e4688 100644 --- a/GeneratorInterface/Herwig6Interface/plugins/Herwig6Hadronizer.cc +++ b/GeneratorInterface/Herwig6Interface/plugins/Herwig6Hadronizer.cc @@ -86,7 +86,7 @@ class Herwig6Hadronizer : public gen::BaseHadronizer, public gen::Herwig6Instance { public: Herwig6Hadronizer(const edm::ParameterSet ¶ms); - ~Herwig6Hadronizer(); + ~Herwig6Hadronizer() override; void setSLHAFromHeader(const std::vector &lines); bool initialize(const lhef::HEPRUP *heprup); @@ -115,16 +115,16 @@ class Herwig6Hadronizer : public gen::BaseHadronizer, private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; - virtual std::vector const& doSharedResources() const override { return theSharedResources; } + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + std::vector const& doSharedResources() const override { return theSharedResources; } void clear(); int pythiaStatusCode(const HepMC::GenParticle *p) const; void pythiaStatusCodes(); - virtual void upInit() override; - virtual void upEvnt() override; + void upInit() override; + void upEvnt() override; static const std::vector theSharedResources; @@ -241,7 +241,7 @@ void Herwig6Hadronizer::setSLHAFromHeader( boost::split(tokens, line, boost::algorithm::is_space(), boost::token_compress_on); - if (!tokens.size()) + if (tokens.empty()) continue; block.clear(); if (tokens.size() < 2) @@ -270,7 +270,7 @@ bool Herwig6Hadronizer:: readSettings( int key ) clear(); const lhef::HEPRUP* heprup = lheRunInfo()->getHEPRUP(); - externalPartons = ( heprup != 0 ); + externalPartons = ( heprup != nullptr ); if ( key == 0 && externalPartons ) return false; if ( key > 0 && !externalPartons ) return false; @@ -421,7 +421,7 @@ bool Herwig6Hadronizer:: readSettings( int key ) //Lars: lower EFFMIN threshold, to continue execution of IPROC=4000, lambda'_211=0.01 at LM7,10 if( readParticleSpecFile ) { - openParticleSpecFile(particleSpecFileName.c_str()); + openParticleSpecFile(particleSpecFileName); hwpram.EFFMIN = 1e-5; } @@ -455,7 +455,7 @@ bool Herwig6Hadronizer::initialize(const lhef::HEPRUP *heprup) { clear(); - externalPartons = (heprup != 0); + externalPartons = (heprup != nullptr); std::ostringstream info; info << "---------------------------------------------------\n"; @@ -590,7 +590,7 @@ bool Herwig6Hadronizer::initialize(const lhef::HEPRUP *heprup) //Lars: lower EFFMIN threshold, to continue execution of IPROC=4000, lambda'_211=0.01 at LM7,10 if( readParticleSpecFile ) { - openParticleSpecFile(particleSpecFileName.c_str()); + openParticleSpecFile(particleSpecFileName); hwpram.EFFMIN = 1e-5; } @@ -777,30 +777,30 @@ void Herwig6Hadronizer::finalizeEvent() } - HepMC::GenParticle* incomingParton = NULL; - HepMC::GenParticle* targetParton = NULL; + HepMC::GenParticle* incomingParton = nullptr; + HepMC::GenParticle* targetParton = nullptr; - HepMC::GenParticle* incomingProton = NULL; - HepMC::GenParticle* targetProton = NULL; + HepMC::GenParticle* incomingProton = nullptr; + HepMC::GenParticle* targetProton = nullptr; // find incoming parton (first entry with IST=121) for(HepMC::GenEvent::particle_const_iterator it = event()->particles_begin(); - (it != event()->particles_end() && incomingParton==NULL); it++) + (it != event()->particles_end() && incomingParton==nullptr); it++) if((*it)->status()==121) incomingParton = (*it); // find target parton (first entry with IST=122) for(HepMC::GenEvent::particle_const_iterator it = event()->particles_begin(); - (it != event()->particles_end() && targetParton==NULL); it++) + (it != event()->particles_end() && targetParton==nullptr); it++) if((*it)->status()==122) targetParton = (*it); // find incoming Proton (first entry ID=2212, IST=101) for(HepMC::GenEvent::particle_const_iterator it = event()->particles_begin(); - (it != event()->particles_end() && incomingProton==NULL); it++) + (it != event()->particles_end() && incomingProton==nullptr); it++) if((*it)->status()==101 && (*it)->pdg_id()==2212) incomingProton = (*it); // find target Proton (first entry ID=2212, IST=102) for(HepMC::GenEvent::particle_const_iterator it = event()->particles_begin(); - (it != event()->particles_end() && targetProton==NULL); it++) + (it != event()->particles_end() && targetProton==nullptr); it++) if((*it)->status()==102 && (*it)->pdg_id()==2212) targetProton = (*it); // find hard scale Q (computed from colliding partons) @@ -839,7 +839,7 @@ void Herwig6Hadronizer::finalizeEvent() } // add event weight & PDF information - if (lheRunInfo() != 0 && std::abs(lheRunInfo()->getHEPRUP()->IDWTUP) == 4) + if (lheRunInfo() != nullptr && std::abs(lheRunInfo()->getHEPRUP()->IDWTUP) == 4) // in LHE weighting mode 4 the weight is an xsec, so convert form HERWIG // to standard CMS unit "picobarn" event()->weights().push_back( 1.0e3 * hwevnt.EVWGT ); @@ -848,9 +848,9 @@ void Herwig6Hadronizer::finalizeEvent() // find final parton (first entry with IST=123) - HepMC::GenParticle* finalParton = NULL; + HepMC::GenParticle* finalParton = nullptr; for(HepMC::GenEvent::particle_const_iterator it = event()->particles_begin(); - (it != event()->particles_end() && finalParton==NULL); it++) + (it != event()->particles_end() && finalParton==nullptr); it++) if((*it)->status()==123) finalParton = (*it); diff --git a/GeneratorInterface/Herwig6Interface/src/Herwig6Instance.cc b/GeneratorInterface/Herwig6Interface/src/Herwig6Instance.cc index 846c7a902f831..95e376f587ca6 100644 --- a/GeneratorInterface/Herwig6Interface/src/Herwig6Instance.cc +++ b/GeneratorInterface/Herwig6Interface/src/Herwig6Instance.cc @@ -8,8 +8,8 @@ #ifdef _POSIX_C_SOURCE # include -# include -# include +# include +# include #endif #include @@ -52,8 +52,8 @@ using namespace gen; double gen::hwrgen_(int *idummy) { Herwig6Instance *instance = FortranInstance::getInstance(); - assert(instance != 0); - assert(instance->randomEngine != 0); + assert(instance != nullptr); + assert(instance->randomEngine != nullptr); return instance->randomEngine->flat(); } @@ -79,7 +79,7 @@ extern "C" { Herwig6Instance::Herwig6Instance() : randomEngine(nullptr), - timeoutPrivate(0) + timeoutPrivate(nullptr) { } @@ -96,8 +96,8 @@ Herwig6Instance::~Herwig6Instance() void Herwig6Instance::_timeout_sighandler(int signr) { Herwig6Instance *instance = FortranInstance::getInstance(); - assert(instance != 0); - assert(instance->timeoutPrivate != 0); + assert(instance != nullptr); + assert(instance->timeoutPrivate != nullptr); siglongjmp(*(sigjmp_buf*)instance->timeoutPrivate, 1); } @@ -115,30 +115,30 @@ bool Herwig6Instance::timeout(unsigned int secs, void (*fn)()) timerclear(&itv.it_interval); itv.it_value.tv_sec = 0; itv.it_interval.tv_sec = 0; - setitimer(ITIMER_VIRTUAL, &itv, NULL); + setitimer(ITIMER_VIRTUAL, &itv, nullptr); sigset_t ss; sigemptyset(&ss); sigaddset(&ss, SIGVTALRM); - sigprocmask(SIG_UNBLOCK, &ss, NULL); - sigprocmask(SIG_BLOCK, &ss, NULL); + sigprocmask(SIG_UNBLOCK, &ss, nullptr); + sigprocmask(SIG_BLOCK, &ss, nullptr); timeoutPrivate = new sigjmp_buf; if (sigsetjmp(*(sigjmp_buf*)timeoutPrivate, 1)) { delete (sigjmp_buf*)timeoutPrivate; - timeoutPrivate = 0; + timeoutPrivate = nullptr; itv.it_value.tv_sec = 0; itv.it_interval.tv_sec = 0; - setitimer(ITIMER_VIRTUAL, &itv, NULL); - sigprocmask(SIG_UNBLOCK, &ss, NULL); + setitimer(ITIMER_VIRTUAL, &itv, nullptr); + sigprocmask(SIG_UNBLOCK, &ss, nullptr); return true; } itv.it_value.tv_sec = secs; itv.it_interval.tv_sec = secs; - setitimer(ITIMER_VIRTUAL, &itv, NULL); + setitimer(ITIMER_VIRTUAL, &itv, nullptr); struct sigaction sa; std::memset(&sa, 0, sizeof sa); @@ -147,31 +147,31 @@ bool Herwig6Instance::timeout(unsigned int secs, void (*fn)()) sigemptyset(&sa.sa_mask); sigaction(SIGVTALRM, &sa, &saOld); - sigprocmask(SIG_UNBLOCK, &ss, NULL); + sigprocmask(SIG_UNBLOCK, &ss, nullptr); try { fn(); } catch(...) { delete (sigjmp_buf*)timeoutPrivate; - timeoutPrivate = 0; + timeoutPrivate = nullptr; itv.it_value.tv_sec = 0; itv.it_interval.tv_sec = 0; - setitimer(ITIMER_VIRTUAL, &itv, NULL); + setitimer(ITIMER_VIRTUAL, &itv, nullptr); - sigaction(SIGVTALRM, &saOld, NULL); + sigaction(SIGVTALRM, &saOld, nullptr); throw; } delete (sigjmp_buf*)timeoutPrivate; - timeoutPrivate = 0; + timeoutPrivate = nullptr; itv.it_value.tv_sec = 0; itv.it_interval.tv_sec = 0; - setitimer(ITIMER_VIRTUAL, &itv, NULL); + setitimer(ITIMER_VIRTUAL, &itv, nullptr); - sigaction(SIGVTALRM, &saOld, NULL); + sigaction(SIGVTALRM, &saOld, nullptr); return false; } diff --git a/GeneratorInterface/Herwig6Interface/src/fastjetfortran_madfks.cc b/GeneratorInterface/Herwig6Interface/src/fastjetfortran_madfks.cc index 998040475ac32..d1f0441f4938d 100644 --- a/GeneratorInterface/Herwig6Interface/src/fastjetfortran_madfks.cc +++ b/GeneratorInterface/Herwig6Interface/src/fastjetfortran_madfks.cc @@ -357,7 +357,7 @@ void fastjetppgenktwitharea_(const double * p, const int & npart, // void fastjetconstituents_(const int & ijet, int * constituent_indices, int & nconstituents) { - assert(cs.get() != 0); + assert(cs.get() != nullptr); assert(ijet > 0 && ijet <= int(jets.size())); vector constituents = cs->constituents(jets[ijet-1]); @@ -387,7 +387,7 @@ double fastjetarea_(const int & ijet) { assert(ijet > 0 && ijet <= int(jets.size())); const ClusterSequenceAreaBase * csab = dynamic_cast(cs.get()); - if (csab != 0) { + if (csab != nullptr) { // we have areas and can use csab to access all the area-related info return csab->area(jets[ijet-1]); } else { @@ -407,7 +407,7 @@ double fastjetarea_(const int & ijet) { // INTEGER N // double fastjetdmerge_(const int & n) { - assert(cs.get() != 0); + assert(cs.get() != nullptr); return cs->exclusive_dmerge(n); } @@ -424,7 +424,7 @@ double fastjetdmerge_(const int & n) { // INTEGER N // double fastjetdmergemax_(const int & n) { - assert(cs.get() != 0); + assert(cs.get() != nullptr); return cs->exclusive_dmerge_max(n); } @@ -445,7 +445,7 @@ void fastjetglobalrhoandsigma_(const double & rapmin, const double & rapmax, double & rho, double & sigma, double & meanarea) { const ClusterSequenceAreaBase * csab = dynamic_cast(cs.get()); - if (csab != 0) { + if (csab != nullptr) { // we have areas and can use csab to access all the area-related info Selector range = SelectorRapRange(rapmin,rapmax) && SelectorPhiRange(phimin,phimax); bool use_area_4vector = false; diff --git a/GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelector.h b/GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelector.h index 6ee7dcfd4b077..83b8167df4f88 100644 --- a/GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelector.h +++ b/GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelector.h @@ -7,9 +7,9 @@ class EcalGenEvtSelector : public BaseHiGenEvtSelector { public: EcalGenEvtSelector(const edm::ParameterSet& pset); - virtual ~EcalGenEvtSelector(){;} + ~EcalGenEvtSelector() override{;} - bool filter(HepMC::GenEvent *); + bool filter(HepMC::GenEvent *) override; private: diff --git a/GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelectorFrag.h b/GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelectorFrag.h index ff8dcfdd36a47..7f0562b0bc9b6 100644 --- a/GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelectorFrag.h +++ b/GeneratorInterface/HiGenCommon/interface/EcalGenEvtSelectorFrag.h @@ -7,9 +7,9 @@ class EcalGenEvtSelectorFrag : public BaseHiGenEvtSelector { public: EcalGenEvtSelectorFrag(const edm::ParameterSet& pset); - virtual ~EcalGenEvtSelectorFrag(){;} + ~EcalGenEvtSelectorFrag() override{;} - bool filter(HepMC::GenEvent *); + bool filter(HepMC::GenEvent *) override; private: diff --git a/GeneratorInterface/HiGenCommon/interface/HadronDecayGenEvtSelector.h b/GeneratorInterface/HiGenCommon/interface/HadronDecayGenEvtSelector.h index 7fccaf72a4562..4c3c3a50128d9 100644 --- a/GeneratorInterface/HiGenCommon/interface/HadronDecayGenEvtSelector.h +++ b/GeneratorInterface/HiGenCommon/interface/HadronDecayGenEvtSelector.h @@ -8,9 +8,9 @@ class HadronDecayGenEvtSelector : public BaseHiGenEvtSelector { public: HadronDecayGenEvtSelector(const edm::ParameterSet& pset); - virtual ~HadronDecayGenEvtSelector(){;} + ~HadronDecayGenEvtSelector() override{;} - bool filter(HepMC::GenEvent *); + bool filter(HepMC::GenEvent *) override; bool selectParticle(HepMC::GenParticle* par, int status, int pdg /*Absolute*/, double etaMax, double etaMin, double pMin, double ptMax, double ptMin){ return (par->status() == status && abs(par->pdg_id()) == pdg && diff --git a/GeneratorInterface/HiGenCommon/interface/MultiCandGenEvtSelector.h b/GeneratorInterface/HiGenCommon/interface/MultiCandGenEvtSelector.h index 62e37786c98a0..1aed6cd52de6e 100644 --- a/GeneratorInterface/HiGenCommon/interface/MultiCandGenEvtSelector.h +++ b/GeneratorInterface/HiGenCommon/interface/MultiCandGenEvtSelector.h @@ -6,8 +6,8 @@ class MultiCandGenEvtSelector : public BaseHiGenEvtSelector { public: MultiCandGenEvtSelector(const edm::ParameterSet&); - virtual ~MultiCandGenEvtSelector(){;} - bool filter(HepMC::GenEvent *); + ~MultiCandGenEvtSelector() override{;} + bool filter(HepMC::GenEvent *) override; double ptMin_; double etaMax_; diff --git a/GeneratorInterface/HiGenCommon/interface/PartonHadronDecayGenEvtSelector.h b/GeneratorInterface/HiGenCommon/interface/PartonHadronDecayGenEvtSelector.h index 226ac904efe6c..a3c01fa4a9522 100644 --- a/GeneratorInterface/HiGenCommon/interface/PartonHadronDecayGenEvtSelector.h +++ b/GeneratorInterface/HiGenCommon/interface/PartonHadronDecayGenEvtSelector.h @@ -8,9 +8,9 @@ class PartonHadronDecayGenEvtSelector : public BaseHiGenEvtSelector { public: PartonHadronDecayGenEvtSelector(const edm::ParameterSet& pset); - virtual ~PartonHadronDecayGenEvtSelector(){;} + ~PartonHadronDecayGenEvtSelector() override{;} - bool filter(HepMC::GenEvent *); + bool filter(HepMC::GenEvent *) override; bool selectParticle(HepMC::GenParticle* par, int status, int pdg /*Absolute*/, double ptMin, double etaMax){ return (par->status() == status && abs(par->pdg_id()) == pdg && par->momentum().perp() > ptMin && fabs(par->momentum().eta()) < etaMax); } diff --git a/GeneratorInterface/HiGenCommon/plugins/BetaBoostEvtVtxGenerator.cc b/GeneratorInterface/HiGenCommon/plugins/BetaBoostEvtVtxGenerator.cc index 74c9557304c44..cc347ab24c19b 100644 --- a/GeneratorInterface/HiGenCommon/plugins/BetaBoostEvtVtxGenerator.cc +++ b/GeneratorInterface/HiGenCommon/plugins/BetaBoostEvtVtxGenerator.cc @@ -52,12 +52,12 @@ namespace CLHEP { class BetaBoostEvtVtxGenerator : public edm::EDProducer{ public: BetaBoostEvtVtxGenerator(const edm::ParameterSet & p); - virtual ~BetaBoostEvtVtxGenerator(); + ~BetaBoostEvtVtxGenerator() override; /// return a new event vertex //virtual CLHEP::Hep3Vector * newVertex(); virtual HepMC::FourVector* newVertex(CLHEP::HepRandomEngine*) ; - virtual void produce( edm::Event&, const edm::EventSetup& ) override; + void produce( edm::Event&, const edm::EventSetup& ) override; virtual TMatrixD* GetInvLorentzBoost(); @@ -87,9 +87,9 @@ class BetaBoostEvtVtxGenerator : public edm::EDProducer{ private: /** Copy constructor */ - BetaBoostEvtVtxGenerator(const BetaBoostEvtVtxGenerator &p); + BetaBoostEvtVtxGenerator(const BetaBoostEvtVtxGenerator &p) = delete; /** Copy assignment operator */ - BetaBoostEvtVtxGenerator& operator = (const BetaBoostEvtVtxGenerator & rhs ); + BetaBoostEvtVtxGenerator& operator = (const BetaBoostEvtVtxGenerator & rhs ) = delete; double alpha_, phi_; //TMatrixD boost_; @@ -111,7 +111,7 @@ class BetaBoostEvtVtxGenerator : public edm::EDProducer{ BetaBoostEvtVtxGenerator::BetaBoostEvtVtxGenerator(const edm::ParameterSet & p): - fVertex(0), boost_(0), fTimeOffset(0), + fVertex(nullptr), boost_(nullptr), fTimeOffset(0), sourceLabel(consumes(p.getParameter("src"))), verbosity_(p.getUntrackedParameter("verbosity",false)) { @@ -138,7 +138,7 @@ BetaBoostEvtVtxGenerator::BetaBoostEvtVtxGenerator(const edm::ParameterSet & p): BetaBoostEvtVtxGenerator::~BetaBoostEvtVtxGenerator() { delete fVertex ; - if (boost_ != 0 ) delete boost_; + if (boost_ != nullptr ) delete boost_; } //Hep3Vector* BetaBoostEvtVtxGenerator::newVertex() { @@ -163,7 +163,7 @@ HepMC::FourVector* BetaBoostEvtVtxGenerator::newVertex(CLHEP::HepRandomEngine* e double tmp_sigt = CLHEP::RandGaussQ::shoot(engine, 0.0, fSigmaZ); double T = tmp_sigt + fTimeOffset; - if ( fVertex == 0 ) fVertex = new HepMC::FourVector(); + if ( fVertex == nullptr ) fVertex = new HepMC::FourVector(); fVertex->set(X,Y,Z,T); return fVertex; diff --git a/GeneratorInterface/HiGenCommon/plugins/GenHIEventProducer.cc b/GeneratorInterface/HiGenCommon/plugins/GenHIEventProducer.cc index eff2f4a6eaf4a..4c41a1d59a04d 100644 --- a/GeneratorInterface/HiGenCommon/plugins/GenHIEventProducer.cc +++ b/GeneratorInterface/HiGenCommon/plugins/GenHIEventProducer.cc @@ -49,10 +49,10 @@ using namespace std; class GenHIEventProducer : public edm::EDProducer { public: explicit GenHIEventProducer(const edm::ParameterSet&); - ~GenHIEventProducer(); + ~GenHIEventProducer() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; edm::EDGetTokenT > hepmcSrc_; edm::ESHandle < ParticleDataTable > pdt; diff --git a/GeneratorInterface/HiGenCommon/plugins/HiCentralityBiasFilter.cc b/GeneratorInterface/HiGenCommon/plugins/HiCentralityBiasFilter.cc index cec78f68c0779..b5c4a5b2b6315 100644 --- a/GeneratorInterface/HiGenCommon/plugins/HiCentralityBiasFilter.cc +++ b/GeneratorInterface/HiGenCommon/plugins/HiCentralityBiasFilter.cc @@ -51,12 +51,12 @@ using namespace std; class HiCentralityBiasFilter : public edm::EDFilter { public: explicit HiCentralityBiasFilter(const edm::ParameterSet&); - ~HiCentralityBiasFilter(); + ~HiCentralityBiasFilter() override; private: - virtual void beginJob() override ; - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; edm::EDGetTokenT hepmcSrc_; diff --git a/GeneratorInterface/HiGenCommon/plugins/HighMultiplicityGenFilter.cc b/GeneratorInterface/HiGenCommon/plugins/HighMultiplicityGenFilter.cc index 027bf447eeab4..762f448053932 100644 --- a/GeneratorInterface/HiGenCommon/plugins/HighMultiplicityGenFilter.cc +++ b/GeneratorInterface/HiGenCommon/plugins/HighMultiplicityGenFilter.cc @@ -37,12 +37,12 @@ class HighMultiplicityGenFilter : public edm::EDFilter { public: explicit HighMultiplicityGenFilter(const edm::ParameterSet&); - ~HighMultiplicityGenFilter(); + ~HighMultiplicityGenFilter() override; private: - virtual void beginJob() override; - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override; // ----------member data --------------------------- edm::ESHandle pdt; diff --git a/GeneratorInterface/HiGenCommon/plugins/MixBoostEvtVtxGenerator.cc b/GeneratorInterface/HiGenCommon/plugins/MixBoostEvtVtxGenerator.cc index b4a822cd2b86d..bffd29b06ec32 100644 --- a/GeneratorInterface/HiGenCommon/plugins/MixBoostEvtVtxGenerator.cc +++ b/GeneratorInterface/HiGenCommon/plugins/MixBoostEvtVtxGenerator.cc @@ -50,10 +50,10 @@ class FourVector ; class MixBoostEvtVtxGenerator : public edm::EDProducer{ public: MixBoostEvtVtxGenerator(const edm::ParameterSet & p); - virtual ~MixBoostEvtVtxGenerator(); + ~MixBoostEvtVtxGenerator() override; /// return a new event vertex - virtual void produce( edm::Event&, const edm::EventSetup& ) override; + void produce( edm::Event&, const edm::EventSetup& ) override; virtual TMatrixD* GetInvLorentzBoost(); virtual HepMC::FourVector* getVertex(edm::Event&); virtual HepMC::FourVector* getRecVertex(edm::Event&); @@ -84,9 +84,9 @@ class MixBoostEvtVtxGenerator : public edm::EDProducer{ private: /** Copy constructor */ - MixBoostEvtVtxGenerator(const MixBoostEvtVtxGenerator &p); + MixBoostEvtVtxGenerator(const MixBoostEvtVtxGenerator &p) = delete; /** Copy assignment operator */ - MixBoostEvtVtxGenerator& operator = (const MixBoostEvtVtxGenerator & rhs ); + MixBoostEvtVtxGenerator& operator = (const MixBoostEvtVtxGenerator & rhs ) = delete; double alpha_, phi_; //TMatrixD boost_; @@ -110,7 +110,7 @@ class MixBoostEvtVtxGenerator : public edm::EDProducer{ }; MixBoostEvtVtxGenerator::MixBoostEvtVtxGenerator(const edm::ParameterSet & pset ): - fVertex(0), boost_(0), fTimeOffset(0), + fVertex(nullptr), boost_(nullptr), fTimeOffset(0), vtxLabel(mayConsume(pset.getParameter("vtxLabel"))), signalLabel(consumes(pset.getParameter("signalLabel"))), mixLabel(consumes >(pset.getParameter("mixLabel"))), @@ -133,8 +133,8 @@ MixBoostEvtVtxGenerator::MixBoostEvtVtxGenerator(const edm::ParameterSet & pset MixBoostEvtVtxGenerator::~MixBoostEvtVtxGenerator() { - if (fVertex != 0) delete fVertex ; - if (boost_ != 0 ) delete boost_; + if (fVertex != nullptr) delete fVertex ; + if (boost_ != nullptr ) delete boost_; } @@ -223,7 +223,7 @@ TMatrixD* MixBoostEvtVtxGenerator::GetInvLorentzBoost() { HepMC::FourVector* MixBoostEvtVtxGenerator::getVertex( Event& evt){ - const HepMC::GenEvent* inev = 0; + const HepMC::GenEvent* inev = nullptr; Handle > cf; evt.getByToken(mixLabel,cf); diff --git a/GeneratorInterface/HiGenCommon/src/HiGenEvtSelectorFactory.cc b/GeneratorInterface/HiGenCommon/src/HiGenEvtSelectorFactory.cc index 9b09513be84c6..b855eb2c4e2af 100644 --- a/GeneratorInterface/HiGenCommon/src/HiGenEvtSelectorFactory.cc +++ b/GeneratorInterface/HiGenCommon/src/HiGenEvtSelectorFactory.cc @@ -22,7 +22,7 @@ BaseHiGenEvtSelector* HiGenEvtSelectorFactory::get(std::string filterType, const } std::cout<<"Skimmer not recognized. Fail!"< #include #include -#include +#include namespace HepMC { class GenEvent; @@ -28,7 +28,7 @@ namespace gen class HijingHadronizer : public BaseHadronizer { public: HijingHadronizer(const edm::ParameterSet &); - virtual ~HijingHadronizer(); + ~HijingHadronizer() override; bool generatePartonsAndHadronize(); bool hadronize(); @@ -46,8 +46,8 @@ namespace gen private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; - virtual std::vector const& doSharedResources() const override { return theSharedResources; } + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + std::vector const& doSharedResources() const override { return theSharedResources; } void add_heavy_ion_rec(HepMC::GenEvent *evt); HepMC::GenParticle* build_hijing( int index, int barcode ); diff --git a/GeneratorInterface/HijingInterface/src/HijingHadronizer.cc b/GeneratorInterface/HijingInterface/src/HijingHadronizer.cc index 8a27a6d350221..79dcfbe273e6e 100644 --- a/GeneratorInterface/HijingInterface/src/HijingHadronizer.cc +++ b/GeneratorInterface/HijingInterface/src/HijingHadronizer.cc @@ -59,7 +59,7 @@ const std::vector HijingHadronizer::theSharedResources = { edm::Sha HijingHadronizer::HijingHadronizer(const ParameterSet &pset) : BaseHadronizer(pset), - evt(0), + evt(nullptr), pset_(pset), bmax_(pset.getParameter("bMax")), bmin_(pset.getParameter("bMin")), @@ -240,7 +240,7 @@ bool HijingHadronizer::get_particles(HepMC::GenEvent *evt ) prod_vertex->add_particle_in(mother); evt->add_vertex(prod_vertex); - prods[ipart]=0; // mark to protect deletion + prods[ipart]=nullptr; // mark to protect deletion } prod_vertex->add_particle_out(part); @@ -289,7 +289,7 @@ bool HijingHadronizer::declareStableParticles( const std::vector& pdg ) //________________________________________________________________ void HijingHadronizer::rotateEvtPlane(){ - phi0_ = 2.*pi*gen::hijran_(0) - pi; + phi0_ = 2.*pi*gen::hijran_(nullptr) - pi; sinphi0_ = sin(phi0_); cosphi0_ = cos(phi0_); } diff --git a/GeneratorInterface/Hydjet2Interface/interface/Hydjet2Hadronizer.h b/GeneratorInterface/Hydjet2Interface/interface/Hydjet2Hadronizer.h index fee2236748f20..feea298ec4859 100644 --- a/GeneratorInterface/Hydjet2Interface/interface/Hydjet2Hadronizer.h +++ b/GeneratorInterface/Hydjet2Interface/interface/Hydjet2Hadronizer.h @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "HYJET_COMMONS.h" extern HYIPARCommon HYIPAR; @@ -69,7 +69,7 @@ namespace gen public: Hydjet2Hadronizer(const edm::ParameterSet&); - ~Hydjet2Hadronizer(); + ~Hydjet2Hadronizer() override; bool readSettings( int ); bool declareSpecialSettings( const std::vector& ) { return true; } @@ -89,8 +89,8 @@ namespace gen void SetVolEff(double value) {fVolEff = value;} double GetVolEff() {return fVolEff;} - virtual bool RunDecays() override {return (fDecay>0 ? kTRUE : kFALSE);} - virtual double GetWeakDecayLimit() override {return fWeakDecay;} + bool RunDecays() override {return (fDecay>0 ? kTRUE : kFALSE);} + double GetWeakDecayLimit() override {return fWeakDecay;} bool IniOfThFreezeoutParameters(); @@ -104,14 +104,14 @@ namespace gen private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; void rotateEvtPlane(); bool get_particles(HepMC::GenEvent* evt); HepMC::GenParticle* build_hyjet2( int index, int barcode ); HepMC::GenVertex* build_hyjet2_vertex(int i, int id); void add_heavy_ion_rec(HepMC::GenEvent *evt); - virtual std::vector const& doSharedResources() const override { return theSharedResources; } + std::vector const& doSharedResources() const override { return theSharedResources; } static const std::vector theSharedResources; inline double nuclear_radius() const; diff --git a/GeneratorInterface/Hydjet2Interface/interface/MathUtil.h b/GeneratorInterface/Hydjet2Interface/interface/MathUtil.h index 1aa750e9a4ffd..68a4de91513dd 100644 --- a/GeneratorInterface/Hydjet2Interface/interface/MathUtil.h +++ b/GeneratorInterface/Hydjet2Interface/interface/MathUtil.h @@ -10,7 +10,7 @@ #define NAMathUtil_h 1 #include -#include +#include #include const double GeV = 1.; diff --git a/GeneratorInterface/Hydjet2Interface/interface/Particle.h b/GeneratorInterface/Hydjet2Interface/interface/Particle.h index c986a8068674f..15ee16b43bf13 100644 --- a/GeneratorInterface/Hydjet2Interface/interface/Particle.h +++ b/GeneratorInterface/Hydjet2Interface/interface/Particle.h @@ -39,7 +39,7 @@ class Particle { bool fDecayed; // true if the decay procedure already applied public: - Particle(ParticlePDG *pdg = 0); + Particle(ParticlePDG *pdg = nullptr); Particle(ParticlePDG *pdg, const TLorentzVector &pos, const TLorentzVector &mom, double lastInterTime = 0., int lastInterNum = 0, int type=0); Particle(ParticlePDG *pdg, const TLorentzVector &pos, const TLorentzVector &mom, diff --git a/GeneratorInterface/Hydjet2Interface/interface/ParticlePDG.h b/GeneratorInterface/Hydjet2Interface/interface/ParticlePDG.h index 56f000eaac574..ecebbcb41fa53 100644 --- a/GeneratorInterface/Hydjet2Interface/interface/ParticlePDG.h +++ b/GeneratorInterface/Hydjet2Interface/interface/ParticlePDG.h @@ -88,7 +88,7 @@ class ParticlePDG { if(0<=i && i= 2) { edm::LogWarning("DatabasePDG")<< "The particle required with PDG: " << pdg @@ -240,7 +240,7 @@ ParticlePDG* DatabasePDG::GetPDGParticle(int pdg) { << "Returning the first instance found"; return fParticles[firstTimeIndex]; } - return 0x0; + return nullptr; } bool DatabasePDG::GetPDGParticleStatus(int pdg) { @@ -280,7 +280,7 @@ ParticlePDG* DatabasePDG::GetPDGParticle(char* name) { if(nFindings == 0) { edm::LogWarning("DatabasePDG")<< "The particle required with name (" << name << ") was not found in the database!!"; - return 0x0; + return nullptr; } if(nFindings >= 2) { edm::LogWarning("DatabasePDG")<< "The particle required with name (" << name @@ -288,7 +288,7 @@ ParticlePDG* DatabasePDG::GetPDGParticle(char* name) { << "Returning the first instance found"; return fParticles[firstTimeIndex]; } - return 0x0; + return nullptr; } bool DatabasePDG::GetPDGParticleStatus(char* name) { diff --git a/GeneratorInterface/Hydjet2Interface/src/Hydjet2Hadronizer.cc b/GeneratorInterface/Hydjet2Interface/src/Hydjet2Hadronizer.cc index e0c822cbdc1d3..8db2b9ef1e6f9 100644 --- a/GeneratorInterface/Hydjet2Interface/src/Hydjet2Hadronizer.cc +++ b/GeneratorInterface/Hydjet2Interface/src/Hydjet2Hadronizer.cc @@ -92,7 +92,7 @@ TString RunInputHYDJETstr; // definition of the static member fLastIndex int Particle::fLastIndex; -bool ev=0; +bool ev=false; namespace { int convertStatusForComponents(int sta, int typ){ @@ -160,7 +160,7 @@ Hydjet2Hadronizer::Hydjet2Hadronizer(const edm::ParameterSet& pset): embedding_(pset.getParameter("embeddingMode")), rotate_(pset.getParameter("rotateEventPlane")), - evt(0), + evt(nullptr), nsub_(0), nhard_(0), nsoft_(0), @@ -227,7 +227,7 @@ bool Hydjet2Hadronizer::initializeForInternalPartons(){ if(fSqrtS < 2.24){ LogError("Hydjet2Hadronizer|sqrtS") << "SqrtS<2.24 not allowed with fTMuType>0"; - return 0; + return false; } //sqrt(s) = 2.24 ==> T_kin = 0.8 GeV @@ -249,7 +249,7 @@ bool Hydjet2Hadronizer::initializeForInternalPartons(){ //if user choose fYlmax larger then allowed by kinematics at the specified beam energy sqrt(s) if(fYlmax > TMath::Log(fSqrtS/0.94)){ LogError("Hydjet2Hadronizer|Ylmax") << "fYlmax more then TMath::Log(fSqrtS vs 0.94)!!! "; - return 0; + return false; } if(fCorrS <= 0.) { @@ -1060,7 +1060,7 @@ double Hydjet2Hadronizer::CharmEnhancementFactor(double Ncc, double Ndth, double void Hydjet2Hadronizer::rotateEvtPlane() { const double pi = 3.14159265358979; - phi0_ = 2.*pi*gen::pyr_(0) - pi; + phi0_ = 2.*pi*gen::pyr_(nullptr) - pi; sinphi0_ = sin(phi0_); cosphi0_ = cos(phi0_); } @@ -1131,7 +1131,7 @@ bool Hydjet2Hadronizer::get_particles(HepMC::GenEvent *evt ) prod_vertex = prods[i]; prod_vertex->add_particle_in(mother); evt->add_vertex(prod_vertex); - prods[i]=0; // mark to protect deletion + prods[i]=nullptr; // mark to protect deletion } prod_vertex->add_particle_out(part); diff --git a/GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h b/GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h index ae3ad112b45ba..942310f04b935 100644 --- a/GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h +++ b/GeneratorInterface/HydjetInterface/interface/HydjetHadronizer.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace CLHEP { class HepRandomEngine; @@ -37,7 +37,7 @@ namespace gen class HydjetHadronizer : public BaseHadronizer { public: HydjetHadronizer(const edm::ParameterSet &); - virtual ~HydjetHadronizer(); + ~HydjetHadronizer() override; bool generatePartonsAndHadronize(); bool hadronize(); @@ -55,8 +55,8 @@ namespace gen private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; - virtual std::vector const& doSharedResources() const override { return theSharedResources; } + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + std::vector const& doSharedResources() const override { return theSharedResources; } static const std::vector theSharedResources; diff --git a/GeneratorInterface/HydjetInterface/src/HydjetHadronizer.cc b/GeneratorInterface/HydjetInterface/src/HydjetHadronizer.cc index 80096b18fbcf3..fb27ed221405e 100644 --- a/GeneratorInterface/HydjetInterface/src/HydjetHadronizer.cc +++ b/GeneratorInterface/HydjetInterface/src/HydjetHadronizer.cc @@ -58,7 +58,7 @@ const std::vector HydjetHadronizer::theSharedResources = { edm::Sha //_____________________________________________________________________ HydjetHadronizer::HydjetHadronizer(const ParameterSet &pset) : BaseHadronizer(pset), - evt(0), + evt(nullptr), pset_(pset), abeamtarget_(pset.getParameter("aBeamTarget")), angularspecselector_(pset.getParameter("angularSpectrumSelector")), @@ -333,7 +333,7 @@ bool HydjetHadronizer::get_particles(HepMC::GenEvent *evt ) prod_vertex = prods[i]; prod_vertex->add_particle_in(mother); evt->add_vertex(prod_vertex); - prods[i]=0; // mark to protect deletion + prods[i]=nullptr; // mark to protect deletion } prod_vertex->add_particle_out(part); } @@ -476,7 +476,7 @@ bool HydjetHadronizer::declareStableParticles(const std::vector& _pdg ) void HydjetHadronizer::rotateEvtPlane() { const double pi = 3.14159265358979; - phi0_ = 2.*pi*gen::pyr_(0) - pi; + phi0_ = 2.*pi*gen::pyr_(nullptr) - pi; sinphi0_ = sin(phi0_); cosphi0_ = cos(phi0_); } diff --git a/GeneratorInterface/LHEInterface/interface/LHEProxy.h b/GeneratorInterface/LHEInterface/interface/LHEProxy.h index 95a196627c23a..c33fdc0a08187 100644 --- a/GeneratorInterface/LHEInterface/interface/LHEProxy.h +++ b/GeneratorInterface/LHEInterface/interface/LHEProxy.h @@ -50,8 +50,8 @@ class LHEProxy { LHEProxy(ProxyID id); // not allowed and not implemented - LHEProxy(const LHEProxy &orig); - LHEProxy &operator = (const LHEProxy &orig); + LHEProxy(const LHEProxy &orig) = delete; + LHEProxy &operator = (const LHEProxy &orig) = delete; const ProxyID id; diff --git a/GeneratorInterface/LHEInterface/plugins/ExternalLHEAsciiDumper.cc b/GeneratorInterface/LHEInterface/plugins/ExternalLHEAsciiDumper.cc index 4aa56cddf382c..d6023990db5e1 100644 --- a/GeneratorInterface/LHEInterface/plugins/ExternalLHEAsciiDumper.cc +++ b/GeneratorInterface/LHEInterface/plugins/ExternalLHEAsciiDumper.cc @@ -32,12 +32,12 @@ class ExternalLHEAsciiDumper : public edm::EDAnalyzer { public: explicit ExternalLHEAsciiDumper(const edm::ParameterSet&); - ~ExternalLHEAsciiDumper(); + ~ExternalLHEAsciiDumper() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endRun(edm::Run const&, edm::EventSetup const&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endRun(edm::Run const&, edm::EventSetup const&) override; edm::InputTag lheProduct_; std::string lheFileName_; diff --git a/GeneratorInterface/LHEInterface/plugins/LHE2HepMCConverter.cc b/GeneratorInterface/LHEInterface/plugins/LHE2HepMCConverter.cc index eb373291a5040..6493de35a275c 100644 --- a/GeneratorInterface/LHEInterface/plugins/LHE2HepMCConverter.cc +++ b/GeneratorInterface/LHEInterface/plugins/LHE2HepMCConverter.cc @@ -45,7 +45,7 @@ class LHE2HepMCConverter : public edm::EDProducer { public: explicit LHE2HepMCConverter(const edm::ParameterSet&); - ~LHE2HepMCConverter(); + ~LHE2HepMCConverter() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); @@ -55,8 +55,8 @@ class LHE2HepMCConverter : public edm::EDProducer { private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void beginRun(edm::Run const&, edm::EventSetup const&) override; + void produce(edm::Event&, const edm::EventSetup&) override; + void beginRun(edm::Run const&, edm::EventSetup const&) override; // ----------member data --------------------------- edm::InputTag _lheEventSrcTag; @@ -80,7 +80,7 @@ class LHE2HepMCConverter : public edm::EDProducer { // constructors and destructor // LHE2HepMCConverter::LHE2HepMCConverter(const edm::ParameterSet& iConfig): -_lheRunSrc(0) +_lheRunSrc(nullptr) { //register your products produces("unsmeared"); diff --git a/GeneratorInterface/LHEInterface/plugins/LHECOMWeightProducer.cc b/GeneratorInterface/LHEInterface/plugins/LHECOMWeightProducer.cc index 624cb123ddba9..7907b41d33996 100644 --- a/GeneratorInterface/LHEInterface/plugins/LHECOMWeightProducer.cc +++ b/GeneratorInterface/LHEInterface/plugins/LHECOMWeightProducer.cc @@ -24,12 +24,12 @@ class LHECOMWeightProducer : public edm::EDProducer { public: explicit LHECOMWeightProducer(const edm::ParameterSet&); - ~LHECOMWeightProducer(); + ~LHECOMWeightProducer() override; private: - virtual void beginJob() override; - virtual void beginRun(edm::Run const& run, const edm::EventSetup &es) override; - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void beginJob() override; + void beginRun(edm::Run const& run, const edm::EventSetup &es) override; + void produce(edm::Event&, const edm::EventSetup&) override; edm::InputTag lheTag_; int _pdfset; diff --git a/GeneratorInterface/LHEInterface/plugins/LHEFilter.cc b/GeneratorInterface/LHEInterface/plugins/LHEFilter.cc index cab38a39abef8..63e521a6f4fdc 100644 --- a/GeneratorInterface/LHEInterface/plugins/LHEFilter.cc +++ b/GeneratorInterface/LHEInterface/plugins/LHEFilter.cc @@ -19,10 +19,10 @@ class LHEFilter : public edm::EDFilter { public: explicit LHEFilter(const edm::ParameterSet ¶ms); - virtual ~LHEFilter(); + ~LHEFilter() override; protected: - virtual bool filter(edm::Event &event, const edm::EventSetup &es) override; + bool filter(edm::Event &event, const edm::EventSetup &es) override; private: edm::InputTag sourceLabel; diff --git a/GeneratorInterface/LHEInterface/plugins/LHEWriter.cc b/GeneratorInterface/LHEInterface/plugins/LHEWriter.cc index 7c65cd2d86bc8..b772f0f7811c5 100644 --- a/GeneratorInterface/LHEInterface/plugins/LHEWriter.cc +++ b/GeneratorInterface/LHEInterface/plugins/LHEWriter.cc @@ -21,12 +21,12 @@ using namespace lhef; class LHEWriter : public edm::EDAnalyzer { public: explicit LHEWriter(const edm::ParameterSet ¶ms); - virtual ~LHEWriter(); + ~LHEWriter() override; protected: - virtual void beginRun(const edm::Run &run, const edm::EventSetup &es) override; - virtual void endRun(const edm::Run &run, const edm::EventSetup &es) override; - virtual void analyze(const edm::Event &event, const edm::EventSetup &es) override; + void beginRun(const edm::Run &run, const edm::EventSetup &es) override; + void endRun(const edm::Run &run, const edm::EventSetup &es) override; + void analyze(const edm::Event &event, const edm::EventSetup &es) override; private: std::ofstream file; diff --git a/GeneratorInterface/LHEInterface/src/LHEEvent.cc b/GeneratorInterface/LHEInterface/src/LHEEvent.cc index 713a0379ff4f9..3838d4de661e9 100644 --- a/GeneratorInterface/LHEInterface/src/LHEEvent.cc +++ b/GeneratorInterface/LHEInterface/src/LHEEvent.cc @@ -124,7 +124,7 @@ LHEEvent::LHEEvent(const boost::shared_ptr &runInfo, const HEPEUP &hepeup, const LHEEventProduct::PDF *pdf, const std::vector &comments) : - runInfo(runInfo), hepeup(hepeup), pdf(pdf ? new PDF(*pdf) : 0), + runInfo(runInfo), hepeup(hepeup), pdf(pdf ? new PDF(*pdf) : nullptr), comments(comments), counted(false), readAttemptCounter(0), npLO_(-99), npNLO_(-99) { @@ -133,7 +133,7 @@ LHEEvent::LHEEvent(const boost::shared_ptr &runInfo, LHEEvent::LHEEvent(const boost::shared_ptr &runInfo, const LHEEventProduct &product) : runInfo(runInfo), hepeup(product.hepeup()), - pdf(product.pdf() ? new PDF(*product.pdf()) : 0), + pdf(product.pdf() ? new PDF(*product.pdf()) : nullptr), weights_(product.weights()), comments(product.comments_begin(), product.comments_end()), counted(false), readAttemptCounter(0), @@ -449,7 +449,7 @@ const HepMC::GenVertex *LHEEvent::findSignalVertex( const HepMC::GenEvent *event, bool status3) { double largestMass2 = -9.0e-30; - const HepMC::GenVertex *vertex = 0; + const HepMC::GenVertex *vertex = nullptr; for(HepMC::GenEvent::vertex_const_iterator iter = event->vertices_begin(); iter != event->vertices_end(); ++iter) { if ((*iter)->particles_in_size() < 2) diff --git a/GeneratorInterface/LHEInterface/src/LHEProxy.cc b/GeneratorInterface/LHEInterface/src/LHEProxy.cc index b934780f50a72..eae9ca95fd934 100644 --- a/GeneratorInterface/LHEInterface/src/LHEProxy.cc +++ b/GeneratorInterface/LHEInterface/src/LHEProxy.cc @@ -16,7 +16,7 @@ static ProxyMap *getProxyMapInstance() { static struct Sentinel { Sentinel() : instance(new ProxyMap) {} - ~Sentinel() { delete instance; instance = 0; } + ~Sentinel() { delete instance; instance = nullptr; } ProxyMap *instance; } sentinel; diff --git a/GeneratorInterface/LHEInterface/src/LHEReader.cc b/GeneratorInterface/LHEInterface/src/LHEReader.cc index 1cca27f32d798..fb59c48191fb3 100644 --- a/GeneratorInterface/LHEInterface/src/LHEReader.cc +++ b/GeneratorInterface/LHEInterface/src/LHEReader.cc @@ -64,7 +64,7 @@ class LHEReader::FileSource : public LHEReader::Source { fileStream.reset(new StorageWrap(std::move(storage))); } - ~FileSource() {} + ~FileSource() override {} XMLDocument *createReader(XMLDocument::Handler &handler) override { return new XMLDocument(fileStream, handler); } @@ -86,7 +86,7 @@ class LHEReader::StringSource : public LHEReader::Source { fileStream.reset(tmpis); } - ~StringSource() {} + ~StringSource() override {} XMLDocument *createReader(XMLDocument::Handler &handler) override { return new XMLDocument(fileStream, handler); } @@ -101,8 +101,8 @@ class LHEReader::XMLHandler : public XMLDocument::Handler { XMLHandler() : impl(nullptr), gotObject(kNone), mode(kNone), - xmlHeader(0), xmlEvent(0), headerOk(false), npLO(-99), npNLO(-99) {} - ~XMLHandler() + xmlHeader(nullptr), xmlEvent(nullptr), headerOk(false), npLO(-99), npNLO(-99) {} + ~XMLHandler() override { if (xmlHeader) xmlHeader->release(); if (xmlEvent) xmlEvent->release(); } @@ -128,8 +128,8 @@ class LHEReader::XMLHandler : public XMLDocument::Handler { const XMLCh *const localname, const XMLCh *const qname) override; - virtual void characters (const XMLCh *const chars, const XMLSize_t length) override; - virtual void comment (const XMLCh *const chars, const XMLSize_t length) override; + void characters (const XMLCh *const chars, const XMLSize_t length) override; + void comment (const XMLCh *const chars, const XMLSize_t length) override; private: friend class LHEReader; @@ -163,7 +163,7 @@ static void attributesToDom(DOMElement *dom, const Attributes &attributes) static void fillHeader(LHERunInfo::Header &header, const char *data, int len = -1) { - const char *end = len >= 0 ? (data + len) : 0; + const char *end = len >= 0 ? (data + len) : nullptr; while(*data && (!end || data < end)) { std::size_t len = std::strcspn(data, "\r\n"); if (end && data + len > end) @@ -244,7 +244,7 @@ void LHEReader::XMLHandler::startElement(const XMLCh *const uri, if (!impl) impl.reset(DOMImplementationRegistry::getDOMImplementation(XMLUniStr("Core"))); - xmlHeader = impl->createDocument(0, qname, 0); + xmlHeader = impl->createDocument(nullptr, qname, nullptr); xmlNodes.resize(1); xmlNodes[0] = xmlHeader->getDocumentElement(); mode = kHeader; @@ -257,7 +257,7 @@ void LHEReader::XMLHandler::startElement(const XMLCh *const uri, impl.reset(DOMImplementationRegistry::getDOMImplementation(XMLUniStr("Core"))); if(xmlEvent) xmlEvent->release(); - xmlEvent = impl->createDocument(0, qname, 0); + xmlEvent = impl->createDocument(nullptr, qname, nullptr); weightsinevent.resize(0); scales.clear(); @@ -340,11 +340,11 @@ void LHEReader::XMLHandler::endElement(const XMLCh *const uri, } xmlHeader->release(); - xmlHeader = 0; + xmlHeader = nullptr; } else if (name == "event" && mode == kEvent && - (skipEvent || (xmlEventNodes.size() >= 1))) { // handling of weights in LHE file + (skipEvent || (!xmlEventNodes.empty()))) { // handling of weights in LHE file if (skipEvent) { @@ -484,9 +484,9 @@ LHEReader::~LHEReader() boost::shared_ptr LHEReader::next(bool* newFileOpened) { - while(curDoc.get() || curIndex < fileURLs.size() || (fileURLs.size() == 0 && strName != "" ) ) { + while(curDoc.get() || curIndex < fileURLs.size() || (fileURLs.empty() && strName != "" ) ) { if (!curDoc.get()) { - if ( fileURLs.size() > 0 ) { + if ( !fileURLs.empty() ) { logFileAction(" Initiating request to open LHE file ", fileURLs[curIndex]); curSource.reset(new FileSource(fileURLs[curIndex])); logFileAction(" Successfully opened LHE file ", fileURLs[curIndex]); @@ -568,7 +568,7 @@ LHEReader::~LHEReader() lheevent->setNpLO(handler->npLO); lheevent->setNpNLO(handler->npNLO); //fill scales - if (handler->scales.size()>0) { + if (!handler->scales.empty()) { lheevent->setScales(handler->scales); } return lheevent; diff --git a/GeneratorInterface/LHEInterface/src/LHERunInfo.cc b/GeneratorInterface/LHEInterface/src/LHERunInfo.cc index a8e49b716bf8a..00940f79814df 100644 --- a/GeneratorInterface/LHEInterface/src/LHERunInfo.cc +++ b/GeneratorInterface/LHEInterface/src/LHERunInfo.cc @@ -459,22 +459,22 @@ void LHERunInfo::statistics() const } LHERunInfo::Header::Header() : - xmlDoc(0) + xmlDoc(nullptr) { } LHERunInfo::Header::Header(const std::string &tag) : - LHERunInfoProduct::Header(tag), xmlDoc(0) + LHERunInfoProduct::Header(tag), xmlDoc(nullptr) { } LHERunInfo::Header::Header(const Header &orig) : - LHERunInfoProduct::Header(orig), xmlDoc(0) + LHERunInfoProduct::Header(orig), xmlDoc(nullptr) { } LHERunInfo::Header::Header(const LHERunInfoProduct::Header &orig) : - LHERunInfoProduct::Header(orig), xmlDoc(0) + LHERunInfoProduct::Header(orig), xmlDoc(nullptr) { } @@ -487,7 +487,7 @@ LHERunInfo::Header::~Header() static void fillLines(std::vector &lines, const char *data, int len = -1) { - const char *end = len >= 0 ? (data + len) : 0; + const char *end = len >= 0 ? (data + len) : nullptr; while(*data && (!end || data < end)) { std::size_t len = std::strcspn(data, "\r\n"); if (end && data + len > end) @@ -524,7 +524,7 @@ static std::vector domToLines(const DOMNode *node) std::vector LHERunInfo::findHeader(const std::string &tag) const { - const LHERunInfo::Header *header = 0; + const LHERunInfo::Header *header = nullptr; for(std::vector
::const_iterator iter = headers.begin(); iter != headers.end(); ++iter) { if (iter->tag() == tag) @@ -598,7 +598,7 @@ namespace { const DOMNode *LHERunInfo::Header::getXMLNode() const { if (tag().empty()) - return 0; + return nullptr; if (!xmlDoc) { XercesDOMParser parser; diff --git a/GeneratorInterface/LHEInterface/src/XMLUtils.h b/GeneratorInterface/LHEInterface/src/XMLUtils.h index fe47321f6345a..608cff2ecb971 100644 --- a/GeneratorInterface/LHEInterface/src/XMLUtils.h +++ b/GeneratorInterface/LHEInterface/src/XMLUtils.h @@ -51,8 +51,8 @@ class XMLDocument { private: // do not make any kind of copies - XercesPlatform(const XercesPlatform &orig); - XercesPlatform &operator = (const XercesPlatform &orig); + XercesPlatform(const XercesPlatform &orig) = delete; + XercesPlatform &operator = (const XercesPlatform &orig) = delete; static unsigned int instances; }; @@ -116,9 +116,9 @@ class XMLInputSourceWrapper : typedef typename T::Stream_t Stream_t; XMLInputSourceWrapper(std::auto_ptr &obj) : obj(obj) {} - virtual ~XMLInputSourceWrapper() {} + ~XMLInputSourceWrapper() override {} - virtual XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream* makeStream() const + XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream* makeStream() const override { return new T(*obj); } private: @@ -136,14 +136,14 @@ class CBInputStream : public XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream { typedef Reader Stream_t; CBInputStream(Reader &in); - virtual ~CBInputStream(); + ~CBInputStream() override; - virtual XMLFilePos curPos() const override { return pos; } + XMLFilePos curPos() const override { return pos; } - virtual XMLSize_t readBytes(XMLByte *const buf, + XMLSize_t readBytes(XMLByte *const buf, const XMLSize_t size) override; - virtual const XMLCh* getContentType() const override { return 0; } + const XMLCh* getContentType() const override { return nullptr; } private: Reader &reader; @@ -156,14 +156,14 @@ class STLInputStream : public XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream { typedef std::istream Stream_t; STLInputStream(std::istream &in); - virtual ~STLInputStream(); + ~STLInputStream() override; - virtual XMLFilePos curPos() const override { return pos; } + XMLFilePos curPos() const override { return pos; } - virtual XMLSize_t readBytes(XMLByte *const buf, + XMLSize_t readBytes(XMLByte *const buf, const XMLSize_t size) override; - virtual const XMLCh* getContentType() const override { return 0; } + const XMLCh* getContentType() const override { return nullptr; } private: std::istream ∈ @@ -176,14 +176,14 @@ class StorageInputStream : typedef StorageWrap Stream_t; StorageInputStream(StorageWrap &in); - virtual ~StorageInputStream(); + ~StorageInputStream() override; - virtual XMLFilePos curPos() const override { return pos; } + XMLFilePos curPos() const override { return pos; } - virtual XMLSize_t readBytes(XMLByte *const buf, + XMLSize_t readBytes(XMLByte *const buf, const XMLSize_t size) override; - virtual const XMLCh* getContentType() const override { return 0; } + const XMLCh* getContentType() const override { return nullptr; } private: StorageWrap ∈ diff --git a/GeneratorInterface/MCatNLOInterface/plugins/MCatNLOSource.h b/GeneratorInterface/MCatNLOInterface/plugins/MCatNLOSource.h index 3574ace09a20b..2f706bfe1051f 100644 --- a/GeneratorInterface/MCatNLOInterface/plugins/MCatNLOSource.h +++ b/GeneratorInterface/MCatNLOInterface/plugins/MCatNLOSource.h @@ -45,17 +45,17 @@ class MCatNLOSource : public edm::ProducerSourceFromFiles, public: explicit MCatNLOSource(const edm::ParameterSet ¶ms, const edm::InputSourceDescription &desc); - virtual ~MCatNLOSource(); + ~MCatNLOSource() override; private: - virtual void endJob(); - virtual void beginRun(edm::Run &run); - virtual bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&); - virtual void produce(edm::Event &event); + void endJob() override; + void beginRun(edm::Run &run) override; + bool setRunAndEventInfo(edm::EventID&, edm::TimeValue_t&, edm::EventAuxiliary::ExperimentType&) override; + void produce(edm::Event &event) override; void nextEvent(); - virtual bool hwwarn(const std::string &fn, int code); + bool hwwarn(const std::string &fn, int code) override; /// Name of the input file std::string fileName; diff --git a/GeneratorInterface/PartonShowerVeto/interface/JetMatching.h b/GeneratorInterface/PartonShowerVeto/interface/JetMatching.h index 7074af6b8bc0b..2a53c3036571d 100644 --- a/GeneratorInterface/PartonShowerVeto/interface/JetMatching.h +++ b/GeneratorInterface/PartonShowerVeto/interface/JetMatching.h @@ -75,7 +75,7 @@ class JetMatching { void resetMatchingStatus() { fMatchingStatus = false; } bool isMatchingDone() { return fMatchingStatus; } - virtual const std::vector* getPartonList() { return 0; } + virtual const std::vector* getPartonList() { return nullptr; } virtual double getJetEtaMax() const = 0; /* diff --git a/GeneratorInterface/PartonShowerVeto/interface/JetMatchingAlpgen.h b/GeneratorInterface/PartonShowerVeto/interface/JetMatchingAlpgen.h index 953017c19a303..bae29e5082da9 100644 --- a/GeneratorInterface/PartonShowerVeto/interface/JetMatchingAlpgen.h +++ b/GeneratorInterface/PartonShowerVeto/interface/JetMatchingAlpgen.h @@ -11,20 +11,20 @@ namespace gen class JetMatchingAlpgen : public JetMatching { public: JetMatchingAlpgen(const edm::ParameterSet ¶ms); - ~JetMatchingAlpgen(); + ~JetMatchingAlpgen() override; private: - void init(const lhef::LHERunInfo* runInfo); - void beforeHadronisation(const lhef::LHEEvent* event); + void init(const lhef::LHERunInfo* runInfo) override; + void beforeHadronisation(const lhef::LHEEvent* event) override; - int match( const lhef::LHEEvent* partonLevel, const std::vector* jetInput ); - virtual double getJetEtaMax() const { return 0.; } + int match( const lhef::LHEEvent* partonLevel, const std::vector* jetInput ) override; + double getJetEtaMax() const override { return 0.; } /* int match(const HepMC::GenEvent* partonLevel, const HepMC::GenEvent* finalState, bool showeredFinalState); */ - std::set capabilities() const; + std::set capabilities() const override; bool applyMatching; bool runInitialized; diff --git a/GeneratorInterface/PartonShowerVeto/interface/JetMatchingMGFastJet.h b/GeneratorInterface/PartonShowerVeto/interface/JetMatchingMGFastJet.h index b80ef5a7bb9bf..c5dd5a5f2514e 100644 --- a/GeneratorInterface/PartonShowerVeto/interface/JetMatchingMGFastJet.h +++ b/GeneratorInterface/PartonShowerVeto/interface/JetMatchingMGFastJet.h @@ -36,21 +36,21 @@ class JetMatchingMGFastJet : public JetMatching JetMatchingMGFastJet(const edm::ParameterSet& params); - ~JetMatchingMGFastJet() { if (fJetFinder) delete fJetFinder; } + ~JetMatchingMGFastJet() override { if (fJetFinder) delete fJetFinder; } - const std::vector* getPartonList() { return typeIdx; } + const std::vector* getPartonList() override { return typeIdx; } protected: - virtual void init( const lhef::LHERunInfo* runInfo ); + void init( const lhef::LHERunInfo* runInfo ) override; - virtual bool initAfterBeams(); - virtual void beforeHadronisation( const lhef::LHEEvent* ); - virtual void beforeHadronisationExec() { return; } + bool initAfterBeams() override; + void beforeHadronisation( const lhef::LHEEvent* ) override; + void beforeHadronisationExec() override { return; } - virtual int match( const lhef::LHEEvent* partonLevel, const std::vector* jetInput ); + int match( const lhef::LHEEvent* partonLevel, const std::vector* jetInput ) override; - virtual double getJetEtaMax() const; + double getJetEtaMax() const override; private: diff --git a/GeneratorInterface/PartonShowerVeto/interface/JetMatchingMadgraph.h b/GeneratorInterface/PartonShowerVeto/interface/JetMatchingMadgraph.h index f6b8780752840..547b0944b472d 100644 --- a/GeneratorInterface/PartonShowerVeto/interface/JetMatchingMadgraph.h +++ b/GeneratorInterface/PartonShowerVeto/interface/JetMatchingMadgraph.h @@ -9,23 +9,23 @@ namespace gen class JetMatchingMadgraph : public JetMatching { public: JetMatchingMadgraph(const edm::ParameterSet ¶ms); - ~JetMatchingMadgraph(); + ~JetMatchingMadgraph() override; protected: - virtual void init(const lhef::LHERunInfo* runInfo); - virtual void beforeHadronisation(const lhef::LHEEvent* event); - virtual void beforeHadronisationExec(); + void init(const lhef::LHERunInfo* runInfo) override; + void beforeHadronisation(const lhef::LHEEvent* event) override; + void beforeHadronisationExec() override; - virtual int match( const lhef::LHEEvent* partonLevel, const std::vector* jetInput ); + int match( const lhef::LHEEvent* partonLevel, const std::vector* jetInput ) override; - virtual double getJetEtaMax() const; + double getJetEtaMax() const override; /* int match(const HepMC::GenEvent *partonLevel, const HepMC::GenEvent *finalState, bool showeredFinalState); */ - std::set capabilities() const; + std::set capabilities() const override; template static T parseParameter(const std::string &value); diff --git a/GeneratorInterface/PartonShowerVeto/src/JetMatchingMGFastJet.cc b/GeneratorInterface/PartonShowerVeto/src/JetMatchingMGFastJet.cc index 6ebd6597c2240..33f2299d8cb06 100644 --- a/GeneratorInterface/PartonShowerVeto/src/JetMatchingMGFastJet.cc +++ b/GeneratorInterface/PartonShowerVeto/src/JetMatchingMGFastJet.cc @@ -153,7 +153,7 @@ void JetMatchingMGFastJet::updateOrDie( JetMatchingMGFastJet::JetMatchingMGFastJet(const edm::ParameterSet ¶ms) : JetMatching(params), runInitialized(false), - fJetFinder(0), + fJetFinder(nullptr), fIsInit(false) { std::string mode = params.getParameter("mode"); diff --git a/GeneratorInterface/PhotosInterface/interface/PhotosInterface.h b/GeneratorInterface/PhotosInterface/interface/PhotosInterface.h index 4358198db28d0..beba8402ddf95 100644 --- a/GeneratorInterface/PhotosInterface/interface/PhotosInterface.h +++ b/GeneratorInterface/PhotosInterface/interface/PhotosInterface.h @@ -24,15 +24,15 @@ namespace gen { // ctor & dtor PhotosInterface(); PhotosInterface( const edm::ParameterSet& ); - ~PhotosInterface(); + ~PhotosInterface() override; - void init(); - const std::vector& specialSettings() { return fSpecialSettings; } - HepMC::GenEvent* apply( HepMC::GenEvent* ); - void configureOnlyFor( int ); - void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; } + void init() override; + const std::vector& specialSettings() override { return fSpecialSettings; } + HepMC::GenEvent* apply( HepMC::GenEvent* ) override; + void configureOnlyFor( int ) override; + void avoidTauLeptonicDecays() override { fAvoidTauLeptonicDecays=true; return; } bool isTauLeptonicDecay( HepMC::GenVertex* ); - void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine); + void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine) override; static double flat(); private: diff --git a/GeneratorInterface/PhotosInterface/interface/PhotosppInterface.h b/GeneratorInterface/PhotosInterface/interface/PhotosppInterface.h index a0d52180a2b51..218192298ba03 100644 --- a/GeneratorInterface/PhotosInterface/interface/PhotosppInterface.h +++ b/GeneratorInterface/PhotosInterface/interface/PhotosppInterface.h @@ -23,17 +23,17 @@ namespace gen { // ctor & dtor PhotosppInterface( const edm::ParameterSet& pset); - ~PhotosppInterface() {} + ~PhotosppInterface() override {} - void init(); - const std::vector& specialSettings() { return fSpecialSettings; } - HepMC::GenEvent* apply( HepMC::GenEvent* ); - void configureOnlyFor( int ); - void avoidTauLeptonicDecays() { fAvoidTauLeptonicDecays=true; return; } + void init() override; + const std::vector& specialSettings() override { return fSpecialSettings; } + HepMC::GenEvent* apply( HepMC::GenEvent* ) override; + void configureOnlyFor( int ) override; + void avoidTauLeptonicDecays() override { fAvoidTauLeptonicDecays=true; return; } bool isTauLeptonicDecay( HepMC::GenVertex* ); - void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine); + void setRandomEngine(CLHEP::HepRandomEngine* decayRandomEngine) override; static double flat(); - void statistics(); + void statistics() override; private: int fOnlyPDG; diff --git a/GeneratorInterface/PhotosInterface/plugins/PhotosInterface.cc b/GeneratorInterface/PhotosInterface/plugins/PhotosInterface.cc index d5a94c3d55fe8..87bbcda517dca 100644 --- a/GeneratorInterface/PhotosInterface/plugins/PhotosInterface.cc +++ b/GeneratorInterface/PhotosInterface/plugins/PhotosInterface.cc @@ -344,7 +344,7 @@ void PhotosInterface::attachParticles( HepMC::GenEvent* evt, HepMC::GenVertex* v secVtxStorage.push_back( endVtx->barcode() ); - HepMC::FourVector mom4 = prt->momentum(); + const HepMC::FourVector& mom4 = prt->momentum(); // now rescale all descendants double bet1[3], bet2[3], gam1, gam2, pb; diff --git a/GeneratorInterface/PhotosInterface/plugins/PhotosppInterface.cc b/GeneratorInterface/PhotosInterface/plugins/PhotosppInterface.cc index e58d520141327..37364e67e4029 100644 --- a/GeneratorInterface/PhotosInterface/plugins/PhotosppInterface.cc +++ b/GeneratorInterface/PhotosInterface/plugins/PhotosppInterface.cc @@ -23,7 +23,7 @@ PhotosppInterface::PhotosppInterface( const edm::ParameterSet& pset) : fOnlyPDG(-1), fAvoidTauLeptonicDecays(false), fIsInitialized(false), - fPSet(0) + fPSet(nullptr) { // add ability to keep brem from hadronizer and only modify specific channels 10/27/2014 bool UseHadronizerQEDBrem=false; @@ -191,7 +191,7 @@ HepMC::GenEvent* PhotosppInterface::apply( HepMC::GenEvent* evt){ } } } - if(BCodes.size() > 0){ + if(!BCodes.empty()){ for(size_t ibc=0; ibcbarcode_to_particle(BCodes[ibc]); int nbc = p1->barcode() - 10000 + NPartBefore; diff --git a/GeneratorInterface/PomwigInterface/interface/PomwigHadronizer.h b/GeneratorInterface/PomwigInterface/interface/PomwigHadronizer.h index f051bdb082c92..026246d86f264 100644 --- a/GeneratorInterface/PomwigInterface/interface/PomwigHadronizer.h +++ b/GeneratorInterface/PomwigInterface/interface/PomwigHadronizer.h @@ -22,7 +22,7 @@ namespace gen { public: PomwigHadronizer(const edm::ParameterSet ¶ms); - virtual ~PomwigHadronizer(); + ~PomwigHadronizer() override; bool readSettings( int ); bool initializeForInternalPartons(); @@ -42,8 +42,8 @@ namespace gen private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; - virtual std::vector const& doSharedResources() const override { return theSharedResources; } + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + std::vector const& doSharedResources() const override { return theSharedResources; } void clear(); bool initializeDPDF(); diff --git a/GeneratorInterface/PyquenInterface/interface/PyquenHadronizer.h b/GeneratorInterface/PyquenInterface/interface/PyquenHadronizer.h index 089d0363522aa..bac0495b5cbc1 100644 --- a/GeneratorInterface/PyquenInterface/interface/PyquenHadronizer.h +++ b/GeneratorInterface/PyquenInterface/interface/PyquenHadronizer.h @@ -32,7 +32,7 @@ namespace gen public: PyquenHadronizer(const edm::ParameterSet &); - virtual ~PyquenHadronizer(); + ~PyquenHadronizer() override; bool generatePartonsAndHadronize(); bool hadronize(); @@ -43,15 +43,15 @@ namespace gen bool initializeForInternalPartons(); bool declareStableParticles( const std::vector& ); bool declareSpecialSettings( const std::vector& ) { return true; } - virtual bool select(HepMC::GenEvent* evtTry) const override { return selector_->filter(evtTry); } + bool select(HepMC::GenEvent* evtTry) const override { return selector_->filter(evtTry); } void finalizeEvent(); void statistics(); const char* classname() const; private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; - virtual std::vector const& doSharedResources() const override { return theSharedResources; } + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + std::vector const& doSharedResources() const override { return theSharedResources; } static const std::vector theSharedResources; diff --git a/GeneratorInterface/PyquenInterface/src/PyquenHadronizer.cc b/GeneratorInterface/PyquenInterface/src/PyquenHadronizer.cc index ebdd4f9093753..ed752bceadb80 100644 --- a/GeneratorInterface/PyquenInterface/src/PyquenHadronizer.cc +++ b/GeneratorInterface/PyquenInterface/src/PyquenHadronizer.cc @@ -268,9 +268,9 @@ bool PyquenHadronizer::pyquen_init(const ParameterSet &pset) } const char* PyquenHadronizer::nucleon(){ - int* dummy = 0; + int* dummy = nullptr; double random = gen::pyr_(dummy); - const char* nuc = 0; + const char* nuc = nullptr; if(random > pfrac_) nuc = "n"; else nuc = "p"; diff --git a/GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h b/GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h index 06f7dcebbfc51..e35a4da285e69 100644 --- a/GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h +++ b/GeneratorInterface/Pythia6Interface/interface/Pythia6Service.h @@ -28,7 +28,7 @@ namespace gen // ctor & dtor Pythia6Service(); Pythia6Service( edm::ParameterSet const& ); - ~Pythia6Service() ; + ~Pythia6Service() override ; void setGeneralParams(); void setCSAParams(); @@ -42,7 +42,7 @@ namespace gen void closePYUPDA(); // initialise Pythia on first call from "dummy" instance - virtual void enter(); + void enter() override; CLHEP::HepRandomEngine* randomEngine() const { return fRandomEngine; } void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; } diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6EGun.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6EGun.h index 7b8783707baa7..41a8ce1dce807 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6EGun.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6EGun.h @@ -15,11 +15,11 @@ namespace gen { public: Pythia6EGun( const edm::ParameterSet& ); - virtual ~Pythia6EGun(); + ~Pythia6EGun() override; // void produce( edm::Event&, const edm::EventSetup& ) ; protected: - void generateEvent(CLHEP::HepRandomEngine*); + void generateEvent(CLHEP::HepRandomEngine*) override; private: diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6Gun.cc b/GeneratorInterface/Pythia6Interface/plugins/Pythia6Gun.cc index b54cdffb77f49..05b04cf55da33 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6Gun.cc +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6Gun.cc @@ -24,7 +24,7 @@ using namespace gen; Pythia6Gun::Pythia6Gun( const ParameterSet& pset ) : fPy6Service( new Pythia6Service(pset) ), - fEvt(0) + fEvt(nullptr) // fPDGTable( new DefaultConfig::ParticleDataTable("PDG Table") ) { @@ -205,7 +205,7 @@ void Pythia6Gun::produce( edm::Event& evt, const edm::EventSetup& ) generateEvent(fPy6Service->randomEngine()) ; - fEvt->set_beam_particles(0,0); + fEvt->set_beam_particles(nullptr,nullptr); fEvt->set_event_number(evt.id().event()) ; fEvt->set_signal_process_id(pypars.msti[0]) ; @@ -245,7 +245,7 @@ HepMC::GenParticle* Pythia6Gun::addAntiParticle( int& ip, int& particleID, double& ee, double& eta, double& phi ) { - if ( ip < 2 ) return 0; + if ( ip < 2 ) return nullptr; // translate PDG to Py6 int py6PID = HepPID::translatePDTtoPythia( particleID ); diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6Gun.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6Gun.h index 9f91a6d001a2c..7d8710b52b092 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6Gun.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6Gun.h @@ -44,7 +44,7 @@ namespace gen public: Pythia6Gun( const edm::ParameterSet& ); - virtual ~Pythia6Gun(); + ~Pythia6Gun() override; void beginJob() override; void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override; void beginRun( edm::Run const&, edm::EventSetup const& ) override; diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6Hadronizer.cc b/GeneratorInterface/Pythia6Interface/plugins/Pythia6Hadronizer.cc index 658151e15c1a2..4c35cf8ee6d0b 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6Hadronizer.cc +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6Hadronizer.cc @@ -81,7 +81,7 @@ class Pythia6ServiceWithCallback : public Pythia6Service { if ( !hepeup_.nup || Pythia6Hadronizer::getJetMatching()->isMatchingDone() ) return true; - bool retValue = Pythia6Hadronizer::getJetMatching()->match( 0, 0 ); + bool retValue = Pythia6Hadronizer::getJetMatching()->match( nullptr, nullptr ); // below is old code and a note of it // NOTE: I'm passing NULL pointers, instead of HepMC::GenEvent, etc. //retValur = Pythia6Hadronizer::getJetMatching()->match(0, 0, true); @@ -96,7 +96,7 @@ static struct { double p[5][pyjets_maxn], v[5][pyjets_maxn]; } pyjets_local; -JetMatching* Pythia6Hadronizer::fJetMatching = 0; +JetMatching* Pythia6Hadronizer::fJetMatching = nullptr; const std::vector Pythia6Hadronizer::theSharedResources = { edm::SharedResourceNames::kPythia6, gen::FortranInstance::kFortranInstance }; @@ -250,8 +250,8 @@ Pythia6Hadronizer::Pythia6Hadronizer(edm::ParameterSet const& ps) Pythia6Hadronizer::~Pythia6Hadronizer() { - if ( fPy6Service != 0 ) delete fPy6Service; - if ( fJetMatching != 0 ) delete fJetMatching; + if ( fPy6Service != nullptr ) delete fPy6Service; + if ( fJetMatching != nullptr ) delete fJetMatching; } void Pythia6Hadronizer::doSetRandomEngine(CLHEP::HepRandomEngine* v) @@ -299,7 +299,7 @@ void Pythia6Hadronizer::fillTmpStorage() void Pythia6Hadronizer::finalizeEvent() { - bool lhe = lheEvent() != 0; + bool lhe = lheEvent() != nullptr; HepMC::PdfInfo pdf; diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6Hadronizer.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6Hadronizer.h index f45af2f8b34c4..d3cddcebd4f79 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6Hadronizer.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6Hadronizer.h @@ -44,7 +44,7 @@ class JetMatching; public: Pythia6Hadronizer(edm::ParameterSet const& ps); - virtual ~Pythia6Hadronizer(); + ~Pythia6Hadronizer() override; // bool generatePartons(); bool generatePartonsAndHadronize(); @@ -69,8 +69,8 @@ class JetMatching; // methods // - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; - virtual std::vector const& doSharedResources() const override { return theSharedResources; } + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + std::vector const& doSharedResources() const override { return theSharedResources; } void flushTmpStorage(); void fillTmpStorage(); diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6JetGun.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6JetGun.h index fe2a2b2ac7725..2fa5e64279c05 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6JetGun.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6JetGun.h @@ -15,11 +15,11 @@ namespace gen { public: Pythia6JetGun( const edm::ParameterSet& ); - virtual ~Pythia6JetGun(); + ~Pythia6JetGun() override; // void produce( edm::Event&, const edm::EventSetup& ) ; protected: - void generateEvent(CLHEP::HepRandomEngine*) ; + void generateEvent(CLHEP::HepRandomEngine*) override ; private: diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6ParticleGun.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6ParticleGun.h index 4b76ee2ddde9f..0737e60eb2297 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6ParticleGun.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6ParticleGun.h @@ -32,7 +32,7 @@ namespace gen public: Pythia6ParticleGun( const edm::ParameterSet& ); - virtual ~Pythia6ParticleGun(); + ~Pythia6ParticleGun() override; protected: diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonEGun.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonEGun.h index 6f94f99ff8da0..b31124b5f6c75 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonEGun.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonEGun.h @@ -15,11 +15,11 @@ namespace gen { public: Pythia6PartonEGun( const edm::ParameterSet& ); - virtual ~Pythia6PartonEGun(); + ~Pythia6PartonEGun() override; protected: - void generateEvent(CLHEP::HepRandomEngine*) ; + void generateEvent(CLHEP::HepRandomEngine*) override ; private: diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonGun.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonGun.h index 4d3d0d10cbfa8..de72fb66877dd 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonGun.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonGun.h @@ -23,7 +23,7 @@ namespace gen public: Pythia6PartonGun( const edm::ParameterSet& ); - virtual ~Pythia6PartonGun(); + ~Pythia6PartonGun() override; protected: diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonPtGun.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonPtGun.h index 6d6f1483f20cf..aa3150347097b 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonPtGun.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PartonPtGun.h @@ -15,11 +15,11 @@ namespace gen { public: Pythia6PartonPtGun( const edm::ParameterSet& ); - virtual ~Pythia6PartonPtGun(); + ~Pythia6PartonPtGun() override; protected: - void generateEvent(CLHEP::HepRandomEngine*) ; + void generateEvent(CLHEP::HepRandomEngine*) override ; private: diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtGun.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtGun.h index 7156add1b61ba..0cda89c9abb66 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtGun.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtGun.h @@ -15,11 +15,11 @@ namespace gen { public: Pythia6PtGun( const edm::ParameterSet& ); - virtual ~Pythia6PtGun(); + ~Pythia6PtGun() override; // void produce( edm::Event&, const edm::EventSetup& ) ; protected: - void generateEvent(CLHEP::HepRandomEngine*) ; + void generateEvent(CLHEP::HepRandomEngine*) override ; private: diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtYDistGun.cc b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtYDistGun.cc index 31a0f40583cd7..73d8a2cd47d5f 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtYDistGun.cc +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtYDistGun.cc @@ -17,7 +17,7 @@ using namespace edm; using namespace gen; Pythia6PtYDistGun::Pythia6PtYDistGun( const ParameterSet& pset ) : - Pythia6ParticleGun(pset), fPtYGenerator(0) + Pythia6ParticleGun(pset), fPtYGenerator(nullptr) { ParameterSet pgun_params = diff --git a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtYDistGun.h b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtYDistGun.h index b24b942c0d76e..436e9be45b927 100644 --- a/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtYDistGun.h +++ b/GeneratorInterface/Pythia6Interface/plugins/Pythia6PtYDistGun.h @@ -16,11 +16,11 @@ namespace gen { public: Pythia6PtYDistGun( const edm::ParameterSet& ); - virtual ~Pythia6PtYDistGun(); + ~Pythia6PtYDistGun() override; protected: - void generateEvent(CLHEP::HepRandomEngine*); + void generateEvent(CLHEP::HepRandomEngine*) override; private: diff --git a/GeneratorInterface/Pythia6Interface/src/Pythia6Service.cc b/GeneratorInterface/Pythia6Interface/src/Pythia6Service.cc index bc574034a9507..023542274e411 100644 --- a/GeneratorInterface/Pythia6Interface/src/Pythia6Service.cc +++ b/GeneratorInterface/Pythia6Interface/src/Pythia6Service.cc @@ -32,14 +32,14 @@ __attribute__((visibility("hidden"))) void dummy() using namespace gen; int dummy = 0; double dummy2 = 0; - char * dummy3 = 0; + char * dummy3 = nullptr; pyexec_(); - pystat_(0); + pystat_(nullptr); pyjoin_(dummy, &dummy); py1ent_(dummy, dummy, dummy2, dummy2, dummy2); pygive_(dummy3, dummy); pycomp_(dummy); - pylist_(0); + pylist_(nullptr); pyevnt_(); pyedit_(); } @@ -74,7 +74,7 @@ extern "C" using namespace gen; using namespace edm; -Pythia6Service* Pythia6Service::fPythia6Owner = 0; +Pythia6Service* Pythia6Service::fPythia6Owner = nullptr; Pythia6Service::Pythia6Service() : fRandomEngine(nullptr), fUnitSLHA(24), fUnitPYUPDA(25) @@ -161,7 +161,7 @@ Pythia6Service::Pythia6Service( const ParameterSet& ps ) Pythia6Service::~Pythia6Service() { if (fPythia6Owner == this) - fPythia6Owner = 0; + fPythia6Owner = nullptr; fParamGeneral.clear(); fParamCSA.clear(); @@ -408,7 +408,7 @@ void Pythia6Service::setSLHAFromHeader( const std::vector &lines ) boost::split(tokens, line, boost::algorithm::is_space(), boost::token_compress_on); - if (!tokens.size()) + if (tokens.empty()) continue; block.clear(); if (tokens.size() < 2) diff --git a/GeneratorInterface/Pythia8Interface/interface/P8RndmEngine.h b/GeneratorInterface/Pythia8Interface/interface/P8RndmEngine.h index 8ba4cc504d851..97531dcad3685 100644 --- a/GeneratorInterface/Pythia8Interface/interface/P8RndmEngine.h +++ b/GeneratorInterface/Pythia8Interface/interface/P8RndmEngine.h @@ -30,7 +30,7 @@ namespace gen { P8RndmEngine() : randomEngine_(nullptr) { } // Routine for generating a random number. - virtual double flat() override; + double flat() override; void setRandomEngine(CLHEP::HepRandomEngine* v) { randomEngine_ = v; } diff --git a/GeneratorInterface/Pythia8Interface/interface/Py8GunBase.h b/GeneratorInterface/Pythia8Interface/interface/Py8GunBase.h index 550c1d6bcdfa6..51e6b248f83ae 100644 --- a/GeneratorInterface/Pythia8Interface/interface/Py8GunBase.h +++ b/GeneratorInterface/Pythia8Interface/interface/Py8GunBase.h @@ -42,12 +42,12 @@ namespace gen { class Py8GunBase : public Py8InterfaceBase { public: Py8GunBase( edm::ParameterSet const& ps ); - virtual ~Py8GunBase() {} + ~Py8GunBase() override {} virtual bool residualDecay(); // common func - bool initializeForInternalPartons(); - void finalizeEvent(); - void statistics(); + bool initializeForInternalPartons() override; + void finalizeEvent() override; + void statistics() override; void setRandomEngine(CLHEP::HepRandomEngine* v) { p8SetRandomEngine(v); } std::vector const& sharedResources() const { return p8SharedResources; } diff --git a/GeneratorInterface/Pythia8Interface/interface/Py8InterfaceBase.h b/GeneratorInterface/Pythia8Interface/interface/Py8InterfaceBase.h index bb1f358f442f2..cc7b4ec6e3edf 100644 --- a/GeneratorInterface/Pythia8Interface/interface/Py8InterfaceBase.h +++ b/GeneratorInterface/Pythia8Interface/interface/Py8InterfaceBase.h @@ -26,7 +26,7 @@ namespace gen { public: Py8InterfaceBase( edm::ParameterSet const& ps ); - virtual ~Py8InterfaceBase() {} + ~Py8InterfaceBase() override {} virtual bool generatePartonsAndHadronize() = 0; bool decay() { return true; } // NOT used - let's call it "design imperfection" diff --git a/GeneratorInterface/Pythia8Interface/plugins/EmissionVetoHook1.h b/GeneratorInterface/Pythia8Interface/plugins/EmissionVetoHook1.h index 9e7bd579599f8..35eacb61545dd 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/EmissionVetoHook1.h +++ b/GeneratorInterface/Pythia8Interface/plugins/EmissionVetoHook1.h @@ -12,25 +12,25 @@ class EmissionVetoHook1 : public Pythia8::UserHooks { emittedMode(emittedModeIn), pTdefMode(pTdefModeIn), MPIvetoOn(MPIvetoOnIn), nISRveto(0), nFSRveto(0), Verbosity(VerbosityIn) {} - ~EmissionVetoHook1() { + ~EmissionVetoHook1() override { std::cout << "Number of ISR vetoed = " << nISRveto << std::endl; std::cout << "Number of FSR vetoed = " << nFSRveto << std::endl; } //-------------------------------------------------------------------------- - bool canVetoMPIStep() { return true; } - int numberVetoMPIStep() { return 1; } - bool doVetoMPIStep(int nMPI, const Pythia8::Event &e); + bool canVetoMPIStep() override { return true; } + int numberVetoMPIStep() override { return 1; } + bool doVetoMPIStep(int nMPI, const Pythia8::Event &e) override; - bool canVetoISREmission() { return vetoOn; } - bool doVetoISREmission(int, const Pythia8::Event &e, int iSys); + bool canVetoISREmission() override { return vetoOn; } + bool doVetoISREmission(int, const Pythia8::Event &e, int iSys) override; - bool canVetoFSREmission() { return vetoOn; } - bool doVetoFSREmission(int, const Pythia8::Event &e, int iSys, bool); + bool canVetoFSREmission() override { return vetoOn; } + bool doVetoFSREmission(int, const Pythia8::Event &e, int iSys, bool) override; - bool canVetoMPIEmission() { return MPIvetoOn; } - bool doVetoMPIEmission(int, const Pythia8::Event &e); + bool canVetoMPIEmission() override { return MPIvetoOn; } + bool doVetoMPIEmission(int, const Pythia8::Event &e) override; void fatalEmissionVeto(std::string message); diff --git a/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.cc b/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.cc index c2e282ed85586..6202a75392012 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.cc @@ -27,8 +27,8 @@ using namespace Pythia8; JetMatchingHook::JetMatchingHook( const edm::ParameterSet& ps, Info* info ) - : UserHooks(), fRunBlock(0), fEventBlock(0), fEventNumber(0), fInfoPtr(info), - fJetMatching(0), fJetInputFill(0), + : UserHooks(), fRunBlock(nullptr), fEventBlock(nullptr), fEventNumber(0), fInfoPtr(info), + fJetMatching(nullptr), fJetInputFill(nullptr), fIsInitialized(false) { diff --git a/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.h b/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.h index 40762641454ac..cbbd9b5518b0d 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.h +++ b/GeneratorInterface/Pythia8Interface/plugins/JetMatchingHook.h @@ -21,7 +21,7 @@ class JetMatchingHook : public Pythia8::UserHooks public: JetMatchingHook( const edm::ParameterSet&, Pythia8::Info* ); - virtual ~JetMatchingHook(); + ~JetMatchingHook() override; // // Julia Yarba, Jan.8, 2013 @@ -30,13 +30,13 @@ class JetMatchingHook : public Pythia8::UserHooks // // virtual bool canVetoPartonLevelEarly() { return true; } // virtual bool doVetoPartonLevelEarly( const Pythia8::Event& event ); - virtual bool canVetoPartonLevel() { return true; } - virtual bool doVetoPartonLevel( const Pythia8::Event& event ); + bool canVetoPartonLevel() override { return true; } + bool doVetoPartonLevel( const Pythia8::Event& event ) override; void setEventNumber( int ievt ) { fEventNumber = ievt; return ; } virtual void init( lhef::LHERunInfo* runInfo ); - virtual bool initAfterBeams() { if ( fIsInitialized ) return true; fJetMatching->initAfterBeams(); fIsInitialized=true; return true; } + bool initAfterBeams() override { if ( fIsInitialized ) return true; fJetMatching->initAfterBeams(); fIsInitialized=true; return true; } void resetMatchingStatus() { fJetMatching->resetMatchingStatus(); return; } virtual void beforeHadronization( lhef::LHEEvent* lhee ); @@ -47,14 +47,14 @@ class JetMatchingHook : public Pythia8::UserHooks void setLHERunInfo( lhef::LHERunInfo* lheri ) { fRunBlock=lheri; - if ( fRunBlock == 0 ) return; + if ( fRunBlock == nullptr ) return; const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP(); lhef::CommonBlocks::fillHEPRUP(heprup); return; } void setLHEEvent( lhef::LHEEvent* lhee ) { fEventBlock=lhee; - if ( fEventBlock == 0 ) return; + if ( fEventBlock == nullptr ) return; const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP(); lhef::CommonBlocks::fillHEPEUP(hepeup); return; diff --git a/GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.cc b/GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.cc index 912c70be82f40..fd5b01ad9d4fe 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.cc @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include "GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -75,7 +75,7 @@ bool LHAupLesHouches::setEvent(int inProcId) //handle clustering scales if present, //applies to outgoing partons only - if (setScalesFromLHEF_ && scales.size()>0 && hepeup.ISTUP[i]==1) { + if (setScalesFromLHEF_ && !scales.empty() && hepeup.ISTUP[i]==1) { if (iscale>=scales.size()) { edm::LogError("InvalidLHEInput") << "Pythia8 requires" << "cluster scales for all outgoing partons or for none" diff --git a/GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.h b/GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.h index 8d6eb5f2e0961..8d38ea9f1dbe5 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.h +++ b/GeneratorInterface/Pythia8Interface/plugins/LHAupLesHouches.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include "boost/shared_ptr.hpp" @@ -21,7 +21,7 @@ class LHAupLesHouches : public Pythia8::LHAup { public: - LHAupLesHouches() : setScalesFromLHEF_(false),fEvAttributes(0) {;} + LHAupLesHouches() : setScalesFromLHEF_(false),fEvAttributes(nullptr) {;} //void loadRunInfo(const boost::shared_ptr &runInfo) void loadRunInfo(lhef::LHERunInfo* runInfo) @@ -33,12 +33,12 @@ class LHAupLesHouches : public Pythia8::LHAup { void setScalesFromLHEF(bool b) { setScalesFromLHEF_ = b; } - ~LHAupLesHouches() {if(fEvAttributes) delete fEvAttributes;} + ~LHAupLesHouches() override {if(fEvAttributes) delete fEvAttributes;} private: - bool setInit(); - bool setEvent(int idProcIn); + bool setInit() override; + bool setEvent(int idProcIn) override; //boost::shared_ptr runInfo; lhef::LHERunInfo* runInfo; diff --git a/GeneratorInterface/Pythia8Interface/plugins/PowhegResHook.h b/GeneratorInterface/Pythia8Interface/plugins/PowhegResHook.h index 329beb350bae8..317f1752ed75d 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/PowhegResHook.h +++ b/GeneratorInterface/Pythia8Interface/plugins/PowhegResHook.h @@ -8,11 +8,11 @@ class PowhegResHook : public Pythia8::UserHooks { // Constructor and destructor. PowhegResHook() {} - ~PowhegResHook() {} + ~PowhegResHook() override {} - bool canSetResonanceScale() { return true; } + bool canSetResonanceScale() override { return true; } - double scaleResonance( const int iRes, const Pythia8::Event& event); + double scaleResonance( const int iRes, const Pythia8::Event& event) override; //-------------------------------------------------------------------------- diff --git a/GeneratorInterface/Pythia8Interface/plugins/Py8EGun.cc b/GeneratorInterface/Pythia8Interface/plugins/Py8EGun.cc index c9f25b65de359..3f9142d5526a3 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/Py8EGun.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/Py8EGun.cc @@ -15,7 +15,7 @@ class Py8EGun : public Py8GunBase { public: Py8EGun( edm::ParameterSet const& ); - ~Py8EGun() {} + ~Py8EGun() override {} bool generatePartonsAndHadronize() override; const char* classname() const override; diff --git a/GeneratorInterface/Pythia8Interface/plugins/Py8JetGun.cc b/GeneratorInterface/Pythia8Interface/plugins/Py8JetGun.cc index e01af6010ea0c..91281d1ec13c0 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/Py8JetGun.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/Py8JetGun.cc @@ -11,7 +11,7 @@ class Py8JetGun : public Py8GunBase { public: Py8JetGun( edm::ParameterSet const& ); - ~Py8JetGun() {} + ~Py8JetGun() override {} bool generatePartonsAndHadronize() override; const char* classname() const override; diff --git a/GeneratorInterface/Pythia8Interface/plugins/Py8PtGun.cc b/GeneratorInterface/Pythia8Interface/plugins/Py8PtGun.cc index 379f101df0d1d..aad4ac6431cf7 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/Py8PtGun.cc +++ b/GeneratorInterface/Pythia8Interface/plugins/Py8PtGun.cc @@ -10,7 +10,7 @@ class Py8PtGun : public Py8GunBase { public: Py8PtGun( edm::ParameterSet const& ); - ~Py8PtGun() {} + ~Py8PtGun() override {} bool generatePartonsAndHadronize() override; const char* classname() const override; diff --git a/GeneratorInterface/Pythia8Interface/plugins/Py8toJetInput.h b/GeneratorInterface/Pythia8Interface/plugins/Py8toJetInput.h index ff688efe1d5e4..d306cd6fae0ac 100644 --- a/GeneratorInterface/Pythia8Interface/plugins/Py8toJetInput.h +++ b/GeneratorInterface/Pythia8Interface/plugins/Py8toJetInput.h @@ -20,8 +20,8 @@ class Py8toJetInput virtual ~Py8toJetInput() {} virtual const std::vector fillJetAlgoInput( const Event&, const Event&, - const lhef::LHEEvent* lhee=0, - const std::vector* partonList=0 ); + const lhef::LHEEvent* lhee=nullptr, + const std::vector* partonList=nullptr ); void setJetEtaMax( double max ) { fJetEtaMax=max; return; } protected: @@ -41,11 +41,11 @@ class Py8toJetInputHEPEVT : public Py8toJetInput public: Py8toJetInputHEPEVT() {} - virtual ~Py8toJetInputHEPEVT() {} + ~Py8toJetInputHEPEVT() override {} const std::vector fillJetAlgoInput( const Event&, const Event&, const lhef::LHEEvent*, - const std::vector* partonList=0 ); + const std::vector* partonList=nullptr ) override; }; #endif diff --git a/GeneratorInterface/Pythia8Interface/src/Py8GunBase.cc b/GeneratorInterface/Pythia8Interface/src/Py8GunBase.cc index c1d84a674625d..09575f8487e03 100644 --- a/GeneratorInterface/Pythia8Interface/src/Py8GunBase.cc +++ b/GeneratorInterface/Pythia8Interface/src/Py8GunBase.cc @@ -52,11 +52,11 @@ bool Py8GunBase::initializeForInternalPartons() if (useEvtGen) { edm::LogInfo("Pythia8Interface") << "Creating and initializing pythia8 EvtGen plugin"; - evtgenDecays.reset(new EvtGenDecays(fMasterGen.get(), evtgenDecFile.c_str(), evtgenPdlFile.c_str())); + evtgenDecays.reset(new EvtGenDecays(fMasterGen.get(), evtgenDecFile, evtgenPdlFile)); for (unsigned int i=0; ireadDecayFile(evtgenUserFile.fullPath().c_str()); + evtgenDecays->readDecayFile(evtgenUserFile.fullPath()); } } diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/interface/EPOS_Wrapper.h b/GeneratorInterface/ReggeGribovPartonMCInterface/interface/EPOS_Wrapper.h index 6295749fc6286..031bc6071bffb 100644 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/interface/EPOS_Wrapper.h +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/interface/EPOS_Wrapper.h @@ -62,7 +62,7 @@ // i.e. it returns an integer corresponding to nevhep // -#include +#include const unsigned int epos_bytes_allocation = sizeof(long int) * ( 2 + 6 * EPOS_EntriesAllocation ) diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/interface/IO_EPOS.h b/GeneratorInterface/ReggeGribovPartonMCInterface/interface/IO_EPOS.h index 1be62219b4253..e818eb1a03f6f 100644 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/interface/IO_EPOS.h +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/interface/IO_EPOS.h @@ -20,10 +20,10 @@ namespace EPOS { class IO_EPOS : public HepMC::IO_BaseClass { public: IO_EPOS(); - virtual ~IO_EPOS(); - bool fill_next_event( HepMC::GenEvent* ); - void write_event( const HepMC::GenEvent* ); - void print( std::ostream& ostr = std::cout ) const; + ~IO_EPOS() override; + bool fill_next_event( HepMC::GenEvent* ) override; + void write_event( const HepMC::GenEvent* ) override; + void print( std::ostream& ostr = std::cout ) const override; // see comments below for these switches. bool trust_both_mothers_and_daughters() const; diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/interface/ReggeGribovPartonMC.h b/GeneratorInterface/ReggeGribovPartonMCInterface/interface/ReggeGribovPartonMC.h index c71cca869b040..84dc4536af335 100644 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/interface/ReggeGribovPartonMC.h +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/interface/ReggeGribovPartonMC.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include namespace HepMC { class GenEvent; @@ -22,7 +22,7 @@ namespace gen class ReggeGribovPartonMCHadronizer : public BaseHadronizer { public: ReggeGribovPartonMCHadronizer(const edm::ParameterSet &); - virtual ~ReggeGribovPartonMCHadronizer(); }; + ~ReggeGribovPartonMCHadronizer() override; }; } /*end namespace*/ diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/interface/ReggeGribovPartonMCHadronizer.h b/GeneratorInterface/ReggeGribovPartonMCInterface/interface/ReggeGribovPartonMCHadronizer.h index 6822244545cd3..91af37ebaf414 100644 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/interface/ReggeGribovPartonMCHadronizer.h +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/interface/ReggeGribovPartonMCHadronizer.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include namespace HepMC { class GenEvent; @@ -200,7 +200,7 @@ namespace gen public: ReggeGribovPartonMCHadronizer(const edm::ParameterSet &); - virtual ~ReggeGribovPartonMCHadronizer(); + ~ReggeGribovPartonMCHadronizer() override; bool generatePartonsAndHadronize(); bool hadronize(); @@ -219,7 +219,7 @@ namespace gen private: - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; + void doSetRandomEngine(CLHEP::HepRandomEngine* v) override; edm::ParameterSet pset_; double m_BeamMomentum; diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zFile.cc b/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zFile.cc index 6d82c79f9a78c..857ad6beaccde 100755 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zFile.cc +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zFile.cc @@ -6,7 +6,7 @@ #ifndef USE_WINDOWS_FILE #ifndef UNDER_CE -#include +#include #endif #else @@ -30,7 +30,7 @@ void File_Construct(CSzFile *p) #ifdef USE_WINDOWS_FILE p->handle = INVALID_HANDLE_VALUE; #else - p->file = NULL; + p->file = nullptr; #endif } @@ -46,7 +46,7 @@ static WRes File_Open(CSzFile *p, const char *name, int writeMode) return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); #else p->file = fopen(name, writeMode ? "wb+" : "rb"); - return (p->file != 0) ? 0 : + return (p->file != nullptr) ? 0 : #ifdef UNDER_CE 2; /* ENOENT */ #else @@ -83,12 +83,12 @@ WRes File_Close(CSzFile *p) p->handle = INVALID_HANDLE_VALUE; } #else - if (p->file != NULL) + if (p->file != nullptr) { int res = fclose(p->file); if (res != 0) return res; - p->file = NULL; + p->file = nullptr; } #endif return 0; diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zFile.h b/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zFile.h index 5d857879e0690..82d0ac6b122c4 100755 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zFile.h +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zFile.h @@ -11,7 +11,7 @@ #ifdef USE_WINDOWS_FILE #include #else -#include +#include #endif #include "Types.h" diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zStream.cc b/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zStream.cc index f0959fb0788f6..cc2562156a02f 100755 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zStream.cc +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/src/7zStream.cc @@ -1,7 +1,7 @@ /* 7zStream.c -- 7z Stream functions 2010-03-11 : Igor Pavlov : Public domain */ -#include +#include #include "Types.h" diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/src/Alloc.cc b/GeneratorInterface/ReggeGribovPartonMCInterface/src/Alloc.cc index bb24a772b340c..022e690715f24 100755 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/src/Alloc.cc +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/src/Alloc.cc @@ -6,7 +6,7 @@ Public domain */ #ifdef _WIN32 #include #endif -#include +#include #include "Alloc.h" @@ -23,7 +23,7 @@ int g_allocCountBig = 0; void *MyAlloc(size_t size) { if (size == 0) - return 0; + return nullptr; #ifdef _SZ_ALLOC_DEBUG { void *p = malloc(size); diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/src/Alloc.h b/GeneratorInterface/ReggeGribovPartonMCInterface/src/Alloc.h index 6b3f03474e5eb..4d9ab6a8ece8e 100755 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/src/Alloc.h +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/src/Alloc.h @@ -4,7 +4,7 @@ #ifndef __COMMON_ALLOC_H #define __COMMON_ALLOC_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/src/IO_EPOS.cc b/GeneratorInterface/ReggeGribovPartonMCInterface/src/IO_EPOS.cc index eeabc8610e305..a11f254710881 100644 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/src/IO_EPOS.cc +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/src/IO_EPOS.cc @@ -13,9 +13,9 @@ namespace EPOS { unsigned int EPOS_Wrapper::s_sizeof_real = sizeof(double); unsigned int EPOS_Wrapper::s_max_number_entries = 99900; - IO_EPOS::IO_EPOS() : m_trust_mothers_before_daughters(1), - m_trust_both_mothers_and_daughters(0), - m_print_inconsistency_errors(1), + IO_EPOS::IO_EPOS() : m_trust_mothers_before_daughters(true), + m_trust_both_mothers_and_daughters(false), + m_print_inconsistency_errors(true), m_trust_beam_particles(true), m_skip_nucl_frag(false) {} @@ -50,7 +50,7 @@ namespace EPOS { // (+1 in size accounts for hepevt_particle[0] which is unfilled) std::vector hepevt_particle( EPOS_Wrapper::number_entries()+1 ); - hepevt_particle[0] = 0; + hepevt_particle[0] = nullptr; for ( int i1 = 1; i1 <= EPOS_Wrapper::number_entries(); ++i1 ) { hepevt_particle[i1] = build_particle(i1); } @@ -116,7 +116,7 @@ namespace EPOS { // map all particles onto a unique index std::vector index_to_particle( EPOS_Wrapper::max_number_entries()+1 ); - index_to_particle[0]=0; + index_to_particle[0]=nullptr; std::map particle_to_index; int particle_counter=0; for ( HepMC::GenEvent::vertex_const_iterator v = evt->vertices_begin(); diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/src/LzmaDec.cc b/GeneratorInterface/ReggeGribovPartonMCInterface/src/LzmaDec.cc index 4fdc11d4bd702..e8ec239e729b1 100755 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/src/LzmaDec.cc +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/src/LzmaDec.cc @@ -3,7 +3,7 @@ #include "LzmaDec.h" -#include +#include #define kNumTopBits 24 #define kTopValue ((UInt32)1 << kNumTopBits) @@ -880,13 +880,13 @@ SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *sr void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc) { alloc->Free(alloc, p->probs); - p->probs = 0; + p->probs = nullptr; } static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc) { alloc->Free(alloc, p->dic); - p->dic = 0; + p->dic = nullptr; } void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc) @@ -924,12 +924,12 @@ SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) { UInt32 numProbs = LzmaProps_GetNumProbs(propNew); - if (p->probs == 0 || numProbs != p->numProbs) + if (p->probs == nullptr || numProbs != p->numProbs) { LzmaDec_FreeProbs(p, alloc); p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb)); p->numProbs = numProbs; - if (p->probs == 0) + if (p->probs == nullptr) return SZ_ERROR_MEM; } return SZ_OK; @@ -951,11 +951,11 @@ SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAll RINOK(LzmaProps_Decode(&propNew, props, propsSize)); RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); dicBufSize = propNew.dicSize; - if (p->dic == 0 || dicBufSize != p->dicBufSize) + if (p->dic == nullptr || dicBufSize != p->dicBufSize) { LzmaDec_FreeDict(p, alloc); p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize); - if (p->dic == 0) + if (p->dic == nullptr) { LzmaDec_FreeProbs(p, alloc); return SZ_ERROR_MEM; diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/src/Types.h b/GeneratorInterface/ReggeGribovPartonMCInterface/src/Types.h index f193ce2f53d67..4c229537f0007 100755 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/src/Types.h +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/src/Types.h @@ -4,7 +4,7 @@ #ifndef __7Z_TYPES_H #define __7Z_TYPES_H -#include +#include #ifdef _WIN32 #include diff --git a/GeneratorInterface/ReggeGribovPartonMCInterface/src/read.cc b/GeneratorInterface/ReggeGribovPartonMCInterface/src/read.cc index 6b84b024fe76b..4fd98702efb33 100644 --- a/GeneratorInterface/ReggeGribovPartonMCInterface/src/read.cc +++ b/GeneratorInterface/ReggeGribovPartonMCInterface/src/read.cc @@ -1,8 +1,8 @@ #include "LzmaFile.h" -#include -#include -#include +#include +#include +#include diff --git a/GeneratorInterface/RivetInterface/interface/DQMRivetClient.h b/GeneratorInterface/RivetInterface/interface/DQMRivetClient.h index 4aa369cd02a65..e59c92550d99d 100644 --- a/GeneratorInterface/RivetInterface/interface/DQMRivetClient.h +++ b/GeneratorInterface/RivetInterface/interface/DQMRivetClient.h @@ -16,14 +16,14 @@ class DQMRivetClient : public edm::EDAnalyzer { public: DQMRivetClient(const edm::ParameterSet& pset); - ~DQMRivetClient() {}; + ~DQMRivetClient() override {}; - void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) {}; + void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override {}; - void endJob(); + void endJob() override; /// EndRun - void endRun(const edm::Run& r, const edm::EventSetup& c); + void endRun(const edm::Run& r, const edm::EventSetup& c) override; struct LumiOption { diff --git a/GeneratorInterface/RivetInterface/interface/ParticleLevelProducer.h b/GeneratorInterface/RivetInterface/interface/ParticleLevelProducer.h index 4f9b4ae7d5a10..5c317dc7b6907 100644 --- a/GeneratorInterface/RivetInterface/interface/ParticleLevelProducer.h +++ b/GeneratorInterface/RivetInterface/interface/ParticleLevelProducer.h @@ -19,7 +19,7 @@ class ParticleLevelProducer : public edm::one::EDProducer _particleMinPt*GeV); Cut lepton_cut = (Cuts::abseta < _lepMaxEta) and (Cuts::pT > _lepMinPt*GeV); @@ -140,7 +140,7 @@ namespace Rivet { }; // Apply Rivet projections - void analyze(const Event& event) { + void analyze(const Event& event) override { _jets.clear(); _fatjets.clear(); _leptons.clear(); @@ -160,7 +160,7 @@ namespace Rivet { }; // Do nothing here - void finalize() {}; + void finalize() override {}; }; diff --git a/GeneratorInterface/RivetInterface/interface/RivetHarvesting.h b/GeneratorInterface/RivetInterface/interface/RivetHarvesting.h index 532dfe902c5f6..7f3479f2abd09 100644 --- a/GeneratorInterface/RivetInterface/interface/RivetHarvesting.h +++ b/GeneratorInterface/RivetInterface/interface/RivetHarvesting.h @@ -21,17 +21,17 @@ class RivetHarvesting : public edm::EDAnalyzer public: RivetHarvesting(const edm::ParameterSet&); - virtual ~RivetHarvesting(); + ~RivetHarvesting() override; - virtual void beginJob(); + void beginJob() override; - virtual void endJob(); + void endJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void beginRun(const edm::Run&, const edm::EventSetup&); + void beginRun(const edm::Run&, const edm::EventSetup&) override; - virtual void endRun(const edm::Run&, const edm::EventSetup&); + void endRun(const edm::Run&, const edm::EventSetup&) override; private: diff --git a/GeneratorInterface/RivetInterface/plugins/DQMRivetClient.cc b/GeneratorInterface/RivetInterface/plugins/DQMRivetClient.cc index 65640edeaab92..ace971fffd24d 100644 --- a/GeneratorInterface/RivetInterface/plugins/DQMRivetClient.cc +++ b/GeneratorInterface/RivetInterface/plugins/DQMRivetClient.cc @@ -153,7 +153,7 @@ void DQMRivetClient::endRun(const edm::Run& r, const edm::EventSetup& c) { - theDQM = 0; + theDQM = nullptr; theDQM = Service().operator->(); if ( ! theDQM ) { diff --git a/GeneratorInterface/RivetInterface/plugins/GenParticles2HepMCConverter.cc b/GeneratorInterface/RivetInterface/plugins/GenParticles2HepMCConverter.cc index 04d8d50b13d22..3595e6a3d57b1 100644 --- a/GeneratorInterface/RivetInterface/plugins/GenParticles2HepMCConverter.cc +++ b/GeneratorInterface/RivetInterface/plugins/GenParticles2HepMCConverter.cc @@ -28,7 +28,7 @@ class GenParticles2HepMCConverter : public edm::stream::EDProducer<> { public: explicit GenParticles2HepMCConverter(const edm::ParameterSet& pset); - ~GenParticles2HepMCConverter() {}; + ~GenParticles2HepMCConverter() override {}; void produce(edm::Event& event, const edm::EventSetup& eventSetup) override; diff --git a/GeneratorInterface/RivetInterface/plugins/ParticleLevelProducer.cc b/GeneratorInterface/RivetInterface/plugins/ParticleLevelProducer.cc index 8b6df2a6fbe72..ff129415cc5c3 100644 --- a/GeneratorInterface/RivetInterface/plugins/ParticleLevelProducer.cc +++ b/GeneratorInterface/RivetInterface/plugins/ParticleLevelProducer.cc @@ -129,7 +129,7 @@ void ParticleLevelProducer::produce(edm::Event& event, const edm::EventSetup& ev lepJet.setPdgId(lepton.pdgId()); lepJet.setCharge(lepton.charge()); - const auto cl = lepton.constituentLepton(); + const auto& cl = lepton.constituentLepton(); consts->push_back(reco::GenParticle(cl.charge(), p4(cl), genVertex_, cl.pdgId(), 1, true)); lepJet.addDaughter(edm::refToPtr(reco::GenParticleRef(constsRefHandle, ++iConstituent))); diff --git a/GeneratorInterface/RivetInterface/src/CMS_2013_I1224539_DIJET.cc b/GeneratorInterface/RivetInterface/src/CMS_2013_I1224539_DIJET.cc index e690ae92a8937..1634da0946ad0 100644 --- a/GeneratorInterface/RivetInterface/src/CMS_2013_I1224539_DIJET.cc +++ b/GeneratorInterface/RivetInterface/src/CMS_2013_I1224539_DIJET.cc @@ -33,7 +33,7 @@ namespace Rivet { //@{ /// Book histograms and initialise projections before the run - void init() { + void init() override { FinalState fs(-2.4, 2.4, 0*GeV); addProjection(fs, "FS"); @@ -64,7 +64,7 @@ namespace Rivet { /// Perform the per-event analysis - void analyze(const Event& event) { + void analyze(const Event& event) override { const double weight = event.weight(); // Look at events with >= 2 jets @@ -97,7 +97,7 @@ namespace Rivet { /// Normalise histograms etc., after the run - void finalize() { + void finalize() override { const double normalizationVal = 1000; for (size_t i = 0; i < N_PT_BINS_dj; ++i) { normalize(_h_ungroomedAvgJetMass_dj[i], normalizationVal); diff --git a/GeneratorInterface/SherpaInterface/interface/SherpackFetcher.h b/GeneratorInterface/SherpaInterface/interface/SherpackFetcher.h index 983099457afe9..84978371b5ccf 100644 --- a/GeneratorInterface/SherpaInterface/interface/SherpackFetcher.h +++ b/GeneratorInterface/SherpaInterface/interface/SherpackFetcher.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include "FWCore/Framework/interface/Frameworkfwd.h" diff --git a/GeneratorInterface/SherpaInterface/interface/SherpackUtilities.h b/GeneratorInterface/SherpaInterface/interface/SherpackUtilities.h index 1f546221a131d..0decae5ab7b4c 100644 --- a/GeneratorInterface/SherpaInterface/interface/SherpackUtilities.h +++ b/GeneratorInterface/SherpaInterface/interface/SherpackUtilities.h @@ -8,11 +8,11 @@ * version 1.0, 1st August 2012 */ -#include -#include +#include +#include #include -#include -#include +#include +#include #include /* This is for mkdir(); this may need to be changed for some platforms. */ #include /* For mkdir() */ diff --git a/GeneratorInterface/SherpaInterface/src/SherpackUtilities.cc b/GeneratorInterface/SherpaInterface/src/SherpackUtilities.cc index ba550dee1511b..286b96ec54bb4 100644 --- a/GeneratorInterface/SherpaInterface/src/SherpackUtilities.cc +++ b/GeneratorInterface/SherpaInterface/src/SherpackUtilities.cc @@ -215,7 +215,7 @@ void create_dir(char *pathname, int mode) { if (r != 0) { /* On failure, try creating parent directory. */ p = strrchr(pathname, '/'); - if (p != NULL) { + if (p != nullptr) { *p = '\0'; create_dir(pathname, 0755); *p = '/'; @@ -230,10 +230,10 @@ void create_dir(char *pathname, int mode) { FILE* create_file(char *pathname, int mode) { FILE *f; f = fopen(pathname, "w+"); - if (f == NULL) { + if (f == nullptr) { /* Try creating parent dir and then creating file. */ char *p = strrchr(pathname, '/'); - if (p != NULL) { + if (p != nullptr) { *p = '\0'; create_dir(pathname, 0755); *p = '/'; @@ -264,7 +264,7 @@ void Untar(FILE *a, const char *path) { char newlongpathname[512]; char newlonglinkname[512]; char buff[512]; - FILE *f = NULL; + FILE *f = nullptr; size_t bytes_read; int filesize; @@ -456,20 +456,20 @@ void Untar(FILE *a, const char *path) { } if (filesize < 512) bytes_read = filesize; - if (f != NULL) { + if (f != nullptr) { if (fwrite(buff, 1, bytes_read, f) != bytes_read) { fprintf(stderr, "Failed write\n"); fclose(f); - f = NULL; + f = nullptr; } } filesize -= bytes_read; } - if (f != NULL) { + if (f != nullptr) { fclose(f); - f = NULL; + f = nullptr; } } } diff --git a/GeneratorInterface/TauolaInterface/interface/TauSpinnerCMS.h b/GeneratorInterface/TauolaInterface/interface/TauSpinnerCMS.h index 5feeb1bd1b72d..bdb88b9c0e2a9 100755 --- a/GeneratorInterface/TauolaInterface/interface/TauSpinnerCMS.h +++ b/GeneratorInterface/TauolaInterface/interface/TauSpinnerCMS.h @@ -49,11 +49,11 @@ class TauSpinnerCMS : public edm::one::EDProducer{ public: explicit TauSpinnerCMS( const edm::ParameterSet& ) ; - virtual ~TauSpinnerCMS(){}; // no need to delete ROOT stuff + ~TauSpinnerCMS() override{}; // no need to delete ROOT stuff - virtual void produce( edm::Event&, const edm::EventSetup&) override final; - virtual void beginJob() override final; - virtual void endJob() override final; + void produce( edm::Event&, const edm::EventSetup&) final; + void beginJob() final; + void endJob() final; static double flat(); void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; } virtual void initialize(); diff --git a/GeneratorInterface/TauolaInterface/interface/TauSpinnerFilter.h b/GeneratorInterface/TauolaInterface/interface/TauSpinnerFilter.h index d2cc1e1ecd689..fb9f9eb6f286c 100644 --- a/GeneratorInterface/TauolaInterface/interface/TauSpinnerFilter.h +++ b/GeneratorInterface/TauolaInterface/interface/TauSpinnerFilter.h @@ -23,9 +23,9 @@ class TauSpinnerFilter : public edm::EDFilter { public: TauSpinnerFilter(const edm::ParameterSet&); - ~TauSpinnerFilter(){}; + ~TauSpinnerFilter() override{}; - virtual bool filter(edm::Event& e, edm::EventSetup const& es); + bool filter(edm::Event& e, edm::EventSetup const& es) override; void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; } private: diff --git a/GeneratorInterface/TauolaInterface/interface/TauolappInterface.h b/GeneratorInterface/TauolaInterface/interface/TauolappInterface.h index 83675d162de30..e42aa9ca55949 100644 --- a/GeneratorInterface/TauolaInterface/interface/TauolappInterface.h +++ b/GeneratorInterface/TauolaInterface/interface/TauolappInterface.h @@ -32,16 +32,16 @@ namespace gen { // ctor & dtor TauolappInterface( const edm::ParameterSet& ); - ~TauolappInterface(); + ~TauolappInterface() override; - void enablePolarization() { fPolarization = true; return; } - void disablePolarization() { fPolarization = false; return; } - void init( const edm::EventSetup& ); - const std::vector& operatesOnParticles() { return fPDGs; } - HepMC::GenEvent* decay( HepMC::GenEvent* ); - void statistics() ; - virtual void SetLHE(lhef::LHEEvent *l){lhe=l;} - void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; } + void enablePolarization() override { fPolarization = true; return; } + void disablePolarization() override { fPolarization = false; return; } + void init( const edm::EventSetup& ) override; + const std::vector& operatesOnParticles() override { return fPDGs; } + HepMC::GenEvent* decay( HepMC::GenEvent* ) override; + void statistics() override ; + void SetLHE(lhef::LHEEvent *l) override{lhe=l;} + void setRandomEngine(CLHEP::HepRandomEngine* v) override { fRandomEngine = v; } static double flat(); private: diff --git a/GeneratorInterface/TauolaInterface/plugins/TauSpinner/TauSpinnerCMS.cc b/GeneratorInterface/TauolaInterface/plugins/TauSpinner/TauSpinnerCMS.cc index c7f119eca5dc2..ad0745f291f97 100755 --- a/GeneratorInterface/TauolaInterface/plugins/TauSpinner/TauSpinnerCMS.cc +++ b/GeneratorInterface/TauolaInterface/plugins/TauSpinner/TauSpinnerCMS.cc @@ -183,8 +183,8 @@ int TauSpinnerCMS::readParticlesfromReco(edm::Event& e,SimpleParticle &X,SimpleP const reco::GenParticle *hx=&(*itr); if(!isFirst(hx)) continue; GetLastSelf(hx); - const reco::GenParticle *recotau1=NULL; - const reco::GenParticle *recotau2=NULL; + const reco::GenParticle *recotau1=nullptr; + const reco::GenParticle *recotau2=nullptr; unsigned int ntau(0),ntauornu(0); for(unsigned int i=0; inumberOfDaughters(); i++){ const reco::Candidate *dau=itr->daughter(i); diff --git a/GeneratorInterface/TauolaInterface/plugins/TauSpinner/read_particles_from_HepMC.cc b/GeneratorInterface/TauolaInterface/plugins/TauSpinner/read_particles_from_HepMC.cc index eb540a89eef9b..4df82ee39a4d3 100644 --- a/GeneratorInterface/TauolaInterface/plugins/TauSpinner/read_particles_from_HepMC.cc +++ b/GeneratorInterface/TauolaInterface/plugins/TauSpinner/read_particles_from_HepMC.cc @@ -86,10 +86,10 @@ inline bool isFirst(HepMC::GenParticle *x){ *******************************************************************************/ int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, SimpleParticle &tau, SimpleParticle &tau2, std::vector &tau_daughters, std::vector &tau2_daughters) { - if(event==NULL) return 1; + if(event==nullptr) return 1; // Exctract particles from event - HepMC::GenParticle *hX=NULL, *hTau=NULL, *hTau2=NULL; + HepMC::GenParticle *hX=nullptr, *hTau=nullptr, *hTau2=nullptr; for(HepMC::GenEvent::particle_const_iterator it = event->particles_begin(); it!=event->particles_end(); ++it) { @@ -109,7 +109,7 @@ int readParticlesFromHepMC(const HepMC::GenEvent *event, SimpleParticle &X, Simp HepMC::GenParticle *LhX=hX; if(!isFirst(hX)) continue; findLastSelf(LhX); - hTau = hTau2 = NULL; + hTau = hTau2 = nullptr; for(HepMC::GenVertex::particle_iterator it2 = LhX->end_vertex()->particles_begin(HepMC::children); it2!=LhX->end_vertex()->particles_end(HepMC::children); ++it2) { diff --git a/GeneratorInterface/TauolaInterface/plugins/Tauolapp/TauolappInterface.cc b/GeneratorInterface/TauolaInterface/plugins/Tauolapp/TauolappInterface.cc index 7382ac055952a..bce80abf0a269 100644 --- a/GeneratorInterface/TauolaInterface/plugins/Tauolapp/TauolappInterface.cc +++ b/GeneratorInterface/TauolaInterface/plugins/Tauolapp/TauolappInterface.cc @@ -54,25 +54,25 @@ extern "C" { TauolappInterface::TauolappInterface( const edm::ParameterSet& pset): fPolarization(false), - fPSet(0), + fPSet(nullptr), fIsInitialized(false), fMDTAU(-1), fSelectDecayByEvent(false), - lhe(NULL), + lhe(nullptr), dmMatch(0.5), dolhe(false), dolheBosonCorr(false), ntries(10) { - if ( fPSet != 0 ) throw cms::Exception("TauolappInterfaceError") << "Attempt to override Tauola an existing ParameterSet\n" << std::endl; + if ( fPSet != nullptr ) throw cms::Exception("TauolappInterfaceError") << "Attempt to override Tauola an existing ParameterSet\n" << std::endl; fPSet = new ParameterSet(pset); } -TauolappInterface::~TauolappInterface(){if ( fPSet != 0 ) delete fPSet;} +TauolappInterface::~TauolappInterface(){if ( fPSet != nullptr ) delete fPSet;} void TauolappInterface::init( const edm::EventSetup& es ){ if ( fIsInitialized ) return; // do init only once - if ( fPSet == 0 ) throw cms::Exception("TauolappInterfaceError") << "Attempt to initialize Tauola with an empty ParameterSet\n" << std::endl; + if ( fPSet == nullptr ) throw cms::Exception("TauolappInterfaceError") << "Attempt to initialize Tauola with an empty ParameterSet\n" << std::endl; fIsInitialized = true; @@ -212,7 +212,7 @@ HepMC::GenEvent* TauolappInterface::decay( HepMC::GenEvent* evt ){ if(fSelectDecayByEvent){ selectDecayByMDTAU(); } - if(dolhe && lhe!=NULL){ + if(dolhe && lhe!=nullptr){ std::vector particles; std::vector m_idx; std::vector spinup=lhe->getHEPEUP()->SPINUP; @@ -333,7 +333,7 @@ HepMC::GenEvent* TauolappInterface::decay( HepMC::GenEvent* evt ){ BCodes.push_back( (*pitr)->barcode() ); } } - if ( BCodes.size() > 0 ){ + if ( !BCodes.empty() ){ for ( size_t ibc=0; ibcbarcode_to_particle( BCodes[ibc] ); int nbc = p1->barcode() - 10000 + NPartBefore; diff --git a/HeavyFlavorAnalysis/Onia2MuMu/interface/Onia2MuMuPAT.h b/HeavyFlavorAnalysis/Onia2MuMu/interface/Onia2MuMuPAT.h index 97ff7ade4c0b8..511ebef1582ab 100644 --- a/HeavyFlavorAnalysis/Onia2MuMu/interface/Onia2MuMuPAT.h +++ b/HeavyFlavorAnalysis/Onia2MuMu/interface/Onia2MuMuPAT.h @@ -37,12 +37,12 @@ struct GreaterByVProb { class Onia2MuMuPAT : public edm::EDProducer { public: explicit Onia2MuMuPAT(const edm::ParameterSet&); - ~Onia2MuMuPAT(); + ~Onia2MuMuPAT() override; private: - virtual void beginJob() ; - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; bool isAbHadron(int pdgID); bool isAMixedbHadron(int pdgID, int momPdgID); std::pair findJpsiMCInfo(reco::GenParticleRef genJpsi); diff --git a/HeavyFlavorAnalysis/Onia2MuMu/interface/OniaAddV0TracksProducer.h b/HeavyFlavorAnalysis/Onia2MuMu/interface/OniaAddV0TracksProducer.h index 4272951c15f16..a05f0569141a8 100644 --- a/HeavyFlavorAnalysis/Onia2MuMu/interface/OniaAddV0TracksProducer.h +++ b/HeavyFlavorAnalysis/Onia2MuMu/interface/OniaAddV0TracksProducer.h @@ -26,8 +26,8 @@ class OniaAddV0TracksProducer : public edm::EDProducer { private: - virtual void produce(edm::Event& event, const edm::EventSetup& esetup); - virtual void endJob() ; + void produce(edm::Event& event, const edm::EventSetup& esetup) override; + void endJob() override ; edm::EDGetTokenT LambdaCollectionToken_; edm::EDGetTokenT KShortCollectionToken_; diff --git a/HeavyFlavorAnalysis/Onia2MuMu/interface/OniaPhotonConversionProducer.h b/HeavyFlavorAnalysis/Onia2MuMu/interface/OniaPhotonConversionProducer.h index 8d1b928f7fce4..3e80279b6177c 100644 --- a/HeavyFlavorAnalysis/Onia2MuMu/interface/OniaPhotonConversionProducer.h +++ b/HeavyFlavorAnalysis/Onia2MuMu/interface/OniaPhotonConversionProducer.h @@ -40,8 +40,8 @@ class OniaPhotonConversionProducer : public edm::stream::EDProducer<> { private: - virtual void produce(edm::Event& event, const edm::EventSetup& esetup); - virtual void endStream(); + void produce(edm::Event& event, const edm::EventSetup& esetup) override; + void endStream() override; void removeDuplicates(reco::ConversionCollection&); bool checkTkVtxCompatibility(const reco::Conversion&, const reco::VertexCollection&); bool foundCompatibleInnerHits(const reco::HitPattern& hitPatA, const reco::HitPattern& hitPatB); diff --git a/HeavyFlavorAnalysis/Onia2MuMu/src/Onia2MuMuPAT.cc b/HeavyFlavorAnalysis/Onia2MuMu/src/Onia2MuMuPAT.cc index 929bcc5ac7609..f28007da8ecdb 100644 --- a/HeavyFlavorAnalysis/Onia2MuMu/src/Onia2MuMuPAT.cc +++ b/HeavyFlavorAnalysis/Onia2MuMu/src/Onia2MuMuPAT.cc @@ -203,7 +203,7 @@ Onia2MuMuPAT::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) const reco::Muon *rmu2 = dynamic_cast(it2->originalObject()); // check that muons are truly from reco::Muons (and not, e.g., from PF Muons) // also check that the tracks really come from the track collection used for the BS - if (rmu1 != 0 && rmu2 != 0 && rmu1->track().id() == pvtracks.id() && rmu2->track().id() == pvtracks.id()) { + if (rmu1 != nullptr && rmu2 != nullptr && rmu1->track().id() == pvtracks.id() && rmu2->track().id() == pvtracks.id()) { // Save the keys of the tracks in the primary vertex // std::vector vertexTracksKeys; // vertexTracksKeys.reserve(thePrimaryV.tracksSize()); @@ -254,9 +254,9 @@ Onia2MuMuPAT::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) if (tkPVdist.second.significance()>3) continue; if (track.ptError()/track.pt()>0.1) continue; // do not count the two muons - if (rmu1 != 0 && rmu1->innerTrack().key() == itVtx->key()) + if (rmu1 != nullptr && rmu1->innerTrack().key() == itVtx->key()) continue; - if (rmu2 != 0 && rmu2->innerTrack().key() == itVtx->key()) + if (rmu2 != nullptr && rmu2->innerTrack().key() == itVtx->key()) continue; vertexWeight += theOriginalPV.trackWeight(*itVtx); diff --git a/HeavyFlavorAnalysis/Onia2MuMu/src/OniaVtxReProducer.cc b/HeavyFlavorAnalysis/Onia2MuMu/src/OniaVtxReProducer.cc index c9f493a325c8a..118839aca6a28 100644 --- a/HeavyFlavorAnalysis/Onia2MuMu/src/OniaVtxReProducer.cc +++ b/HeavyFlavorAnalysis/Onia2MuMu/src/OniaVtxReProducer.cc @@ -11,7 +11,7 @@ OniaVtxReProducer::OniaVtxReProducer(const edm::Handle &handle, const edm::Event &iEvent) { const edm::Provenance *prov = handle.provenance(); - if (prov == 0) throw cms::Exception("CorruptData") << "Vertex handle doesn't have provenance."; + if (prov == nullptr) throw cms::Exception("CorruptData") << "Vertex handle doesn't have provenance."; edm::ParameterSet psetFromProvenance = edm::parameterSet(*prov); bool is_primary_available = false; diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHDecayVertex.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHDecayVertex.h index 27cd0928213f6..87096a5df1864 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHDecayVertex.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHDecayVertex.h @@ -49,7 +49,7 @@ class BPHDecayVertex: public virtual BPHDecayMomentum { /** Destructor */ - virtual ~BPHDecayVertex(); + ~BPHDecayVertex() override; /** Operations */ @@ -95,7 +95,7 @@ class BPHDecayVertex: public virtual BPHDecayMomentum { const BPHRecoConstCandPtr& comp ); // utility function used to cash reconstruction results - virtual void setNotUpdated() const; + void setNotUpdated() const override; private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h index 4535a9e8a783b..bcf656ea38a76 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h @@ -48,8 +48,8 @@ class BPHFitSelect { private: // private copy and assigment constructors - BPHFitSelect ( const BPHFitSelect& x ); - BPHFitSelect& operator=( const BPHFitSelect& x ); + BPHFitSelect ( const BPHFitSelect& x ) = delete; + BPHFitSelect& operator=( const BPHFitSelect& x ) = delete; }; diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHKinematicFit.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHKinematicFit.h index eb07adfe3f4fd..ae061c2e317c4 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHKinematicFit.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHKinematicFit.h @@ -42,7 +42,7 @@ class BPHKinematicFit: public virtual BPHDecayVertex { /** Destructor */ - virtual ~BPHKinematicFit(); + ~BPHKinematicFit() override; /** Operations */ @@ -106,7 +106,7 @@ class BPHKinematicFit: public virtual BPHDecayVertex { const BPHRecoConstCandPtr& comp ); // utility function used to cash reconstruction results - virtual void setNotUpdated() const; + void setNotUpdated() const override; private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h index c9b0afcfa31d8..c205f4351d6c1 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h @@ -48,8 +48,8 @@ class BPHMomentumSelect { private: // private copy and assigment constructors - BPHMomentumSelect ( const BPHMomentumSelect& x ); - BPHMomentumSelect& operator=( const BPHMomentumSelect& x ); + BPHMomentumSelect ( const BPHMomentumSelect& x ) = delete; + BPHMomentumSelect& operator=( const BPHMomentumSelect& x ) = delete; }; diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h index d3e26a8a9c3f6..be2a1e7e02378 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h @@ -65,7 +65,7 @@ class BPHMultiSelect: public T { /** Destructor */ - virtual ~BPHMultiSelect() {} + ~BPHMultiSelect() override {} /** Operations */ @@ -79,18 +79,18 @@ class BPHMultiSelect: public T { } /// accept function - virtual bool accept( const reco::Candidate & cand, - const BPHRecoBuilder* build ) const { return false; } - virtual bool accept( const reco::Candidate & cand ) const { return false; } - virtual bool accept( const BPHDecayMomentum& cand ) const { return false; } - virtual bool accept( const BPHDecayVertex & cand ) const { return false; } - virtual bool accept( const BPHKinematicFit & cand ) const { return false; } + bool accept( const reco::Candidate & cand, + const BPHRecoBuilder* build ) const override { return false; } + bool accept( const reco::Candidate & cand ) const override { return false; } + bool accept( const BPHDecayMomentum& cand ) const override { return false; } + bool accept( const BPHDecayVertex & cand ) const override { return false; } + bool accept( const BPHKinematicFit & cand ) const override { return false; } private: // private copy and assigment constructors - BPHMultiSelect ( const BPHMultiSelect& x ); - BPHMultiSelect& operator=( const BPHMultiSelect& x ); + BPHMultiSelect ( const BPHMultiSelect& x ) = delete; + BPHMultiSelect& operator=( const BPHMultiSelect& x ) = delete; struct SelectElement { T* selector; diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidate.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidate.h index 2f18901214d2c..958daf2a00d59 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidate.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidate.h @@ -44,20 +44,20 @@ class BPHPlusMinusCandidate: public BPHRecoCandidate, /** Destructor */ - virtual ~BPHPlusMinusCandidate(); + ~BPHPlusMinusCandidate() override; /** Operations */ /// add a simple particle giving it a name /// particles are cloned, eventually specifying a different mass /// particles can be added only up to two particles with opposite charge - virtual void add( const std::string& name, + void add( const std::string& name, const reco::Candidate* daug, - double mass = -1.0, double sigma = -1.0 ); - virtual void add( const std::string& name, + double mass = -1.0, double sigma = -1.0 ) override; + void add( const std::string& name, const reco::Candidate* daug, const std::string& searchList, - double mass = -1.0, double sigma = -1.0 ); + double mass = -1.0, double sigma = -1.0 ) override; /// look for candidates starting from particle collections as /// specified in the BPHRecoBuilder, with given names for @@ -71,7 +71,7 @@ class BPHPlusMinusCandidate: public BPHRecoCandidate, double msig = -1 ); /// get a composite by the simple sum of simple particles - virtual const pat::CompositeCandidate& composite() const; + const pat::CompositeCandidate& composite() const override; /// get cowboy/sailor classification bool isCowboy() const; @@ -80,7 +80,7 @@ class BPHPlusMinusCandidate: public BPHRecoCandidate, protected: // utility function used to cash reconstruction results - virtual void setNotUpdated() const { + void setNotUpdated() const override { BPHKinematicFit::setNotUpdated(); BPHPlusMinusVertex::setNotUpdated(); } diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusVertex.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusVertex.h index 1b3b33e259627..e7f9250ca6d6d 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusVertex.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusVertex.h @@ -41,7 +41,7 @@ class BPHPlusMinusVertex: public virtual BPHDecayVertex { /** Destructor */ - virtual ~BPHPlusMinusVertex(); + ~BPHPlusMinusVertex() override; /** Operations */ @@ -64,7 +64,7 @@ class BPHPlusMinusVertex: public virtual BPHDecayVertex { bool chkSize( const std::string& msg ) const; // utility function used to cash reconstruction results - virtual void setNotUpdated() const; + void setNotUpdated() const override; private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoBuilder.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoBuilder.h index 29044cb21f48e..4ca25b48585a6 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoBuilder.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoBuilder.h @@ -155,8 +155,8 @@ class BPHRecoBuilder { private: // private copy and assigment constructors - BPHRecoBuilder ( const BPHRecoBuilder& x ); - BPHRecoBuilder& operator=( const BPHRecoBuilder& x ); + BPHRecoBuilder ( const BPHRecoBuilder& x ) = delete; + BPHRecoBuilder& operator=( const BPHRecoBuilder& x ) = delete; // object to interface with a specific edm collection template @@ -164,9 +164,9 @@ class BPHRecoBuilder { public: BPHSpecificCollection( const T& c, const std::string& list ): BPHGenericCollection( list ), cPtr( &c ) {} - virtual ~BPHSpecificCollection() {} - virtual const reco::Candidate& get( int i ) const { return (*cPtr)[i]; } - virtual int size() const { return cPtr->size(); } + ~BPHSpecificCollection() override {} + const reco::Candidate& get( int i ) const override { return (*cPtr)[i]; } + int size() const override { return cPtr->size(); } private: const T* cPtr; }; diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h index 14b912093dace..3707e2b55762b 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h @@ -58,7 +58,7 @@ class BPHRecoCandidate: public virtual BPHKinematicFit { /** Destructor */ - virtual ~BPHRecoCandidate(); + ~BPHRecoCandidate() override; /** Operations */ @@ -109,7 +109,7 @@ void BPHRecoCandidate::fill( std::vector< int i; int n = dll.size(); cList.reserve( n ); - T* rc = 0; + T* rc = nullptr; for ( i = 0; i < n; ++i ) { // create reconstructed particle rc = new T( builder.eventSetup(), dll[i] ); diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoSelect.h index cf558314aecd2..5cc4b5eaade7a 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoSelect.h @@ -63,8 +63,8 @@ class BPHRecoSelect { private: // private copy and assigment constructors - BPHRecoSelect ( const BPHRecoSelect& x ); - BPHRecoSelect& operator=( const BPHRecoSelect& x ); + BPHRecoSelect ( const BPHRecoSelect& x ) = delete; + BPHRecoSelect& operator=( const BPHRecoSelect& x ) = delete; }; diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHTrackReference.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHTrackReference.h index 057355a59c918..1f77de7b1b0d4 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHTrackReference.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHTrackReference.h @@ -67,29 +67,29 @@ class BPHTrackReference { /// e : pat :: Electron :: pfCandidateRef () static const reco::Track* getTrack( const reco::Candidate& rc, const char* modeList = "cfhbpmnigse", - char* modeFlag = 0 ) { - if ( rc.charge() == 0 ) return 0; + char* modeFlag = nullptr ) { + if ( rc.charge() == 0 ) return nullptr; const char* mptr = modeList; char c; - if ( modeFlag == 0 ) modeFlag = &c; + if ( modeFlag == nullptr ) modeFlag = &c; char& mode = *modeFlag; - const reco::Track* tkp = 0; + const reco::Track* tkp = nullptr; while ( ( mode = *mptr++ ) ) { switch ( mode ) { - case 'c': if ( ( tkp = getFromRC( rc ) ) != 0 ) return tkp; break; - case 'f': if ( ( tkp = getFromPF( rc ) ) != 0 ) return tkp; break; - case 'h': if ( ( tkp = getFromGP( rc ) ) != 0 ) return tkp; break; - case 'b': if ( ( tkp = getFromBT( rc ) ) != 0 ) return tkp; break; - case 'p': if ( ( tkp = getFromPC( rc ) ) != 0 ) return tkp; break; - case 'm': if ( ( tkp = getMuonPF( rc ) ) != 0 ) return tkp; break; - case 'n': if ( ( tkp = getMuonBT( rc ) ) != 0 ) return tkp; break; - case 'i': if ( ( tkp = getMuonIT( rc ) ) != 0 ) return tkp; break; - case 'g': if ( ( tkp = getMuonGT( rc ) ) != 0 ) return tkp; break; - case 's': if ( ( tkp = getMuonSA( rc ) ) != 0 ) return tkp; break; - case 'e': if ( ( tkp = getElecPF( rc ) ) != 0 ) return tkp; break; + case 'c': if ( ( tkp = getFromRC( rc ) ) != nullptr ) return tkp; break; + case 'f': if ( ( tkp = getFromPF( rc ) ) != nullptr ) return tkp; break; + case 'h': if ( ( tkp = getFromGP( rc ) ) != nullptr ) return tkp; break; + case 'b': if ( ( tkp = getFromBT( rc ) ) != nullptr ) return tkp; break; + case 'p': if ( ( tkp = getFromPC( rc ) ) != nullptr ) return tkp; break; + case 'm': if ( ( tkp = getMuonPF( rc ) ) != nullptr ) return tkp; break; + case 'n': if ( ( tkp = getMuonBT( rc ) ) != nullptr ) return tkp; break; + case 'i': if ( ( tkp = getMuonIT( rc ) ) != nullptr ) return tkp; break; + case 'g': if ( ( tkp = getMuonGT( rc ) ) != nullptr ) return tkp; break; + case 's': if ( ( tkp = getMuonSA( rc ) ) != nullptr ) return tkp; break; + case 'e': if ( ( tkp = getElecPF( rc ) ) != nullptr ) return tkp; break; } } - return 0; + return nullptr; } static const reco::Track* getFromRC( const reco::Candidate& rc ) { @@ -100,33 +100,33 @@ class BPHTrackReference { } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getFromPF( const reco::Candidate& rc ) { // std::cout << "getFromPF" << std::endl; const reco::PFCandidate* pf = dynamic_cast( &rc ); - if ( pf == 0 ) return 0; + if ( pf == nullptr ) return nullptr; try { const reco::TrackRef& tkr = pf->trackRef(); if ( tkr.isNonnull() && tkr.isAvailable() ) return tkr.get(); } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getFromGP( const reco::Candidate& rc ) { // std::cout << "getFromGC" << std::endl; const pat::GenericParticle* gp = dynamic_cast( &rc ); - if ( gp == 0 ) return 0; + if ( gp == nullptr ) return nullptr; try { const reco::TrackRef& tkr = gp->track(); if ( tkr.isNonnull() && tkr.isAvailable() ) return tkr.get(); } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getFromBT( const reco::Candidate& rc ) { // std::cout << "getFromBT" << std::endl; @@ -136,25 +136,25 @@ class BPHTrackReference { } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getFromPC( const reco::Candidate& rc ) { // std::cout << "getFromPC" << std::endl; const pat::PackedCandidate* pp = dynamic_cast( &rc ); - if ( pp == 0 ) return 0; + if ( pp == nullptr ) return nullptr; try { const reco::Track* trk = &pp->pseudoTrack(); return trk; } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getMuonPF( const reco::Candidate& rc ) { // std::cout << "getMuonPF" << std::endl; const pat::Muon* mu = dynamic_cast( &rc ); - if ( mu == 0 ) return 0; + if ( mu == nullptr ) return nullptr; return getMuonPF( mu ); } static const reco::Track* getMuonPF( const pat::Muon* mu ) { @@ -167,12 +167,12 @@ class BPHTrackReference { } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getMuonBT( const reco::Candidate& rc ) { // std::cout << "getMuonBT" << std::endl; const reco::Muon* mu = dynamic_cast( &rc ); - if ( mu == 0 ) return 0; + if ( mu == nullptr ) return nullptr; return getMuonBT( mu ); } static const reco::Track* getMuonBT( const reco::Muon* mu ) { @@ -182,60 +182,60 @@ class BPHTrackReference { } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getMuonIT( const reco::Candidate& rc ) { // std::cout << "getMuonIT" << std::endl; const pat::Muon* mu = dynamic_cast( &rc ); - if ( mu == 0 ) return 0; + if ( mu == nullptr ) return nullptr; return getMuonIT( mu ); } static const reco::Track* getMuonIT( const pat::Muon* mu ) { - if ( !mu->isTrackerMuon() ) return 0; + if ( !mu->isTrackerMuon() ) return nullptr; try { const reco::TrackRef& mit = mu->innerTrack(); if ( mit.isNonnull() && mit.isAvailable() ) return mit.get(); } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getMuonGT( const reco::Candidate& rc ) { // std::cout << "getMuonGT" << std::endl; const pat::Muon* mu = dynamic_cast( &rc ); - if ( mu == 0 ) return 0; + if ( mu == nullptr ) return nullptr; return getMuonGT( mu ); } static const reco::Track* getMuonGT( const pat::Muon* mu ) { - if ( !mu->isGlobalMuon() ) return 0; + if ( !mu->isGlobalMuon() ) return nullptr; try { const reco::TrackRef& mgt = mu->globalTrack(); if ( mgt.isNonnull() && mgt.isAvailable() ) return mgt.get(); } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getMuonSA( const reco::Candidate& rc ) { // std::cout << "getMuonGT" << std::endl; const pat::Muon* mu = dynamic_cast( &rc ); - if ( mu == 0 ) return 0; + if ( mu == nullptr ) return nullptr; return getMuonSA( mu ); } static const reco::Track* getMuonSA( const pat::Muon* mu ) { - if ( !mu->isStandAloneMuon() ) return 0; + if ( !mu->isStandAloneMuon() ) return nullptr; try { const reco::TrackRef& msa = mu->standAloneMuon(); if ( msa.isNonnull() && msa.isAvailable() ) return msa.get(); } catch ( edm::Exception e ) { } - return 0; + return nullptr; } static const reco::Track* getElecPF( const reco::Candidate& rc ) { // std::cout << "getElecPF" << std::endl; const pat::Electron* el = dynamic_cast( &rc ); - if ( el == 0 ) return 0; + if ( el == nullptr ) return nullptr; return getElecPF( el ); } static const reco::Track* getElecPF( const pat::Electron* el ) { @@ -248,7 +248,7 @@ class BPHTrackReference { } catch ( edm::Exception e ) { } - return 0; + return nullptr; } private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h index 88cd0d40fa3e3..3fe9032326d86 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h @@ -48,8 +48,8 @@ class BPHVertexSelect { private: // private copy and assigment constructors - BPHVertexSelect ( const BPHVertexSelect& x ); - BPHVertexSelect& operator=( const BPHVertexSelect& x ); + BPHVertexSelect ( const BPHVertexSelect& x ) = delete; + BPHVertexSelect& operator=( const BPHVertexSelect& x ) = delete; }; diff --git a/HeavyFlavorAnalysis/RecoDecay/src/BPHDecayMomentum.cc b/HeavyFlavorAnalysis/RecoDecay/src/BPHDecayMomentum.cc index 681f8a535f383..5e5163a16f0d2 100644 --- a/HeavyFlavorAnalysis/RecoDecay/src/BPHDecayMomentum.cc +++ b/HeavyFlavorAnalysis/RecoDecay/src/BPHDecayMomentum.cc @@ -104,7 +104,7 @@ const reco::Candidate* BPHDecayMomentum::originalReco( // return null pointer if not found map::const_iterator iter = clonesMap.find( daug ); - return ( iter != clonesMap.end() ? iter->second : 0 ); + return ( iter != clonesMap.end() ? iter->second : nullptr ); } @@ -121,11 +121,11 @@ const reco::Candidate* BPHDecayMomentum::getDaug( string::size_type pos = name.find( "/" ); if ( pos != string::npos ) { const BPHRecoCandidate* comp = getComp( name.substr( 0, pos ) ).get(); - return ( comp == 0 ? 0 : comp->getDaug( name.substr( pos + 1 ) ) ); + return ( comp == nullptr ? nullptr : comp->getDaug( name.substr( pos + 1 ) ) ); } map::const_iterator iter = dMap.find( name ); - return ( iter != dMap.end() ? iter->second : 0 ); + return ( iter != dMap.end() ? iter->second : nullptr ); } @@ -135,11 +135,11 @@ BPHRecoConstCandPtr BPHDecayMomentum::getComp( const string& name ) const { string::size_type pos = name.find( "/" ); if ( pos != string::npos ) { const BPHRecoCandidate* comp = getComp( name.substr( 0, pos ) ).get(); - return ( comp == 0 ? 0 : comp->getComp( name.substr( pos + 1 ) ) ); + return ( comp == nullptr ? nullptr : comp->getComp( name.substr( pos + 1 ) ) ); } map::const_iterator iter = cMap.find( name ); - return ( iter != cMap.end() ? iter->second : 0 ); + return ( iter != cMap.end() ? iter->second : nullptr ); } diff --git a/HeavyFlavorAnalysis/RecoDecay/src/BPHDecayVertex.cc b/HeavyFlavorAnalysis/RecoDecay/src/BPHDecayVertex.cc index 328c4d79e92a2..b12792c3a985c 100644 --- a/HeavyFlavorAnalysis/RecoDecay/src/BPHDecayVertex.cc +++ b/HeavyFlavorAnalysis/RecoDecay/src/BPHDecayVertex.cc @@ -118,7 +118,7 @@ const reco::Track* BPHDecayVertex::getTrack( const reco::Track*>::const_iterator iter = tkMap.find( cand ); map::const_iterator iend = tkMap.end(); - return ( iter != iend ? iter->second : 0 ); + return ( iter != iend ? iter->second : nullptr ); } @@ -135,7 +135,7 @@ reco::TransientTrack* BPHDecayVertex::getTransientTrack( reco::TransientTrack*>::const_iterator iter = ttMap.find( cand ); map::const_iterator iend = ttMap.end(); - return ( iter != iend ? iter->second : 0 ); + return ( iter != iend ? iter->second : nullptr ); } @@ -190,8 +190,8 @@ void BPHDecayVertex::tTracks() const { validTks = true; while ( n-- ) { const reco::Candidate* rp = dL[n]; - tkMap[rp] = 0; - ttMap[rp] = 0; + tkMap[rp] = nullptr; + ttMap[rp] = nullptr; if ( !rp->charge() ) continue; const reco::Track* tp; const char* searchList = "cfhp"; @@ -199,7 +199,7 @@ void BPHDecayVertex::tTracks() const { searchMap.find( rp ); if ( iter != searchMap.end() ) searchList = iter->second.c_str(); tp = BPHTrackReference::getTrack( *rp, searchList ); - if ( tp == 0 ) { + if ( tp == nullptr ) { edm::LogPrint( "DataNotFound" ) << "BPHDecayVertex::tTracks: " << "no track for reco::(PF)Candidate"; diff --git a/HeavyFlavorAnalysis/RecoDecay/src/BPHKinematicFit.cc b/HeavyFlavorAnalysis/RecoDecay/src/BPHKinematicFit.cc index ed4a152a3507e..778206922b531 100644 --- a/HeavyFlavorAnalysis/RecoDecay/src/BPHKinematicFit.cc +++ b/HeavyFlavorAnalysis/RecoDecay/src/BPHKinematicFit.cc @@ -41,24 +41,24 @@ using namespace std; // Constructors -- //---------------- BPHKinematicFit::BPHKinematicFit(): - BPHDecayVertex( 0 ), + BPHDecayVertex( nullptr ), massConst( -1.0 ), massSigma( -1.0 ), oldKPs( true ), oldFit( true ), oldMom( true ), - kinTree( 0 ) { + kinTree( nullptr ) { } BPHKinematicFit::BPHKinematicFit( const BPHKinematicFit* ptr ): - BPHDecayVertex( ptr, 0 ), + BPHDecayVertex( ptr, nullptr ), massConst( -1.0 ), massSigma( -1.0 ), oldKPs( true ), oldFit( true ), oldMom( true ), - kinTree( 0 ) { + kinTree( nullptr ) { map iMap; const vector& daug = daughters(); const vector& list = ptr->componentList(); @@ -179,7 +179,7 @@ const RefCountedKinematicTree& BPHKinematicFit::kinematicTree( const string& name, double mass ) const { if ( mass < 0 ) { - kinTree = RefCountedKinematicTree( 0 ); + kinTree = RefCountedKinematicTree( nullptr ); oldFit = false; return kinTree; } @@ -199,7 +199,7 @@ const RefCountedKinematicTree& BPHKinematicFit::kinematicTree( const RefCountedKinematicTree& BPHKinematicFit::kinematicTree( const string& name, KinematicConstraint* kc ) const { - kinTree = RefCountedKinematicTree( 0 ); + kinTree = RefCountedKinematicTree( nullptr ); oldFit = false; kinParticles(); if ( allParticles.size() != daughFull().size() ) return kinTree; @@ -207,7 +207,7 @@ const RefCountedKinematicTree& BPHKinematicFit::kinematicTree( vector kTail; if ( name != "" ) { const BPHRecoCandidate* comp = getComp( name ).get(); - if ( comp == 0 ) { + if ( comp == nullptr ) { edm::LogPrint( "ParticleNotFound" ) << "BPHKinematicFit::kinematicTree: " << name << " daughter not found"; @@ -237,7 +237,7 @@ const RefCountedKinematicTree& BPHKinematicFit::kinematicTree( compTree = kinFitter.fit( kc, compTree ); if ( compTree->isEmpty() ) return kinTree; compTree->movePointerToTheTop(); - if ( kTail.size() ) { + if ( !kTail.empty() ) { RefCountedKinematicParticle compPart = compTree->currentParticle(); if ( !compPart->currentState().isValid() ) return kinTree; kTail.push_back( compPart ); @@ -251,7 +251,7 @@ const RefCountedKinematicTree& BPHKinematicFit::kinematicTree( edm::LogPrint( "FitFailed" ) << "BPHKinematicFit::kinematicTree: " << "kin fit reset"; - kinTree = RefCountedKinematicTree( 0 ); + kinTree = RefCountedKinematicTree( nullptr ); } return kinTree; } @@ -260,14 +260,14 @@ const RefCountedKinematicTree& BPHKinematicFit::kinematicTree( const RefCountedKinematicTree& BPHKinematicFit::kinematicTree( const string& name, MultiTrackKinematicConstraint* kc ) const { - kinTree = RefCountedKinematicTree( 0 ); + kinTree = RefCountedKinematicTree( nullptr ); oldFit = false; kinParticles(); if ( allParticles.size() != daughFull().size() ) return kinTree; vector nfull; if ( name != "" ) { const BPHRecoCandidate* comp = getComp( name ).get(); - if ( comp == 0 ) { + if ( comp == nullptr ) { edm::LogPrint( "ParticleNotFound" ) << "BPHKinematicFit::kinematicTree: " << name << " daughter not found"; @@ -290,7 +290,7 @@ const RefCountedKinematicTree& BPHKinematicFit::kinematicTree( edm::LogPrint( "FitFailed" ) << "BPHKinematicFit::kinematicTree: " << "kin fit reset"; - kinTree = RefCountedKinematicTree( 0 ); + kinTree = RefCountedKinematicTree( nullptr ); } return kinTree; } @@ -304,33 +304,33 @@ void BPHKinematicFit::resetKinematicFit() const { bool BPHKinematicFit::isEmpty() const { kinematicTree(); - if ( kinTree.get() == 0 ) return true; + if ( kinTree.get() == nullptr ) return true; return kinTree->isEmpty(); } bool BPHKinematicFit::isValidFit() const { const RefCountedKinematicParticle kPart = currentParticle(); - if ( kPart.get() == 0 ) return false; + if ( kPart.get() == nullptr ) return false; return kPart->currentState().isValid(); } const RefCountedKinematicParticle BPHKinematicFit::currentParticle() const { - if ( isEmpty() ) return RefCountedKinematicParticle( 0 ); + if ( isEmpty() ) return RefCountedKinematicParticle( nullptr ); return kinTree->currentParticle(); } const RefCountedKinematicVertex BPHKinematicFit::currentDecayVertex() const { - if ( isEmpty() ) return RefCountedKinematicVertex( 0 ); + if ( isEmpty() ) return RefCountedKinematicVertex( nullptr ); return kinTree->currentDecayVertex(); } ParticleMass BPHKinematicFit::mass() const { const RefCountedKinematicParticle kPart = currentParticle(); - if ( kPart.get() == 0 ) return -1.0; + if ( kPart.get() == nullptr ) return -1.0; const KinematicState kStat = kPart->currentState(); if ( kStat.isValid() ) return kStat.mass(); return -1.0; @@ -392,7 +392,7 @@ void BPHKinematicFit::buildParticles() const { float sigma = dMSig.find( cand )->second; if ( sigma < 0 ) sigma = 1.0e-7; reco::TransientTrack* tt = getTransientTrack( cand ); - if ( tt != 0 ) allParticles.push_back( kinMap[cand] = + if ( tt != nullptr ) allParticles.push_back( kinMap[cand] = pFactory.particle( *tt, mass, chi, ndf, sigma ) ); } diff --git a/HeavyFlavorAnalysis/RecoDecay/src/BPHPlusMinusCandidate.cc b/HeavyFlavorAnalysis/RecoDecay/src/BPHPlusMinusCandidate.cc index 52a2478c62118..346fd535b0e2f 100644 --- a/HeavyFlavorAnalysis/RecoDecay/src/BPHPlusMinusCandidate.cc +++ b/HeavyFlavorAnalysis/RecoDecay/src/BPHPlusMinusCandidate.cc @@ -25,7 +25,7 @@ // C++ Headers -- //--------------- #include -#include +#include using namespace std; @@ -104,8 +104,8 @@ vector BPHPlusMinusCandidate::build( class ChargeSelect: public BPHRecoSelect { public: ChargeSelect( int c ): charge ( c ) {} - ~ChargeSelect() {} - virtual bool accept( const reco::Candidate& cand ) const { + ~ChargeSelect() override {} + bool accept( const reco::Candidate& cand ) const override { return ( ( charge * cand.charge() ) > 0 ); } private: diff --git a/HeavyFlavorAnalysis/RecoDecay/src/BPHPlusMinusVertex.cc b/HeavyFlavorAnalysis/RecoDecay/src/BPHPlusMinusVertex.cc index c7689085f2513..b05b7f260b118 100644 --- a/HeavyFlavorAnalysis/RecoDecay/src/BPHPlusMinusVertex.cc +++ b/HeavyFlavorAnalysis/RecoDecay/src/BPHPlusMinusVertex.cc @@ -33,7 +33,7 @@ using namespace std; BPHPlusMinusVertex::BPHPlusMinusVertex( const edm::EventSetup* es ): BPHDecayVertex( es ), oldA( true ), - inRPhi( 0 ) { + inRPhi( nullptr ) { } //-------------- @@ -48,7 +48,7 @@ BPHPlusMinusVertex::~BPHPlusMinusVertex() { //-------------- const ClosestApproachInRPhi& BPHPlusMinusVertex::cAppInRPhi() const { if ( oldA ) computeApp(); - if ( inRPhi == 0 ) { + if ( inRPhi == nullptr ) { static const ClosestApproachInRPhi ca; return ca; } @@ -73,7 +73,7 @@ void BPHPlusMinusVertex::computeApp() const { "BPHPlusMinusVertex::computeApp: incomplete, no closest approach available"; delete inRPhi; if ( !chkSize( msg ) ) { - inRPhi = 0; + inRPhi = nullptr; return; } inRPhi = new ClosestApproachInRPhi; diff --git a/HeavyFlavorAnalysis/RecoDecay/src/BPHRecoBuilder.cc b/HeavyFlavorAnalysis/RecoDecay/src/BPHRecoBuilder.cc index de03695589575..2eddfd51ceaa1 100644 --- a/HeavyFlavorAnalysis/RecoDecay/src/BPHRecoBuilder.cc +++ b/HeavyFlavorAnalysis/RecoDecay/src/BPHRecoBuilder.cc @@ -57,7 +57,7 @@ BPHRecoBuilder::~BPHRecoBuilder() { int m = srCompList.size(); while ( m-- ) delete srCompList[m]; - while ( compCollectList.size() ) { + while ( !compCollectList.empty() ) { const vector* cCollection = *compCollectList.begin(); delete cCollection; compCollectList.erase( cCollection ); @@ -192,10 +192,10 @@ bool BPHRecoBuilder::sameTrack( const reco::Candidate* lCand, const reco::Track* rrcTrack = BPHTrackReference::getFromRC( *rCand ); const reco::Track* lpfTrack = BPHTrackReference::getFromPF( *lCand ); const reco::Track* rpfTrack = BPHTrackReference::getFromPF( *rCand ); - if ( ( lrcTrack != 0 ) && + if ( ( lrcTrack != nullptr ) && ( ( lrcTrack == rrcTrack ) || ( lrcTrack == rpfTrack ) ) ) return true; - if ( ( lpfTrack != 0 ) && + if ( ( lpfTrack != nullptr ) && ( ( lpfTrack == rrcTrack ) || ( lpfTrack == rpfTrack ) ) ) return true; reco::Candidate::Vector pDiff = ( lCand->momentum() - diff --git a/HeavyFlavorAnalysis/RecoDecay/src/BPHRecoSelect.cc b/HeavyFlavorAnalysis/RecoDecay/src/BPHRecoSelect.cc index 3c081ab446398..7a1c38549d0ec 100644 --- a/HeavyFlavorAnalysis/RecoDecay/src/BPHRecoSelect.cc +++ b/HeavyFlavorAnalysis/RecoDecay/src/BPHRecoSelect.cc @@ -55,9 +55,9 @@ bool BPHRecoSelect::accept( const reco::Candidate& cand, const reco::Candidate* BPHRecoSelect::get( const string& name, const BPHRecoBuilder* build ) const { - if ( build == 0 ) return 0; + if ( build == nullptr ) return nullptr; map& cMap = build->daugMap; map::iterator iter = cMap.find( name ); - return ( iter != cMap.end() ? iter->second : 0 ); + return ( iter != cMap.end() ? iter->second : nullptr ); } diff --git a/HeavyFlavorAnalysis/Skimming/plugins/Tau3MuSkim.h b/HeavyFlavorAnalysis/Skimming/plugins/Tau3MuSkim.h index 14fa341b8ec78..ab7ce16406f37 100644 --- a/HeavyFlavorAnalysis/Skimming/plugins/Tau3MuSkim.h +++ b/HeavyFlavorAnalysis/Skimming/plugins/Tau3MuSkim.h @@ -22,12 +22,12 @@ class Tau3MuSkim : public edm::EDFilter { public: explicit Tau3MuSkim(const edm::ParameterSet&); - ~Tau3MuSkim(); + ~Tau3MuSkim() override; private: - virtual void beginJob() ; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- Tau3MuReco* m_Tau3MuReco; diff --git a/HeavyFlavorAnalysis/Skimming/src/Combinatorics.cc b/HeavyFlavorAnalysis/Skimming/src/Combinatorics.cc index 7e8194155398a..6d5dbaa0adc6b 100644 --- a/HeavyFlavorAnalysis/Skimming/src/Combinatorics.cc +++ b/HeavyFlavorAnalysis/Skimming/src/Combinatorics.cc @@ -188,7 +188,7 @@ Bool_t Combinatorics::next_subset(int n, int k, int *subset) // ************************************************************************** vector < vector > Combinatorics::GetCombinations() { - if (m_Permutations.size() == 0) + if (m_Permutations.empty()) { LogDebug("Combinatorics") << "Nothing to do." << endl; return m_Combinations; @@ -241,7 +241,7 @@ vector < vector > Combinatorics::GetCombinations_2_2() // combination vector returned vector< vector > FinalCombinations; - if (m_Permutations.size() == 0) + if (m_Permutations.empty()) { LogDebug("Combinatorics") << "[Combinatorics::GetCombinations_2_2] Nothing to do." << endl; return FinalCombinations; @@ -272,7 +272,7 @@ vector < vector > Combinatorics::GetCombinations_2_0() // combination vector returned vector< vector > FinalCombinations; - if (m_Permutations.size() == 0) + if (m_Permutations.empty()) { LogDebug("Combinatorics") << "[Combinatorics::GetCombinations_2_0] Nothing to do." << endl; return FinalCombinations; @@ -422,7 +422,7 @@ vector < vector > Combinatorics::GetCombinations_N_1() // combination vector returned vector < vector > FinalCombinations; - if (m_Combinations.size() == 0) + if (m_Combinations.empty()) { LogDebug("Combinatorics") << "[Combinatorics::GetCombinationsThreeByOne] Nothing to do." << endl; return FinalCombinations; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBdToJPsiKxBuilder.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBdToJPsiKxBuilder.h index 443e4369ef648..1a3efcbdef508 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBdToJPsiKxBuilder.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBdToJPsiKxBuilder.h @@ -83,8 +83,8 @@ class BPHBdToJPsiKxBuilder { private: // private copy and assigment constructors - BPHBdToJPsiKxBuilder ( const BPHBdToJPsiKxBuilder& x ); - BPHBdToJPsiKxBuilder& operator=( const BPHBdToJPsiKxBuilder& x ); + BPHBdToJPsiKxBuilder ( const BPHBdToJPsiKxBuilder& x ) = delete; + BPHBdToJPsiKxBuilder& operator=( const BPHBdToJPsiKxBuilder& x ) = delete; std::string jPsiName; std::string kx0Name; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBsToJPsiPhiBuilder.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBsToJPsiPhiBuilder.h index ab153f718f490..eef7ecc28bfc2 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBsToJPsiPhiBuilder.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBsToJPsiPhiBuilder.h @@ -83,8 +83,8 @@ class BPHBsToJPsiPhiBuilder { private: // private copy and assigment constructors - BPHBsToJPsiPhiBuilder ( const BPHBsToJPsiPhiBuilder& x ); - BPHBsToJPsiPhiBuilder& operator=( const BPHBsToJPsiPhiBuilder& x ); + BPHBsToJPsiPhiBuilder ( const BPHBsToJPsiPhiBuilder& x ) = delete; + BPHBsToJPsiPhiBuilder& operator=( const BPHBsToJPsiPhiBuilder& x ) = delete; std::string jPsiName; std::string phiName; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBuToJPsiKBuilder.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBuToJPsiKBuilder.h index 495df168081d4..400cd09cb1f04 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBuToJPsiKBuilder.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHBuToJPsiKBuilder.h @@ -86,8 +86,8 @@ class BPHBuToJPsiKBuilder { private: // private copy and assigment constructors - BPHBuToJPsiKBuilder ( const BPHBuToJPsiKBuilder& x ); - BPHBuToJPsiKBuilder& operator=( const BPHBuToJPsiKBuilder& x ); + BPHBuToJPsiKBuilder ( const BPHBuToJPsiKBuilder& x ) = delete; + BPHBuToJPsiKBuilder& operator=( const BPHBuToJPsiKBuilder& x ) = delete; std::string jPsiName; std::string kaonName; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHChi2Select.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHChi2Select.h index bf6b32234d360..1ec05b881ab2f 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHChi2Select.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHChi2Select.h @@ -39,12 +39,12 @@ class BPHChi2Select: public BPHVertexSelect { /** Destructor */ - virtual ~BPHChi2Select() {} + ~BPHChi2Select() override {} /** Operations */ /// select vertex - virtual bool accept( const BPHDecayVertex& cand ) const { + bool accept( const BPHDecayVertex& cand ) const override { const reco::Vertex& v = cand.vertex(); if ( v.isFake() ) return false; if ( !v.isValid() ) return false; @@ -60,8 +60,8 @@ class BPHChi2Select: public BPHVertexSelect { private: // private copy and assigment constructors - BPHChi2Select ( const BPHChi2Select& x ); - BPHChi2Select& operator=( const BPHChi2Select& x ); + BPHChi2Select ( const BPHChi2Select& x ) = delete; + BPHChi2Select& operator=( const BPHChi2Select& x ) = delete; double probMin; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHKx0ToKPiBuilder.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHKx0ToKPiBuilder.h index 14e81568c5943..5ae30ff4db2fc 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHKx0ToKPiBuilder.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHKx0ToKPiBuilder.h @@ -77,8 +77,8 @@ class BPHKx0ToKPiBuilder { private: // private copy and assigment constructors - BPHKx0ToKPiBuilder ( const BPHKx0ToKPiBuilder& x ); - BPHKx0ToKPiBuilder& operator=( const BPHKx0ToKPiBuilder& x ); + BPHKx0ToKPiBuilder ( const BPHKx0ToKPiBuilder& x ) = delete; + BPHKx0ToKPiBuilder& operator=( const BPHKx0ToKPiBuilder& x ) = delete; std::string kaonName; std::string pionName; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassFitSelect.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassFitSelect.h index 43c2c2fcf9720..df2e74526f67c 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassFitSelect.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassFitSelect.h @@ -58,13 +58,13 @@ class BPHMassFitSelect: public BPHFitSelect, public BPHMassCuts { /** Destructor */ - virtual ~BPHMassFitSelect() { + ~BPHMassFitSelect() override { } /** Operations */ /// select particle - virtual bool accept( const BPHKinematicFit& cand ) const { + bool accept( const BPHKinematicFit& cand ) const override { switch ( type ) { default: case none: break; @@ -83,24 +83,24 @@ class BPHMassFitSelect: public BPHFitSelect, public BPHMassCuts { cName = "" ; cMass = -1.0; cSigma = -1.0; - kc = 0 ; - mtkc = 0 ; + kc = nullptr ; + mtkc = nullptr ; } void setFitConstraint( const std::string& name, double mass ) { type = mcst; cName = name ; cMass = mass ; cSigma = -1.0 ; - kc = 0 ; - mtkc = 0 ; + kc = nullptr ; + mtkc = nullptr ; } void setFitConstraint( const std::string& name, double mass, double sigma ) { type = mcss; cName = name ; cMass = mass ; cSigma = sigma; - kc = 0 ; - mtkc = 0 ; + kc = nullptr ; + mtkc = nullptr ; } void setFitConstraint( const std::string& name, KinematicConstraint* c ) { type = kf; @@ -108,7 +108,7 @@ class BPHMassFitSelect: public BPHFitSelect, public BPHMassCuts { cMass = -1.0 ; cSigma = -1.0 ; kc = c ; - mtkc = 0 ; + mtkc = nullptr ; } void setFitConstraint( const std::string& name, MultiTrackKinematicConstraint* c ) { @@ -116,7 +116,7 @@ class BPHMassFitSelect: public BPHFitSelect, public BPHMassCuts { cName = name ; cMass = -1.0 ; cSigma = -1.0 ; - kc = 0 ; + kc = nullptr ; mtkc = c ; } @@ -130,8 +130,8 @@ class BPHMassFitSelect: public BPHFitSelect, public BPHMassCuts { private: // private copy and assigment constructors - BPHMassFitSelect ( const BPHMassFitSelect& x ); - BPHMassFitSelect& operator=( const BPHMassFitSelect& x ); + BPHMassFitSelect ( const BPHMassFitSelect& x ) = delete; + BPHMassFitSelect& operator=( const BPHMassFitSelect& x ) = delete; enum fit_type { none, mcss, mcst, kf, mtkf }; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassSelect.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassSelect.h index 613e52e04f75f..e4ef4d9d7fee2 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassSelect.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassSelect.h @@ -40,12 +40,12 @@ class BPHMassSelect: public BPHMomentumSelect, public BPHMassCuts { /** Destructor */ - virtual ~BPHMassSelect() {} + ~BPHMassSelect() override {} /** Operations */ /// select particle - virtual bool accept( const BPHDecayMomentum& cand ) const { + bool accept( const BPHDecayMomentum& cand ) const override { double mass = cand.composite().mass(); return ( ( mass > mMin ) && ( mass < mMax ) ); } @@ -53,8 +53,8 @@ class BPHMassSelect: public BPHMomentumSelect, public BPHMassCuts { private: // private copy and assigment constructors - BPHMassSelect ( const BPHMassSelect& x ); - BPHMassSelect& operator=( const BPHMassSelect& x ); + BPHMassSelect ( const BPHMassSelect& x ) = delete; + BPHMassSelect& operator=( const BPHMassSelect& x ) = delete; }; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassSymSelect.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassSymSelect.h index 365dd49c31b1b..760d34d178539 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassSymSelect.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassSymSelect.h @@ -42,12 +42,12 @@ class BPHMassSymSelect: public BPHMomentumSelect { /** Destructor */ - virtual ~BPHMassSymSelect() {} + ~BPHMassSymSelect() override {} /** Operations */ /// select particle - virtual bool accept( const BPHDecayMomentum& cand ) const { + bool accept( const BPHDecayMomentum& cand ) const override { if ( mSel->accept( cand ) ) return true; @@ -74,8 +74,8 @@ class BPHMassSymSelect: public BPHMomentumSelect { private: // private copy and assigment constructors - BPHMassSymSelect ( const BPHMassSymSelect& x ); - BPHMassSymSelect& operator=( const BPHMassSymSelect& x ); + BPHMassSymSelect ( const BPHMassSymSelect& x ) = delete; + BPHMassSymSelect& operator=( const BPHMassSymSelect& x ) = delete; std::string nPos; std::string nNeg; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMuonEtaSelect.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMuonEtaSelect.h index fb939f456978f..7447d4bcf95cc 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMuonEtaSelect.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMuonEtaSelect.h @@ -38,21 +38,21 @@ class BPHMuonEtaSelect: public BPHParticleEtaSelect { /** Destructor */ - virtual ~BPHMuonEtaSelect() {} + ~BPHMuonEtaSelect() override {} /** Operations */ /// select muon - virtual bool accept( const reco::Candidate& cand ) const { - if ( dynamic_cast( &cand ) == 0 ) return false; + bool accept( const reco::Candidate& cand ) const override { + if ( dynamic_cast( &cand ) == nullptr ) return false; return BPHParticleEtaSelect::accept( cand ); } private: // private copy and assigment constructors - BPHMuonEtaSelect ( const BPHMuonEtaSelect& x ); - BPHMuonEtaSelect& operator=( const BPHMuonEtaSelect& x ); + BPHMuonEtaSelect ( const BPHMuonEtaSelect& x ) = delete; + BPHMuonEtaSelect& operator=( const BPHMuonEtaSelect& x ) = delete; }; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMuonPtSelect.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMuonPtSelect.h index 338cb1ab363a3..c27e8665f7489 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMuonPtSelect.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHMuonPtSelect.h @@ -38,21 +38,21 @@ class BPHMuonPtSelect: public BPHParticlePtSelect { /** Destructor */ - virtual ~BPHMuonPtSelect() {} + ~BPHMuonPtSelect() override {} /** Operations */ /// select muon - virtual bool accept( const reco::Candidate& cand ) const { - if ( dynamic_cast( &cand ) == 0 ) return false; + bool accept( const reco::Candidate& cand ) const override { + if ( dynamic_cast( &cand ) == nullptr ) return false; return BPHParticlePtSelect::accept( cand ); } private: // private copy and assigment constructors - BPHMuonPtSelect ( const BPHMuonPtSelect& x ); - BPHMuonPtSelect& operator=( const BPHMuonPtSelect& x ); + BPHMuonPtSelect ( const BPHMuonPtSelect& x ) = delete; + BPHMuonPtSelect& operator=( const BPHMuonPtSelect& x ) = delete; }; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHOniaToMuMuBuilder.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHOniaToMuMuBuilder.h index 05591030f61ac..dd038a4b312de 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHOniaToMuMuBuilder.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHOniaToMuMuBuilder.h @@ -67,10 +67,10 @@ class BPHOniaToMuMuBuilder { /// extract list of candidates of specific type /// candidates are rebuilt applying corresponding mass constraint std::vector getList( oniaType type, - BPHRecoSelect * dSel = 0, - BPHMomentumSelect* mSel = 0, - BPHVertexSelect * vSel = 0, - BPHFitSelect * kSel = 0 ); + BPHRecoSelect * dSel = nullptr, + BPHMomentumSelect* mSel = nullptr, + BPHVertexSelect * vSel = nullptr, + BPHFitSelect * kSel = nullptr ); /// retrieve original candidate from a copy with the same daughters /// obtained through "getList" @@ -97,8 +97,8 @@ class BPHOniaToMuMuBuilder { private: // private copy and assigment constructors - BPHOniaToMuMuBuilder ( const BPHOniaToMuMuBuilder& x ); - BPHOniaToMuMuBuilder& operator=( const BPHOniaToMuMuBuilder& x ); + BPHOniaToMuMuBuilder ( const BPHOniaToMuMuBuilder& x ) = delete; + BPHOniaToMuMuBuilder& operator=( const BPHOniaToMuMuBuilder& x ) = delete; std::string muPosName; std::string muNegName; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleEtaSelect.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleEtaSelect.h index 029d16d9ba6e8..8b8eefcb87200 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleEtaSelect.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleEtaSelect.h @@ -38,12 +38,12 @@ class BPHParticleEtaSelect: public BPHRecoSelect { /** Destructor */ - virtual ~BPHParticleEtaSelect() {} + ~BPHParticleEtaSelect() override {} /** Operations */ /// select particle - virtual bool accept( const reco::Candidate& cand ) const { + bool accept( const reco::Candidate& cand ) const override { return ( fabs( cand.p4().eta() ) < etaMax ); } @@ -56,8 +56,8 @@ class BPHParticleEtaSelect: public BPHRecoSelect { private: // private copy and assigment constructors - BPHParticleEtaSelect ( const BPHParticleEtaSelect& x ); - BPHParticleEtaSelect& operator=( const BPHParticleEtaSelect& x ); + BPHParticleEtaSelect ( const BPHParticleEtaSelect& x ) = delete; + BPHParticleEtaSelect& operator=( const BPHParticleEtaSelect& x ) = delete; double etaMax; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleNeutralVeto.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleNeutralVeto.h index d81d54a21f581..db03e8ea8f7e4 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleNeutralVeto.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleNeutralVeto.h @@ -38,20 +38,20 @@ class BPHParticleNeutralVeto: public BPHRecoSelect { /** Destructor */ - virtual ~BPHParticleNeutralVeto() {} + ~BPHParticleNeutralVeto() override {} /** Operations */ /// select charged particles - virtual bool accept( const reco::Candidate& cand ) const { + bool accept( const reco::Candidate& cand ) const override { return ( cand.charge() != 0 ); } private: // private copy and assigment constructors - BPHParticleNeutralVeto ( const BPHParticleNeutralVeto& x ); - BPHParticleNeutralVeto& operator=( const BPHParticleNeutralVeto& x ); + BPHParticleNeutralVeto ( const BPHParticleNeutralVeto& x ) = delete; + BPHParticleNeutralVeto& operator=( const BPHParticleNeutralVeto& x ) = delete; }; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticlePtSelect.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticlePtSelect.h index 3666a9131c910..ad1fd0098588e 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticlePtSelect.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticlePtSelect.h @@ -38,12 +38,12 @@ class BPHParticlePtSelect: public BPHRecoSelect { /** Destructor */ - virtual ~BPHParticlePtSelect() {} + ~BPHParticlePtSelect() override {} /** Operations */ /// select particle - virtual bool accept( const reco::Candidate& cand ) const { + bool accept( const reco::Candidate& cand ) const override { return ( cand.p4().pt() > ptMin ); } @@ -56,8 +56,8 @@ class BPHParticlePtSelect: public BPHRecoSelect { private: // private copy and assigment constructors - BPHParticlePtSelect ( const BPHParticlePtSelect& x ); - BPHParticlePtSelect& operator=( const BPHParticlePtSelect& x ); + BPHParticlePtSelect ( const BPHParticlePtSelect& x ) = delete; + BPHParticlePtSelect& operator=( const BPHParticlePtSelect& x ) = delete; double ptMin; diff --git a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHPhiToKKBuilder.h b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHPhiToKKBuilder.h index 91e4174f9ac29..cd78400a65543 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/interface/BPHPhiToKKBuilder.h +++ b/HeavyFlavorAnalysis/SpecificDecay/interface/BPHPhiToKKBuilder.h @@ -77,8 +77,8 @@ class BPHPhiToKKBuilder { private: // private copy and assigment constructors - BPHPhiToKKBuilder ( const BPHPhiToKKBuilder& x ); - BPHPhiToKKBuilder& operator=( const BPHPhiToKKBuilder& x ); + BPHPhiToKKBuilder ( const BPHPhiToKKBuilder& x ) = delete; + BPHPhiToKKBuilder& operator=( const BPHPhiToKKBuilder& x ) = delete; std::string kPosName; std::string kNegName; diff --git a/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHHistoSpecificDecay.cc b/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHHistoSpecificDecay.cc index c7ad11a8ca334..7c92f72080f76 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHHistoSpecificDecay.cc +++ b/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHHistoSpecificDecay.cc @@ -26,7 +26,7 @@ #include #include #include -#include +#include using namespace std; @@ -41,7 +41,7 @@ class BPHUserData { static const T* get( const pat::CompositeCandidate& cand, const string& name ) { if ( cand.hasUserData( name ) ) return cand.userData( name ); - return 0; + return nullptr; } template static const T* getByRef( const pat::CompositeCandidate& cand, @@ -49,11 +49,11 @@ class BPHUserData { if ( cand.hasUserData( name ) ) { typedef edm::Ref< std::vector > objRef; const objRef* ref = cand.userData( name ); - if ( ref == 0 ) return 0; - if ( ref->isNull() ) return 0; + if ( ref == nullptr ) return nullptr; + if ( ref->isNull() ) return nullptr; return ref->get(); } - return 0; + return nullptr; } }; @@ -93,7 +93,7 @@ class BPHSoftMuonSelect { bool accept( const reco::Candidate& cand, const reco::Vertex* pv ) const { const pat::Muon* p = reinterpret_cast( &cand ); - if ( p == 0 ) return false; + if ( p == nullptr ) return false; if ( gM && !muon::isGoodMuon( *p, muon::TMOneStationTight ) ) return false; if ( p->innerTrack()->hitPattern().trackerLayersWithMeasurement() <= cutTL ) @@ -103,7 +103,7 @@ class BPHSoftMuonSelect { if ( hP && !p->innerTrack()->quality( reco::TrackBase::highPurity ) ) return false; - if ( pv == 0 ) return true; + if ( pv == nullptr ) return true; const reco::Vertex::Point& pos = pv->position(); if ( fabs( p->innerTrack()->dxy( pos ) ) >= maxXY ) return false; @@ -129,18 +129,18 @@ class BPHDaughterSelect: public BPHHistoSpecificDecay::CandidateSelect { float etaMaxLoose, float etaMaxTight, const BPHSoftMuonSelect* - softMuonselector = 0 ): pLMin( ptMinLoose ), + softMuonselector = nullptr ): pLMin( ptMinLoose ), pTMin( ptMinTight ), eLMax( etaMaxLoose ), eTMax( etaMaxTight ), sms( softMuonselector ) { } bool accept( const pat::CompositeCandidate& cand, - const reco::Vertex* pv = 0 ) const { + const reco::Vertex* pv = nullptr ) const override { const reco::Candidate* dptr0 = cand.daughter( 0 ); const reco::Candidate* dptr1 = cand.daughter( 1 ); - if ( dptr0 == 0 ) return false; - if ( dptr1 == 0 ) return false; + if ( dptr0 == nullptr ) return false; + if ( dptr1 == nullptr ) return false; float pt0 = dptr0->pt(); float pt1 = dptr1->pt(); if ( ( pt0 < pLMin ) || ( pt1 < pLMin ) ) return false; @@ -151,10 +151,10 @@ class BPHDaughterSelect: public BPHHistoSpecificDecay::CandidateSelect { ( ( eta0 > eLMax ) || ( eta1 > eLMax ) ) ) return false; if ( ( eTMax > 0 ) && ( ( eta0 > eTMax ) && ( eta1 > eTMax ) ) ) return false; - if ( sms != 0 ) { + if ( sms != nullptr ) { const reco::Vertex* pvtx = BPHUserData::getByRef ( cand, "primaryVertex" ); - if ( pvtx == 0 ) return false; + if ( pvtx == nullptr ) return false; if ( !sms->accept( *dptr0, pvtx ) ) return false; if ( !sms->accept( *dptr1, pvtx ) ) return false; } @@ -182,7 +182,7 @@ class BPHCompositeBasicSelect: public BPHHistoSpecificDecay::CandidateSelect { yMax( rapidityMax ) { } bool accept( const pat::CompositeCandidate& cand, - const reco::Vertex* pv = 0 ) const { + const reco::Vertex* pv = nullptr ) const override { if ( ( ( mMin > 0 ) && ( mMax < 0 ) ) || ( ( mMin < 0 ) && ( mMax > 0 ) ) || ( ( mMin > 0 ) && ( mMax > 0 ) && ( mMin < mMax ) ) ) { @@ -221,7 +221,7 @@ class BPHFittedBasicSelect: public BPHHistoSpecificDecay::CandidateSelect { rMax( rapidityMax ) { } bool accept( const pat::CompositeCandidate& cand, - const reco::Vertex* pv = 0 ) const { + const reco::Vertex* pv = nullptr ) const override { if ( !cand.hasUserFloat( "fitMass" ) ) return false; float mass = cand.userFloat( "fitMass" ); if ( ( ( mMin > 0 ) && ( mMax < 0 ) ) || @@ -233,7 +233,7 @@ class BPHFittedBasicSelect: public BPHHistoSpecificDecay::CandidateSelect { } const Vector3DBase* fmom = BPHUserData::get < Vector3DBase >( cand, "fitMomentum" ); - if ( fmom == 0 ) return false; + if ( fmom == nullptr ) return false; if ( pMin > 0 ) { if ( fmom->transverse() < pMin ) return false; } @@ -269,11 +269,11 @@ class BPHCompositeVertexSelect: public BPHHistoSpecificDecay::CandidateSelect { sMin( sigMin ) { } bool accept( const pat::CompositeCandidate& cand, - const reco::Vertex* pvtx = 0 ) const { + const reco::Vertex* pvtx = nullptr ) const override { const reco::Vertex* svtx = BPHUserData::get ( cand, "vertex" ); - if ( svtx == 0 ) return false; - if ( pvtx == 0 ) return false; + if ( svtx == nullptr ) return false; + if ( pvtx == nullptr ) return false; if ( pMin > 0 ) { if ( ChiSquaredProbability( svtx->chi2(), svtx->ndof() ) < pMin ) return false; @@ -317,10 +317,10 @@ class BPHFittedVertexSelect: public BPHHistoSpecificDecay::CandidateSelect { sMin( sigMin ) { } bool accept( const pat::CompositeCandidate& cand, - const reco::Vertex* pvtx ) const { + const reco::Vertex* pvtx ) const override { const reco::Vertex* svtx = BPHUserData::get ( cand, "fitVertex" ); - if ( svtx == 0 ) return false; + if ( svtx == nullptr ) return false; if ( pMin > 0 ) { if ( ChiSquaredProbability( svtx->chi2(), svtx->ndof() ) < pMin ) return false; @@ -331,7 +331,7 @@ class BPHFittedVertexSelect: public BPHHistoSpecificDecay::CandidateSelect { 0 ); const Vector3DBase* fmom = BPHUserData::get < Vector3DBase >( cand, "fitMomentum" ); - if ( fmom == 0 ) return false; + if ( fmom == nullptr ) return false; TVector3 cmom( fmom->x(), fmom->y(), 0 ); float cosAlpha = disp.Dot( cmom ) / ( disp.Perp() * cmom.Perp() ); if ( cosAlpha < cMin ) return false; @@ -632,14 +632,14 @@ void BPHHistoSpecificDecay::analyze( const edm::Event& ev, ( cand, "refToJPsi" ); LogTrace( "DataDump" ) << "JPsi: " << jPsi; - if ( jPsi == 0 ) continue; + if ( jPsi == nullptr ) continue; if ( !buJPsiBasicSelect ->accept( *jPsi ) ) continue; if ( !buJPsiDaughterSelect->accept( *jPsi ) ) continue; if ( !buVertexSelect->accept( cand, BPHUserData::getByRef( *jPsi, "primaryVertex" ) ) ) continue; const reco::Candidate* kptr = BPHDaughters::get( cand, 0.49, 0.50 ).front(); - if ( kptr == 0 ) continue; + if ( kptr == nullptr ) continue; if ( kptr->pt() < buKPtMin ) continue; fillHisto( "Bu" , cand ); fillHisto( "BuJPsi", *jPsi ); @@ -663,12 +663,12 @@ void BPHHistoSpecificDecay::analyze( const edm::Event& ev, ( cand, "refToJPsi" ); LogTrace( "DataDump" ) << "JPsi: " << jPsi; - if ( jPsi == 0 ) continue; + if ( jPsi == nullptr ) continue; const pat::CompositeCandidate* kx0 = BPHUserData::getByRef ( cand, "refToKx0" ); LogTrace( "DataDump" ) << "Kx0: " << kx0; - if ( kx0 == 0 ) continue; + if ( kx0 == nullptr ) continue; if ( !bdJPsiBasicSelect ->accept( *jPsi ) ) continue; if ( !bdKx0BasicSelect ->accept( * kx0 ) ) continue; if ( !bdJPsiDaughterSelect->accept( *jPsi ) ) continue; @@ -698,12 +698,12 @@ void BPHHistoSpecificDecay::analyze( const edm::Event& ev, ( cand, "refToJPsi" ); LogTrace( "DataDump" ) << "JPsi: " << jPsi; - if ( jPsi == 0 ) continue; + if ( jPsi == nullptr ) continue; const pat::CompositeCandidate* phi = BPHUserData::getByRef ( cand, "refToPhi" ); LogTrace( "DataDump" ) << "Phi: " << phi; - if ( phi == 0 ) continue; + if ( phi == nullptr ) continue; if ( !bsJPsiBasicSelect ->accept( *jPsi ) ) continue; if ( !bsPhiBasicSelect ->accept( * phi ) ) continue; if ( !bsJPsiDaughterSelect->accept( *jPsi ) ) continue; diff --git a/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHHistoSpecificDecay.h b/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHHistoSpecificDecay.h index 0c181457c2890..71f2c01ef6310 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHHistoSpecificDecay.h +++ b/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHHistoSpecificDecay.h @@ -28,19 +28,19 @@ class BPHHistoSpecificDecay: public: explicit BPHHistoSpecificDecay( const edm::ParameterSet& ps ); - virtual ~BPHHistoSpecificDecay(); + ~BPHHistoSpecificDecay() override; static void fillDescriptions( edm::ConfigurationDescriptions& descriptions ); - virtual void beginJob(); - virtual void analyze( const edm::Event& ev, const edm::EventSetup& es ); - virtual void endJob(); + void beginJob() override; + void analyze( const edm::Event& ev, const edm::EventSetup& es ) override; + void endJob() override; class CandidateSelect { public: virtual ~CandidateSelect() {} virtual bool accept( const pat::CompositeCandidate& cand, - const reco::Vertex* pv = 0 ) const = 0 ; + const reco::Vertex* pv = nullptr ) const = 0 ; }; private: diff --git a/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHWriteSpecificDecay.cc b/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHWriteSpecificDecay.cc index bae3adf520b1d..c2cd7cdf518b8 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHWriteSpecificDecay.cc +++ b/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHWriteSpecificDecay.cc @@ -294,7 +294,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, const pat::Muon* mp = dynamic_cast( dp ); iter = muonSet.begin(); iend = muonSet.end(); - bool add = ( mp != 0 ) && ( muonSet.find( mp ) == iend ); + bool add = ( mp != nullptr ) && ( muonSet.find( mp ) == iend ); while ( add && ( iter != iend ) ) { if ( BPHRecoBuilder::sameTrack( mp, *iter++, 1.0e-5 ) ) add = false; } @@ -314,7 +314,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, // reconstruct quarkonia - BPHOniaToMuMuBuilder* onia = 0; + BPHOniaToMuMuBuilder* onia = nullptr; if ( recoOnia ) { if ( usePM ) onia = new BPHOniaToMuMuBuilder( es, BPHRecoBuilder::createCollection( patMuon, "cfmig" ), @@ -325,7 +325,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, BPHRecoBuilder::createCollection( muDaugs, "cfmig" ) ); } - if ( onia != 0 ) { + if ( onia != nullptr ) { while ( rIter != rIend ) { const map< recoType, map >::value_type& rEntry = *rIter++; recoType rType = rEntry.first; @@ -374,7 +374,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, typedef mu_cc_map::const_iterator mu_cc_iter; for ( iFull = 0; iFull < nFull; ++iFull ) { - const reco::Vertex* pVtx = 0; + const reco::Vertex* pVtx = nullptr; int pvId = 0; const BPHPlusMinusCandidate* ptr = lFull[iFull].get(); const std::vector& daugs = ptr->daughters(); @@ -389,12 +389,12 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, mu_cc_iter iend0 = cc0.second; mu_cc_iter iter1 = cc1.first; mu_cc_iter iend1 = cc1.second; - while ( ( iter0 != iend0 ) && ( pVtx == 0 ) ) { + while ( ( iter0 != iend0 ) && ( pVtx == nullptr ) ) { const pat::CompositeCandidate* ccp = iter0++->second; while ( iter1 != iend1 ) { if ( ccp != iter1++->second ) continue; pVtx = ccp->userData( "PVwithmuons" ); - const reco::Vertex* sVtx = 0; + const reco::Vertex* sVtx = nullptr; const reco::Vertex::Point& pPos = pVtx->position(); float dMin = 999999.; int ipv; @@ -417,7 +417,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, // if not found, as ofr other type of inut data, // try to get the nearest primary vertex in z direction - if ( pVtx == 0 ) { + if ( pVtx == nullptr ) { const reco::Vertex::Point& sVtp = ptr->vertex().position(); GlobalPoint cPos( sVtp.x(), sVtp.y(), sVtp.z() ); const pat::CompositeCandidate& sCC = ptr->composite(); @@ -479,7 +479,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, // build and dump Bu - BPHBuToJPsiKBuilder* bu = 0; + BPHBuToJPsiKBuilder* bu = nullptr; if ( recoBu ) { if ( usePF ) bu = new BPHBuToJPsiKBuilder( es, lJPsi, BPHRecoBuilder::createCollection( pfCands ) ); @@ -491,7 +491,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, BPHRecoBuilder::createCollection( gpCands ) ); } - if ( bu != 0 ) { + if ( bu != nullptr ) { rIter = parMap.find( Bu ); if ( rIter != rIend ) { const map& pMap = rIter->second; @@ -524,7 +524,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, // build and dump Kx0 vector lKx0; - BPHKx0ToKPiBuilder* kx0 = 0; + BPHKx0ToKPiBuilder* kx0 = nullptr; if ( recoKx0 ) { if ( usePF ) kx0 = new BPHKx0ToKPiBuilder( es, BPHRecoBuilder::createCollection( pfCands ), @@ -539,7 +539,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, BPHRecoBuilder::createCollection( gpCands ) ); } - if ( kx0 != 0 ) { + if ( kx0 != nullptr ) { rIter = parMap.find( Kx0 ); if ( rIter != rIend ) { const map& pMap = rIter->second; @@ -615,7 +615,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, // build and dump Phi vector lPhi; - BPHPhiToKKBuilder* phi = 0; + BPHPhiToKKBuilder* phi = nullptr; if ( recoPkk ) { if ( usePF ) phi = new BPHPhiToKKBuilder( es, BPHRecoBuilder::createCollection( pfCands ), @@ -630,7 +630,7 @@ void BPHWriteSpecificDecay::fill( edm::Event& ev, BPHRecoBuilder::createCollection( gpCands ) ); } - if ( phi != 0 ) { + if ( phi != nullptr ) { rIter = parMap.find( Pkk ); if ( rIter != rIend ) { const map& pMap = rIter->second; diff --git a/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHWriteSpecificDecay.h b/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHWriteSpecificDecay.h index 0437e0e6229c4..c358029c70950 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHWriteSpecificDecay.h +++ b/HeavyFlavorAnalysis/SpecificDecay/plugins/BPHWriteSpecificDecay.h @@ -36,14 +36,14 @@ class BPHWriteSpecificDecay: public: explicit BPHWriteSpecificDecay( const edm::ParameterSet& ps ); - virtual ~BPHWriteSpecificDecay(); + ~BPHWriteSpecificDecay() override; static void fillDescriptions( edm::ConfigurationDescriptions& descriptions ); - virtual void beginJob(); - virtual void produce( edm::Event& ev, const edm::EventSetup& es ); + void beginJob() override; + void produce( edm::Event& ev, const edm::EventSetup& es ) override; virtual void fill( edm::Event& ev, const edm::EventSetup& es ); - virtual void endJob(); + void endJob() override; private: @@ -152,7 +152,7 @@ class BPHWriteSpecificDecay: if ( ( ccrIter = ccRefMap.find( cptr ) ) == ccrIend ) { if ( ( jpoIter = jPsiOMap.find( cptr ) ) != jpoIend ) cptr = jpoIter->second; - else cptr = 0; + else cptr = nullptr; } if ( ( ccrIter = ccRefMap.find( cptr ) ) != ccrIend ) { compcc_ref cref = ccrIter->second; @@ -161,7 +161,7 @@ class BPHWriteSpecificDecay: } const BPHPlusMinusCandidate* pmp = dynamic_cast( ptr.get() ); - if ( pmp != 0 ) cc.addUserData( "cowboy", pmp->isCowboy() ); + if ( pmp != nullptr ) cc.addUserData( "cowboy", pmp->isCowboy() ); if ( ptr->isEmpty() ) { if ( writeVertex ) cc.addUserData( "vertex" , ptr->vertex() ); continue; diff --git a/HeavyFlavorAnalysis/SpecificDecay/src/BPHKx0ToKPiBuilder.cc b/HeavyFlavorAnalysis/SpecificDecay/src/BPHKx0ToKPiBuilder.cc index c0fa3e85593e2..053a299687702 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/src/BPHKx0ToKPiBuilder.cc +++ b/HeavyFlavorAnalysis/SpecificDecay/src/BPHKx0ToKPiBuilder.cc @@ -90,7 +90,7 @@ vector BPHKx0ToKPiBuilder::build() { int nkx = tmpList.size(); kx0List.clear(); kx0List.reserve( nkx ); - BPHPlusMinusConstCandPtr pxt( 0 ); + BPHPlusMinusConstCandPtr pxt( nullptr ); for ( ikx = 0; ikx < nkx; ++ikx ) { BPHPlusMinusConstCandPtr& px0 = tmpList[ikx]; BPHPlusMinusCandidatePtr pxb( new BPHPlusMinusCandidate( evSetup ) ); diff --git a/HeavyFlavorAnalysis/SpecificDecay/src/BPHOniaToMuMuBuilder.cc b/HeavyFlavorAnalysis/SpecificDecay/src/BPHOniaToMuMuBuilder.cc index 61d39fcafec1f..bf869cb12df25 100644 --- a/HeavyFlavorAnalysis/SpecificDecay/src/BPHOniaToMuMuBuilder.cc +++ b/HeavyFlavorAnalysis/SpecificDecay/src/BPHOniaToMuMuBuilder.cc @@ -136,11 +136,11 @@ vector BPHOniaToMuMuBuilder::getList( muPosName ) ); const reco::Candidate* muNeg = ptr->originalReco( ptr->getDaug( muNegName ) ); - if ( ( dSel != 0 ) && ( !dSel->accept( *muPos ) ) ) continue; - if ( ( dSel != 0 ) && ( !dSel->accept( *muNeg ) ) ) continue; - if ( ( mSel != 0 ) && ( !mSel->accept( *ptr ) ) ) continue; - if ( ( vSel != 0 ) && ( !vSel->accept( *ptr ) ) ) continue; - if ( ( kSel != 0 ) && ( !kSel->accept( *ptr ) ) ) continue; + if ( ( dSel != nullptr ) && ( !dSel->accept( *muPos ) ) ) continue; + if ( ( dSel != nullptr ) && ( !dSel->accept( *muNeg ) ) ) continue; + if ( ( mSel != nullptr ) && ( !mSel->accept( *ptr ) ) ) continue; + if ( ( vSel != nullptr ) && ( !vSel->accept( *ptr ) ) ) continue; + if ( ( kSel != nullptr ) && ( !kSel->accept( *ptr ) ) ) continue; lsub.push_back( list[i] ); } return lsub; @@ -160,7 +160,7 @@ BPHPlusMinusConstCandPtr BPHOniaToMuMuBuilder::getOriginalCandidate( if ( pmc->originalReco( pmc->getDaug( muNegName ) ) != mn ) continue; return pmp; } - return BPHPlusMinusConstCandPtr( 0 ); + return BPHPlusMinusConstCandPtr( nullptr ); } /// set cuts diff --git a/IOPool/Streamer/interface/StreamerInputModule.h b/IOPool/Streamer/interface/StreamerInputModule.h index aae6f18daff88..b575135f7f3f1 100644 --- a/IOPool/Streamer/interface/StreamerInputModule.h +++ b/IOPool/Streamer/interface/StreamerInputModule.h @@ -27,13 +27,13 @@ namespace edm public: explicit StreamerInputModule(ParameterSet const& pset, InputSourceDescription const& desc); - virtual ~StreamerInputModule(); + ~StreamerInputModule() override; private: - virtual void genuineCloseFile() override { + void genuineCloseFile() override { if(pr_.get() != nullptr) pr_->closeFile(); } - virtual bool checkNextEvent() override; + bool checkNextEvent() override; //ProductRegistry const* prod_reg_; edm::propagate_const> pr_; @@ -66,7 +66,7 @@ namespace edm InitMsgView const* header = pr_->getHeader(); deserializeAndMergeWithRegistry(*header, true); } - if (eview == 0) { + if (eview == nullptr) { return false; } deserializeEvent(*eview); diff --git a/JetMETCorrections/Algorithms/interface/JetCorrectorImplMakerBase.h b/JetMETCorrections/Algorithms/interface/JetCorrectorImplMakerBase.h index cce79a4e48ed7..873bdbdcebe9c 100644 --- a/JetMETCorrections/Algorithms/interface/JetCorrectorImplMakerBase.h +++ b/JetMETCorrections/Algorithms/interface/JetCorrectorImplMakerBase.h @@ -52,9 +52,9 @@ class JetCorrectorImplMakerBase std::function levelCheck); private: - JetCorrectorImplMakerBase(const JetCorrectorImplMakerBase&); // stop default + JetCorrectorImplMakerBase(const JetCorrectorImplMakerBase&) = delete; // stop default - const JetCorrectorImplMakerBase& operator=(const JetCorrectorImplMakerBase&); // stop default + const JetCorrectorImplMakerBase& operator=(const JetCorrectorImplMakerBase&) = delete; // stop default // ---------- member data -------------------------------- std::string level_; diff --git a/JetMETCorrections/Algorithms/interface/L1FastjetCorrector.h b/JetMETCorrections/Algorithms/interface/L1FastjetCorrector.h index 8dc8ac2c53807..087e7feee10de 100644 --- a/JetMETCorrections/Algorithms/interface/L1FastjetCorrector.h +++ b/JetMETCorrections/Algorithms/interface/L1FastjetCorrector.h @@ -19,24 +19,24 @@ class L1FastjetCorrector : public JetCorrector public: // construction / destruction L1FastjetCorrector(const JetCorrectorParameters& fParam, const edm::ParameterSet& fConfig); - virtual ~L1FastjetCorrector(); + ~L1FastjetCorrector() override; public: //member functions /// apply correction using Jet information only - virtual double correction(const LorentzVector& fJet) const; + double correction(const LorentzVector& fJet) const override; /// apply correction using Jet information only - virtual double correction(const reco::Jet& fJet) const; + double correction(const reco::Jet& fJet) const override; /// apply correction using all event information - virtual double correction(const reco::Jet& fJet, + double correction(const reco::Jet& fJet, const edm::Event& fEvent, - const edm::EventSetup& fSetup) const; + const edm::EventSetup& fSetup) const override; /// if correction needs event information - virtual bool eventRequired() const { return true; } + bool eventRequired() const override { return true; } //----- if correction needs a jet reference ------------- - virtual bool refRequired() const { return false; } + bool refRequired() const override { return false; } private: // member data diff --git a/JetMETCorrections/Algorithms/interface/L1FastjetCorrectorImpl.h b/JetMETCorrections/Algorithms/interface/L1FastjetCorrectorImpl.h index 605a1af7de3ce..4e7e4dab68fa5 100644 --- a/JetMETCorrections/Algorithms/interface/L1FastjetCorrectorImpl.h +++ b/JetMETCorrections/Algorithms/interface/L1FastjetCorrectorImpl.h @@ -42,12 +42,12 @@ class L1FastjetCorrectorImpl : public reco::JetCorrectorImpl //member functions /// apply correction using Jet information only - virtual double correction(const LorentzVector& fJet) const; + double correction(const LorentzVector& fJet) const override; /// apply correction using Jet information only - virtual double correction(const reco::Jet& fJet) const; + double correction(const reco::Jet& fJet) const override; //----- if correction needs a jet reference ------------- - virtual bool refRequired() const { return false; } + bool refRequired() const override { return false; } private: // member data diff --git a/JetMETCorrections/Algorithms/interface/L1JPTOffsetCorrector.h b/JetMETCorrections/Algorithms/interface/L1JPTOffsetCorrector.h index e226287dcc292..8269f11a80193 100644 --- a/JetMETCorrections/Algorithms/interface/L1JPTOffsetCorrector.h +++ b/JetMETCorrections/Algorithms/interface/L1JPTOffsetCorrector.h @@ -21,21 +21,21 @@ class L1JPTOffsetCorrector : public JetCorrector L1JPTOffsetCorrector(const JetCorrectorParameters& fConfig, const edm::ParameterSet& fParameters); //----- destructor ---------------------------------------- - virtual ~L1JPTOffsetCorrector(); + ~L1JPTOffsetCorrector() override; //----- apply correction using Jet information only ------- - virtual double correction(const LorentzVector& fJet) const; + double correction(const LorentzVector& fJet) const override; //----- apply correction using Jet information only ------- - virtual double correction(const reco::Jet& fJet) const; + double correction(const reco::Jet& fJet) const override; //----- apply correction using all event information - virtual double correction(const reco::Jet& fJet, + double correction(const reco::Jet& fJet, const edm::Event& fEvent, - const edm::EventSetup& fSetup) const; + const edm::EventSetup& fSetup) const override; //----- if correction needs event information ------------- - virtual bool eventRequired() const {return true;} - virtual bool refRequired() const {return false;} + bool eventRequired() const override {return true;} + bool refRequired() const override {return false;} private: //----- member data --------------------------------------- diff --git a/JetMETCorrections/Algorithms/interface/L1JPTOffsetCorrectorImpl.h b/JetMETCorrections/Algorithms/interface/L1JPTOffsetCorrectorImpl.h index 9486d17e5110f..59f56e5d9d78b 100644 --- a/JetMETCorrections/Algorithms/interface/L1JPTOffsetCorrectorImpl.h +++ b/JetMETCorrections/Algorithms/interface/L1JPTOffsetCorrectorImpl.h @@ -44,13 +44,13 @@ class L1JPTOffsetCorrectorImpl : public reco::JetCorrectorImpl const reco::JetCorrector* offsetService); //----- apply correction using Jet information only ------- - virtual double correction(const LorentzVector& fJet) const override; + double correction(const LorentzVector& fJet) const override; //----- apply correction using Jet information only ------- - virtual double correction(const reco::Jet& fJet) const override; + double correction(const reco::Jet& fJet) const override; //----- if correction needs event information ------------- - virtual bool refRequired() const override {return false;} + bool refRequired() const override {return false;} private: //----- member data --------------------------------------- diff --git a/JetMETCorrections/Algorithms/interface/L1OffsetCorrector.h b/JetMETCorrections/Algorithms/interface/L1OffsetCorrector.h index cc174652b11ad..417bde87c2c63 100644 --- a/JetMETCorrections/Algorithms/interface/L1OffsetCorrector.h +++ b/JetMETCorrections/Algorithms/interface/L1OffsetCorrector.h @@ -21,23 +21,23 @@ class L1OffsetCorrector : public JetCorrector L1OffsetCorrector(const JetCorrectorParameters& fConfig, const edm::ParameterSet& fParameters); //----- destructor ---------------------------------------- - virtual ~L1OffsetCorrector(); + ~L1OffsetCorrector() override; //----- apply correction using Jet information only ------- - virtual double correction(const LorentzVector& fJet) const; + double correction(const LorentzVector& fJet) const override; //----- apply correction using Jet information only ------- - virtual double correction(const reco::Jet& fJet) const; + double correction(const reco::Jet& fJet) const override; //----- apply correction using all event information - virtual double correction(const reco::Jet& fJet, + double correction(const reco::Jet& fJet, const edm::Event& fEvent, - const edm::EventSetup& fSetup) const; + const edm::EventSetup& fSetup) const override; //----- if correction needs event information ------------- - virtual bool eventRequired() const {return true;} + bool eventRequired() const override {return true;} //----- if correction needs a jet reference ------------- - virtual bool refRequired() const { return false; } + bool refRequired() const override { return false; } private: //----- member data --------------------------------------- diff --git a/JetMETCorrections/Algorithms/interface/L1OffsetCorrectorImpl.h b/JetMETCorrections/Algorithms/interface/L1OffsetCorrectorImpl.h index 9a5c8d7aefb6a..eebcfe5b18262 100644 --- a/JetMETCorrections/Algorithms/interface/L1OffsetCorrectorImpl.h +++ b/JetMETCorrections/Algorithms/interface/L1OffsetCorrectorImpl.h @@ -44,13 +44,13 @@ class L1OffsetCorrectorImpl : public reco::JetCorrectorImpl //----- destructor ---------------------------------------- //----- apply correction using Jet information only ------- - virtual double correction(const LorentzVector& fJet) const override; + double correction(const LorentzVector& fJet) const override; //----- apply correction using Jet information only ------- - virtual double correction(const reco::Jet& fJet) const override; + double correction(const reco::Jet& fJet) const override; //----- if correction needs a jet reference ------------- - virtual bool refRequired() const override { return false; } + bool refRequired() const override { return false; } private: //----- member data --------------------------------------- diff --git a/JetMETCorrections/Algorithms/interface/L6SLBCorrector.h b/JetMETCorrections/Algorithms/interface/L6SLBCorrector.h index 24d556e563ef7..87da52fcb7dbd 100644 --- a/JetMETCorrections/Algorithms/interface/L6SLBCorrector.h +++ b/JetMETCorrections/Algorithms/interface/L6SLBCorrector.h @@ -23,7 +23,7 @@ class L6SLBCorrector : public JetCorrector // public: L6SLBCorrector (const JetCorrectorParameters& fParam, const edm::ParameterSet& fConfig); - virtual ~L6SLBCorrector (); + ~L6SLBCorrector () override; // @@ -31,20 +31,20 @@ class L6SLBCorrector : public JetCorrector // public: /// apply correction using Jet information only - virtual double correction (const LorentzVector& fJet) const; + double correction (const LorentzVector& fJet) const override; /// apply correction using Jet information only - virtual double correction (const reco::Jet& fJet) const; + double correction (const reco::Jet& fJet) const override; /// apply correction using all event information - virtual double correction (const reco::Jet& fJet, + double correction (const reco::Jet& fJet, const edm::RefToBase& refToRawJet, const edm::Event& fEvent, - const edm::EventSetup& fSetup) const; + const edm::EventSetup& fSetup) const override; /// if correction needs event information - virtual bool eventRequired () const {return true;} + bool eventRequired () const override {return true;} //----- if correction needs a jet reference ------------- - virtual bool refRequired () const {return true;} + bool refRequired () const override {return true;} // // private member functions diff --git a/JetMETCorrections/Algorithms/interface/L6SLBCorrectorImpl.h b/JetMETCorrections/Algorithms/interface/L6SLBCorrectorImpl.h index fef935fd3c94c..44086b750ea59 100644 --- a/JetMETCorrections/Algorithms/interface/L6SLBCorrectorImpl.h +++ b/JetMETCorrections/Algorithms/interface/L6SLBCorrectorImpl.h @@ -55,15 +55,15 @@ class L6SLBCorrectorImpl : public reco::JetCorrectorImpl // public: /// apply correction using Jet information only - virtual double correction (const LorentzVector& fJet) const override; + double correction (const LorentzVector& fJet) const override; /// apply correction using Jet information only - virtual double correction (const reco::Jet& fJet) const override; + double correction (const reco::Jet& fJet) const override; /// apply correction using all event information - virtual double correction (const reco::Jet& fJet, + double correction (const reco::Jet& fJet, const edm::RefToBase& refToRawJet) const override; //----- if correction needs a jet reference ------------- - virtual bool refRequired () const override {return true;} + bool refRequired () const override {return true;} // // private member functions diff --git a/JetMETCorrections/Algorithms/interface/LXXXCorrector.h b/JetMETCorrections/Algorithms/interface/LXXXCorrector.h index 4bc52bda47798..d5270e725f76d 100644 --- a/JetMETCorrections/Algorithms/interface/LXXXCorrector.h +++ b/JetMETCorrections/Algorithms/interface/LXXXCorrector.h @@ -20,19 +20,19 @@ class LXXXCorrector : public JetCorrector LXXXCorrector(const JetCorrectorParameters& fConfig, const edm::ParameterSet& fParameters); //----- destructor ---------------------------------------- - virtual ~LXXXCorrector(); + ~LXXXCorrector() override; //----- apply correction using Jet information only ------- - virtual double correction(const LorentzVector& fJet) const; + double correction(const LorentzVector& fJet) const override; //----- apply correction using Jet information only ------- - virtual double correction(const reco::Jet& fJet) const; + double correction(const reco::Jet& fJet) const override; //----- if correction needs event information ------------- - virtual bool eventRequired() const {return false;} + bool eventRequired() const override {return false;} //----- if correction needs a jet reference ------------- - virtual bool refRequired() const { return false; } + bool refRequired() const override { return false; } private: //----- member data --------------------------------------- diff --git a/JetMETCorrections/Algorithms/interface/LXXXCorrectorImpl.h b/JetMETCorrections/Algorithms/interface/LXXXCorrectorImpl.h index 9b01a6b297fdc..8bad44be6996c 100644 --- a/JetMETCorrections/Algorithms/interface/LXXXCorrectorImpl.h +++ b/JetMETCorrections/Algorithms/interface/LXXXCorrectorImpl.h @@ -36,13 +36,13 @@ class LXXXCorrectorImpl : public reco::JetCorrectorImpl LXXXCorrectorImpl(std::shared_ptr calculator, unsigned int level); //----- apply correction using Jet information only ------- - virtual double correction(const LorentzVector& fJet) const override; + double correction(const LorentzVector& fJet) const override; //----- apply correction using Jet information only ------- - virtual double correction(const reco::Jet& fJet) const override; + double correction(const reco::Jet& fJet) const override; //----- if correction needs a jet reference ------------- - virtual bool refRequired() const override { return false; } + bool refRequired() const override { return false; } private: //----- member data --------------------------------------- diff --git a/JetMETCorrections/Algorithms/src/L1JPTOffsetCorrector.cc b/JetMETCorrections/Algorithms/src/L1JPTOffsetCorrector.cc index 83253226094e4..bc9a4d7929910 100644 --- a/JetMETCorrections/Algorithms/src/L1JPTOffsetCorrector.cc +++ b/JetMETCorrections/Algorithms/src/L1JPTOffsetCorrector.cc @@ -67,7 +67,7 @@ double L1JPTOffsetCorrector::correction(const reco::Jet& fJet, { double result = 1.; const reco::JPTJet& jptjet = dynamic_cast (fJet); - edm::RefToBase jptjetRef = jptjet.getCaloJetRef(); + const edm::RefToBase& jptjetRef = jptjet.getCaloJetRef(); reco::CaloJet const * rawcalojet = dynamic_cast( &* jptjetRef); //------ access the offset correction service ---------------- double offset = 1.0; diff --git a/JetMETCorrections/Algorithms/src/L1JPTOffsetCorrectorImpl.cc b/JetMETCorrections/Algorithms/src/L1JPTOffsetCorrectorImpl.cc index ac9afec03bed5..4f7b8a6f5e3e6 100644 --- a/JetMETCorrections/Algorithms/src/L1JPTOffsetCorrectorImpl.cc +++ b/JetMETCorrections/Algorithms/src/L1JPTOffsetCorrectorImpl.cc @@ -88,7 +88,7 @@ double L1JPTOffsetCorrectorImpl::correction(const reco::Jet& fJet) const { double result = 1.; const reco::JPTJet& jptjet = dynamic_cast (fJet); - edm::RefToBase jptjetRef = jptjet.getCaloJetRef(); + const edm::RefToBase& jptjetRef = jptjet.getCaloJetRef(); reco::CaloJet const * rawcalojet = dynamic_cast( &* jptjetRef); //------ access the offset correction service ---------------- double offset = 1.0; diff --git a/JetMETCorrections/Algorithms/src/L6SLBCorrector.cc b/JetMETCorrections/Algorithms/src/L6SLBCorrector.cc index 0bde4804bc410..9d204cf450eb3 100644 --- a/JetMETCorrections/Algorithms/src/L6SLBCorrector.cc +++ b/JetMETCorrections/Algorithms/src/L6SLBCorrector.cc @@ -32,7 +32,7 @@ L6SLBCorrector::L6SLBCorrector(const JetCorrectorParameters& fParam, const edm:: : addMuonToJet_(fConfig.getParameter("addMuonToJet")) , srcBTagInfoElec_(fConfig.getParameter("srcBTagInfoElectron")) , srcBTagInfoMuon_(fConfig.getParameter("srcBTagInfoMuon")) - , corrector_(0) + , corrector_(nullptr) { vector vParam; vParam.push_back(fParam); @@ -86,7 +86,7 @@ double L6SLBCorrector::correction(const reco::Jet& fJet, const reco::SoftLeptonTagInfo& sltMuon = (*muoninfos)[getBTagInfoIndex(refToRawJet,*muoninfos)]; if (sltMuon.leptons()>0) { - edm::RefToBase trackRef = sltMuon.lepton(0); + const edm::RefToBase& trackRef = sltMuon.lepton(0); values.setLepPx(trackRef->px()); values.setLepPy(trackRef->py()); values.setLepPz(trackRef->pz()); @@ -99,7 +99,7 @@ double L6SLBCorrector::correction(const reco::Jet& fJet, const reco::SoftLeptonTagInfo& sltElec = (*elecinfos)[getBTagInfoIndex(refToRawJet,*elecinfos)]; if (sltElec.leptons()>0) { - edm::RefToBase trackRef = sltElec.lepton(0); + const edm::RefToBase& trackRef = sltElec.lepton(0); values.setLepPx(trackRef->px()); values.setLepPy(trackRef->py()); values.setLepPz(trackRef->pz()); diff --git a/JetMETCorrections/Algorithms/src/L6SLBCorrectorImpl.cc b/JetMETCorrections/Algorithms/src/L6SLBCorrectorImpl.cc index 25a9fc1862da4..c090e15d15022 100644 --- a/JetMETCorrections/Algorithms/src/L6SLBCorrectorImpl.cc +++ b/JetMETCorrections/Algorithms/src/L6SLBCorrectorImpl.cc @@ -115,7 +115,7 @@ double L6SLBCorrectorImpl::correction(const reco::Jet& fJet, const reco::SoftLeptonTagInfo& sltMuon = (*bTagInfoMuon_)[getBTagInfoIndex(refToRawJet,*bTagInfoMuon_)]; if (sltMuon.leptons()>0) { - edm::RefToBase trackRef = sltMuon.lepton(0); + const edm::RefToBase& trackRef = sltMuon.lepton(0); values.setLepPx(trackRef->px()); values.setLepPy(trackRef->py()); values.setLepPz(trackRef->pz()); @@ -126,7 +126,7 @@ double L6SLBCorrectorImpl::correction(const reco::Jet& fJet, const reco::SoftLeptonTagInfo& sltElec = (*bTagInfoElec_)[getBTagInfoIndex(refToRawJet,*bTagInfoElec_)]; if (sltElec.leptons()>0) { - edm::RefToBase trackRef = sltElec.lepton(0); + const edm::RefToBase& trackRef = sltElec.lepton(0); values.setLepPx(trackRef->px()); values.setLepPy(trackRef->py()); values.setLepPz(trackRef->pz()); diff --git a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectionESProducer.h b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectionESProducer.h index 595620344a7eb..92e04d325439a 100644 --- a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectionESProducer.h +++ b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectionESProducer.h @@ -118,7 +118,7 @@ class FFTJetCorrectionESProducer : public edm::ESProducer typedef FFTJetCorrectorParametersRcd ParentRecord; FFTJetCorrectionESProducer(const edm::ParameterSet&); - virtual ~FFTJetCorrectionESProducer() {} + ~FFTJetCorrectionESProducer() override {} ReturnType produce(const MyRecord&); diff --git a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBReader.cc b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBReader.cc index 22887d05b3213..4be8e4953edf8 100644 --- a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBReader.cc +++ b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBReader.cc @@ -46,14 +46,14 @@ class FFTJetCorrectorDBReader : public edm::EDAnalyzer { public: explicit FFTJetCorrectorDBReader(const edm::ParameterSet&); - virtual ~FFTJetCorrectorDBReader() {} + ~FFTJetCorrectorDBReader() override {} private: - FFTJetCorrectorDBReader(); - FFTJetCorrectorDBReader(const FFTJetCorrectorDBReader&); - FFTJetCorrectorDBReader& operator=(const FFTJetCorrectorDBReader&); + FFTJetCorrectorDBReader() = delete; + FFTJetCorrectorDBReader(const FFTJetCorrectorDBReader&) = delete; + FFTJetCorrectorDBReader& operator=(const FFTJetCorrectorDBReader&) = delete; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; std::string record; std::string outputFile; diff --git a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBWriter.cc b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBWriter.cc index e791c14de4e75..1476904dec864 100644 --- a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBWriter.cc +++ b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBWriter.cc @@ -43,14 +43,14 @@ class FFTJetCorrectorDBWriter : public edm::EDAnalyzer { public: explicit FFTJetCorrectorDBWriter(const edm::ParameterSet&); - virtual ~FFTJetCorrectorDBWriter() {} + ~FFTJetCorrectorDBWriter() override {} private: - FFTJetCorrectorDBWriter(); - FFTJetCorrectorDBWriter(const FFTJetCorrectorDBWriter&); - FFTJetCorrectorDBWriter& operator=(const FFTJetCorrectorDBWriter&); + FFTJetCorrectorDBWriter() = delete; + FFTJetCorrectorDBWriter(const FFTJetCorrectorDBWriter&) = delete; + FFTJetCorrectorDBWriter& operator=(const FFTJetCorrectorDBWriter&) = delete; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; std::string inputFile; std::string record; diff --git a/JetMETCorrections/FFTJetModules/plugins/FFTJetLookupTableESProducer.cc b/JetMETCorrections/FFTJetModules/plugins/FFTJetLookupTableESProducer.cc index 5185525713234..a03f04dda9cb6 100644 --- a/JetMETCorrections/FFTJetModules/plugins/FFTJetLookupTableESProducer.cc +++ b/JetMETCorrections/FFTJetModules/plugins/FFTJetLookupTableESProducer.cc @@ -117,7 +117,7 @@ class FFTJetLookupTableESProducer : public edm::ESProducer typedef FFTJetCorrectorParametersRcd ParentRecord; FFTJetLookupTableESProducer(const edm::ParameterSet&); - virtual ~FFTJetLookupTableESProducer() {} + ~FFTJetLookupTableESProducer() override {} ReturnType produce(const MyRecord&); diff --git a/JetMETCorrections/FFTJetObjects/interface/AbsFFTJetScaleCalculator.h b/JetMETCorrections/FFTJetObjects/interface/AbsFFTJetScaleCalculator.h index a4e58f4d55dfe..7d8460fb35b69 100644 --- a/JetMETCorrections/FFTJetObjects/interface/AbsFFTJetScaleCalculator.h +++ b/JetMETCorrections/FFTJetObjects/interface/AbsFFTJetScaleCalculator.h @@ -21,13 +21,13 @@ class AbsFFTJetScaleCalculator inline double scale(const Jet& jet, const Adjustable& current) const { const unsigned dim = buffer_.size(); - double* buf = dim ? &buffer_[0] : static_cast(0); + double* buf = dim ? &buffer_[0] : static_cast(nullptr); this->map(jet, current, buf, dim); return (*functor)(buf, dim); } private: - AbsFFTJetScaleCalculator(); + AbsFFTJetScaleCalculator() = delete; virtual void map(const Jet& jet, const Adjustable& current, diff --git a/JetMETCorrections/FFTJetObjects/interface/AbsFFTSpecificScaleCalculator.h b/JetMETCorrections/FFTJetObjects/interface/AbsFFTSpecificScaleCalculator.h index 1e3bbc2fc8f57..9405dee2bf382 100644 --- a/JetMETCorrections/FFTJetObjects/interface/AbsFFTSpecificScaleCalculator.h +++ b/JetMETCorrections/FFTJetObjects/interface/AbsFFTSpecificScaleCalculator.h @@ -30,7 +30,7 @@ class FFTSpecificScaleCalculatorFactory : { typedef DefaultFFTJetObjectFactory Base; friend class StaticFFTJetObjectFactory; - FFTSpecificScaleCalculatorFactory(); + FFTSpecificScaleCalculatorFactory() = delete; }; typedef StaticFFTJetObjectFactory diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTGenericScaleCalculator.h b/JetMETCorrections/FFTJetObjects/interface/FFTGenericScaleCalculator.h index c6cb25fb9df70..f1ebdeac389a1 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTGenericScaleCalculator.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTGenericScaleCalculator.h @@ -15,12 +15,12 @@ class FFTGenericScaleCalculator : public AbsFFTSpecificScaleCalculator public: FFTGenericScaleCalculator(const edm::ParameterSet& ps); - inline virtual ~FFTGenericScaleCalculator() {} + inline ~FFTGenericScaleCalculator() override {} - virtual void mapFFTJet(const reco::Jet& jet, + void mapFFTJet(const reco::Jet& jet, const reco::FFTJet& fftJet, const math::XYZTLorentzVector& current, - double* buf, unsigned dim) const; + double* buf, unsigned dim) const override; private: inline double f_safeLog(const double x) const { diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetAdjusters.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetAdjusters.h index a52734c37ebcb..f279916a7518d 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetAdjusters.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetAdjusters.h @@ -6,11 +6,11 @@ template struct FFTSimpleScalingAdjuster : public AbsFFTJetAdjuster { - inline virtual ~FFTSimpleScalingAdjuster() {} + inline ~FFTSimpleScalingAdjuster() override {} - virtual void adjust(const MyJet& /* jet */, const Adjustable& in, + void adjust(const MyJet& /* jet */, const Adjustable& in, const double* factors, const unsigned lenFactors, - Adjustable* out) const + Adjustable* out) const override { if (lenFactors != 1U) throw cms::Exception("FFTJetBadConfig") @@ -26,11 +26,11 @@ struct FFTSimpleScalingAdjuster : public AbsFFTJetAdjuster template struct FFTUncertaintyAdjuster : public AbsFFTJetAdjuster { - inline virtual ~FFTUncertaintyAdjuster() {} + inline ~FFTUncertaintyAdjuster() override {} - virtual void adjust(const MyJet& /* jet */, const Adjustable& in, + void adjust(const MyJet& /* jet */, const Adjustable& in, const double* factors, const unsigned lenFactors, - Adjustable* out) const + Adjustable* out) const override { if (lenFactors != 1U) throw cms::Exception("FFTJetBadConfig") @@ -48,11 +48,11 @@ template struct FFTScalingAdjusterWithUncertainty : public AbsFFTJetAdjuster { - inline virtual ~FFTScalingAdjusterWithUncertainty() {} + inline ~FFTScalingAdjusterWithUncertainty() override {} - virtual void adjust(const MyJet& /* jet */, const Adjustable& in, + void adjust(const MyJet& /* jet */, const Adjustable& in, const double* factors, const unsigned lenFactors, - Adjustable* out) const + Adjustable* out) const override { if (lenFactors != 2U) throw cms::Exception("FFTJetBadConfig") diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h index 768b5e2a696c8..01866eb7b430e 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h @@ -13,7 +13,7 @@ class FFTJetCorrectorParametersLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTJetCorrectorParametersLoader(); + FFTJetCorrectorParametersLoader() = delete; }; typedef StaticFFTJetRcdMapper diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorResult.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorResult.h index 2d3af76bfd054..5f89434059a68 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorResult.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorResult.h @@ -29,7 +29,7 @@ class FFTJetCorrectorResult inline void setSigma(const double s) {sigma_ = s;} private: - FFTJetCorrectorResult(); + FFTJetCorrectorResult() = delete; LorentzVector vec_; double scale_; diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorSequenceLoader.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorSequenceLoader.h index 9c6db2a0eea48..ada4838993c9b 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorSequenceLoader.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorSequenceLoader.h @@ -9,7 +9,7 @@ class FFTBasicJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTBasicJetCorrectorSequenceLoader(); + FFTBasicJetCorrectorSequenceLoader() = delete; }; typedef StaticFFTJetRcdMapper @@ -20,7 +20,7 @@ class FFTCaloJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTCaloJetCorrectorSequenceLoader(); + FFTCaloJetCorrectorSequenceLoader() = delete; }; typedef StaticFFTJetRcdMapper @@ -31,7 +31,7 @@ class FFTGenJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTGenJetCorrectorSequenceLoader(); + FFTGenJetCorrectorSequenceLoader() = delete; }; typedef StaticFFTJetRcdMapper @@ -42,7 +42,7 @@ class FFTPFJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTPFJetCorrectorSequenceLoader(); + FFTPFJetCorrectorSequenceLoader() = delete; }; typedef StaticFFTJetRcdMapper @@ -53,7 +53,7 @@ class FFTTrackJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTTrackJetCorrectorSequenceLoader(); + FFTTrackJetCorrectorSequenceLoader() = delete; }; typedef StaticFFTJetRcdMapper @@ -64,7 +64,7 @@ class FFTJPTJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTJPTJetCorrectorSequenceLoader(); + FFTJPTJetCorrectorSequenceLoader() = delete; }; typedef StaticFFTJetRcdMapper diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorTransient.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorTransient.h index 95765a8582d27..a88e9c0f99d95 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorTransient.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorTransient.h @@ -42,7 +42,7 @@ class FFTJetCorrectorTransient } private: - FFTJetCorrectorTransient(); + FFTJetCorrectorTransient() = delete; LorentzVector vec_; double scale_; diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableSequenceLoader.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableSequenceLoader.h index 0cb028d937366..f2709c809b0b6 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableSequenceLoader.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableSequenceLoader.h @@ -13,7 +13,7 @@ class FFTJetLookupTableSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTJetLookupTableSequenceLoader(); + FFTJetLookupTableSequenceLoader() = delete; }; typedef StaticFFTJetRcdMapper diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetObjectFactory.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetObjectFactory.h index dd799218d4b56..d415133ec62c4 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetObjectFactory.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetObjectFactory.h @@ -20,8 +20,8 @@ struct AbsFFTJetObjectFactory template struct ConcreteFFTJetObjectFactory : public AbsFFTJetObjectFactory { - virtual ~ConcreteFFTJetObjectFactory() {} - inline Derived* create(const edm::ParameterSet& ps) const + ~ConcreteFFTJetObjectFactory() override {} + inline Derived* create(const edm::ParameterSet& ps) const override {return new Derived(ps);} }; @@ -54,8 +54,8 @@ struct DefaultFFTJetObjectFactory : } private: - DefaultFFTJetObjectFactory(const DefaultFFTJetObjectFactory&); - DefaultFFTJetObjectFactory& operator=(const DefaultFFTJetObjectFactory&); + DefaultFFTJetObjectFactory(const DefaultFFTJetObjectFactory&) = delete; + DefaultFFTJetObjectFactory& operator=(const DefaultFFTJetObjectFactory&) = delete; }; // @@ -82,7 +82,7 @@ class StaticFFTJetObjectFactory } private: - StaticFFTJetObjectFactory(); + StaticFFTJetObjectFactory() = delete; }; #endif // JetMETCorrections_FFTJetObjects_FFTJetObjectFactory_h diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetRcdMapper.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetRcdMapper.h index 88cce934c331f..3652b69302f5f 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetRcdMapper.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetRcdMapper.h @@ -33,15 +33,15 @@ struct AbsFFTJetRcdMapper template struct ConcreteFFTJetRcdMapper : public AbsFFTJetRcdMapper { - virtual ~ConcreteFFTJetRcdMapper() {} + ~ConcreteFFTJetRcdMapper() override {} inline void load(const edm::EventSetup& iSetup, - edm::ESHandle& handle) const + edm::ESHandle& handle) const override {iSetup.get().get(handle);} inline void load(const edm::EventSetup& iSetup, const std::string& label, - edm::ESHandle& handle) const + edm::ESHandle& handle) const override {iSetup.get().get(label, handle);} }; @@ -87,8 +87,8 @@ struct DefaultFFTJetRcdMapper : } private: - DefaultFFTJetRcdMapper(const DefaultFFTJetRcdMapper&); - DefaultFFTJetRcdMapper& operator=(const DefaultFFTJetRcdMapper&); + DefaultFFTJetRcdMapper(const DefaultFFTJetRcdMapper&) = delete; + DefaultFFTJetRcdMapper& operator=(const DefaultFFTJetRcdMapper&) = delete; }; // @@ -115,7 +115,7 @@ class StaticFFTJetRcdMapper } private: - StaticFFTJetRcdMapper(); + StaticFFTJetRcdMapper() = delete; }; #endif // JetMETCorrections_FFTJetObjects_FFTJetRcdMapper_h diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetScaleCalculators.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetScaleCalculators.h index d0f59f10132cd..2ccfaf952cb86 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetScaleCalculators.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetScaleCalculators.h @@ -20,7 +20,7 @@ class FFTEtaLogPtConeRadiusMapper : private: inline void map(const MyJet& jet, const Adjustable& current, - double* buf, const unsigned dim) const + double* buf, const unsigned dim) const override { assert(buf); if (dim != 3) @@ -49,12 +49,12 @@ class FFTSpecificScaleCalculator : const AbsFFTSpecificScaleCalculator* p) : AbsFFTJetScaleCalculator(f), calc_(p) {assert(p);} - inline virtual ~FFTSpecificScaleCalculator() {delete calc_;} + inline ~FFTSpecificScaleCalculator() override {delete calc_;} private: inline void map(const MyJet& jet, const Adjustable& current, - double* buf, const unsigned dim) const + double* buf, const unsigned dim) const override { return calc_->mapFFTJet(jet, jet.getFFTSpecific(), current.vec(), buf, dim); diff --git a/JetMETCorrections/FFTJetObjects/interface/L2AbsScaleCalculator.h b/JetMETCorrections/FFTJetObjects/interface/L2AbsScaleCalculator.h index bfe8e232079de..a4f8f14dad5fc 100644 --- a/JetMETCorrections/FFTJetObjects/interface/L2AbsScaleCalculator.h +++ b/JetMETCorrections/FFTJetObjects/interface/L2AbsScaleCalculator.h @@ -16,12 +16,12 @@ class L2AbsScaleCalculator : public AbsFFTSpecificScaleCalculator m_zeroPtLog(ps.getParameter("zeroPtLog")), m_takePtLog(ps.getParameter("takePtLog")) {} - inline virtual ~L2AbsScaleCalculator() {} + inline ~L2AbsScaleCalculator() override {} - inline virtual void mapFFTJet(const reco::Jet& /* jet */, + inline void mapFFTJet(const reco::Jet& /* jet */, const reco::FFTJet& fftJet, const math::XYZTLorentzVector& current, - double* buf, const unsigned dim) const + double* buf, const unsigned dim) const override { if (dim != 2) throw cms::Exception("FFTJetBadConfig") diff --git a/JetMETCorrections/FFTJetObjects/interface/L2RecoScaleCalculator.h b/JetMETCorrections/FFTJetObjects/interface/L2RecoScaleCalculator.h index 6505aecda445c..7321d71fb41d9 100644 --- a/JetMETCorrections/FFTJetObjects/interface/L2RecoScaleCalculator.h +++ b/JetMETCorrections/FFTJetObjects/interface/L2RecoScaleCalculator.h @@ -13,12 +13,12 @@ class L2RecoScaleCalculator : public AbsFFTSpecificScaleCalculator inline explicit L2RecoScaleCalculator(const edm::ParameterSet& ps) : m_radiusFactor(ps.getParameter("radiusFactor")) {} - inline virtual ~L2RecoScaleCalculator() {} + inline ~L2RecoScaleCalculator() override {} - inline virtual void mapFFTJet(const reco::Jet& /* jet */, + inline void mapFFTJet(const reco::Jet& /* jet */, const reco::FFTJet& fftJet, const math::XYZTLorentzVector& /* current */, - double* buf, const unsigned dim) const + double* buf, const unsigned dim) const override { if (dim != 1) throw cms::Exception("FFTJetBadConfig") diff --git a/JetMETCorrections/FFTJetObjects/interface/L2ResScaleCalculator.h b/JetMETCorrections/FFTJetObjects/interface/L2ResScaleCalculator.h index 770cae0993f44..b90062f417b09 100644 --- a/JetMETCorrections/FFTJetObjects/interface/L2ResScaleCalculator.h +++ b/JetMETCorrections/FFTJetObjects/interface/L2ResScaleCalculator.h @@ -13,12 +13,12 @@ class L2ResScaleCalculator : public AbsFFTSpecificScaleCalculator inline explicit L2ResScaleCalculator(const edm::ParameterSet& ps) : m_radiusFactor(ps.getParameter("radiusFactor")) {} - inline virtual ~L2ResScaleCalculator() {} + inline ~L2ResScaleCalculator() override {} - inline virtual void mapFFTJet(const reco::Jet& /* jet */, + inline void mapFFTJet(const reco::Jet& /* jet */, const reco::FFTJet& fftJet, const math::XYZTLorentzVector& current, - double* buf, const unsigned dim) const + double* buf, const unsigned dim) const override { if (dim != 2) throw cms::Exception("FFTJetBadConfig") diff --git a/JetMETCorrections/InterpolationTables/interface/ArrayND.h b/JetMETCorrections/InterpolationTables/interface/ArrayND.h index 4d07ea8938d85..ab747e3c446a1 100644 --- a/JetMETCorrections/InterpolationTables/interface/ArrayND.h +++ b/JetMETCorrections/InterpolationTables/interface/ArrayND.h @@ -1686,7 +1686,7 @@ namespace npstat { ArrayND::ArrayND( const ArrayND& slicedArray, const unsigned *fixedIndices, const unsigned nFixedIndices) - : data_(0), strides_(0), shape_(0), + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), dim_(slicedArray.dim_ - nFixedIndices), shapeIsKnown_(true) { @@ -2559,7 +2559,7 @@ namespace npstat { void ArrayND::buildStrides() { assert(dim_); - if (strides_ == 0) + if (strides_ == nullptr) strides_ = makeBuffer(dim_, localStrides_, Dim); strides_[dim_ - 1] = 1UL; for (unsigned j=dim_ - 1; j>0; --j) @@ -2568,7 +2568,7 @@ namespace npstat { template inline ArrayND::ArrayND() - : data_(0), strides_(0), shape_(0), + : data_(nullptr), strides_(nullptr), shape_(nullptr), len_(0UL), dim_(0U), shapeIsKnown_(false) { localData_[0] = Numeric(); @@ -2577,7 +2577,7 @@ namespace npstat { template ArrayND::ArrayND(const ArrayND& r) - : data_(0), strides_(0), shape_(0), + : data_(nullptr), strides_(nullptr), shape_(nullptr), len_(r.len_), dim_(r.dim_), shapeIsKnown_(r.shapeIsKnown_) { if (dim_) @@ -2605,7 +2605,7 @@ namespace npstat { template template ArrayND::ArrayND(const ArrayND& r) - : data_(0), strides_(0), shape_(0), + : data_(0), strides_(nullptr), shape_(nullptr), len_(r.len_), dim_(r.dim_), shapeIsKnown_(r.shapeIsKnown_) { if (dim_) @@ -2634,7 +2634,7 @@ namespace npstat { template ArrayND::ArrayND(const ArrayND& r, Functor f) - : data_(0), strides_(0), shape_(0), + : data_(0), strides_(nullptr), shape_(nullptr), len_(r.len_), dim_(r.dim_), shapeIsKnown_(r.shapeIsKnown_) { if (dim_) @@ -2694,7 +2694,7 @@ namespace npstat { template ArrayND::ArrayND( const ArrayND& r, const ArrayRange& range) - : data_(0), strides_(0), shape_(0), + : data_(0), strides_(nullptr), shape_(nullptr), len_(r.len_), dim_(r.dim_), shapeIsKnown_(r.shapeIsKnown_) { if (!range.isCompatible(r.shape_, r.dim_)) @@ -2743,7 +2743,7 @@ namespace npstat { ArrayND::ArrayND( const ArrayND& r, const ArrayRange& range, Functor f) - : data_(0), strides_(0), shape_(0), + : data_(0), strides_(nullptr), shape_(nullptr), len_(r.len_), dim_(r.dim_), shapeIsKnown_(r.shapeIsKnown_) { if (!range.isCompatible(r.shape_, r.dim_)) @@ -2782,23 +2782,23 @@ namespace npstat { template ArrayND::ArrayND(const ArrayShape& sh) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(nullptr), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned sz = sh.size(); - buildFromShapePtr(sz ? &sh[0] : 0, sz); + buildFromShapePtr(sz ? &sh[0] : nullptr, sz); } template ArrayND::ArrayND(const unsigned* sizes, const unsigned dim) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { buildFromShapePtr(sizes, dim); } template ArrayND::ArrayND(const unsigned n0) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 1U; unsigned sizes[dim]; @@ -2809,7 +2809,7 @@ namespace npstat { template ArrayND::ArrayND(const unsigned n0, const unsigned n1) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 2U; unsigned sizes[dim]; @@ -2822,7 +2822,7 @@ namespace npstat { ArrayND::ArrayND(const unsigned n0, const unsigned n1, const unsigned n2) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 3U; unsigned sizes[dim]; @@ -2837,7 +2837,7 @@ namespace npstat { const unsigned n1, const unsigned n2, const unsigned n3) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 4U; unsigned sizes[dim]; @@ -2854,7 +2854,7 @@ namespace npstat { const unsigned n2, const unsigned n3, const unsigned n4) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 5U; unsigned sizes[dim]; @@ -2873,7 +2873,7 @@ namespace npstat { const unsigned n3, const unsigned n4, const unsigned n5) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 6U; unsigned sizes[dim]; @@ -2894,7 +2894,7 @@ namespace npstat { const unsigned n4, const unsigned n5, const unsigned n6) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 7U; unsigned sizes[dim]; @@ -2917,7 +2917,7 @@ namespace npstat { const unsigned n5, const unsigned n6, const unsigned n7) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 8U; unsigned sizes[dim]; @@ -2942,7 +2942,7 @@ namespace npstat { const unsigned n6, const unsigned n7, const unsigned n8) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 9U; unsigned sizes[dim]; @@ -2969,7 +2969,7 @@ namespace npstat { const unsigned n7, const unsigned n8, const unsigned n9) - : data_(0), strides_(0), shape_(0), len_(1UL), shapeIsKnown_(true) + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), shapeIsKnown_(true) { const unsigned dim = 10U; unsigned sizes[dim]; @@ -3020,7 +3020,7 @@ namespace npstat { typename Num2, unsigned Len2, unsigned Dim2> ArrayND::ArrayND(const ArrayND& a1, const ArrayND& a2) - : data_(0), strides_(0), shape_(0), + : data_(0), strides_(nullptr), shape_(nullptr), len_(1UL), dim_(a1.dim_ + a2.dim_), shapeIsKnown_(true) { if (!(a1.shapeIsKnown_ && a2.shapeIsKnown_)) @@ -4787,8 +4787,8 @@ namespace npstat { destroyBuffer(shape_, localShape_); localData_[0] = Numeric(); data_ = localData_; - strides_ = 0; - shape_ = 0; + strides_ = nullptr; + shape_ = nullptr; len_ = 0; dim_ = 0; shapeIsKnown_ = false; @@ -4978,7 +4978,7 @@ namespace npstat { } else localData_[0] = static_cast( - f(static_cast(0), 0U)); + f(static_cast(nullptr), 0U)); return *this; } @@ -5595,7 +5595,7 @@ namespace npstat { if (dim_ == 1 && r.dim_ == 1) { // Special case: the result is of 0 rank - ArrayND result(static_cast(0), 0U); + ArrayND result(static_cast(nullptr), 0U); Numeric sum = Numeric(); const unsigned imax = shape_[0]; for (unsigned i=0; i& shape) - {initialize(shape.empty() ? static_cast(0) : + {initialize(shape.empty() ? static_cast(nullptr) : &shape[0], shape.size());} //@} @@ -76,7 +76,7 @@ namespace npstat { {state_ = state <= maxState_ ? state : maxState_;} private: - ArrayNDScanner(); + ArrayNDScanner() = delete; void initialize(const unsigned* shape, unsigned lenShape); diff --git a/JetMETCorrections/InterpolationTables/interface/CoordinateSelector.h b/JetMETCorrections/InterpolationTables/interface/CoordinateSelector.h index 8e052ea108ecb..291fbe652e5c9 100644 --- a/JetMETCorrections/InterpolationTables/interface/CoordinateSelector.h +++ b/JetMETCorrections/InterpolationTables/interface/CoordinateSelector.h @@ -27,9 +27,9 @@ namespace npstat { public: inline explicit CoordinateSelector(const unsigned i) : index_(i) {} - inline virtual ~CoordinateSelector() {} + inline ~CoordinateSelector() override {} - inline double operator()(const double* point, const unsigned dim) const + inline double operator()(const double* point, const unsigned dim) const override { if (dim <= index_) throw npstat::NpstatInvalidArgument( @@ -37,11 +37,11 @@ namespace npstat { "input array dimensionality is too small"); return point[index_]; } - inline unsigned minDim() const {return index_ + 1U;} - inline unsigned maxDim() const {return UINT_MAX;} + inline unsigned minDim() const override {return index_ + 1U;} + inline unsigned maxDim() const override {return UINT_MAX;} private: - CoordinateSelector(); + CoordinateSelector() = delete; unsigned index_; }; } diff --git a/JetMETCorrections/InterpolationTables/interface/DualAxis.h b/JetMETCorrections/InterpolationTables/interface/DualAxis.h index 839475bd96aaf..f3cb277618421 100644 --- a/JetMETCorrections/InterpolationTables/interface/DualAxis.h +++ b/JetMETCorrections/InterpolationTables/interface/DualAxis.h @@ -32,7 +32,7 @@ namespace npstat { : a_(dummy_vec()), u_(u), uniform_(true) {} inline DualAxis(unsigned nCoords, double min, double max, - const char* label=0) + const char* label=nullptr) : a_(dummy_vec()), u_(nCoords, min, max, label), uniform_(true) {} inline explicit DualAxis(const std::vector& coords, @@ -95,10 +95,10 @@ namespace npstat { // constructed type. */ inline const GridAxis* getGridAxis() const - {return uniform_ ? static_cast(0) : &a_;} + {return uniform_ ? static_cast(nullptr) : &a_;} inline const UniformAxis* getUniformAxis() const - {return uniform_ ? &u_ : static_cast(0);} + {return uniform_ ? &u_ : static_cast(nullptr);} //@} /** Modify the axis label */ diff --git a/JetMETCorrections/InterpolationTables/interface/DualHistoAxis.h b/JetMETCorrections/InterpolationTables/interface/DualHistoAxis.h index 7084f81041efe..23b054461b5be 100644 --- a/JetMETCorrections/InterpolationTables/interface/DualHistoAxis.h +++ b/JetMETCorrections/InterpolationTables/interface/DualHistoAxis.h @@ -31,11 +31,11 @@ namespace npstat { : a_(dummy_vec()), u_(u), uniform_(true) {} inline DualHistoAxis(const std::vector& binEdges, - const char* label = 0) + const char* label = nullptr) : a_(binEdges, label), u_(1U, 0.0, 1.0), uniform_(false) {} inline DualHistoAxis(unsigned nBins, double min, double max, - const char* label = 0) + const char* label = nullptr) : a_(dummy_vec()), u_(nBins, min, max, label), uniform_(true) {} // Inspectors @@ -81,10 +81,10 @@ namespace npstat { // constructed type. */ inline const NUHistoAxis* getNUHistoAxis() const - {return uniform_ ? static_cast(0) : &a_;} + {return uniform_ ? static_cast(nullptr) : &a_;} inline const HistoAxis* getHistoAxis() const - {return uniform_ ? &u_ : static_cast(0);} + {return uniform_ ? &u_ : static_cast(nullptr);} //@} /** Modify the axis label */ diff --git a/JetMETCorrections/InterpolationTables/interface/EquidistantSequence.h b/JetMETCorrections/InterpolationTables/interface/EquidistantSequence.h index e22cf2ccaa30f..c5f1e82ebf310 100644 --- a/JetMETCorrections/InterpolationTables/interface/EquidistantSequence.h +++ b/JetMETCorrections/InterpolationTables/interface/EquidistantSequence.h @@ -27,7 +27,7 @@ namespace npstat { virtual ~EquidistantInLinearSpace() {} private: - EquidistantInLinearSpace(); + EquidistantInLinearSpace() = delete; }; /** @@ -43,7 +43,7 @@ namespace npstat { virtual ~EquidistantInLogSpace() {} private: - EquidistantInLogSpace(); + EquidistantInLogSpace() = delete; }; } diff --git a/JetMETCorrections/InterpolationTables/interface/HistoAxis.h b/JetMETCorrections/InterpolationTables/interface/HistoAxis.h index a45d49d86affa..46d65c72cd7bb 100644 --- a/JetMETCorrections/InterpolationTables/interface/HistoAxis.h +++ b/JetMETCorrections/InterpolationTables/interface/HistoAxis.h @@ -35,7 +35,7 @@ namespace npstat { // if the minimum parameter is larger than the maximum */ HistoAxis(unsigned nBins, double min, double max, - const char* label=0); + const char* label=nullptr); //@{ /** Examine axis properties */ diff --git a/JetMETCorrections/InterpolationTables/interface/HistoND.h b/JetMETCorrections/InterpolationTables/interface/HistoND.h index a3bc55202de92..faa4d543569b3 100644 --- a/JetMETCorrections/InterpolationTables/interface/HistoND.h +++ b/JetMETCorrections/InterpolationTables/interface/HistoND.h @@ -55,30 +55,30 @@ namespace npstat { }; /** Main constructor for arbitrary-dimensional histograms */ - explicit HistoND(const std::vector& axes, const char* title=0, - const char* accumulatedDataLabel=0); + explicit HistoND(const std::vector& axes, const char* title=nullptr, + const char* accumulatedDataLabel=nullptr); /** Convenience constructor for 1-d histograms */ - explicit HistoND(const Axis& xAxis, const char* title=0, - const char* accumulatedDataLabel=0); + explicit HistoND(const Axis& xAxis, const char* title=nullptr, + const char* accumulatedDataLabel=nullptr); /** Convenience constructor for 2-d histograms */ HistoND(const Axis& xAxis, const Axis& yAxis, - const char* title=0, const char* accumulatedDataLabel=0); + const char* title=nullptr, const char* accumulatedDataLabel=nullptr); /** Convenience constructor for 3-d histograms */ HistoND(const Axis& xAxis, const Axis& yAxis, const Axis& zAxis, - const char* title=0, const char* accumulatedDataLabel=0); + const char* title=nullptr, const char* accumulatedDataLabel=nullptr); /** Convenience constructor for 4-d histograms */ HistoND(const Axis& xAxis, const Axis& yAxis, const Axis& zAxis, const Axis& tAxis, - const char* title=0, const char* accumulatedDataLabel=0); + const char* title=nullptr, const char* accumulatedDataLabel=nullptr); /** Convenience constructor for 5-d histograms */ HistoND(const Axis& xAxis, const Axis& yAxis, const Axis& zAxis, const Axis& tAxis, const Axis& vAxis, - const char* title=0, const char* accumulatedDataLabel=0); + const char* title=nullptr, const char* accumulatedDataLabel=nullptr); /** // Simple constructor for uniformly binned histograms without @@ -86,7 +86,7 @@ namespace npstat { // both "shape" and "boundingBox" arguments must be the same. */ HistoND(const ArrayShape& shape, const BoxND& boundingBox, - const char* title=0, const char* accumulatedDataLabel=0); + const char* title=nullptr, const char* accumulatedDataLabel=nullptr); /** // Converting constructor. The functor will be applied to all bins @@ -96,7 +96,7 @@ namespace npstat { */ template HistoND(const HistoND& h, const Functor& f, - const char* title=0, const char* accumulatedDataLabel=0); + const char* title=nullptr, const char* accumulatedDataLabel=nullptr); /** // A slicing constructor. The new histogram will be created by @@ -107,7 +107,7 @@ namespace npstat { */ template HistoND(const HistoND& h, const unsigned *indices, - unsigned nIndices, const char* title=0); + unsigned nIndices, const char* title=nullptr); /** // A constructor that inserts a new axis into a histogram @@ -120,7 +120,7 @@ namespace npstat { */ template HistoND(const HistoND& h, const Axis& newAxis, - unsigned newAxisNumber, const char* title=0); + unsigned newAxisNumber, const char* title=nullptr); /** // Create a rebinned histogram with the same axis coverage. @@ -142,7 +142,7 @@ namespace npstat { template HistoND(const HistoND& h, RebinType rType, const unsigned *newBinCounts, unsigned lenNewBinCounts, - const double* shifts=0, const char* title=0); + const double* shifts=nullptr, const char* title=nullptr); /** Copy constructor */ HistoND(const HistoND&); @@ -843,7 +843,7 @@ namespace npstat { static HistoND* read(const gs::ClassId& id, std::istream& in); private: - HistoND(); + HistoND() = delete; // Special constructor which speeds up the "transpose" operation. // Does not do full error checking (some of it is done in transpose). diff --git a/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h b/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h index c3238f4b46fe8..c72e8dd39f35d 100644 --- a/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h +++ b/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h @@ -54,29 +54,29 @@ namespace npstat { LinInterpolatedTableND( const std::vector& axes, const std::vector >& extrapolationType, - const char* functionLabel=0); + const char* functionLabel=nullptr); /** Convenience constructor for 1-d interpolators */ LinInterpolatedTableND(const Axis& xAxis, bool leftX, bool rightX, - const char* functionLabel=0); + const char* functionLabel=nullptr); /** Convenience constructor for 2-d interpolators */ LinInterpolatedTableND(const Axis& xAxis, bool leftX, bool rightX, const Axis& yAxis, bool leftY, bool rightY, - const char* functionLabel=0); + const char* functionLabel=nullptr); /** Convenience constructor for 3-d interpolators */ LinInterpolatedTableND(const Axis& xAxis, bool leftX, bool rightX, const Axis& yAxis, bool leftY, bool rightY, const Axis& zAxis, bool leftZ, bool rightZ, - const char* functionLabel=0); + const char* functionLabel=nullptr); /** Convenience constructor for 4-d interpolators */ LinInterpolatedTableND(const Axis& xAxis, bool leftX, bool rightX, const Axis& yAxis, bool leftY, bool rightY, const Axis& zAxis, bool leftZ, bool rightZ, const Axis& tAxis, bool leftT, bool rightT, - const char* functionLabel=0); + const char* functionLabel=nullptr); /** Convenience constructor for 5-d interpolators */ LinInterpolatedTableND(const Axis& xAxis, bool leftX, bool rightX, @@ -84,7 +84,7 @@ namespace npstat { const Axis& zAxis, bool leftZ, bool rightZ, const Axis& tAxis, bool leftT, bool rightT, const Axis& vAxis, bool leftV, bool rightV, - const char* functionLabel=0); + const char* functionLabel=nullptr); /** // Converting copy constructor from interpolator @@ -162,7 +162,7 @@ namespace npstat { CPP11_auto_ptr invertWRTAxis( ConvertibleToUnsigned axisNumber, const Axis& replacementAxis, bool newAxisLeftLinear, bool newAxisRightLinear, - const char* functionLabel=0) const; + const char* functionLabel=nullptr) const; /** // This method inverts the ratio response. @@ -191,7 +191,7 @@ namespace npstat { unsigned axisNumber, const Axis& replacementAxis, bool newAxisLeftLinear, bool newAxisRightLinear, Functor1 invg, Functor2 invh, - const char* functionLabel=0) const; + const char* functionLabel=nullptr) const; /** Comparison for equality */ bool operator==(const LinInterpolatedTableND&) const; @@ -212,7 +212,7 @@ namespace npstat { const gs::ClassId& id, std::istream& in); private: - LinInterpolatedTableND(); + LinInterpolatedTableND() = delete; LinInterpolatedTableND( const ArrayND& data, diff --git a/JetMETCorrections/InterpolationTables/interface/NUHistoAxis.h b/JetMETCorrections/InterpolationTables/interface/NUHistoAxis.h index 0518f1f4979c3..053766156ae57 100644 --- a/JetMETCorrections/InterpolationTables/interface/NUHistoAxis.h +++ b/JetMETCorrections/InterpolationTables/interface/NUHistoAxis.h @@ -32,7 +32,7 @@ namespace npstat { // coordinates will be sorted internally in the increasing order. // The number of bins will be less by 1 than the number of edges. */ - NUHistoAxis(const std::vector& binEdges, const char* label = 0); + NUHistoAxis(const std::vector& binEdges, const char* label = nullptr); //@{ /** Examine axis properties */ @@ -108,7 +108,7 @@ namespace npstat { private: NUHistoAxis(unsigned nBins, double min, double max, - const char* label = 0); + const char* label = nullptr); double min_; double max_; diff --git a/JetMETCorrections/InterpolationTables/interface/NpstatException.h b/JetMETCorrections/InterpolationTables/interface/NpstatException.h index 987c8f4840066..7d68bfb26f532 100644 --- a/JetMETCorrections/InterpolationTables/interface/NpstatException.h +++ b/JetMETCorrections/InterpolationTables/interface/NpstatException.h @@ -27,7 +27,7 @@ namespace npstat { inline explicit NpstatException(const char* description) : cms::Exception(description) {} - virtual ~NpstatException() throw() {} + ~NpstatException() throw() override {} }; struct NpstatOutOfRange : public NpstatException @@ -37,7 +37,7 @@ namespace npstat { inline explicit NpstatOutOfRange(const std::string& description) : NpstatException(description) {} - virtual ~NpstatOutOfRange() throw() {} + ~NpstatOutOfRange() throw() override {} }; struct NpstatInvalidArgument : public NpstatException @@ -47,7 +47,7 @@ namespace npstat { inline explicit NpstatInvalidArgument(const std::string& description) : NpstatException(description) {} - virtual ~NpstatInvalidArgument() throw() {} + ~NpstatInvalidArgument() throw() override {} }; struct NpstatRuntimeError : public NpstatException @@ -57,7 +57,7 @@ namespace npstat { inline explicit NpstatRuntimeError(const std::string& description) : NpstatException(description) {} - virtual ~NpstatRuntimeError() throw() {} + ~NpstatRuntimeError() throw() override {} }; struct NpstatDomainError : public NpstatException @@ -67,7 +67,7 @@ namespace npstat { inline explicit NpstatDomainError(const std::string& description) : NpstatException(description) {} - virtual ~NpstatDomainError() throw() {} + ~NpstatDomainError() throw() override {} }; } diff --git a/JetMETCorrections/InterpolationTables/interface/SimpleFunctors.h b/JetMETCorrections/InterpolationTables/interface/SimpleFunctors.h index 1ac6683de6634..e36070f59adc3 100644 --- a/JetMETCorrections/InterpolationTables/interface/SimpleFunctors.h +++ b/JetMETCorrections/InterpolationTables/interface/SimpleFunctors.h @@ -63,7 +63,7 @@ namespace npstat { template struct Same : public Functor1 { - inline Result operator()(const Result& a) const {return a;} + inline Result operator()(const Result& a) const override {return a;} }; /** A simple functor which returns a reference to its argument */ @@ -138,7 +138,7 @@ namespace npstat { inline Result operator()() const {return fcn_();} private: - FcnFunctor0(); + FcnFunctor0() = delete; Result (*fcn_)(); }; @@ -154,7 +154,7 @@ namespace npstat { inline Result operator()(const Arg1& a) const {return fcn_(a);} private: - FcnFunctor1(); + FcnFunctor1() = delete; Result (*fcn_)(Arg1); }; @@ -171,7 +171,7 @@ namespace npstat { {return fcn_(x, y);} private: - FcnFunctor2(); + FcnFunctor2() = delete; Result (*fcn_)(Arg1, Arg2); }; @@ -188,7 +188,7 @@ namespace npstat { {return fcn_(x, y, z);} private: - FcnFunctor3(); + FcnFunctor3() = delete; Result (*fcn_)(Arg1, Arg2, Arg3); }; @@ -204,7 +204,7 @@ namespace npstat { inline Result operator()(const Container& c) const {return c[idx];} private: - Element1D(); + Element1D() = delete; unsigned long idx; }; @@ -220,7 +220,7 @@ namespace npstat { inline Result operator()(const Container& c) const {return c.at(idx);} private: - Element1DAt(); + Element1DAt() = delete; unsigned long idx; }; @@ -275,7 +275,7 @@ namespace npstat { {return left += w_*right;} private: - addmul_left(); + addmul_left() = delete; double w_; }; @@ -292,7 +292,7 @@ namespace npstat { {return right += w_*left;} private: - addmul_right(); + addmul_right() = delete; double w_; }; diff --git a/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h b/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h index 9c77100cc68fe..fc3bce227ed70 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h @@ -65,11 +65,11 @@ namespace npstat { table_(tab.table_, Same(), tab.title().c_str(), tab.accumulatedDataLabel().c_str()), deg_(tab.deg_) {} - virtual ~StorableHistoNDFunctor() {} + ~StorableHistoNDFunctor() override {} - virtual unsigned minDim() const {return table_.dim();}; + unsigned minDim() const override {return table_.dim();}; - virtual double operator()(const double* point, unsigned dim) const; + double operator()(const double* point, unsigned dim) const override; /** Retrieve interpolation degree */ inline unsigned interpolationDegree() const {return deg_;} @@ -97,8 +97,8 @@ namespace npstat { //@{ // Method related to "geners" I/O - virtual gs::ClassId classId() const {return gs::ClassId(*this);} - virtual bool write(std::ostream& of) const; + gs::ClassId classId() const override {return gs::ClassId(*this);} + bool write(std::ostream& of) const override; //@} // I/O methods needed for reading @@ -108,7 +108,7 @@ namespace npstat { const gs::ClassId& id, std::istream& in); protected: - virtual bool isEqual(const StorableMultivariateFunctor& other) const + bool isEqual(const StorableMultivariateFunctor& other) const override { // Note the use of static_cast rather than dynamic_cast below. // static_cast works faster and it is guaranteed to succeed here. @@ -119,7 +119,7 @@ namespace npstat { } private: - StorableHistoNDFunctor(); + StorableHistoNDFunctor() = delete; Table table_; unsigned deg_; diff --git a/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h b/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h index 62ee433a19da9..4a0f4c2b4f88c 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h @@ -65,20 +65,20 @@ namespace npstat { inline StorableInterpolationFunctor( const std::vector& axes, const std::vector >& interpolationType, - const char* functionLabel=0) + const char* functionLabel=nullptr) : StorableMultivariateFunctor(), table_(axes, interpolationType, functionLabel) {} inline StorableInterpolationFunctor( const Axis& xAxis, bool leftX, bool rightX, - const char* functionLabel=0) + const char* functionLabel=nullptr) : StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, functionLabel) {} inline StorableInterpolationFunctor( const Axis& xAxis, bool leftX, bool rightX, const Axis& yAxis, bool leftY, bool rightY, - const char* functionLabel=0) + const char* functionLabel=nullptr) : StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, yAxis, leftY, rightY, functionLabel) {} @@ -87,7 +87,7 @@ namespace npstat { const Axis& xAxis, bool leftX, bool rightX, const Axis& yAxis, bool leftY, bool rightY, const Axis& zAxis, bool leftZ, bool rightZ, - const char* functionLabel=0) + const char* functionLabel=nullptr) : StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, yAxis, leftY, rightY, @@ -98,7 +98,7 @@ namespace npstat { const Axis& yAxis, bool leftY, bool rightY, const Axis& zAxis, bool leftZ, bool rightZ, const Axis& tAxis, bool leftT, bool rightT, - const char* functionLabel=0) + const char* functionLabel=nullptr) : StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, yAxis, leftY, rightY, @@ -111,7 +111,7 @@ namespace npstat { const Axis& zAxis, bool leftZ, bool rightZ, const Axis& tAxis, bool leftT, bool rightT, const Axis& vAxis, bool leftV, bool rightV, - const char* functionLabel=0) + const char* functionLabel=nullptr) : StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, yAxis, leftY, rightY, @@ -120,11 +120,11 @@ namespace npstat { vAxis, leftV, rightV, functionLabel) {} //@} - virtual ~StorableInterpolationFunctor() {} + ~StorableInterpolationFunctor() override {} - virtual unsigned minDim() const {return table_.dim();}; + unsigned minDim() const override {return table_.dim();}; - virtual double operator()(const double* point, unsigned dim) const + double operator()(const double* point, unsigned dim) const override {return conv_(table_(point, dim));} //@{ @@ -144,8 +144,8 @@ namespace npstat { //@{ // Method related to "geners" I/O - virtual gs::ClassId classId() const {return gs::ClassId(*this);} - virtual bool write(std::ostream& of) const; + gs::ClassId classId() const override {return gs::ClassId(*this);} + bool write(std::ostream& of) const override; //@} // I/O methods needed for reading @@ -155,7 +155,7 @@ namespace npstat { const gs::ClassId& id, std::istream& in); protected: - virtual bool isEqual(const StorableMultivariateFunctor& other) const + bool isEqual(const StorableMultivariateFunctor& other) const override { // Note the use of static_cast rather than dynamic_cast below. // static_cast works faster and it is guaranteed to succeed here. @@ -166,7 +166,7 @@ namespace npstat { } private: - StorableInterpolationFunctor(); + StorableInterpolationFunctor() = delete; Table table_; Converter conv_; diff --git a/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctor.h b/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctor.h index 2032075117b12..ae6c3822d0629 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctor.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctor.h @@ -29,7 +29,7 @@ namespace npstat { inline explicit StorableMultivariateFunctor(const std::string& descr) : AbsMultivariateFunctor(), description_(descr) {} - inline virtual ~StorableMultivariateFunctor() {} + inline ~StorableMultivariateFunctor() override {} /** Retrieve the functor description */ inline const std::string& description() const {return description_;} diff --git a/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h b/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h index 5554ea7ef6c03..169f32116f1ee 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h @@ -25,7 +25,7 @@ namespace npstat { { typedef gs::DefaultReader Base; friend class gs::StaticReader; - StorableMultivariateFunctorReader(); + StorableMultivariateFunctorReader() = delete; }; /** The reader factory for descendants of StorableMultivariateFunctor */ diff --git a/JetMETCorrections/InterpolationTables/interface/UniformAxis.h b/JetMETCorrections/InterpolationTables/interface/UniformAxis.h index 183dea17ec9a2..b635eebba3e8e 100644 --- a/JetMETCorrections/InterpolationTables/interface/UniformAxis.h +++ b/JetMETCorrections/InterpolationTables/interface/UniformAxis.h @@ -29,7 +29,7 @@ namespace npstat { public: // The number of coordinates must be at least 2 UniformAxis(unsigned nCoords, double min, double max, - const char* label=0); + const char* label=nullptr); // Basic accessors inline unsigned nCoords() const {return npt_;} diff --git a/JetMETCorrections/InterpolationTables/interface/allocators.h b/JetMETCorrections/InterpolationTables/interface/allocators.h index c4369a1b7a646..dd55fb0dd582a 100644 --- a/JetMETCorrections/InterpolationTables/interface/allocators.h +++ b/JetMETCorrections/InterpolationTables/interface/allocators.h @@ -22,7 +22,7 @@ namespace npstat { inline T* makeBuffer(unsigned sizeNeeded, T* stackBuffer, unsigned sizeofStackBuffer) { - if (sizeNeeded > sizeofStackBuffer || stackBuffer == 0) + if (sizeNeeded > sizeofStackBuffer || stackBuffer == nullptr) return new T[sizeNeeded]; else return stackBuffer; diff --git a/JetMETCorrections/InterpolationTables/src/ArrayRange.cc b/JetMETCorrections/InterpolationTables/src/ArrayRange.cc index 1d3e3807feea9..9258a430be8e5 100644 --- a/JetMETCorrections/InterpolationTables/src/ArrayRange.cc +++ b/JetMETCorrections/InterpolationTables/src/ArrayRange.cc @@ -16,7 +16,7 @@ namespace npstat { bool ArrayRange::isCompatible(const ArrayShape& ishape) const { const unsigned imax = ishape.size(); - return isCompatible(imax ? &ishape[0] : (unsigned*)0, imax); + return isCompatible(imax ? &ishape[0] : (unsigned*)nullptr, imax); } bool ArrayRange::isCompatible(const unsigned* ishape, diff --git a/JetMETCorrections/InterpolationTables/src/StorableMultivariateFunctor.cc b/JetMETCorrections/InterpolationTables/src/StorableMultivariateFunctor.cc index 211ffaf598e58..d81384807d3da 100644 --- a/JetMETCorrections/InterpolationTables/src/StorableMultivariateFunctor.cc +++ b/JetMETCorrections/InterpolationTables/src/StorableMultivariateFunctor.cc @@ -15,7 +15,7 @@ namespace npstat { mesage += "\" is different from the object description string \""; mesage += description_; mesage += "\""; - throw npstat::NpstatRuntimeError(mesage.c_str()); + throw npstat::NpstatRuntimeError(mesage); } } diff --git a/JetMETCorrections/JetParton/interface/JetPartonCorrector.h b/JetMETCorrections/JetParton/interface/JetPartonCorrector.h index b25c4b9dc230a..d310df3bc31a8 100644 --- a/JetMETCorrections/JetParton/interface/JetPartonCorrector.h +++ b/JetMETCorrections/JetParton/interface/JetPartonCorrector.h @@ -22,14 +22,14 @@ class JetPartonCorrector : public JetCorrector { public: JetPartonCorrector(const edm::ParameterSet& fConfig); - virtual ~JetPartonCorrector(); + ~JetPartonCorrector() override; - virtual double correction (const LorentzVector& fJet) const; + double correction (const LorentzVector& fJet) const override; void setParameters(std::string aCalibrationType, double aJetFinderRadius, int aPartonMixture); /// if correction needs event information - virtual bool eventRequired () const {return false;} + bool eventRequired () const override {return false;} private: diff --git a/JetMETCorrections/JetParton/src/JetPartonCorrector.cc b/JetMETCorrections/JetParton/src/JetPartonCorrector.cc index 929ddb448995a..c8d151db6c5bc 100644 --- a/JetMETCorrections/JetParton/src/JetPartonCorrector.cc +++ b/JetMETCorrections/JetParton/src/JetPartonCorrector.cc @@ -105,7 +105,7 @@ class JetPartonCalibrationParameterSet{ double eta(int ieta){return etavector[ieta];} int type(int ieta){return typevector[ieta];} const vector& parameters(int ieta){return pars[ieta];} - bool valid(){return etavector.size();} + bool valid(){return !etavector.empty();} private: @@ -127,7 +127,7 @@ JetPartonCalibrationParameterSet::JetPartonCalibrationParameterSet(string tag){ // if ( f1.isLocal() ){ string line; while( std::getline( in, line) ){ - if(!line.size() || line[0]=='#') continue; + if(line.empty() || line[0]=='#') continue; istringstream linestream(line); double par; int type; diff --git a/JetMETCorrections/JetVertexAssociation/interface/JetVertexAssociation.h b/JetMETCorrections/JetVertexAssociation/interface/JetVertexAssociation.h index 8c5e03b0e3504..83a473ee9aa7a 100644 --- a/JetMETCorrections/JetVertexAssociation/interface/JetVertexAssociation.h +++ b/JetMETCorrections/JetVertexAssociation/interface/JetVertexAssociation.h @@ -30,9 +30,9 @@ namespace cms{ JetVertexAssociation (const edm::ParameterSet& ps); - ~JetVertexAssociation () {} + ~JetVertexAssociation () override {} - void produce(edm::Event& e, const edm::EventSetup& c); + void produce(edm::Event& e, const edm::EventSetup& c) override; private: typedef std::vector ResultCollection1; diff --git a/JetMETCorrections/JetVertexAssociation/src/JetVertexAssociation.cc b/JetMETCorrections/JetVertexAssociation/src/JetVertexAssociation.cc index e9f89582e532d..c883fb9d4c6f5 100644 --- a/JetMETCorrections/JetVertexAssociation/src/JetVertexAssociation.cc +++ b/JetMETCorrections/JetVertexAssociation/src/JetVertexAssociation.cc @@ -84,7 +84,7 @@ namespace cms{ double ptmax = -100.; VertexCollection::const_iterator vert = vertexes->begin (); - if(vertexes->size() > 0 ) { + if(!vertexes->empty() ) { for (; vert != vertexes->end (); vert++) { SIGNAL_V_Z = vert->z(); @@ -108,7 +108,7 @@ namespace cms{ CaloJetCollection::const_iterator jet = jets->begin (); - if(jets->size() > 0 ) { + if(!jets->empty() ) { for (; jet != jets->end (); jet++) { result = m_algo.Main(*jet, tracks, SIGNAL_V_Z, SIGNAL_V_Z_ERROR); result1->push_back(result.first); diff --git a/JetMETCorrections/JetVertexAssociation/src/JetVertexMain.cc b/JetMETCorrections/JetVertexAssociation/src/JetVertexMain.cc index 0a6cd6fb5950c..394c9e54351d8 100644 --- a/JetMETCorrections/JetVertexAssociation/src/JetVertexMain.cc +++ b/JetMETCorrections/JetVertexAssociation/src/JetVertexMain.cc @@ -38,7 +38,7 @@ std::pair JetVertexMain::Main(const reco::CaloJet& jet, edm::Handle TrackCollection::const_iterator track = tracks->begin (); - if (tracks->size() > 0 ) { + if (!tracks->empty() ) { for (; track != tracks->end (); track++) { double Vertex_Z = track->vz(); double Vertex_Z_Error = track->dzError(); diff --git a/JetMETCorrections/MCJet/bin/L2Correction.cc b/JetMETCorrections/MCJet/bin/L2Correction.cc index 2ce6fd9c772d3..123751434eedf 100644 --- a/JetMETCorrections/MCJet/bin/L2Correction.cc +++ b/JetMETCorrections/MCJet/bin/L2Correction.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include diff --git a/JetMETCorrections/MCJet/bin/L3Correction.cc b/JetMETCorrections/MCJet/bin/L3Correction.cc index 906dfbfe23f43..d6d39e4a111a5 100644 --- a/JetMETCorrections/MCJet/bin/L3Correction.cc +++ b/JetMETCorrections/MCJet/bin/L3Correction.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include diff --git a/JetMETCorrections/MCJet/bin/ReadTree.cc b/JetMETCorrections/MCJet/bin/ReadTree.cc index 8a1afd537c9a2..4b5a3f8a6c139 100644 --- a/JetMETCorrections/MCJet/bin/ReadTree.cc +++ b/JetMETCorrections/MCJet/bin/ReadTree.cc @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/JetMETCorrections/MCJet/bin/ResponseFitter.cc b/JetMETCorrections/MCJet/bin/ResponseFitter.cc index 2a89474f8f9ff..89119e41f2daf 100644 --- a/JetMETCorrections/MCJet/bin/ResponseFitter.cc +++ b/JetMETCorrections/MCJet/bin/ResponseFitter.cc @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/JetMETCorrections/MCJet/bin/Utilities.h b/JetMETCorrections/MCJet/bin/Utilities.h index 140b976260917..f07f97611e67b 100644 --- a/JetMETCorrections/MCJet/bin/Utilities.h +++ b/JetMETCorrections/MCJet/bin/Utilities.h @@ -248,7 +248,7 @@ bool CommandLine::check() } } - if (_unknowns.size()>0) { + if (!_unknowns.empty()) { result = false; std::cout<<"\nCommandLine WARNING: "<<_unknowns.size() <<" the followingparameters *must* be provided:"<cd(); mcTruthTree_->Write(); } - file_ = 0; + file_ = nullptr; } ////////////////////////////////////////////////////////////////////////////////////////// void CaloMCTruthTreeProducer::analyze(edm::Event const& event, edm::EventSetup const& iSetup) @@ -71,7 +71,7 @@ void CaloMCTruthTreeProducer::analyze(edm::Event const& event, edm::EventSetup c ptHat_ = hEventInfo->binningValues()[0]; float rr; int njet(0); - if (jets->size()>0 && genjets->size()>0) + if (!jets->empty() && !genjets->empty()) { for (i_genjet = genjets->begin(); i_genjet != genjets->end(); i_genjet++) { diff --git a/JetMETCorrections/MCJet/plugins/CaloMCTruthTreeProducer.h b/JetMETCorrections/MCJet/plugins/CaloMCTruthTreeProducer.h index 2690e4e15b640..7eda1c325cbf5 100644 --- a/JetMETCorrections/MCJet/plugins/CaloMCTruthTreeProducer.h +++ b/JetMETCorrections/MCJet/plugins/CaloMCTruthTreeProducer.h @@ -14,10 +14,10 @@ class CaloMCTruthTreeProducer : public edm::EDAnalyzer { public: explicit CaloMCTruthTreeProducer(edm::ParameterSet const& cfg); - virtual void beginJob(); - virtual void analyze(edm::Event const& e, edm::EventSetup const& iSetup); - virtual void endJob(); - ~CaloMCTruthTreeProducer(); + void beginJob() override; + void analyze(edm::Event const& e, edm::EventSetup const& iSetup) override; + void endJob() override; + ~CaloMCTruthTreeProducer() override; private: std::string histogramFile_; diff --git a/JetMETCorrections/MCJet/plugins/PFMCTruthTreeProducer.cc b/JetMETCorrections/MCJet/plugins/PFMCTruthTreeProducer.cc index 4c2ebcae563af..c798aa4f663ff 100644 --- a/JetMETCorrections/MCJet/plugins/PFMCTruthTreeProducer.cc +++ b/JetMETCorrections/MCJet/plugins/PFMCTruthTreeProducer.cc @@ -55,12 +55,12 @@ void PFMCTruthTreeProducer::beginJob() ////////////////////////////////////////////////////////////////////////////////////////// void PFMCTruthTreeProducer::endJob() { - if (file_ !=0) + if (file_ !=nullptr) { file_->cd(); mcTruthTree_->Write(); } - file_ = 0; + file_ = nullptr; } ////////////////////////////////////////////////////////////////////////////////////////// void PFMCTruthTreeProducer::analyze(edm::Event const& event, edm::EventSetup const& iSetup) @@ -76,7 +76,7 @@ void PFMCTruthTreeProducer::analyze(edm::Event const& event, edm::EventSetup con ptHat_ = hEventInfo->binningValues()[0]; float rr; int njet(0); - if (jets->size()>0 && genjets->size()>0) + if (!jets->empty() && !genjets->empty()) { for (i_genjet = genjets->begin(); i_genjet != genjets->end(); i_genjet++) { diff --git a/JetMETCorrections/MCJet/plugins/PFMCTruthTreeProducer.h b/JetMETCorrections/MCJet/plugins/PFMCTruthTreeProducer.h index b17e5febe6669..aa032c4bb6900 100644 --- a/JetMETCorrections/MCJet/plugins/PFMCTruthTreeProducer.h +++ b/JetMETCorrections/MCJet/plugins/PFMCTruthTreeProducer.h @@ -14,10 +14,10 @@ class PFMCTruthTreeProducer : public edm::EDAnalyzer { public: explicit PFMCTruthTreeProducer(edm::ParameterSet const& cfg); - virtual void beginJob(); - virtual void analyze(edm::Event const& e, edm::EventSetup const& iSetup); - virtual void endJob(); - ~PFMCTruthTreeProducer(); + void beginJob() override; + void analyze(edm::Event const& e, edm::EventSetup const& iSetup) override; + void endJob() override; + ~PFMCTruthTreeProducer() override; private: std::string histogramFile_; diff --git a/JetMETCorrections/Modules/interface/CorrectedJetProducer.h b/JetMETCorrections/Modules/interface/CorrectedJetProducer.h index 2dc8eae0ab68c..9d69e960ac269 100644 --- a/JetMETCorrections/Modules/interface/CorrectedJetProducer.h +++ b/JetMETCorrections/Modules/interface/CorrectedJetProducer.h @@ -30,8 +30,8 @@ namespace reco public: typedef std::vector JetCollection; explicit CorrectedJetProducer (const edm::ParameterSet& fParameters); - virtual ~CorrectedJetProducer () {} - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + ~CorrectedJetProducer () override {} + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; private: const edm::EDGetTokenT mInput; const std::vector > mCorrectorTokens; diff --git a/JetMETCorrections/Modules/interface/JetCorrectionESChain.h b/JetMETCorrections/Modules/interface/JetCorrectionESChain.h index d66a7d3e19751..26d4f7904a22d 100644 --- a/JetMETCorrections/Modules/interface/JetCorrectionESChain.h +++ b/JetMETCorrections/Modules/interface/JetCorrectionESChain.h @@ -23,7 +23,7 @@ namespace edm { class JetCorrectionESChain : public edm::ESProducer { public: JetCorrectionESChain(edm::ParameterSet const& fParameters); - ~JetCorrectionESChain(); + ~JetCorrectionESChain() override; std::shared_ptr produce(JetCorrectionsRecord const& ); diff --git a/JetMETCorrections/Modules/interface/JetCorrectionESProducer.h b/JetMETCorrections/Modules/interface/JetCorrectionESProducer.h index 0689bbcac980c..83336429cb78d 100644 --- a/JetMETCorrections/Modules/interface/JetCorrectionESProducer.h +++ b/JetMETCorrections/Modules/interface/JetCorrectionESProducer.h @@ -40,7 +40,7 @@ class JetCorrectionESProducer : public edm::ESProducer setWhatProduced(this, label); } - ~JetCorrectionESProducer() {} + ~JetCorrectionESProducer() override {} std::shared_ptr produce(JetCorrectionsRecord const& iRecord) { diff --git a/JetMETCorrections/Modules/interface/JetCorrectionESSource.h b/JetMETCorrections/Modules/interface/JetCorrectionESSource.h index 6a23c5edc1e0a..ad1682c1ef09e 100644 --- a/JetMETCorrections/Modules/interface/JetCorrectionESSource.h +++ b/JetMETCorrections/Modules/interface/JetCorrectionESSource.h @@ -58,7 +58,7 @@ class JetCorrectionESSource : public edm::ESProducer, findingRecord(); } - ~JetCorrectionESSource() {} + ~JetCorrectionESSource() override {} std::shared_ptr produce(JetCorrectionsRecord const& iRecord) { @@ -77,7 +77,7 @@ class JetCorrectionESSource : public edm::ESProducer, return std::make_shared(*tmpJetCorPar, mParameterSet); } - void setIntervalFor(edm::eventsetup::EventSetupRecordKey const&, edm::IOVSyncValue const&, edm::ValidityInterval& fIOV) + void setIntervalFor(edm::eventsetup::EventSetupRecordKey const&, edm::IOVSyncValue const&, edm::ValidityInterval& fIOV) override { fIOV = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime()); // anytime } diff --git a/JetMETCorrections/Modules/interface/JetCorrectionProducer.h b/JetMETCorrections/Modules/interface/JetCorrectionProducer.h index 06746ff1966e7..beb5475aeb34f 100644 --- a/JetMETCorrections/Modules/interface/JetCorrectionProducer.h +++ b/JetMETCorrections/Modules/interface/JetCorrectionProducer.h @@ -33,8 +33,8 @@ namespace cms public: typedef std::vector JetCollection; explicit JetCorrectionProducer (const edm::ParameterSet& fParameters); - virtual ~JetCorrectionProducer () {} - virtual void produce(edm::Event&, const edm::EventSetup&); + ~JetCorrectionProducer () override {} + void produce(edm::Event&, const edm::EventSetup&) override; private: edm::EDGetTokenT mInput; std::vector mCorrectorNames; @@ -53,7 +53,7 @@ namespace cms { JetCorrectionProducer::JetCorrectionProducer(const edm::ParameterSet& fConfig) : mInput(consumes(fConfig.getParameter ("src"))) , mCorrectorNames(fConfig.getParameter >("correctors")) - , mCorrectors(mCorrectorNames.size(), 0) + , mCorrectors(mCorrectorNames.size(), nullptr) , mCacheId (0) , mVerbose (fConfig.getUntrackedParameter ("verbose", false)) { diff --git a/JetMETCorrections/Modules/interface/JetResolutionESProducer.h b/JetMETCorrections/Modules/interface/JetResolutionESProducer.h index 1f7478cb233c9..00f5c31a962ba 100644 --- a/JetMETCorrections/Modules/interface/JetResolutionESProducer.h +++ b/JetMETCorrections/Modules/interface/JetResolutionESProducer.h @@ -29,7 +29,7 @@ class JetResolutionESProducer : public edm::ESProducer setWhatProduced(this, m_label); } - ~JetResolutionESProducer() {} + ~JetResolutionESProducer() override {} std::shared_ptr produce(JetResolutionRcd const& iRecord) { @@ -55,7 +55,7 @@ class JetResolutionScaleFactorESProducer : public edm::ESProducer setWhatProduced(this, m_label); } - ~JetResolutionScaleFactorESProducer() {} + ~JetResolutionScaleFactorESProducer() override {} std::shared_ptr produce(JetResolutionScaleFactorRcd const& iRecord) { diff --git a/JetMETCorrections/Modules/interface/QGLikelihoodESProducer.h b/JetMETCorrections/Modules/interface/QGLikelihoodESProducer.h index 73c6a1c490c26..0750b25e65188 100644 --- a/JetMETCorrections/Modules/interface/QGLikelihoodESProducer.h +++ b/JetMETCorrections/Modules/interface/QGLikelihoodESProducer.h @@ -19,7 +19,7 @@ class QGLikelihoodESProducer : public edm::ESProducer{ public: QGLikelihoodESProducer(const edm::ParameterSet&); - ~QGLikelihoodESProducer(){}; + ~QGLikelihoodESProducer() override{}; std::shared_ptr produce(const QGLikelihoodRcd&); void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &); diff --git a/JetMETCorrections/Modules/interface/QGLikelihoodSystematicsESProducer.h b/JetMETCorrections/Modules/interface/QGLikelihoodSystematicsESProducer.h index fc570e064667a..9f6779fc43274 100644 --- a/JetMETCorrections/Modules/interface/QGLikelihoodSystematicsESProducer.h +++ b/JetMETCorrections/Modules/interface/QGLikelihoodSystematicsESProducer.h @@ -19,7 +19,7 @@ class QGLikelihoodSystematicsESProducer : public edm::ESProducer{ public: QGLikelihoodSystematicsESProducer(const edm::ParameterSet&); - ~QGLikelihoodSystematicsESProducer(){}; + ~QGLikelihoodSystematicsESProducer() override{}; std::shared_ptr produce(const QGLikelihoodSystematicsRcd&); void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &); diff --git a/JetMETCorrections/Modules/plugins/ChainedJetCorrectorProducer.cc b/JetMETCorrections/Modules/plugins/ChainedJetCorrectorProducer.cc index 9ec68ce282663..cff6d3a469382 100644 --- a/JetMETCorrections/Modules/plugins/ChainedJetCorrectorProducer.cc +++ b/JetMETCorrections/Modules/plugins/ChainedJetCorrectorProducer.cc @@ -50,17 +50,17 @@ namespace { ChainedJetCorrectorImpl(std::vector correctors): jetCorrectors_(std::move(correctors)) {} - virtual double correction (const LorentzVector& fJet) const override; + double correction (const LorentzVector& fJet) const override; /// apply correction using Jet information only - virtual double correction (const reco::Jet& fJet) const override; + double correction (const reco::Jet& fJet) const override; /// apply correction using Ref - virtual double correction (const reco::Jet& fJet, + double correction (const reco::Jet& fJet, const edm::RefToBase& fJetRef) const override ; /// if correction needs the jet reference - virtual bool refRequired () const override; + bool refRequired () const override; private: std::vector jetCorrectors_; @@ -124,7 +124,7 @@ class ChainedJetCorrectorProducer : public edm::stream::EDProducer<> { static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- std::vector> correctorTokens_; diff --git a/JetMETCorrections/Modules/plugins/FactorizedJetCorrectorDemo.cc b/JetMETCorrections/Modules/plugins/FactorizedJetCorrectorDemo.cc index 8b02ec3dc2ded..8207e55f5c743 100644 --- a/JetMETCorrections/Modules/plugins/FactorizedJetCorrectorDemo.cc +++ b/JetMETCorrections/Modules/plugins/FactorizedJetCorrectorDemo.cc @@ -29,13 +29,13 @@ class FactorizedJetCorrectorDemo : public edm::EDAnalyzer { public: explicit FactorizedJetCorrectorDemo(const edm::ParameterSet&); - ~FactorizedJetCorrectorDemo(); + ~FactorizedJetCorrectorDemo() override; typedef reco::Particle::LorentzVector LorentzVector; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; std::string mJetCorService,mPayloadName,mUncertaintyTag,mUncertaintyFile; std::vector mLevels; diff --git a/JetMETCorrections/Modules/plugins/JetCorrectorDBReader.cc b/JetMETCorrections/Modules/plugins/JetCorrectorDBReader.cc index 284f1908e2018..5b179cd822aa8 100644 --- a/JetMETCorrections/Modules/plugins/JetCorrectorDBReader.cc +++ b/JetMETCorrections/Modules/plugins/JetCorrectorDBReader.cc @@ -38,13 +38,13 @@ class JetCorrectorDBReader : public edm::EDAnalyzer { public: explicit JetCorrectorDBReader(const edm::ParameterSet&); - ~JetCorrectorDBReader(); + ~JetCorrectorDBReader() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; std::string mPayloadName,mGlobalTag; bool mCreateTextFile,mPrintScreen; diff --git a/JetMETCorrections/Modules/plugins/JetCorrectorDBWriter.cc b/JetMETCorrections/Modules/plugins/JetCorrectorDBWriter.cc index 6143c35a8e9e7..819c5c2100b23 100644 --- a/JetMETCorrections/Modules/plugins/JetCorrectorDBWriter.cc +++ b/JetMETCorrections/Modules/plugins/JetCorrectorDBWriter.cc @@ -19,10 +19,10 @@ class JetCorrectorDBWriter : public edm::EDAnalyzer { public: JetCorrectorDBWriter(const edm::ParameterSet&); - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override {} - virtual void endJob() override {} - ~JetCorrectorDBWriter() {} + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override {} + void endJob() override {} + ~JetCorrectorDBWriter() override {} private: std::string era; @@ -64,7 +64,7 @@ void JetCorrectorDBWriter::beginJob() // create the parameter object from file std::vector sections; JetCorrectorParametersCollection::getSections(fip.fullPath(), sections ); - if ( sections.size() == 0 ) { + if ( sections.empty() ) { payload->push_back( i, JetCorrectorParameters(fip.fullPath(),"") ); } else { diff --git a/JetMETCorrections/Modules/plugins/JetCorrectorDemo.cc b/JetMETCorrections/Modules/plugins/JetCorrectorDemo.cc index b75dd939b3c6c..cc531ff723a41 100644 --- a/JetMETCorrections/Modules/plugins/JetCorrectorDemo.cc +++ b/JetMETCorrections/Modules/plugins/JetCorrectorDemo.cc @@ -28,13 +28,13 @@ class JetCorrectorDemo : public edm::EDAnalyzer { public: explicit JetCorrectorDemo(const edm::ParameterSet&); - ~JetCorrectorDemo(); + ~JetCorrectorDemo() override; typedef reco::Particle::LorentzVector LorentzVector; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; edm::EDGetTokenT mJetCorrector; std::string mPayloadName,mUncertaintyTag,mUncertaintyFile; @@ -81,7 +81,7 @@ void JetCorrectorDemo::analyze(const edm::Event& iEvent, const edm::EventSetup& { edm::Handle corrector; iEvent.getByToken(mJetCorrector, corrector); - JetCorrectionUncertainty *jecUnc(0); + JetCorrectionUncertainty *jecUnc(nullptr); if (mUncertaintyTag != "") { if (mUseCondDB) diff --git a/JetMETCorrections/Modules/plugins/JetCorrectorOnTheFly.cc b/JetMETCorrections/Modules/plugins/JetCorrectorOnTheFly.cc index 7cf21e4d64541..770040c75a8b2 100644 --- a/JetMETCorrections/Modules/plugins/JetCorrectorOnTheFly.cc +++ b/JetMETCorrections/Modules/plugins/JetCorrectorOnTheFly.cc @@ -29,13 +29,13 @@ template class JetCorrectorOnTheFly : public edm::EDAnalyzer { public: explicit JetCorrectorOnTheFly(const edm::ParameterSet&); - ~JetCorrectorOnTheFly(); + ~JetCorrectorOnTheFly() override; private: typedef std::vector JetCollection; - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; edm::Service fs; edm::EDGetTokenT mJetCorrector; diff --git a/JetMETCorrections/Modules/plugins/JetResolutionDBReader.cc b/JetMETCorrections/Modules/plugins/JetResolutionDBReader.cc index fd4ae6b4ae346..6ec5fa1a087fd 100644 --- a/JetMETCorrections/Modules/plugins/JetResolutionDBReader.cc +++ b/JetMETCorrections/Modules/plugins/JetResolutionDBReader.cc @@ -28,13 +28,13 @@ class JetResolutionDBReader : public edm::EDAnalyzer { public: explicit JetResolutionDBReader(const edm::ParameterSet&); - ~JetResolutionDBReader(); + ~JetResolutionDBReader() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; std::string m_era; std::string m_label; @@ -49,7 +49,7 @@ class JetResolutionScaleFactorDBReader : public edm::EDAnalyzer { private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; std::string m_era; std::string m_label; diff --git a/JetMETCorrections/Modules/plugins/JetResolutionDBWriter.cc b/JetMETCorrections/Modules/plugins/JetResolutionDBWriter.cc index ea538e907e67b..fb33fb4e8a321 100644 --- a/JetMETCorrections/Modules/plugins/JetResolutionDBWriter.cc +++ b/JetMETCorrections/Modules/plugins/JetResolutionDBWriter.cc @@ -18,10 +18,10 @@ class JetResolutionDBWriter : public edm::EDAnalyzer { public: JetResolutionDBWriter(const edm::ParameterSet&); - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override {} - virtual void endJob() override {} - ~JetResolutionDBWriter() {} + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override {} + void endJob() override {} + ~JetResolutionDBWriter() override {} private: std::string m_record; diff --git a/JetMETCorrections/Modules/plugins/JetResolutionDemo.cc b/JetMETCorrections/Modules/plugins/JetResolutionDemo.cc index 7652d379269f3..4a3d977c707d9 100644 --- a/JetMETCorrections/Modules/plugins/JetResolutionDemo.cc +++ b/JetMETCorrections/Modules/plugins/JetResolutionDemo.cc @@ -25,11 +25,11 @@ class JetResolutionDemo : public edm::EDAnalyzer { public: explicit JetResolutionDemo(const edm::ParameterSet&); - ~JetResolutionDemo(); + ~JetResolutionDemo() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; edm::EDGetTokenT> m_jets_token; edm::EDGetTokenT m_rho_token; diff --git a/JetMETCorrections/Modules/plugins/METCorrectorDBReader.cc b/JetMETCorrections/Modules/plugins/METCorrectorDBReader.cc index f152a8d6bc16a..25805a599f865 100644 --- a/JetMETCorrections/Modules/plugins/METCorrectorDBReader.cc +++ b/JetMETCorrections/Modules/plugins/METCorrectorDBReader.cc @@ -38,13 +38,13 @@ namespace{ class METCorrectorDBReader : public edm::one::EDAnalyzer<> { public: explicit METCorrectorDBReader(const edm::ParameterSet&); - ~METCorrectorDBReader(); + ~METCorrectorDBReader() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; std::string mPayloadName,mGlobalTag; bool mCreateTextFile,mPrintScreen; diff --git a/JetMETCorrections/Modules/plugins/METCorrectorDBWriter.cc b/JetMETCorrections/Modules/plugins/METCorrectorDBWriter.cc index 6efce5933529d..2d352774b141e 100644 --- a/JetMETCorrections/Modules/plugins/METCorrectorDBWriter.cc +++ b/JetMETCorrections/Modules/plugins/METCorrectorDBWriter.cc @@ -19,10 +19,10 @@ class METCorrectorDBWriter : public edm::one::EDAnalyzer<> { public: METCorrectorDBWriter(const edm::ParameterSet&); - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override {} - virtual void endJob() override {} - ~METCorrectorDBWriter() {} + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override {} + void endJob() override {} + ~METCorrectorDBWriter() override {} private: std::string era; @@ -64,7 +64,7 @@ void METCorrectorDBWriter::beginJob() std::vector sections; payload->getSections(fip.fullPath(), sections ); //MEtXYcorrectParametersCollection::getSections(fip.fullPath(), sections ); - if(sections.size() == 0){ + if(sections.empty()){ payload->push_back(ilev, MEtXYcorrectParameters(fip.fullPath(),"") ); }else{ for ( std::vector::const_iterator isectbegin = sections.begin(), isectend = sections.end(), isect = isectbegin; diff --git a/JetMETCorrections/Modules/plugins/QGLikelihoodDBReader.cc b/JetMETCorrections/Modules/plugins/QGLikelihoodDBReader.cc index 038d1453136d4..a68baefbdcdb6 100644 --- a/JetMETCorrections/Modules/plugins/QGLikelihoodDBReader.cc +++ b/JetMETCorrections/Modules/plugins/QGLikelihoodDBReader.cc @@ -13,12 +13,12 @@ class QGLikelihoodDBReader : public edm::EDAnalyzer{ public: explicit QGLikelihoodDBReader(const edm::ParameterSet&); - ~QGLikelihoodDBReader(){}; + ~QGLikelihoodDBReader() override{}; private: - virtual void beginJob() override{}; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override{}; + void beginJob() override{}; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override{}; std::string mPayloadName; bool mCreateTextFile,mPrintScreen; diff --git a/JetMETCorrections/Modules/plugins/QGLikelihoodDBWriter.cc b/JetMETCorrections/Modules/plugins/QGLikelihoodDBWriter.cc index 76c5085605e75..1c848fbee5106 100644 --- a/JetMETCorrections/Modules/plugins/QGLikelihoodDBWriter.cc +++ b/JetMETCorrections/Modules/plugins/QGLikelihoodDBWriter.cc @@ -7,7 +7,7 @@ #include "TKey.h" #include "TH1.h" #include -#include +#include #include #include #include @@ -24,10 +24,10 @@ class QGLikelihoodDBWriter : public edm::EDAnalyzer{ public: QGLikelihoodDBWriter(const edm::ParameterSet&); - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override {} - virtual void endJob() override {} - ~QGLikelihoodDBWriter(){} + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override {} + void endJob() override {} + ~QGLikelihoodDBWriter() override{} private: bool getVectorFromFile(TFile*, std::vector&, const TString&); diff --git a/JetMETCorrections/Modules/plugins/QGLikelihoodSystematicsDBReader.cc b/JetMETCorrections/Modules/plugins/QGLikelihoodSystematicsDBReader.cc index 969c36d52bfab..bf70645f54dc5 100644 --- a/JetMETCorrections/Modules/plugins/QGLikelihoodSystematicsDBReader.cc +++ b/JetMETCorrections/Modules/plugins/QGLikelihoodSystematicsDBReader.cc @@ -13,12 +13,12 @@ class QGLikelihoodSystematicsDBReader : public edm::EDAnalyzer{ public: explicit QGLikelihoodSystematicsDBReader(const edm::ParameterSet&); - ~QGLikelihoodSystematicsDBReader(){}; + ~QGLikelihoodSystematicsDBReader() override{}; private: - virtual void beginJob() override{}; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override{}; + void beginJob() override{}; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override{}; std::string mPayloadName; bool mCreateTextFile,mPrintScreen; diff --git a/JetMETCorrections/Modules/plugins/QGLikelihoodSystematicsDBWriter.cc b/JetMETCorrections/Modules/plugins/QGLikelihoodSystematicsDBWriter.cc index 0545d4f39fc0c..0a3e7f30cb462 100644 --- a/JetMETCorrections/Modules/plugins/QGLikelihoodSystematicsDBWriter.cc +++ b/JetMETCorrections/Modules/plugins/QGLikelihoodSystematicsDBWriter.cc @@ -18,10 +18,10 @@ class QGLikelihoodSystematicsDBWriter : public edm::EDAnalyzer{ public: QGLikelihoodSystematicsDBWriter(const edm::ParameterSet&); - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override {} - virtual void endJob() override {} - ~QGLikelihoodSystematicsDBWriter() {} + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override {} + void endJob() override {} + ~QGLikelihoodSystematicsDBWriter() override {} private: std::string fileName; diff --git a/JetMETCorrections/Objects/interface/ChainedJetCorrector.h b/JetMETCorrections/Objects/interface/ChainedJetCorrector.h index 41c6d463909b1..3b0273e2fe529 100644 --- a/JetMETCorrections/Objects/interface/ChainedJetCorrector.h +++ b/JetMETCorrections/Objects/interface/ChainedJetCorrector.h @@ -16,20 +16,20 @@ class ChainedJetCorrector : public JetCorrector { public: ChainedJetCorrector (){} - virtual ~ChainedJetCorrector () {} + ~ChainedJetCorrector () override {} - virtual double correction (const JetCorrector::LorentzVector& fJet) const; - virtual double correction (const reco::Jet& fJet) const; - virtual double correction (const reco::Jet& fJet, + double correction (const JetCorrector::LorentzVector& fJet) const override; + double correction (const reco::Jet& fJet) const override; + double correction (const reco::Jet& fJet, const edm::Event& fEvent, - const edm::EventSetup& fSetup) const; - virtual double correction (const reco::Jet& fJet, + const edm::EventSetup& fSetup) const override; + double correction (const reco::Jet& fJet, const edm::RefToBase& fJetRef, const edm::Event& fEvent, - const edm::EventSetup& fSetup) const; + const edm::EventSetup& fSetup) const override; - virtual bool eventRequired () const; - virtual bool refRequired () const; + bool eventRequired () const override; + bool refRequired () const override; void push_back (const JetCorrector* fCorrector) {mCorrectors.push_back (fCorrector);} void clear () {mCorrectors.clear ();} diff --git a/JetMETCorrections/TauJet/interface/TauJetCorrector.h b/JetMETCorrections/TauJet/interface/TauJetCorrector.h index 41682288d84a9..31fef55b0d23c 100644 --- a/JetMETCorrections/TauJet/interface/TauJetCorrector.h +++ b/JetMETCorrections/TauJet/interface/TauJetCorrector.h @@ -15,13 +15,13 @@ class TauJetCorrector: public JetCorrector public: TauJetCorrector(const edm::ParameterSet& fParameters); - virtual ~TauJetCorrector(); - virtual double correction (const LorentzVector& fJet) const; - virtual double correction(const reco::Jet&) const; + ~TauJetCorrector() override; + double correction (const LorentzVector& fJet) const override; + double correction(const reco::Jet&) const override; void setParameters(std::string, int); /// if correction needs event information - virtual bool eventRequired () const {return false;} + bool eventRequired () const override {return false;} private: diff --git a/JetMETCorrections/TauJet/plugins/TauJetCorrectorExample.cc b/JetMETCorrections/TauJet/plugins/TauJetCorrectorExample.cc index eaec09587aa19..f8ee7fd7be9a6 100644 --- a/JetMETCorrections/TauJet/plugins/TauJetCorrectorExample.cc +++ b/JetMETCorrections/TauJet/plugins/TauJetCorrectorExample.cc @@ -61,13 +61,13 @@ Description: class TauJetCorrectorExample : public edm::EDAnalyzer { public: explicit TauJetCorrectorExample(const edm::ParameterSet&); - ~TauJetCorrectorExample(); + ~TauJetCorrectorExample() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- #ifdef THIS_IS_AN_EVENT_EXAMPLE diff --git a/JetMETCorrections/TauJet/src/TauJetCorrector.cc b/JetMETCorrections/TauJet/src/TauJetCorrector.cc index 2aa26b96faff0..92fd2502706ac 100644 --- a/JetMETCorrections/TauJet/src/TauJetCorrector.cc +++ b/JetMETCorrections/TauJet/src/TauJetCorrector.cc @@ -57,7 +57,7 @@ class JetCalibrationParameterSetTauJet{ double eta(int ieta){return etavector[ieta];} int type(int ieta){return typevector[ieta];} const vector& parameters(int ieta){return pars[ieta];} - bool valid(){return etavector.size();} + bool valid(){return !etavector.empty();} private: @@ -77,7 +77,7 @@ JetCalibrationParameterSetTauJet::JetCalibrationParameterSetTauJet(string tag){ //cout << " Start to read file "< produces("type2"); produces("offset"); } - ~CaloJetMETcorrInputProducerT() {} + ~CaloJetMETcorrInputProducerT() override {} private: diff --git a/JetMETCorrections/Type1MET/interface/JetCleanerForType1METT.h b/JetMETCorrections/Type1MET/interface/JetCleanerForType1METT.h index d5ffcbdf084ab..9f6355d37bbd9 100644 --- a/JetMETCorrections/Type1MET/interface/JetCleanerForType1METT.h +++ b/JetMETCorrections/Type1MET/interface/JetCleanerForType1METT.h @@ -125,7 +125,7 @@ class JetCleanerForType1METT : public edm::stream::EDProducer<> private: - void produce(edm::Event& evt, const edm::EventSetup& es) + void produce(edm::Event& evt, const edm::EventSetup& es) override { edm::Handle jetCorr; @@ -162,8 +162,8 @@ class JetCleanerForType1METT : public edm::stream::EDProducer<> for ( std::vector::const_iterator cand = cands.begin(); cand != cands.end(); ++cand ) { const reco::PFCandidate *pfcand = dynamic_cast(cand->get()); - const reco::Candidate *mu = (pfcand != 0 ? ( pfcand->muonRef().isNonnull() ? pfcand->muonRef().get() : 0) : cand->get()); - if ( mu != 0 && (*skipMuonSelection_)(*mu) ) { + const reco::Candidate *mu = (pfcand != nullptr ? ( pfcand->muonRef().isNonnull() ? pfcand->muonRef().get() : nullptr) : cand->get()); + if ( mu != nullptr && (*skipMuonSelection_)(*mu) ) { reco::Candidate::LorentzVector muonP4 = (*cand)->p4(); rawJetP4 -= muonP4; } diff --git a/JetMETCorrections/Type1MET/interface/METCorrectionAlgorithm.h b/JetMETCorrections/Type1MET/interface/METCorrectionAlgorithm.h index bc3ad9abd424d..bf387469c0942 100644 --- a/JetMETCorrections/Type1MET/interface/METCorrectionAlgorithm.h +++ b/JetMETCorrections/Type1MET/interface/METCorrectionAlgorithm.h @@ -57,7 +57,7 @@ class METCorrectionAlgorithm { type2BinningEntryType(const std::string& binCorrformula, const edm::ParameterSet& binCorrParameter, const vInputTag& srcUnclEnergySums, edm::ConsumesCollector & iConsumesCollector) : binLabel_(""), - binCorrFormula_(0) + binCorrFormula_(nullptr) { for (vInputTag::const_iterator inputTag = srcUnclEnergySums.begin(); inputTag != srcUnclEnergySums.end(); ++inputTag) { @@ -68,7 +68,7 @@ class METCorrectionAlgorithm } type2BinningEntryType(const edm::ParameterSet& cfg, const vInputTag& srcUnclEnergySums, edm::ConsumesCollector & iConsumesCollector) : binLabel_(cfg.getParameter("binLabel")), - binCorrFormula_(0) + binCorrFormula_(nullptr) { for ( vInputTag::const_iterator srcUnclEnergySum = srcUnclEnergySums.begin(); srcUnclEnergySum != srcUnclEnergySums.end(); ++srcUnclEnergySum ) @@ -80,7 +80,7 @@ class METCorrectionAlgorithm corrTokens_.push_back(iConsumesCollector.consumes(inputTag)); } - std::string binCorrFormula = cfg.getParameter("binCorrFormula").data(); + std::string binCorrFormula = cfg.getParameter("binCorrFormula"); edm::ParameterSet binCorrParameter = cfg.getParameter("binCorrParameter"); @@ -94,7 +94,7 @@ class METCorrectionAlgorithm int numParameter = parNames.size(); binCorrParameter_.resize(numParameter); for ( int parIndex = 0; parIndex < numParameter; ++parIndex ) { - const std::string& parName = parNames[parIndex].data(); + const std::string& parName = parNames[parIndex]; double parValue = binCorrParameter.getParameter(parName); binCorrParameter_[parIndex] = parValue; diff --git a/JetMETCorrections/Type1MET/interface/PFJetMETcorrInputProducerT.h b/JetMETCorrections/Type1MET/interface/PFJetMETcorrInputProducerT.h index 91b17545a508e..3e08935511c7f 100644 --- a/JetMETCorrections/Type1MET/interface/PFJetMETcorrInputProducerT.h +++ b/JetMETCorrections/Type1MET/interface/PFJetMETcorrInputProducerT.h @@ -80,7 +80,7 @@ class PFJetMETcorrInputProducerT : public edm::stream::EDProducer<> explicit PFJetMETcorrInputProducerT(const edm::ParameterSet& cfg) : moduleLabel_(cfg.getParameter("@module_label")), offsetCorrLabel_(""), - skipMuonSelection_(0) + skipMuonSelection_(nullptr) { token_ = consumes >(cfg.getParameter("src")); @@ -127,7 +127,7 @@ class PFJetMETcorrInputProducerT : public edm::stream::EDProducer<> produces((*type2BinningEntry)->getInstanceLabel_full("offset")); } } - ~PFJetMETcorrInputProducerT() + ~PFJetMETcorrInputProducerT() override { delete skipMuonSelection_; @@ -155,7 +155,7 @@ class PFJetMETcorrInputProducerT : public edm::stream::EDProducer<> private: - void produce(edm::Event& evt, const edm::EventSetup& es) + void produce(edm::Event& evt, const edm::EventSetup& es) override { std::unique_ptr type1Correction(new CorrMETData()); @@ -196,8 +196,8 @@ class PFJetMETcorrInputProducerT : public edm::stream::EDProducer<> for ( std::vector::const_iterator cand = cands.begin(); cand != cands.end(); ++cand ) { const reco::PFCandidate *pfcand = dynamic_cast(cand->get()); - const reco::Candidate *mu = (pfcand != 0 ? ( pfcand->muonRef().isNonnull() ? pfcand->muonRef().get() : 0) : cand->get()); - if ( mu != 0 && (*skipMuonSelection_)(*mu) ) { + const reco::Candidate *mu = (pfcand != nullptr ? ( pfcand->muonRef().isNonnull() ? pfcand->muonRef().get() : nullptr) : cand->get()); + if ( mu != nullptr && (*skipMuonSelection_)(*mu) ) { reco::Candidate::LorentzVector muonP4 = (*cand)->p4(); rawJetP4 -= muonP4; } @@ -291,7 +291,7 @@ class PFJetMETcorrInputProducerT : public edm::stream::EDProducer<> { type2BinningEntryType() : binLabel_(""), - binSelection_(0) + binSelection_(nullptr) {} type2BinningEntryType(const edm::ParameterSet& cfg) : binLabel_(cfg.getParameter("binLabel")), diff --git a/JetMETCorrections/Type1MET/plugins/CorrectedCaloMETProducer.cc b/JetMETCorrections/Type1MET/plugins/CorrectedCaloMETProducer.cc index 0d0d8a2bf0c80..b9435da4996f2 100644 --- a/JetMETCorrections/Type1MET/plugins/CorrectedCaloMETProducer.cc +++ b/JetMETCorrections/Type1MET/plugins/CorrectedCaloMETProducer.cc @@ -38,7 +38,7 @@ class CorrectedCaloMETProducer : public edm::stream::EDProducer<> produces(""); } - ~CorrectedCaloMETProducer() { } + ~CorrectedCaloMETProducer() override { } private: diff --git a/JetMETCorrections/Type1MET/plugins/CorrectedPFMETProducer.cc b/JetMETCorrections/Type1MET/plugins/CorrectedPFMETProducer.cc index 43b83c1e7476e..a2582318a10fd 100644 --- a/JetMETCorrections/Type1MET/plugins/CorrectedPFMETProducer.cc +++ b/JetMETCorrections/Type1MET/plugins/CorrectedPFMETProducer.cc @@ -42,7 +42,7 @@ class CorrectedPFMETProducer : public edm::stream::EDProducer<> produces(""); } - ~CorrectedPFMETProducer() { } + ~CorrectedPFMETProducer() override { } static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; diff --git a/JetMETCorrections/Type1MET/plugins/CorrectedPatMETProducer.cc b/JetMETCorrections/Type1MET/plugins/CorrectedPatMETProducer.cc index ed631b4b8409e..2eba3e0d78905 100644 --- a/JetMETCorrections/Type1MET/plugins/CorrectedPatMETProducer.cc +++ b/JetMETCorrections/Type1MET/plugins/CorrectedPatMETProducer.cc @@ -49,7 +49,7 @@ class CorrectedPatMETProducer : public edm::stream::EDProducer<> produces(""); } - ~CorrectedPatMETProducer() { } + ~CorrectedPatMETProducer() override { } private: diff --git a/JetMETCorrections/Type1MET/plugins/MultShiftMETcorrDBInputProducer.h b/JetMETCorrections/Type1MET/plugins/MultShiftMETcorrDBInputProducer.h index 58f76a849a80c..20e36ab9ca1f7 100644 --- a/JetMETCorrections/Type1MET/plugins/MultShiftMETcorrDBInputProducer.h +++ b/JetMETCorrections/Type1MET/plugins/MultShiftMETcorrDBInputProducer.h @@ -34,7 +34,7 @@ class MultShiftMETcorrDBInputProducer : public edm::stream::EDProducer<> public: explicit MultShiftMETcorrDBInputProducer(const edm::ParameterSet&); - ~MultShiftMETcorrDBInputProducer(); + ~MultShiftMETcorrDBInputProducer() override; private: diff --git a/JetMETCorrections/Type1MET/plugins/MultShiftMETcorrInputProducer.h b/JetMETCorrections/Type1MET/plugins/MultShiftMETcorrInputProducer.h index 015f4da1d1b67..dd25cf6039457 100644 --- a/JetMETCorrections/Type1MET/plugins/MultShiftMETcorrInputProducer.h +++ b/JetMETCorrections/Type1MET/plugins/MultShiftMETcorrInputProducer.h @@ -33,7 +33,7 @@ class MultShiftMETcorrInputProducer : public edm::stream::EDProducer<> public: explicit MultShiftMETcorrInputProducer(const edm::ParameterSet&); - ~MultShiftMETcorrInputProducer(); + ~MultShiftMETcorrInputProducer() override; private: diff --git a/JetMETCorrections/Type1MET/plugins/MuonMETcorrInputProducer.h b/JetMETCorrections/Type1MET/plugins/MuonMETcorrInputProducer.h index bae48cd0d10db..c7b6a3cb8a0b7 100644 --- a/JetMETCorrections/Type1MET/plugins/MuonMETcorrInputProducer.h +++ b/JetMETCorrections/Type1MET/plugins/MuonMETcorrInputProducer.h @@ -29,11 +29,11 @@ class MuonMETcorrInputProducer : public edm::stream::EDProducer<> public: explicit MuonMETcorrInputProducer(const edm::ParameterSet&); - ~MuonMETcorrInputProducer(); + ~MuonMETcorrInputProducer() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; std::string moduleLabel_; diff --git a/JetMETCorrections/Type1MET/plugins/PFCandMETcorrInputProducer.h b/JetMETCorrections/Type1MET/plugins/PFCandMETcorrInputProducer.h index f6a401e03c9e5..060fda96eae51 100644 --- a/JetMETCorrections/Type1MET/plugins/PFCandMETcorrInputProducer.h +++ b/JetMETCorrections/Type1MET/plugins/PFCandMETcorrInputProducer.h @@ -32,11 +32,11 @@ class PFCandMETcorrInputProducer : public edm::stream::EDProducer<> public: explicit PFCandMETcorrInputProducer(const edm::ParameterSet&); - ~PFCandMETcorrInputProducer(); + ~PFCandMETcorrInputProducer() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; std::string moduleLabel_; diff --git a/JetMETCorrections/Type1MET/plugins/PFchsMETcorrInputProducer.h b/JetMETCorrections/Type1MET/plugins/PFchsMETcorrInputProducer.h index 242d94b33d4b9..2794831b6c6fc 100644 --- a/JetMETCorrections/Type1MET/plugins/PFchsMETcorrInputProducer.h +++ b/JetMETCorrections/Type1MET/plugins/PFchsMETcorrInputProducer.h @@ -34,11 +34,11 @@ class PFchsMETcorrInputProducer : public edm::stream::EDProducer<> public: explicit PFchsMETcorrInputProducer(const edm::ParameterSet&); - ~PFchsMETcorrInputProducer(); + ~PFchsMETcorrInputProducer() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; std::string moduleLabel_; diff --git a/JetMETCorrections/Type1MET/plugins/ScaleCorrMETData.cc b/JetMETCorrections/Type1MET/plugins/ScaleCorrMETData.cc index 06f4eb08a0da9..f2b7c5e4c8ad9 100644 --- a/JetMETCorrections/Type1MET/plugins/ScaleCorrMETData.cc +++ b/JetMETCorrections/Type1MET/plugins/ScaleCorrMETData.cc @@ -18,7 +18,7 @@ class ScaleCorrMETData : public edm::stream::EDProducer<> { public: explicit ScaleCorrMETData(const edm::ParameterSet&); - ~ScaleCorrMETData() { } + ~ScaleCorrMETData() override { } private: diff --git a/JetMETCorrections/Type1MET/plugins/SysShiftMETcorrInputProducer.cc b/JetMETCorrections/Type1MET/plugins/SysShiftMETcorrInputProducer.cc index dc83482cc5b0b..9fa0b7f86296e 100644 --- a/JetMETCorrections/Type1MET/plugins/SysShiftMETcorrInputProducer.cc +++ b/JetMETCorrections/Type1MET/plugins/SysShiftMETcorrInputProducer.cc @@ -11,8 +11,8 @@ SysShiftMETcorrInputProducer::SysShiftMETcorrInputProducer(const edm::ParameterSet& cfg) : moduleLabel_(cfg.getParameter("@module_label")), useNvtx(false), - corrPx_(0), - corrPy_(0) + corrPx_(nullptr), + corrPy_(nullptr) { token_ = consumes >(cfg.getParameter("src")); diff --git a/JetMETCorrections/Type1MET/plugins/SysShiftMETcorrInputProducer.h b/JetMETCorrections/Type1MET/plugins/SysShiftMETcorrInputProducer.h index 3fd1b36b7cea1..46a8440a7fc63 100644 --- a/JetMETCorrections/Type1MET/plugins/SysShiftMETcorrInputProducer.h +++ b/JetMETCorrections/Type1MET/plugins/SysShiftMETcorrInputProducer.h @@ -30,11 +30,11 @@ class SysShiftMETcorrInputProducer : public edm::stream::EDProducer<> public: explicit SysShiftMETcorrInputProducer(const edm::ParameterSet&); - ~SysShiftMETcorrInputProducer(); + ~SysShiftMETcorrInputProducer() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; std::string moduleLabel_; diff --git a/JetMETCorrections/Type1MET/plugins/Type0PFMETcorrInputProducer.cc b/JetMETCorrections/Type1MET/plugins/Type0PFMETcorrInputProducer.cc index 60081476f4d93..30e3d5bfee223 100644 --- a/JetMETCorrections/Type1MET/plugins/Type0PFMETcorrInputProducer.cc +++ b/JetMETCorrections/Type1MET/plugins/Type0PFMETcorrInputProducer.cc @@ -12,7 +12,7 @@ Type0PFMETcorrInputProducer::Type0PFMETcorrInputProducer(const edm::ParameterSet& cfg) : moduleLabel_(cfg.getParameter("@module_label")), - correction_(0) + correction_(nullptr) { pfCandidateToVertexAssociationsToken_ = consumes(cfg.getParameter("srcPFCandidateToVertexAssociations")); hardScatterVertexToken_ = consumes(cfg.getParameter("srcHardScatterVertex")); diff --git a/JetMETCorrections/Type1MET/plugins/Type0PFMETcorrInputProducer.h b/JetMETCorrections/Type1MET/plugins/Type0PFMETcorrInputProducer.h index aaf6b7375cb1b..ef1a20fa82dfd 100644 --- a/JetMETCorrections/Type1MET/plugins/Type0PFMETcorrInputProducer.h +++ b/JetMETCorrections/Type1MET/plugins/Type0PFMETcorrInputProducer.h @@ -31,11 +31,11 @@ class Type0PFMETcorrInputProducer : public edm::stream::EDProducer<> public: explicit Type0PFMETcorrInputProducer(const edm::ParameterSet&); - ~Type0PFMETcorrInputProducer(); + ~Type0PFMETcorrInputProducer() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; std::string moduleLabel_; diff --git a/JetMETCorrections/Type1MET/plugins/Type2CorrectionProducer.cc b/JetMETCorrections/Type1MET/plugins/Type2CorrectionProducer.cc index d1f560b0141de..a9e60bf6035d5 100644 --- a/JetMETCorrections/Type1MET/plugins/Type2CorrectionProducer.cc +++ b/JetMETCorrections/Type1MET/plugins/Type2CorrectionProducer.cc @@ -22,7 +22,7 @@ class Type2CorrectionProducer : public edm::stream::EDProducer<> { public: explicit Type2CorrectionProducer(const edm::ParameterSet&); - ~Type2CorrectionProducer() { } + ~Type2CorrectionProducer() override { } private: @@ -33,7 +33,7 @@ class Type2CorrectionProducer : public edm::stream::EDProducer<> { type2BinningEntryType(const std::string& binCorrformula, const edm::ParameterSet& binCorrParameter, const vInputTag& srcUnclEnergySums, edm::ConsumesCollector && iConsumesCollector) : binLabel_(""), - binCorrFormula_(0) + binCorrFormula_(nullptr) { for (vInputTag::const_iterator inputTag = srcUnclEnergySums.begin(); inputTag != srcUnclEnergySums.end(); ++inputTag) { @@ -44,7 +44,7 @@ class Type2CorrectionProducer : public edm::stream::EDProducer<> } type2BinningEntryType(const edm::ParameterSet& cfg, const vInputTag& srcUnclEnergySums, edm::ConsumesCollector && iConsumesCollector) : binLabel_(cfg.getParameter("binLabel")), - binCorrFormula_(0) + binCorrFormula_(nullptr) { for ( vInputTag::const_iterator srcUnclEnergySum = srcUnclEnergySums.begin(); @@ -57,7 +57,7 @@ class Type2CorrectionProducer : public edm::stream::EDProducer<> corrTokens_.push_back(iConsumesCollector.consumes(inputTag)); } - std::string binCorrFormula = cfg.getParameter("binCorrFormula").data(); + std::string binCorrFormula = cfg.getParameter("binCorrFormula"); edm::ParameterSet binCorrParameter = cfg.getParameter("binCorrParameter"); @@ -71,7 +71,7 @@ class Type2CorrectionProducer : public edm::stream::EDProducer<> int numParameter = parNames.size(); binCorrParameter_.resize(numParameter); for ( int parIndex = 0; parIndex < numParameter; ++parIndex ) { - const std::string& parName = parNames[parIndex].data(); + const std::string& parName = parNames[parIndex]; double parValue = binCorrParameter.getParameter(parName); binCorrParameter_[parIndex] = parValue; @@ -126,7 +126,7 @@ Type2CorrectionProducer::Type2CorrectionProducer(const edm::ParameterSet& cfg) } else { - std::string type2CorrFormula = cfg.getParameter("type2CorrFormula").data(); + std::string type2CorrFormula = cfg.getParameter("type2CorrFormula"); edm::ParameterSet type2CorrParameter = cfg.getParameter("type2CorrParameter"); type2Binning_.push_back(new type2BinningEntryType(type2CorrFormula, type2CorrParameter, srcUnclEnergySums, consumesCollector())); } diff --git a/JetMETCorrections/Type1MET/src/METCorrectionAlgorithm.cc b/JetMETCorrections/Type1MET/src/METCorrectionAlgorithm.cc index c5896e3f505a7..a0c90f0eb1156 100644 --- a/JetMETCorrections/Type1MET/src/METCorrectionAlgorithm.cc +++ b/JetMETCorrections/Type1MET/src/METCorrectionAlgorithm.cc @@ -34,7 +34,7 @@ METCorrectionAlgorithm::METCorrectionAlgorithm(const edm::ParameterSet& cfg, edm } else { - std::string type2CorrFormula = cfg.getParameter("type2CorrFormula").data(); + std::string type2CorrFormula = cfg.getParameter("type2CorrFormula"); edm::ParameterSet type2CorrParameter = cfg.getParameter("type2CorrParameter"); type2Binning_.push_back(new type2BinningEntryType(type2CorrFormula, type2CorrParameter, srcUnclEnergySums, iConsumesCollector)); } @@ -54,7 +54,7 @@ METCorrectionAlgorithm::METCorrectionAlgorithm(const edm::ParameterSet& cfg, edm if (applyType2Corrections_) { if (cfg.exists("type2Binning")) throw cms::Exception("Invalid Arg") << "Currently, applyType0Corrections and type2Binning cannot be used together!"; - std::string type2CorrFormula = cfg.getParameter("type2CorrFormula").data(); + std::string type2CorrFormula = cfg.getParameter("type2CorrFormula"); if (!(type2CorrFormula == "A")) throw cms::Exception("Invalid Arg") << "type2CorrFormula must be \"A\" if applyType0Corrections!"; edm::ParameterSet type2CorrParameter = cfg.getParameter("type2CorrParameter"); type0Cuncl_ = type2CorrParameter.getParameter("A"); diff --git a/L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeomManager.h b/L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeomManager.h index d235e687b3293..e397d08a1ee68 100644 --- a/L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeomManager.h +++ b/L1Trigger/CSCCommonTrigger/interface/CSCTriggerGeomManager.h @@ -22,7 +22,7 @@ class CSCTriggerGeomManager { public: - CSCTriggerGeomManager():geom(0) {} + CSCTriggerGeomManager():geom(nullptr) {} CSCTriggerGeomManager(const CSCTriggerGeomManager& parent):geom(parent.geom) {} ~CSCTriggerGeomManager() {} diff --git a/L1Trigger/CSCCommonTrigger/interface/vlib.h b/L1Trigger/CSCCommonTrigger/interface/vlib.h index f60e25528a78d..ee47cfa6fd078 100644 --- a/L1Trigger/CSCCommonTrigger/interface/vlib.h +++ b/L1Trigger/CSCCommonTrigger/interface/vlib.h @@ -14,8 +14,8 @@ Verilog++ SP. #include #include #include -#include -#include +#include +#include #define MAXARG 2000 @@ -186,7 +186,7 @@ class parameter : public Signal class memory { public: - memory (){r = NULL;}; + memory (){r = nullptr;}; ~memory (); void reg (int, int, int, int, const char*); void reg (int nup, int ndown, const char* rname) {reg (0, 0, nup, ndown, rname);}; diff --git a/L1Trigger/CSCCommonTrigger/src/CSCTriggerGeomManager.cc b/L1Trigger/CSCCommonTrigger/src/CSCTriggerGeomManager.cc index af8468e82843d..ed5d142c5e711 100644 --- a/L1Trigger/CSCCommonTrigger/src/CSCTriggerGeomManager.cc +++ b/L1Trigger/CSCCommonTrigger/src/CSCTriggerGeomManager.cc @@ -32,7 +32,7 @@ CSCTriggerGeomManager::chamber(unsigned endcap, unsigned station, unsigned sector, unsigned subsector, unsigned tcscid) const { - CSCChamber* result = NULL; + CSCChamber* result = nullptr; int ring = 0; int chamber = 0; diff --git a/L1Trigger/CSCCommonTrigger/src/vlib.cc b/L1Trigger/CSCCommonTrigger/src/vlib.cc index cf10fb07ac0a1..5af95f486b615 100644 --- a/L1Trigger/CSCCommonTrigger/src/vlib.cc +++ b/L1Trigger/CSCCommonTrigger/src/vlib.cc @@ -32,7 +32,7 @@ void Signal::create() rb = ")"; #endif - outhost = host = outreg = ca1 = ca2 = NULL; + outhost = host = outreg = ca1 = ca2 = nullptr; inited = printable = r = rc = l = pedge = nedge = change = alwaysn = mode = 0; h = 8*Sizeofrval - 1; mask = (rval)(- 1); @@ -560,12 +560,12 @@ Signal Signal::asgn(Signal other) host->set((hr & (~portionmask)) | portionr); } - if (ca1 != NULL && ca2 != NULL) // is this a concatenation of the two registers? + if (ca1 != nullptr && ca2 != nullptr) // is this a concatenation of the two registers? { ca2->set(other); ca1->set(other >> (ca2->h - ca2->l + 1)); } - if (outhost != NULL && outhost != this && (mode == moutput || mode == minout)) + if (outhost != nullptr && outhost != this && (mode == moutput || mode == minout)) { outhost->set(other); } @@ -668,7 +668,7 @@ void Signal::input(int high, int low, const char* rname) else change = pedge = nedge = 0; outreg->setr(r); outreg->setrc(r); - outhost = host = NULL; + outhost = host = nullptr; #endif } @@ -710,7 +710,7 @@ void Signal::clock(const char* rname) else change = pedge = nedge = 0; outreg->setr(r); outreg->setrc(r); - outhost = host = NULL; + outhost = host = nullptr; #endif } @@ -927,7 +927,7 @@ void memory::reg (int high, int low, int nup, int ndown, const char* rname) up = ndown; down = nup; } - if (r == NULL) + if (r == nullptr) { r = new Signal [up - down + 1]; for (i = 0; i <= up - down; ++i) @@ -952,8 +952,8 @@ void memory::reg (int high, int low, int nup, int ndown, const char* rname) memory::~memory() { - if (r != NULL) delete [] r; - r = NULL; + if (r != nullptr) delete [] r; + r = nullptr; } #ifdef VGEN @@ -986,9 +986,9 @@ Signal& memory::operator[] (Signal i) void module::create() { - for (unsigned int i = 0; i < sizeof(outreg)/sizeof(Signal*); ++i) outreg[i] = NULL; + for (unsigned int i = 0; i < sizeof(outreg)/sizeof(Signal*); ++i) outreg[i] = nullptr; outregn = 0; - runperiod = NULL; + runperiod = nullptr; } module::module() @@ -1000,7 +1000,7 @@ module::~module() { for (unsigned int i = 0; i < sizeof(outreg)/sizeof(Signal*); ++i) { - if (outreg[i] != NULL) + if (outreg[i] != nullptr) delete outreg[i]; } @@ -1102,7 +1102,7 @@ Signal module::posedge (Signal arg) ln = "posedge " + arg.getname(); t.init(NULL, 0, 0, ln.c_str()); #else - t.init(NULL, 0, 0, ""); + t.init(nullptr, 0, 0, ""); #endif if (arg.getposedge()) glc.setce(0); t.setchange(arg.getposedge()); @@ -1117,7 +1117,7 @@ Signal module::negedge (Signal arg) ln = "negedge " + arg.getname(); t.init(NULL, 0, 0, ln.c_str()); #else - t.init(NULL, 0, 0, ""); + t.init(nullptr, 0, 0, ""); #endif if (arg.getnegedge()) glc.setce(0); t.setchange(arg.getnegedge()); @@ -1127,7 +1127,7 @@ Signal module::negedge (Signal arg) Signal* module::AddOutReg(Signal arg) { - if (outreg[outregn] == NULL) + if (outreg[outregn] == nullptr) { outreg[outregn] = new Signal; outreg[outregn]->setr(0); diff --git a/L1Trigger/CSCTrackFinder/interface/CSCTFPtLUT.h b/L1Trigger/CSCTrackFinder/interface/CSCTFPtLUT.h index 859f32bd1e166..0639fd62dee3a 100644 --- a/L1Trigger/CSCTrackFinder/interface/CSCTFPtLUT.h +++ b/L1Trigger/CSCTrackFinder/interface/CSCTFPtLUT.h @@ -23,7 +23,7 @@ class CSCTFPtLUT const L1MuTriggerPtScale* ptScale); CSCTFPtLUT(const CSCTFPtLUT&); - ~CSCTFPtLUT() { if(pt_lut) delete [] pt_lut; pt_lut = NULL; } + ~CSCTFPtLUT() { if(pt_lut) delete [] pt_lut; pt_lut = nullptr; } CSCTFPtLUT& operator=(const CSCTFPtLUT&); diff --git a/L1Trigger/CSCTrackFinder/interface/CSCTFPtMethods.h b/L1Trigger/CSCTrackFinder/interface/CSCTFPtMethods.h index 0f316c312719d..e245a496c12d4 100644 --- a/L1Trigger/CSCTrackFinder/interface/CSCTFPtMethods.h +++ b/L1Trigger/CSCTrackFinder/interface/CSCTFPtMethods.h @@ -13,7 +13,7 @@ class CSCTFPtMethods enum {kME1andME2=1, kME1andME3, kME2andME3, kME2andME4, kME3andME4, kME1andME2ovr, kME2andMB1, kME2andMB2}; - CSCTFPtMethods( const L1MuTriggerPtScale* ptScale = 0 ) ; + CSCTFPtMethods( const L1MuTriggerPtScale* ptScale = nullptr ) ; /** First is the parameterizations of Acosta/McDonald */ diff --git a/L1Trigger/CSCTrackFinder/plugins/CSCTFCandidateProducer.cc b/L1Trigger/CSCTrackFinder/plugins/CSCTFCandidateProducer.cc index 13b38ce468eee..d0b3a7276057e 100644 --- a/L1Trigger/CSCTrackFinder/plugins/CSCTFCandidateProducer.cc +++ b/L1Trigger/CSCTrackFinder/plugins/CSCTFCandidateProducer.cc @@ -19,7 +19,7 @@ CSCTFCandidateProducer::CSCTFCandidateProducer(const edm::ParameterSet& pset) CSCTFCandidateProducer::~CSCTFCandidateProducer() { delete my_builder; - my_builder = NULL; + my_builder = nullptr; } void CSCTFCandidateProducer::produce(edm::Event & e, const edm::EventSetup& c) diff --git a/L1Trigger/CSCTrackFinder/plugins/CSCTFCandidateProducer.h b/L1Trigger/CSCTrackFinder/plugins/CSCTFCandidateProducer.h index 032ab402d1f46..6a2b1f362acda 100644 --- a/L1Trigger/CSCTrackFinder/plugins/CSCTFCandidateProducer.h +++ b/L1Trigger/CSCTrackFinder/plugins/CSCTFCandidateProducer.h @@ -16,9 +16,9 @@ class CSCTFCandidateProducer : public edm::EDProducer CSCTFCandidateProducer(const edm::ParameterSet&); - virtual ~CSCTFCandidateProducer(); + ~CSCTFCandidateProducer() override; - void produce(edm::Event & e, const edm::EventSetup& c); + void produce(edm::Event & e, const edm::EventSetup& c) override; private: edm::EDGetTokenT input_module; diff --git a/L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.cc b/L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.cc index d90f176ac13ac..8a54b3c6173d6 100644 --- a/L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.cc +++ b/L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.cc @@ -34,7 +34,7 @@ CSCTFTrackProducer::CSCTFTrackProducer(const edm::ParameterSet& pset) my_dtrc = new CSCTFDTReceiver(); m_scalesCacheID = 0ULL ; m_ptScaleCacheID = 0ULL ; - my_builder = 0 ; + my_builder = nullptr ; produces(); produces >(); } @@ -42,10 +42,10 @@ CSCTFTrackProducer::CSCTFTrackProducer(const edm::ParameterSet& pset) CSCTFTrackProducer::~CSCTFTrackProducer() { delete my_dtrc; - my_dtrc = NULL; + my_dtrc = nullptr; delete my_builder; - my_builder = 0; + my_builder = nullptr; } void CSCTFTrackProducer::beginJob(){ @@ -102,7 +102,7 @@ void CSCTFTrackProducer::produce(edm::Event & e, const edm::EventSetup& c) emulStub.push_many(*stubPointer); } - my_builder->buildTracks(LCTs.product(), (useDT?&emulStub:0), track_product.get(), dt_stubs.get()); + my_builder->buildTracks(LCTs.product(), (useDT?&emulStub:nullptr), track_product.get(), dt_stubs.get()); e.put(std::move(track_product)); e.put(std::move(dt_stubs)); diff --git a/L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.h b/L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.h index 46b1b3c026844..9e9beca27676a 100644 --- a/L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.h +++ b/L1Trigger/CSCTrackFinder/plugins/CSCTFTrackProducer.h @@ -22,9 +22,9 @@ class CSCTFTrackProducer : public edm::EDProducer { public: CSCTFTrackProducer(const edm::ParameterSet&); - virtual ~CSCTFTrackProducer(); - void produce(edm::Event & e, const edm::EventSetup& c); - void beginJob(); + ~CSCTFTrackProducer() override; + void produce(edm::Event & e, const edm::EventSetup& c) override; + void beginJob() override; private: CSCTFDTReceiver* my_dtrc; diff --git a/L1Trigger/CSCTrackFinder/plugins/CSCTFanalyzer.cc b/L1Trigger/CSCTrackFinder/plugins/CSCTFanalyzer.cc index d1ecc9f6c7d61..f05e80136e3e6 100644 --- a/L1Trigger/CSCTrackFinder/plugins/CSCTFanalyzer.cc +++ b/L1Trigger/CSCTrackFinder/plugins/CSCTFanalyzer.cc @@ -63,7 +63,7 @@ CSCTFanalyzer::CSCTFanalyzer(edm::ParameterSet const& pset):edm::EDAnalyzer(){ tree->Branch("emode2",&emode2,"emode2/I"); tree->Branch("emode3",&emode3,"emode3/I"); - ts=0; + ts=nullptr; } void CSCTFanalyzer::endJob(void){ diff --git a/L1Trigger/CSCTrackFinder/plugins/CSCTFanalyzer.h b/L1Trigger/CSCTrackFinder/plugins/CSCTFanalyzer.h index c8b1ca6f674c4..22a01dddbd4b8 100644 --- a/L1Trigger/CSCTrackFinder/plugins/CSCTFanalyzer.h +++ b/L1Trigger/CSCTrackFinder/plugins/CSCTFanalyzer.h @@ -34,12 +34,12 @@ class CSCTFanalyzer : public edm::EDAnalyzer { const L1MuTriggerScales *ts; public: - virtual void analyze(edm::Event const& e, edm::EventSetup const& iSetup); - virtual void endJob(void); - virtual void beginJob(){} + void analyze(edm::Event const& e, edm::EventSetup const& iSetup) override; + void endJob(void) override; + void beginJob() override{} explicit CSCTFanalyzer(edm::ParameterSet const& pset); - virtual ~CSCTFanalyzer(void) {} + ~CSCTFanalyzer(void) override {} }; #endif diff --git a/L1Trigger/CSCTrackFinder/src/CSCSectorReceiverLUT.cc b/L1Trigger/CSCTrackFinder/src/CSCSectorReceiverLUT.cc index 8b9f3b69e427b..e1d340f1b1f36 100644 --- a/L1Trigger/CSCTrackFinder/src/CSCSectorReceiverLUT.cc +++ b/L1Trigger/CSCTrackFinder/src/CSCSectorReceiverLUT.cc @@ -19,7 +19,7 @@ #include #include -lclphidat* CSCSectorReceiverLUT::me_lcl_phi = NULL; +lclphidat* CSCSectorReceiverLUT::me_lcl_phi = nullptr; bool CSCSectorReceiverLUT::me_lcl_phi_loaded = false; @@ -32,9 +32,9 @@ CSCSectorReceiverLUT::CSCSectorReceiverLUT(int endcap, int sector, int subsector useMiniLUTs = pset.getUntrackedParameter("UseMiniLUTs", true); isBinary = pset.getUntrackedParameter("Binary",false); - me_global_eta = NULL; - me_global_phi = NULL; - mb_global_phi = NULL; + me_global_eta = nullptr; + me_global_phi = nullptr; + mb_global_phi = nullptr; if(LUTsFromFile && !useMiniLUTs) { me_lcl_phi_file = pset.getUntrackedParameter("LocalPhiLUT", edm::FileInPath(std::string("L1Trigger/CSCTrackFinder/LUTs/LocalPhiLUT" @@ -70,19 +70,19 @@ CSCSectorReceiverLUT::CSCSectorReceiverLUT(const CSCSectorReceiverLUT& lut):_end mb_global_phi = new gblphidat[1< numBins - 1) { diff --git a/L1Trigger/CSCTrackFinder/src/CSCSectorReceiverMiniLUT.cc b/L1Trigger/CSCTrackFinder/src/CSCSectorReceiverMiniLUT.cc index cda22326e4f08..224897390dfa6 100644 --- a/L1Trigger/CSCTrackFinder/src/CSCSectorReceiverMiniLUT.cc +++ b/L1Trigger/CSCTrackFinder/src/CSCSectorReceiverMiniLUT.cc @@ -15,7 +15,7 @@ #include #include -#include +#include #include lclphidat CSCSectorReceiverMiniLUT::calcLocalPhiMini(unsigned theadd, const bool gangedME1a ) diff --git a/L1Trigger/CSCTrackFinder/src/CSCTFCandidateBuilder.h b/L1Trigger/CSCTrackFinder/src/CSCTFCandidateBuilder.h index ac806136e7620..f72010d6b81fc 100644 --- a/L1Trigger/CSCTrackFinder/src/CSCTFCandidateBuilder.h +++ b/L1Trigger/CSCTrackFinder/src/CSCTFCandidateBuilder.h @@ -19,7 +19,7 @@ class CSCTFCandidateBuilder { public: CSCTFCandidateBuilder(const edm::ParameterSet&); - ~CSCTFCandidateBuilder() { delete m_muonsorter; m_muonsorter = NULL; } + ~CSCTFCandidateBuilder() { delete m_muonsorter; m_muonsorter = nullptr; } void buildCandidates(const L1CSCTrackCollection*, std::vector*) const; diff --git a/L1Trigger/CSCTrackFinder/src/CSCTFPtLUT.cc b/L1Trigger/CSCTrackFinder/src/CSCTFPtLUT.cc index eca10f4052815..971d4d28ddabc 100644 --- a/L1Trigger/CSCTrackFinder/src/CSCTFPtLUT.cc +++ b/L1Trigger/CSCTrackFinder/src/CSCTFPtLUT.cc @@ -13,7 +13,7 @@ #include #include -ptdat* CSCTFPtLUT::pt_lut = NULL; +ptdat* CSCTFPtLUT::pt_lut = nullptr; bool CSCTFPtLUT::lut_read_in = false; // L1MuTriggerScales CSCTFPtLUT::trigger_scale; // L1MuTriggerPtScale CSCTFPtLUT::trigger_ptscale; diff --git a/L1Trigger/CSCTrackFinder/src/CSCTFSPCoreLogic.cc b/L1Trigger/CSCTrackFinder/src/CSCTFSPCoreLogic.cc index 7ceec8e1efb90..7eac739b6f788 100644 --- a/L1Trigger/CSCTrackFinder/src/CSCTFSPCoreLogic.cc +++ b/L1Trigger/CSCTrackFinder/src/CSCTFSPCoreLogic.cc @@ -25,7 +25,7 @@ void CSCTFSPCoreLogic::loadData(const CSCTriggerContainer& the const int& minBX, const int& maxBX, const bool gangedME1a) { io_.clear(); - runme = 0; + runme = false; io_.resize(maxBX - minBX + 2); unsigned relative_bx = 0; diff --git a/L1Trigger/CSCTrackFinder/src/CSCTFSectorProcessor.cc b/L1Trigger/CSCTrackFinder/src/CSCTFSectorProcessor.cc index 461d56c5ee4e0..f9c86d9cb51e7 100644 --- a/L1Trigger/CSCTrackFinder/src/CSCTFSectorProcessor.cc +++ b/L1Trigger/CSCTrackFinder/src/CSCTFSectorProcessor.cc @@ -7,7 +7,7 @@ #include "CondFormats/L1TObjects/interface/L1MuCSCTFConfiguration.h" #include "CondFormats/DataRecord/interface/L1MuCSCTFConfigurationRcd.h" #include "FWCore/Framework/interface/ESHandle.h" -#include +#include #include #include @@ -135,7 +135,7 @@ CSCTFSectorProcessor::CSCTFSectorProcessor(const unsigned& endcap, ptLUT_ = new CSCTFPtLUT(ptLUTset, scales, ptScale); LogDebug("CSCTFSectorProcessor") << "Using stand-alone PT LUT for endcap="<& stubs // if there were no tracks from the core in this endcap/sector/bx CSCTriggerContainer tracksFromSingles; for(int bx=0; bx<7; bx++) - if( myStubContainer[bx].get().size() ){ // VP in this bx + if( !myStubContainer[bx].get().empty() ){ // VP in this bx bool coreTrackExists = false; // tracks are not ordered to be accessible by bx => loop them all std::vector tracks = l1_tracks.get(); @@ -1032,10 +1032,10 @@ int CSCTFSectorProcessor::run(const CSCTriggerContainer& stubs } } std::vector single_tracks = tracksFromSingles.get(); - if( single_tracks.size() ) l1_tracks.push_many(single_tracks); + if( !single_tracks.empty() ) l1_tracks.push_many(single_tracks); // End of add-on for singles - return (l1_tracks.get().size() > 0); + return (!l1_tracks.get().empty()); } // according to the firmware versions print some more information diff --git a/L1Trigger/CSCTrackFinder/src/CSCTFTrackBuilder.cc b/L1Trigger/CSCTrackFinder/src/CSCTFTrackBuilder.cc index d52bae9ffc5ab..77fea2d7b0919 100644 --- a/L1Trigger/CSCTrackFinder/src/CSCTFTrackBuilder.cc +++ b/L1Trigger/CSCTrackFinder/src/CSCTFTrackBuilder.cc @@ -13,7 +13,7 @@ #include "CondFormats/DataRecord/interface/L1MuCSCTFConfigurationRcd.h" #include "FWCore/Framework/interface/ESHandle.h" #include -#include +#include CSCTFTrackBuilder::CSCTFTrackBuilder(const edm::ParameterSet& pset, bool TMB07, const L1MuTriggerScales* scales, @@ -52,7 +52,7 @@ CSCTFTrackBuilder::~CSCTFTrackBuilder() s <= CSCTriggerNumbering::maxTriggerSectorId(); ++s) { delete my_SPs[e-1][s-1]; - my_SPs[e-1][s-1] = NULL; + my_SPs[e-1][s-1] = nullptr; } } } diff --git a/L1Trigger/CSCTrackFinder/src/CSCTFTrackBuilder.h b/L1Trigger/CSCTrackFinder/src/CSCTFTrackBuilder.h index 42142bfe57790..d8267b25cd273 100644 --- a/L1Trigger/CSCTrackFinder/src/CSCTFTrackBuilder.h +++ b/L1Trigger/CSCTrackFinder/src/CSCTFTrackBuilder.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc b/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc index f25748ea19b25..c57624913c242 100644 --- a/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc +++ b/L1Trigger/CSCTriggerPrimitives/src/CSCTriggerPrimitivesBuilder.cc @@ -191,7 +191,7 @@ void CSCTriggerPrimitivesBuilder::build(const CSCBadChambers* badChambers, CSCMotherboard* tmb = tmb_[endc-1][stat-1][sect-1][subs-1][cham-1].get(); // Run processors only if chamber exists in geometry. - if (tmb == 0 || theGeom->chamber(endc, stat, sect, subs, cham) == 0) continue; + if (tmb == nullptr || theGeom->chamber(endc, stat, sect, subs, cham) == nullptr) continue; int chid = CSCTriggerNumbering::chamberFromTriggerLabels(sect, subs, stat, cham); diff --git a/L1Trigger/DTBti/interface/DTBtiCard.h b/L1Trigger/DTBti/interface/DTBtiCard.h index 802b9f6e48ce3..55749a22540e3 100644 --- a/L1Trigger/DTBti/interface/DTBtiCard.h +++ b/L1Trigger/DTBti/interface/DTBtiCard.h @@ -64,7 +64,7 @@ class DTBtiCard : public BTICache, public DTGeomSupplier { DTBtiCard(DTTrigGeom *); /// Destructor - ~DTBtiCard(); + ~DTBtiCard() override; /// Clear all BTI stuff (map & cache) void clearCache(); @@ -84,9 +84,9 @@ class DTBtiCard : public BTICache, public DTGeomSupplier { } /// NEWGEO Local position in chamber of a trigger-data object - LocalPoint localPosition(const DTTrigData*) const; + LocalPoint localPosition(const DTTrigData*) const override; /// NEWGEO Local direction in chamber of a trigger-data object - LocalVector localDirection(const DTTrigData*) const; + LocalVector localDirection(const DTTrigData*) const override; /// Returns the active BTI list in a given superlayer std::vector btiList(int); diff --git a/L1Trigger/DTBti/interface/DTBtiTrig.h b/L1Trigger/DTBti/interface/DTBtiTrig.h index a100387d27f4d..0e12935c57d13 100644 --- a/L1Trigger/DTBti/interface/DTBtiTrig.h +++ b/L1Trigger/DTBti/interface/DTBtiTrig.h @@ -58,7 +58,7 @@ class DTBtiTrig : public DTTrigData { DTBtiTrig(DTBtiChip*, DTBtiTrigData); //! Destructor - ~DTBtiTrig(); + ~DTBtiTrig() override; //! Set the parent DTBtiChip inline void setParent(DTBtiChip* parent) { @@ -104,12 +104,12 @@ class DTBtiTrig : public DTTrigData { // Const methods //! Return chamber identifier - inline DTChamberId ChamberId() const { + inline DTChamberId ChamberId() const override { return _data.ChamberId(); } //! Print - inline void print() const { + inline void print() const override { _data.print(); } diff --git a/L1Trigger/DTBti/interface/DTBtiTrigData.h b/L1Trigger/DTBti/interface/DTBtiTrigData.h index 41ca8a347d2eb..a2d65a1632b51 100644 --- a/L1Trigger/DTBti/interface/DTBtiTrigData.h +++ b/L1Trigger/DTBti/interface/DTBtiTrigData.h @@ -44,7 +44,7 @@ class DTBtiTrigData : public DTTrigData { DTBtiTrigData() {} //! Destructor - ~DTBtiTrigData() {} + ~DTBtiTrigData() override {} //! Set the parent BTI identifier inline void setParent(DTBtiId btiid) { @@ -99,12 +99,12 @@ class DTBtiTrigData : public DTTrigData { } //! Return chamber identifier - DTChamberId ChamberId() const { + DTChamberId ChamberId() const override { return DTChamberId(_btiid.wheel(),_btiid.station(),_btiid.sector()); } //! Print - void print() const; + void print() const override; //! Return parent BTI identifier inline DTBtiId parentId() const { diff --git a/L1Trigger/DTBti/src/DTBtiCard.cc b/L1Trigger/DTBti/src/DTBtiCard.cc index 9ef11f6c8d1f7..dd9187eb2d280 100755 --- a/L1Trigger/DTBti/src/DTBtiCard.cc +++ b/L1Trigger/DTBti/src/DTBtiCard.cc @@ -380,7 +380,7 @@ DTBtiCard::runBTI() { // run DTBtiChip algorithm on all non-empty BTI for(int sl=1;sl<=3;sl++){ - if(_btimap[sl-1].size()>0){ + if(!_btimap[sl-1].empty()){ BTI_iter pbti; for(pbti=_btimap[sl-1].begin(); pbti!=_btimap[sl-1].end(); pbti++) { DTBtiChip* bti = (*pbti).second; @@ -405,7 +405,7 @@ DTBtiCard::runBTI() { DTBtiChip* DTBtiCard::activeGetBTI(int sl, int n){ - DTBtiChip* bti=0; + DTBtiChip* bti=nullptr; //check if BTi is out of range before all if( n<1 || n>geom()->nCell(sl) ){ if(debug()){ @@ -458,11 +458,11 @@ DTBtiCard::getBTI(int sl, int n) const { std::cout << "DTBtiCard::getBTI :"; std::cout << " invalid superlayer number: " << sl; std::cout << " 0 returned!" << std::endl; - return 0; + return nullptr; } BTI_const_iter pbti = _btimap[sl-1].find(n); if( pbti==_btimap[sl-1].end() ){ - return 0; + return nullptr; } return (*pbti).second; } @@ -493,7 +493,7 @@ DTBtiCard::storeTrigger(DTBtiTrigData td) { DTBtiId btiid = td.parentId(); if(!(btiid.wheel()==wheel() && btiid.sector()==sector() && - btiid.station()==station()) ) return 0; + btiid.station()==station()) ) return nullptr; std::cout << "DTBtiCard::trigger: trigger not belonging to this card! "; std::cout << "card=(" << wheel() << "," << station() << "," << sector() << ") "; std::cout << "trig=(" << btiid.wheel() << "," << btiid.station() << "," @@ -684,7 +684,7 @@ DTBtiCard::config_bti(DTBtiId& btiid) const << "," << btiid.superlayer() << "," << btiid.bti() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } return const_cast(&(*biter).second); diff --git a/L1Trigger/DTBti/src/DTBtiChip.cc b/L1Trigger/DTBti/src/DTBtiChip.cc index d1e82aa39a0f8..f690925a8e8a0 100755 --- a/L1Trigger/DTBti/src/DTBtiChip.cc +++ b/L1Trigger/DTBti/src/DTBtiChip.cc @@ -391,7 +391,7 @@ DTBtiChip::nCellHit() const { int n=0; int i=0; for(i=0;i<9;i++) { - if( _digis[i].size() >0 ) n++; + if( !_digis[i].empty() ) n++; } if(config()->debug()>2) { cout << n << " cells with hits found:" << endl; @@ -476,12 +476,12 @@ DTBtiChip::trigger(int step, unsigned n) const { if(stepDTConfig::NSTEPL){ cout << "DTBtiChip::trigger: step out of range: " << step ; cout << " empty pointer returned" << endl; - return 0; + return nullptr; } if(n<1 || n>_trigs[step-DTConfig::NSTEPF].size()) { cout << "DTBtiChip::trigger: requested trigger does not exist: " << n; cout << " empty pointer returned!" << endl; - return 0; + return nullptr; } vector::const_iterator p = _trigs[step-DTConfig::NSTEPF].begin(); return (*(p+n-1)); @@ -560,7 +560,7 @@ DTBtiChip::init() { for(int cell=0;cell<9;cell++) { int WEN = config()->WENflag(cell+1); if( WEN==1 ){ - _thisStepUsedHit[cell]=0; + _thisStepUsedHit[cell]=nullptr; vector::const_iterator p; for(p=_digis[cell].begin();p<_digis[cell].end();p++){ DTBtiHit* hit = new DTBtiHit(*p,config()); @@ -602,7 +602,7 @@ DTBtiChip::init_clock() { for(int cell=0;cell<9;cell++) { int WEN = config()->WENflag(cell+1); if( WEN==1 ){ - _thisStepUsedHit[cell]=0; + _thisStepUsedHit[cell]=nullptr; for(unsigned int i=0; i<_digis_clock[cell].size(); i++){ const int clockTime = (_digis_clock[cell])[i]; DTBtiHit* hit = new DTBtiHit(clockTime,config()); @@ -697,7 +697,7 @@ DTBtiChip::tick() { } // loop on hits - _thisStepUsedHit[cell]=0; + _thisStepUsedHit[cell]=nullptr; for(p=_hits[cell].begin();p<_hits[cell].end();p++){ if ( (*p)->isDrifting() ) { // hit is drifting break; // --> don't consider others @@ -722,7 +722,7 @@ DTBtiChip::tick() { // debugging... if(config()->debug()>2){ - if(_thisStepUsedHit[cell]!=0){ + if(_thisStepUsedHit[cell]!=nullptr){ cout << "int. step=" << currentIntStep() << " cell=" << cell+1; cout << " jtrig=" << _thisStepUsedHit[cell]->jtrig(); if( _thisStepUsedHit[cell]->curTime() != 4000 ) diff --git a/L1Trigger/DTBti/src/DTBtiChipEquations.cc b/L1Trigger/DTBti/src/DTBtiChipEquations.cc index 25aac3d89ffc0..2af4a558a65c7 100644 --- a/L1Trigger/DTBti/src/DTBtiChipEquations.cc +++ b/L1Trigger/DTBti/src/DTBtiChipEquations.cc @@ -86,7 +86,7 @@ DTBtiChip::sum(const int s, const int a, const int b) { // s is the sum number (in the range [1,25]) // - if( _thisStepUsedHit[a-1]!=0 && _thisStepUsedHit[b-1]!=0 ){ + if( _thisStepUsedHit[a-1]!=nullptr && _thisStepUsedHit[b-1]!=nullptr ){ _sums[s-1] = (float)(_thisStepUsedHit[a-1]->jtrig() + _thisStepUsedHit[b-1]->jtrig() ); _difs[s-1] = (float)(_thisStepUsedHit[a-1]->jtrig() - @@ -177,19 +177,19 @@ DTBtiChip::computeEqs(){ float TshiftB = 0; float TshiftC = 0; - if(_thisStepUsedHit[3-1]==0){ - if(_hits[3-1].size()==0 ) + if(_thisStepUsedHit[3-1]==nullptr){ + if(_hits[3-1].empty() ) TshiftB = 0; - if(_hits[3-1].size()>0 && (*(_hits[3-1].begin()))->clockTime()<=-K0 ) + if(!_hits[3-1].empty() && (*(_hits[3-1].begin()))->clockTime()<=-K0 ) TshiftB = K0+1; } else TshiftB = _thisStepUsedHit[3-1]->jtrig(); - if(_thisStepUsedHit[2-1]==0){ - if(_hits[2-1].size()==0 ) + if(_thisStepUsedHit[2-1]==nullptr){ + if(_hits[2-1].empty() ) TshiftC = 0; - if(_hits[2-1].size()>0 && (*(_hits[2-1].begin()))->clockTime()<=-K0 ) + if(!_hits[2-1].empty() && (*(_hits[2-1].begin()))->clockTime()<=-K0 ) TshiftC = K0+1; } else diff --git a/L1Trigger/DTBti/src/DTBtiHit.cc b/L1Trigger/DTBti/src/DTBtiHit.cc index 209441cded664..e3a17dbc22354 100644 --- a/L1Trigger/DTBti/src/DTBtiHit.cc +++ b/L1Trigger/DTBti/src/DTBtiHit.cc @@ -89,7 +89,7 @@ DTBtiHit::DTBtiHit(const DTDigi* hitdigi, DTConfigBti* config) : DTBtiHit::DTBtiHit(int clockTime, DTConfigBti* config) : _config(config) { _clockTime = clockTime; - _hitdigi = 0; + _hitdigi = nullptr; _curTime = 4000; } diff --git a/L1Trigger/DTSectorCollector/interface/DTSectColl.h b/L1Trigger/DTSectorCollector/interface/DTSectColl.h index bb208d90b18b2..84a5003dd5db0 100644 --- a/L1Trigger/DTSectorCollector/interface/DTSectColl.h +++ b/L1Trigger/DTSectorCollector/interface/DTSectColl.h @@ -62,7 +62,7 @@ class DTSectColl : public DTSCPhCache, public DTSCThCache { DTSectColl(DTSectCollId id); //! Destructor - ~DTSectColl(); + ~DTSectColl() override; /// Set configuration void setConfig(const DTConfigManager *conf); @@ -174,7 +174,7 @@ class DTSectColl : public DTSCPhCache, public DTSCThCache { void clearCache() { DTSCPhCache::clearCache(); DTSCThCache::clearCache(); } //! Load Trigger Units triggers and run Sector Collector algorithm - virtual void reconstruct() { loadSectColl(); runSectColl(); } + void reconstruct() override { loadSectColl(); runSectColl(); } //! Return the Sector Collector Id DTSectCollId SectCollId() { return _sectcollid; } diff --git a/L1Trigger/DTSectorCollector/interface/DTSectCollPhSegm.h b/L1Trigger/DTSectorCollector/interface/DTSectCollPhSegm.h index 4ee40931daa1f..06341590a456b 100644 --- a/L1Trigger/DTSectorCollector/interface/DTSectCollPhSegm.h +++ b/L1Trigger/DTSectorCollector/interface/DTSectCollPhSegm.h @@ -50,7 +50,7 @@ class DTSectCollPhSegm : public DTTrigData { DTSectCollPhSegm(const DTSectCollPhSegm&); //! Destructor - ~DTSectCollPhSegm(); + ~DTSectCollPhSegm() override; // Non-const methods @@ -81,10 +81,10 @@ class DTSectCollPhSegm : public DTTrigData { DTSectCollId SCId() const { return m_sectcollid; } //! Return chamber identifier - DTChamberId ChamberId() const { return m_tsphitrig->ChamberId(); } + DTChamberId ChamberId() const override { return m_tsphitrig->ChamberId(); } //! Print - void print() const; + void print() const override; //! Return parent TRACO number inline int tracoNumber() const { return m_tsphitrig->tracoNumber(); } diff --git a/L1Trigger/DTSectorCollector/interface/DTSectCollThSegm.h b/L1Trigger/DTSectorCollector/interface/DTSectCollThSegm.h index 7978318ae6347..332e62bfb247c 100644 --- a/L1Trigger/DTSectorCollector/interface/DTSectCollThSegm.h +++ b/L1Trigger/DTSectorCollector/interface/DTSectCollThSegm.h @@ -47,7 +47,7 @@ class DTSectCollThSegm : public DTTrigData { DTSectCollThSegm(const DTSectCollThSegm& seg); /// Destructor - ~DTSectCollThSegm(); + ~DTSectCollThSegm() override; /// Assignment operator DTSectCollThSegm& operator=(const DTSectCollThSegm& seg); @@ -62,10 +62,10 @@ class DTSectCollThSegm : public DTTrigData { DTSectCollId SCId() const { return m_sectcollid; } /// Identifier of the associated chamber - DTChamberId ChamberId() const { return m_tsthetatrig->ChamberId(); } + DTChamberId ChamberId() const override { return m_tsthetatrig->ChamberId(); } /// Print - void print() const; + void print() const override; /// Return the code for a given set of 7 BTI inline int code(const int i) const { return m_tsthetatrig->code(i); } ; diff --git a/L1Trigger/DTSectorCollector/src/DTSC.cc b/L1Trigger/DTSectorCollector/src/DTSC.cc index 55a04d596771e..0b1cc2a0d0340 100644 --- a/L1Trigger/DTSectorCollector/src/DTSC.cc +++ b/L1Trigger/DTSectorCollector/src/DTSC.cc @@ -109,7 +109,7 @@ DTSC::run() { if(config()->debug()){ std::cout << "SC: DTSC::run: first Phi track is = " << first << std::endl; } - if(first!=0) { + if(first!=nullptr) { _outcand_ph.push_back(first); } @@ -130,7 +130,7 @@ DTSC::run() { // end debugging DTSectCollPhCand* second=DTSectCollsort2(); - if(second!=0) { + if(second!=nullptr) { _outcand_ph.push_back(second); } @@ -141,8 +141,8 @@ DTSectCollPhCand* DTSC::DTSectCollsort1() { // Do a sort 1 - DTSectCollPhCand* best=0; - DTSectCollPhCand* carry=0; + DTSectCollPhCand* best=nullptr; + DTSectCollPhCand* carry=nullptr; std::vector::iterator p; for(p=_incand_ph[0].begin(); p!=_incand_ph[0].end(); p++) { DTSectCollPhCand* curr=(*p); @@ -152,14 +152,14 @@ DTSC::DTSectCollsort1() { // NO Carry in Sector Collector sorting in default if(config()->SCGetCarryFlag(_stat)) { // get carry - if(best==0){ + if(best==nullptr){ best=curr; } else if((*curr)<(*best)){ carry=best; best=curr; } - else if(carry==0){ + else if(carry==nullptr){ carry=curr; } else if((*curr)<(*carry)){ @@ -168,7 +168,7 @@ DTSC::DTSectCollsort1() { } else if(config()->SCGetCarryFlag(_stat)==0){ // no carry (default) - if(best==0){ + if(best==nullptr){ best=curr; } else if((*curr)<(*best)){ @@ -178,7 +178,7 @@ DTSC::DTSectCollsort1() { } - if(carry!=0 && config()->SCGetCarryFlag(_stat)) { // reassign carry to sort 2 candidates + if(carry!=nullptr && config()->SCGetCarryFlag(_stat)) { // reassign carry to sort 2 candidates carry->setSecondTrack(); // change value of 1st/2nd track bit _incand_ph[1].push_back(carry); // add to list of 2nd track @@ -198,7 +198,7 @@ DTSC::DTSectCollsort2() { if(nTracksPh()<1){ std::cout << "DTSC::DTSectCollsort2: called with no first Phi track."; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } // If a first track at the following BX is present, ignore second tracks of any kind if(_ignoreSecondTrack){ @@ -206,18 +206,18 @@ DTSC::DTSectCollsort2() { for(std::vector::iterator p=_incand_ph[1].begin(); p!=_incand_ph[1].end(); p++) { } - return 0; + return nullptr; } // If no first tracks at the following BX, do a sort 2 // DTSectCollCand* best=getTrack(1); ! not needed as lons as there is no comparison with best in sort 2 - DTSectCollPhCand* second=0; + DTSectCollPhCand* second=nullptr; std::vector::iterator p; for(p=_incand_ph[1].begin(); p!=_incand_ph[1].end(); p++) { DTSectCollPhCand* curr=(*p); curr->setBitsSectColl(); // SM sector collector set bits in dataword to make SC sorting - if(second==0){ + if(second==nullptr){ second=curr; } else if((*curr)<(*second)){ @@ -272,12 +272,12 @@ DTSC::getDTSectCollPhCand(int ifs, unsigned n) const { if(ifs<1||ifs>2){ std::cout << "DTSC::getDTSectCollPhCand: wrong track number: " << ifs; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(n<1 || n>nCandPh(ifs)) { std::cout << "DTSC::getDTSectCollPhCand: requested trigger not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _incand_ph[ifs-1].begin()+n-1; @@ -291,7 +291,7 @@ DTSC::getDTSectCollThCand(unsigned n) const { if(n<1 || n>nCandTh()) { std::cout << "DTSC::getDTSectCollThCand: requested trigger not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _cand_th.begin()+n-1; @@ -314,7 +314,7 @@ DTSC::getTrackPh(int n) const { if(n<1 || n>nTracksPh()) { std::cout << "DTSC::getTrackPh: requested track not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _outcand_ph.begin()+n-1; @@ -330,7 +330,7 @@ DTSC::getTrackTh(int n) const { if(n<1 || n>nTracksTh()) { std::cout << "DTSC::getTrackTh: requested track not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _cand_th.begin()+n-1; diff --git a/L1Trigger/DTSectorCollector/src/DTSCTrigUnit.cc b/L1Trigger/DTSectorCollector/src/DTSCTrigUnit.cc index 203f2d2c01faa..04a6150b222b6 100644 --- a/L1Trigger/DTSectorCollector/src/DTSCTrigUnit.cc +++ b/L1Trigger/DTSectorCollector/src/DTSCTrigUnit.cc @@ -79,7 +79,7 @@ DTSCTrigUnit::GeomSupplier(const DTTrigData* trig) const { // if(dynamic_cast(trig))return _theTRACOs; // if(dynamic_cast(trig))return _theTSPhi; // if(dynamic_cast(trig))return _theTSTheta; - return 0; + return nullptr; } void DTSCTrigUnit::setConfig(const DTConfigManager *conf){ diff --git a/L1Trigger/DTSectorCollector/src/DTSectColl.cc b/L1Trigger/DTSectorCollector/src/DTSectColl.cc index 3833a3d486719..1155848c576cd 100644 --- a/L1Trigger/DTSectorCollector/src/DTSectColl.cc +++ b/L1Trigger/DTSectorCollector/src/DTSectColl.cc @@ -55,8 +55,8 @@ DTSectColl::DTSectColl(DTSectCollId id) : _sectcollid(id){ _tsc[istep][istat] = new DTSC(istat+1); } } - for (int istat=0;istat<5;istat++) _tsphi[istat]=0; - for (int istat=0;istat<3;istat++) _tstheta[istat]=0; + for (int istat=0;istat<5;istat++) _tsphi[istat]=nullptr; + for (int istat=0;istat<3;istat++) _tstheta[istat]=nullptr; } @@ -202,7 +202,7 @@ DTSectColl::loadSectColl() { } } - if(!(_tsphi[4]==0)){ // only for double stations + if(!(_tsphi[4]==nullptr)){ // only for double stations pend=_tsphi[4]->end(); for(p=_tsphi[4]->begin();p!=pend;p++){ int step = p->step(); @@ -286,7 +286,7 @@ DTSectColl::addTSTheta(int step, const DTChambThSegm* tstsegm, int istat) { } // Check if a trigger is present in theta - bool is_empty=0; + bool is_empty=false; for (int i=0;i<7;i++) if (tstsegm->position(i)==1){ is_empty = false; break; @@ -321,13 +321,13 @@ DTSectColl::getDTSC(int step, int istat) const { if(stepDTConfigSectColl::NSTEPL){ std::cout << "DTSectColl::getDTSC: step out of range: " << step; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(istat<1 || istat>4){ std::cout << "DTSectColl::getDTSC: station out of SC range: " << istat; std::cout << " emty pointer returned!" << std::endl; - return 0; + return nullptr; } return _tsc[step-DTConfigSectColl::NSTEPF][istat-1]; @@ -371,17 +371,17 @@ DTSectColl::runSectColl() { // debugging... if(config()->debug()){ - if( DTSCPhCache::_cache.size()>0 || DTSCThCache::_cache.size()>0){ + if( !DTSCPhCache::_cache.empty() || !DTSCThCache::_cache.empty()){ std::cout << "====================================================" << std::endl; std::cout << " Sect Coll segments " << std::endl; - if (DTSCPhCache::_cache.size()>0){ + if (!DTSCPhCache::_cache.empty()){ std:: cout << " ***Phi Segments*** " << std:: endl; std::vector::const_iterator pph; for(pph=DTSCPhCache::_cache.begin();pphprint(); } } - if (DTSCThCache::_cache.size()>0){ + if (!DTSCThCache::_cache.empty()){ std:: cout << " **Theta Segments** " << std:: endl; std::vector::const_iterator pth; for(pth=DTSCThCache::_cache.begin();pth2){ std::cout << "DTSectColl::getDTSectCollPhCand: wrong track number: " << ifs; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(n<1 || n>nCandPh(ifs)) { std::cout << "DTSectColl::getDTSectCollPhCand: requested trigger not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _incand_ph[ifs-1].begin()+n-1; @@ -421,7 +421,7 @@ DTSectColl::getDTSectCollThCand(unsigned n) const { if(n<1 || n>nCandTh()) { std::cout << "DTSectColl::getDTSectCollThCand: requested trigger not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _incand_th.begin()+n-1; @@ -436,7 +436,7 @@ DTSectColl::getTrackPh(int n) const { if(n<1 || n>nTracksPh()) { std::cout << "DTSectColl::getTrackPh: requested track not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _outcand_ph.begin()+n-1; @@ -450,7 +450,7 @@ DTSectColl::getTrackTh(int n) const { if(n<1 || n>nTracksTh()) { std::cout << "DTSectColl::getTrackTh: requested track not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _outcand_th.begin()+n-1; @@ -518,7 +518,7 @@ DTSectColl::SectCollPhSegment(int step, unsigned n) { return &(*p); } - return 0; + return nullptr; } @@ -532,6 +532,6 @@ DTSectColl::SectCollThSegment(int step) { return &(*p); } - return 0; + return nullptr; } diff --git a/L1Trigger/DTSectorCollector/src/DTSectCollPhCand.cc b/L1Trigger/DTSectorCollector/src/DTSectCollPhCand.cc index 9d79c1d01a390..d43ccce14a9e8 100644 --- a/L1Trigger/DTSectorCollector/src/DTSectCollPhCand.cc +++ b/L1Trigger/DTSectorCollector/src/DTSectCollPhCand.cc @@ -60,7 +60,7 @@ DTSectCollPhCand::operator=(const DTSectCollPhCand& tsccand) { void DTSectCollPhCand::clear() { - _tsmsegm=0; + _tsmsegm=nullptr; _dataword.one(); // std::cout << " clear dataword : " << _dataword.print() << std::endl; } diff --git a/L1Trigger/DTSectorCollector/src/DTSectCollPhSegm.cc b/L1Trigger/DTSectorCollector/src/DTSectCollPhSegm.cc index 2dd464adec21d..3062c7e9cd859 100644 --- a/L1Trigger/DTSectorCollector/src/DTSectCollPhSegm.cc +++ b/L1Trigger/DTSectorCollector/src/DTSectCollPhSegm.cc @@ -73,7 +73,7 @@ DTSectCollPhSegm::operator=(const DTSectCollPhSegm& seg){ void DTSectCollPhSegm::clear() { - m_tsphitrig = 0; + m_tsphitrig = nullptr; m_isFirst = 0; } diff --git a/L1Trigger/DTSectorCollector/src/DTSectCollThCand.cc b/L1Trigger/DTSectorCollector/src/DTSectCollThCand.cc index 4ab5731abc42a..332439329466f 100644 --- a/L1Trigger/DTSectorCollector/src/DTSectCollThCand.cc +++ b/L1Trigger/DTSectorCollector/src/DTSectCollThCand.cc @@ -58,7 +58,7 @@ DTSectCollThCand::operator=(const DTSectCollThCand& tsccand) { void DTSectCollThCand::clear() { - _tstsegm=0; + _tstsegm=nullptr; } int diff --git a/L1Trigger/DTTrackFinder/interface/L1MuDTTrack.h b/L1Trigger/DTTrackFinder/interface/L1MuDTTrack.h index 89a07e849fb0e..801a7fb805342 100644 --- a/L1Trigger/DTTrackFinder/interface/L1MuDTTrack.h +++ b/L1Trigger/DTTrackFinder/interface/L1MuDTTrack.h @@ -60,10 +60,10 @@ class L1MuDTTrack : public L1MuRegionalCand { L1MuDTTrack(const L1MuDTTrack&); /// destructor - virtual ~L1MuDTTrack(); + ~L1MuDTTrack() override; /// reset muon candidate - void reset(); + void reset() override; /// get name of object inline std::string name() const { return m_name; } @@ -87,7 +87,7 @@ class L1MuDTTrack : public L1MuRegionalCand { inline TrackClass tc() const { return m_tc; } /// is it an empty muon candidate? - inline bool empty() const { return m_empty; } + inline bool empty() const override { return m_empty; } /// return Sector Processor in which the muon candidate was found inline const L1MuDTSecProcId& spid() const { return m_spid; } @@ -174,7 +174,7 @@ class L1MuDTTrack : public L1MuRegionalCand { bool operator!=(const L1MuDTTrack&) const; /// print parameters of muon candidate - void print() const; + void print() const override; /// output stream operator friend std::ostream& operator<<(std::ostream&, const L1MuDTTrack&); diff --git a/L1Trigger/DTTrackFinder/plugins/DTTrackFinder.h b/L1Trigger/DTTrackFinder/plugins/DTTrackFinder.h index 59937d64dc874..a6c4844c2b66b 100644 --- a/L1Trigger/DTTrackFinder/plugins/DTTrackFinder.h +++ b/L1Trigger/DTTrackFinder/plugins/DTTrackFinder.h @@ -27,10 +27,10 @@ class DTTrackFinder: public edm::one::EDProducer { DTTrackFinder(const edm::ParameterSet & pset); /// Destructor - virtual ~DTTrackFinder(); + ~DTTrackFinder() override; /// Produce digis out of raw data - void produce(edm::Event & e, const edm::EventSetup& c); + void produce(edm::Event & e, const edm::EventSetup& c) override; private: diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTAssignmentUnit.cc b/L1Trigger/DTTrackFinder/src/L1MuDTAssignmentUnit.cc index f44cb891ec2ac..eded1afc282a7 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTAssignmentUnit.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTAssignmentUnit.cc @@ -163,11 +163,11 @@ void L1MuDTAssignmentUnit::PhiAU(const edm::EventSetup& c) { phi2 = second->phi() >> sh_phi; sector = second->sector(); } - else if ( second == 0 && first ) { + else if ( second == nullptr && first ) { phi2 = first->phi() >> sh_phi; sector = first->sector(); } - else if ( second == 0 && forth ) { + else if ( second == nullptr && forth ) { phi2 = forth->phi() >> sh_phi; sector = forth->sector(); } @@ -191,11 +191,11 @@ void L1MuDTAssignmentUnit::PhiAU(const edm::EventSetup& c) { double phi_f = static_cast(phi2); int phi_8 = static_cast(floor(phi_f*k)); - if ( second == 0 && first ) { + if ( second == nullptr && first ) { int bend_angle = (first->phib() >> sh_phib) << sh_phib; phi_8 = phi_8 + thePhiLUTs->getDeltaPhi(0,bend_angle); } - else if ( second == 0 && forth ) { + else if ( second == nullptr && forth ) { int bend_angle = (forth->phib() >> sh_phib) << sh_phib; phi_8 = phi_8 + thePhiLUTs->getDeltaPhi(1,bend_angle); } @@ -280,12 +280,12 @@ void L1MuDTAssignmentUnit::QuaAU() { void L1MuDTAssignmentUnit::TSR() { // get the track segments from the data buffer - const L1MuDTTrackSegPhi* ts = 0; + const L1MuDTTrackSegPhi* ts = nullptr; for ( int stat = 1; stat <= 4; stat++ ) { int adr = m_addArray.station(stat); if ( adr != 15 ) { ts = m_sp.data()->getTSphi(stat,adr); - if ( ts != 0 ) m_TSphi.push_back( ts ); + if ( ts != nullptr ) m_TSphi.push_back( ts ); } } @@ -306,7 +306,7 @@ const L1MuDTTrackSegPhi* L1MuDTAssignmentUnit::getTSphi(int station) const { } } - return 0; + return nullptr; } @@ -409,9 +409,9 @@ PtAssMethod L1MuDTAssignmentUnit::getPtMethod() const { int threshold = thePtaLUTs->getPtLutThreshold(method); // phib values of track segments from stations 1, 2 and 4 - int phib1 = ( getTSphi(1) != 0 ) ? getTSphi(1)->phib() : 0; - int phib2 = ( getTSphi(2) != 0 ) ? getTSphi(2)->phib() : 0; - int phib4 = ( getTSphi(4) != 0 ) ? getTSphi(4)->phib() : 0; + int phib1 = ( getTSphi(1) != nullptr ) ? getTSphi(1)->phib() : 0; + int phib2 = ( getTSphi(2) != nullptr ) ? getTSphi(2)->phib() : 0; + int phib4 = ( getTSphi(4) != nullptr ) ? getTSphi(4)->phib() : 0; PtAssMethod pam = NODEF; diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTAssignmentUnit.h b/L1Trigger/DTTrackFinder/src/L1MuDTAssignmentUnit.h index ebcb87076c347..2100a90fe6291 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTAssignmentUnit.h +++ b/L1Trigger/DTTrackFinder/src/L1MuDTAssignmentUnit.h @@ -55,13 +55,13 @@ class L1MuDTAssignmentUnit : public L1AbstractProcessor { L1MuDTAssignmentUnit(L1MuDTSectorProcessor& sp, int id ); /// destructor - virtual ~L1MuDTAssignmentUnit(); + ~L1MuDTAssignmentUnit() override; /// run Assignment Unit - virtual void run(const edm::EventSetup& c); + void run(const edm::EventSetup& c) override; /// reset Assignment Unit - virtual void reset(); + void reset() override; /// assign phi void PhiAU(const edm::EventSetup& c); diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTDataBuffer.cc b/L1Trigger/DTTrackFinder/src/L1MuDTDataBuffer.cc index d36a15dce918d..0e130eb0bdd4e 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTDataBuffer.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTDataBuffer.cc @@ -44,7 +44,7 @@ using namespace std; // Constructors -- //---------------- L1MuDTDataBuffer::L1MuDTDataBuffer(const L1MuDTSectorProcessor& sp) : - m_sp(sp), m_tsphi(0) { + m_sp(sp), m_tsphi(nullptr) { m_tsphi = new TSPhivector(38); @@ -76,7 +76,7 @@ void L1MuDTDataBuffer::reset() { while ( iter != m_tsphi->end() ) { if ( *iter) { delete *iter; - *iter = 0; + *iter = nullptr; } iter++; } diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTERS.cc b/L1Trigger/DTTrackFinder/src/L1MuDTERS.cc index 63b84c35c74d5..a83a597cc3c46 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTERS.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTERS.cc @@ -109,8 +109,8 @@ void L1MuDTERS::reset() { for ( int id = 0; id < 2; id++ ) { m_quality[id] = 0; m_address[id] = 15; - m_start[id] = 0; - m_target[id] = 0; + m_start[id] = nullptr; + m_target[id] = nullptr; } } diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTERS.h b/L1Trigger/DTTrackFinder/src/L1MuDTERS.h index 01fb387797d00..1255472adcab0 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTERS.h +++ b/L1Trigger/DTTrackFinder/src/L1MuDTERS.h @@ -48,13 +48,13 @@ class L1MuDTERS : public L1AbstractProcessor { L1MuDTERS(const L1MuDTSEU& ); /// destructor - virtual ~L1MuDTERS(); + ~L1MuDTERS() override; /// run L1MuDTERS - virtual void run(); + void run() override; /// reset ERS - virtual void reset(); + void reset() override; /// return extrapolation quality inline unsigned int quality(int id) const { return m_quality[id]; } diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTEUX.cc b/L1Trigger/DTTrackFinder/src/L1MuDTEUX.cc index c7f0a313654d8..29ca5fc8d6b18 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTEUX.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTEUX.cc @@ -51,7 +51,7 @@ using namespace std; L1MuDTEUX::L1MuDTEUX(const L1MuDTSectorProcessor& sp, const L1MuDTSEU& seu, int id) : m_sp(sp), m_seu(seu), m_id(id), m_result(false), m_quality(0), m_address(15), - m_start(0), m_target(0), + m_start(nullptr), m_target(nullptr), theExtFilter(sp.tf().config()->getExtTSFilter()), nbit_phi(sp.tf().config()->getNbitsExtPhi()), nbit_phib(sp.tf().config()->getNbitsExtPhib()) @@ -97,7 +97,7 @@ void L1MuDTEUX::run(const edm::EventSetup& c) { if ( debug4 ) cout << "start : " << *m_start << endl; if ( debug4 ) cout << "target : " << *m_target << endl; - if ( m_start == 0 || m_target == 0 ) { + if ( m_start == nullptr || m_target == nullptr ) { if ( debug4 ) cout << "Error: EUX has no data loaded" << endl; return; } @@ -215,8 +215,8 @@ void L1MuDTEUX::reset() { m_quality = 0; m_address = 15; - m_start = 0; - m_target = 0; + m_start = nullptr; + m_target = nullptr; } diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTEUX.h b/L1Trigger/DTTrackFinder/src/L1MuDTEUX.h index 5f4040afc8e59..664f8d1ea0b12 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTEUX.h +++ b/L1Trigger/DTTrackFinder/src/L1MuDTEUX.h @@ -53,16 +53,16 @@ class L1MuDTEUX : public L1AbstractProcessor { L1MuDTEUX(const L1MuDTSectorProcessor& sp, const L1MuDTSEU& seu, int id ); /// destructor - virtual ~L1MuDTEUX(); + ~L1MuDTEUX() override; /// equal operator bool operator==(const L1MuDTEUX&) const; /// run Extrapolator - virtual void run(const edm::EventSetup& c); + void run(const edm::EventSetup& c) override; /// reset Extrapolator - virtual void reset(); + void reset() override; /// load data into EUX void load(const L1MuDTTrackSegPhi* start_ts, const L1MuDTTrackSegPhi* target_ts); @@ -73,11 +73,11 @@ class L1MuDTEUX : public L1AbstractProcessor { /// helper class for finding the best and second best extrapolation class EUX_Comp : std::binary_function< L1MuDTEUX*, L1MuDTEUX*, bool> { public : - EUX_Comp( const L1MuDTEUX* k = 0 ) : _not(k) {} + EUX_Comp( const L1MuDTEUX* k = nullptr ) : _not(k) {} bool operator()( const L1MuDTEUX* first, const L1MuDTEUX* second ) const { if ( !second->result() ) return false; - if ( _not != 0 && *first == *_not ) return true; - if ( _not != 0 && *second == *_not ) return false; + if ( _not != nullptr && *first == *_not ) return true; + if ( _not != nullptr && *second == *_not ) return false; return ( first->quality() < second->quality() ); } private: diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTEtaProcessor.cc b/L1Trigger/DTTrackFinder/src/L1MuDTEtaProcessor.cc index b3fdedba647f8..ac3b88c8dc71a 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTEtaProcessor.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTEtaProcessor.cc @@ -107,7 +107,7 @@ void L1MuDTEtaProcessor::reset() { while ( iter != m_tseta.end() ) { if ( *iter ) { delete *iter; - *iter = 0; + *iter = nullptr; } iter++; } @@ -119,8 +119,8 @@ void L1MuDTEtaProcessor::reset() { m_fine[i] = false; m_pattern[i] = 0; m_address[i] = 0; - m_TrackCand[i] = 0; - m_TracKCand[i] = 0; + m_TrackCand[i] = nullptr; + m_TracKCand[i] = nullptr; } m_foundPattern.clear(); @@ -137,7 +137,7 @@ void L1MuDTEtaProcessor::print() const { bool empty1 = true; for ( int i = 0; i < 15; i++ ) { - empty1 &= ( m_tseta[i] == 0 || m_tseta[i]->empty() ); + empty1 &= ( m_tseta[i] == nullptr || m_tseta[i]->empty() ); } bool empty2 = true; @@ -441,7 +441,7 @@ void L1MuDTEtaProcessor::assign() { // find all contributing track segments const L1MuDTEtaPattern p = theEtaPatternLUT->getPattern(m_pattern[i]); vector TSeta; - const L1MuDTTrackSegEta* ts = 0; + const L1MuDTTrackSegEta* ts = nullptr; for ( int stat = 0; stat < 3; stat++ ) { int wh = p.wheel(stat+1); int pos = p.position(stat+1); diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTExtrapolationUnit.cc b/L1Trigger/DTTrackFinder/src/L1MuDTExtrapolationUnit.cc index aacbbcf420a55..b891392053984 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTExtrapolationUnit.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTExtrapolationUnit.cc @@ -85,7 +85,7 @@ L1MuDTExtrapolationUnit::~L1MuDTExtrapolationUnit() { for ( SEUmap::iterator iter = m_SEUs.begin(); iter != m_SEUs.end(); iter++ ) { delete (*iter).second; - (*iter).second = 0; + (*iter).second = nullptr; } m_SEUs.clear(); @@ -109,12 +109,12 @@ void L1MuDTExtrapolationUnit::run(const edm::EventSetup& c) { pair ext_pair = which_ext(((*iter).second)->ext()); int start = ext_pair.first; - const L1MuDTTrackSegPhi* ts = 0; + const L1MuDTTrackSegPhi* ts = nullptr; //get start track segment ts = m_sp.data()->getTSphi(start, ((*iter).second)->tsId() ); - if ( ts != 0 && !ts->empty() ) { + if ( ts != nullptr && !ts->empty() ) { ((*iter).second)->load(ts); ((*iter).second)->run(c); } diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTExtrapolationUnit.h b/L1Trigger/DTTrackFinder/src/L1MuDTExtrapolationUnit.h index f80dc37709a35..6b8476f1e648a 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTExtrapolationUnit.h +++ b/L1Trigger/DTTrackFinder/src/L1MuDTExtrapolationUnit.h @@ -60,13 +60,13 @@ class L1MuDTExtrapolationUnit : public L1AbstractProcessor { L1MuDTExtrapolationUnit(const L1MuDTSectorProcessor& ); /// destructor - virtual ~L1MuDTExtrapolationUnit(); + ~L1MuDTExtrapolationUnit() override; /// run Extrapolation Unit - virtual void run(const edm::EventSetup& c); + void run(const edm::EventSetup& c) override; /// reset Extrapolation Unit - virtual void reset(); + void reset() override; /// reset a single extrapolation void reset(Extrapolation ext, unsigned int startAdr, unsigned int relAdr ); diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTMuonSorter.cc b/L1Trigger/DTTrackFinder/src/L1MuDTMuonSorter.cc index a62e5a0a79185..11fbc796b22b5 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTMuonSorter.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTMuonSorter.cc @@ -133,7 +133,7 @@ void L1MuDTMuonSorter::reset() { m_TrackCands.clear(); vector::iterator iter; for ( iter = m_TrackCands.begin(); iter != m_TrackCands.end(); iter++ ) { - *iter = 0; + *iter = nullptr; } } @@ -169,12 +169,12 @@ void L1MuDTMuonSorter::runCOL(vector& cands) const { typedef vector::iterator TI; for ( TI iter1 = cands.begin(); iter1 != cands.end(); iter1++ ) { - if ( *iter1 == 0 ) continue; + if ( *iter1 == nullptr ) continue; if ( (*iter1)->empty() ) continue; L1MuDTSecProcId sp1 = (*iter1)->spid(); int qual1 = (*iter1)->quality(); for ( TI iter2 = cands.begin(); iter2 != cands.end(); iter2++ ) { - if ( *iter2 == 0 ) continue; + if ( *iter2 == nullptr ) continue; if ( *iter1 == *iter2 ) continue; if ( (*iter2)->empty() ) continue; L1MuDTSecProcId sp2 = (*iter2)->spid(); @@ -256,13 +256,13 @@ void L1MuDTMuonSorter::runCOL(vector& cands) const { // remove the one with lower rank for ( TI iter1 = cands.begin(); iter1 != cands.end(); iter1++ ) { - if ( *iter1 == 0 ) continue; + if ( *iter1 == nullptr ) continue; if ( (*iter1)->empty() ) continue; int phi1 = (*iter1)->phi(); int pt1 = (*iter1)->pt(); int qual1 = (*iter1)->quality(); for ( TI iter2 = cands.begin(); iter2 != cands.end(); iter2++ ) { - if ( *iter2 == 0 ) continue; + if ( *iter2 == nullptr ) continue; if ( *iter1 == *iter2 ) continue; if ( (*iter2)->empty() ) continue; int phi2 = (*iter2)->phi(); diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTMuonSorter.h b/L1Trigger/DTTrackFinder/src/L1MuDTMuonSorter.h index 3c9eeec580038..993d5fd559f21 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTMuonSorter.h +++ b/L1Trigger/DTTrackFinder/src/L1MuDTMuonSorter.h @@ -50,13 +50,13 @@ class L1MuDTMuonSorter : public L1AbstractProcessor { L1MuDTMuonSorter(const L1MuDTTrackFinder&); /// destructor - virtual ~L1MuDTMuonSorter(); + ~L1MuDTMuonSorter() override; /// run Muon Sorter - virtual void run(); + void run() override; /// reset Muon Sorter - virtual void reset(); + void reset() override; /// print results after sorting void print() const; diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTSEU.cc b/L1Trigger/DTTrackFinder/src/L1MuDTSEU.cc index 69531d3eee35b..f02f0a38ab572 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTSEU.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTSEU.cc @@ -49,7 +49,7 @@ using namespace std; L1MuDTSEU::L1MuDTSEU(const L1MuDTSectorProcessor& sp, Extrapolation ext, unsigned int tsId) : m_sp(sp), m_ext(ext), - m_startTS_Id(tsId), m_startTS(0), m_EUXs(), m_ERS() { + m_startTS_Id(tsId), m_startTS(nullptr), m_EUXs(), m_ERS() { m_EUXs.reserve(12); @@ -71,10 +71,10 @@ L1MuDTSEU::~L1MuDTSEU() { vector::iterator iter_eux; for ( iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++ ) { delete (*iter_eux); - *iter_eux = 0; + *iter_eux = nullptr; } - m_startTS = 0; + m_startTS = nullptr; m_EUXs.clear(); delete m_ERS; @@ -154,7 +154,7 @@ void L1MuDTSEU::run(const edm::EventSetup& c) { // void L1MuDTSEU::reset() { - m_startTS = 0; + m_startTS = nullptr; vector::iterator iter_eux; for ( iter_eux = m_EUXs.begin(); iter_eux != m_EUXs.end(); iter_eux++ ) { (*iter_eux)->reset(); diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTSEU.h b/L1Trigger/DTTrackFinder/src/L1MuDTSEU.h index 7e17aa821a345..edf8092ffd4a7 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTSEU.h +++ b/L1Trigger/DTTrackFinder/src/L1MuDTSEU.h @@ -53,13 +53,13 @@ class L1MuDTSEU : public L1AbstractProcessor { L1MuDTSEU(const L1MuDTSectorProcessor& sp, Extrapolation ext, unsigned int tsId ); /// destructor - virtual ~L1MuDTSEU(); + ~L1MuDTSEU() override; /// run SEU - virtual void run(const edm::EventSetup& c); + void run(const edm::EventSetup& c) override; /// reset SEU - virtual void reset(); + void reset() override; /// reset single extrapolation void reset(unsigned int relAdr); diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTSecProcMap.cc b/L1Trigger/DTTrackFinder/src/L1MuDTSecProcMap.cc index e25e360140483..c9f9f3c0b43d1 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTSecProcMap.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTSecProcMap.cc @@ -70,7 +70,7 @@ L1MuDTSectorProcessor* L1MuDTSecProcMap::sp(const L1MuDTSecProcId& id ) const { SPmap::const_iterator it = m_map.find(id); if ( it == m_map.end() ) { // cerr << "Error: Sector Processor not in the map" << endl; - return 0; + return nullptr; } return (*it).second; diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTSectorProcessor.cc b/L1Trigger/DTTrackFinder/src/L1MuDTSectorProcessor.cc index 18eb2bac392cd..789756a320593 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTSectorProcessor.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTSectorProcessor.cc @@ -225,7 +225,7 @@ const L1MuDTSectorProcessor* L1MuDTSectorProcessor::neighbour() const { // current SP -3 -2 -1 +1 +2 +3 // neighbour -2 -1 +1 0 +1 +2 - if ( wheel == 1) return 0; + if ( wheel == 1) return nullptr; wheel = (wheel == -1) ? 1 : (wheel/abs(wheel)) * (abs(wheel)-1); const L1MuDTSecProcId id(wheel,sector); diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTSectorReceiver.cc b/L1Trigger/DTTrackFinder/src/L1MuDTSectorReceiver.cc index 1a91cca9226c0..4158ba40af13b 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTSectorReceiver.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTSectorReceiver.cc @@ -109,7 +109,7 @@ void L1MuDTSectorReceiver::receiveDTBXData(int bx, const edm::Event& e, const ed edm::Handle dttrig; e.getByToken(m_DTDigiToken,dttrig); - L1MuDTChambPhDigi const* ts=0; + L1MuDTChambPhDigi const* ts=nullptr; // const int bx_offset = dttrig->correctBX(); int bx_offset=0; diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTTrackAssembler.h b/L1Trigger/DTTrackFinder/src/L1MuDTTrackAssembler.h index 25c5c1fb0173f..7871bba62a02d 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTTrackAssembler.h +++ b/L1Trigger/DTTrackFinder/src/L1MuDTTrackAssembler.h @@ -54,13 +54,13 @@ class L1MuDTTrackAssembler : public L1AbstractProcessor { L1MuDTTrackAssembler(const L1MuDTSectorProcessor& ); /// destructor - virtual ~L1MuDTTrackAssembler(); + ~L1MuDTTrackAssembler() override; /// run Track Assembler - virtual void run(); + void run() override; /// reset Track Assembler - virtual void reset(); + void reset() override; /// print result of Track Assembler void print() const; diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTTrackFinder.cc b/L1Trigger/DTTrackFinder/src/L1MuDTTrackFinder.cc index 246fe4fc4dab0..3cc829b2a6b14 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTTrackFinder.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTTrackFinder.cc @@ -55,7 +55,7 @@ using namespace std; L1MuDTTrackFinder::L1MuDTTrackFinder(const edm::ParameterSet & ps,edm::ConsumesCollector && iC) { // set configuration parameters - if ( m_config == 0 ) m_config = new L1MuDTTFConfig(ps); + if ( m_config == nullptr ) m_config = new L1MuDTTFConfig(ps); if ( m_config->Debug(1) ) cout << endl; if ( m_config->Debug(1) ) cout << "**** entering L1MuDTTrackFinder ****" << endl; @@ -64,7 +64,7 @@ L1MuDTTrackFinder::L1MuDTTrackFinder(const edm::ParameterSet & ps,edm::ConsumesC m_spmap = new L1MuDTSecProcMap(); m_epvec.reserve(12); m_wsvec.reserve(12); - m_ms = 0; + m_ms = nullptr; _cache.reserve(4*17); _cache0.reserve(144*17); @@ -98,7 +98,7 @@ L1MuDTTrackFinder::~L1MuDTTrackFinder() { delete m_ms; if ( m_config ) delete m_config; - m_config = 0; + m_config = nullptr; } @@ -155,7 +155,7 @@ void L1MuDTTrackFinder::run(const edm::Event& e, const edm::EventSetup& c) { edm::Handle dttrig; e.getByToken(m_DTDigiToken,dttrig); - if ( dttrig->getContainer()->size() == 0 ) return; + if ( dttrig->getContainer()->empty() ) return; if ( m_config->Debug(2) ) cout << endl; if ( m_config->Debug(2) ) cout << "**** L1MuDTTrackFinder processing ****" << endl; @@ -323,4 +323,4 @@ int L1MuDTTrackFinder::numberOfTracks(int bx) { // static data members -L1MuDTTFConfig* L1MuDTTrackFinder::m_config = 0; +L1MuDTTFConfig* L1MuDTTrackFinder::m_config = nullptr; diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTWedgeSorter.cc b/L1Trigger/DTTrackFinder/src/L1MuDTWedgeSorter.cc index 55a0ed5e76d7a..fe744079abe2c 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTWedgeSorter.cc +++ b/L1Trigger/DTTrackFinder/src/L1MuDTWedgeSorter.cc @@ -147,7 +147,7 @@ void L1MuDTWedgeSorter::reset() { vector::iterator iter; for ( iter = m_TrackCands.begin(); iter != m_TrackCands.end(); iter++ ) { - *iter = 0; + *iter = nullptr; } } @@ -199,12 +199,12 @@ void L1MuDTWedgeSorter::runCOL(vector& cands) const { typedef vector::iterator TI; for ( TI iter1 = cands.begin(); iter1 != cands.end(); iter1++ ) { - if ( *iter1 == 0 ) continue; + if ( *iter1 == nullptr ) continue; if ( (*iter1)->empty() ) continue; L1MuDTSecProcId sp1 = (*iter1)->spid(); int qual1 = (*iter1)->quality(); for ( TI iter2 = cands.begin(); iter2 != cands.end(); iter2++ ) { - if ( *iter2 == 0 ) continue; + if ( *iter2 == nullptr ) continue; if ( *iter1 == *iter2 ) continue; if ( (*iter2)->empty() ) continue; L1MuDTSecProcId sp2 = (*iter2)->spid(); diff --git a/L1Trigger/DTTrackFinder/src/L1MuDTWedgeSorter.h b/L1Trigger/DTTrackFinder/src/L1MuDTWedgeSorter.h index 2565b665c25bf..2ac55f4935ef4 100644 --- a/L1Trigger/DTTrackFinder/src/L1MuDTWedgeSorter.h +++ b/L1Trigger/DTTrackFinder/src/L1MuDTWedgeSorter.h @@ -50,16 +50,16 @@ class L1MuDTWedgeSorter : public L1AbstractProcessor { L1MuDTWedgeSorter(const L1MuDTTrackFinder&, int id ); /// destructor - virtual ~L1MuDTWedgeSorter(); + ~L1MuDTWedgeSorter() override; /// return Wedge Sorter identifier (0-11) inline int id() const { return m_wsid; } /// run Wedge Sorter - virtual void run(); + void run() override; /// reset Wedge Sorter - virtual void reset(); + void reset() override; /// print results after sorting void print() const; diff --git a/L1Trigger/DTTraco/interface/DTTracoCard.h b/L1Trigger/DTTraco/interface/DTTracoCard.h index 9ed0ad48b133c..b7e4cb45a1943 100644 --- a/L1Trigger/DTTraco/interface/DTTracoCard.h +++ b/L1Trigger/DTTraco/interface/DTTracoCard.h @@ -64,7 +64,7 @@ class DTTracoCard : public TRACOCache, public DTGeomSupplier { DTTracoCard(DTTrigGeom*, DTBtiCard*, DTTSTheta*); /// Destructor - ~DTTracoCard(); + ~DTTracoCard() override; /// Clear all traco stuff (cache & map) void clearCache(); @@ -96,13 +96,13 @@ class DTTracoCard : public TRACOCache, public DTGeomSupplier { DTTracoTrig* storeTrigger(DTTracoTrigData); /// NEWGEO Local position in chamber of a trigger-data object - LocalPoint localPosition(const DTTrigData*) const; + LocalPoint localPosition(const DTTrigData*) const override; /// NEWGEO Local direction in chamber of a trigger-data object - LocalVector localDirection(const DTTrigData*) const; + LocalVector localDirection(const DTTrigData*) const override; /// Load BTIs triggers and run TRACOs algorithm - virtual void reconstruct() { clearCache(); loadTRACO(); runTRACO(); } + void reconstruct() override { clearCache(); loadTRACO(); runTRACO(); } /// Return LUTS config for this chamber (=minicrate) const DTConfigLUTs* config_luts() const { return _conf_luts; } diff --git a/L1Trigger/DTTraco/interface/DTTracoTrig.h b/L1Trigger/DTTraco/interface/DTTracoTrig.h index c90738d0b181f..c62b586d9d00a 100644 --- a/L1Trigger/DTTraco/interface/DTTracoTrig.h +++ b/L1Trigger/DTTraco/interface/DTTracoTrig.h @@ -51,7 +51,7 @@ class DTTracoTrig : public DTTrigData { DTTracoTrig(DTTracoChip*, DTTracoTrigData) ; /// Destructor - ~DTTracoTrig(); + ~DTTracoTrig() override; /// Set the parent TRACO inline void setParent(DTTracoChip* parent) { @@ -135,12 +135,12 @@ class DTTracoTrig : public DTTrigData { } /// Return chamber identifier - inline DTChamberId ChamberId() const { + inline DTChamberId ChamberId() const override { return _data.ChamberId(); } /// Print - inline void print() const { + inline void print() const override { _data.print(); } diff --git a/L1Trigger/DTTraco/interface/DTTracoTrigData.h b/L1Trigger/DTTraco/interface/DTTracoTrigData.h index 25b648942898f..cd4824154c0a3 100644 --- a/L1Trigger/DTTraco/interface/DTTracoTrigData.h +++ b/L1Trigger/DTTraco/interface/DTTracoTrigData.h @@ -47,7 +47,7 @@ class DTTracoTrigData : public DTTrigData { DTTracoTrigData(DTTracoId, int); //! Destructor - ~DTTracoTrigData() {} + ~DTTracoTrigData() override {} // Non-const methods @@ -173,12 +173,12 @@ class DTTracoTrigData : public DTTrigData { } //! Return chamber identifier - DTChamberId ChamberId() const { + DTChamberId ChamberId() const override { return _tracoid.ChamberId(); } //! print - void print() const; + void print() const override; //! Return parent TRACO identifier inline DTTracoId parentId() const { diff --git a/L1Trigger/DTTraco/interface/Lut.h b/L1Trigger/DTTraco/interface/Lut.h index dc2063ccc31d3..7f5a3c8bfcf70 100644 --- a/L1Trigger/DTTraco/interface/Lut.h +++ b/L1Trigger/DTTraco/interface/Lut.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #define ANGRESOL 512.0 #define POSRESOL 4096.0 diff --git a/L1Trigger/DTTraco/src/DTTracoCard.cc b/L1Trigger/DTTraco/src/DTTracoCard.cc index 0007063685e2f..5ac7e65ca9e74 100644 --- a/L1Trigger/DTTraco/src/DTTracoCard.cc +++ b/L1Trigger/DTTraco/src/DTTracoCard.cc @@ -40,7 +40,7 @@ #include #include #include -#include +#include //---------------- // Constructors -- @@ -242,7 +242,7 @@ DTTracoCard::runTRACO() { } // run TRACO algorithm on all non-empty TRACO - if(_tracomap.size()>0){ + if(!_tracomap.empty()){ if(debug()){ std::cout << "====================================================" << std::endl; @@ -292,7 +292,7 @@ DTTracoCard::activeGetTRACO(int n) { DTChamberId sid = geom()->statId(); DTTracoId _id = DTTracoId(sid,n); - DTTracoChip* traco = 0; + DTTracoChip* traco = nullptr; TRACO_iter ptraco = _tracomap.find(n); if( ptraco!=_tracomap.end() ) { traco=(*ptraco).second; @@ -306,7 +306,7 @@ DTTracoCard::activeGetTRACO(int n) { DTTracoChip* DTTracoCard::getTRACO(int n) const { TRACO_const_iter ptraco = _tracomap.find(n); - if( ptraco==_tracomap.end() ) return 0; + if( ptraco==_tracomap.end() ) return nullptr; return (*ptraco).second; } @@ -329,7 +329,7 @@ DTTracoCard::storeTrigger(DTTracoTrigData td) { DTTracoId tracoid = td.parentId(); if(!(tracoid.wheel()==wheel() && tracoid.sector()==sector() && - tracoid.station()==station()) ) return 0; + tracoid.station()==station()) ) return nullptr; std::cout << "DTTracoChip::trigger: trigger not belonging to this card! "; std::cout << "card=(" << wheel() << "," << station() << "," << sector() << ") "; std::cout << "trig=(" << tracoid.wheel() << "," << tracoid.station() << "," @@ -471,7 +471,7 @@ DTTracoCard::config_traco(const DTTracoId& tracoid) const << "," << tracoid.station() << "," << tracoid.traco() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } return const_cast(&(*titer).second); diff --git a/L1Trigger/DTTraco/src/DTTracoChip.cc b/L1Trigger/DTTraco/src/DTTracoChip.cc index a3e77fcdf23d9..61d08a3df0d07 100644 --- a/L1Trigger/DTTraco/src/DTTracoChip.cc +++ b/L1Trigger/DTTraco/src/DTTracoChip.cc @@ -101,14 +101,14 @@ DTTracoChip::DTTracoChip(DTTracoCard* card, int n, DTConfigTraco* conf) : float SL_shift = xBTI1_3 - xBTI1_1; _lutsCCB = new Lut(_card->config_luts(),n,SL_shift); - _luts = 0; + _luts = nullptr; } else //this is always the case with new DTConfig SV 15/I/2007 //if( config()->trigSetupGeom()==0 ){ { - _luts = 0; - _lutsCCB = 0; + _luts = nullptr; + _lutsCCB = nullptr; } /* //SV 21/V/03 for testbeam purpose: parameters from hardware setup @@ -276,8 +276,8 @@ DTTracoChip::run() { } // skip if no cand. at this step - if(_innerCand[is-DTConfigTraco::NSTEPF].size()<1 && - _outerCand[is-DTConfigTraco::NSTEPF].size()<1 ) + if(_innerCand[is-DTConfigTraco::NSTEPF].empty() && + _outerCand[is-DTConfigTraco::NSTEPF].empty() ) continue; // Debugging... @@ -335,7 +335,7 @@ DTTracoChip::run() { } // Skip to next step if no suitable candidates found - if(inner==0&&outer==0) + if(inner==nullptr&&outer==nullptr) break; // suppression of LTRIG on BTI close to selected HTRIG @@ -384,7 +384,7 @@ DTTracoChip::run() { // Inhibit second track at previous bunch crossing if(config()->debug()==4) std::cout<<"Checking overlap I-II track..." <0 && is>DTConfigTraco::NSTEPF + if(!_tracotrig[is-DTConfigTraco::NSTEPF].empty() && is>DTConfigTraco::NSTEPF && (_tracotrig[is-DTConfigTraco::NSTEPF])[0]->isFirst() ) { //I track at bx if(nTrig(is-1)>0) { //there is a track at bx-1 if( !(trigger(is-1,1)->isFirst()) || //trig 1 is II track @@ -428,14 +428,14 @@ DTTracoChip::setFlag(int step, int ext) { if(ext==0){ //this is the original: flags from card DTTracoChip* prevTraco = _card->getTRACO(_id.traco()-1); - if(prevTraco!=0){ + if(prevTraco!=nullptr){ if(prevTraco->edgeBTI(step,1,2)) _flag[step-DTConfigTraco::NSTEPF].set(3); if(prevTraco->edgeBTI(step,2,2)) _flag[step-DTConfigTraco::NSTEPF].set(5); } DTTracoChip* nextTraco = _card->getTRACO(_id.traco()+1); - if(nextTraco!=0){ + if(nextTraco!=nullptr){ if(nextTraco->edgeBTI(step,1,1)) _flag[step-DTConfigTraco::NSTEPF].set(4); if(nextTraco->edgeBTI(step,2,1)) @@ -471,7 +471,7 @@ DTTracoCand* DTTracoChip::bestCand(int itk, std::vector & tclist) { // Return if no candidates - if(tclist.size()<1) return 0; + if(tclist.empty()) return nullptr; // stl function: sort in Ktc ascending or descending order according // to user request comparing by default with user-defined < @@ -509,7 +509,7 @@ DTTracoChip::bestCand(int itk, std::vector & tclist) { // return the best candidate int i=0; - DTTracoCand* bestltrig = 0; + DTTracoCand* bestltrig = nullptr; std::vector::iterator p; for ( p = tclist.begin(); p < tclist.end(); ++p ) { i++; @@ -521,7 +521,7 @@ DTTracoChip::bestCand(int itk, std::vector & tclist) { // check if preference to HTRIG is set and return first trigger if( !config()->prefHtrig(itk) ) return &(*p); if( (*p).BtiTrig()->code()==8 ) return &(*p); - if( bestltrig==0 ) bestltrig=&(*p); + if( bestltrig==nullptr ) bestltrig=&(*p); } } return bestltrig; @@ -589,8 +589,8 @@ DTTracoChip::setPV(int itk, DTTracoCand* inner, DTTracoCand* outer) { //preview selector: the same as priority selector I !! // select which of the inner/outer segments should be used - DTTracoCand* candidate=0; - if(inner!=0&&outer!=0) { + DTTracoCand* candidate=nullptr; + if(inner!=nullptr&&outer!=nullptr) { // if(config()->prefHtrig(itk)){ // ---> BUG! selection is ALWAYS for H trigs // ---> fixed by Sara Vanini 25/III/03 @@ -615,12 +615,12 @@ DTTracoChip::setPV(int itk, DTTracoCand* inner, DTTracoCand* outer) { } } */ - } else if(inner==0&&outer!=0) { + } else if(inner==nullptr&&outer!=nullptr) { candidate=outer; - } else if(inner!=0&&outer==0) { + } else if(inner!=nullptr&&outer==nullptr) { candidate=inner; } else { - return 0; // no candidates + return nullptr; // no candidates } // create new trigger with this candidate @@ -810,8 +810,8 @@ DTTracoChip::storeUncorr(DTTracoTrig* tctrig, DTTracoCand* inner, DTTracoCand* o // priority selector // select which of the inner/outer segments should be used // allow re-use of other segment according to configuration - DTTracoCand* candidate=0; - if(inner!=0&&outer!=0) { + DTTracoCand* candidate=nullptr; + if(inner!=nullptr&&outer!=nullptr) { // if(config()->prefHtrig(tkn)){ // --> BUG: selector I preference is ALWAYS for H trig // fixed by Sara Vanini - 25/III/03 @@ -841,9 +841,9 @@ DTTracoChip::storeUncorr(DTTracoTrig* tctrig, DTTracoCand* inner, DTTracoCand* o } } */ - } else if(inner==0&&outer!=0) { + } else if(inner==nullptr&&outer!=nullptr) { candidate=outer; - } else if(inner!=0&&outer==0) { + } else if(inner!=nullptr&&outer==nullptr) { candidate=inner; } else { return 0; // no candidates @@ -1089,12 +1089,12 @@ DTTracoChip::trigger(int step, unsigned n) const { if(stepDTConfigTraco::NSTEPL){ std::cout << "DTTracoChip::trigger: step out of range: " << step; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(n<1 || n>_tracotrig[step-DTConfigTraco::NSTEPF].size()) { std::cout << "DTTracoChip::trigger: requested trigger doesn't exist: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _tracotrig[step-DTConfigTraco::NSTEPF].begin()+n-1; @@ -1178,7 +1178,7 @@ DTTracoChip::edgeBTI(int step, int io, int lr) const { // std::vector::const_iterator p; if(io==1){ - if(_innerCand[step-DTConfigTraco::NSTEPF].size()>0) { + if(!_innerCand[step-DTConfigTraco::NSTEPF].empty()) { // SV 24/IX/03 fix: only HTRIG accepted for(p=_innerCand[step-DTConfigTraco::NSTEPF].begin(); p<_innerCand[step-DTConfigTraco::NSTEPF].end(); p++){ @@ -1189,7 +1189,7 @@ DTTracoChip::edgeBTI(int step, int io, int lr) const { } } } else { - if(_outerCand[step-DTConfigTraco::NSTEPF].size()>0) { + if(!_outerCand[step-DTConfigTraco::NSTEPF].empty()) { for(p=_outerCand[step-DTConfigTraco::NSTEPF].begin(); p<_outerCand[step-DTConfigTraco::NSTEPF].end(); p++){ //SV: is the following correct???FIX if using _card to set _flag diff --git a/L1Trigger/DTTrigger/interface/DTTrigProd.h b/L1Trigger/DTTrigger/interface/DTTrigProd.h index 030a60a5d6422..0598ccdf5e156 100644 --- a/L1Trigger/DTTrigger/interface/DTTrigProd.h +++ b/L1Trigger/DTTrigger/interface/DTTrigProd.h @@ -31,7 +31,7 @@ class DTTrigProd: public edm::EDProducer{ DTTrigProd(const edm::ParameterSet& pset); //! Destructor - ~DTTrigProd(); + ~DTTrigProd() override; //! Create Trigger Units before starting event processing //void beginJob(const edm::EventSetup & iEventSetup); diff --git a/L1Trigger/DTTrigger/interface/DTTrigTest.h b/L1Trigger/DTTrigger/interface/DTTrigTest.h index 0e40b3339b345..37506d21a7dc2 100644 --- a/L1Trigger/DTTrigger/interface/DTTrigTest.h +++ b/L1Trigger/DTTrigger/interface/DTTrigTest.h @@ -36,20 +36,20 @@ class DTTrigTest: public edm::EDAnalyzer{ DTTrigTest(const edm::ParameterSet& pset); //! Destructor - ~DTTrigTest(); + ~DTTrigTest() override; //! Create tree and Branches //void beginJob(const edm::EventSetup & iEventSetup); - void beginJob(); + void beginJob() override; //! Close Tree and write File - void endJob(); + void endJob() override; //! Create DTTrig instance and TUs - void beginRun(const edm::Run& iRun, const edm::EventSetup& iEventSetup); + void beginRun(const edm::Run& iRun, const edm::EventSetup& iEventSetup) override; //! Analyze function executed on all the events - void analyze(const edm::Event & iEvent, const edm::EventSetup& iEventSetup); + void analyze(const edm::Event & iEvent, const edm::EventSetup& iEventSetup) override; private: diff --git a/L1Trigger/DTTrigger/src/DTTrig.cc b/L1Trigger/DTTrigger/src/DTTrig.cc index 78a80d2fd0d22..91d51883f16b6 100644 --- a/L1Trigger/DTTrigger/src/DTTrig.cc +++ b/L1Trigger/DTTrigger/src/DTTrig.cc @@ -48,7 +48,7 @@ //---------------- DTTrig::DTTrig(const edm::ParameterSet ¶ms,edm::ConsumesCollector && iC) : - _inputexist(1) , _configid(0) , _geomid(0) { + _inputexist(true) , _configid(0) , _geomid(0) { // Set configuration parameters _debug = params.getUntrackedParameter("debug"); @@ -303,7 +303,7 @@ DTTrig::constTrigUnit(DTChamberId chid) const { std::cout << ", station=" << chid.station(); std::cout << ", sector=" << chid.sector(); std::cout << std::endl; - return 0; + return nullptr; } return (*it).second; @@ -317,7 +317,7 @@ SC_const_iterator it = _cache1.find(scid); std::cout << " wheel=" << scid.wheel() ; std::cout << ", sector=" << scid.sector(); std::cout << std::endl; - return 0; + return nullptr; } return (*it).second; @@ -345,22 +345,22 @@ DTTrig::constTrigUnit(int wheel, int stat, int sect) const { DTChambPhSegm* DTTrig::chPhiSegm1(DTSCTrigUnit* unit, int step) { - if(unit==0)return 0; - if(unit->nPhiSegm(step)<1)return 0; + if(unit==nullptr)return nullptr; + if(unit->nPhiSegm(step)<1)return nullptr; return const_cast(unit->phiSegment(step,1)); } DTChambPhSegm* DTTrig::chPhiSegm2(DTSCTrigUnit* unit, int step) { - if(unit==0)return 0; - if(unit->nPhiSegm(step)<2)return 0; + if(unit==nullptr)return nullptr; + if(unit->nPhiSegm(step)<2)return nullptr; return const_cast(unit->phiSegment(step,2)); } DTChambThSegm* DTTrig::chThetaSegm(DTSCTrigUnit* unit, int step) { - if(unit==0)return 0; - if(unit->nThetaSegm(step)<1)return 0; + if(unit==nullptr)return nullptr; + if(unit->nThetaSegm(step)<1)return nullptr; return const_cast(unit->thetaSegment(step,1)); } @@ -376,7 +376,7 @@ DTTrig::chPhiSegm2(DTChamberId sid, int step) { DTChambThSegm* DTTrig::chThetaSegm(DTChamberId sid, int step) { - if(sid.station()==4)return 0; + if(sid.station()==4)return nullptr; return chThetaSegm(trigUnit(sid),step); } @@ -402,7 +402,7 @@ DTTrig::chPhiSegm2(int wheel, int stat, int sect, int step) { DTChambThSegm* DTTrig::chThetaSegm(int wheel, int stat, int sect, int step) { - if(stat==4)return 0; + if(stat==4)return nullptr; return chThetaSegm(trigUnit(wheel,stat,sect),step); } @@ -410,15 +410,15 @@ DTTrig::chThetaSegm(int wheel, int stat, int sect, int step) { DTSectCollPhSegm* DTTrig::chSectCollPhSegm1(DTSectColl* unit, int step) { - if(unit==0)return 0; - if(unit->nSegmPh(step)<1)return 0; + if(unit==nullptr)return nullptr; + if(unit->nSegmPh(step)<1)return nullptr; return const_cast(unit->SectCollPhSegment(step,1)); } DTSectCollPhSegm* DTTrig::chSectCollPhSegm2(DTSectColl* unit, int step) { - if(unit==0)return 0; - if(unit->nSegmPh(step)<2)return 0; + if(unit==nullptr)return nullptr; + if(unit->nSegmPh(step)<2)return nullptr; return const_cast(unit->SectCollPhSegment(step,2)); } @@ -442,8 +442,8 @@ DTTrig::chSectCollPhSegm2(int wheel, int sect, int step) { DTSectCollThSegm* DTTrig::chSectCollThSegm(DTSectColl* unit, int step) { - if(unit==0)return 0; - if(unit->nSegmTh(step)<1)return 0; + if(unit==nullptr)return nullptr; + if(unit->nSegmTh(step)<1)return nullptr; return const_cast(unit->SectCollThSegment(step)); } diff --git a/L1Trigger/DTTrigger/src/DTTrigProd.cc b/L1Trigger/DTTrigger/src/DTTrigProd.cc index c296cfa2114af..951134c26d5bd 100644 --- a/L1Trigger/DTTrigger/src/DTTrigProd.cc +++ b/L1Trigger/DTTrigger/src/DTTrigProd.cc @@ -42,7 +42,7 @@ typedef SectCollPhiColl::const_iterator SectCollPhiColl_iterator; typedef vector SectCollThetaColl; typedef SectCollThetaColl::const_iterator SectCollThetaColl_iterator; -DTTrigProd::DTTrigProd(const ParameterSet& pset) : my_trig(0) { +DTTrigProd::DTTrigProd(const ParameterSet& pset) : my_trig(nullptr) { produces(); produces(); diff --git a/L1Trigger/DTTrigger/src/DTTrigTest.cc b/L1Trigger/DTTrigger/src/DTTrigTest.cc index 1ce9752b4f70b..37ca4bd582a87 100644 --- a/L1Trigger/DTTrigger/src/DTTrigTest.cc +++ b/L1Trigger/DTTrigger/src/DTTrigTest.cc @@ -40,15 +40,15 @@ // C++ headers #include -#include -#include +#include +#include using namespace std; using namespace edm; const double DTTrigTest::my_TtoTDC = 32./25.; -DTTrigTest::DTTrigTest(const ParameterSet& pset): my_trig(0) { +DTTrigTest::DTTrigTest(const ParameterSet& pset): my_trig(nullptr) { my_debug= pset.getUntrackedParameter("debug"); string outputfile = pset.getUntrackedParameter("outputFileName"); @@ -63,7 +63,7 @@ DTTrigTest::DTTrigTest(const ParameterSet& pset): my_trig(0) { DTTrigTest::~DTTrigTest(){ - if (my_trig != 0) delete my_trig; + if (my_trig != nullptr) delete my_trig; delete my_rootfile; if (my_debug) cout << "[DTTrigTest] Destructor executed!!!" << endl; diff --git a/L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h b/L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h index 48a378ac54267..0f852cfa6b356 100644 --- a/L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h +++ b/L1Trigger/DTTriggerServerPhi/interface/DTChambPhSegm.h @@ -55,7 +55,7 @@ class DTChambPhSegm : public DTTrigData { DTChambPhSegm(const DTChambPhSegm&); /// Destructor - ~DTChambPhSegm(); + ~DTChambPhSegm() override; /// Assignment operator @@ -78,10 +78,10 @@ class DTChambPhSegm : public DTTrigData { inline int step() const { return m_step; } /// Return chamber identifier - DTChamberId ChamberId() const { return m_chamberid; } + DTChamberId ChamberId() const override { return m_chamberid; } /// Print - void print() const; + void print() const override; /// Return parent TRACO number inline int tracoNumber() const { return m_tracotrig->tracoNumber(); } diff --git a/L1Trigger/DTTriggerServerPhi/interface/DTTSPhi.h b/L1Trigger/DTTriggerServerPhi/interface/DTTSPhi.h index 8fa60381ae50c..1c4f08c07853f 100644 --- a/L1Trigger/DTTriggerServerPhi/interface/DTTSPhi.h +++ b/L1Trigger/DTTriggerServerPhi/interface/DTTSPhi.h @@ -58,7 +58,7 @@ class DTTSPhi : public DTTSPhiManager, public DTGeomSupplier { DTTSPhi(DTTrigGeom*, DTTracoCard*); /// Destructor - ~DTTSPhi(); + ~DTTSPhi() override; /// Return the configuration class inline const DTConfigTSPhi* config() const {return _config; } @@ -73,13 +73,13 @@ class DTTSPhi : public DTTSPhiManager, public DTGeomSupplier { const DTChambPhSegm* segment(int step, unsigned n); /// Local position in chamber of a trigger-data object - LocalPoint localPosition(const DTTrigData*) const; + LocalPoint localPosition(const DTTrigData*) const override; /// Local direction in chamber of a trigger-data object - LocalVector localDirection(const DTTrigData*) const; + LocalVector localDirection(const DTTrigData*) const override; /// Load TRACO triggers and run TSPhi algorithm - virtual void reconstruct() { loadTSPhi(); runTSPhi(); } + void reconstruct() override { loadTSPhi(); runTSPhi(); } private: diff --git a/L1Trigger/DTTriggerServerPhi/src/DTChambPhSegm.cc b/L1Trigger/DTTriggerServerPhi/src/DTChambPhSegm.cc index d4e6d6bcafb26..ae6827d05ed94 100644 --- a/L1Trigger/DTTriggerServerPhi/src/DTChambPhSegm.cc +++ b/L1Trigger/DTTriggerServerPhi/src/DTChambPhSegm.cc @@ -73,7 +73,7 @@ DTChambPhSegm::operator=(const DTChambPhSegm& seg){ void DTChambPhSegm::clear() { - m_tracotrig = 0; + m_tracotrig = nullptr; m_isFirst = 0; } diff --git a/L1Trigger/DTTriggerServerPhi/src/DTTSCand.cc b/L1Trigger/DTTriggerServerPhi/src/DTTSCand.cc index 4226c857896df..bccb9ac4a9300 100644 --- a/L1Trigger/DTTriggerServerPhi/src/DTTSCand.cc +++ b/L1Trigger/DTTriggerServerPhi/src/DTTSCand.cc @@ -79,7 +79,7 @@ DTTSCand::operator=(const DTTSCand& tscand) { void DTTSCand::clear() { - _tctrig=0; + _tctrig=nullptr; _dataword.one(); _isCarry=0; diff --git a/L1Trigger/DTTriggerServerPhi/src/DTTSM.cc b/L1Trigger/DTTriggerServerPhi/src/DTTSM.cc index 1012a2e916cd5..0ecaee5c18a5b 100644 --- a/L1Trigger/DTTriggerServerPhi/src/DTTSM.cc +++ b/L1Trigger/DTTriggerServerPhi/src/DTTSM.cc @@ -91,7 +91,7 @@ DTTSM::run(int bkmod) { DTTSCand* first=sortTSM1(bkmod); - if(first!=0) { + if(first!=nullptr) { _outcand.push_back(first); } if(nSecondT()<1)return; // skip if no second tracks @@ -111,7 +111,7 @@ DTTSM::run(int bkmod) { // end debugging DTTSCand* second=sortTSM2(bkmod); - if(second!=0) { + if(second!=nullptr) { _outcand.push_back(second); } @@ -121,8 +121,8 @@ DTTSM::run(int bkmod) { DTTSCand* DTTSM::sortTSM1(int bkmod) { // Do a sort 1 - DTTSCand* best=0; - DTTSCand* carry=0; + DTTSCand* best=nullptr; + DTTSCand* carry=nullptr; std::vector::iterator p; for(p=_incand[0].begin(); p!=_incand[0].end(); p++) { DTTSCand* curr=(*p); @@ -136,14 +136,14 @@ DTTSM::sortTSM1(int bkmod) { } - if(best==0){ + if(best==nullptr){ best=curr; } else if((*curr)<(*best)){ carry=best; best=curr; } - else if(carry==0){ + else if(carry==nullptr){ carry=curr; } else if((*curr)<(*carry)){ @@ -153,7 +153,7 @@ DTTSM::sortTSM1(int bkmod) { // Ghost 1 suppression: use carry only if not suppressed - if(carry!=0) { // A carry is present + if(carry!=nullptr) { // A carry is present // Carry enabled if correlated and TRACO is next to best bool inner_or_corr; @@ -195,13 +195,13 @@ DTTSCand* DTTSM::sortTSM2(int bkmod) { // If second tracks are always suppressed skip processing - if(config()->TsmGhost2Flag()==3)return 0; + if(config()->TsmGhost2Flag()==3)return nullptr; // Check if there are second tracks if(nTracks()<1){ std::cout << "DTTSM::sortTSM2: called with no first track."; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } // If a first track at the following BX is present, ignore second tracks of any kind @@ -210,12 +210,12 @@ DTTSM::sortTSM2(int bkmod) { for(p=_incand[1].begin(); p!=_incand[1].end(); p++) { if((*p)->isCarry()) return (*p); } - return 0; + return nullptr; } // If no first tracks at the following BX, do a sort 2 DTTSCand* best=getTrack(1); - DTTSCand* second=0; + DTTSCand* second=nullptr; std::vector::iterator p; for(p=_incand[1].begin(); p!=_incand[1].end(); p++) { DTTSCand* curr=(*p); @@ -260,7 +260,7 @@ DTTSM::sortTSM2(int bkmod) { // added DBSM // SM double TSM if ( bkmod == 1 ) { // NORMAL mode ---> sorting with < - if(second==0){ + if(second==nullptr){ second=curr; } else if((*curr)<(*second)){ @@ -296,12 +296,12 @@ DTTSM::getDTTSCand(int ifs, unsigned n) const { if(ifs<1||ifs>2){ std::cout << "DTTSM::getDTTSCand: wrong track number: " << ifs; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(n<1 || n>nCand(ifs)) { std::cout << "DTTSM::getDTTSCand: requested trigger not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _incand[ifs-1].begin()+n-1; return (*p); @@ -312,12 +312,12 @@ DTTSM::getTracoT(int ifs, unsigned n) const { if(ifs<1||ifs>2){ std::cout << "DTTSM::getTracoT: wrong track number: " << ifs; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(n<1 || n>nCand(ifs)) { std::cout << "DTTSM::getTracoT: requested trigger not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } return getDTTSCand(ifs, n)->tracoTr(); } @@ -328,7 +328,7 @@ DTTSM::getTrack(int n) const { if(n<1 || n>nTracks()) { std::cout << "DTTSM::getTrack: requested track not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _outcand.begin()+n-1; return (*p); diff --git a/L1Trigger/DTTriggerServerPhi/src/DTTSPhi.cc b/L1Trigger/DTTriggerServerPhi/src/DTTSPhi.cc index 10c8996360a85..74dd1060a994e 100644 --- a/L1Trigger/DTTriggerServerPhi/src/DTTSPhi.cc +++ b/L1Trigger/DTTriggerServerPhi/src/DTTSPhi.cc @@ -234,7 +234,7 @@ DTTSPhi::addTracoT(int step, const DTTracoTrigData* tracotrig, int ifs) { void DTTSPhi::runTSPhi() { - DTTSCand* secondPrevBx = 0; // new DTTSCand; + DTTSCand* secondPrevBx = nullptr; // new DTTSCand; bool existSecondPrevBx = false; int itsmd = 1; // initialize it to 1, default value if not in back up mode @@ -408,7 +408,7 @@ DTTSPhi::runTSPhi() { } // end loop on step // debugging... if(config()->debug()){ - if(_cache.size()>0){ + if(!_cache.empty()){ std::cout << "====================================================" << std::endl; std::cout << " Phi segments " << std::endl; std::vector::const_iterator p; @@ -461,13 +461,13 @@ DTTSPhi::getDTTSS(int step, unsigned n) const { if(stepDTConfigTSPhi::NSTEPL){ std::cout << "DTTSPhi::getDTTSS: step out of range: " << step; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(n<1 || n>_tss[step-DTConfigTSPhi::NSTEPF].size()){ std::cout << "DTTSPhi::getDTTSS: requested DTTSS not present: " << n; std::cout << " (at step " << step << ")"; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _tss[step-DTConfigTSPhi::NSTEPF].begin()+n-1; @@ -482,13 +482,13 @@ DTTSPhi::getDTTSM(int step, unsigned n) const { if(stepDTConfigTSPhi::NSTEPL){ std::cout << "DTTSPhi::getDTTSM: step out of range: " << step; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(n<1 || n>_tsm[step-DTConfigTSPhi::NSTEPF].size()){ std::cout << "DTTSPhi::getDTTSM: requested DTTSM not present: " << n; std::cout << " (at step " << step << ")"; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p_tsm = _tsm[step-DTConfigTSPhi::NSTEPF].begin()+n-1; return *p_tsm; @@ -513,7 +513,7 @@ DTTSPhi::segment(int step, unsigned n) { if(p->step()==step&&((n==1&&p->isFirst())||(n==2&&!p->isFirst()))) return &(*p);// p; } - return 0; + return nullptr; } LocalPoint diff --git a/L1Trigger/DTTriggerServerPhi/src/DTTSS.cc b/L1Trigger/DTTriggerServerPhi/src/DTTSS.cc index 23a70c3af022b..f3f39da06bfa2 100644 --- a/L1Trigger/DTTriggerServerPhi/src/DTTSS.cc +++ b/L1Trigger/DTTriggerServerPhi/src/DTTSS.cc @@ -95,7 +95,7 @@ DTTSS::run() { // end debugging DTTSCand* first=sortTSS1(); - if(first!=0) { + if(first!=nullptr) { _outcand.push_back(first); } @@ -114,7 +114,7 @@ DTTSS::run() { // end debugging DTTSCand* second=sortTSS2(); - if(second!=0) { + if(second!=nullptr) { _outcand.push_back(second); } @@ -124,24 +124,24 @@ DTTSCand* DTTSS::sortTSS1() { // Do a sort 1 - DTTSCand* best=0; - DTTSCand* carry=0; + DTTSCand* best=nullptr; + DTTSCand* carry=nullptr; std::vector::iterator p; for(p=_tctrig[0].begin(); p!=_tctrig[0].end(); p++) { - DTTSCand* curr= (*p) ? (*p) : 0; + DTTSCand* curr= (*p) ? (*p) : nullptr; // SM sector collector Set bits for tss curr->setBitsTss(); if(curr->dataword()==0x1ff)continue; _logWord1[1+curr->TcPos()] = (curr->isFirst()) ? '1' : '2'; // std::cout << "Running TSS: --->curr->dataword() sort 1 " << curr->dataword() << std::endl; - if(best==0){ + if(best==nullptr){ best=curr; } else if((*curr)<=(*best)){ carry=best; best=curr; } - else if(carry==0){ + else if(carry==nullptr){ carry=curr; } else if((*curr)<=(*carry)){ @@ -151,7 +151,7 @@ DTTSS::sortTSS1() { // Ghost 1 suppression: use carry only if not suppressed - if(carry!=0) { // A carry is present + if(carry!=nullptr) { // A carry is present // Carry enabled if correlated and TRACO is next to best bool inner_or_corr; @@ -205,7 +205,7 @@ DTTSS::sortTSS2() { if(nTracks()<1){ std::cout << "DTTSS::DTTSSsort2: called with no first track."; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(_ignoreSecondTrack){ @@ -219,7 +219,7 @@ DTTSS::sortTSS2() { std::vector::iterator p; for(p=_tctrig[1].begin(); p!=_tctrig[1].end(); p++) if(!(*p)->isCarry())_logWord2[1+(*p)->TcPos()] = 'o'; // out of time - return 0; + return nullptr; } // If second tracks are always suppressed skip processing @@ -228,12 +228,12 @@ DTTSS::sortTSS2() { std::vector::iterator p; for(p=_tctrig[1].begin(); p!=_tctrig[1].end(); p++) _logWord2[1+(*p)->TcPos()] = 'G'; - return 0; + return nullptr; } // If no first tracks at the following BX, do a sort 2 DTTSCand* best=getTrack(1); - DTTSCand* second=0; + DTTSCand* second=nullptr; std::vector::iterator p; for(p=_tctrig[1].begin(); p!=_tctrig[1].end(); p++) { DTTSCand* curr=(*p); @@ -271,7 +271,7 @@ DTTSS::sortTSS2() { } } } - if(second==0){ + if(second==nullptr){ second=curr; } else if((*curr)<=(*second)){ @@ -308,12 +308,12 @@ DTTSS::getDTTSCand(int ifs, unsigned n) const { if(ifs<1||ifs>2){ std::cout << "DTTSS::getDTTSCand: wrong track number: " << ifs; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(n<1 || n>nTracoT(ifs)) { std::cout << "DTTSS::getDTTSCand: requested trigger not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p=_tctrig[ifs-1].begin()+n-1; return (*p); @@ -324,12 +324,12 @@ DTTSS::getTracoT(int ifs, unsigned n) const { if(ifs<1||ifs>2){ std::cout << "DTTSS::getTracoT: wrong track number: " << ifs; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } if(n<1 || n>nTracoT(ifs)) { std::cout << "DTTSS::getTracoT: requested trigger not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } return getDTTSCand(ifs, n)->tracoTr(); } @@ -339,7 +339,7 @@ DTTSS::getTrack(int n) const { if(n<1 || n>nTracks()) { std::cout << "DTTSS::getTrack: requested track not present: " << n; std::cout << " empty pointer returned!" << std::endl; - return 0; + return nullptr; } std::vector::const_iterator p = _outcand.begin()+n-1; return (*p); @@ -350,7 +350,7 @@ DTTSS::getCarry() const { std::vector::const_iterator p; for(p=_tctrig[1].begin(); p!=_tctrig[1].end(); p++) if((*p)->isCarry()) return (*p); - return 0; + return nullptr; } std::string diff --git a/L1Trigger/DTTriggerServerTheta/interface/DTChambThSegm.h b/L1Trigger/DTTriggerServerTheta/interface/DTChambThSegm.h index c0ad3f56cfff8..9fc0de1738ebd 100644 --- a/L1Trigger/DTTriggerServerTheta/interface/DTChambThSegm.h +++ b/L1Trigger/DTTriggerServerTheta/interface/DTChambThSegm.h @@ -48,7 +48,7 @@ class DTChambThSegm : public DTTrigData { DTChambThSegm(const DTChambThSegm& seg); /// Destructor - ~DTChambThSegm(); + ~DTChambThSegm() override; /// Assignment operator DTChambThSegm& operator=(const DTChambThSegm& seg); @@ -60,10 +60,10 @@ class DTChambThSegm : public DTTrigData { inline int step() const { return m_step; } /// Identifier of the associated chamber - DTChamberId ChamberId() const { return m_chamberid; } + DTChamberId ChamberId() const override { return m_chamberid; } /// Print - void print() const; + void print() const override; /// Return the code for a given set of 7 BTI int code(const int i) const; diff --git a/L1Trigger/DTTriggerServerTheta/interface/DTTSTheta.h b/L1Trigger/DTTriggerServerTheta/interface/DTTSTheta.h index 59d7806c6a53d..49a60ea58b9fe 100644 --- a/L1Trigger/DTTriggerServerTheta/interface/DTTSTheta.h +++ b/L1Trigger/DTTriggerServerTheta/interface/DTTSTheta.h @@ -50,7 +50,7 @@ class DTTSTheta : public DTTSThetaManager, public DTGeomSupplier { DTTSTheta(DTTrigGeom*, DTBtiCard*); /// Destructor - ~DTTSTheta(); + ~DTTSTheta() override; /// Return configuration inline const DTConfigTSTheta* config() const { return _config; } @@ -71,16 +71,16 @@ class DTTSTheta : public DTTSThetaManager, public DTGeomSupplier { int nHTrig(int step); /// Local position in chamber of a L1Trigger-data object - LocalPoint localPosition(const DTTrigData*) const; + LocalPoint localPosition(const DTTrigData*) const override; /// Local direction in chamber of a L1Trigger-data object - LocalVector localDirection(const DTTrigData*) const; + LocalVector localDirection(const DTTrigData*) const override; /// Print a L1Trigger-data object with also local and global position/direction - void print(const DTTrigData* trig) const; + void print(const DTTrigData* trig) const override; /// Load BTIs triggers and run TSTheta algoritm - void reconstruct() { loadDTTSTheta(); runDTTSTheta(); } + void reconstruct() override { loadDTTSTheta(); runDTTSTheta(); } private: diff --git a/L1Trigger/DTTriggerServerTheta/src/DTTSTheta.cc b/L1Trigger/DTTriggerServerTheta/src/DTTSTheta.cc index 78fb3b9872a84..060aabe12044c 100644 --- a/L1Trigger/DTTriggerServerTheta/src/DTTSTheta.cc +++ b/L1Trigger/DTTriggerServerTheta/src/DTTSTheta.cc @@ -194,7 +194,7 @@ DTTSTheta::runDTTSTheta() { // debugging... if(config()->debug()){ - if(_cache.size()>0){ + if(!_cache.empty()){ std::cout << "====================================================" << std::endl; std::cout << " Theta segments " << std::endl; std::vector::const_iterator p; @@ -225,7 +225,7 @@ DTTSTheta::segment(int step, unsigned n) { if(p->step()==step&&n==1) return &(*p); } - return 0; + return nullptr; } int @@ -255,7 +255,7 @@ DTTSTheta::btiMask(int step) const { if(stepDTConfigTSTheta::NSTEPL){ std::cout << "DTTSTheta::btiMask: step out of range " << step; std::cout << " empty pointer returned" << std::endl; - return 0; + return nullptr; } return (BitArray*)&_trig[step-DTConfigTSTheta::NSTEPF]; } @@ -265,7 +265,7 @@ DTTSTheta::btiQual(int step) const { if(stepDTConfigTSTheta::NSTEPL){ std::cout << "DTTSTheta::btiQual: step out of range " << step; std::cout << " empty pointer returned" << std::endl; - return 0; + return nullptr; } return (BitArray*)&_Htrig[step-DTConfigTSTheta::NSTEPF]; } diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctElectronFinalSort.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctElectronFinalSort.h index 413ef2d70ea7c..28d1642f06c2a 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctElectronFinalSort.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctElectronFinalSort.h @@ -38,13 +38,13 @@ class L1GctElectronFinalSort : public L1GctProcessor L1GctEmLeafCard* negEtaCard); /// /// destructor - ~L1GctElectronFinalSort(); + ~L1GctElectronFinalSort() override; /// /// get input data from sources - virtual void fetchInput(); + void fetchInput() override; /// /// process the data, fill output buffers - virtual void process(); + void process() override; /// /// set input data void setInputEmCand(unsigned i, const L1GctEmCand& cand); @@ -64,11 +64,11 @@ class L1GctElectronFinalSort : public L1GctProcessor protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor(); - virtual void resetPipelines(); + void resetProcessor() override; + void resetPipelines() override; /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects() {} + void setupObjects() override {} private: /// diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctElectronSorter.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctElectronSorter.h index a974bab85e68d..081990a3189d5 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctElectronSorter.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctElectronSorter.h @@ -58,13 +58,13 @@ class L1GctElectronSorter : public L1GctProcessor /// constructor; set type (isolated or non-isolated) L1GctElectronSorter(int nInputs, bool iso); /// - ~L1GctElectronSorter(); + ~L1GctElectronSorter() override; /// /// get input data from sources - virtual void fetchInput(); + void fetchInput() override; /// /// process the data, fill output buffers - virtual void process(); + void process() override; /// /// set input candidate void setInputEmCand(const L1CaloEmCand& cand); @@ -80,11 +80,11 @@ class L1GctElectronSorter : public L1GctProcessor protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor(); - virtual void resetPipelines() {} + void resetProcessor() override; + void resetPipelines() override {} /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects(); + void setupObjects() override; private: /// diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctEmLeafCard.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctEmLeafCard.h index 6f78b38f1d24d..64b57c5fc354e 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctEmLeafCard.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctEmLeafCard.h @@ -26,16 +26,16 @@ class L1GctEmLeafCard : public L1GctProcessor { L1GctEmLeafCard(int id); /// /// destruct - ~L1GctEmLeafCard(); + ~L1GctEmLeafCard() override; /// /// clear internal trigger data buffers void reset(); /// /// fetch input data - virtual void fetchInput(); + void fetchInput() override; /// /// process the event - virtual void process(); + void process() override; /// /// define the bunch crossing range to process void setBxRange(const int firstBx, const int numberOfBx); @@ -63,11 +63,11 @@ class L1GctEmLeafCard : public L1GctProcessor { protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor() {} - virtual void resetPipelines() {} + void resetProcessor() override {} + void resetPipelines() override {} /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects() {} + void setupObjects() override {} private: /// card ID (0 or 1) diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctGlobalEnergyAlgos.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctGlobalEnergyAlgos.h index 375cf9a6041d9..75ae2cc0a82ef 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctGlobalEnergyAlgos.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctGlobalEnergyAlgos.h @@ -52,7 +52,7 @@ class L1GctGlobalEnergyAlgos : public L1GctProcessor L1GctGlobalEnergyAlgos(const std::vector& WheelFpga, const std::vector& WheelJetFpga); /// Destructor - ~L1GctGlobalEnergyAlgos(); + ~L1GctGlobalEnergyAlgos() override; /// Overload << operator friend std::ostream& operator << (std::ostream& os, const L1GctGlobalEnergyAlgos& fpga); @@ -61,10 +61,10 @@ class L1GctGlobalEnergyAlgos : public L1GctProcessor void reset(); /// get input data from sources - virtual void fetchInput(); + void fetchInput() override; /// process the data, fill output buffers - virtual void process(); + void process() override; /// define the bunch crossing range to process void setBxRange(const int firstBx, const int numberOfBx); @@ -146,11 +146,11 @@ class L1GctGlobalEnergyAlgos : public L1GctProcessor protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor(); - virtual void resetPipelines(); + void resetProcessor() override; + void resetPipelines() override; /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects() {} + void setupObjects() override {} private: // Here are the algorithm types we get our inputs from diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctGlobalHfSumAlgos.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctGlobalHfSumAlgos.h index 237f51bb617f3..4361a95b93e3e 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctGlobalHfSumAlgos.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctGlobalHfSumAlgos.h @@ -33,16 +33,16 @@ class L1GctGlobalHfSumAlgos : public L1GctProcessor /// Constructor needs the Wheel card Fpgas set up first L1GctGlobalHfSumAlgos(const std::vector& WheelJetFpga); /// Destructor - ~L1GctGlobalHfSumAlgos(); + ~L1GctGlobalHfSumAlgos() override; /// Overload << operator friend std::ostream& operator << (std::ostream& os, const L1GctGlobalHfSumAlgos& fpga); /// get input data from sources; this is the standard way to provide input - virtual void fetchInput(); + void fetchInput() override; /// process the data, fill output buffers - virtual void process(); + void process() override; /// Access to output quantities std::vector hfSumsOutput(const L1GctHfEtSumsLut::hfLutType type) const; @@ -68,11 +68,11 @@ class L1GctGlobalHfSumAlgos : public L1GctProcessor protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor(); - virtual void resetPipelines(); + void resetProcessor() override; + void resetPipelines() override; /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects() {} + void setupObjects() override {} private: // Here are the algorithm types we get our inputs from diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctHardwareJetFinder.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctHardwareJetFinder.h index 3e328409cbbe4..04c525e2a69f5 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctHardwareJetFinder.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctHardwareJetFinder.h @@ -25,7 +25,7 @@ class L1GctHardwareJetFinder : public L1GctJetFinderBase /// id is 0-8 for -ve Eta jetfinders, 9-17 for +ve Eta, for increasing Phi. L1GctHardwareJetFinder(int id); - ~L1GctHardwareJetFinder(); + ~L1GctHardwareJetFinder() override; /// Overload << operator friend std::ostream& operator << (std::ostream& os, const L1GctHardwareJetFinder& algo); @@ -34,18 +34,18 @@ class L1GctHardwareJetFinder : public L1GctJetFinderBase virtual void reset(); /// get input data from sources - virtual void fetchInput(); + void fetchInput() override; /// process the data, fill output buffers - virtual void process(); + void process() override; protected: // Each jetFinder must define the constants as private and copy the // function definitions below. - virtual unsigned maxRegionsIn() const { return MAX_REGIONS_IN; } - virtual unsigned centralCol0() const { return CENTRAL_COL0; } - virtual unsigned nCols() const { return N_COLS; } + unsigned maxRegionsIn() const override { return MAX_REGIONS_IN; } + unsigned centralCol0() const override { return CENTRAL_COL0; } + unsigned nCols() const override { return N_COLS; } private: diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctHfBitCountsLut.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctHfBitCountsLut.h index eed9197b03288..cd6176afa4555 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctHfBitCountsLut.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctHfBitCountsLut.h @@ -32,7 +32,7 @@ class L1GctHfBitCountsLut : public L1GctLut<5,3> /// Copy constructor L1GctHfBitCountsLut(const L1GctHfBitCountsLut& lut); /// Destructor - virtual ~L1GctHfBitCountsLut(); + ~L1GctHfBitCountsLut() override; /// Overload = operator L1GctHfBitCountsLut operator= (const L1GctHfBitCountsLut& lut); @@ -49,7 +49,7 @@ class L1GctHfBitCountsLut : public L1GctLut<5,3> protected: - virtual uint16_t value (const uint16_t lutAddress) const; + uint16_t value (const uint16_t lutAddress) const override; private: diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctHfEtSumsLut.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctHfEtSumsLut.h index 6338f9c64db24..7e919c3a6ebdd 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctHfEtSumsLut.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctHfEtSumsLut.h @@ -45,7 +45,7 @@ class L1GctHfEtSumsLut : public L1GctLut<8,3> /// Copy constructor L1GctHfEtSumsLut(const L1GctHfEtSumsLut& lut); /// Destructor - virtual ~L1GctHfEtSumsLut(); + ~L1GctHfEtSumsLut() override; /// Overload = operator L1GctHfEtSumsLut operator= (const L1GctHfEtSumsLut& lut); @@ -54,7 +54,7 @@ class L1GctHfEtSumsLut : public L1GctLut<8,3> friend std::ostream& operator << (std::ostream& os, const L1GctHfEtSumsLut& lut); /// Set the function - void setFunction(const L1CaloEtScale* const fn) { if (fn != 0) { m_lutFunction = fn; m_setupOk = true; } } + void setFunction(const L1CaloEtScale* const fn) { if (fn != nullptr) { m_lutFunction = fn; m_setupOk = true; } } /// Return the type of Lut L1GctHfEtSumsLut::hfLutType lutType() const { return m_lutType; } @@ -69,7 +69,7 @@ class L1GctHfEtSumsLut : public L1GctLut<8,3> protected: - virtual uint16_t value (const uint16_t lutAddress) const; + uint16_t value (const uint16_t lutAddress) const override; private: diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctHtMissLut.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctHtMissLut.h index b82008bc9f655..3d3d3b7b5d52a 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctHtMissLut.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctHtMissLut.h @@ -37,7 +37,7 @@ class L1GctHtMissLut : public L1GctLut<16,12> /// Copy constructor L1GctHtMissLut(const L1GctHtMissLut& lut); /// Destructor - virtual ~L1GctHtMissLut(); + ~L1GctHtMissLut() override; /// Overload = operator L1GctHtMissLut operator= (const L1GctHtMissLut& lut); @@ -46,7 +46,7 @@ class L1GctHtMissLut : public L1GctLut<16,12> friend std::ostream& operator << (std::ostream& os, const L1GctHtMissLut& lut); /// Set the functions - void setEtScale(const L1CaloEtScale* const fn) { m_etScale = fn; if (fn != 0) { m_setupOk = true; } } + void setEtScale(const L1CaloEtScale* const fn) { m_etScale = fn; if (fn != nullptr) { m_setupOk = true; } } void setExEyLsb(const double lsb) { m_componentLsb = lsb; } /// Return the Lut functions and parameters @@ -60,7 +60,7 @@ class L1GctHtMissLut : public L1GctLut<16,12> protected: - virtual uint16_t value (const uint16_t lutAddress) const; + uint16_t value (const uint16_t lutAddress) const override; private: diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctJetEtCalibrationLut.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctJetEtCalibrationLut.h index acf81450575d2..fdfaedc23918e 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctJetEtCalibrationLut.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctJetEtCalibrationLut.h @@ -33,7 +33,7 @@ class L1GctJetEtCalibrationLut : public L1GctLut& m_wheelFpgas); - ~L1GctJetFinalStage(); + ~L1GctJetFinalStage() override; /// Overload << operator friend std::ostream& operator << (std::ostream& os, const L1GctJetFinalStage& fpga); /// get input data from sources - virtual void fetchInput(); + void fetchInput() override; /// process the data, fill output buffers - virtual void process(); + void process() override; void setInputCentralJet(int i, const L1GctJetCand& jet); ///< set the central jets input data void setInputForwardJet(int i, const L1GctJetCand& jet); ///< set the forward jets input data @@ -58,11 +58,11 @@ class L1GctJetFinalStage : public L1GctProcessor protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor(); - virtual void resetPipelines(); + void resetProcessor() override; + void resetPipelines() override; /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects() {} + void setupObjects() override {} private: static const int MAX_JETS_IN; ///< Max number of jets of each type coming in diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinderBase.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinderBase.h index 8e6d306d6cac5..6f7b06ace8c2c 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinderBase.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinderBase.h @@ -119,7 +119,7 @@ class L1GctJetFinderBase : public L1GctProcessor /// id is 0-8 for -ve Eta jetfinders, 9-17 for +ve Eta, for increasing Phi. L1GctJetFinderBase(int id); - ~L1GctJetFinderBase(); + ~L1GctJetFinderBase() override; /// Set pointers to neighbours - needed to complete the setup void setNeighbourJetFinders(const std::vector& neighbours); @@ -150,10 +150,10 @@ class L1GctJetFinderBase : public L1GctProcessor friend std::ostream& operator << (std::ostream& os, const L1GctJetFinderBase& algo); /// get input data from sources; to be filled in by derived jetFinders - virtual void fetchInput() = 0; + void fetchInput() override = 0; /// process the data, fill output buffers; to be filled in by derived jetFinders - virtual void process() = 0; + void process() override = 0; /// Set input data void setInputRegion(const L1CaloRegion& region); @@ -207,11 +207,11 @@ class L1GctJetFinderBase : public L1GctProcessor protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor(); - virtual void resetPipelines(); + void resetProcessor() override; + void resetPipelines() override; /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects(); + void setupObjects() override; protected: diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctJetLeafCard.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctJetLeafCard.h index e6ae6514bcf98..5a9db7f51bf6e 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctJetLeafCard.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctJetLeafCard.h @@ -51,7 +51,7 @@ class L1GctJetLeafCard : public L1GctProcessor //Construtors/destructor L1GctJetLeafCard(int id, int iphi, jetFinderType jfType = tdrJetFinder); - ~L1GctJetLeafCard(); + ~L1GctJetLeafCard() override; /// set pointers to neighbours - needed to complete the setup void setNeighbourLeafCards(const std::vector& neighbours); @@ -66,10 +66,10 @@ class L1GctJetLeafCard : public L1GctProcessor void reset(); /// set the input buffers - virtual void fetchInput(); + void fetchInput() override; /// process the data and set outputs - virtual void process(); + void process() override; /// define the bunch crossing range to process void setBxRange(const int firstBx, const int numberOfBx); @@ -127,11 +127,11 @@ class L1GctJetLeafCard : public L1GctProcessor protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor(); - virtual void resetPipelines(); + void resetProcessor() override; + void resetPipelines() override; /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects() {} + void setupObjects() override {} private: diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctNullJetFinder.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctNullJetFinder.h index b6b00d2fa4137..3a00d2069a4bd 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctNullJetFinder.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctNullJetFinder.h @@ -26,24 +26,24 @@ class L1GctNullJetFinder : public L1GctJetFinderBase /// id is 0-8 for -ve Eta jetfinders, 9-17 for +ve Eta, for increasing Phi. L1GctNullJetFinder(int id); - ~L1GctNullJetFinder(); + ~L1GctNullJetFinder() override; /// Overload << operator friend std::ostream& operator << (std::ostream& os, const L1GctNullJetFinder& algo); /// get input data from sources - virtual void fetchInput(); + void fetchInput() override; /// process the data, fill output buffers - virtual void process(); + void process() override; protected: // Each jetFinder must define the constants as private and copy the // function definitions below. - virtual unsigned maxRegionsIn() const { return MAX_REGIONS_IN; } - virtual unsigned centralCol0() const { return CENTRAL_COL0; } - virtual unsigned nCols() const { return N_COLS; } + unsigned maxRegionsIn() const override { return MAX_REGIONS_IN; } + unsigned centralCol0() const override { return CENTRAL_COL0; } + unsigned nCols() const override { return N_COLS; } private: diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctTdrJetFinder.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctTdrJetFinder.h index 57d1251caa3d2..96d4d4fe1c54b 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctTdrJetFinder.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctTdrJetFinder.h @@ -58,24 +58,24 @@ class L1GctTdrJetFinder : public L1GctJetFinderBase /// id is 0-8 for -ve Eta jetfinders, 9-17 for +ve Eta, for increasing Phi. L1GctTdrJetFinder(int id); - ~L1GctTdrJetFinder(); + ~L1GctTdrJetFinder() override; /// Overload << operator friend std::ostream& operator << (std::ostream& os, const L1GctTdrJetFinder& algo); /// get input data from sources - virtual void fetchInput(); + void fetchInput() override; /// process the data, fill output buffers - virtual void process(); + void process() override; protected: // Each jetFinder must define the constants as private and copy the // function definitions below. - virtual unsigned maxRegionsIn() const { return MAX_REGIONS_IN; } - virtual unsigned centralCol0() const { return CENTRAL_COL0; } - virtual unsigned int nCols() const { return N_COLS; } + unsigned maxRegionsIn() const override { return MAX_REGIONS_IN; } + unsigned centralCol0() const override { return CENTRAL_COL0; } + unsigned int nCols() const override { return N_COLS; } private: diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelEnergyFpga.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelEnergyFpga.h index 3eae38ab17bc9..3c6a6276d2b25 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelEnergyFpga.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelEnergyFpga.h @@ -46,16 +46,16 @@ class L1GctWheelEnergyFpga : public L1GctProcessor /// Constructor, needs the Leaf cards to be set up first. id should be 0 or 1. L1GctWheelEnergyFpga(int id, const std::vector& leafCards); /// Destructor - ~L1GctWheelEnergyFpga(); + ~L1GctWheelEnergyFpga() override; /// Overload << operator friend std::ostream& operator << (std::ostream& os, const L1GctWheelEnergyFpga& fpga); /// get input data from sources; this is the standard way to provide input - virtual void fetchInput(); + void fetchInput() override; /// process the data, fill output buffers - virtual void process(); + void process() override; /// set input data; not used in normal operation void setInputEnergy(unsigned i, int ex, int ey, unsigned et, unsigned ht); @@ -90,11 +90,11 @@ class L1GctWheelEnergyFpga : public L1GctProcessor protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor(); - virtual void resetPipelines(); + void resetProcessor() override; + void resetPipelines() override; /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects() {} + void setupObjects() override {} private: diff --git a/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h b/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h index 2616252559744..97d99f027c82f 100644 --- a/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h +++ b/L1Trigger/GlobalCaloTrigger/interface/L1GctWheelJetFpga.h @@ -47,16 +47,16 @@ class L1GctWheelJetFpga : public L1GctProcessor const std::vector& inputLeafCards); /// destructor - ~L1GctWheelJetFpga(); + ~L1GctWheelJetFpga() override; /// Overload << operator friend std::ostream& operator << (std::ostream& os, const L1GctWheelJetFpga& fpga); /// get input data from sources - virtual void fetchInput(); + void fetchInput() override; /// process the data, fill output buffers - virtual void process(); + void process() override; /// set input data void setInputJet(int i, const L1GctJetCand& jet); @@ -96,11 +96,11 @@ class L1GctWheelJetFpga : public L1GctProcessor protected: /// Separate reset methods for the processor itself and any data stored in pipelines - virtual void resetProcessor(); - virtual void resetPipelines(); + void resetProcessor() override; + void resetPipelines() override; /// Initialise inputs with null objects for the correct bunch crossing if required - virtual void setupObjects(); + void setupObjects() override; private: diff --git a/L1Trigger/GlobalCaloTrigger/plugins/L1GctEmulator.cc b/L1Trigger/GlobalCaloTrigger/plugins/L1GctEmulator.cc index fe2ea2df84f7b..702f8591eb1e0 100644 --- a/L1Trigger/GlobalCaloTrigger/plugins/L1GctEmulator.cc +++ b/L1Trigger/GlobalCaloTrigger/plugins/L1GctEmulator.cc @@ -112,7 +112,7 @@ L1GctEmulator::L1GctEmulator(const edm::ParameterSet& ps) : } L1GctEmulator::~L1GctEmulator() { - if (m_gct != 0) delete m_gct; + if (m_gct != nullptr) delete m_gct; } @@ -142,7 +142,7 @@ int L1GctEmulator::configureGct(const edm::EventSetup& c) c.get< L1HfRingEtScaleRcd >().get( m_conditionsLabel, hfRingEtScale ) ; // which record? - if (jfPars.product() == 0) { + if (jfPars.product() == nullptr) { success = -1; if (m_verbose) { edm::LogWarning("L1GctConfigFailure") @@ -150,7 +150,7 @@ int L1GctEmulator::configureGct(const edm::EventSetup& c) } } - if (chanMask.product() == 0) { + if (chanMask.product() == nullptr) { success = -1; if (m_verbose) { edm::LogWarning("L1GctConfigFailure") @@ -158,7 +158,7 @@ int L1GctEmulator::configureGct(const edm::EventSetup& c) } } - if (hfRingEtScale.product() == 0) { + if (hfRingEtScale.product() == nullptr) { success = -1; if (m_verbose) { edm::LogWarning("L1GctConfigFailure") diff --git a/L1Trigger/GlobalCaloTrigger/plugins/L1GctEmulator.h b/L1Trigger/GlobalCaloTrigger/plugins/L1GctEmulator.h index 4ecc41baaae39..b6e195b80ad59 100644 --- a/L1Trigger/GlobalCaloTrigger/plugins/L1GctEmulator.h +++ b/L1Trigger/GlobalCaloTrigger/plugins/L1GctEmulator.h @@ -37,12 +37,12 @@ class L1GctEmulator : public edm::EDProducer { explicit L1GctEmulator(const edm::ParameterSet& ps); /// destructor - ~L1GctEmulator(); + ~L1GctEmulator() override; private: - void beginJob() ; - void produce(edm::Event& e, const edm::EventSetup& c); - void endJob() ; + void beginJob() override ; + void produce(edm::Event& e, const edm::EventSetup& c) override; + void endJob() override ; int configureGct(const edm::EventSetup& c) ; diff --git a/L1Trigger/GlobalCaloTrigger/plugins/L1GctPrintLuts.cc b/L1Trigger/GlobalCaloTrigger/plugins/L1GctPrintLuts.cc index 2b0bb085b3bfe..9dd67aaa12ea7 100644 --- a/L1Trigger/GlobalCaloTrigger/plugins/L1GctPrintLuts.cc +++ b/L1Trigger/GlobalCaloTrigger/plugins/L1GctPrintLuts.cc @@ -170,19 +170,19 @@ int L1GctPrintLuts::configureGct(const edm::EventSetup& c) edm::ESHandle< L1CaloEtScale > etScale ; c.get< L1JetEtScaleRcd >().get( etScale ) ; // which record? - if (jfPars.product() == 0) { + if (jfPars.product() == nullptr) { success = -1; edm::LogWarning("L1GctConfigFailure") << "Failed to find a L1GctJetFinderParamsRcd:L1GctJetFinderParams in EventSetup!" << std::endl; } - if (hfRingEtScale.product() == 0) { + if (hfRingEtScale.product() == nullptr) { success = -1; edm::LogWarning("L1GctConfigFailure") << "Failed to find a L1HfRingEtScaleRcd:L1CaloEtScale in EventSetup!" << std::endl; } - if (htMissScale.product() == 0) { + if (htMissScale.product() == nullptr) { success = -1; edm::LogWarning("L1GctConfigFailure") << "Failed to find a L1HtMissScaleRcd:L1CaloEtScale in EventSetup!" << std::endl; diff --git a/L1Trigger/GlobalCaloTrigger/plugins/L1GctPrintLuts.h b/L1Trigger/GlobalCaloTrigger/plugins/L1GctPrintLuts.h index 0cefd8bf08d82..7e2d24370e09e 100644 --- a/L1Trigger/GlobalCaloTrigger/plugins/L1GctPrintLuts.h +++ b/L1Trigger/GlobalCaloTrigger/plugins/L1GctPrintLuts.h @@ -44,13 +44,13 @@ class L1GctPrintLuts : public edm::EDAnalyzer { typedef L1GlobalCaloTrigger::lutPtrVector lutPtrVector; explicit L1GctPrintLuts(const edm::ParameterSet&); - ~L1GctPrintLuts(); + ~L1GctPrintLuts() override; private: - virtual void beginJob(); - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; int configureGct(const edm::EventSetup& c) ; diff --git a/L1Trigger/GlobalCaloTrigger/plugins/L1GctValidation.cc b/L1Trigger/GlobalCaloTrigger/plugins/L1GctValidation.cc index f651d4089bdc6..06371289319cf 100644 --- a/L1Trigger/GlobalCaloTrigger/plugins/L1GctValidation.cc +++ b/L1Trigger/GlobalCaloTrigger/plugins/L1GctValidation.cc @@ -18,7 +18,7 @@ #include "DataFormats/Math/interface/deltaPhi.h" -#include +#include L1GctValidation::L1GctValidation(const edm::ParameterSet& iConfig) : m_gctinp_tag(iConfig.getUntrackedParameter("rctInputTag", edm::InputTag("rctDigis"))), diff --git a/L1Trigger/GlobalCaloTrigger/plugins/L1GctValidation.h b/L1Trigger/GlobalCaloTrigger/plugins/L1GctValidation.h index f08af6b5a738d..542eb56709e08 100644 --- a/L1Trigger/GlobalCaloTrigger/plugins/L1GctValidation.h +++ b/L1Trigger/GlobalCaloTrigger/plugins/L1GctValidation.h @@ -38,13 +38,13 @@ class L1GctValidation : public edm::EDAnalyzer { public: explicit L1GctValidation(const edm::ParameterSet&); - ~L1GctValidation(); + ~L1GctValidation() override; private: - virtual void beginJob(); - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctElectronFinalSort.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctElectronFinalSort.cc index 2361b9c7bedfc..08dd98b71e515 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctElectronFinalSort.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctElectronFinalSort.cc @@ -10,12 +10,12 @@ L1GctElectronFinalSort::L1GctElectronFinalSort(bool iso, L1GctEmLeafCard* posEta L1GctEmLeafCard* negEtaCard): L1GctProcessor(), m_emCandsType(iso), - m_thePosEtaLeafCard(0), m_theNegEtaLeafCard(0), + m_thePosEtaLeafCard(nullptr), m_theNegEtaLeafCard(nullptr), m_inputCands(16), m_outputCands(4), m_setupOk(true) { - if(posEtaCard!=0){ + if(posEtaCard!=nullptr){ m_thePosEtaLeafCard = posEtaCard; }else{ m_setupOk = false; @@ -24,7 +24,7 @@ L1GctElectronFinalSort::L1GctElectronFinalSort(bool iso, L1GctEmLeafCard* posEta <<"L1GctElectronFinalSort::Constructor() : 1st EmLeafCard passed is zero"; } } - if(negEtaCard!=0){ + if(negEtaCard!=nullptr){ m_theNegEtaLeafCard = negEtaCard; }else{ m_setupOk = false; diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctGlobalEnergyAlgos.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctGlobalEnergyAlgos.cc index 8bd2b294dd93e..48a7c10142a65 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctGlobalEnergyAlgos.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctGlobalEnergyAlgos.cc @@ -56,7 +56,7 @@ L1GctGlobalEnergyAlgos::L1GctGlobalEnergyAlgos(const std::vectorsetupOk()); } diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctGlobalHfSumAlgos.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctGlobalHfSumAlgos.cc index 70d075ffd2ce0..8492c047cf733 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctGlobalHfSumAlgos.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctGlobalHfSumAlgos.cc @@ -29,7 +29,7 @@ L1GctGlobalHfSumAlgos::L1GctGlobalHfSumAlgos(const std::vectorsecond); } else { - return 0; + return nullptr; } } @@ -251,7 +251,7 @@ const L1GctHfEtSumsLut* L1GctGlobalHfSumAlgos::getESLut(const L1GctHfEtSumsLut:: if (eslut != m_etSumLuts.end()) { return (eslut->second); } else { - return 0; + return nullptr; } } @@ -260,7 +260,7 @@ std::vector L1GctGlobalHfSumAlgos::getThresholds(const L1GctHfEtSumsLut: { std::vector result; const L1GctHfEtSumsLut* ESLut = getESLut(type); - if (ESLut != 0) { result = ESLut->lutFunction()->getThresholds(); } + if (ESLut != nullptr) { result = ESLut->lutFunction()->getThresholds(); } return result; } diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctHfBitCountsLut.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctHfBitCountsLut.cc index e0469fe9a762a..d1e64ed439531 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctHfBitCountsLut.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctHfBitCountsLut.cc @@ -52,7 +52,7 @@ std::vector L1GctHfBitCountsLut::getThresholdsGct() const L1GctHfBitCountsLut L1GctHfBitCountsLut::operator= (const L1GctHfBitCountsLut& lut) { - L1GctHfBitCountsLut temp(lut); + const L1GctHfBitCountsLut& temp(lut); return temp; } diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctHfEtSumsLut.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctHfEtSumsLut.cc index a0443ae268686..c0006139da369 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctHfEtSumsLut.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctHfEtSumsLut.cc @@ -11,19 +11,19 @@ L1GctHfEtSumsLut::L1GctHfEtSumsLut(const L1GctHfEtSumsLut::hfLutType& type, cons m_lutFunction(scale), m_lutType(type) { - if (scale != 0) m_setupOk = true; + if (scale != nullptr) m_setupOk = true; } L1GctHfEtSumsLut::L1GctHfEtSumsLut(const L1GctHfEtSumsLut::hfLutType& type) : L1GctLut(), - m_lutFunction(0), + m_lutFunction(nullptr), m_lutType(type) { } L1GctHfEtSumsLut::L1GctHfEtSumsLut() : L1GctLut(), - m_lutFunction(0), + m_lutFunction(nullptr), m_lutType() { } @@ -63,7 +63,7 @@ std::vector L1GctHfEtSumsLut::getThresholdsGct() const L1GctHfEtSumsLut L1GctHfEtSumsLut::operator= (const L1GctHfEtSumsLut& lut) { - L1GctHfEtSumsLut temp(lut); + const L1GctHfEtSumsLut& temp(lut); return temp; } diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctHtMissLut.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctHtMissLut.cc index 51233091c51cd..146ca563d3787 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctHtMissLut.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctHtMissLut.cc @@ -2,7 +2,7 @@ #include "CondFormats/L1TObjects/interface/L1CaloEtScale.h" -#include +#include //DEFINE STATICS const int L1GctHtMissLut::NAddress=2*L1GctHtMissLut::kHxOrHyMissComponentNBits; @@ -13,12 +13,12 @@ L1GctHtMissLut::L1GctHtMissLut(const L1CaloEtScale* const scale, const double ls m_etScale(scale), m_componentLsb(lsb) { - if (scale != 0) m_setupOk = true; + if (scale != nullptr) m_setupOk = true; } L1GctHtMissLut::L1GctHtMissLut() : L1GctLut(), - m_etScale(0), + m_etScale(nullptr), m_componentLsb(1.0) { } @@ -28,7 +28,7 @@ L1GctHtMissLut::L1GctHtMissLut(const L1GctHtMissLut& lut) : m_etScale(lut.etScale()), m_componentLsb(lut.componentLsb()) { - if (m_etScale != 0) m_setupOk = true; + if (m_etScale != nullptr) m_setupOk = true; } L1GctHtMissLut::~L1GctHtMissLut() @@ -95,7 +95,7 @@ std::vector L1GctHtMissLut::getThresholdsGct() const L1GctHtMissLut L1GctHtMissLut::operator= (const L1GctHtMissLut& lut) { - L1GctHtMissLut temp(lut); + const L1GctHtMissLut& temp(lut); return temp; } diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctJetEtCalibrationLut.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctJetEtCalibrationLut.cc index 5412c36b6b660..a1490d292b170 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctJetEtCalibrationLut.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctJetEtCalibrationLut.cc @@ -22,7 +22,7 @@ L1GctJetEtCalibrationLut::~L1GctJetEtCalibrationLut() void L1GctJetEtCalibrationLut::setFunction(const L1GctJetFinderParams* const lutfn) { m_lutFunction = lutfn; - m_setupOk = (lutfn!=0); + m_setupOk = (lutfn!=nullptr); } void L1GctJetEtCalibrationLut::setOutputEtScale(const L1CaloEtScale* const scale) { diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc index 1f4ff0b34f621..89a5f5ed1a082 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinalStage.cc @@ -40,7 +40,7 @@ L1GctJetFinalStage::L1GctJetFinalStage(const std::vector& wh for(unsigned int i=0; i < MAX_WHEEL_FPGAS; ++i) { - if(m_wheelFpgas.at(i) == 0) + if(m_wheelFpgas.at(i) == nullptr) { m_setupOk = false; if (m_verbose) { @@ -57,9 +57,9 @@ L1GctJetFinalStage::L1GctJetFinalStage(const std::vector& wh L1GctJetFinalStage::~L1GctJetFinalStage() { - if (m_centralJetSorter != 0) delete m_centralJetSorter; - if (m_forwardJetSorter != 0) delete m_forwardJetSorter; - if (m_tauJetSorter != 0) delete m_tauJetSorter; + if (m_centralJetSorter != nullptr) delete m_centralJetSorter; + if (m_forwardJetSorter != nullptr) delete m_forwardJetSorter; + if (m_tauJetSorter != nullptr) delete m_tauJetSorter; } std::ostream& operator << (std::ostream& os, const L1GctJetFinalStage& fpga) diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinderBase.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinderBase.cc index 193c44583edfe..9526e454350dd 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinderBase.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctJetFinderBase.cc @@ -76,7 +76,7 @@ void L1GctJetFinderBase::setNeighbourJetFinders(const std::vector +#include L1GctMet::L1GctMet(const unsigned ex, const unsigned ey, const L1GctMet::metAlgoType algo) : m_exComponent(ex), @@ -186,7 +186,7 @@ L1GctMet::useHtMissLutAlgo (const int ex, const int ey, const bool of) const etmiss_internal result; - if (m_htMissLut == 0) { + if (m_htMissLut == nullptr) { result.mag = 0; result.phi = 0; diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GctWheelEnergyFpga.cc b/L1Trigger/GlobalCaloTrigger/src/L1GctWheelEnergyFpga.cc index 9d75c6c15b9e0..e0758e6714461 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GctWheelEnergyFpga.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GctWheelEnergyFpga.cc @@ -48,7 +48,7 @@ L1GctWheelEnergyFpga::L1GctWheelEnergyFpga(int id, const std::vectorgetOutputJetsA(), iLeaf, 0); storeJets(m_inputLeafCards.at(iLeaf)->getOutputJetsB(), iLeaf, L1GctJetFinderBase::MAX_JETS_OUT); diff --git a/L1Trigger/GlobalCaloTrigger/src/L1GlobalCaloTrigger.cc b/L1Trigger/GlobalCaloTrigger/src/L1GlobalCaloTrigger.cc index 6ec2bf02f62e3..75f4ee7c737d4 100644 --- a/L1Trigger/GlobalCaloTrigger/src/L1GlobalCaloTrigger.cc +++ b/L1Trigger/GlobalCaloTrigger/src/L1GlobalCaloTrigger.cc @@ -30,9 +30,9 @@ L1GlobalCaloTrigger::L1GlobalCaloTrigger(const L1GctJetLeafCard::jetFinderType j theNonIsoElectronSorters(N_EM_LEAF_CARDS*2), theWheelJetFpgas(N_WHEEL_CARDS), theWheelEnergyFpgas(N_WHEEL_CARDS), - m_jetFinderParams(0), + m_jetFinderParams(nullptr), m_jetEtCalLuts(), - m_inputChannelMask(0), + m_inputChannelMask(nullptr), m_bxRangeAuto(true), m_bxStart(0), m_numOfBx(1), m_allInputEmCands(), m_allInputRegions() @@ -48,28 +48,28 @@ L1GlobalCaloTrigger::~L1GlobalCaloTrigger() // Delete the components of the GCT that we made in build() // (But not the LUTs, since these don't belong to us) - if (theNonIsoEmFinalStage != 0) delete theNonIsoEmFinalStage; + if (theNonIsoEmFinalStage != nullptr) delete theNonIsoEmFinalStage; - if (theIsoEmFinalStage != 0) delete theIsoEmFinalStage; + if (theIsoEmFinalStage != nullptr) delete theIsoEmFinalStage; - if (theEnergyFinalStage != 0) delete theEnergyFinalStage; + if (theEnergyFinalStage != nullptr) delete theEnergyFinalStage; - if (theJetFinalStage != 0) delete theJetFinalStage; + if (theJetFinalStage != nullptr) delete theJetFinalStage; for (unsigned i=0; isetHtMissScale(scale); } } /// setup Hf sum LUTs void L1GlobalCaloTrigger::setupHfSumLuts(const L1CaloEtScale* const scale) { - if (getHfSumProcessor() != 0) { + if (getHfSumProcessor() != nullptr) { getHfSumProcessor()->setupLuts(scale); } } @@ -370,7 +370,7 @@ void L1GlobalCaloTrigger::setChannelMask(const L1GctChannelMask* const mask) { /// check we have done all the setup bool L1GlobalCaloTrigger::setupOk() const { bool result = true; - result &= (m_inputChannelMask != 0); + result &= (m_inputChannelMask != nullptr); // EM Leaf Card for (int i=0; isetupOk(); @@ -412,8 +412,8 @@ bool L1GlobalCaloTrigger::setupOk() const { /// provide access to hf sum processor L1GctGlobalHfSumAlgos* L1GlobalCaloTrigger::getHfSumProcessor() const { - L1GctGlobalHfSumAlgos* result = 0; - if (theEnergyFinalStage !=0) { + L1GctGlobalHfSumAlgos* result = nullptr; + if (theEnergyFinalStage !=nullptr) { result = theEnergyFinalStage->getHfSumProcessor(); } return result; @@ -725,7 +725,7 @@ L1GctInternHtMissCollection L1GlobalCaloTrigger::getInternalHtMiss() const L1GctHFBitCountsCollection L1GlobalCaloTrigger::getHFBitCountsCollection() const { L1GctHFBitCountsCollection result(m_numOfBx); - if (getHfSumProcessor() != 0) { + if (getHfSumProcessor() != nullptr) { int bx = m_bxStart; for (int i=0; i #include -#include +#include using namespace std; @@ -104,7 +104,7 @@ void L1MuGMTDebugBlock::reset () { _isMIPISO[bx][i]=0; } for (int i=0; iSetEtaSelBits( m_id, m_eta_select.read(0,14)) ; @@ -116,7 +116,7 @@ void L1MuGMTEtaProjectionUnit::run() { // void L1MuGMTEtaProjectionUnit::reset() { - m_mu = 0; + m_mu = nullptr; m_ieta = 0; m_feta = 0.; m_eta_select = (unsigned int) 0; diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.cc index 37ddd9a1d48c9..20f421e6e219b 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.cc @@ -45,7 +45,7 @@ L1MuGMTHWFileReader::L1MuGMTHWFileReader(edm::ParameterSet const& ps, produces(); - if(!fileNames().size()) { + if(fileNames().empty()) { throw std::runtime_error("L1MuGMTHWFileReader: no input file"); } edm::LogInfo("GMT_HWFileReader_info") << "opening file " << fileNames()[0]; diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.h index dc45b36ef48f7..0acba99e833f5 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.h @@ -42,7 +42,7 @@ class L1MuGMTHWFileReader : public edm::ProducerSourceFromFiles { explicit L1MuGMTHWFileReader(edm::ParameterSet const&, edm::InputSourceDescription const&); - ~L1MuGMTHWFileReader(); + ~L1MuGMTHWFileReader() override; //read an event from the input stream //returns an event with run and event number zero when no more events @@ -50,8 +50,8 @@ class L1MuGMTHWFileReader : public edm::ProducerSourceFromFiles { private: - virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType); - virtual void produce(edm::Event&); + bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time, edm::EventAuxiliary::ExperimentType& eType) override; + void produce(edm::Event&) override; std::ifstream m_in; L1MuGMTInputEvent m_evt; diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTInputEvent.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTInputEvent.cc index 211a007cd08c7..9c9823ca1ea52 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTInputEvent.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTInputEvent.cc @@ -89,7 +89,7 @@ const L1MuRegionalCand* L1MuGMTInputEvent::getInputMuon(std::string chipid, unsi if (m_inputmuons.count(chipid) == 0 ) throw std::runtime_error("L1GMTInputEvent::getInputMuon: invalid chipid:" + chipid); - if (index >= m_inputmuons.find(chipid)->second.size()) return 0; + if (index >= m_inputmuons.find(chipid)->second.size()) return nullptr; return &(m_inputmuons.find(chipid)->second.at(index)); } diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFCOUDeltaEtaLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFCOUDeltaEtaLUT.h index dab068c0d8b84..4f64b7172b1cc 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFCOUDeltaEtaLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFCOUDeltaEtaLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFCOUDeltaEtaLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFCOUDeltaEtaLUT() {}; + ~L1MuGMTLFCOUDeltaEtaLUT() override {}; /// specific lookup function for delta_eta unsigned SpecificLookup_delta_eta (int idx, unsigned eta1, unsigned eta2) const { @@ -73,7 +73,7 @@ class L1MuGMTLFCOUDeltaEtaLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFDeltaEtaLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFDeltaEtaLUT.h index 9cd8c2f202b13..516faebc71fb8 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFDeltaEtaLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFDeltaEtaLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFDeltaEtaLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFDeltaEtaLUT() {}; + ~L1MuGMTLFDeltaEtaLUT() override {}; /// specific lookup function for delta_eta unsigned SpecificLookup_delta_eta (int idx, unsigned eta_dtcsc, unsigned eta_rpc) const { @@ -73,7 +73,7 @@ class L1MuGMTLFDeltaEtaLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFDisableHotLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFDisableHotLUT.h index 4f40f45a2e21a..536f4575eaaa9 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFDisableHotLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFDisableHotLUT.h @@ -52,7 +52,7 @@ class L1MuGMTLFDisableHotLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFDisableHotLUT() {}; + ~L1MuGMTLFDisableHotLUT() override {}; /// specific lookup function for disable_hot unsigned SpecificLookup_disable_hot (int idx, unsigned eta, unsigned phi) const { @@ -74,7 +74,7 @@ class L1MuGMTLFDisableHotLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFEtaConvLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFEtaConvLUT.h index 35a293d05a3de..1e9fb29dcc8da 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFEtaConvLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFEtaConvLUT.h @@ -52,7 +52,7 @@ class L1MuGMTLFEtaConvLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFEtaConvLUT() {}; + ~L1MuGMTLFEtaConvLUT() override {}; /// specific lookup function for eta_gmt unsigned SpecificLookup_eta_gmt (int idx, unsigned eta_regional) const { @@ -72,7 +72,7 @@ class L1MuGMTLFEtaConvLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMatchQualLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMatchQualLUT.h index 51bac0fe13cc9..8c60b1538ceb9 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMatchQualLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMatchQualLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFMatchQualLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFMatchQualLUT() {}; + ~L1MuGMTLFMatchQualLUT() override {}; /// specific lookup function for mq unsigned SpecificLookup_mq (int idx, unsigned delta_eta, unsigned delta_phi) const { @@ -73,7 +73,7 @@ class L1MuGMTLFMatchQualLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankCombineLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankCombineLUT.h index 77d7c528f405e..36b25f249f047 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankCombineLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankCombineLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFMergeRankCombineLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFMergeRankCombineLUT() {}; + ~L1MuGMTLFMergeRankCombineLUT() override {}; /// specific lookup function for merge_rank unsigned SpecificLookup_merge_rank (int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const { @@ -75,7 +75,7 @@ class L1MuGMTLFMergeRankCombineLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankEtaPhiLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankEtaPhiLUT.h index edb57cdbb7fa5..19753140cf4c1 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankEtaPhiLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankEtaPhiLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFMergeRankEtaPhiLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFMergeRankEtaPhiLUT() {}; + ~L1MuGMTLFMergeRankEtaPhiLUT() override {}; /// specific lookup function for rank_etaphi unsigned SpecificLookup_rank_etaphi (int idx, unsigned eta, unsigned phi) const { @@ -73,7 +73,7 @@ class L1MuGMTLFMergeRankEtaPhiLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankEtaQLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankEtaQLUT.h index 3a2554b4dd40c..a2cc26346f5ec 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankEtaQLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankEtaQLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFMergeRankEtaQLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFMergeRankEtaQLUT() {}; + ~L1MuGMTLFMergeRankEtaQLUT() override {}; /// specific lookup function for flag unsigned SpecificLookup_flag (int idx, unsigned eta, unsigned q) const { @@ -81,7 +81,7 @@ class L1MuGMTLFMergeRankEtaQLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankPtQLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankPtQLUT.h index 1e6f206b9ede9..09570c6d53284 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankPtQLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFMergeRankPtQLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFMergeRankPtQLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFMergeRankPtQLUT() {}; + ~L1MuGMTLFMergeRankPtQLUT() override {}; /// specific lookup function for rank_ptq unsigned SpecificLookup_rank_ptq (int idx, unsigned q, unsigned pt) const { @@ -73,7 +73,7 @@ class L1MuGMTLFMergeRankPtQLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFOvlEtaConvLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFOvlEtaConvLUT.h index 5b4d8060d59ad..e5bfc27b9ddc5 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFOvlEtaConvLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFOvlEtaConvLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFOvlEtaConvLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFOvlEtaConvLUT() {}; + ~L1MuGMTLFOvlEtaConvLUT() override {}; /// specific lookup function for eta_ovl unsigned SpecificLookup_eta_ovl (int idx, unsigned eta6) const { @@ -71,7 +71,7 @@ class L1MuGMTLFOvlEtaConvLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProEtaConvLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProEtaConvLUT.h index 3105e98b552c3..8d4fa08c554f8 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProEtaConvLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProEtaConvLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFPhiProEtaConvLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFPhiProEtaConvLUT() {}; + ~L1MuGMTLFPhiProEtaConvLUT() override {}; /// specific lookup function for eta_out unsigned SpecificLookup_eta_out (int idx, unsigned eta_in) const { @@ -71,7 +71,7 @@ class L1MuGMTLFPhiProEtaConvLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProLUT.h index 45529ff50f6cd..f9ecb2a49c817 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPhiProLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFPhiProLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFPhiProLUT() {}; + ~L1MuGMTLFPhiProLUT() override {}; /// specific lookup function for dphi unsigned SpecificLookup_dphi (int idx, unsigned eta, unsigned pt, unsigned charge) const { @@ -75,7 +75,7 @@ class L1MuGMTLFPhiProLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPtMixLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPtMixLUT.h index 69122ac345a4a..d38b3cbbb5b3b 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPtMixLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFPtMixLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFPtMixLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFPtMixLUT() {}; + ~L1MuGMTLFPtMixLUT() override {}; /// specific lookup function for pt_mixed unsigned SpecificLookup_pt_mixed (int idx, unsigned pt_dtcsc, unsigned pt_rpc) const { @@ -73,7 +73,7 @@ class L1MuGMTLFPtMixLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankCombineLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankCombineLUT.h index 099edfbcd5358..36a1fefcd9260 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankCombineLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankCombineLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFSortRankCombineLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFSortRankCombineLUT() {}; + ~L1MuGMTLFSortRankCombineLUT() override {}; /// specific lookup function for sort_rank unsigned SpecificLookup_sort_rank (int idx, unsigned rank_etaq, unsigned rank_ptq, unsigned rank_etaphi) const { @@ -75,7 +75,7 @@ class L1MuGMTLFSortRankCombineLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankEtaPhiLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankEtaPhiLUT.h index bd90c28636be5..4281fdeb3aea0 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankEtaPhiLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankEtaPhiLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFSortRankEtaPhiLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFSortRankEtaPhiLUT() {}; + ~L1MuGMTLFSortRankEtaPhiLUT() override {}; /// specific lookup function for rank_etaphi unsigned SpecificLookup_rank_etaphi (int idx, unsigned eta, unsigned phi) const { @@ -73,7 +73,7 @@ class L1MuGMTLFSortRankEtaPhiLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankEtaQLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankEtaQLUT.h index 1291c57548e11..06a87027b07da 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankEtaQLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankEtaQLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFSortRankEtaQLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFSortRankEtaQLUT() {}; + ~L1MuGMTLFSortRankEtaQLUT() override {}; /// specific lookup function for vlq unsigned SpecificLookup_vlq (int idx, unsigned eta, unsigned q) const { @@ -81,7 +81,7 @@ class L1MuGMTLFSortRankEtaQLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankPtQLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankPtQLUT.h index c8e0c1bf5803b..2d2513cc36f9f 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankPtQLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLFSortRankPtQLUT.h @@ -51,7 +51,7 @@ class L1MuGMTLFSortRankPtQLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTLFSortRankPtQLUT() {}; + ~L1MuGMTLFSortRankPtQLUT() override {}; /// specific lookup function for rank_ptq unsigned SpecificLookup_rank_ptq (int idx, unsigned q, unsigned pt) const { @@ -73,7 +73,7 @@ class L1MuGMTLFSortRankPtQLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.cc index 44107f2a64338..c4cd8c050c5a5 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.cc @@ -276,7 +276,7 @@ void L1MuGMTLUT::Load(const char* path) { break; } - istringstream is(tok1[1].c_str()); + istringstream is(tok1[1]); int newindex; is >> newindex; if (newindex != current_index+1) @@ -295,7 +295,7 @@ void L1MuGMTLUT::Load(const char* path) { edm::LogWarning("LUTParsingProblem") << "L1MuGMTLUT::Load: warning: LUT file only contains part of LUT contents."; row = 0; } - istringstream is1(tok[1].c_str()); + istringstream is1(tok[1]); unsigned value; if (is1 >> value) { if (current_index!=-1) @@ -303,7 +303,7 @@ void L1MuGMTLUT::Load(const char* path) { } } else { - istringstream is1(line.c_str()); + istringstream is1(line); unsigned value; if (is1 >> value) { if (row < maxrows) { @@ -379,7 +379,7 @@ void L1MuGMTLUT::MakeSubClass(const char* fname, const char* template_file_h, // substitute in .h file string outfn (fname); - if (outfn.size() == 0) outfn = string("../interface/L1MuGMT") + m_name + string("LUT.h"); + if (outfn.empty()) outfn = string("../interface/L1MuGMT") + m_name + string("LUT.h"); ifstream of_check(outfn.c_str()); if (! of_check.good() ) { ofstream of(outfn.c_str()); @@ -409,7 +409,7 @@ void L1MuGMTLUT::MakeSubClass(const char* fname, const char* template_file_h, // substitute in .cc file string outfn_cc (fname); - if (outfn_cc.size() == 0) outfn_cc = string("../interface/L1MuGMT") + m_name + string("LUT.cc"); + if (outfn_cc.empty()) outfn_cc = string("../interface/L1MuGMT") + m_name + string("LUT.cc"); ifstream of_cc_check( outfn_cc.c_str() ); if (! of_cc_check.good() ) { diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.h index 3d5118232fdb7..46e6c9804e098 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUT.h @@ -51,7 +51,7 @@ #include //#include #include -#include +#include #include //---------------------- @@ -80,14 +80,14 @@ class L1MuGMTLUT { /// Init and Destruct /// default constructor w/o init - L1MuGMTLUT() : m_initialized(0), m_NLUTS(0), m_UseLookupFunction(true), m_saveFlag(false) {}; + L1MuGMTLUT() : m_initialized(false), m_NLUTS(0), m_UseLookupFunction(true), m_saveFlag(false) {}; /// constructor with init L1MuGMTLUT(const char* name, const std::vector& instances, const std::vector& in_widths, const std::vector& out_widths, - unsigned vme_addr_width=0, bool distrRAM=false) : m_initialized(0), m_NLUTS(0), m_UseLookupFunction(true), m_saveFlag(false) { + unsigned vme_addr_width=0, bool distrRAM=false) : m_initialized(false), m_NLUTS(0), m_UseLookupFunction(true), m_saveFlag(false) { Init (name, instances, in_widths, out_widths, vme_addr_width, distrRAM); }; @@ -95,7 +95,7 @@ class L1MuGMTLUT { const std::string& instances, const std::string& inputs, const std::string& outputs, - unsigned vme_addr_width=0, bool distrRAM=false) : m_initialized(0), m_NLUTS(0), m_UseLookupFunction(true), m_saveFlag(false) { + unsigned vme_addr_width=0, bool distrRAM=false) : m_initialized(false), m_NLUTS(0), m_UseLookupFunction(true), m_saveFlag(false) { Init (name, L1MuGMTLUTHelpers::Tokenizer(" ",instances), PortDecoder(inputs), PortDecoder(outputs), vme_addr_width, distrRAM); }; diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUTHelpers.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUTHelpers.cc index 9eaec3ff6d757..ffbc73f37ff01 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUTHelpers.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUTHelpers.cc @@ -19,7 +19,7 @@ //--------------- // C++ Headers -- //--------------- -#include +#include using namespace std; diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUTHelpers.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUTHelpers.h index f97cfd7ed5000..22ae0f2167b96 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUTHelpers.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTLUTHelpers.h @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include // --------------------- // -- Class Interface -- diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaConvLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaConvLUT.h index dd2955bc3ced5..5b4e914d37041 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaConvLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaConvLUT.h @@ -51,7 +51,7 @@ class L1MuGMTMIAUEtaConvLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTMIAUEtaConvLUT() {}; + ~L1MuGMTMIAUEtaConvLUT() override {}; /// specific lookup function for eta_out unsigned SpecificLookup_eta_out (int idx, unsigned eta_in) const { @@ -71,7 +71,7 @@ class L1MuGMTMIAUEtaConvLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaProLUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaProLUT.h index c7c55e1b39160..7b156e57b1561 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaProLUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUEtaProLUT.h @@ -51,7 +51,7 @@ class L1MuGMTMIAUEtaProLUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTMIAUEtaProLUT() {}; + ~L1MuGMTMIAUEtaProLUT() override {}; /// specific lookup function for eta_sel unsigned SpecificLookup_eta_sel (int idx, unsigned eta, unsigned pt, unsigned charge) const { @@ -75,7 +75,7 @@ class L1MuGMTMIAUEtaProLUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro1LUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro1LUT.h index 2450c6dc4f1c7..68e4aca6f97c4 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro1LUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro1LUT.h @@ -51,7 +51,7 @@ class L1MuGMTMIAUPhiPro1LUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTMIAUPhiPro1LUT() {}; + ~L1MuGMTMIAUPhiPro1LUT() override {}; /// specific lookup function for cphi_fine unsigned SpecificLookup_cphi_fine (int idx, unsigned phi_fine, unsigned eta, unsigned pt, unsigned charge) const { @@ -87,7 +87,7 @@ class L1MuGMTMIAUPhiPro1LUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2] ,addr[3]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro2LUT.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro2LUT.h index 330d90770d09e..98f123183dcb0 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro2LUT.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMIAUPhiPro2LUT.h @@ -52,7 +52,7 @@ class L1MuGMTMIAUPhiPro2LUT : public L1MuGMTLUT { } ; /// destructor - virtual ~L1MuGMTMIAUPhiPro2LUT() {}; + ~L1MuGMTMIAUPhiPro2LUT() override {}; /// specific lookup function for phi_sel unsigned SpecificLookup_phi_sel (int idx, unsigned cphi_start, unsigned cphi_fine, unsigned cphi_ofs, unsigned charge) const { @@ -78,7 +78,7 @@ class L1MuGMTMIAUPhiPro2LUT : public L1MuGMTLUT { /// access to lookup function with packed input and output - virtual unsigned LookupFunctionPacked (int idx, unsigned address) const { + unsigned LookupFunctionPacked (int idx, unsigned address) const override { std::vector addr = u2vec(address, m_Inputs); return TheLookupFunction(idx ,addr[0] ,addr[1] ,addr[2] ,addr[3]); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatcher.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatcher.cc index 604c543d8f7ec..b0580b3fdd576 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatcher.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatcher.cc @@ -98,8 +98,8 @@ void L1MuGMTMatcher::reset() { pairMatrix.init(false); for ( unsigned i = 0; i < MaxMatch; i++ ) { - first[i] = 0; - second[i] = 0; + first[i] = nullptr; + second[i] = nullptr; } } @@ -270,8 +270,8 @@ void L1MuGMTMatcher::match() { // int L1MuGMTMatcher::lookup_mq(int i, int j) { - bool empty1 = ( first[i] != 0 ) ? first[i]->empty() : true; - bool empty2 = ( second[j] != 0 ) ? second[j]->empty() : true; + bool empty1 = ( first[i] != nullptr ) ? first[i]->empty() : true; + bool empty2 = ( second[j] != nullptr ) ? second[j]->empty() : true; if ( empty1 || empty2) return 0; // diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h index d87abd9e05db6..3a6ead1241bac 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h @@ -110,11 +110,11 @@ L1MuGMTMatrix::L1MuGMTMatrix(int r, int c) : r_size(r), c_size(c) { p = new T*[r]; - assert(p != 0); + assert(p != nullptr); for (int i = 0; i < r; i++) { p[i] = new T[c]; - assert(p[i] != 0); + assert(p[i] != nullptr); } } @@ -127,11 +127,11 @@ L1MuGMTMatrix::L1MuGMTMatrix(const L1MuGMTMatrix& mat) : r_size(mat.r_size p = new T*[r_size]; - assert(p != 0); + assert(p != nullptr); for (int i = 0; i < r_size; i++) { p[i] = new T[c_size]; - assert(p[i] != 0); + assert(p[i] != nullptr); for (int j = 0; j < c_size; j++) p[i][j] = mat.p[i][j]; } diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMerger.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMerger.cc index 4e4c617ac9ecb..c2aa6e24b82b2 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMerger.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMerger.cc @@ -102,14 +102,14 @@ void L1MuGMTMerger::run() { void L1MuGMTMerger::reset() { for ( int i = 0; i < 4; i++ ) { - dtcsc_mu[i] = 0; - rpc_mu[i] = 0; + dtcsc_mu[i] = nullptr; + rpc_mu[i] = nullptr; } std::vector::iterator iter; for ( iter = m_MuonCands.begin(); iter != m_MuonCands.end(); iter++ ) { if ( *iter ) delete (*iter); - *iter = 0; + *iter = nullptr; } m_MuonCands.clear(); @@ -189,7 +189,7 @@ void L1MuGMTMerger::merge() { // loop over DT/CSC muons for (int i=0; i<4; i++) { - if (dtcsc_mu[i] != 0) { + if (dtcsc_mu[i] != nullptr) { int match_idx = pairM.rowAny(i); @@ -210,7 +210,7 @@ void L1MuGMTMerger::merge() { // additionally loop over RPC muons for (int j=0; j<4; j++) { - if (rpc_mu[j] != 0) { + if (rpc_mu[j] != nullptr) { int match_idx = pairM.colAny(j); @@ -529,7 +529,7 @@ void L1MuGMTMerger::createMergedCand(int idx_dtcsc, int idx_rpc) { int L1MuGMTMerger::merge_rank(const L1MuRegionalCand* muon) const { - if ( muon == 0 || muon->empty() ) return 0; + if ( muon == nullptr || muon->empty() ) return 0; unsigned lut_idx= muon->type_idx(); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMipIsoAU.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMipIsoAU.cc index 15a900adb1ce6..bc18a415151ce 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMipIsoAU.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTMipIsoAU.cc @@ -144,7 +144,7 @@ void L1MuGMTMipIsoAU::run() { void L1MuGMTMipIsoAU::reset() { for ( int i = 0; i < 8; i++ ) { - m_muons[i] = 0; + m_muons[i] = nullptr; m_MIP[i] = false; m_ISO[i] = false; } diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTPSB.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTPSB.cc index 17e73350758f5..4c6b42eb2df74 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTPSB.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTPSB.cc @@ -233,7 +233,7 @@ void L1MuGMTPSB::print() const { // const L1MuRegionalCand* L1MuGMTPSB::RPCMuon(int index) const { - return ( index < (int)L1MuGMTConfig::MAXRPC && index >= 0 ) ? &(m_RpcMuons[index]) : 0; + return ( index < (int)L1MuGMTConfig::MAXRPC && index >= 0 ) ? &(m_RpcMuons[index]) : nullptr; } @@ -243,7 +243,7 @@ const L1MuRegionalCand* L1MuGMTPSB::RPCMuon(int index) const { // const L1MuRegionalCand* L1MuGMTPSB::DTBXMuon(int index) const { - return ( index < (int)L1MuGMTConfig::MAXDTBX && index >= 0 ) ? &(m_DtbxMuons[index]) : 0; + return ( index < (int)L1MuGMTConfig::MAXDTBX && index >= 0 ) ? &(m_DtbxMuons[index]) : nullptr; } @@ -253,7 +253,7 @@ const L1MuRegionalCand* L1MuGMTPSB::DTBXMuon(int index) const { // const L1MuRegionalCand* L1MuGMTPSB::CSCMuon(int index) const { - return ( index < (int)L1MuGMTConfig::MAXCSC && index >= 0 ) ? &(m_CscMuons[index]) : 0; + return ( index < (int)L1MuGMTConfig::MAXCSC && index >= 0 ) ? &(m_CscMuons[index]) : nullptr; } diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTPhiProjectionUnit.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTPhiProjectionUnit.cc index 418ac9ef868aa..d96ca21c85830 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTPhiProjectionUnit.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTPhiProjectionUnit.cc @@ -52,7 +52,7 @@ // Constructors -- //---------------- L1MuGMTPhiProjectionUnit::L1MuGMTPhiProjectionUnit(const L1MuGMTMipIsoAU& miau, int id) : - m_MIAU(miau), m_id(id), m_mu(0) { + m_MIAU(miau), m_id(id), m_mu(nullptr) { } //-------------- @@ -109,11 +109,11 @@ void L1MuGMTPhiProjectionUnit::run() { // shift by 9 bits //FIXME: fix when calo delivers the MIP bits correctly! for (unsigned int i=0; i<9; i++) if ( (phi_sel_bits & (1 << i)) == (unsigned) (1<SetPhiSelBits( m_id, m_phi_select.to_ulong()) ; } @@ -125,7 +125,7 @@ void L1MuGMTPhiProjectionUnit::run() { // void L1MuGMTPhiProjectionUnit::reset() { - m_mu = 0; + m_mu = nullptr; m_iphi = 0; m_fphi = 0.; m_phi_select = (unsigned int) 0; diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTReg.h b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTReg.h index 341eb1ccf1532..7ba622f915319 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTReg.h +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTReg.h @@ -84,10 +84,10 @@ class L1MuGMTRegMMConfig : public L1MuGMTReg { }; //// destructor - virtual ~L1MuGMTRegMMConfig() {}; + ~L1MuGMTRegMMConfig() override {}; //// get Name - virtual std::string getName() { return "MMConfig_" + m_param; }; + std::string getName() override { return "MMConfig_" + m_param; }; //// read the merge method from .orcarc void setMergeMethod() { @@ -204,7 +204,7 @@ class L1MuGMTRegMMConfigMIPISO : public L1MuGMTRegMMConfig { }; //// destructor - virtual ~L1MuGMTRegMMConfigMIPISO() {}; + ~L1MuGMTRegMMConfigMIPISO() override {}; } ; @@ -257,7 +257,7 @@ class L1MuGMTRegMMConfigSRK : public L1MuGMTRegMMConfig { }; //// destructor - virtual ~L1MuGMTRegMMConfigSRK() {}; + ~L1MuGMTRegMMConfigSRK() override {}; } ; // @@ -283,10 +283,10 @@ class L1MuGMTRegSortRankOffset : public L1MuGMTReg { }; //// get Name - virtual std::string getName() { return "SortRankOffset"; }; + std::string getName() override { return "SortRankOffset"; }; //// destructor - virtual ~L1MuGMTRegSortRankOffset() {}; + ~L1MuGMTRegSortRankOffset() override {}; } ; // @@ -304,10 +304,10 @@ class L1MuGMTRegCDLConfig : public L1MuGMTReg { }; //// destructor - virtual ~L1MuGMTRegCDLConfig() {}; + ~L1MuGMTRegCDLConfig() override {}; //// get Name - virtual std::string getName() { return std::string("CDLConfig"); }; + std::string getName() override { return std::string("CDLConfig"); }; //// read the merge method from .orcarc void setCDLConfig() { diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTSortRankUnit.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTSortRankUnit.cc index aa8f4d2acd784..d569037af29da 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTSortRankUnit.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTSortRankUnit.cc @@ -41,7 +41,7 @@ unsigned L1MuGMTSortRankUnit::sort_rank(const L1MuRegionalCand* muon) { - if ( muon == 0 || muon->empty() ) return 0; + if ( muon == nullptr || muon->empty() ) return 0; unsigned lut_idx= muon->type_idx(); @@ -72,7 +72,7 @@ unsigned L1MuGMTSortRankUnit::sort_rank(const L1MuRegionalCand* muon) { unsigned L1MuGMTSortRankUnit::getVeryLowQualityLevel(const L1MuRegionalCand* muon) { - if ( muon == 0 || muon->empty() ) return 0; + if ( muon == nullptr || muon->empty() ) return 0; unsigned lut_idx= muon->type_idx(); @@ -87,7 +87,7 @@ unsigned L1MuGMTSortRankUnit::getVeryLowQualityLevel(const L1MuRegionalCand* muo bool L1MuGMTSortRankUnit::isDisabled(const L1MuRegionalCand* muon) { - if ( muon == 0 || muon->empty() ) return 1; + if ( muon == nullptr || muon->empty() ) return true; unsigned lut_idx= muon->type_idx(); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTSorter.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTSorter.cc index d8b7b3dab2572..4e38745209bd8 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGMTSorter.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGMTSorter.cc @@ -171,7 +171,7 @@ void L1MuGMTSorter::reset() { std::vector::iterator iter; for ( iter = m_MuonCands.begin(); iter != m_MuonCands.end(); iter++ ) { - *iter = 0; + *iter = nullptr; } m_MuonCands.clear(); diff --git a/L1Trigger/GlobalMuonTrigger/src/L1MuGlobalMuonTrigger.cc b/L1Trigger/GlobalMuonTrigger/src/L1MuGlobalMuonTrigger.cc index 522ca048446a2..e8149ac872a15 100644 --- a/L1Trigger/GlobalMuonTrigger/src/L1MuGlobalMuonTrigger.cc +++ b/L1Trigger/GlobalMuonTrigger/src/L1MuGlobalMuonTrigger.cc @@ -132,7 +132,7 @@ L1MuGlobalMuonTrigger::L1MuGlobalMuonTrigger(const edm::ParameterSet& ps) { L1MuGlobalMuonTrigger::~L1MuGlobalMuonTrigger() { if(m_db) delete m_db; - m_db = 0; + m_db = nullptr; delete m_Sorter; delete m_Merger[1]; // endcap Merger @@ -148,7 +148,7 @@ L1MuGlobalMuonTrigger::~L1MuGlobalMuonTrigger() { delete m_PSB; if(m_config) delete m_config; - m_config = 0; + m_config = nullptr; // copied from produce() by Jim B, 7 Aug 2007 std::vector::iterator irr = m_ReadoutRingbuffer.begin(); @@ -408,5 +408,5 @@ std::unique_ptr L1MuGlobalMuonTrigger::getReadoutColle // static data members -L1MuGMTConfig* L1MuGlobalMuonTrigger::m_config = 0; -L1MuGMTDebugBlock* L1MuGlobalMuonTrigger::m_db = 0; +L1MuGMTConfig* L1MuGlobalMuonTrigger::m_config = nullptr; +L1MuGMTDebugBlock* L1MuGlobalMuonTrigger::m_db = nullptr; diff --git a/L1Trigger/GlobalTrigger/interface/L1GtBptxCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtBptxCondition.h index f1d664cdc0ad6..36e15d03ecd24 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtBptxCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtBptxCondition.h @@ -45,7 +45,7 @@ class L1GtBptxCondition : public L1GtConditionEvaluation L1GtBptxCondition(const L1GtBptxCondition&); // destructor - virtual ~L1GtBptxCondition(); + ~L1GtBptxCondition() override; // assign operator L1GtBptxCondition& operator=(const L1GtBptxCondition&); @@ -53,10 +53,10 @@ class L1GtBptxCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/interface/L1GtCaloCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtCaloCondition.h index c79c31f1bed2e..9800c1f3beefb 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtCaloCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtCaloCondition.h @@ -54,7 +54,7 @@ class L1GtCaloCondition : public L1GtConditionEvaluation L1GtCaloCondition(const L1GtCaloCondition&); // destructor - virtual ~L1GtCaloCondition(); + ~L1GtCaloCondition() override; // assign operator L1GtCaloCondition& operator=(const L1GtCaloCondition&); @@ -62,10 +62,10 @@ class L1GtCaloCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/interface/L1GtCastorCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtCastorCondition.h index 294ce7ce5fdac..db502fa576df7 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtCastorCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtCastorCondition.h @@ -45,7 +45,7 @@ class L1GtCastorCondition : public L1GtConditionEvaluation L1GtCastorCondition(const L1GtCastorCondition&); // destructor - virtual ~L1GtCastorCondition(); + ~L1GtCastorCondition() override; // assign operator L1GtCastorCondition& operator=(const L1GtCastorCondition&); @@ -53,10 +53,10 @@ class L1GtCastorCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/interface/L1GtCorrelationCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtCorrelationCondition.h index 9e1951c1851d9..9768c092ccce8 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtCorrelationCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtCorrelationCondition.h @@ -50,7 +50,7 @@ class L1GtCorrelationCondition : public L1GtConditionEvaluation L1GtCorrelationCondition(const L1GtCorrelationCondition&); // destructor - virtual ~L1GtCorrelationCondition(); + ~L1GtCorrelationCondition() override; // assign operator L1GtCorrelationCondition& operator=(const L1GtCorrelationCondition&); @@ -58,10 +58,10 @@ class L1GtCorrelationCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/interface/L1GtEnergySumCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtEnergySumCondition.h index 8fb8b7d95eb2e..f03fecacbcdf5 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtEnergySumCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtEnergySumCondition.h @@ -46,7 +46,7 @@ class L1GtEnergySumCondition : public L1GtConditionEvaluation L1GtEnergySumCondition(const L1GtEnergySumCondition&); // destructor - virtual ~L1GtEnergySumCondition(); + ~L1GtEnergySumCondition() override; // assign operator L1GtEnergySumCondition& operator=(const L1GtEnergySumCondition&); @@ -54,10 +54,10 @@ class L1GtEnergySumCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/interface/L1GtExternalCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtExternalCondition.h index 83f138a0c8747..55ff144d4ec69 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtExternalCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtExternalCondition.h @@ -45,7 +45,7 @@ class L1GtExternalCondition : public L1GtConditionEvaluation L1GtExternalCondition(const L1GtExternalCondition&); // destructor - virtual ~L1GtExternalCondition(); + ~L1GtExternalCondition() override; // assign operator L1GtExternalCondition& operator=(const L1GtExternalCondition&); @@ -53,10 +53,10 @@ class L1GtExternalCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/interface/L1GtHfBitCountsCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtHfBitCountsCondition.h index a55f8b2a31669..36e81bdd27477 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtHfBitCountsCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtHfBitCountsCondition.h @@ -45,7 +45,7 @@ class L1GtHfBitCountsCondition : public L1GtConditionEvaluation L1GtHfBitCountsCondition(const L1GtHfBitCountsCondition&); // destructor - virtual ~L1GtHfBitCountsCondition(); + ~L1GtHfBitCountsCondition() override; // assign operator L1GtHfBitCountsCondition& operator=(const L1GtHfBitCountsCondition&); @@ -53,10 +53,10 @@ class L1GtHfBitCountsCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/interface/L1GtHfRingEtSumsCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtHfRingEtSumsCondition.h index 5e4e943782052..102f083faee31 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtHfRingEtSumsCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtHfRingEtSumsCondition.h @@ -45,7 +45,7 @@ class L1GtHfRingEtSumsCondition : public L1GtConditionEvaluation L1GtHfRingEtSumsCondition(const L1GtHfRingEtSumsCondition&); // destructor - virtual ~L1GtHfRingEtSumsCondition(); + ~L1GtHfRingEtSumsCondition() override; // assign operator L1GtHfRingEtSumsCondition& operator=(const L1GtHfRingEtSumsCondition&); @@ -53,10 +53,10 @@ class L1GtHfRingEtSumsCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/interface/L1GtJetCountsCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtJetCountsCondition.h index c8a580f55d18b..98592b8e9a7ec 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtJetCountsCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtJetCountsCondition.h @@ -46,7 +46,7 @@ class L1GtJetCountsCondition : public L1GtConditionEvaluation L1GtJetCountsCondition(const L1GtJetCountsCondition&); // destructor - virtual ~L1GtJetCountsCondition(); + ~L1GtJetCountsCondition() override; // assign operator L1GtJetCountsCondition& operator=(const L1GtJetCountsCondition&); @@ -54,10 +54,10 @@ class L1GtJetCountsCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/interface/L1GtMuonCondition.h b/L1Trigger/GlobalTrigger/interface/L1GtMuonCondition.h index 31d8836a85ab1..45176a6986ab9 100644 --- a/L1Trigger/GlobalTrigger/interface/L1GtMuonCondition.h +++ b/L1Trigger/GlobalTrigger/interface/L1GtMuonCondition.h @@ -50,7 +50,7 @@ class L1GtMuonCondition : public L1GtConditionEvaluation L1GtMuonCondition(const L1GtMuonCondition&); // destructor - virtual ~L1GtMuonCondition(); + ~L1GtMuonCondition() override; // assign operator L1GtMuonCondition& operator=(const L1GtMuonCondition&); @@ -58,10 +58,10 @@ class L1GtMuonCondition : public L1GtConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition() const; + const bool evaluateCondition() const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/GlobalTrigger/plugins/CompareToObjectMapRecord.cc b/L1Trigger/GlobalTrigger/plugins/CompareToObjectMapRecord.cc index b924446aa0813..0e5ffc8c64b76 100644 --- a/L1Trigger/GlobalTrigger/plugins/CompareToObjectMapRecord.cc +++ b/L1Trigger/GlobalTrigger/plugins/CompareToObjectMapRecord.cc @@ -59,7 +59,7 @@ analyze(edm::Event const& event, edm::EventSetup const& es) { // They are in the ParameterSet registry edm::pset::Registry* psetRegistry = edm::pset::Registry::instance(); edm::ParameterSet const* pset = psetRegistry->getMapped(gtObjectMaps->namesParameterSetID()); - if (pset == 0) { + if (pset == nullptr) { cms::Exception ex("L1GlobalTrigger"); ex << "Could not find L1 trigger names ParameterSet in the registry"; ex.addContext("Calling CompareToObjectMapRecord::analyze"); @@ -112,7 +112,7 @@ analyze(edm::Event const& event, edm::EventSetup const& es) { iBit != endBits; ++iBit) { L1GlobalTriggerObjectMap const* objMap = gtObjectMapRecord->getObjectMap(*iBit); - std::string algoName1 = objMap->algoName(); + const std::string& algoName1 = objMap->algoName(); if (algoName1 != algoNames2.at(*iBit)) { cms::Exception ex("L1GlobalTrigger"); diff --git a/L1Trigger/GlobalTrigger/plugins/CompareToObjectMapRecord.h b/L1Trigger/GlobalTrigger/plugins/CompareToObjectMapRecord.h index bd9152f4b100f..0bd43813936a0 100644 --- a/L1Trigger/GlobalTrigger/plugins/CompareToObjectMapRecord.h +++ b/L1Trigger/GlobalTrigger/plugins/CompareToObjectMapRecord.h @@ -28,9 +28,9 @@ class CompareToObjectMapRecord : public edm::EDAnalyzer { public: explicit CompareToObjectMapRecord(const edm::ParameterSet& pset); - ~CompareToObjectMapRecord(); + ~CompareToObjectMapRecord() override; - virtual void analyze(edm::Event const& event, edm::EventSetup const& es); + void analyze(edm::Event const& event, edm::EventSetup const& es) override; private: edm::InputTag m_l1GtObjectMapTag; diff --git a/L1Trigger/GlobalTrigger/plugins/ConvertObjectMapRecord.h b/L1Trigger/GlobalTrigger/plugins/ConvertObjectMapRecord.h index 65607a7ef9a11..01680764142fe 100644 --- a/L1Trigger/GlobalTrigger/plugins/ConvertObjectMapRecord.h +++ b/L1Trigger/GlobalTrigger/plugins/ConvertObjectMapRecord.h @@ -30,9 +30,9 @@ class ConvertObjectMapRecord : public edm::stream::EDProducer<> { public: explicit ConvertObjectMapRecord(const edm::ParameterSet& pset); - ~ConvertObjectMapRecord(); + ~ConvertObjectMapRecord() override; - virtual void produce(edm::Event& event, const edm::EventSetup& es); + void produce(edm::Event& event, const edm::EventSetup& es) override; private: edm::EDGetTokenT m_l1GtObjectMapToken; diff --git a/L1Trigger/GlobalTrigger/plugins/L1GTPrescaler.cc b/L1Trigger/GlobalTrigger/plugins/L1GTPrescaler.cc index 95254cba2e5db..b6c3f164d8717 100644 --- a/L1Trigger/GlobalTrigger/plugins/L1GTPrescaler.cc +++ b/L1Trigger/GlobalTrigger/plugins/L1GTPrescaler.cc @@ -23,7 +23,7 @@ class L1GTPrescaler : public edm::one::EDFilter<> { public: L1GTPrescaler(edm::ParameterSet const& config); - virtual bool filter(edm::Event& event, edm::EventSetup const& setup) override; + bool filter(edm::Event& event, edm::EventSetup const& setup) override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); @@ -56,7 +56,7 @@ bool L1GTPrescaler::filter(edm::Event& event, edm::EventSetup const& setup) { for (unsigned int i = 0; i < 128; ++i) { if (m_algoPrescales[i] == 0) { // mask this trigger: reset the bit - algoWord[i] = 0; + algoWord[i] = false; } else if (algoWord[i]) { // prescale this trigger ++m_algoCounters[i]; @@ -65,13 +65,13 @@ bool L1GTPrescaler::filter(edm::Event& event, edm::EventSetup const& setup) { finalOr = true; else // the prescale failed, reset the bit - algoWord[i] = 0; + algoWord[i] = false; } } for (unsigned int i = 0; i < 64; ++i) { if (m_techPrescales[i] == 0) { // mask this trigger: reset the bit - techWord[i] = 0; + techWord[i] = false; } else if (techWord[i]) { ++m_techCounters[i]; if (std::fmod(m_techCounters[i], m_techPrescales[i]) < 1) @@ -79,7 +79,7 @@ bool L1GTPrescaler::filter(edm::Event& event, edm::EventSetup const& setup) { finalOr = true; else // the prescale failed, reset the bit - techWord[i] = 0; + techWord[i] = false; } } diff --git a/L1Trigger/GlobalTrigger/plugins/L1GlobalTrigger.h b/L1Trigger/GlobalTrigger/plugins/L1GlobalTrigger.h index 1832c34dce813..ee89f8729f94b 100644 --- a/L1Trigger/GlobalTrigger/plugins/L1GlobalTrigger.h +++ b/L1Trigger/GlobalTrigger/plugins/L1GlobalTrigger.h @@ -58,9 +58,9 @@ class L1GlobalTrigger : public edm::stream::EDProducer<> public: explicit L1GlobalTrigger(const edm::ParameterSet&); - ~L1GlobalTrigger(); + ~L1GlobalTrigger() override; - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; // return pointer to PSB inline const L1GlobalTriggerPSB* gtPSB() const diff --git a/L1Trigger/GlobalTrigger/src/L1GlobalTriggerGTL.cc b/L1Trigger/GlobalTrigger/src/L1GlobalTriggerGTL.cc index f25ebdde1f785..e680d901f9b14 100644 --- a/L1Trigger/GlobalTrigger/src/L1GlobalTriggerGTL.cc +++ b/L1Trigger/GlobalTrigger/src/L1GlobalTriggerGTL.cc @@ -512,8 +512,8 @@ void L1GlobalTriggerGTL::run( const int cond0Ind = corrTemplate->cond0Index(); const int cond1Ind = corrTemplate->cond1Index(); - const L1GtCondition* cond0Condition = 0; - const L1GtCondition* cond1Condition = 0; + const L1GtCondition* cond0Condition = nullptr; + const L1GtCondition* cond1Condition = nullptr; // maximum number of objects received for evaluation of Type1s condition int cond0NrL1Objects = 0; @@ -724,7 +724,7 @@ void L1GlobalTriggerGTL::run( itCond != itCondOnChip->end(); itCond++) { delete itCond->second; - itCond->second = 0; + itCond->second = nullptr; } } diff --git a/L1Trigger/GlobalTrigger/src/L1GlobalTriggerPSB.cc b/L1Trigger/GlobalTrigger/src/L1GlobalTriggerPSB.cc index 024005f6491d7..595538eb542d6 100644 --- a/L1Trigger/GlobalTrigger/src/L1GlobalTriggerPSB.cc +++ b/L1Trigger/GlobalTrigger/src/L1GlobalTriggerPSB.cc @@ -53,13 +53,13 @@ L1GlobalTriggerPSB::L1GlobalTriggerPSB(const edm::InputTag & m_caloGctInputTag, m_candL1CenJet ( new std::vector), m_candL1ForJet ( new std::vector), m_candL1TauJet ( new std::vector), - m_candETM(0), - m_candETT(0), - m_candHTT(0), - m_candHTM(0), - m_candJetCounts(0), - m_candHfBitCounts(0), - m_candHfRingEtSums(0), + m_candETM(nullptr), + m_candETT(nullptr), + m_candHTT(nullptr), + m_candHTM(nullptr), + m_candJetCounts(nullptr), + m_candHfBitCounts(nullptr), + m_candHfRingEtSums(nullptr), m_isDebugEnabled(edm::isDebugEnabled()) { @@ -1434,15 +1434,15 @@ void L1GlobalTriggerPSB::reset() { m_candL1TauJet->clear(); // no reset() available... - m_candETM = 0; - m_candETT = 0; - m_candHTT = 0; - m_candHTM = 0; + m_candETM = nullptr; + m_candETT = nullptr; + m_candHTT = nullptr; + m_candHTM = nullptr; - m_candJetCounts = 0; + m_candJetCounts = nullptr; - m_candHfBitCounts = 0; - m_candHfRingEtSums = 0; + m_candHfBitCounts = nullptr; + m_candHfRingEtSums = nullptr; } diff --git a/L1Trigger/GlobalTrigger/src/L1GtAlgorithmEvaluation.cc b/L1Trigger/GlobalTrigger/src/L1GtAlgorithmEvaluation.cc index f766cb77e704f..5fd9ed1e744ef 100644 --- a/L1Trigger/GlobalTrigger/src/L1GtAlgorithmEvaluation.cc +++ b/L1Trigger/GlobalTrigger/src/L1GtAlgorithmEvaluation.cc @@ -97,7 +97,7 @@ void L1GtAlgorithmEvaluation::evaluateAlgorithm(const int chipNumber, CItEvalMap itCond = (conditionResultMaps.at(chipNumber)).find(it->operand); if (itCond != (conditionResultMaps[chipNumber]).end()) { - if (0 == itCond->second) { + if (nullptr == itCond->second) { // it should never be happen, only valid conditions are in the maps throw cms::Exception("FailModule") << "\nCondition " << (it->operand) diff --git a/L1Trigger/GlobalTrigger/src/L1GtCaloCondition.cc b/L1Trigger/GlobalTrigger/src/L1GtCaloCondition.cc index 6f478b2d6edc6..028541adba80a 100644 --- a/L1Trigger/GlobalTrigger/src/L1GtCaloCondition.cc +++ b/L1Trigger/GlobalTrigger/src/L1GtCaloCondition.cc @@ -404,11 +404,11 @@ const L1GctCand* L1GtCaloCondition::getCandidate(const int indexCand) const { return (*(m_gtPSB->getCandL1TauJet()))[indexCand]; break; default: - return 0; + return nullptr; break; } - return 0; + return nullptr; } /** diff --git a/L1Trigger/GlobalTrigger/src/L1GtCorrelationCondition.cc b/L1Trigger/GlobalTrigger/src/L1GtCorrelationCondition.cc index 33023c6b8f8b7..06a2d7e2fc531 100644 --- a/L1Trigger/GlobalTrigger/src/L1GtCorrelationCondition.cc +++ b/L1Trigger/GlobalTrigger/src/L1GtCorrelationCondition.cc @@ -187,9 +187,9 @@ const bool L1GtCorrelationCondition::evaluateCondition() const { const L1GtConditionCategory cond0Categ = m_gtCorrelationTemplate->cond0Category(); const L1GtConditionCategory cond1Categ = m_gtCorrelationTemplate->cond1Category(); - const L1GtMuonTemplate* corrMuon = 0; - const L1GtCaloTemplate* corrCalo = 0; - const L1GtEnergySumTemplate* corrEnergySum = 0; + const L1GtMuonTemplate* corrMuon = nullptr; + const L1GtCaloTemplate* corrCalo = nullptr; + const L1GtEnergySumTemplate* corrEnergySum = nullptr; // FIXME copying is slow... CombinationsInCond cond0Comb; @@ -399,11 +399,11 @@ const bool L1GtCorrelationCondition::evaluateCondition() const { (combinationsInCond()).clear(); // pointers to objects - const std::vector* candMuVec = 0; - const std::vector* candCaloVec = 0; + const std::vector* candMuVec = nullptr; + const std::vector* candCaloVec = nullptr; // only ETM and HTM can appear in correlation conditions - const L1GctEtMiss* candETM = 0; - const L1GctHtMiss* candHTM = 0; + const L1GctEtMiss* candETM = nullptr; + const L1GctHtMiss* candHTM = nullptr; // make the conversions of the indices, depending on the combination of objects involved // (via pair index) @@ -436,7 +436,7 @@ const bool L1GtCorrelationCondition::evaluateCondition() const { // ... but add protection to not crash int obj0Index = -1; - if ((*it0Comb).size() > 0) { + if (!(*it0Comb).empty()) { obj0Index = (*it0Comb)[0]; } else { LogTrace("L1GlobalTrigger") @@ -569,7 +569,7 @@ const bool L1GtCorrelationCondition::evaluateCondition() const { // ... but add protection to not crash int obj1Index = -1; - if ((*it1Comb).size() > 0) { + if (!(*it1Comb).empty()) { obj1Index = (*it1Comb)[0]; } else { LogTrace("L1GlobalTrigger") diff --git a/L1Trigger/GlobalTrigger/src/L1GtEnergySumCondition.cc b/L1Trigger/GlobalTrigger/src/L1GtEnergySumCondition.cc index 419ee918d6b3c..1914c2785fcb9 100644 --- a/L1Trigger/GlobalTrigger/src/L1GtEnergySumCondition.cc +++ b/L1Trigger/GlobalTrigger/src/L1GtEnergySumCondition.cc @@ -141,7 +141,7 @@ const bool L1GtEnergySumCondition::evaluateCondition() const { case ETT: { const L1GctEtTotal* cand1 = m_gtPSB->getCandL1ETT(); - if (cand1 == 0) { + if (cand1 == nullptr) { return false; } @@ -153,7 +153,7 @@ const bool L1GtEnergySumCondition::evaluateCondition() const { case ETM: { const L1GctEtMiss* cand2 = m_gtPSB->getCandL1ETM(); - if (cand2 == 0) { + if (cand2 == nullptr) { return false; } @@ -166,7 +166,7 @@ const bool L1GtEnergySumCondition::evaluateCondition() const { case HTT: { const L1GctEtHad* cand3 = m_gtPSB->getCandL1HTT(); - if (cand3 == 0) { + if (cand3 == nullptr) { return false; } @@ -178,7 +178,7 @@ const bool L1GtEnergySumCondition::evaluateCondition() const { case HTM: { const L1GctHtMiss* cand4 = m_gtPSB->getCandL1HTM(); - if (cand4 == 0) { + if (cand4 == nullptr) { return false; } diff --git a/L1Trigger/GlobalTrigger/src/L1GtHfBitCountsCondition.cc b/L1Trigger/GlobalTrigger/src/L1GtHfBitCountsCondition.cc index 23adbf52c8edc..9ad67d2ef5651 100644 --- a/L1Trigger/GlobalTrigger/src/L1GtHfBitCountsCondition.cc +++ b/L1Trigger/GlobalTrigger/src/L1GtHfBitCountsCondition.cc @@ -126,7 +126,7 @@ const bool L1GtHfBitCountsCondition::evaluateCondition() const { const L1GctHFBitCounts* bitCounts = m_gtPSB->getCandL1HfBitCounts(); // protection against missing HF bit counts collection - if (bitCounts == 0) { + if (bitCounts == nullptr) { return false; } diff --git a/L1Trigger/GlobalTrigger/src/L1GtHfRingEtSumsCondition.cc b/L1Trigger/GlobalTrigger/src/L1GtHfRingEtSumsCondition.cc index 66798d7400225..7cc1262aeeb64 100644 --- a/L1Trigger/GlobalTrigger/src/L1GtHfRingEtSumsCondition.cc +++ b/L1Trigger/GlobalTrigger/src/L1GtHfRingEtSumsCondition.cc @@ -126,7 +126,7 @@ const bool L1GtHfRingEtSumsCondition::evaluateCondition() const { const L1GctHFRingEtSums* etSumCand = m_gtPSB->getCandL1HfRingEtSums(); // protection against missing HF Ring Et sums collection - if (etSumCand == 0) { + if (etSumCand == nullptr) { return false; } diff --git a/L1Trigger/GlobalTrigger/src/L1GtJetCountsCondition.cc b/L1Trigger/GlobalTrigger/src/L1GtJetCountsCondition.cc index 32558ab3328c9..631bc7379c2ad 100644 --- a/L1Trigger/GlobalTrigger/src/L1GtJetCountsCondition.cc +++ b/L1Trigger/GlobalTrigger/src/L1GtJetCountsCondition.cc @@ -127,7 +127,7 @@ const bool L1GtJetCountsCondition::evaluateCondition() const { const L1GctJetCounts* jetCounts = m_gtPSB->getCandL1JetCounts(); // protection against missing jet counts collection - if (jetCounts == 0) { + if (jetCounts == nullptr) { return false; } diff --git a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtAnalyzer.h b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtAnalyzer.h index 00ef906446a60..af1ef7e426fc4 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtAnalyzer.h +++ b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtAnalyzer.h @@ -49,14 +49,14 @@ class L1GtAnalyzer: public edm::EDAnalyzer { public: explicit L1GtAnalyzer(const edm::ParameterSet&); - ~L1GtAnalyzer(); + ~L1GtAnalyzer() override; private: - virtual void beginJob(); - virtual void beginRun(const edm::Run&, const edm::EventSetup&); - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, - const edm::EventSetup&); + void beginJob() override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; + void beginLuminosityBlock(const edm::LuminosityBlock&, + const edm::EventSetup&) override; /// analyze: decision and decision word /// bunch cross in event BxInEvent = 0 - L1Accept event @@ -91,15 +91,15 @@ class L1GtAnalyzer: public edm::EDAnalyzer { void printOutput(std::ostringstream&); /// analyze each event: event loop over various code snippets - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// end section - virtual void endLuminosityBlock(const edm::LuminosityBlock&, - const edm::EventSetup&); - virtual void endRun(const edm::Run&, const edm::EventSetup&); + void endLuminosityBlock(const edm::LuminosityBlock&, + const edm::EventSetup&) override; + void endRun(const edm::Run&, const edm::EventSetup&) override; /// end of job - virtual void endJob(); + void endJob() override; private: diff --git a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtBeamModeFilter.h b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtBeamModeFilter.h index ff5465b1f7964..02a59a86c201a 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtBeamModeFilter.h +++ b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtBeamModeFilter.h @@ -42,10 +42,10 @@ class L1GtBeamModeFilter: public edm::EDFilter { explicit L1GtBeamModeFilter(const edm::ParameterSet&); /// destructor - virtual ~L1GtBeamModeFilter(); + ~L1GtBeamModeFilter() override; /// filter the event - virtual bool filter(edm::Event&, const edm::EventSetup&); + bool filter(edm::Event&, const edm::EventSetup&) override; private: diff --git a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtDataEmulAnalyzer.h b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtDataEmulAnalyzer.h index 83bf2bea4f413..e0d07fb48fe4a 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtDataEmulAnalyzer.h +++ b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtDataEmulAnalyzer.h @@ -50,11 +50,11 @@ class L1GtDataEmulAnalyzer : public edm::EDAnalyzer public: explicit L1GtDataEmulAnalyzer(const edm::ParameterSet&); - ~L1GtDataEmulAnalyzer(); + ~L1GtDataEmulAnalyzer() override; private: - virtual void beginJob(); + void beginJob() override; /// compare the GTFE board virtual void compareGTFE(const edm::Event&, const edm::EventSetup&, @@ -83,13 +83,13 @@ class L1GtDataEmulAnalyzer : public edm::EDAnalyzer virtual void compareGt_Gct(const edm::Event&, const edm::EventSetup&); /// analyze each event - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// book all histograms for the module void bookHistograms(); /// end of job - virtual void endJob(); + void endJob() override; private: diff --git a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtPackUnpackAnalyzer.h b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtPackUnpackAnalyzer.h index d83001971ee9e..85c3b1fe53de2 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtPackUnpackAnalyzer.h +++ b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtPackUnpackAnalyzer.h @@ -38,11 +38,11 @@ class L1GtPackUnpackAnalyzer : public edm::EDAnalyzer public: explicit L1GtPackUnpackAnalyzer(const edm::ParameterSet&); - ~L1GtPackUnpackAnalyzer(); + ~L1GtPackUnpackAnalyzer() override; private: - virtual void beginJob(); + void beginJob() override; /// GT comparison virtual void analyzeGT(const edm::Event&, const edm::EventSetup&); @@ -51,10 +51,10 @@ class L1GtPackUnpackAnalyzer : public edm::EDAnalyzer virtual void analyzeGMT(const edm::Event&, const edm::EventSetup&); /// analyze each event - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// end of job - virtual void endJob(); + void endJob() override; private: diff --git a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtPatternGenerator.h b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtPatternGenerator.h index a00538917a864..5d6fa078ed1d4 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtPatternGenerator.h +++ b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtPatternGenerator.h @@ -39,20 +39,20 @@ class L1GtPatternGenerator : public edm::EDAnalyzer public: explicit L1GtPatternGenerator(const edm::ParameterSet&); - ~L1GtPatternGenerator(); + ~L1GtPatternGenerator() override; protected: void extractGlobalTriggerData(const edm::Event& iEvent, L1GtPatternMap& patterns); private: /// analyze - virtual void beginJob(); + void beginJob() override; /// analyze each event - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// end of job - virtual void endJob(); + void endJob() override; /** Post-processing for complex mapping of HF records to PSB values */ void packHfRecords(const std::string& resultName, L1GtPatternMap& allPatterns); diff --git a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtTrigReport.h b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtTrigReport.h index 7b16e79b653d1..2685531547909 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtTrigReport.h +++ b/L1Trigger/GlobalTriggerAnalyzer/interface/L1GtTrigReport.h @@ -51,17 +51,17 @@ class L1GtTrigReport : public edm::one::EDAnalyzer<> explicit L1GtTrigReport(const edm::ParameterSet&); /// destructor - virtual ~L1GtTrigReport(); + ~L1GtTrigReport() override; private: - virtual void beginJob(); + void beginJob() override; /// analyze each event - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// end of job - virtual void endJob(); + void endJob() override; private: diff --git a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtAnalyzer.cc b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtAnalyzer.cc index e4fefb07a16c0..e49510d8efa62 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtAnalyzer.cc +++ b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtAnalyzer.cc @@ -1373,7 +1373,7 @@ void L1GtAnalyzer::analyzeObjectMap(const edm::Event& iEvent, m_nameAlgTechTrig, m_condName); // number of combinations - if (comb != 0) { + if (comb != nullptr) { myCoutStream << "\n Number of combinations passing (" << m_nameAlgTechTrig << ", " << m_condName << "): " << comb->size() << std::endl; diff --git a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtDataEmulAnalyzer.cc b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtDataEmulAnalyzer.cc index 278553875d18a..3cc432cd721db 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtDataEmulAnalyzer.cc +++ b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtDataEmulAnalyzer.cc @@ -498,9 +498,9 @@ void L1GtDataEmulAnalyzer::compareFDL(const edm::Event& iEvent, m_myCoutStream.clear(); // get technical trigger bits - const TechnicalTriggerWord gtTechnicalTriggerWordData = + const TechnicalTriggerWord& gtTechnicalTriggerWordData = fdlBlockData.gtTechnicalTriggerWord(); - const TechnicalTriggerWord gtTechnicalTriggerWordEmul = + const TechnicalTriggerWord& gtTechnicalTriggerWordEmul = fdlBlockEmul.gtTechnicalTriggerWord(); int nTechBits = gtTechnicalTriggerWordData.size(); @@ -631,8 +631,8 @@ void L1GtDataEmulAnalyzer::compareFDL(const edm::Event& iEvent, m_myCoutStream.clear(); // get algorithms bits (decision word) - const DecisionWord gtDecisionWordData = fdlBlockData.gtDecisionWord(); - const DecisionWord gtDecisionWordEmul = fdlBlockEmul.gtDecisionWord(); + const DecisionWord& gtDecisionWordData = fdlBlockData.gtDecisionWord(); + const DecisionWord& gtDecisionWordEmul = fdlBlockEmul.gtDecisionWord(); int nAlgoBits = gtDecisionWordData.size(); @@ -752,9 +752,9 @@ void L1GtDataEmulAnalyzer::compareFDL(const edm::Event& iEvent, } // get extended algorithms bits (extended decision word) - const DecisionWordExtended gtDecisionWordExtendedData = + const DecisionWordExtended& gtDecisionWordExtendedData = fdlBlockData.gtDecisionWordExtended(); - const DecisionWordExtended gtDecisionWordExtendedEmul = + const DecisionWordExtended& gtDecisionWordExtendedEmul = fdlBlockEmul.gtDecisionWordExtended(); if (gtDecisionWordExtendedData == gtDecisionWordExtendedEmul) { diff --git a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtPatternGenerator.cc b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtPatternGenerator.cc index 1298d67c123ae..a49654ab61bcf 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtPatternGenerator.cc +++ b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtPatternGenerator.cc @@ -99,7 +99,7 @@ template static void extractRecordData(const e const std::string& instance, TResult (TRecord::*rawFunctionPtr)() const, const std::string& prefix, - uint32_t (*packingFunction)(uint32_t) = NULL) + uint32_t (*packingFunction)(uint32_t) = nullptr) { // Extract record from event. edm::Handle > handle; @@ -117,7 +117,7 @@ template static void extractRecordData(const e int bx = it->bx(); L1GtPatternLine& line = allPatterns.getLine(eventNr, bx); uint32_t value = ((*it).*rawFunctionPtr)(); - if(packingFunction != NULL) { + if(packingFunction != nullptr) { value = packingFunction(value); } diff --git a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtTrigReport.cc b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtTrigReport.cc index f14defcae9d61..1c243dfec5ad5 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtTrigReport.cc +++ b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtTrigReport.cc @@ -134,18 +134,18 @@ L1GtTrigReport::L1GtTrigReport(const edm::ParameterSet& pSet) : L1GtTrigReport::~L1GtTrigReport() { for (ItEntry itEntry = m_entryList.begin(); itEntry != m_entryList.end(); itEntry++) { - if (*itEntry != 0) { + if (*itEntry != nullptr) { delete *itEntry; - *itEntry = 0; + *itEntry = nullptr; } } m_entryList.clear(); for (ItEntry itEntry = m_entryListTechTrig.begin(); itEntry != m_entryListTechTrig.end(); itEntry++) { - if (*itEntry != 0) { + if (*itEntry != nullptr) { delete *itEntry; - *itEntry = 0; + *itEntry = nullptr; } } diff --git a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtUtils.cc b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtUtils.cc index dddefc343fa05..7fce473b80b47 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/src/L1GtUtils.cc +++ b/L1Trigger/GlobalTriggerAnalyzer/src/L1GtUtils.cc @@ -910,8 +910,8 @@ const int L1GtUtils::l1Results(const edm::Event& iEvent, size_t pfSetsSize = 0; int pfIndex = -1; - const std::vector* prescaleFactorsSubset = 0; - const std::vector* triggerMasksSet = 0; + const std::vector* prescaleFactorsSubset = nullptr; + const std::vector* triggerMasksSet = nullptr; switch (trigCategory) { case AlgorithmTrigger: { @@ -1359,7 +1359,7 @@ const int L1GtUtils::triggerMask(const std::string& nameAlgoTechTrig, // pointer to the set of trigger masks - const std::vector* triggerMasksSet = 0; + const std::vector* triggerMasksSet = nullptr; switch (trigCategory) { case AlgorithmTrigger: { @@ -1890,7 +1890,7 @@ const L1GtTriggerMenu* L1GtUtils::ptrL1TriggerMenuEventSetup(int& errorCode) { if (!availableL1Configuration(iError, l1ConfCode)) { errorCode = iError; - return 0; + return nullptr; } if (m_retrieveL1EventSetup) { @@ -1900,7 +1900,7 @@ const L1GtTriggerMenu* L1GtUtils::ptrL1TriggerMenuEventSetup(int& errorCode) { iError = l1ConfCode; errorCode = iError; - return 0; + return nullptr; } @@ -1918,7 +1918,7 @@ const L1GtTriggerMenuLite* L1GtUtils::ptrL1GtTriggerMenuLite(int& errorCode) { if (!availableL1Configuration(iError, l1ConfCode)) { errorCode = iError; - return 0; + return nullptr; } if (m_retrieveL1GtTriggerMenuLite) { @@ -1931,13 +1931,13 @@ const L1GtTriggerMenuLite* L1GtUtils::ptrL1GtTriggerMenuLite(int& errorCode) { iError = l1ConfCode; errorCode = iError; - return 0; + return nullptr; } } else { iError = l1ConfCode; errorCode = iError; - return 0; + return nullptr; } errorCode = iError; diff --git a/L1Trigger/GlobalTriggerAnalyzer/src/L1RetrieveL1Extra.cc b/L1Trigger/GlobalTriggerAnalyzer/src/L1RetrieveL1Extra.cc index 1d3dfd83dfa15..b31f8244ea663 100644 --- a/L1Trigger/GlobalTriggerAnalyzer/src/L1RetrieveL1Extra.cc +++ b/L1Trigger/GlobalTriggerAnalyzer/src/L1RetrieveL1Extra.cc @@ -56,18 +56,18 @@ L1RetrieveL1Extra::L1RetrieveL1Extra(const edm::ParameterSet& paramSet, edm::Con m_validL1ExtraHfRingEtSums(false), // - m_l1ExtraMuon(0), - m_l1ExtraIsoEG(0), - m_l1ExtraNoIsoEG(0), - m_l1ExtraCenJet(0), - m_l1ExtraForJet(0), - m_l1ExtraTauJet(0), - m_l1ExtraETT(0), - m_l1ExtraETM(0), - m_l1ExtraHTT(0), - m_l1ExtraHTM(0), - m_l1ExtraHfBitCounts(0), - m_l1ExtraHfRingEtSums(0) + m_l1ExtraMuon(nullptr), + m_l1ExtraIsoEG(nullptr), + m_l1ExtraNoIsoEG(nullptr), + m_l1ExtraCenJet(nullptr), + m_l1ExtraForJet(nullptr), + m_l1ExtraTauJet(nullptr), + m_l1ExtraETT(nullptr), + m_l1ExtraETM(nullptr), + m_l1ExtraHTT(nullptr), + m_l1ExtraHTM(nullptr), + m_l1ExtraHfBitCounts(nullptr), + m_l1ExtraHfRingEtSums(nullptr) // { @@ -112,7 +112,7 @@ void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, << std::endl; m_validL1ExtraMuon = false; - m_l1ExtraMuon = 0; + m_l1ExtraMuon = nullptr; } @@ -131,7 +131,7 @@ void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, << std::endl; m_validL1ExtraIsoEG = false; - m_l1ExtraIsoEG = 0; + m_l1ExtraIsoEG = nullptr; } @@ -149,7 +149,7 @@ void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, << std::endl; m_validL1ExtraNoIsoEG = false; - m_l1ExtraNoIsoEG = 0; + m_l1ExtraNoIsoEG = nullptr; } @@ -168,7 +168,7 @@ void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, << std::endl; m_validL1ExtraCenJet = false; - m_l1ExtraCenJet = 0; + m_l1ExtraCenJet = nullptr; } @@ -186,7 +186,7 @@ void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, << std::endl; m_validL1ExtraForJet = false; - m_l1ExtraForJet = 0; + m_l1ExtraForJet = nullptr; } @@ -204,7 +204,7 @@ void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, << std::endl; m_validL1ExtraTauJet = false; - m_l1ExtraTauJet = 0; + m_l1ExtraTauJet = nullptr; } @@ -226,8 +226,8 @@ void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, m_validL1ExtraETT = false; m_validL1ExtraETM = false; - m_l1ExtraETT = 0; - m_l1ExtraETM = 0; + m_l1ExtraETT = nullptr; + m_l1ExtraETM = nullptr; } @@ -248,8 +248,8 @@ void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, m_validL1ExtraHTT = false; m_validL1ExtraHTM = false; - m_l1ExtraHTT = 0; - m_l1ExtraHTM = 0; + m_l1ExtraHTT = nullptr; + m_l1ExtraHTM = nullptr; } @@ -271,8 +271,8 @@ void L1RetrieveL1Extra::retrieveL1ExtraObjects(const edm::Event& iEvent, m_validL1ExtraHfBitCounts = false; m_validL1ExtraHfRingEtSums = false; - m_l1ExtraHfBitCounts = 0; - m_l1ExtraHfRingEtSums = 0; + m_l1ExtraHfBitCounts = nullptr; + m_l1ExtraHfRingEtSums = nullptr; } diff --git a/L1Trigger/HardwareValidation/interface/DEutils.h b/L1Trigger/HardwareValidation/interface/DEutils.h index 6b81cc788757c..44957e38048f6 100644 --- a/L1Trigger/HardwareValidation/interface/DEutils.h +++ b/L1Trigger/HardwareValidation/interface/DEutils.h @@ -351,7 +351,7 @@ DEutils::DEDigi(col_cit itd, col_cit itm, int aflag digi.setRank((float)de,(float)ee); //note: phi,eta,pt 'values' not always set for all muon tf systems //(under discussion) need universal mechanism for setting up physical units - if(0) //check print + if(false) //check print std::cout << "L1DataEmulDigi DEutils] dedigi info" //<< " phivalue:" << itd->phiValue() << "," << itm->phiValue() //<< " etavalue:" << itd->etaValue() << "," << itm->etaValue() @@ -380,7 +380,7 @@ DEutils::DEDigi(col_cit itd, col_cit itm, int aflag) { int de = (aflag==4)?0:itd->ptIndex();//ptValue(); int ee = (aflag==3)?0:itm->ptIndex();//ptValue(); digi.setRank((float)de,(float)ee); - if(0) //check print + if(false) //check print std::cout << "l1dataemuldigi l1mugmtcandcoll type:" << cid //<< " eta:" << itd->etaValue() << ", " << itm->etaValue() //<< " phi:" << itd->phiValue() << ", " << itm->phiValue() @@ -1537,7 +1537,7 @@ inline bool de_rank::operator() if (x.rank() != y.rank()) { return (x.rank() < y.rank()) ; } else if(x.isolated() != y.isolated()) { - return (x.isolated())?1:0; + return (x.isolated())?true:false; } else if(x.rctRegion() != y.rctRegion()){ return (x.rctRegion() < y.rctRegion()); } else if(x.rctCrate() != y.rctCrate()) { diff --git a/L1Trigger/HardwareValidation/interface/L1Comparator.h b/L1Trigger/HardwareValidation/interface/L1Comparator.h index 22542f85788df..f57643770fe84 100644 --- a/L1Trigger/HardwareValidation/interface/L1Comparator.h +++ b/L1Trigger/HardwareValidation/interface/L1Comparator.h @@ -43,14 +43,14 @@ class L1Comparator : public edm::EDProducer { public: explicit L1Comparator(const edm::ParameterSet&); - ~L1Comparator(); + ~L1Comparator() override; private: - virtual void beginJob(void) override; - virtual void beginRun(edm::Run const&, const edm::EventSetup&) override final; - virtual void produce (edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob(void) override; + void beginRun(edm::Run const&, const edm::EventSetup&) final; + void produce (edm::Event&, const edm::EventSetup&) override; + void endJob() override; template void process( T const*, T const*, const int, const int); diff --git a/L1Trigger/HardwareValidation/interface/L1ComparatorRun2.h b/L1Trigger/HardwareValidation/interface/L1ComparatorRun2.h index 63e6fc0d19269..c2c7487e2e331 100644 --- a/L1Trigger/HardwareValidation/interface/L1ComparatorRun2.h +++ b/L1Trigger/HardwareValidation/interface/L1ComparatorRun2.h @@ -42,11 +42,11 @@ namespace l1t { public: explicit L1ComparatorRun2(const edm::ParameterSet& ps); - ~L1ComparatorRun2(); + ~L1ComparatorRun2() override; private: - virtual void produce(edm::Event&, edm::EventSetup const&); + void produce(edm::Event&, edm::EventSetup const&) override; edm::EDGetToken JetDataToken_; edm::EDGetToken JetEmulToken_; diff --git a/L1Trigger/HardwareValidation/plugins/L1DEFilter.h b/L1Trigger/HardwareValidation/plugins/L1DEFilter.h index 16cc581c538c1..b2b58c12a6d61 100644 --- a/L1Trigger/HardwareValidation/plugins/L1DEFilter.h +++ b/L1Trigger/HardwareValidation/plugins/L1DEFilter.h @@ -25,13 +25,13 @@ class L1DEFilter : public edm::EDFilter { public: explicit L1DEFilter(const edm::ParameterSet&); - ~L1DEFilter(); + ~L1DEFilter() override; private: - virtual void beginJob(void) {}; + void beginJob(void) override {}; //virtual void beginRun(edm::Run&, const edm::EventSetup&); - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob(); + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override; edm::InputTag DEsource_; std::vector flagSys_; diff --git a/L1Trigger/HardwareValidation/plugins/L1DummyProducer.h b/L1Trigger/HardwareValidation/plugins/L1DummyProducer.h index 0eee4fe3c55a4..82097f23a78d9 100644 --- a/L1Trigger/HardwareValidation/plugins/L1DummyProducer.h +++ b/L1Trigger/HardwareValidation/plugins/L1DummyProducer.h @@ -40,14 +40,14 @@ class L1DummyProducer : public edm::EDProducer { public: explicit L1DummyProducer(const edm::ParameterSet&); - ~L1DummyProducer(); + ~L1DummyProducer() override; private: - virtual void beginJob(void) {}; + void beginJob(void) override {}; //virtual void beginRun(edm::Run&, const edm::EventSetup&); - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() {}; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override {}; public: @@ -108,7 +108,7 @@ L1DummyProducer::SimpleDigi(CLHEP::HepRandomEngine* engine, std::unique_ptrpush_back(h_digi); @@ -145,10 +145,10 @@ L1DummyProducer::SimpleDigi(CLHEP::HepRandomEngine* engine, std::unique_ptr....\n" << std::flush; int energy= (int) (EBase_ + ESigm_*CLHEP::RandGaussQ::shoot(engine)); unsigned et = energy & 0x3ff; - bool overFlow = 0; //(engine->flat()>0.4); - bool tauVeto = 0; //(engine->flat()>0.3); - bool mip = 0; //(engine->flat()>0.1); - bool quiet = 0; //(engine->flat()>0.6); + bool overFlow = false; //(engine->flat()>0.4); + bool tauVeto = false; //(engine->flat()>0.3); + bool mip = false; //(engine->flat()>0.1); + bool quiet = false; //(engine->flat()>0.6); unsigned crate= (unsigned)(18*engine->flat()); unsigned card = (unsigned)(7*engine->flat()); unsigned rgn = crate%2; //(engine->flat()>0.5?0:1); diff --git a/L1Trigger/HardwareValidation/plugins/L1EmulBias.h b/L1Trigger/HardwareValidation/plugins/L1EmulBias.h index bc8d22ccfed17..9f4f0a48e2baa 100644 --- a/L1Trigger/HardwareValidation/plugins/L1EmulBias.h +++ b/L1Trigger/HardwareValidation/plugins/L1EmulBias.h @@ -37,13 +37,13 @@ class L1EmulBias : public edm::EDProducer { public: explicit L1EmulBias(const edm::ParameterSet&); - ~L1EmulBias(); + ~L1EmulBias() override; protected: - virtual void beginJob(void) {}; + void beginJob(void) override {}; //virtual void beginRun(edm::Run&, const edm::EventSetup&); - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob(void) {}; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob(void) override {}; public: template diff --git a/L1Trigger/HardwareValidation/src/L1Comparator.cc b/L1Trigger/HardwareValidation/src/L1Comparator.cc index a4fea0d3bbafb..1ccfab032ee0b 100644 --- a/L1Trigger/HardwareValidation/src/L1Comparator.cc +++ b/L1Trigger/HardwareValidation/src/L1Comparator.cc @@ -96,7 +96,7 @@ L1Comparator::L1Comparator(const edm::ParameterSet& iConfig) { for (int i = 0; i < 2 ; ++i) { edm::InputTag const& tag = tags[i]; - std::string const label = tag.label(); + std::string const& label = tag.label(); tokenGctEmCand_isoEm_[i] = consumes(edm::InputTag(label, "isoEm")); tokenGctEmCand_nonIsoEm_[i] = consumes(edm::InputTag(label, "nonIsoEm")); tokenGctJetCand_cenJets_[i] = consumes(edm::InputTag(label, "cenJets")); @@ -114,7 +114,7 @@ L1Comparator::L1Comparator(const edm::ParameterSet& iConfig) { if(m_stage1_layer2_ == true) { for (int i = 0; i < 2 ; ++i) { edm::InputTag const& tag = tags[i]; - std::string const label = tag.label(); + std::string const& label = tag.label(); tokenGctEmCand_isoEm_[i] = consumes(edm::InputTag(label, "isoEm")); tokenGctEmCand_nonIsoEm_[i] = consumes(edm::InputTag(label, "nonIsoEm")); tokenGctJetCand_cenJets_[i] = consumes(edm::InputTag(label, "cenJets")); @@ -388,10 +388,10 @@ L1Comparator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { iEvent.getByToken(tokenMuDTChambTh_[0],dtp_th_data_); iEvent.getByToken(tokenMuDTChambTh_[1],dtp_th_emul_); } - L1MuDTChambPhDigiCollection const* dtp_ph_data = 0; - L1MuDTChambPhDigiCollection const* dtp_ph_emul = 0; - L1MuDTChambThDigiCollection const* dtp_th_data = 0; - L1MuDTChambThDigiCollection const* dtp_th_emul = 0; + L1MuDTChambPhDigiCollection const* dtp_ph_data = nullptr; + L1MuDTChambPhDigiCollection const* dtp_ph_emul = nullptr; + L1MuDTChambThDigiCollection const* dtp_th_data = nullptr; + L1MuDTChambThDigiCollection const* dtp_th_emul = nullptr; if(dtp_ph_data_.isValid()) dtp_ph_data = dtp_ph_data_->getContainer(); if(dtp_ph_emul_.isValid()) dtp_ph_emul = dtp_ph_emul_->getContainer(); @@ -401,8 +401,8 @@ L1Comparator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { // -- DTF [drift tube track finder] edm::Handle dtf_trk_data_; edm::Handle dtf_trk_emul_; - L1MuRegionalCandCollection const* dtf_trk_data = 0; - L1MuRegionalCandCollection const* dtf_trk_emul = 0; + L1MuRegionalCandCollection const* dtf_trk_data = nullptr; + L1MuRegionalCandCollection const* dtf_trk_emul = nullptr; if(m_doSys[DTF]) { iEvent.getByToken(tokenMuDTTrack_[0],dtf_trk_data_); iEvent.getByToken(tokenMuDTTrack_[1],dtf_trk_emul_); @@ -700,7 +700,7 @@ L1Comparator::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { m_dumpFile << std::flush; //if collection is empty, add empty digi - if(m_dedigis.size()==0) { + if(m_dedigis.empty()) { if(verbose()) std::cout << "\n [L1Comparator] adding empty collection to DErecord\n"; m_dedigis.push_back(L1DataEmulDigi()); diff --git a/L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticleMapProd.h b/L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticleMapProd.h index 11fb8b57a9f31..5fb0cae7dbbc1 100644 --- a/L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticleMapProd.h +++ b/L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticleMapProd.h @@ -38,10 +38,10 @@ class L1ExtraParticleMapProd : public edm::EDProducer { public: explicit L1ExtraParticleMapProd(const edm::ParameterSet&); - ~L1ExtraParticleMapProd(); + ~L1ExtraParticleMapProd() override; - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: // Adds Refs to the objects in handle to the outputRefs vector. diff --git a/L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticlesProd.h b/L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticlesProd.h index 43ade06b16763..9889746bce005 100644 --- a/L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticlesProd.h +++ b/L1Trigger/L1ExtraFromDigis/interface/L1ExtraParticlesProd.h @@ -41,10 +41,10 @@ class L1CaloGeometry ; class L1ExtraParticlesProd : public edm::stream::EDProducer<> { public: explicit L1ExtraParticlesProd(const edm::ParameterSet&); - ~L1ExtraParticlesProd(); + ~L1ExtraParticlesProd() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; // math::XYZTLorentzVector gctLorentzVector( const double& et, math::PtEtaPhiMLorentzVector gctLorentzVector( const double& et, diff --git a/L1Trigger/L1ExtraFromDigis/src/L1ExtraParticleMapProd.cc b/L1Trigger/L1ExtraFromDigis/src/L1ExtraParticleMapProd.cc index fe79f4c6eb5e2..90ca4cb96cdd7 100644 --- a/L1Trigger/L1ExtraFromDigis/src/L1ExtraParticleMapProd.cc +++ b/L1Trigger/L1ExtraFromDigis/src/L1ExtraParticleMapProd.cc @@ -2442,8 +2442,8 @@ L1ExtraParticleMapProd::evaluateDoubleDifferentCaloObjectTrigger( // Check for identical region only if both HW objects are non-null. if( refj.get()->et() >= etThreshold2 && - ( refi.get()->gctEmCand() == 0 || - refj.get()->gctJetCand() == 0 || + ( refi.get()->gctEmCand() == nullptr || + refj.get()->gctJetCand() == nullptr || refi.get()->gctEmCand()->regionId() != refj.get()->gctJetCand()->regionId() ) ) { @@ -2611,7 +2611,7 @@ L1ExtraParticleMapProd::evaluateDoubleExclusiveIsoEG( if ( inputRefs1.size() ==2 ) { // 2 iso EG decision=true; - if (inputRefs2.size()>0) + if (!inputRefs2.empty()) { // should veto if there are jets, with pt>thresh for( size_t j = 0 ; j < inputRefs2.size() ; ++j ) { diff --git a/L1Trigger/L1ExtraFromDigis/src/L1ExtraTestAnalyzer.cc b/L1Trigger/L1ExtraFromDigis/src/L1ExtraTestAnalyzer.cc index 1f176957e820f..075faf4f2bccd 100644 --- a/L1Trigger/L1ExtraFromDigis/src/L1ExtraTestAnalyzer.cc +++ b/L1Trigger/L1ExtraFromDigis/src/L1ExtraTestAnalyzer.cc @@ -53,10 +53,10 @@ using namespace std ; class L1ExtraTestAnalyzer : public edm::EDAnalyzer { public: explicit L1ExtraTestAnalyzer(const edm::ParameterSet&); - ~L1ExtraTestAnalyzer(); + ~L1ExtraTestAnalyzer() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/L1Trigger/L1GctAnalyzer/interface/DumpGctDigis.h b/L1Trigger/L1GctAnalyzer/interface/DumpGctDigis.h index b3f4dc094ae10..2a0571aa20e62 100644 --- a/L1Trigger/L1GctAnalyzer/interface/DumpGctDigis.h +++ b/L1Trigger/L1GctAnalyzer/interface/DumpGctDigis.h @@ -35,9 +35,9 @@ class DumpGctDigis : public edm::EDAnalyzer { public: explicit DumpGctDigis(const edm::ParameterSet&); - ~DumpGctDigis(); + ~DumpGctDigis() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; void doRctEM(const edm::Event&, const edm::InputTag& label); void doEM(const edm::Event&, const edm::InputTag& label); diff --git a/L1Trigger/L1GctAnalyzer/interface/GctFibreAnalyzer.h b/L1Trigger/L1GctAnalyzer/interface/GctFibreAnalyzer.h index 0d01657542a34..95fba2f814340 100644 --- a/L1Trigger/L1GctAnalyzer/interface/GctFibreAnalyzer.h +++ b/L1Trigger/L1GctAnalyzer/interface/GctFibreAnalyzer.h @@ -34,11 +34,11 @@ class GctFibreAnalyzer : public edm::EDAnalyzer { public: explicit GctFibreAnalyzer(const edm::ParameterSet&); - ~GctFibreAnalyzer(); + ~GctFibreAnalyzer() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; bool CheckFibreWord(const L1GctFibreWord fibre); bool CheckForBC0(const L1GctFibreWord fibre); diff --git a/L1Trigger/L1GctAnalyzer/interface/GctTimingAnalyzer.h b/L1Trigger/L1GctAnalyzer/interface/GctTimingAnalyzer.h index 72ac73983854f..5ef3d71deb7a8 100644 --- a/L1Trigger/L1GctAnalyzer/interface/GctTimingAnalyzer.h +++ b/L1Trigger/L1GctAnalyzer/interface/GctTimingAnalyzer.h @@ -38,11 +38,11 @@ class GctTimingAnalyzer : public edm::EDAnalyzer { public: explicit GctTimingAnalyzer(const edm::ParameterSet&); - ~GctTimingAnalyzer(); + ~GctTimingAnalyzer() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; std::string m_outputFileName; // Output file std::ofstream m_outputFile; diff --git a/L1Trigger/L1GctAnalyzer/interface/compareCands.h b/L1Trigger/L1GctAnalyzer/interface/compareCands.h index 1c30314d60d7a..79a280cc4d3e7 100644 --- a/L1Trigger/L1GctAnalyzer/interface/compareCands.h +++ b/L1Trigger/L1GctAnalyzer/interface/compareCands.h @@ -54,7 +54,7 @@ bool compareCands::doCompare(TH1I *errorFlag_hist_, TH1I *mismatchD_Rank, TH2 //These TrigBx parameters are set in the configuration to make things more flexible if things change later //define some temporary local variables - bool errorFlag=0; + bool errorFlag=false; unsigned int i=0, j=0; std::vector matched(GCT_OBJECT_QUANTA); //this makes a vector of GCT_OBJECT_QUANTA=4 bools, all set to false @@ -80,7 +80,7 @@ bool compareCands::doCompare(TH1I *errorFlag_hist_, TH1I *mismatchD_Rank, TH2 && matched.at((j % GCT_OBJECT_QUANTA)) == 0 ) { //this means that the ith data candidate matches the jth emulator candidate errorFlag_hist_->Fill(0); //fill the errorflag histo in the matched bin - matched.at((j % GCT_OBJECT_QUANTA)) = 1; //set emulator candidate to matched so it doesn't get re-used + matched.at((j % GCT_OBJECT_QUANTA)) = true; //set emulator candidate to matched so it doesn't get re-used break; //matched the current data candidate, now move to the next } @@ -88,7 +88,7 @@ bool compareCands::doCompare(TH1I *errorFlag_hist_, TH1I *mismatchD_Rank, TH2 errorFlag_hist_->Fill(1); //fill the errorflag histo in the unmatched data candidate bin mismatchD_Rank->Fill(data_->at(i).rank()); //fill the rank histogram of mismatched data candidates mismatchD_EtEtaPhi->Fill(data_->at(i).regionId().ieta(),data_->at(i).regionId().iphi(),data_->at(i).rank()); //fill the EtEtaPhi dist for mismatched candidates - errorFlag=1; //set the errorFlag to true + errorFlag=true; //set the errorFlag to true } } @@ -110,7 +110,7 @@ bool compareCands::doCompare(TH1I *errorFlag_hist_, TH1I *mismatchD_Rank, TH2 errorFlag_hist_->Fill(2); //increment emulator mismatched bin mismatchE_Rank->Fill(emu_->at(j).rank()); //fill the rank histogram for unmatched emulator mismatchE_EtEtaPhi->Fill(emu_->at(j).regionId().ieta(),emu_->at(j).regionId().iphi(),emu_->at(j).rank()); //fill EtEtaPhi for unmatched emu cands - errorFlag=1; //set the errorFlag (if it's not already) + errorFlag=true; //set the errorFlag (if it's not already) } } } diff --git a/L1Trigger/L1GctAnalyzer/interface/compareMissingEnergySums.h b/L1Trigger/L1GctAnalyzer/interface/compareMissingEnergySums.h index ef9ea6c4aec5c..c4523b7a32977 100644 --- a/L1Trigger/L1GctAnalyzer/interface/compareMissingEnergySums.h +++ b/L1Trigger/L1GctAnalyzer/interface/compareMissingEnergySums.h @@ -50,7 +50,7 @@ compareMissingEnergySums::~compareMissingEnergySums() { template bool compareMissingEnergySums::doCompare(TH1I *errorFlag_hist_) { - bool errorFlag=0; + bool errorFlag=false; for(unsigned int i=0; i < data_->size(); i++) { if(data_->at(i).bx() != mbxparams_.GCTTrigBx) continue; @@ -76,18 +76,18 @@ bool compareMissingEnergySums::doCompare(TH1I *errorFlag_hist_) { if(!data_->at(i).overFlow() && !emu_->at(j).overFlow() && data_->at(i).et() == emu_->at(j).et() && data_->at(i).phi() != emu_->at(j).phi()) { //if the overflow bits are both off but only the mag agree = mag match errorFlag_hist_->Fill(1); - return errorFlag=1; + return errorFlag=true; } if(!data_->at(i).overFlow() && !emu_->at(j).overFlow() && data_->at(i).et() != emu_->at(j).et() && data_->at(i).phi() == emu_->at(j).phi()) { //if the overflow bits are both off but only the phi agree = phi match errorFlag_hist_->Fill(2); - return errorFlag=1; + return errorFlag=true; } //otherwise it's a total unmatch errorFlag_hist_->Fill(3); - errorFlag=1; + errorFlag=true; return errorFlag; } } diff --git a/L1Trigger/L1GctAnalyzer/interface/compareTotalEnergySums.h b/L1Trigger/L1GctAnalyzer/interface/compareTotalEnergySums.h index 8b7112c34fd43..867f181eb588e 100644 --- a/L1Trigger/L1GctAnalyzer/interface/compareTotalEnergySums.h +++ b/L1Trigger/L1GctAnalyzer/interface/compareTotalEnergySums.h @@ -50,7 +50,7 @@ compareTotalEnergySums::~compareTotalEnergySums() { template bool compareTotalEnergySums::doCompare(TH1I *errorFlag_hist_) { - bool errorFlag=0; + bool errorFlag=false; for(unsigned int i=0; i < data_->size(); i++) { //check the GCTTrigBx is the one being considered @@ -80,7 +80,7 @@ bool compareTotalEnergySums::doCompare(TH1I *errorFlag_hist_) { //otherwise, it's a fail errorFlag_hist_->Fill(1); - errorFlag=1; + errorFlag=true; return errorFlag; } } diff --git a/L1Trigger/L1GctAnalyzer/src/DumpGctDigis.cc b/L1Trigger/L1GctAnalyzer/src/DumpGctDigis.cc index 136cd6ece0f56..c2b489e765a4c 100644 --- a/L1Trigger/L1GctAnalyzer/src/DumpGctDigis.cc +++ b/L1Trigger/L1GctAnalyzer/src/DumpGctDigis.cc @@ -182,7 +182,7 @@ void DumpGctDigis::doJets(const edm::Event& iEvent, const edm::InputTag& label) L1GctJetCandCollection::const_iterator fj; L1GctJetCandCollection::const_iterator tj; - const std::string labelStr = label.label(); + const std::string& labelStr = label.label(); iEvent.getByLabel(labelStr,"cenJets",cenJets); iEvent.getByLabel(labelStr,"forJets",forJets); diff --git a/L1Trigger/L1GctAnalyzer/src/GctErrorAnalyzer.cc b/L1Trigger/L1GctAnalyzer/src/GctErrorAnalyzer.cc index 5614b38438579..cef7599ae4217 100644 --- a/L1Trigger/L1GctAnalyzer/src/GctErrorAnalyzer.cc +++ b/L1Trigger/L1GctAnalyzer/src/GctErrorAnalyzer.cc @@ -57,9 +57,9 @@ Description: Tool to debug the GCT with useful output class GctErrorAnalyzer : public edm::EDAnalyzer { private: - GctErrorAnalyzer(); - GctErrorAnalyzer(const GctErrorAnalyzer &); - GctErrorAnalyzer operator=(const GctErrorAnalyzer &); + GctErrorAnalyzer() = delete; + GctErrorAnalyzer(const GctErrorAnalyzer &) = delete; + GctErrorAnalyzer operator=(const GctErrorAnalyzer &) = delete; void plotRCTRegions(const edm::Handle &caloRegions); void plotIsoEm(const edm::Handle &data, const edm::Handle &emu); void plotNonIsoEm(const edm::Handle &data, const edm::Handle &emu); @@ -83,12 +83,12 @@ class GctErrorAnalyzer : public edm::EDAnalyzer { public: explicit GctErrorAnalyzer(const edm::ParameterSet&); - ~GctErrorAnalyzer(); + ~GctErrorAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- //the following flags select what we'd like to plot and whether or not we want error information @@ -536,17 +536,17 @@ GctErrorAnalyzer::GctErrorAnalyzer(const edm::ParameterSet& iConfig) : } //initialise - set all flags to false as they will be set on an event-by-event basis - isIsoError=0; - isNonIsoError=0; - isCenJetError=0; - isTauJetError=0; - isForJetError=0; - isRingSumError=0; - isBitCountError=0; - isTotalEError=0; - isTotalHError=0; - isMissingEError=0; - isMissingHError=0; + isIsoError=false; + isNonIsoError=false; + isCenJetError=false; + isTauJetError=false; + isForJetError=false; + isRingSumError=false; + isBitCountError=false; + isTotalEError=false; + isTotalHError=false; + isMissingEError=false; + isMissingHError=false; //fill the struct of MBXinformation. It is easier to pass this information to the respective functions as used below this way MBxInfo.RCTTrigBx = RCTTrigBx_; @@ -643,8 +643,8 @@ GctErrorAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.getByLabel(dataTag_.label(), "isoEm", isoEgD); iEvent.getByLabel(emuTag_.label(), "isoEm", isoEgE); - isIsoError=0; - isNonIsoError=0; + isIsoError=false; + isNonIsoError=false; if(checkCollections(isoEgD, GCT_OBJECT_QUANTA, "Iso e/g Data") && checkCollections(isoEgE, GCT_OBJECT_QUANTA, "Iso e/g Emulator")) { plotIsoEm(isoEgD, isoEgE); @@ -676,9 +676,9 @@ GctErrorAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.getByLabel(emuTag_.label(), intJetsE); - isCenJetError=0; - isTauJetError=0; - isForJetError=0; + isCenJetError=false; + isTauJetError=false; + isForJetError=false; //Central Jets if(checkCollections(cenJetsD, GCT_OBJECT_QUANTA, "Central Jets Data") && checkCollections(cenJetsE, GCT_OBJECT_QUANTA, "Central Jets Emulator")) { @@ -716,8 +716,8 @@ GctErrorAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.getByLabel(dataTag_.label(), hfBitCountsD); iEvent.getByLabel(emuTag_.label(), hfBitCountsE); - isRingSumError=0; - isBitCountError=0; + isRingSumError=false; + isBitCountError=false; if(checkCollections(hfRingSumsD, GCT_SUMS_QUANTA, "HF Ring Sums Data") && checkCollections(hfRingSumsE, GCT_SUMS_QUANTA, "HF Ring Sums Emulator")) { plotHFRingSums(hfRingSumsD, hfRingSumsE); @@ -743,8 +743,8 @@ GctErrorAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.getByLabel(dataTag_.label(), totalHtD); iEvent.getByLabel(emuTag_.label(), totalHtE); - isTotalEError=0; - isTotalHError=0; + isTotalEError=false; + isTotalHError=false; if(checkCollections(totalEtD, GCT_SUMS_QUANTA, "Total Et Data") && checkCollections(totalEtE, GCT_SUMS_QUANTA, "Total Et Emulator")) { plotTotalE(totalEtD, totalEtE); @@ -772,8 +772,8 @@ GctErrorAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu iEvent.getByLabel(dataTag_.label(), missingHtD); iEvent.getByLabel(emuTag_.label(), missingHtE); - isMissingEError=0; - isMissingHError=0; + isMissingEError=false; + isMissingHError=false; if(checkCollections(missingEtD, GCT_SUMS_QUANTA, "Missing Et Data") && checkCollections(missingEtE, GCT_SUMS_QUANTA, "Missing Et Emulator")) { plotMissingEt(missingEtD, missingEtE); @@ -1116,7 +1116,7 @@ GctErrorAnalyzer::checkCollections(const T &collection, const unsigned int &cons edm::LogWarning("DataNotFound") << " Could not find " << label << " label"; return false; } - if(collection->size() % constraint != 0 || collection->size() == 0) { + if(collection->size() % constraint != 0 || collection->empty()) { edm::LogWarning("CollectionSizeError") << " " << label << " collection size is " << collection->size() << ", expected multiple of " << constraint; return false; } diff --git a/L1Trigger/L1GctAnalyzer/src/compareBitCounts.cc b/L1Trigger/L1GctAnalyzer/src/compareBitCounts.cc index a018acaeab9e5..163a7c2fa4766 100644 --- a/L1Trigger/L1GctAnalyzer/src/compareBitCounts.cc +++ b/L1Trigger/L1GctAnalyzer/src/compareBitCounts.cc @@ -29,7 +29,7 @@ compareBitCounts::~compareBitCounts() { bool compareBitCounts::doCompare(TH1I *errorFlag_hist_) { - bool errorFlag=0; + bool errorFlag=false; for(unsigned int i=0;i < data_->size(); i++) { //check that we are looking at the triggered Bx in the data @@ -45,7 +45,7 @@ bool compareBitCounts::doCompare(TH1I *errorFlag_hist_) { errorFlag_hist_->Fill(0); //i.e. the two match } else { errorFlag_hist_->Fill(1); - errorFlag=1; + errorFlag=true; } } } diff --git a/L1Trigger/L1GctAnalyzer/src/compareRingSums.cc b/L1Trigger/L1GctAnalyzer/src/compareRingSums.cc index bfcf5d168d843..a59bf5556b555 100644 --- a/L1Trigger/L1GctAnalyzer/src/compareRingSums.cc +++ b/L1Trigger/L1GctAnalyzer/src/compareRingSums.cc @@ -29,7 +29,7 @@ compareRingSums::~compareRingSums() { bool compareRingSums::doCompare(TH1I *errorFlag_hist_) { - bool errorFlag=0; + bool errorFlag=false; for(unsigned int i=0; i < data_->size(); i++) { //check that the GCT trig bx is being considered @@ -45,7 +45,7 @@ bool compareRingSums::doCompare(TH1I *errorFlag_hist_) { errorFlag_hist_->Fill(0); //i.e. the two match } else { errorFlag_hist_->Fill(1); - errorFlag=1; + errorFlag=true; } } } diff --git a/L1Trigger/L1TCaloLayer1/plugins/L1TCaloLayer1Validator.cc b/L1Trigger/L1TCaloLayer1/plugins/L1TCaloLayer1Validator.cc index cbfd0acdccf89..b3cdee14b530a 100644 --- a/L1Trigger/L1TCaloLayer1/plugins/L1TCaloLayer1Validator.cc +++ b/L1Trigger/L1TCaloLayer1/plugins/L1TCaloLayer1Validator.cc @@ -47,15 +47,15 @@ using namespace l1t; class L1TCaloLayer1Validator : public edm::EDAnalyzer { public: explicit L1TCaloLayer1Validator(const edm::ParameterSet&); - ~L1TCaloLayer1Validator(); + ~L1TCaloLayer1Validator() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; //virtual void beginRun(edm::Run const&, edm::EventSetup const&) override; //virtual void endRun(edm::Run const&, edm::EventSetup const&) override; diff --git a/L1Trigger/L1TCaloLayer1/src/UCTCard.cc b/L1Trigger/L1TCaloLayer1/src/UCTCard.cc index 8797b82621839..f1748741456be 100644 --- a/L1Trigger/L1TCaloLayer1/src/UCTCard.cc +++ b/L1Trigger/L1TCaloLayer1/src/UCTCard.cc @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include "UCTCard.hh" #include "UCTRegion.hh" @@ -24,14 +24,14 @@ UCTCard::UCTCard(uint32_t crt, uint32_t crd, int fwv) : UCTCard::~UCTCard() { for(uint32_t i = 0; i < regions.size(); i++) { - if(regions[i] != 0) delete regions[i]; + if(regions[i] != nullptr) delete regions[i]; } } bool UCTCard::process() { cardSummary = 0; for(uint32_t i = 0; i < regions.size(); i++) { - if(regions[i] != 0) regions[i]->process(); + if(regions[i] != nullptr) regions[i]->process(); cardSummary += regions[i]->et(); } return true; diff --git a/L1Trigger/L1TCaloLayer1/src/UCTCrate.cc b/L1Trigger/L1TCaloLayer1/src/UCTCrate.cc index 464e3b4a3ff24..be5bca3b94bae 100644 --- a/L1Trigger/L1TCaloLayer1/src/UCTCrate.cc +++ b/L1Trigger/L1TCaloLayer1/src/UCTCrate.cc @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include "UCTCrate.hh" #include "UCTCard.hh" @@ -19,14 +19,14 @@ UCTCrate::UCTCrate(uint32_t crt, int fwv) : UCTCrate::~UCTCrate() { for(uint32_t i = 0; i < cards.size(); i++) { - if(cards[i] != 0) delete cards[i]; + if(cards[i] != nullptr) delete cards[i]; } } bool UCTCrate::process() { crateSummary = 0; for(uint32_t i = 0; i < cards.size(); i++) { - if(cards[i] != 0) { + if(cards[i] != nullptr) { cards[i]->process(); crateSummary += cards[i]->et(); } diff --git a/L1Trigger/L1TCaloLayer1/src/UCTGeometry.cc b/L1Trigger/L1TCaloLayer1/src/UCTGeometry.cc index 111f22d85765d..e08533069dae8 100644 --- a/L1Trigger/L1TCaloLayer1/src/UCTGeometry.cc +++ b/L1Trigger/L1TCaloLayer1/src/UCTGeometry.cc @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include "UCTGeometry.hh" #include "UCTLogging.hh" diff --git a/L1Trigger/L1TCaloLayer1/src/UCTLayer1.cc b/L1Trigger/L1TCaloLayer1/src/UCTLayer1.cc index aa19ecec7df7f..193a827df11f5 100644 --- a/L1Trigger/L1TCaloLayer1/src/UCTLayer1.cc +++ b/L1Trigger/L1TCaloLayer1/src/UCTLayer1.cc @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include "UCTLayer1.hh" @@ -25,20 +25,20 @@ UCTLayer1::UCTLayer1(int fwv) : uctSummary(0), fwVersion(fwv) { UCTLayer1::~UCTLayer1() { for(uint32_t i = 0; i < crates.size(); i++) { - if(crates[i] != 0) delete crates[i]; + if(crates[i] != nullptr) delete crates[i]; } } bool UCTLayer1::clearEvent() { for(uint32_t i = 0; i < crates.size(); i++) { - if(crates[i] != 0) crates[i]->clearEvent(); + if(crates[i] != nullptr) crates[i]->clearEvent(); } return true; } const UCTRegion* UCTLayer1::getRegion(int regionEtaIndex, uint32_t regionPhiIndex) const { if(regionEtaIndex == 0 || (uint32_t) std::abs(regionEtaIndex) > NRegionsInCard || regionPhiIndex >= MaxUCTRegionsPhi) { - return 0; + return nullptr; } // Get (0,0) tower region information UCTGeometry g; @@ -104,7 +104,7 @@ bool UCTLayer1::setHCALData(UCTTowerIndex t, uint32_t hcalFB, uint32_t hcalET) { bool UCTLayer1::process() { uctSummary = 0; for(uint32_t i = 0; i < crates.size(); i++) { - if(crates[i] != 0) { + if(crates[i] != nullptr) { crates[i]->process(); uctSummary += crates[i]->et(); } diff --git a/L1Trigger/L1TCaloLayer1/src/UCTRegion.cc b/L1Trigger/L1TCaloLayer1/src/UCTRegion.cc index 07e564923d431..bc1721ebd1748 100644 --- a/L1Trigger/L1TCaloLayer1/src/UCTRegion.cc +++ b/L1Trigger/L1TCaloLayer1/src/UCTRegion.cc @@ -1,6 +1,6 @@ #include -#include -#include +#include +#include #include using std::bitset; @@ -89,7 +89,7 @@ UCTRegion::UCTRegion(uint32_t crt, uint32_t crd, bool ne, uint32_t rgn, int fwv) UCTRegion::~UCTRegion() { for(uint32_t i = 0; i < towers.size(); i++) { - if(towers[i] != 0) delete towers[i]; + if(towers[i] != nullptr) delete towers[i]; } } diff --git a/L1Trigger/L1TCalorimeter/interface/AccumulatingSort.h b/L1Trigger/L1TCalorimeter/interface/AccumulatingSort.h index 92c6b6e3ed826..80dbe863aac1b 100644 --- a/L1Trigger/L1TCalorimeter/interface/AccumulatingSort.h +++ b/L1Trigger/L1TCalorimeter/interface/AccumulatingSort.h @@ -1,6 +1,6 @@ #include #include -#include +#include template < typename T > diff --git a/L1Trigger/L1TCalorimeter/interface/Cordic.h b/L1Trigger/L1TCalorimeter/interface/Cordic.h index c3b5d222f6a03..61d853b782d15 100644 --- a/L1Trigger/L1TCalorimeter/interface/Cordic.h +++ b/L1Trigger/L1TCalorimeter/interface/Cordic.h @@ -2,7 +2,7 @@ #define Cordic_H #include -#include +#include class Cordic { diff --git a/L1Trigger/L1TCalorimeter/interface/CordicXilinx.h b/L1Trigger/L1TCalorimeter/interface/CordicXilinx.h index 74c13c970d83d..bf71c178d5188 100644 --- a/L1Trigger/L1TCalorimeter/interface/CordicXilinx.h +++ b/L1Trigger/L1TCalorimeter/interface/CordicXilinx.h @@ -3,7 +3,7 @@ #include #include -#include +#include class CordicXilinx { diff --git a/L1Trigger/L1TCalorimeter/interface/L1GObject.h b/L1Trigger/L1TCalorimeter/interface/L1GObject.h index bf5f3d6f757cc..d60dc37ea5003 100644 --- a/L1Trigger/L1TCalorimeter/interface/L1GObject.h +++ b/L1Trigger/L1TCalorimeter/interface/L1GObject.h @@ -87,7 +87,7 @@ class L1GObject : public reco::LeafCandidate // Destructor - virtual ~L1GObject() {} + ~L1GObject() override {} // Access functions diff --git a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2EGammaAlgorithmImp.h b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2EGammaAlgorithmImp.h index e97030293d8f7..c4fbe627f9108 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2EGammaAlgorithmImp.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2EGammaAlgorithmImp.h @@ -26,11 +26,11 @@ namespace l1t { class Stage1Layer2EGammaAlgorithmImpPP : public Stage1Layer2EGammaAlgorithm { public: Stage1Layer2EGammaAlgorithmImpPP(CaloParamsHelper* params); - virtual ~Stage1Layer2EGammaAlgorithmImpPP(); - virtual void processEvent(const std::vector & EMCands, + ~Stage1Layer2EGammaAlgorithmImpPP() override; + void processEvent(const std::vector & EMCands, const std::vector & regions, const std::vector * jets, - std::vector* egammas); + std::vector* egammas) override; private: CaloParamsHelper* const params_; double Isolation(int ieta, int iphi, @@ -46,11 +46,11 @@ namespace l1t { class Stage1Layer2EGammaAlgorithmImpHI : public Stage1Layer2EGammaAlgorithm { public: Stage1Layer2EGammaAlgorithmImpHI(CaloParamsHelper* params); - virtual ~Stage1Layer2EGammaAlgorithmImpHI(); - virtual void processEvent(const std::vector & EMCands, + ~Stage1Layer2EGammaAlgorithmImpHI() override; + void processEvent(const std::vector & EMCands, const std::vector & regions, const std::vector * jets, - std::vector* egammas); + std::vector* egammas) override; private: CaloParamsHelper* const params_; double Isolation(int ieta, int iphi, @@ -66,11 +66,11 @@ namespace l1t { class Stage1Layer2EGammaAlgorithmImpHW : public Stage1Layer2EGammaAlgorithm { public: Stage1Layer2EGammaAlgorithmImpHW(CaloParamsHelper* params); - virtual ~Stage1Layer2EGammaAlgorithmImpHW(); - virtual void processEvent(const std::vector & EMCands, + ~Stage1Layer2EGammaAlgorithmImpHW() override; + void processEvent(const std::vector & EMCands, const std::vector & regions, const std::vector * jets, - std::vector* egammas); + std::vector* egammas) override; private: CaloParamsHelper* const params_; int AssociatedJetPt(int ieta, int iphi, diff --git a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2EtSumAlgorithmImp.h b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2EtSumAlgorithmImp.h index 69536060a9d0e..a60d84f0d1d06 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2EtSumAlgorithmImp.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2EtSumAlgorithmImp.h @@ -30,11 +30,11 @@ namespace l1t { class Stage1Layer2EtSumAlgorithmImpPP : public Stage1Layer2EtSumAlgorithm { public: Stage1Layer2EtSumAlgorithmImpPP(CaloParamsHelper* params); - virtual ~Stage1Layer2EtSumAlgorithmImpPP(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2EtSumAlgorithmImpPP() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, const std::vector * jets, - std::vector * sums); + std::vector * sums) override; private: CaloParamsHelper* const params_; @@ -49,11 +49,11 @@ namespace l1t { class Stage1Layer2EtSumAlgorithmImpHW : public Stage1Layer2EtSumAlgorithm { public: Stage1Layer2EtSumAlgorithmImpHW(CaloParamsHelper* params); - virtual ~Stage1Layer2EtSumAlgorithmImpHW(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2EtSumAlgorithmImpHW() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, const std::vector * jets, - std::vector * sums); + std::vector * sums) override; private: CaloParamsHelper* const params_; @@ -88,11 +88,11 @@ namespace l1t { class Stage1Layer2EtSumAlgorithmImpHI : public Stage1Layer2EtSumAlgorithm { public: Stage1Layer2EtSumAlgorithmImpHI(CaloParamsHelper* params); - virtual ~Stage1Layer2EtSumAlgorithmImpHI(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2EtSumAlgorithmImpHI() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, const std::vector * jets, - std::vector * sums); + std::vector * sums) override; private: CaloParamsHelper* const params_; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2HFBitCountAlgorithmImp.h b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2HFBitCountAlgorithmImp.h index 27264b25d7efc..8cf4d9d62c7f2 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2HFBitCountAlgorithmImp.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2HFBitCountAlgorithmImp.h @@ -27,10 +27,10 @@ namespace l1t { class Stage1Layer2HFMinimumBias : public Stage1Layer2HFBitCountAlgorithm { public: Stage1Layer2HFMinimumBias(CaloParamsHelper* params); - virtual ~Stage1Layer2HFMinimumBias(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2HFMinimumBias() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, - l1t::CaloSpare * spare); + l1t::CaloSpare * spare) override; private: CaloParamsHelper* params_; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2HFRingSumAlgorithmImp.h b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2HFRingSumAlgorithmImp.h index 6f2cd696ef624..aa33ac8fe6d54 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2HFRingSumAlgorithmImp.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2HFRingSumAlgorithmImp.h @@ -27,11 +27,11 @@ namespace l1t { class Stage1Layer2FlowAlgorithm : public Stage1Layer2HFRingSumAlgorithm { public: Stage1Layer2FlowAlgorithm(CaloParamsHelper* params); - virtual ~Stage1Layer2FlowAlgorithm(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2FlowAlgorithm() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, const std::vector * taus, - l1t::CaloSpare * spare); + l1t::CaloSpare * spare) override; private: CaloParamsHelper* params_; @@ -42,11 +42,11 @@ namespace l1t { class Stage1Layer2CentralityAlgorithm : public Stage1Layer2HFRingSumAlgorithm { public: Stage1Layer2CentralityAlgorithm(CaloParamsHelper* params); - virtual ~Stage1Layer2CentralityAlgorithm(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2CentralityAlgorithm() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, const std::vector * taus, - l1t::CaloSpare * spare); + l1t::CaloSpare * spare) override; private: CaloParamsHelper *params_; @@ -56,11 +56,11 @@ namespace l1t { class Stage1Layer2DiTauAlgorithm : public Stage1Layer2HFRingSumAlgorithm { public: Stage1Layer2DiTauAlgorithm(CaloParamsHelper* params); - virtual ~Stage1Layer2DiTauAlgorithm(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2DiTauAlgorithm() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, const std::vector * taus, - l1t::CaloSpare * spare); + l1t::CaloSpare * spare) override; private: CaloParamsHelper* params_; }; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2JetAlgorithmImp.h b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2JetAlgorithmImp.h index 257d4db68aad1..e60dac3f9ef33 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2JetAlgorithmImp.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2JetAlgorithmImp.h @@ -27,11 +27,11 @@ namespace l1t { class Stage1Layer2JetAlgorithmImpHI : public Stage1Layer2JetAlgorithm { public: Stage1Layer2JetAlgorithmImpHI(CaloParamsHelper* params); - virtual ~Stage1Layer2JetAlgorithmImpHI(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2JetAlgorithmImpHI() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, std::vector * jets, - std::vector * preGtJets); + std::vector * preGtJets) override; private: CaloParamsHelper* const params_; //double regionLSB_; @@ -40,11 +40,11 @@ namespace l1t { class Stage1Layer2JetAlgorithmImpPP : public Stage1Layer2JetAlgorithm { public: Stage1Layer2JetAlgorithmImpPP(CaloParamsHelper* params); - virtual ~Stage1Layer2JetAlgorithmImpPP(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2JetAlgorithmImpPP() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, std::vector * jets, - std::vector * preGtJets); + std::vector * preGtJets) override; private: CaloParamsHelper* const params_; //double regionLSB_; @@ -53,11 +53,11 @@ namespace l1t { class Stage1Layer2JetAlgorithmImpSimpleHW : public Stage1Layer2JetAlgorithm { public: Stage1Layer2JetAlgorithmImpSimpleHW(CaloParamsHelper* params); - virtual ~Stage1Layer2JetAlgorithmImpSimpleHW(); - virtual void processEvent(const std::vector & regions, + ~Stage1Layer2JetAlgorithmImpSimpleHW() override; + void processEvent(const std::vector & regions, const std::vector & EMCands, std::vector * jets, - std::vector * preGtJets); + std::vector * preGtJets) override; private: CaloParamsHelper* const params_; //double regionLSB_; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2MainProcessorFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2MainProcessorFirmware.h index a5f2fab02b7c9..a88df4b2f447a 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2MainProcessorFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2MainProcessorFirmware.h @@ -30,8 +30,8 @@ namespace l1t { public: //Stage1Layer2MainProcessorFirmwareImp1(const FirmwareVersion & fwv /*const CaloParamsHelper & dbPars*/); Stage1Layer2MainProcessorFirmwareImp1(const int fwv , CaloParamsHelper* dbPars); - virtual ~Stage1Layer2MainProcessorFirmwareImp1(); - virtual void processEvent(const std::vector &, + ~Stage1Layer2MainProcessorFirmwareImp1() override; + void processEvent(const std::vector &, const std::vector &, std::vector * egammas, std::vector * taus, @@ -40,7 +40,7 @@ namespace l1t { std::vector * preGtJets, std::vector * etsums, CaloSpare * hfSums, - CaloSpare * hfCounts); + CaloSpare * hfCounts) override; private: int m_fwv; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2TauAlgorithmImp.h b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2TauAlgorithmImp.h index 6c33c63556890..5d54527e2c045 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage1Layer2TauAlgorithmImp.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage1Layer2TauAlgorithmImp.h @@ -15,11 +15,11 @@ namespace l1t { class Stage1Layer2SingleTrackHI : public Stage1Layer2TauAlgorithm { public: Stage1Layer2SingleTrackHI(CaloParamsHelper* params); - virtual ~Stage1Layer2SingleTrackHI(); - virtual void processEvent(const std::vector & clusters, + ~Stage1Layer2SingleTrackHI() override; + void processEvent(const std::vector & clusters, const std::vector & regions, std::vector * isoTaus, - std::vector * taus); + std::vector * taus) override; private: CaloParamsHelper* const params_; @@ -29,11 +29,11 @@ namespace l1t { class Stage1Layer2TauAlgorithmImpPP : public Stage1Layer2TauAlgorithm { public: Stage1Layer2TauAlgorithmImpPP(CaloParamsHelper* params); - virtual ~Stage1Layer2TauAlgorithmImpPP(); - virtual void processEvent(const std::vector & EMCands, + ~Stage1Layer2TauAlgorithmImpPP() override; + void processEvent(const std::vector & EMCands, const std::vector & regions, std::vector * isoTaus, - std::vector * taus); + std::vector * taus) override; private: @@ -54,11 +54,11 @@ namespace l1t { class Stage1Layer2TauAlgorithmImpHW : public Stage1Layer2TauAlgorithm { public: Stage1Layer2TauAlgorithmImpHW(CaloParamsHelper* params); - virtual ~Stage1Layer2TauAlgorithmImpHW(); - virtual void processEvent(const std::vector & EMCands, + ~Stage1Layer2TauAlgorithmImpHW() override; + void processEvent(const std::vector & EMCands, const std::vector & regions, std::vector * isoTaus, - std::vector * taus); + std::vector * taus) override; private: diff --git a/L1Trigger/L1TCalorimeter/interface/Stage1TauIsolationLUT.h b/L1Trigger/L1TCalorimeter/interface/Stage1TauIsolationLUT.h index 8c0b856d7a39e..1ae3e79d3dd96 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage1TauIsolationLUT.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage1TauIsolationLUT.h @@ -11,7 +11,7 @@ #define LUT_VERSION 1 // bump up the version number is any of the above is changed or if the relative tau iso algo is changed #include -#include +#include #include "L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h" namespace l1t { diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2ClusterAlgorithmFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2ClusterAlgorithmFirmware.h index c6dc4a948523a..49f27efb2a44d 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2ClusterAlgorithmFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2ClusterAlgorithmFirmware.h @@ -31,8 +31,8 @@ namespace l1t }; Stage2Layer2ClusterAlgorithmFirmwareImp1(CaloParamsHelper* params, ClusterInput clusterInput); - virtual ~Stage2Layer2ClusterAlgorithmFirmwareImp1(); - virtual void processEvent(const std::vector& towers, std::vector& clusters); + ~Stage2Layer2ClusterAlgorithmFirmwareImp1() override; + void processEvent(const std::vector& towers, std::vector& clusters) override; private: void clustering(const std::vector& towers, std::vector& clusters); diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxEGAlgoFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxEGAlgoFirmware.h index ce1ffd6221bf4..94eb8116c35e1 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxEGAlgoFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxEGAlgoFirmware.h @@ -22,9 +22,9 @@ namespace l1t { class Stage2Layer2DemuxEGAlgoFirmwareImp1 : public Stage2Layer2DemuxEGAlgo { public: Stage2Layer2DemuxEGAlgoFirmwareImp1(CaloParamsHelper* params); //const CaloMainProcessorParams & dbPars); - virtual ~Stage2Layer2DemuxEGAlgoFirmwareImp1(); - virtual void processEvent(const std::vector & inputEgammas, - std::vector & outputEgammas); + ~Stage2Layer2DemuxEGAlgoFirmwareImp1() override; + void processEvent(const std::vector & inputEgammas, + std::vector & outputEgammas) override; private: diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxJetAlgoFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxJetAlgoFirmware.h index 12b5e1b894892..7ac87fac7bbc2 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxJetAlgoFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxJetAlgoFirmware.h @@ -22,9 +22,9 @@ namespace l1t { class Stage2Layer2DemuxJetAlgoFirmwareImp1 : public Stage2Layer2DemuxJetAlgo { public: Stage2Layer2DemuxJetAlgoFirmwareImp1(CaloParamsHelper* params); - virtual ~Stage2Layer2DemuxJetAlgoFirmwareImp1(); - virtual void processEvent(const std::vector & inputJets, - std::vector & outputJets); + ~Stage2Layer2DemuxJetAlgoFirmwareImp1() override; + void processEvent(const std::vector & inputJets, + std::vector & outputJets) override; private: diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxSumsAlgoFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxSumsAlgoFirmware.h index 50820b292a463..2e11a1ef03b5e 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxSumsAlgoFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxSumsAlgoFirmware.h @@ -23,9 +23,9 @@ namespace l1t { class Stage2Layer2DemuxSumsAlgoFirmwareImp1 : public Stage2Layer2DemuxSumsAlgo { public: Stage2Layer2DemuxSumsAlgoFirmwareImp1(CaloParamsHelper* params); - virtual ~Stage2Layer2DemuxSumsAlgoFirmwareImp1(); - virtual void processEvent(const std::vector & inputSums, - std::vector & outputSums); + ~Stage2Layer2DemuxSumsAlgoFirmwareImp1() override; + void processEvent(const std::vector & inputSums, + std::vector & outputSums) override; private: CaloParamsHelper* params_; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxTauAlgoFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxTauAlgoFirmware.h index 3ba9fc43c7805..b4e3c20821f31 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxTauAlgoFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2DemuxTauAlgoFirmware.h @@ -22,9 +22,9 @@ namespace l1t { class Stage2Layer2DemuxTauAlgoFirmwareImp1 : public Stage2Layer2DemuxTauAlgo { public: Stage2Layer2DemuxTauAlgoFirmwareImp1(CaloParamsHelper* params); //const CaloMainProcessorParams & dbPars); - virtual ~Stage2Layer2DemuxTauAlgoFirmwareImp1(); - virtual void processEvent(const std::vector & inputTaus, - std::vector & outputTaus); + ~Stage2Layer2DemuxTauAlgoFirmwareImp1() override; + void processEvent(const std::vector & inputTaus, + std::vector & outputTaus) override; private: diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2EGammaAlgorithmFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2EGammaAlgorithmFirmware.h index 0122900c9da17..b67a579fd7154 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2EGammaAlgorithmFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2EGammaAlgorithmFirmware.h @@ -24,8 +24,8 @@ namespace l1t { public: Stage2Layer2EGammaAlgorithmFirmwareImp1(CaloParamsHelper* params); //const CaloMainProcessorParams & dbPars); - virtual ~Stage2Layer2EGammaAlgorithmFirmwareImp1(); - virtual void processEvent(const std::vector& clusters, const std::vector& towers, std::vector& egammas); + ~Stage2Layer2EGammaAlgorithmFirmwareImp1() override; + void processEvent(const std::vector& clusters, const std::vector& towers, std::vector& egammas) override; private: // trimming diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2EtSumAlgorithmFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2EtSumAlgorithmFirmware.h index 3847a1499eb71..9f025879d31e4 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2EtSumAlgorithmFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2EtSumAlgorithmFirmware.h @@ -22,9 +22,9 @@ namespace l1t { class Stage2Layer2EtSumAlgorithmFirmwareImp1 : public Stage2Layer2EtSumAlgorithm { public: Stage2Layer2EtSumAlgorithmFirmwareImp1(CaloParamsHelper* params); - virtual ~Stage2Layer2EtSumAlgorithmFirmwareImp1(); - virtual void processEvent(const std::vector & towers, - std::vector & sums); + ~Stage2Layer2EtSumAlgorithmFirmwareImp1() override; + void processEvent(const std::vector & towers, + std::vector & sums) override; private: CaloParamsHelper* params_; int32_t towEtMetThresh_; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2JetAlgorithmFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2JetAlgorithmFirmware.h index 5d1b2f08fa8e8..cae42d257d477 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2JetAlgorithmFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2JetAlgorithmFirmware.h @@ -22,9 +22,9 @@ namespace l1t { class Stage2Layer2JetAlgorithmFirmwareImp1 : public Stage2Layer2JetAlgorithm { public: Stage2Layer2JetAlgorithmFirmwareImp1(CaloParamsHelper* params); - virtual ~Stage2Layer2JetAlgorithmFirmwareImp1(); - virtual void processEvent(const std::vector & towers, - std::vector & jets, std::vector & alljets); + ~Stage2Layer2JetAlgorithmFirmwareImp1() override; + void processEvent(const std::vector & towers, + std::vector & jets, std::vector & alljets) override; void create(const std::vector & towers, std::vector & jets, std::vector & alljets, std::string PUSubMethod); diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2JetSumAlgorithmFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2JetSumAlgorithmFirmware.h index 84e722bab7a98..e62ab749a2b33 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2JetSumAlgorithmFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2JetSumAlgorithmFirmware.h @@ -22,9 +22,9 @@ namespace l1t { class Stage2Layer2JetSumAlgorithmFirmwareImp1 : public Stage2Layer2JetSumAlgorithm { public: Stage2Layer2JetSumAlgorithmFirmwareImp1(CaloParamsHelper* params); - virtual ~Stage2Layer2JetSumAlgorithmFirmwareImp1(); - virtual void processEvent(const std::vector & alljets, - std::vector & htsums); + ~Stage2Layer2JetSumAlgorithmFirmwareImp1() override; + void processEvent(const std::vector & alljets, + std::vector & htsums) override; private: CaloParamsHelper* params_; int32_t mhtJetThresholdHw_; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2TauAlgorithmFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2TauAlgorithmFirmware.h index 98defa5fd7cfb..c74a46936f3d1 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2Layer2TauAlgorithmFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2Layer2TauAlgorithmFirmware.h @@ -24,10 +24,10 @@ namespace l1t { class Stage2Layer2TauAlgorithmFirmwareImp1 : public Stage2Layer2TauAlgorithm { public: Stage2Layer2TauAlgorithmFirmwareImp1(CaloParamsHelper* params); //const CaloMainProcessorParams & dbPars); - virtual ~Stage2Layer2TauAlgorithmFirmwareImp1(); - virtual void processEvent(const std::vector & clusters, + ~Stage2Layer2TauAlgorithmFirmwareImp1() override; + void processEvent(const std::vector & clusters, const std::vector& towers, - std::vector & taus); + std::vector & taus) override; private: void merging(const std::vector& clusters, const std::vector& towers, std::vector& taus); void dosorting(std::vector& taus); diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2MainProcessorFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2MainProcessorFirmware.h index 6dde2db2bdcfe..7c80ef6c7b1db 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2MainProcessorFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2MainProcessorFirmware.h @@ -36,9 +36,9 @@ namespace l1t { public: Stage2MainProcessorFirmwareImp1(unsigned fwv, CaloParamsHelper* params); - virtual ~Stage2MainProcessorFirmwareImp1(); + ~Stage2MainProcessorFirmwareImp1() override; - virtual void processEvent(const std::vector & inTowers, + void processEvent(const std::vector & inTowers, std::vector & outTowers, std::vector & clusters, std::vector & mpEGammas, @@ -48,7 +48,7 @@ namespace l1t { std::vector & egammas, std::vector & taus, std::vector & jets, - std::vector & etSums); + std::vector & etSums) override; void print(std::ostream&) const; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2PreProcessorFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2PreProcessorFirmware.h index 7a4d1ddaa2d7a..77097a8647eaf 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2PreProcessorFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2PreProcessorFirmware.h @@ -24,10 +24,10 @@ namespace l1t { public: Stage2PreProcessorFirmwareImp1(unsigned fwv, CaloParamsHelper* params); - virtual ~Stage2PreProcessorFirmwareImp1(); + ~Stage2PreProcessorFirmwareImp1() override; - virtual void processEvent(const std::vector & inTowers, - std::vector & outTowers); + void processEvent(const std::vector & inTowers, + std::vector & outTowers) override; void print(std::ostream&) const; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2TowerCompressAlgorithmFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2TowerCompressAlgorithmFirmware.h index dcecc3b810338..63b9406a0fec1 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2TowerCompressAlgorithmFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2TowerCompressAlgorithmFirmware.h @@ -22,9 +22,9 @@ namespace l1t { class Stage2TowerCompressAlgorithmFirmwareImp1 : public Stage2TowerCompressAlgorithm { public: Stage2TowerCompressAlgorithmFirmwareImp1(CaloParamsHelper* params); - virtual ~Stage2TowerCompressAlgorithmFirmwareImp1(); - virtual void processEvent(const std::vector & inTowers, - std::vector & outTowers); + ~Stage2TowerCompressAlgorithmFirmwareImp1() override; + void processEvent(const std::vector & inTowers, + std::vector & outTowers) override; private: CaloParamsHelper* params_; diff --git a/L1Trigger/L1TCalorimeter/interface/Stage2TowerDecompressAlgorithmFirmware.h b/L1Trigger/L1TCalorimeter/interface/Stage2TowerDecompressAlgorithmFirmware.h index 3bc9c974dc3b1..1e7dcbd2bcedf 100644 --- a/L1Trigger/L1TCalorimeter/interface/Stage2TowerDecompressAlgorithmFirmware.h +++ b/L1Trigger/L1TCalorimeter/interface/Stage2TowerDecompressAlgorithmFirmware.h @@ -22,9 +22,9 @@ namespace l1t { class Stage2TowerDecompressAlgorithmFirmwareImp1 : public Stage2TowerDecompressAlgorithm { public: Stage2TowerDecompressAlgorithmFirmwareImp1(CaloParamsHelper* params); - virtual ~Stage2TowerDecompressAlgorithmFirmwareImp1(); - virtual void processEvent(const std::vector & inTowers, - std::vector & outTowers); + ~Stage2TowerDecompressAlgorithmFirmwareImp1() override; + void processEvent(const std::vector & inTowers, + std::vector & outTowers) override; private: CaloParamsHelper* params_; diff --git a/L1Trigger/L1TCalorimeter/plugins/CaloConfigWriter.cc b/L1Trigger/L1TCalorimeter/plugins/CaloConfigWriter.cc index db3adaaf8f271..145e4fabe121b 100644 --- a/L1Trigger/L1TCalorimeter/plugins/CaloConfigWriter.cc +++ b/L1Trigger/L1TCalorimeter/plugins/CaloConfigWriter.cc @@ -31,8 +31,8 @@ class CaloConfigWriter : public edm::EDAnalyzer { public: explicit CaloConfigWriter(const edm::ParameterSet&) {} - virtual ~CaloConfigWriter() {} - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~CaloConfigWriter() override {} + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1Trigger/L1TCalorimeter/plugins/CaloParamsWriter.cc b/L1Trigger/L1TCalorimeter/plugins/CaloParamsWriter.cc index d0d2b965e21ae..d218798e0c24d 100644 --- a/L1Trigger/L1TCalorimeter/plugins/CaloParamsWriter.cc +++ b/L1Trigger/L1TCalorimeter/plugins/CaloParamsWriter.cc @@ -31,8 +31,8 @@ class CaloParamsWriter : public edm::EDAnalyzer { public: explicit CaloParamsWriter(const edm::ParameterSet&) {} - virtual ~CaloParamsWriter() {} - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~CaloParamsWriter() override {} + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TCaloConfigESProducer.cc b/L1Trigger/L1TCalorimeter/plugins/L1TCaloConfigESProducer.cc index ab3e2ad70b8a7..ab1b1ed532513 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TCaloConfigESProducer.cc +++ b/L1Trigger/L1TCalorimeter/plugins/L1TCaloConfigESProducer.cc @@ -37,7 +37,7 @@ using namespace l1t; class L1TCaloConfigESProducer : public edm::ESProducer { public: L1TCaloConfigESProducer(const edm::ParameterSet&); - ~L1TCaloConfigESProducer(); + ~L1TCaloConfigESProducer() override; typedef std::shared_ptr ReturnType; diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TCaloParamsESProducer.cc b/L1Trigger/L1TCalorimeter/plugins/L1TCaloParamsESProducer.cc index 067b6535ab032..3e0d4b304e981 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TCaloParamsESProducer.cc +++ b/L1Trigger/L1TCalorimeter/plugins/L1TCaloParamsESProducer.cc @@ -44,7 +44,7 @@ using namespace l1t; class L1TCaloParamsESProducer : public edm::ESProducer { public: L1TCaloParamsESProducer(const edm::ParameterSet&); - ~L1TCaloParamsESProducer(); + ~L1TCaloParamsESProducer() override; typedef std::shared_ptr ReturnType; diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TCaloParamsWriter.cc b/L1Trigger/L1TCalorimeter/plugins/L1TCaloParamsWriter.cc index 70945b1c0a3ff..72f4178fe5bf9 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TCaloParamsWriter.cc +++ b/L1Trigger/L1TCalorimeter/plugins/L1TCaloParamsWriter.cc @@ -31,8 +31,8 @@ class L1TCaloParamsWriter : public edm::EDAnalyzer { public: explicit L1TCaloParamsWriter(const edm::ParameterSet&) {} - virtual ~L1TCaloParamsWriter() {} - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~L1TCaloParamsWriter() override {} + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TCaloRCTToUpgradeConverter.h b/L1Trigger/L1TCalorimeter/plugins/L1TCaloRCTToUpgradeConverter.h index c697613a657d3..46dd6e0be24bf 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TCaloRCTToUpgradeConverter.h +++ b/L1Trigger/L1TCalorimeter/plugins/L1TCaloRCTToUpgradeConverter.h @@ -47,14 +47,14 @@ namespace l1t { class L1TCaloRCTToUpgradeConverter : public edm::EDProducer { public: explicit L1TCaloRCTToUpgradeConverter(const edm::ParameterSet& ps); - ~L1TCaloRCTToUpgradeConverter(); + ~L1TCaloRCTToUpgradeConverter() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) ; private: - virtual void beginJob() override; - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override; //virtual void beginRun(edm::Run const&, edm::EventSetup const&) override; //virtual void endRun(edm::Run const&, edm::EventSetup const&) override; diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TCaloStage1LutWriter.cc b/L1Trigger/L1TCalorimeter/plugins/L1TCaloStage1LutWriter.cc index 0e2010cae5fa1..4e2076e51a2f2 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TCaloStage1LutWriter.cc +++ b/L1Trigger/L1TCalorimeter/plugins/L1TCaloStage1LutWriter.cc @@ -28,7 +28,7 @@ namespace l1t { class L1TCaloStage1LutWriter : public edm::EDAnalyzer { public: explicit L1TCaloStage1LutWriter(const edm::ParameterSet&); - ~L1TCaloStage1LutWriter(); + ~L1TCaloStage1LutWriter() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); @@ -36,9 +36,9 @@ class L1TCaloStage1LutWriter : public edm::EDAnalyzer { bool openOutputFile(const std::string& fileName, std::ofstream& file); private: - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; CaloParamsHelper* m_params; std::string m_conditionsLabel; diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TCaloUpgradeToGCTConverter.h b/L1Trigger/L1TCalorimeter/plugins/L1TCaloUpgradeToGCTConverter.h index 7576e51eb6128..6233573cc501e 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TCaloUpgradeToGCTConverter.h +++ b/L1Trigger/L1TCalorimeter/plugins/L1TCaloUpgradeToGCTConverter.h @@ -54,7 +54,7 @@ class L1TCaloUpgradeToGCTConverter : public edm::global::EDProducer<> { static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void produce(edm::StreamID, edm::Event&, edm::EventSetup const&) const override; + void produce(edm::StreamID, edm::Event&, edm::EventSetup const&) const override; const edm::EDGetToken EGammaToken_; const edm::EDGetToken RlxTauToken_; diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TPhysicalEtAdder.h b/L1Trigger/L1TCalorimeter/plugins/L1TPhysicalEtAdder.h index 1a01da57ad2e7..fcf9a9e91b9fe 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TPhysicalEtAdder.h +++ b/L1Trigger/L1TCalorimeter/plugins/L1TPhysicalEtAdder.h @@ -38,12 +38,12 @@ class L1TPhysicalEtAdder : public edm::global::EDProducer<> { public: explicit L1TPhysicalEtAdder(const edm::ParameterSet& ps); - ~L1TPhysicalEtAdder(); + ~L1TPhysicalEtAdder() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; // ----------member data --------------------------- diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TStage1Layer2Producer.cc b/L1Trigger/L1TCalorimeter/plugins/L1TStage1Layer2Producer.cc index 2d7e90d3c1c56..1bcb0bac45769 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TStage1Layer2Producer.cc +++ b/L1Trigger/L1TCalorimeter/plugins/L1TStage1Layer2Producer.cc @@ -70,16 +70,16 @@ using namespace l1t; class L1TStage1Layer2Producer : public EDProducer { public: explicit L1TStage1Layer2Producer(const ParameterSet&); - ~L1TStage1Layer2Producer(); + ~L1TStage1Layer2Producer() override; static void fillDescriptions(ConfigurationDescriptions& descriptions); private: - virtual void produce(Event&, EventSetup const&); - virtual void beginJob(); - virtual void endJob(); - virtual void beginRun(Run const&iR, EventSetup const&iE); - virtual void endRun(Run const& iR, EventSetup const& iE); + void produce(Event&, EventSetup const&) override; + void beginJob() override; + void endJob() override; + void beginRun(Run const&iR, EventSetup const&iE) override; + void endRun(Run const& iR, EventSetup const& iE) override; // ----------member data --------------------------- unsigned long long m_paramsCacheId; // Cache-ID from current parameters, to check if needs to be updated. diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TStage2CaloAnalyzer.cc b/L1Trigger/L1TCalorimeter/plugins/L1TStage2CaloAnalyzer.cc index 1673d87efeb78..5d41a01255c2c 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TStage2CaloAnalyzer.cc +++ b/L1Trigger/L1TCalorimeter/plugins/L1TStage2CaloAnalyzer.cc @@ -29,15 +29,15 @@ namespace l1t { class L1TStage2CaloAnalyzer : public edm::EDAnalyzer { public: explicit L1TStage2CaloAnalyzer(const edm::ParameterSet&); - ~L1TStage2CaloAnalyzer(); + ~L1TStage2CaloAnalyzer() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; //virtual void beginRun(edm::Run const&, edm::EventSetup const&) override; //virtual void endRun(edm::Run const&, edm::EventSetup const&) override; @@ -474,7 +474,7 @@ namespace l1t { } - if (thejets_poseta.size()) { + if (!thejets_poseta.empty()) { for (unsigned int i=0; iFill(thejets_poseta.at(i).hwPt()-thejets_poseta.at(j).hwPt()); @@ -482,7 +482,7 @@ namespace l1t { } } - if (thejets_negeta.size()) { + if (!thejets_negeta.empty()) { for (unsigned int i=0; iFill(thejets_negeta.at(i).hwPt()-thejets_negeta.at(j).hwPt()); @@ -615,7 +615,7 @@ namespace l1t { } - if (thejets.size()) { + if (!thejets.empty()) { for (unsigned int i=0; iFill(thejets.at(i).hwPt()-thejets.at(j).hwPt()); diff --git a/L1Trigger/L1TCalorimeter/plugins/L1TStage2InputPatternWriter.cc b/L1Trigger/L1TCalorimeter/plugins/L1TStage2InputPatternWriter.cc index ebb95c3d24e94..ddf098b5cc5b7 100644 --- a/L1Trigger/L1TCalorimeter/plugins/L1TStage2InputPatternWriter.cc +++ b/L1Trigger/L1TCalorimeter/plugins/L1TStage2InputPatternWriter.cc @@ -39,7 +39,7 @@ #include #include #include -#include +#include // // class declaration @@ -48,15 +48,15 @@ class L1TStage2InputPatternWriter : public edm::EDAnalyzer { public: explicit L1TStage2InputPatternWriter(const edm::ParameterSet&); - ~L1TStage2InputPatternWriter(); + ~L1TStage2InputPatternWriter() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; //virtual void beginRun(edm::Run const&, edm::EventSetup const&) override; //virtual void endRun(edm::Run const&, edm::EventSetup const&) override; diff --git a/L1Trigger/L1TCalorimeter/src/L1RecoMatch.cc b/L1Trigger/L1TCalorimeter/src/L1RecoMatch.cc index 76c61ca1b6b6f..25d55f5db2715 100644 --- a/L1Trigger/L1TCalorimeter/src/L1RecoMatch.cc +++ b/L1Trigger/L1TCalorimeter/src/L1RecoMatch.cc @@ -19,11 +19,11 @@ const reco::Candidate* L1RecoMatch::l1g() const { } bool L1RecoMatch::l1Match() const { - return l1extra_ != NULL; + return l1extra_ != nullptr; } bool L1RecoMatch::l1gMatch() const { - return l1g_ != NULL; + return l1g_ != nullptr; } const edm::EventID& L1RecoMatch::id() const { diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Cordic.cc b/L1Trigger/L1TCalorimeter/src/firmware/Cordic.cc index cafb1f79093ac..30ada37f90fe5 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Cordic.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Cordic.cc @@ -1,7 +1,7 @@ #include "L1Trigger/L1TCalorimeter/interface/Cordic.h" -#include -#include +#include +#include #include #include #include diff --git a/L1Trigger/L1TCalorimeter/src/firmware/CordicXilinx.cc b/L1Trigger/L1TCalorimeter/src/firmware/CordicXilinx.cc index 024e3033f672b..f260136f66ad5 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/CordicXilinx.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/CordicXilinx.cc @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include CordicXilinx::CordicXilinx(int inputBits, int outputBits, bool debug) : diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2DiTauAlgorithm.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2DiTauAlgorithm.cc index a31b1b9247954..845cc30b18dbe 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2DiTauAlgorithm.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2DiTauAlgorithm.cc @@ -36,7 +36,7 @@ void l1t::Stage1Layer2DiTauAlgorithm::processEvent(const std::vectorsize()>0) { + if(!isoTaus->empty()) { isoPtMax= (*isoTaus).at(0).hwPt(); if (isoTaus->size()>1) diIsoPtMax = (*isoTaus).at(1).hwPt(); if (isoTaus->size()>2) triIsoPtMax = (*isoTaus).at(2).hwPt(); diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2MainProcessorFirmwareImp1.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2MainProcessorFirmwareImp1.cc index 235597ca5cab1..8f68446f4bc81 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2MainProcessorFirmwareImp1.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage1Layer2MainProcessorFirmwareImp1.cc @@ -37,7 +37,7 @@ Stage1Layer2MainProcessorFirmwareImp1::Stage1Layer2MainProcessorFirmwareImp1(con m_jetAlgo = new Stage1Layer2JetAlgorithmImpPP(m_db); //fwv =2 => PP algo m_tauAlgo = new Stage1Layer2TauAlgorithmImpPP(m_db); m_hfRingAlgo = new Stage1Layer2DiTauAlgorithm(m_db); - m_hfBitAlgo = NULL; + m_hfBitAlgo = nullptr; } else if ( m_fwv == 3 ) { // hw testing algorithms diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2DemuxSumsAlgoFirmwareImp1.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2DemuxSumsAlgoFirmwareImp1.cc index 243a1a87ef2be..fdbe05dc54b0c 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2DemuxSumsAlgoFirmwareImp1.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2DemuxSumsAlgoFirmwareImp1.cc @@ -34,7 +34,7 @@ void l1t::Stage2Layer2DemuxSumsAlgoFirmwareImp1::processEvent(const std::vector< unsigned int mbp0(0), mbm0(0), mbp1(0), mbm1(0); unsigned int ntow(0); - bool metSat(0), metHFSat(0), mhtSat(0), mhtHFSat(0); + bool metSat(false), metHFSat(false), mhtSat(false), mhtHFSat(false); // Add up the x, y and scalar components for (auto&& eSum : inputSums) diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EGammaAlgorithmFirmwareImp1.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EGammaAlgorithmFirmwareImp1.cc index 6757add93f15c..002bed9a026c4 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EGammaAlgorithmFirmwareImp1.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EGammaAlgorithmFirmwareImp1.cc @@ -503,7 +503,7 @@ unsigned int l1t::Stage2Layer2EGammaAlgorithmFirmwareImp1::trimmingLutIndex(unsi unsigned int l1t::Stage2Layer2EGammaAlgorithmFirmwareImp1::returnShape(const l1t::CaloCluster& clus) /*****************************************************************/ { - l1t::CaloCluster clusCopy = clus; + const l1t::CaloCluster& clusCopy = clus; unsigned int shape = 0; if( (clus.checkClusterFlag(CaloCluster::INCLUDE_N)) ) shape |= (0x1); diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EtSumAlgorithmFirmwareImp1.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EtSumAlgorithmFirmwareImp1.cc index 1704fd3e5f959..7c03d5d668294 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EtSumAlgorithmFirmwareImp1.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2EtSumAlgorithmFirmwareImp1.cc @@ -9,7 +9,7 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "L1Trigger/L1TCalorimeter/interface/Stage2Layer2EtSumAlgorithmFirmware.h" #include "L1Trigger/L1TCalorimeter/interface/CaloTools.h" -#include +#include l1t::Stage2Layer2EtSumAlgorithmFirmwareImp1::Stage2Layer2EtSumAlgorithmFirmwareImp1(CaloParamsHelper* params) : @@ -49,7 +49,7 @@ void l1t::Stage2Layer2EtSumAlgorithmFirmwareImp1::processEvent(const std::vector int etem(0); unsigned int mb0(0), mb1(0); - bool ettSat(0), ettHFSat(0), ecalEtSat(0), metSat(0), metHFSat(0); + bool ettSat(false), ettHFSat(false), ecalEtSat(false), metSat(false), metHFSat(false); for (unsigned absieta=1; absieta<=(unsigned int)CaloTools::mpEta(CaloTools::kHFEnd); absieta++) { diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2JetAlgorithmFirmwareImp1.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2JetAlgorithmFirmwareImp1.cc index 30283cdabe0e7..e994bcb046841 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2JetAlgorithmFirmwareImp1.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2JetAlgorithmFirmwareImp1.cc @@ -16,7 +16,7 @@ #include #include -#include +#include namespace l1t { bool operator > ( const l1t::Jet& a, l1t::Jet& b ) { diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2JetSumAlgorithmFirmwareImp1.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2JetSumAlgorithmFirmwareImp1.cc index fd8fedffe42c0..69aa1d674883d 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2JetSumAlgorithmFirmwareImp1.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2JetSumAlgorithmFirmwareImp1.cc @@ -37,7 +37,7 @@ void l1t::Stage2Layer2JetSumAlgorithmFirmwareImp1::processEvent(const std::vecto int hx(0), hy(0), ht(0); int hxHF(0), hyHF(0), htHF(0); - bool satMht(0), satMhtHF(0), satHt(0), satHtHF(0); + bool satMht(false), satMhtHF(false), satHt(false), satHtHF(false); // loop over rings for (unsigned absieta=1; absieta<=(unsigned int)CaloTools::mpEta(CaloTools::kHFEnd); absieta++) { diff --git a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2TauAlgorithmFirmwareImp1.cc b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2TauAlgorithmFirmwareImp1.cc index fcbcd4a494b08..641cfc0ff618f 100644 --- a/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2TauAlgorithmFirmwareImp1.cc +++ b/L1Trigger/L1TCalorimeter/src/firmware/Stage2Layer2TauAlgorithmFirmwareImp1.cc @@ -103,7 +103,7 @@ void l1t::Stage2Layer2TauAlgorithmFirmwareImp1::merging(const std::vector= seedThreshold) sites.push_back(3); - if (sites.size() == 0) // no merging candidate + if (sites.empty()) // no merging candidate { //math::PtEtaPhiMLorentzVector p4(calibPt, eta, phi, 0.); math::PtEtaPhiMLorentzVector emptyP4; @@ -197,9 +197,9 @@ void l1t::Stage2Layer2TauAlgorithmFirmwareImp1::merging(const std::vectorS, use N // else S std::vector secClusters = makeSecClusters (towers, sites, mainCluster, caloNav); - l1t::CaloCluster* secMaxN = 0; - l1t::CaloCluster* secMaxS = 0; - l1t::CaloCluster* secondaryCluster = 0; + l1t::CaloCluster* secMaxN = nullptr; + l1t::CaloCluster* secMaxS = nullptr; + l1t::CaloCluster* secondaryCluster = nullptr; std::vector::iterator isNeigh0 = find(sites.begin(), sites.end(), 0); std::vector::iterator isNeigh1 = find(sites.begin(), sites.end(), 1); @@ -268,15 +268,15 @@ void l1t::Stage2Layer2TauAlgorithmFirmwareImp1::merging(const std::vectorhwPt() > secMaxS->hwPt()) secondaryCluster = secMaxN; else secondaryCluster = secMaxS; } else { - if (secMaxN != 0) secondaryCluster = secMaxN; - else if (secMaxS != 0) secondaryCluster = secMaxS; + if (secMaxN != nullptr) secondaryCluster = secMaxN; + else if (secMaxS != nullptr) secondaryCluster = secMaxS; else cout << "!! No cluster formed but there were valid seeds!" << endl; } diff --git a/L1Trigger/L1TCommon/interface/Parameter.h b/L1Trigger/L1TCommon/interface/Parameter.h index b545a5d898511..db4da4443d1d0 100644 --- a/L1Trigger/L1TCommon/interface/Parameter.h +++ b/L1Trigger/L1TCommon/interface/Parameter.h @@ -58,7 +58,7 @@ class Parameter { std::list elements; std::unique_ptr copy( strdup(scalarOrVector.c_str()), free ); char *saveptr; - for(const char *item = strtok_r(copy.get(),d,&saveptr); item != NULL; item = strtok_r(NULL,d,&saveptr) ) + for(const char *item = strtok_r(copy.get(),d,&saveptr); item != nullptr; item = strtok_r(nullptr,d,&saveptr) ) try { elements.push_back( castTo(item) ); } catch (std::runtime_error &e){ diff --git a/L1Trigger/L1TCommon/interface/TriggerSystem.h b/L1Trigger/L1TCommon/interface/TriggerSystem.h index 34c79dc8fa239..6ba9bbef65154 100644 --- a/L1Trigger/L1TCommon/interface/TriggerSystem.h +++ b/L1Trigger/L1TCommon/interface/TriggerSystem.h @@ -75,7 +75,7 @@ class TriggerSystem { TriggerSystem(void){ isConfigured = false; - logs = 0; + logs = nullptr; } ~TriggerSystem(void){} diff --git a/L1Trigger/L1TCommon/plugins/L1TBasicDemo.cc b/L1Trigger/L1TCommon/plugins/L1TBasicDemo.cc index 3954c245850ed..368b74b6166eb 100644 --- a/L1Trigger/L1TCommon/plugins/L1TBasicDemo.cc +++ b/L1Trigger/L1TCommon/plugins/L1TBasicDemo.cc @@ -23,13 +23,13 @@ class L1TBasicDemo : public edm::EDAnalyzer { public: explicit L1TBasicDemo(const edm::ParameterSet&); - ~L1TBasicDemo(); + ~L1TBasicDemo() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void analyze(edm::Event const&, edm::EventSetup const&); + void analyze(edm::Event const&, edm::EventSetup const&) override; // EDM tokens: edm::EDGetTokenT egToken_; diff --git a/L1Trigger/L1TCommon/plugins/L1TComparison.cc b/L1Trigger/L1TCommon/plugins/L1TComparison.cc index ff0f590ba4c6b..0e02742c9552e 100644 --- a/L1Trigger/L1TCommon/plugins/L1TComparison.cc +++ b/L1Trigger/L1TCommon/plugins/L1TComparison.cc @@ -61,19 +61,19 @@ static bool compare_l1candidate(const L1Candidate & a, const L1Candidate & b, in class L1TComparison : public EDAnalyzer { public: explicit L1TComparison(const ParameterSet&); - ~L1TComparison(); + ~L1TComparison() override; static void fillDescriptions(ConfigurationDescriptions& descriptions); private: - virtual void beginJob(); - virtual void analyze(Event const&, EventSetup const&); - virtual void endJob(); + void beginJob() override; + void analyze(Event const&, EventSetup const&) override; + void endJob() override; - virtual void beginRun(Run const&, EventSetup const&); - virtual void endRun(Run const&, EventSetup const&); - virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&); - virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&); + void beginRun(Run const&, EventSetup const&) override; + void endRun(Run const&, EventSetup const&) override; + void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; + void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; // Tag string to mark summary with: string tag_; diff --git a/L1Trigger/L1TCommon/plugins/L1TConfigDumper.cc b/L1Trigger/L1TCommon/plugins/L1TConfigDumper.cc index 4095290c29dc6..e39b168dabf18 100644 --- a/L1Trigger/L1TCommon/plugins/L1TConfigDumper.cc +++ b/L1Trigger/L1TCommon/plugins/L1TConfigDumper.cc @@ -163,15 +163,15 @@ class L1TConfigDumper : public edm::one::EDAnalyzer<> { public: explicit L1TConfigDumper(const edm::ParameterSet&); - ~L1TConfigDumper(); + ~L1TConfigDumper() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; // ----------member data --------------------------- }; diff --git a/L1Trigger/L1TCommon/plugins/L1TMuonLegacyConverter.h b/L1Trigger/L1TCommon/plugins/L1TMuonLegacyConverter.h index e11f837594476..ed796946d8db4 100644 --- a/L1Trigger/L1TCommon/plugins/L1TMuonLegacyConverter.h +++ b/L1Trigger/L1TCommon/plugins/L1TMuonLegacyConverter.h @@ -47,10 +47,10 @@ class L1CaloGeometry ; class L1TMuonLegacyConverter : public edm::stream::EDProducer<> { public: explicit L1TMuonLegacyConverter(const edm::ParameterSet&); - ~L1TMuonLegacyConverter(); + ~L1TMuonLegacyConverter() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; // // math::XYZTLorentzVector gctLorentzVector( const double& et, // math::PtEtaPhiMLorentzVector gctLorentzVector( const double& et, diff --git a/L1Trigger/L1TCommon/plugins/L1TSummary.cc b/L1Trigger/L1TCommon/plugins/L1TSummary.cc index d2a6d04b60544..c43bad7b831e9 100644 --- a/L1Trigger/L1TCommon/plugins/L1TSummary.cc +++ b/L1Trigger/L1TCommon/plugins/L1TSummary.cc @@ -23,19 +23,19 @@ using namespace l1t; class L1TSummary : public EDAnalyzer { public: explicit L1TSummary(const ParameterSet&); - ~L1TSummary(); + ~L1TSummary() override; static void fillDescriptions(ConfigurationDescriptions& descriptions); private: - virtual void beginJob(); - virtual void analyze(Event const&, EventSetup const&); - virtual void endJob(); + void beginJob() override; + void analyze(Event const&, EventSetup const&) override; + void endJob() override; - virtual void beginRun(Run const&, EventSetup const&); - virtual void endRun(Run const&, EventSetup const&); - virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&); - virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&); + void beginRun(Run const&, EventSetup const&) override; + void endRun(Run const&, EventSetup const&) override; + void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; + void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; // Tag string to mark summary with: string tag_; diff --git a/L1Trigger/L1TCommon/src/Parameter.cc b/L1Trigger/L1TCommon/src/Parameter.cc index 71d2ab2b8895a..40c711772f698 100644 --- a/L1Trigger/L1TCommon/src/Parameter.cc +++ b/L1Trigger/L1TCommon/src/Parameter.cc @@ -34,7 +34,7 @@ Parameter::Parameter(const char *id, unique_ptr copy( strdup(columns), free ); unsigned long nItems = 0; char *saveptr; - for(const char *item=strtok_r(copy.get(),delimeter,&saveptr); item != NULL; item = strtok_r(NULL,delimeter,&saveptr), nItems++){ + for(const char *item=strtok_r(copy.get(),delimeter,&saveptr); item != nullptr; item = strtok_r(nullptr,delimeter,&saveptr), nItems++){ // trim leading and trailing whitespaces size_t pos=0, len = strlen(item); while( pos copy( strdup(rows[r].c_str()), free ); for(unsigned int pos=0; pos long long castTo(const char *arg) { - char *endptr = NULL; + char *endptr = nullptr; long long retval = strtoll(arg,&endptr,0); if( *endptr == '\0' ) return retval; else throw runtime_error("Cannot convert '" + string(arg)+ "' to integral type"); @@ -80,12 +80,12 @@ template<> long long castTo(const char *arg) { template<> bool castTo (const char *arg) { if( strlen(arg) > 3 ){ // look for "true" - if( strstr(arg,"true") != NULL && strstr(arg,"false") == NULL ) return true; + if( strstr(arg,"true") != nullptr && strstr(arg,"false") == nullptr ) return true; // look for "false" - if( strstr(arg,"true") == NULL && strstr(arg,"false") != NULL ) return false; + if( strstr(arg,"true") == nullptr && strstr(arg,"false") != nullptr ) return false; } // look for "a number - char *endptr = NULL; + char *endptr = nullptr; long retval = strtol(arg,&endptr,0); if( *endptr == '\0' ) return retval; // nothing worked @@ -98,7 +98,7 @@ template<> int castTo (const char *arg) { return castTo(arg); template<> long castTo (const char *arg) { return castTo(arg); } template<> long double castTo(const char *arg) { - char *endptr = NULL; + char *endptr = nullptr; long double retval = strtold(arg,&endptr); if( *endptr == '\0' ) return retval; else throw runtime_error("Cannot convert '" + string(arg) + "' to floating point type"); @@ -107,7 +107,7 @@ template<> float castTo (const char *arg) { return castTo(a template<> double castTo(const char *arg) { return castTo(arg); } template<> unsigned long long castTo(const char *arg) { - char *endptr = NULL; + char *endptr = nullptr; unsigned long long retval = strtoull(arg,&endptr,0); if( *endptr == '\0' ) return retval; else throw runtime_error("Cannot convert '" + string(arg)+ "' to unsigned integral type"); diff --git a/L1Trigger/L1TGlobal/interface/CaloCondition.h b/L1Trigger/L1TGlobal/interface/CaloCondition.h index 72fe502bcf102..67511714e6831 100644 --- a/L1Trigger/L1TGlobal/interface/CaloCondition.h +++ b/L1Trigger/L1TGlobal/interface/CaloCondition.h @@ -55,7 +55,7 @@ class CaloCondition : public ConditionEvaluation CaloCondition(const CaloCondition&); // destructor - virtual ~CaloCondition(); + ~CaloCondition() override; // assign operator CaloCondition& operator=(const CaloCondition&); @@ -63,10 +63,10 @@ class CaloCondition : public ConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition(const int bxEval) const; + const bool evaluateCondition(const int bxEval) const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/L1TGlobal/interface/CaloTemplate.h b/L1Trigger/L1TGlobal/interface/CaloTemplate.h index 042bb728b0295..1c262eb66f24c 100644 --- a/L1Trigger/L1TGlobal/interface/CaloTemplate.h +++ b/L1Trigger/L1TGlobal/interface/CaloTemplate.h @@ -48,7 +48,7 @@ class CaloTemplate : public GlobalCondition CaloTemplate( const CaloTemplate& ); // destructor - virtual ~CaloTemplate(); + ~CaloTemplate() override; // assign operator CaloTemplate& operator= (const CaloTemplate&); @@ -116,7 +116,7 @@ class CaloTemplate : public GlobalCondition /// print the condition - virtual void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; /// output stream operator friend std::ostream& operator<<(std::ostream&, const CaloTemplate&); diff --git a/L1Trigger/L1TGlobal/interface/CorrCondition.h b/L1Trigger/L1TGlobal/interface/CorrCondition.h index 8990ef264265f..066aceec31bcf 100644 --- a/L1Trigger/L1TGlobal/interface/CorrCondition.h +++ b/L1Trigger/L1TGlobal/interface/CorrCondition.h @@ -56,7 +56,7 @@ class CorrCondition : public ConditionEvaluation CorrCondition(const CorrCondition&); // destructor - virtual ~CorrCondition(); + ~CorrCondition() override; // assign operator CorrCondition& operator=(const CorrCondition&); @@ -64,10 +64,10 @@ class CorrCondition : public ConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition(const int bxEval) const; + const bool evaluateCondition(const int bxEval) const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/L1TGlobal/interface/CorrWithOverlapRemovalCondition.h b/L1Trigger/L1TGlobal/interface/CorrWithOverlapRemovalCondition.h index 577a9a2de6ce9..5d5488e576dd9 100644 --- a/L1Trigger/L1TGlobal/interface/CorrWithOverlapRemovalCondition.h +++ b/L1Trigger/L1TGlobal/interface/CorrWithOverlapRemovalCondition.h @@ -58,7 +58,7 @@ class CorrWithOverlapRemovalCondition : public ConditionEvaluation CorrWithOverlapRemovalCondition(const CorrWithOverlapRemovalCondition&); // destructor - virtual ~CorrWithOverlapRemovalCondition(); + ~CorrWithOverlapRemovalCondition() override; // assign operator CorrWithOverlapRemovalCondition& operator=(const CorrWithOverlapRemovalCondition&); @@ -66,10 +66,10 @@ class CorrWithOverlapRemovalCondition : public ConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition(const int bxEval) const; + const bool evaluateCondition(const int bxEval) const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/L1TGlobal/interface/CorrelationTemplate.h b/L1Trigger/L1TGlobal/interface/CorrelationTemplate.h index 89a9b7c383286..5f6a54c3ffea1 100644 --- a/L1Trigger/L1TGlobal/interface/CorrelationTemplate.h +++ b/L1Trigger/L1TGlobal/interface/CorrelationTemplate.h @@ -56,7 +56,7 @@ class CorrelationTemplate : public GlobalCondition CorrelationTemplate( const CorrelationTemplate& ); /// destructor - virtual ~CorrelationTemplate(); + ~CorrelationTemplate() override; /// assign operator CorrelationTemplate& operator= (const CorrelationTemplate&); @@ -133,7 +133,7 @@ class CorrelationTemplate : public GlobalCondition /// print the condition - virtual void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; /// output stream operator friend std::ostream& operator<<(std::ostream&, const CorrelationTemplate&); diff --git a/L1Trigger/L1TGlobal/interface/CorrelationWithOverlapRemovalTemplate.h b/L1Trigger/L1TGlobal/interface/CorrelationWithOverlapRemovalTemplate.h index 287dad8e31e62..096595d927fb3 100644 --- a/L1Trigger/L1TGlobal/interface/CorrelationWithOverlapRemovalTemplate.h +++ b/L1Trigger/L1TGlobal/interface/CorrelationWithOverlapRemovalTemplate.h @@ -56,7 +56,7 @@ class CorrelationWithOverlapRemovalTemplate : public GlobalCondition CorrelationWithOverlapRemovalTemplate( const CorrelationWithOverlapRemovalTemplate& ); /// destructor - virtual ~CorrelationWithOverlapRemovalTemplate(); + ~CorrelationWithOverlapRemovalTemplate() override; /// assign operator CorrelationWithOverlapRemovalTemplate& operator= (const CorrelationWithOverlapRemovalTemplate&); @@ -156,7 +156,7 @@ class CorrelationWithOverlapRemovalTemplate : public GlobalCondition /// print the condition - virtual void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; /// output stream operator friend std::ostream& operator<<(std::ostream&, const CorrelationWithOverlapRemovalTemplate&); diff --git a/L1Trigger/L1TGlobal/interface/EnergySumCondition.h b/L1Trigger/L1TGlobal/interface/EnergySumCondition.h index 69766feba7a79..bb613d3fb6a97 100644 --- a/L1Trigger/L1TGlobal/interface/EnergySumCondition.h +++ b/L1Trigger/L1TGlobal/interface/EnergySumCondition.h @@ -50,7 +50,7 @@ class EnergySumCondition : public ConditionEvaluation EnergySumCondition(const EnergySumCondition&); // destructor - virtual ~EnergySumCondition(); + ~EnergySumCondition() override; // assign operator EnergySumCondition& operator=(const EnergySumCondition&); @@ -58,10 +58,10 @@ class EnergySumCondition : public ConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition(const int bxEval) const; + const bool evaluateCondition(const int bxEval) const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/L1TGlobal/interface/EnergySumTemplate.h b/L1Trigger/L1TGlobal/interface/EnergySumTemplate.h index fd1a8cbf41889..41e8e2255fc92 100644 --- a/L1Trigger/L1TGlobal/interface/EnergySumTemplate.h +++ b/L1Trigger/L1TGlobal/interface/EnergySumTemplate.h @@ -47,7 +47,7 @@ class EnergySumTemplate : public GlobalCondition EnergySumTemplate(const EnergySumTemplate&); // destructor - virtual ~EnergySumTemplate(); + ~EnergySumTemplate() override; // assign operator EnergySumTemplate& operator=(const EnergySumTemplate&); @@ -82,7 +82,7 @@ class EnergySumTemplate : public GlobalCondition void setConditionParameter(const std::vector&); /// print the condition - virtual void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; /// output stream operator friend std::ostream& operator<<(std::ostream&, const EnergySumTemplate&); diff --git a/L1Trigger/L1TGlobal/interface/ExternalCondition.h b/L1Trigger/L1TGlobal/interface/ExternalCondition.h index fae026fcf6c0a..b618895a0461e 100644 --- a/L1Trigger/L1TGlobal/interface/ExternalCondition.h +++ b/L1Trigger/L1TGlobal/interface/ExternalCondition.h @@ -50,7 +50,7 @@ class ExternalCondition : public ConditionEvaluation ExternalCondition(const ExternalCondition&); // destructor - virtual ~ExternalCondition(); + ~ExternalCondition() override; // assign operator ExternalCondition& operator=(const ExternalCondition&); @@ -58,10 +58,10 @@ class ExternalCondition : public ConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition(const int bxEval) const; + const bool evaluateCondition(const int bxEval) const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/L1TGlobal/interface/ExternalTemplate.h b/L1Trigger/L1TGlobal/interface/ExternalTemplate.h index 43ae72d2f5256..0525785499999 100644 --- a/L1Trigger/L1TGlobal/interface/ExternalTemplate.h +++ b/L1Trigger/L1TGlobal/interface/ExternalTemplate.h @@ -47,7 +47,7 @@ class ExternalTemplate : public GlobalCondition ExternalTemplate(const ExternalTemplate&); // destructor - virtual ~ExternalTemplate(); + ~ExternalTemplate() override; // assign operator ExternalTemplate& operator=(const ExternalTemplate&); @@ -69,7 +69,7 @@ class ExternalTemplate : public GlobalCondition inline void setExternalChannel(unsigned int extCh) { m_extChannel = extCh; } /// print the condition - virtual void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; /// output stream operator friend std::ostream& operator<<(std::ostream&, const ExternalTemplate&); diff --git a/L1Trigger/L1TGlobal/interface/MuCondition.h b/L1Trigger/L1TGlobal/interface/MuCondition.h index 8c9f728ed8204..9de05a0378a5d 100644 --- a/L1Trigger/L1TGlobal/interface/MuCondition.h +++ b/L1Trigger/L1TGlobal/interface/MuCondition.h @@ -52,7 +52,7 @@ class MuCondition : public ConditionEvaluation MuCondition(const MuCondition&); // destructor - virtual ~MuCondition(); + ~MuCondition() override; // assign operator MuCondition& operator=(const MuCondition&); @@ -60,10 +60,10 @@ class MuCondition : public ConditionEvaluation public: /// the core function to check if the condition matches - const bool evaluateCondition(const int bxEval) const; + const bool evaluateCondition(const int bxEval) const override; /// print condition - void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; public: diff --git a/L1Trigger/L1TGlobal/interface/MuonTemplate.h b/L1Trigger/L1TGlobal/interface/MuonTemplate.h index 3a13ff7e4f6f6..791fb93dca09e 100644 --- a/L1Trigger/L1TGlobal/interface/MuonTemplate.h +++ b/L1Trigger/L1TGlobal/interface/MuonTemplate.h @@ -48,7 +48,7 @@ class MuonTemplate : public GlobalCondition MuonTemplate( const MuonTemplate& ); // destructor - virtual ~MuonTemplate(); + ~MuonTemplate() override; // assign operator MuonTemplate& operator= (const MuonTemplate&); @@ -128,7 +128,7 @@ class MuonTemplate : public GlobalCondition /// print the condition - virtual void print(std::ostream& myCout) const; + void print(std::ostream& myCout) const override; /// output stream operator friend std::ostream& operator<<(std::ostream&, const MuonTemplate&); diff --git a/L1Trigger/L1TGlobal/plugins/BXVectorInputProducer.cc b/L1Trigger/L1TGlobal/plugins/BXVectorInputProducer.cc index dbd00a979f275..e85c4278c9ecb 100644 --- a/L1Trigger/L1TGlobal/plugins/BXVectorInputProducer.cc +++ b/L1Trigger/L1TGlobal/plugins/BXVectorInputProducer.cc @@ -60,16 +60,16 @@ namespace l1t { class BXVectorInputProducer : public EDProducer { public: explicit BXVectorInputProducer(const ParameterSet&); - ~BXVectorInputProducer(); + ~BXVectorInputProducer() override; static void fillDescriptions(ConfigurationDescriptions& descriptions); private: - virtual void produce(Event&, EventSetup const&); - virtual void beginJob(); - virtual void endJob(); - virtual void beginRun(Run const&iR, EventSetup const&iE); - virtual void endRun(Run const& iR, EventSetup const& iE); + void produce(Event&, EventSetup const&) override; + void beginJob() override; + void endJob() override; + void beginRun(Run const&iR, EventSetup const&iE) override; + void endRun(Run const& iR, EventSetup const& iE) override; int convertPhiToHW(double iphi, int steps); int convertEtaToHW(double ieta, double minEta, double maxEta, int steps); diff --git a/L1Trigger/L1TGlobal/plugins/FakeInputProducer.cc b/L1Trigger/L1TGlobal/plugins/FakeInputProducer.cc index 96b8bd45bd03d..f16edee3fe831 100644 --- a/L1Trigger/L1TGlobal/plugins/FakeInputProducer.cc +++ b/L1Trigger/L1TGlobal/plugins/FakeInputProducer.cc @@ -46,16 +46,16 @@ namespace l1t { class FakeInputProducer : public EDProducer { public: explicit FakeInputProducer(const ParameterSet&); - ~FakeInputProducer(); + ~FakeInputProducer() override; static void fillDescriptions(ConfigurationDescriptions& descriptions); private: - virtual void produce(Event&, EventSetup const&); - virtual void beginJob(); - virtual void endJob(); - virtual void beginRun(Run const&iR, EventSetup const&iE); - virtual void endRun(Run const& iR, EventSetup const& iE); + void produce(Event&, EventSetup const&) override; + void beginJob() override; + void endJob() override; + void beginRun(Run const&iR, EventSetup const&iE) override; + void endRun(Run const& iR, EventSetup const& iE) override; // ----------member data --------------------------- unsigned long long m_paramsCacheId; // Cache-ID from current parameters, to check if needs to be updated. diff --git a/L1Trigger/L1TGlobal/plugins/GenToInputProducer.cc b/L1Trigger/L1TGlobal/plugins/GenToInputProducer.cc index 56b3e0fe1736e..0b4c00fba98ef 100644 --- a/L1Trigger/L1TGlobal/plugins/GenToInputProducer.cc +++ b/L1Trigger/L1TGlobal/plugins/GenToInputProducer.cc @@ -42,7 +42,7 @@ #include "TMath.h" #include "TRandom3.h" -#include +#include using namespace std; using namespace edm; @@ -60,16 +60,16 @@ namespace l1t { class GenToInputProducer : public EDProducer { public: explicit GenToInputProducer(const ParameterSet&); - ~GenToInputProducer(); + ~GenToInputProducer() override; static void fillDescriptions(ConfigurationDescriptions& descriptions); private: - virtual void produce(Event&, EventSetup const&); - virtual void beginJob(); - virtual void endJob(); - virtual void beginRun(Run const&iR, EventSetup const&iE); - virtual void endRun(Run const& iR, EventSetup const& iE); + void produce(Event&, EventSetup const&) override; + void beginJob() override; + void endJob() override; + void beginRun(Run const&iR, EventSetup const&iE) override; + void endRun(Run const& iR, EventSetup const& iE) override; int convertPhiToHW(double iphi, int steps); int convertEtaToHW(double ieta, double minEta, double maxEta, int steps); diff --git a/L1Trigger/L1TGlobal/plugins/GtInputDump.cc b/L1Trigger/L1TGlobal/plugins/GtInputDump.cc index deb34b77bb761..7d067dacaac25 100644 --- a/L1Trigger/L1TGlobal/plugins/GtInputDump.cc +++ b/L1Trigger/L1TGlobal/plugins/GtInputDump.cc @@ -56,8 +56,8 @@ namespace l1t { class GtInputDump : public edm::EDAnalyzer { public: explicit GtInputDump(const edm::ParameterSet&); - virtual ~GtInputDump(){}; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + ~GtInputDump() override{}; + void analyze(const edm::Event&, const edm::EventSetup&) override; EDGetToken egToken; EDGetToken muToken; diff --git a/L1Trigger/L1TGlobal/plugins/GtRecordDump.cc b/L1Trigger/L1TGlobal/plugins/GtRecordDump.cc index 0c5f5ce0943ef..ed67865759a83 100644 --- a/L1Trigger/L1TGlobal/plugins/GtRecordDump.cc +++ b/L1Trigger/L1TGlobal/plugins/GtRecordDump.cc @@ -67,9 +67,9 @@ namespace l1t { class GtRecordDump : public edm::EDAnalyzer { public: explicit GtRecordDump(const edm::ParameterSet&); - virtual ~GtRecordDump(){}; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endRun(edm::Run const&, edm::EventSetup const&) override; + ~GtRecordDump() override{}; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endRun(edm::Run const&, edm::EventSetup const&) override; InputTag uGtAlgInputTag; InputTag uGtExtInputTag; diff --git a/L1Trigger/L1TGlobal/plugins/L1TExtCondLegacyToStage2.cc b/L1Trigger/L1TGlobal/plugins/L1TExtCondLegacyToStage2.cc index 444f239cf5e3e..eebaebf76caec 100644 --- a/L1Trigger/L1TGlobal/plugins/L1TExtCondLegacyToStage2.cc +++ b/L1Trigger/L1TGlobal/plugins/L1TExtCondLegacyToStage2.cc @@ -51,12 +51,12 @@ using namespace l1t; class L1TExtCondLegacyToStage2 : public stream::EDProducer<> { public: explicit L1TExtCondLegacyToStage2(const ParameterSet&); - ~L1TExtCondLegacyToStage2(); + ~L1TExtCondLegacyToStage2() override; static void fillDescriptions(ConfigurationDescriptions& descriptions); private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- //unsigned long long m_paramsCacheId; // Cache-ID from current parameters, to check if needs to be updated. diff --git a/L1Trigger/L1TGlobal/plugins/L1TExtCondProducer.cc b/L1Trigger/L1TGlobal/plugins/L1TExtCondProducer.cc index 2752d23d2e32c..082f560c95724 100644 --- a/L1Trigger/L1TGlobal/plugins/L1TExtCondProducer.cc +++ b/L1Trigger/L1TGlobal/plugins/L1TExtCondProducer.cc @@ -47,12 +47,12 @@ using namespace l1t; class L1TExtCondProducer : public stream::EDProducer<> { public: explicit L1TExtCondProducer(const ParameterSet&); - ~L1TExtCondProducer(); + ~L1TExtCondProducer() override; static void fillDescriptions(ConfigurationDescriptions& descriptions); private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- // unsigned long long m_paramsCacheId; // Cache-ID from current parameters, to check if needs to be updated. diff --git a/L1Trigger/L1TGlobal/plugins/L1TGlobalAnalyzer.cc b/L1Trigger/L1TGlobal/plugins/L1TGlobalAnalyzer.cc index 83c2c0a23b00f..0dc894ceb8b8b 100644 --- a/L1Trigger/L1TGlobal/plugins/L1TGlobalAnalyzer.cc +++ b/L1Trigger/L1TGlobal/plugins/L1TGlobalAnalyzer.cc @@ -54,15 +54,15 @@ namespace l1t { class L1TGlobalAnalyzer : public edm::EDAnalyzer { public: explicit L1TGlobalAnalyzer(const edm::ParameterSet&); - ~L1TGlobalAnalyzer(); + ~L1TGlobalAnalyzer() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; //virtual void beginRun(edm::Run const&, edm::EventSetup const&) override; //virtual void endRun(edm::Run const&, edm::EventSetup const&) override; diff --git a/L1Trigger/L1TGlobal/plugins/L1TGlobalPrescalesVetosESProducer.cc b/L1Trigger/L1TGlobal/plugins/L1TGlobalPrescalesVetosESProducer.cc index 7a9b9d14297b6..b020a4a8c5d8f 100644 --- a/L1Trigger/L1TGlobal/plugins/L1TGlobalPrescalesVetosESProducer.cc +++ b/L1Trigger/L1TGlobal/plugins/L1TGlobalPrescalesVetosESProducer.cc @@ -13,8 +13,8 @@ #include #include #include -#include -#include +#include +#include #include "tmEventSetup/tmEventSetup.hh" #include "tmEventSetup/esTriggerMenu.hh" @@ -383,7 +383,7 @@ L1TGlobalPrescalesVetosESProducer::produce(const L1TGlobalPrescalesVetosRcd& iRe } LogDebug("L1TGlobal") << " ====> Algo bx mask <=== " << std::endl; - if( m_initialTriggerAlgoBxMaskAlgoTrig.size()==0 ) LogDebug("L1TGlobal") << "\t(empty map)" << std::endl; + if( m_initialTriggerAlgoBxMaskAlgoTrig.empty() ) LogDebug("L1TGlobal") << "\t(empty map)" << std::endl; for( auto& it: m_initialTriggerAlgoBxMaskAlgoTrig ){ LogDebug("L1TGlobal") << " bx = " << it.first << " : iAlg ="; std::vector masked = it.second; diff --git a/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.h b/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.h index 5b11c144bd92b..f287ab7543194 100644 --- a/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.h +++ b/L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.h @@ -41,9 +41,9 @@ class L1TGlobalProducer : public edm::stream::EDProducer<> public: explicit L1TGlobalProducer(const edm::ParameterSet&); - ~L1TGlobalProducer(); + ~L1TGlobalProducer() override; - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); diff --git a/L1Trigger/L1TGlobal/plugins/L1TGlobalSummary.cc b/L1Trigger/L1TGlobal/plugins/L1TGlobalSummary.cc index 9f02daade8770..4aaf29438c85f 100644 --- a/L1Trigger/L1TGlobal/plugins/L1TGlobalSummary.cc +++ b/L1Trigger/L1TGlobal/plugins/L1TGlobalSummary.cc @@ -32,10 +32,10 @@ using namespace l1t; class L1TGlobalSummary : public edm::one::EDAnalyzer { public: explicit L1TGlobalSummary(const edm::ParameterSet&); - virtual ~L1TGlobalSummary(){}; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void beginRun(Run const&, EventSetup const&) override; - virtual void endRun(Run const&, EventSetup const&) override; + ~L1TGlobalSummary() override{}; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginRun(Run const&, EventSetup const&) override; + void endRun(Run const&, EventSetup const&) override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); private: diff --git a/L1Trigger/L1TGlobal/plugins/L1TUtmTriggerMenuDumper.cc b/L1Trigger/L1TGlobal/plugins/L1TUtmTriggerMenuDumper.cc index a2e42aaf6db20..7a5430b53a3d3 100644 --- a/L1Trigger/L1TGlobal/plugins/L1TUtmTriggerMenuDumper.cc +++ b/L1Trigger/L1TGlobal/plugins/L1TUtmTriggerMenuDumper.cc @@ -5,8 +5,8 @@ #include #include -#include -#include +#include +#include #include "tmEventSetup/tmEventSetup.hh" #include "tmEventSetup/esTriggerMenu.hh" @@ -37,19 +37,19 @@ using namespace tmeventsetup; class L1TUtmTriggerMenuDumper : public EDAnalyzer { public: explicit L1TUtmTriggerMenuDumper(const ParameterSet&); - ~L1TUtmTriggerMenuDumper(); + ~L1TUtmTriggerMenuDumper() override; static void fillDescriptions(ConfigurationDescriptions& descriptions); private: - virtual void beginJob(); - virtual void analyze(Event const&, EventSetup const&); - virtual void endJob(); + void beginJob() override; + void analyze(Event const&, EventSetup const&) override; + void endJob() override; - virtual void beginRun(Run const&, EventSetup const&); - virtual void endRun(Run const&, EventSetup const&); - virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&); - virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&); + void beginRun(Run const&, EventSetup const&) override; + void endRun(Run const&, EventSetup const&) override; + void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; + void endLuminosityBlock(LuminosityBlock const&, EventSetup const&) override; }; diff --git a/L1Trigger/L1TGlobal/plugins/L1TUtmTriggerMenuESProducer.cc b/L1Trigger/L1TGlobal/plugins/L1TUtmTriggerMenuESProducer.cc index 79ce500f6e3c0..f2bb8333c1983 100644 --- a/L1Trigger/L1TGlobal/plugins/L1TUtmTriggerMenuESProducer.cc +++ b/L1Trigger/L1TGlobal/plugins/L1TUtmTriggerMenuESProducer.cc @@ -13,8 +13,8 @@ #include #include #include -#include -#include +#include +#include #include "tmEventSetup/tmEventSetup.hh" #include "tmEventSetup/esTriggerMenu.hh" @@ -45,7 +45,7 @@ using namespace edm; class L1TUtmTriggerMenuESProducer : public edm::ESProducer { public: L1TUtmTriggerMenuESProducer(const edm::ParameterSet&); - ~L1TUtmTriggerMenuESProducer(); + ~L1TUtmTriggerMenuESProducer() override; typedef std::shared_ptr ReturnType; diff --git a/L1Trigger/L1TGlobal/plugins/StableParametersTrivialProducer.cc b/L1Trigger/L1TGlobal/plugins/StableParametersTrivialProducer.cc index eb759e2c1a5fe..37f300e4d5356 100644 --- a/L1Trigger/L1TGlobal/plugins/StableParametersTrivialProducer.cc +++ b/L1Trigger/L1TGlobal/plugins/StableParametersTrivialProducer.cc @@ -29,7 +29,7 @@ class StableParametersTrivialProducer : public edm::ESProducer StableParametersTrivialProducer(const edm::ParameterSet&); /// destructor - ~StableParametersTrivialProducer(); + ~StableParametersTrivialProducer() override; /// public methods diff --git a/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.cc b/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.cc index 9f1763b1eae50..6cffc97c1da2d 100644 --- a/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.cc +++ b/L1Trigger/L1TGlobal/plugins/TriggerMenuParser.cc @@ -517,7 +517,7 @@ bool l1t::TriggerMenuParser::insertConditionIntoMap(GlobalCondition& cond, const bool l1t::TriggerMenuParser::insertAlgorithmIntoMap(const GlobalAlgorithm& alg) { std::string algName = alg.algoName(); - std::string algAlias = alg.algoAlias(); + const std::string& algAlias = alg.algoAlias(); //LogTrace("TriggerMenuParser") //<< " Trying to insert algorithm \"" << algName << "\" in the algorithm map." ; @@ -661,9 +661,9 @@ bool l1t::TriggerMenuParser::parseScales(std::mapetMin = scale.getMinimum(); @@ -671,7 +671,7 @@ bool l1t::TriggerMenuParser::parseScales(std::mapetStep = scale.getStep(); //Get bin edges - const std::vector binsV = scale.getBins(); + const std::vector& binsV = scale.getBins(); for(unsigned int i=0; i binLimits(bin.minimum, bin.maximum); @@ -702,7 +702,7 @@ bool l1t::TriggerMenuParser::parseScales(std::mapetaStep = scale.getStep(); //Get bin edges - const std::vector binsV = scale.getBins(); + const std::vector& binsV = scale.getBins(); scaleParam->etaBins.resize(pow(2,scale.getNbits())); for(unsigned int i=0; iphiStep = scale.getStep(); //Get bin edges - const std::vector binsV = scale.getBins(); + const std::vector& binsV = scale.getBins(); scaleParam->phiBins.resize(pow(2,scale.getNbits())); for(unsigned int i=0; i lut; if ( func == l1t::SIN ) { applySin(array, n); @@ -3377,7 +3377,7 @@ bool l1t::TriggerMenuParser::parseAlgorithm( tmeventsetup::esAlgorithm algorithm // get alias std::string algAlias = algorithm.getName(); - std::string algName = algorithm.getName(); + const std::string& algName = algorithm.getName(); if (algAlias == "") { algAlias = algName; @@ -3393,7 +3393,7 @@ bool l1t::TriggerMenuParser::parseAlgorithm( tmeventsetup::esAlgorithm algorithm } // get the logical expression - std::string logExpression = algorithm.getExpressionInCondition(); + const std::string& logExpression = algorithm.getExpressionInCondition(); LogDebug("TriggerMenuParser") << " Logical expression: " << logExpression diff --git a/L1Trigger/L1TGlobal/src/AlgorithmEvaluation.cc b/L1Trigger/L1TGlobal/src/AlgorithmEvaluation.cc index 6384f9d864039..a0f0b7b5c2341 100644 --- a/L1Trigger/L1TGlobal/src/AlgorithmEvaluation.cc +++ b/L1Trigger/L1TGlobal/src/AlgorithmEvaluation.cc @@ -95,7 +95,7 @@ void l1t::AlgorithmEvaluation::evaluateAlgorithm(const int chipNumber, CItEvalMap itCond = (conditionResultMaps.at(chipNumber)).find(it->operand); if (itCond != (conditionResultMaps[chipNumber]).end()) { - if (0 == itCond->second) { + if (nullptr == itCond->second) { // it should never be happen, only valid conditions are in the maps throw cms::Exception("FailModule") << "\nCondition " << (it->operand) diff --git a/L1Trigger/L1TGlobal/src/CaloCondition.cc b/L1Trigger/L1TGlobal/src/CaloCondition.cc index f0abc63d9c613..4869e9d277dc7 100644 --- a/L1Trigger/L1TGlobal/src/CaloCondition.cc +++ b/L1Trigger/L1TGlobal/src/CaloCondition.cc @@ -474,11 +474,11 @@ const l1t::L1Candidate* l1t::CaloCondition::getCandidate(const int bx, const int return (m_uGtB->getCandL1Tau())->at(bx,indexCand); break; default: - return 0; + return nullptr; break; } - return 0; + return nullptr; } /** diff --git a/L1Trigger/L1TGlobal/src/CorrCondition.cc b/L1Trigger/L1TGlobal/src/CorrCondition.cc index 5ea44d9fffc83..17021494c0331 100644 --- a/L1Trigger/L1TGlobal/src/CorrCondition.cc +++ b/L1Trigger/L1TGlobal/src/CorrCondition.cc @@ -151,9 +151,9 @@ const bool l1t::CorrCondition::evaluateCondition(const int bxEval) const { (cond1Categ == CondMuon && (cond0Categ == CondCalo || cond0Categ == CondEnergySum) ) ) convertCaloScales = true; - const MuonTemplate* corrMuon = 0; - const CaloTemplate* corrCalo = 0; - const EnergySumTemplate* corrEnergySum = 0; + const MuonTemplate* corrMuon = nullptr; + const CaloTemplate* corrCalo = nullptr; + const EnergySumTemplate* corrEnergySum = nullptr; // FIXME copying is slow... CombinationsInCond cond0Comb; @@ -336,9 +336,9 @@ const bool l1t::CorrCondition::evaluateCondition(const int bxEval) const { (combinationsInCond()).clear(); // pointers to objects - const BXVector* candMuVec = 0; - const BXVector* candCaloVec = 0; - const BXVector* candEtSumVec = 0; + const BXVector* candMuVec = nullptr; + const BXVector* candCaloVec = nullptr; + const BXVector* candEtSumVec = nullptr; bool etSumCond = false; @@ -406,7 +406,7 @@ const bool l1t::CorrCondition::evaluateCondition(const int bxEval) const { // ... but add protection to not crash int obj0Index = -1; - if ((*it0Comb).size() > 0) { + if (!(*it0Comb).empty()) { obj0Index = (*it0Comb)[0]; } else { LogTrace("L1TGlobal") @@ -693,7 +693,7 @@ const bool l1t::CorrCondition::evaluateCondition(const int bxEval) const { // ... but add protection to not crash int obj1Index = -1; - if ((*it1Comb).size() > 0) { + if (!(*it1Comb).empty()) { obj1Index = (*it1Comb)[0]; } else { LogTrace("L1TGlobal") @@ -1131,11 +1131,11 @@ const bool l1t::CorrCondition::evaluateCondition(const int bxEval) const { double tbptSqPhy = et0Phy*et0Phy + et1Phy*et1Phy + 2*et0Phy*et1Phy*(cosPhi1Phy*cosPhi2Phy + sinPhi1Phy*sinPhi2Phy); // get values from LUT's - std::string lutName0 = lutObj0; + const std::string& lutName0 = lutObj0; unsigned int precCosLUT0 = m_gtScales->getPrec_Cos(lutName0); unsigned int precSinLUT0 = m_gtScales->getPrec_Sin(lutName0); - std::string lutName1 = lutObj1; + const std::string& lutName1 = lutObj1; unsigned int precCosLUT1 = m_gtScales->getPrec_Cos(lutName1); unsigned int precSinLUT1 = m_gtScales->getPrec_Sin(lutName1); @@ -1340,11 +1340,11 @@ const l1t::L1Candidate* l1t::CorrCondition::getCandidate(const int bx, const int return (m_uGtB->getCandL1Tau())->at(bx,indexCand); break; default: - return 0; + return nullptr; break; } - return 0; + return nullptr; } /** diff --git a/L1Trigger/L1TGlobal/src/CorrWithOverlapRemovalCondition.cc b/L1Trigger/L1TGlobal/src/CorrWithOverlapRemovalCondition.cc index 5a4a48d147648..5ec726c30b125 100644 --- a/L1Trigger/L1TGlobal/src/CorrWithOverlapRemovalCondition.cc +++ b/L1Trigger/L1TGlobal/src/CorrWithOverlapRemovalCondition.cc @@ -194,9 +194,9 @@ const bool l1t::CorrWithOverlapRemovalCondition::evaluateCondition(const int bxE (cond2Categ == CondMuon && (cond1Categ == CondCalo || cond1Categ == CondEnergySum) ) ) convertCaloScalesForOverlapRemovalFromLeg1 = true; - const MuonTemplate* corrMuon = 0; - const CaloTemplate* corrCalo = 0; - const EnergySumTemplate* corrEnergySum = 0; + const MuonTemplate* corrMuon = nullptr; + const CaloTemplate* corrCalo = nullptr; + const EnergySumTemplate* corrEnergySum = nullptr; // FIXME copying is slow... CombinationsInCond cond0Comb; @@ -467,9 +467,9 @@ const bool l1t::CorrWithOverlapRemovalCondition::evaluateCondition(const int bxE (combinationsInCond()).clear(); // pointers to objects - const BXVector* candMuVec = 0; - const BXVector* candCaloVec = 0; - const BXVector* candEtSumVec = 0; + const BXVector* candMuVec = nullptr; + const BXVector* candCaloVec = nullptr; + const BXVector* candEtSumVec = nullptr; bool etSumCond = false; @@ -555,7 +555,7 @@ const bool l1t::CorrWithOverlapRemovalCondition::evaluateCondition(const int bxE // ... but add protection to not crash int obj0Index = -1; - if ((*it0Comb).size() > 0) { + if (!(*it0Comb).empty()) { obj0Index = (*it0Comb)[0]; } else { LogTrace("L1TGlobal") @@ -854,7 +854,7 @@ const bool l1t::CorrWithOverlapRemovalCondition::evaluateCondition(const int bxE // ... but add protection to not crash int obj2Index = -1; - if ((*it2Comb).size() > 0) { + if (!(*it2Comb).empty()) { obj2Index = (*it2Comb)[0]; } else { LogTrace("L1TGlobal") @@ -1213,7 +1213,7 @@ const bool l1t::CorrWithOverlapRemovalCondition::evaluateCondition(const int bxE // ... but add protection to not crash int obj1Index = -1; - if ((*it1Comb).size() > 0) { + if (!(*it1Comb).empty()) { obj1Index = (*it1Comb)[0]; } else { LogTrace("L1TGlobal") @@ -1522,7 +1522,7 @@ const bool l1t::CorrWithOverlapRemovalCondition::evaluateCondition(const int bxE // ... but add protection to not crash int obj2Index = -1; - if ((*it2Comb).size() > 0) { + if (!(*it2Comb).empty()) { obj2Index = (*it2Comb)[0]; } else { LogTrace("L1TGlobal") @@ -2021,11 +2021,11 @@ const bool l1t::CorrWithOverlapRemovalCondition::evaluateCondition(const int bxE double tbptSqPhy = et0Phy*et0Phy + et1Phy*et1Phy + 2*et0Phy*et1Phy*(cosPhi1Phy*cosPhi2Phy + sinPhi1Phy*sinPhi2Phy); // get values from LUT's - std::string lutName0 = lutObj0; + const std::string& lutName0 = lutObj0; unsigned int precCosLUT0 = m_gtScales->getPrec_Cos(lutName0); unsigned int precSinLUT0 = m_gtScales->getPrec_Sin(lutName0); - std::string lutName1 = lutObj1; + const std::string& lutName1 = lutObj1; unsigned int precCosLUT1 = m_gtScales->getPrec_Cos(lutName1); unsigned int precSinLUT1 = m_gtScales->getPrec_Sin(lutName1); @@ -2228,11 +2228,11 @@ const l1t::L1Candidate* l1t::CorrWithOverlapRemovalCondition::getCandidate(const return (m_uGtB->getCandL1Tau())->at(bx,indexCand); break; default: - return 0; + return nullptr; break; } - return 0; + return nullptr; } /** diff --git a/L1Trigger/L1TGlobal/src/GlobalBoard.cc b/L1Trigger/L1TGlobal/src/GlobalBoard.cc index 69a719a45be7f..f2f2c0f74a6ef 100644 --- a/L1Trigger/L1TGlobal/src/GlobalBoard.cc +++ b/L1Trigger/L1TGlobal/src/GlobalBoard.cc @@ -632,8 +632,8 @@ void l1t::GlobalBoard::runGTL( const int cond0Ind = corrTemplate->cond0Index(); const int cond1Ind = corrTemplate->cond1Index(); - const GlobalCondition* cond0Condition = 0; - const GlobalCondition* cond1Condition = 0; + const GlobalCondition* cond0Condition = nullptr; + const GlobalCondition* cond1Condition = nullptr; // maximum number of objects received for evaluation of l1t::Type1s condition int cond0NrL1Objects = 0; @@ -712,9 +712,9 @@ void l1t::GlobalBoard::runGTL( const int cond1Ind = corrTemplate->cond1Index(); const int cond2Ind = corrTemplate->cond2Index(); - const GlobalCondition* cond0Condition = 0; - const GlobalCondition* cond1Condition = 0; - const GlobalCondition* cond2Condition = 0; + const GlobalCondition* cond0Condition = nullptr; + const GlobalCondition* cond1Condition = nullptr; + const GlobalCondition* cond2Condition = nullptr; // maximum number of objects received for evaluation of l1t::Type1s condition int cond0NrL1Objects = 0; @@ -921,7 +921,7 @@ void l1t::GlobalBoard::runGTL( itCond != itCondOnChip->end(); itCond++) { delete itCond->second; - itCond->second = 0; + itCond->second = nullptr; } } diff --git a/L1Trigger/L1TGlobal/src/GlobalDefinitions.cc b/L1Trigger/L1TGlobal/src/GlobalDefinitions.cc index f01aa4f669615..e1696e03a1adf 100644 --- a/L1Trigger/L1TGlobal/src/GlobalDefinitions.cc +++ b/L1Trigger/L1TGlobal/src/GlobalDefinitions.cc @@ -48,7 +48,7 @@ constexpr char const*valueToKey(T value, entry const *entries) { constexpr entry l1GtBoardTypeStringToEnumMap[] = { {"l1t::MP7", l1t::MP7}, {"l1t::BoardNull", l1t::BoardNull}, - {0, (l1t::L1GtBoardType)-1} + {nullptr, (l1t::L1GtBoardType)-1} }; @@ -72,7 +72,7 @@ constexpr entry l1GtConditionTypeStringToEnumMap[] = { {"l1t::TypeMinBiasHFP1", l1t::TypeMinBiasHFP1}, {"l1t::TypeMinBiasHFM1", l1t::TypeMinBiasHFM1}, {"l1t::TypeExternal", l1t::TypeExternal}, - {0, (l1t::GtConditionType) - 1}, + {nullptr, (l1t::GtConditionType) - 1}, {"l1t::Type2corWithOverlapRemoval", l1t::Type2corWithOverlapRemoval} }; @@ -85,7 +85,7 @@ constexpr entry l1GtConditionCategoryStringToEnumMap[] {"l1t::CondEnergySum", l1t::CondEnergySum}, {"l1t::CondCorrelation", l1t::CondCorrelation}, {"l1t::CondExternal", l1t::CondExternal}, - {0, (l1t::GtConditionCategory) - 1}, + {nullptr, (l1t::GtConditionCategory) - 1}, {"l1t::CondCorrelationWithOverlapRemoval", l1t::CondCorrelationWithOverlapRemoval} }; diff --git a/L1Trigger/L1TGlobal/src/GlobalParamsHelper.cc b/L1Trigger/L1TGlobal/src/GlobalParamsHelper.cc index 7cbd93df875b9..073056fd90697 100644 --- a/L1Trigger/L1TGlobal/src/GlobalParamsHelper.cc +++ b/L1Trigger/L1TGlobal/src/GlobalParamsHelper.cc @@ -21,7 +21,7 @@ GlobalParamsHelper::GlobalParamsHelper(L1TGlobalParameters * w) { read_ = write_; } -GlobalParamsHelper::GlobalParamsHelper(const L1TGlobalParameters * es) {read_ = es; write_=NULL;} +GlobalParamsHelper::GlobalParamsHelper(const L1TGlobalParameters * es) {read_ = es; write_=nullptr;} void GlobalParamsHelper::useCopy(){ write_ = new L1TGlobalParameters(*read_); diff --git a/L1Trigger/L1TGlobal/src/PrescalesVetosHelper.cc b/L1Trigger/L1TGlobal/src/PrescalesVetosHelper.cc index 38f3df5b81454..d440560efcd4f 100644 --- a/L1Trigger/L1TGlobal/src/PrescalesVetosHelper.cc +++ b/L1Trigger/L1TGlobal/src/PrescalesVetosHelper.cc @@ -21,7 +21,7 @@ PrescalesVetosHelper::PrescalesVetosHelper(L1TGlobalPrescalesVetos * w) { read_ = write_; } -PrescalesVetosHelper::PrescalesVetosHelper(const L1TGlobalPrescalesVetos * es) {read_ = es; write_=NULL;} +PrescalesVetosHelper::PrescalesVetosHelper(const L1TGlobalPrescalesVetos * es) {read_ = es; write_=nullptr;} void PrescalesVetosHelper::useCopy(){ write_ = new L1TGlobalPrescalesVetos(*read_); diff --git a/L1Trigger/L1THGCal/interface/HGCalTriggerBackendAlgorithmBase.h b/L1Trigger/L1THGCal/interface/HGCalTriggerBackendAlgorithmBase.h index b635a1d54759e..98254ce7c0282 100644 --- a/L1Trigger/L1THGCal/interface/HGCalTriggerBackendAlgorithmBase.h +++ b/L1Trigger/L1THGCal/interface/HGCalTriggerBackendAlgorithmBase.h @@ -70,7 +70,7 @@ namespace HGCalTriggerBackend { HGCalTriggerBackendAlgorithmBase(conf, cc), codec_(conf.getParameterSet("FECodec")){ } - virtual void setGeometry(const HGCalTriggerGeometryBase* const geom) override final { + void setGeometry(const HGCalTriggerGeometryBase* const geom) final { HGCalTriggerBackendAlgorithmBase::setGeometry(geom); codec_.setGeometry(geom); } diff --git a/L1Trigger/L1THGCal/interface/HGCalTriggerFECodecBase.h b/L1Trigger/L1THGCal/interface/HGCalTriggerFECodecBase.h index a6ed9be9b148c..0544d64e13e5b 100644 --- a/L1Trigger/L1THGCal/interface/HGCalTriggerFECodecBase.h +++ b/L1Trigger/L1THGCal/interface/HGCalTriggerFECodecBase.h @@ -75,7 +75,7 @@ namespace HGCalTriggerFE { // mark these as final since at this level we know // the implementation of the codec - virtual void encode(l1t::HGCFETriggerDigi& digi) override final { + void encode(l1t::HGCFETriggerDigi& digi) final { if( !dataIsSet_ ) { edm::LogWarning("HGCalTriggerFECodec|NoDataPayload") << "No data payload was set for HGCTriggerFECodec: " @@ -83,7 +83,7 @@ namespace HGCalTriggerFE { } digi.encode(static_cast(*this),data_); } - virtual void decode(const l1t::HGCFETriggerDigi& digi) override final { + void decode(const l1t::HGCFETriggerDigi& digi) final { if( dataIsSet_ ) { edm::LogWarning("HGCalTriggerFECodec|OverwritePayload") << "Data payload was already set for HGCTriggerFECodec: " @@ -93,9 +93,9 @@ namespace HGCalTriggerFE { dataIsSet_ = true; } - virtual void setDataPayload(const HGCEEDigiCollection& ee, + void setDataPayload(const HGCEEDigiCollection& ee, const HGCHEDigiCollection& fh, - const HGCBHDigiCollection& bh ) override final { + const HGCBHDigiCollection& bh ) final { if( dataIsSet_ ) { edm::LogWarning("HGCalTriggerFECodec|OverwritePayload") << "Data payload was already set for HGCTriggerFECodec: " @@ -109,7 +109,7 @@ namespace HGCalTriggerFE { dataIsSet_ = true; } - virtual void setDataPayload(const l1t::HGCFETriggerDigi& digi) override final { + void setDataPayload(const l1t::HGCFETriggerDigi& digi) final { if( dataIsSet_ ) { edm::LogWarning("HGCalTriggerFECodec|OverwritePayload") << "Data payload was already set for HGCTriggerFECodec: " @@ -123,16 +123,16 @@ namespace HGCalTriggerFE { dataIsSet_ = true; } - virtual void unSetDataPayload() override final { + void unSetDataPayload() final { data_.reset(); dataIsSet_ = false; } - std::vector getDataPayload() const override final { + std::vector getDataPayload() const final { return this->encode(data_); } - virtual void print(const l1t::HGCFETriggerDigi& digi, - std::ostream& out = std::cout) const override final { + void print(const l1t::HGCFETriggerDigi& digi, + std::ostream& out = std::cout) const final { digi.print(static_cast(*this),out); } diff --git a/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryGenericMapping.h b/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryGenericMapping.h index cd1669036358e..7d99c9d72d53b 100644 --- a/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryGenericMapping.h +++ b/L1Trigger/L1THGCal/interface/HGCalTriggerGeometryGenericMapping.h @@ -116,29 +116,29 @@ class HGCalTriggerGeometryGenericMapping : public HGCalTriggerGeometryBase { typedef std::unordered_map > trigger_cell_map; HGCalTriggerGeometryGenericMapping(const edm::ParameterSet& conf); - virtual ~HGCalTriggerGeometryGenericMapping() {} + ~HGCalTriggerGeometryGenericMapping() override {} // non-const access to the geometry class - virtual void reset() override final; + void reset() final; - virtual unsigned getTriggerCellFromCell( const unsigned cell_det_id ) const override final; - virtual unsigned getModuleFromCell( const unsigned cell_det_id ) const override final; - virtual unsigned getModuleFromTriggerCell( const unsigned trigger_cell_det_id ) const override final; + unsigned getTriggerCellFromCell( const unsigned cell_det_id ) const final; + unsigned getModuleFromCell( const unsigned cell_det_id ) const final; + unsigned getModuleFromTriggerCell( const unsigned trigger_cell_det_id ) const final; - virtual geom_set getCellsFromTriggerCell( const unsigned cell_det_id ) const override final; - virtual geom_set getCellsFromModule( const unsigned cell_det_id ) const override final; - virtual geom_set getTriggerCellsFromModule( const unsigned trigger_cell_det_id ) const override final; + geom_set getCellsFromTriggerCell( const unsigned cell_det_id ) const final; + geom_set getCellsFromModule( const unsigned cell_det_id ) const final; + geom_set getTriggerCellsFromModule( const unsigned trigger_cell_det_id ) const final; - virtual geom_ordered_set getOrderedCellsFromModule( const unsigned cell_det_id ) const override final; - virtual geom_ordered_set getOrderedTriggerCellsFromModule( const unsigned trigger_cell_det_id ) const override final; + geom_ordered_set getOrderedCellsFromModule( const unsigned cell_det_id ) const final; + geom_ordered_set getOrderedTriggerCellsFromModule( const unsigned trigger_cell_det_id ) const final; - virtual geom_set getNeighborsFromTriggerCell( const unsigned trigger_cell_det_id ) const override final; + geom_set getNeighborsFromTriggerCell( const unsigned trigger_cell_det_id ) const final; - virtual GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const override final; - virtual GlobalPoint getModulePosition(const unsigned module_det_id) const override final; + GlobalPoint getTriggerCellPosition(const unsigned trigger_cell_det_id) const final; + GlobalPoint getModulePosition(const unsigned module_det_id) const final; - virtual bool validTriggerCell( const unsigned trigger_cell_det_id ) const override final; - virtual bool disconnectedModule(const unsigned module_id) const override final; + bool validTriggerCell( const unsigned trigger_cell_det_id ) const final; + bool disconnectedModule(const unsigned module_id) const final; protected: geom_map cells_to_trigger_cells_; diff --git a/L1Trigger/L1THGCal/interface/be_algorithms/HGCalTriggerCellCalibration.h b/L1Trigger/L1THGCal/interface/be_algorithms/HGCalTriggerCellCalibration.h index 53d554b69754d..866bf8ddd8fcc 100644 --- a/L1Trigger/L1THGCal/interface/be_algorithms/HGCalTriggerCellCalibration.h +++ b/L1Trigger/L1THGCal/interface/be_algorithms/HGCalTriggerCellCalibration.h @@ -1,7 +1,7 @@ #ifndef __L1Trigger_L1THGCal_HGCalTriggerCellCalibration_h__ #define __L1Trigger_L1THGCal_HGCalTriggerCellCalibration_h__ -#include +#include #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/ESHandle.h" #include "DataFormats/Common/interface/Handle.h" diff --git a/L1Trigger/L1THGCal/plugins/HGCalTriggerDigiFEReproducer.cc b/L1Trigger/L1THGCal/plugins/HGCalTriggerDigiFEReproducer.cc index 4f87df7ab1dda..682b71e1100d3 100644 --- a/L1Trigger/L1THGCal/plugins/HGCalTriggerDigiFEReproducer.cc +++ b/L1Trigger/L1THGCal/plugins/HGCalTriggerDigiFEReproducer.cc @@ -22,10 +22,10 @@ class HGCalTriggerDigiFEReproducer : public edm::stream::EDProducer<> { public: HGCalTriggerDigiFEReproducer(const edm::ParameterSet&); - ~HGCalTriggerDigiFEReproducer() { } + ~HGCalTriggerDigiFEReproducer() override { } - virtual void beginRun(const edm::Run&, const edm::EventSetup&); - virtual void produce(edm::Event&, const edm::EventSetup&); + void beginRun(const edm::Run&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; private: // inputs diff --git a/L1Trigger/L1THGCal/plugins/HGCalTriggerDigiProducer.cc b/L1Trigger/L1THGCal/plugins/HGCalTriggerDigiProducer.cc index 0e3c50e66726b..142b251eb3d10 100644 --- a/L1Trigger/L1THGCal/plugins/HGCalTriggerDigiProducer.cc +++ b/L1Trigger/L1THGCal/plugins/HGCalTriggerDigiProducer.cc @@ -20,11 +20,11 @@ class HGCalTriggerDigiProducer : public edm::stream::EDProducer<> { public: HGCalTriggerDigiProducer(const edm::ParameterSet&); - ~HGCalTriggerDigiProducer() { } + ~HGCalTriggerDigiProducer() override { } - virtual void beginRun(const edm::Run&, - const edm::EventSetup&); - virtual void produce(edm::Event&, const edm::EventSetup&); + void beginRun(const edm::Run&, + const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; private: // inputs diff --git a/L1Trigger/L1THGCal/plugins/HGCalTriggerGeometryESProducer.cc b/L1Trigger/L1THGCal/plugins/HGCalTriggerGeometryESProducer.cc index 672d7b1ac9cb4..99b6d737b3ecd 100644 --- a/L1Trigger/L1THGCal/plugins/HGCalTriggerGeometryESProducer.cc +++ b/L1Trigger/L1THGCal/plugins/HGCalTriggerGeometryESProducer.cc @@ -14,7 +14,7 @@ class HGCalTriggerGeometryESProducer : public edm::ESProducer { public: HGCalTriggerGeometryESProducer(const edm::ParameterSet&); - ~HGCalTriggerGeometryESProducer(); + ~HGCalTriggerGeometryESProducer() override; typedef std::unique_ptr ReturnType; diff --git a/L1Trigger/L1THGCal/plugins/be_algorithms/FullModuleSumAlgo.cc b/L1Trigger/L1THGCal/plugins/be_algorithms/FullModuleSumAlgo.cc index 2766050e0bdbc..bc299b2f144b9 100644 --- a/L1Trigger/L1THGCal/plugins/be_algorithms/FullModuleSumAlgo.cc +++ b/L1Trigger/L1THGCal/plugins/be_algorithms/FullModuleSumAlgo.cc @@ -24,18 +24,18 @@ class FullModuleSumAlgo : public Algorithm cluster_product_( new l1t::HGCalClusterBxCollection ) {} - virtual void setProduces(edm::stream::EDProducer<>& prod) const override final + void setProduces(edm::stream::EDProducer<>& prod) const final { prod.produces(name()); } - virtual void run(const l1t::HGCFETriggerDigiCollection& coll, const edm::EventSetup& es, edm::Event&evt ) override final; - virtual void putInEvent(edm::Event& evt) override final + void run(const l1t::HGCFETriggerDigiCollection& coll, const edm::EventSetup& es, edm::Event&evt ) final; + void putInEvent(edm::Event& evt) final { evt.put(std::move(cluster_product_),name()); } - virtual void reset() override final + void reset() final { cluster_product_.reset( new l1t::HGCalClusterBxCollection ); } diff --git a/L1Trigger/L1THGCal/plugins/be_algorithms/HGCClusterAlgo.cc b/L1Trigger/L1THGCal/plugins/be_algorithms/HGCClusterAlgo.cc index 825cd76676de3..bfd8040e783b2 100644 --- a/L1Trigger/L1THGCal/plugins/be_algorithms/HGCClusterAlgo.cc +++ b/L1Trigger/L1THGCal/plugins/be_algorithms/HGCClusterAlgo.cc @@ -55,23 +55,23 @@ class HGCClusterAlgo : public Algorithm } - virtual void setProduces(edm::stream::EDProducer<>& prod) const override final + void setProduces(edm::stream::EDProducer<>& prod) const final { prod.produces( "calibratedTriggerCells" ); prod.produces( "cluster2D" ); prod.produces( "cluster3D" ); } - virtual void run(const l1t::HGCFETriggerDigiCollection& coll, const edm::EventSetup& es, edm::Event&evt ) override final; + void run(const l1t::HGCFETriggerDigiCollection& coll, const edm::EventSetup& es, edm::Event&evt ) final; - virtual void putInEvent(edm::Event& evt) override final + void putInEvent(edm::Event& evt) final { } - virtual void reset() override final + void reset() final { trgcell_product_.reset( new l1t::HGCalTriggerCellBxCollection ); cluster_product_.reset( new l1t::HGCalClusterBxCollection ); diff --git a/L1Trigger/L1THGCal/plugins/be_algorithms/HGCalSimCluster.cc b/L1Trigger/L1THGCal/plugins/be_algorithms/HGCalSimCluster.cc index b03001a339691..905d237dabef3 100644 --- a/L1Trigger/L1THGCal/plugins/be_algorithms/HGCalSimCluster.cc +++ b/L1Trigger/L1THGCal/plugins/be_algorithms/HGCalSimCluster.cc @@ -128,28 +128,28 @@ namespace HGCalTriggerBackend{ } // setProduces - virtual void setProduces(edm::stream::EDProducer<>& prod) const override final + void setProduces(edm::stream::EDProducer<>& prod) const final { prod.produces(name()); } // putInEvent - virtual void putInEvent(edm::Event& evt) override final + void putInEvent(edm::Event& evt) final { evt.put(std::move(cluster_product_),name()); } //reset - virtual void reset() override final + void reset() final { cluster_product_.reset( new l1t::HGCalClusterBxCollection ); } // run, actual algorithm - virtual void run( const l1t::HGCFETriggerDigiCollection & coll, + void run( const l1t::HGCFETriggerDigiCollection & coll, const edm::EventSetup& es, edm::Event&evt - ) + ) override { //0.5. Get Digis, construct a map, detid -> energy diff --git a/L1Trigger/L1THGCal/plugins/be_algorithms/RandomClusterAlgo.cc b/L1Trigger/L1THGCal/plugins/be_algorithms/RandomClusterAlgo.cc index fcb883d10af9d..6810e672af64d 100644 --- a/L1Trigger/L1THGCal/plugins/be_algorithms/RandomClusterAlgo.cc +++ b/L1Trigger/L1THGCal/plugins/be_algorithms/RandomClusterAlgo.cc @@ -13,20 +13,20 @@ class RandomClusterAlgo : public Algorithm { cluster_product_( new l1t::HGCalClusterBxCollection ){ } - virtual void setProduces(edm::stream::EDProducer<>& prod) const override final { + void setProduces(edm::stream::EDProducer<>& prod) const final { prod.produces(name()); } - virtual void run(const l1t::HGCFETriggerDigiCollection& coll, + void run(const l1t::HGCFETriggerDigiCollection& coll, const edm::EventSetup& es, edm::Event&evt - ) override final; + ) final; - virtual void putInEvent(edm::Event& evt) override final { + void putInEvent(edm::Event& evt) final { evt.put(std::move(cluster_product_),name()); } - virtual void reset() override final { + void reset() final { cluster_product_.reset( new l1t::HGCalClusterBxCollection ); } diff --git a/L1Trigger/L1THGCal/plugins/be_algorithms/SingleCellClusterAlgo.cc b/L1Trigger/L1THGCal/plugins/be_algorithms/SingleCellClusterAlgo.cc index 6a36c61b56c77..21b895df326c5 100644 --- a/L1Trigger/L1THGCal/plugins/be_algorithms/SingleCellClusterAlgo.cc +++ b/L1Trigger/L1THGCal/plugins/be_algorithms/SingleCellClusterAlgo.cc @@ -24,14 +24,14 @@ class SingleCellClusterAlgo : public Algorithm typedef std::unique_ptr ReturnType; - virtual void setProduces(edm::stream::EDProducer<>& prod) const override final + void setProduces(edm::stream::EDProducer<>& prod) const final { prod.produces(name()); } - virtual void run(const l1t::HGCFETriggerDigiCollection& coll, const edm::EventSetup& es, + void run(const l1t::HGCFETriggerDigiCollection& coll, const edm::EventSetup& es, edm::Event&evt - ) override final + ) final { for( const auto& digi : coll ) @@ -54,12 +54,12 @@ class SingleCellClusterAlgo : public Algorithm } } - virtual void putInEvent(edm::Event& evt) override final + void putInEvent(edm::Event& evt) final { evt.put(std::move(cluster_product_),name()); } - virtual void reset() override final + void reset() final { cluster_product_.reset( new l1t::HGCalTriggerCellBxCollection ); } diff --git a/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalBestChoiceCodec.cc b/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalBestChoiceCodec.cc index fb2645f9fbe16..79533987048b6 100644 --- a/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalBestChoiceCodec.cc +++ b/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalBestChoiceCodec.cc @@ -25,7 +25,7 @@ void HGCalBestChoiceCodec::setDataPayloadImpl(const HGCEEDigiCollection& ee, std::vector> dataframes; std::vector > linearized_dataframes; // convert ee and fh hit collections into the same object - if(ee.size()>0) + if(!ee.empty()) { for(const auto& eedata : ee) { @@ -36,7 +36,7 @@ void HGCalBestChoiceCodec::setDataPayloadImpl(const HGCEEDigiCollection& ee, } } } - else if(fh.size()>0) + else if(!fh.empty()) { for(const auto& fhdata : fh) { diff --git a/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalTriggerCellBestChoiceCodec.cc b/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalTriggerCellBestChoiceCodec.cc index 1ccbda3aec3b0..e17d0b397a870 100644 --- a/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalTriggerCellBestChoiceCodec.cc +++ b/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalTriggerCellBestChoiceCodec.cc @@ -24,7 +24,7 @@ setDataPayloadImpl(const HGCEEDigiCollection& ee, std::vector> dataframes; std::vector > linearized_dataframes; // convert ee and fh hit collections into the same object - if(ee.size()>0) + if(!ee.empty()) { for(const auto& eedata : ee) { @@ -35,7 +35,7 @@ setDataPayloadImpl(const HGCEEDigiCollection& ee, } } } - else if(fh.size()>0) + else if(!fh.empty()) { for(const auto& fhdata : fh) { diff --git a/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalTriggerCellThresholdCodec.cc b/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalTriggerCellThresholdCodec.cc index 09c766950a2ba..ddf8b930abf1d 100644 --- a/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalTriggerCellThresholdCodec.cc +++ b/L1Trigger/L1THGCal/plugins/fe_codecs/HGCalTriggerCellThresholdCodec.cc @@ -24,7 +24,7 @@ setDataPayloadImpl(const HGCEEDigiCollection& ee, std::vector> dataframes; std::vector > linearized_dataframes; // convert ee, fh and bh hit collections into the same object - if(ee.size()>0) + if(!ee.empty()) { for(const auto& eedata : ee) { @@ -35,7 +35,7 @@ setDataPayloadImpl(const HGCEEDigiCollection& ee, } } } - else if(fh.size()>0) + else if(!fh.empty()) { for(const auto& fhdata : fh) { @@ -46,7 +46,7 @@ setDataPayloadImpl(const HGCEEDigiCollection& ee, } } } - else if(bh.size()>0) + else if(!bh.empty()) { for(const auto& bhdata : bh) { diff --git a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp1.cc b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp1.cc index 072db9f2d3cd8..2cf4c02d9fa42 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp1.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp1.cc @@ -14,7 +14,7 @@ class HGCalTriggerGeometryHexImp1 : public HGCalTriggerGeometryGenericMapping public: HGCalTriggerGeometryHexImp1(const edm::ParameterSet& conf); - virtual void initialize(const edm::ESHandle& ) override final; + void initialize(const edm::ESHandle& ) final; private: edm::FileInPath l1tCellsMapping_; diff --git a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp2.cc b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp2.cc index 42f18985e86f8..7ded61b9fe124 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp2.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexImp2.cc @@ -15,27 +15,27 @@ class HGCalTriggerGeometryHexImp2 : public HGCalTriggerGeometryBase public: HGCalTriggerGeometryHexImp2(const edm::ParameterSet& conf); - virtual void initialize(const edm::ESHandle& ) override final; - virtual void reset() override final; + void initialize(const edm::ESHandle& ) final; + void reset() final; - virtual unsigned getTriggerCellFromCell( const unsigned ) const override final; - virtual unsigned getModuleFromCell( const unsigned ) const override final; - virtual unsigned getModuleFromTriggerCell( const unsigned ) const override final; + unsigned getTriggerCellFromCell( const unsigned ) const final; + unsigned getModuleFromCell( const unsigned ) const final; + unsigned getModuleFromTriggerCell( const unsigned ) const final; - virtual geom_set getCellsFromTriggerCell( const unsigned ) const override final; - virtual geom_set getCellsFromModule( const unsigned ) const override final; - virtual geom_set getTriggerCellsFromModule( const unsigned ) const override final; + geom_set getCellsFromTriggerCell( const unsigned ) const final; + geom_set getCellsFromModule( const unsigned ) const final; + geom_set getTriggerCellsFromModule( const unsigned ) const final; - virtual geom_ordered_set getOrderedCellsFromModule( const unsigned ) const override final; - virtual geom_ordered_set getOrderedTriggerCellsFromModule( const unsigned ) const override final; + geom_ordered_set getOrderedCellsFromModule( const unsigned ) const final; + geom_ordered_set getOrderedTriggerCellsFromModule( const unsigned ) const final; - virtual geom_set getNeighborsFromTriggerCell( const unsigned ) const override final; + geom_set getNeighborsFromTriggerCell( const unsigned ) const final; - virtual GlobalPoint getTriggerCellPosition(const unsigned ) const override final; - virtual GlobalPoint getModulePosition(const unsigned ) const override final; + GlobalPoint getTriggerCellPosition(const unsigned ) const final; + GlobalPoint getModulePosition(const unsigned ) const final; - virtual bool validTriggerCell( const unsigned ) const override final; - virtual bool disconnectedModule(const unsigned) const override final; + bool validTriggerCell( const unsigned ) const final; + bool disconnectedModule(const unsigned) const final; private: edm::FileInPath l1tCellsMapping_; @@ -467,7 +467,7 @@ getTriggerCellPosition(const unsigned trigger_cell_det_id) const // Position: barycenter of the trigger cell. Basic3DVector triggerCellVector(0.,0.,0.); const auto cell_ids = getCellsFromTriggerCell(trigger_cell_det_id); - if(cell_ids.size()==0) return GlobalPoint(0,0,0); + if(cell_ids.empty()) return GlobalPoint(0,0,0); for(const auto& cell : cell_ids) { HGCalDetId cellDetId(cell); @@ -484,7 +484,7 @@ getModulePosition(const unsigned module_det_id) const // Position: barycenter of the module. Basic3DVector moduleVector(0.,0.,0.); const auto cell_ids = getCellsFromModule(module_det_id); - if(cell_ids.size()==0) return GlobalPoint(0,0,0); + if(cell_ids.empty()) return GlobalPoint(0,0,0); for(const auto& cell : cell_ids) { HGCalDetId cellDetId(cell); @@ -611,7 +611,7 @@ fillNeighborMaps() std::vector neighbors_tokens { std::sregex_token_iterator(line.begin(), line.end(), neighbors_regex), {} }; - if(neighbors_tokens.size()==0) + if(neighbors_tokens.empty()) { throw cms::Exception("BadGeometry") << "Syntax error in the L1TCellNeighborsMapping:\n" diff --git a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexLayerBasedImp1.cc b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexLayerBasedImp1.cc index f0e2fe0212095..5642111ee4e2a 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexLayerBasedImp1.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryHexLayerBasedImp1.cc @@ -16,27 +16,27 @@ class HGCalTriggerGeometryHexLayerBasedImp1 : public HGCalTriggerGeometryBase public: HGCalTriggerGeometryHexLayerBasedImp1(const edm::ParameterSet& conf); - virtual void initialize(const edm::ESHandle& ) override final; - virtual void reset() override final; + void initialize(const edm::ESHandle& ) final; + void reset() final; - virtual unsigned getTriggerCellFromCell( const unsigned ) const override final; - virtual unsigned getModuleFromCell( const unsigned ) const override final; - virtual unsigned getModuleFromTriggerCell( const unsigned ) const override final; + unsigned getTriggerCellFromCell( const unsigned ) const final; + unsigned getModuleFromCell( const unsigned ) const final; + unsigned getModuleFromTriggerCell( const unsigned ) const final; - virtual geom_set getCellsFromTriggerCell( const unsigned ) const override final; - virtual geom_set getCellsFromModule( const unsigned ) const override final; - virtual geom_set getTriggerCellsFromModule( const unsigned ) const override final; + geom_set getCellsFromTriggerCell( const unsigned ) const final; + geom_set getCellsFromModule( const unsigned ) const final; + geom_set getTriggerCellsFromModule( const unsigned ) const final; - virtual geom_ordered_set getOrderedCellsFromModule( const unsigned ) const override final; - virtual geom_ordered_set getOrderedTriggerCellsFromModule( const unsigned ) const override final; + geom_ordered_set getOrderedCellsFromModule( const unsigned ) const final; + geom_ordered_set getOrderedTriggerCellsFromModule( const unsigned ) const final; - virtual geom_set getNeighborsFromTriggerCell( const unsigned ) const override final; + geom_set getNeighborsFromTriggerCell( const unsigned ) const final; - virtual GlobalPoint getTriggerCellPosition(const unsigned ) const override final; - virtual GlobalPoint getModulePosition(const unsigned ) const override final; + GlobalPoint getTriggerCellPosition(const unsigned ) const final; + GlobalPoint getModulePosition(const unsigned ) const final; - virtual bool validTriggerCell( const unsigned ) const override final; - virtual bool disconnectedModule(const unsigned) const override final; + bool validTriggerCell( const unsigned ) const final; + bool disconnectedModule(const unsigned) const final; private: edm::FileInPath l1tCellsMapping_; @@ -549,7 +549,7 @@ fillNeighborMaps(const edm::FileInPath& file, std::unordered_map key_tokens { std::sregex_token_iterator(line.begin(), line.end(), key_regex), {} }; - if(key_tokens.size()<1) + if(key_tokens.empty()) { throw cms::Exception("BadGeometry") << "Syntax error in the L1TCellNeighborsMapping:\n" diff --git a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryImp1.cc b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryImp1.cc index ce235619c49c6..95bca8cf1757f 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryImp1.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/HGCalTriggerGeometryImp1.cc @@ -13,7 +13,7 @@ class HGCalTriggerGeometryImp1 : public HGCalTriggerGeometryGenericMapping public: HGCalTriggerGeometryImp1(const edm::ParameterSet& conf); - virtual void initialize(const edm::ESHandle& ) override final; + void initialize(const edm::ESHandle& ) final; private: edm::FileInPath l1tCellsMapping_; diff --git a/L1Trigger/L1THGCal/plugins/geometries/NullGeometry.cc b/L1Trigger/L1THGCal/plugins/geometries/NullGeometry.cc index 3bd6439bb46fc..49dfd6d3f5bdd 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/NullGeometry.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/NullGeometry.cc @@ -6,7 +6,7 @@ class NullGeometry : public HGCalTriggerGeometryGenericMapping { HGCalTriggerGeometryGenericMapping(conf) { } - virtual void initialize(const edm::ESHandle& ) override final {} + void initialize(const edm::ESHandle& ) final {} }; DEFINE_EDM_PLUGIN(HGCalTriggerGeometryFactory, diff --git a/L1Trigger/L1THGCal/plugins/geometries/TrivialGeometry.cc b/L1Trigger/L1THGCal/plugins/geometries/TrivialGeometry.cc index 2d9d9b9b473e6..a8ca472c87bc6 100644 --- a/L1Trigger/L1THGCal/plugins/geometries/TrivialGeometry.cc +++ b/L1Trigger/L1THGCal/plugins/geometries/TrivialGeometry.cc @@ -6,7 +6,7 @@ class TrivialGeometry : public HGCalTriggerGeometryGenericMapping { HGCalTriggerGeometryGenericMapping(conf) { } - virtual void initialize(const edm::ESHandle& ) override final { + void initialize(const edm::ESHandle& ) final { constexpr unsigned nmodules = 6; for( unsigned i = 0; i < nmodules; ++i ) { trigger_cells_to_modules_[i] = i; diff --git a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleEvent.cc b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleEvent.cc index c9197c5a21dbc..aa94870fd1f28 100644 --- a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleEvent.cc +++ b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleEvent.cc @@ -5,11 +5,11 @@ class HGCalTriggerNtupleEvent : public HGCalTriggerNtupleBase public: HGCalTriggerNtupleEvent(const edm::ParameterSet&); - virtual void initialize(TTree&,const edm::ParameterSet&, edm::ConsumesCollector &&) override final; - virtual void fill(const edm::Event&,const edm::EventSetup&) override final; + void initialize(TTree&,const edm::ParameterSet&, edm::ConsumesCollector &&) final; + void fill(const edm::Event&,const edm::EventSetup&) final; private: - virtual void clear() override final; + void clear() final; int run_; int event_; diff --git a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGen.cc b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGen.cc index e229c617adf46..0a98742950076 100644 --- a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGen.cc +++ b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGen.cc @@ -9,11 +9,11 @@ class HGCalTriggerNtupleGen : public HGCalTriggerNtupleBase public: HGCalTriggerNtupleGen(const edm::ParameterSet& ); - virtual void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) override final; - virtual void fill(const edm::Event&, const edm::EventSetup& ) override final; + void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) final; + void fill(const edm::Event&, const edm::EventSetup& ) final; private: - virtual void clear() override final; + void clear() final; edm::EDGetToken gen_token_; int gen_n_; diff --git a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGenJet.cc b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGenJet.cc index 0b43f6ccb3fba..ba0e3ade042d0 100644 --- a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGenJet.cc +++ b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGenJet.cc @@ -12,11 +12,11 @@ class HGCalTriggerNtupleGenJet : public HGCalTriggerNtupleBase public: HGCalTriggerNtupleGenJet(const edm::ParameterSet& ); - virtual void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) override final; - virtual void fill(const edm::Event&, const edm::EventSetup& ) override final; + void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) final; + void fill(const edm::Event&, const edm::EventSetup& ) final; private: - virtual void clear() override final; + void clear() final; edm::EDGetToken genjet_token_; diff --git a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGenTau.cc b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGenTau.cc index 364db91486dfd..1d4bacf25dddc 100644 --- a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGenTau.cc +++ b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleGenTau.cc @@ -12,11 +12,11 @@ class HGCalTriggerNtupleGenTau : public HGCalTriggerNtupleBase public: HGCalTriggerNtupleGenTau(const edm::ParameterSet& ); - virtual void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) override final; - virtual void fill(const edm::Event&, const edm::EventSetup& ) override final; + void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) final; + void fill(const edm::Event&, const edm::EventSetup& ) final; private: - virtual void clear() override final; + void clear() final; bool isGoodTau( const reco::GenParticle& candidate ) const; bool isStableLepton( const reco::GenParticle & daughter ) const; diff --git a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCClusters.cc b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCClusters.cc index 5ba066a2453e7..8cc272defafce 100644 --- a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCClusters.cc +++ b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCClusters.cc @@ -13,12 +13,12 @@ class HGCalTriggerNtupleHGCClusters : public HGCalTriggerNtupleBase public: HGCalTriggerNtupleHGCClusters(const edm::ParameterSet& conf); - ~HGCalTriggerNtupleHGCClusters(){}; - virtual void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) override final; - virtual void fill(const edm::Event& e, const edm::EventSetup& es) override final; + ~HGCalTriggerNtupleHGCClusters() override{}; + void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) final; + void fill(const edm::Event& e, const edm::EventSetup& es) final; private: - virtual void clear() override final; + void clear() final; edm::EDGetToken clusters_token_; diff --git a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCDigis.cc b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCDigis.cc index c6e98cb712c85..767d13bd35085 100644 --- a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCDigis.cc +++ b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCDigis.cc @@ -19,13 +19,13 @@ class HGCalTriggerNtupleHGCDigis : public HGCalTriggerNtupleBase public: HGCalTriggerNtupleHGCDigis(const edm::ParameterSet& conf); - ~HGCalTriggerNtupleHGCDigis(){}; - virtual void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) override final; - virtual void fill(const edm::Event& e, const edm::EventSetup& es) override final; + ~HGCalTriggerNtupleHGCDigis() override{}; + void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) final; + void fill(const edm::Event& e, const edm::EventSetup& es) final; private: void simhits(const edm::Event& e, std::unordered_map& simhits_ee, std::unordered_map& simhits_fh, std::unordered_map& simhits_bh); - virtual void clear() override final; + void clear() final; edm::EDGetToken ee_token_, fh_token_, bh_token_; bool is_Simhit_comp_; diff --git a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCMulticlusters.cc b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCMulticlusters.cc index 775c070810e74..38d87f3e13286 100644 --- a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCMulticlusters.cc +++ b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCMulticlusters.cc @@ -12,12 +12,12 @@ class HGCalTriggerNtupleHGCMulticlusters : public HGCalTriggerNtupleBase public: HGCalTriggerNtupleHGCMulticlusters(const edm::ParameterSet& conf); - ~HGCalTriggerNtupleHGCMulticlusters(){}; - virtual void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) override final; - virtual void fill(const edm::Event& e, const edm::EventSetup& es) override final; + ~HGCalTriggerNtupleHGCMulticlusters() override{}; + void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) final; + void fill(const edm::Event& e, const edm::EventSetup& es) final; private: - virtual void clear() override final; + void clear() final; edm::EDGetToken multiclusters_token_; diff --git a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCTriggerCells.cc b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCTriggerCells.cc index 73dc9b50e6b4d..9cd4a0cb01da4 100644 --- a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCTriggerCells.cc +++ b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleHGCTriggerCells.cc @@ -12,12 +12,12 @@ class HGCalTriggerNtupleHGCTriggerCells : public HGCalTriggerNtupleBase public: HGCalTriggerNtupleHGCTriggerCells(const edm::ParameterSet& conf); - ~HGCalTriggerNtupleHGCTriggerCells(){}; - virtual void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) override final; - virtual void fill(const edm::Event& e, const edm::EventSetup& es) override final; + ~HGCalTriggerNtupleHGCTriggerCells() override{}; + void initialize(TTree&, const edm::ParameterSet&, edm::ConsumesCollector&&) final; + void fill(const edm::Event& e, const edm::EventSetup& es) final; private: - virtual void clear() override final; + void clear() final; edm::EDGetToken trigger_cells_token_; diff --git a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleManager.cc b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleManager.cc index d234244818de8..f9bbdda7fa263 100644 --- a/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleManager.cc +++ b/L1Trigger/L1THGCal/plugins/ntuples/HGCalTriggerNtupleManager.cc @@ -15,9 +15,9 @@ class HGCalTriggerNtupleManager : public edm::EDAnalyzer public: explicit HGCalTriggerNtupleManager(const edm::ParameterSet& conf); - ~HGCalTriggerNtupleManager(){}; - virtual void beginRun(const edm::Run&, const edm::EventSetup&) {}; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + ~HGCalTriggerNtupleManager() override{}; + void beginRun(const edm::Run&, const edm::EventSetup&) override {}; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: edm::Service file_service_; @@ -33,7 +33,7 @@ HGCalTriggerNtupleManager:: HGCalTriggerNtupleManager(const edm::ParameterSet& conf) { tree_ = file_service_->make("HGCalTriggerNtuple","HGCalTriggerNtuple"); - const std::vector ntuple_cfgs = conf.getParameterSetVector("Ntuples"); + const std::vector& ntuple_cfgs = conf.getParameterSetVector("Ntuples"); for(const auto& ntuple_cfg : ntuple_cfgs) { const std::string& ntuple_name = ntuple_cfg.getParameter("NtupleName"); diff --git a/L1Trigger/L1THGCal/src/HGCalTriggerBackendProcessor.cc b/L1Trigger/L1THGCal/src/HGCalTriggerBackendProcessor.cc index 5039673c84253..f4b1415902b00 100644 --- a/L1Trigger/L1THGCal/src/HGCalTriggerBackendProcessor.cc +++ b/L1Trigger/L1THGCal/src/HGCalTriggerBackendProcessor.cc @@ -2,7 +2,7 @@ HGCalTriggerBackendProcessor:: HGCalTriggerBackendProcessor(const edm::ParameterSet& conf, edm::ConsumesCollector&& cc) { - const std::vector be_confs = + const std::vector& be_confs = conf.getParameterSetVector("algorithms"); for( const auto& algo_cfg : be_confs ) { const std::string& algo_name = diff --git a/L1Trigger/L1THGCal/src/be_algorithms/HGCalClusteringImpl.cc b/L1Trigger/L1THGCal/src/be_algorithms/HGCalClusteringImpl.cc index d64b5e859f4bc..a196b1018c320 100644 --- a/L1Trigger/L1THGCal/src/be_algorithms/HGCalClusteringImpl.cc +++ b/L1Trigger/L1THGCal/src/be_algorithms/HGCalClusteringImpl.cc @@ -75,10 +75,10 @@ void HGCalClusteringImpl::clusterizeDR( const edm::PtrVector 0 ){ + else if ( !tcPertinentClusters.empty() ){ unsigned minDist(300); unsigned targetClu(0); diff --git a/L1Trigger/L1THGCal/src/be_algorithms/HGCalMulticlusteringImpl.cc b/L1Trigger/L1THGCal/src/be_algorithms/HGCalMulticlusteringImpl.cc index 05f0e327e2401..188a9df696d95 100644 --- a/L1Trigger/L1THGCal/src/be_algorithms/HGCalMulticlusteringImpl.cc +++ b/L1Trigger/L1THGCal/src/be_algorithms/HGCalMulticlusteringImpl.cc @@ -49,7 +49,7 @@ void HGCalMulticlusteringImpl::clusterize( const edm::PtrVector HGCalBestChoiceCodecImpl::encode(const HGCalBestChoiceCodecImp // First nCellsInModule_ bits are encoding the map of selected trigger cells // Followed by nData_ words of dataLength_ bits, corresponding to energy/transverse energy of // the selected trigger cells - std::vector result(nCellsInModule_ + dataLength_*nData_, 0); + std::vector result(nCellsInModule_ + dataLength_*nData_, false); size_t idata = 0; for(size_t itc=0; itc >& linearized_dataframes, data_type& data) /*****************************************************************/ { - if(linearized_dataframes.size()==0) return; + if(linearized_dataframes.empty()) return; std::map payload; // sum energies in trigger cells for(const auto& frame : linearized_dataframes) diff --git a/L1Trigger/L1THGCal/src/fe_codecs/HGCalTriggerCellBestChoiceCodecImpl.cc b/L1Trigger/L1THGCal/src/fe_codecs/HGCalTriggerCellBestChoiceCodecImpl.cc index 9cc16ba4d542e..4f5dfa62ca8fd 100644 --- a/L1Trigger/L1THGCal/src/fe_codecs/HGCalTriggerCellBestChoiceCodecImpl.cc +++ b/L1Trigger/L1THGCal/src/fe_codecs/HGCalTriggerCellBestChoiceCodecImpl.cc @@ -34,9 +34,9 @@ encode(const HGCalTriggerCellBestChoiceCodecImpl::data_type& data, const HGCalTr // First nCellsInModule_ bits are encoding the map of selected trigger cells // Followed by nData_ words of dataLength_ bits, corresponding to energy/transverse energy of // the selected trigger cells - std::vector result(nCellsInModule_ + dataLength_*nData_, 0); + std::vector result(nCellsInModule_ + dataLength_*nData_, false); // No data: return vector of 0 - if(data.payload.size()==0) return result; + if(data.payload.empty()) return result; // All trigger cells are in the same module // Retrieve once the ordered list of trigger cells in this module uint32_t module = geometry.getModuleFromTriggerCell(data.payload.begin()->detId()); @@ -77,7 +77,7 @@ encode(const HGCalTriggerCellBestChoiceCodecImpl::data_type& data, const HGCalTr << " : Number of energy values = "<(0x1u< >& linearized_dataframes, data_type& data) { - if(linearized_dataframes.size()==0) return; + if(linearized_dataframes.empty()) return; std::map payload; // sum energies in trigger cells for(const auto& frame : linearized_dataframes) diff --git a/L1Trigger/L1THGCal/src/fe_codecs/HGCalTriggerCellThresholdCodecImpl.cc b/L1Trigger/L1THGCal/src/fe_codecs/HGCalTriggerCellThresholdCodecImpl.cc index 54329f3152a06..d3c03bc9ad109 100644 --- a/L1Trigger/L1THGCal/src/fe_codecs/HGCalTriggerCellThresholdCodecImpl.cc +++ b/L1Trigger/L1THGCal/src/fe_codecs/HGCalTriggerCellThresholdCodecImpl.cc @@ -47,9 +47,9 @@ encode(const HGCalTriggerCellThresholdCodecImpl::data_type& data, const HGCalTri data_map.emplace(triggercell.detId(), triggercell.hwPt()); if (triggercell.hwPt()>0) size++; } - std::vector result(nCellsInModule_ + dataLength_*size, 0); + std::vector result(nCellsInModule_ + dataLength_*size, false); // No data: return vector of 0 - if(data.payload.size()==0) return result; + if(data.payload.empty()) return result; // All trigger cells are in the same module // Loop on trigger cell ids in module and check if energy in the cell size_t index = 0; // index in module @@ -78,7 +78,7 @@ encode(const HGCalTriggerCellThresholdCodecImpl::data_type& data, const HGCalTri if(value>0) { // Set map bit to 1 - result[index] = 1; + result[index] = true; // Saturate and truncate energy values if(value+1>(0x1u< >& linearized_dataframes, data_type& data) { - if(linearized_dataframes.size()==0) return; + if(linearized_dataframes.empty()) return; std::map payload; // sum energies in trigger cells for(const auto& frame : linearized_dataframes) diff --git a/L1Trigger/L1TMuon/interface/deprecate/CSCCollector.h b/L1Trigger/L1TMuon/interface/deprecate/CSCCollector.h index a82451d48c4b3..5f29471739e5f 100644 --- a/L1Trigger/L1TMuon/interface/deprecate/CSCCollector.h +++ b/L1Trigger/L1TMuon/interface/deprecate/CSCCollector.h @@ -17,10 +17,10 @@ namespace L1TMuon { class CSCCollector: public SubsystemCollector { public: CSCCollector(const edm::ParameterSet&); - ~CSCCollector() {} + ~CSCCollector() override {} - virtual void extractPrimitives(const edm::Event&, const edm::EventSetup&, - std::vector&) const; + void extractPrimitives(const edm::Event&, const edm::EventSetup&, + std::vector&) const override; private: }; } diff --git a/L1Trigger/L1TMuon/interface/deprecate/DTCollector.h b/L1Trigger/L1TMuon/interface/deprecate/DTCollector.h index 7896f1effef05..362c928f5737a 100644 --- a/L1Trigger/L1TMuon/interface/deprecate/DTCollector.h +++ b/L1Trigger/L1TMuon/interface/deprecate/DTCollector.h @@ -22,10 +22,10 @@ namespace L1TMuon { class DTCollector: public SubsystemCollector { public: DTCollector(const edm::ParameterSet&); - ~DTCollector() {} + ~DTCollector() override {} - virtual void extractPrimitives(const edm::Event&, const edm::EventSetup&, - std::vector&) const; + void extractPrimitives(const edm::Event&, const edm::EventSetup&, + std::vector&) const override; private: TriggerPrimitive processDigis(const L1MuDTChambPhDigi&, const int &segment_number) const; diff --git a/L1Trigger/L1TMuon/interface/deprecate/RPCCollector.h b/L1Trigger/L1TMuon/interface/deprecate/RPCCollector.h index d258da8d6a991..f9f49bd0a01a5 100644 --- a/L1Trigger/L1TMuon/interface/deprecate/RPCCollector.h +++ b/L1Trigger/L1TMuon/interface/deprecate/RPCCollector.h @@ -17,10 +17,10 @@ namespace L1TMuon { class RPCCollector: public SubsystemCollector { public: RPCCollector(const edm::ParameterSet&); - ~RPCCollector() {} + ~RPCCollector() override {} - virtual void extractPrimitives(const edm::Event&, const edm::EventSetup&, - std::vector&) const; + void extractPrimitives(const edm::Event&, const edm::EventSetup&, + std::vector&) const override; private: }; } diff --git a/L1Trigger/L1TMuon/plugins/DTCollector.cc b/L1Trigger/L1TMuon/plugins/DTCollector.cc index e16610cbc655c..0a69e63193736 100644 --- a/L1Trigger/L1TMuon/plugins/DTCollector.cc +++ b/L1Trigger/L1TMuon/plugins/DTCollector.cc @@ -15,10 +15,10 @@ DTCollector::DTCollector( const edm::ParameterSet& ps ): bx_min(ps.getParameter("BX_min")), bx_max(ps.getParameter("BX_max")) { if( ps.getParameter("runBunchCrossingCleaner") ) { - edm::ParameterSet bxccfg = ps.getParameterSet("bxCleanerCfg"); + const edm::ParameterSet& bxccfg = ps.getParameterSet("bxCleanerCfg"); _bxc.reset(new DTBunchCrossingCleaner(bxccfg)); } else { - _bxc.reset(NULL); + _bxc.reset(nullptr); } } diff --git a/L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelParamsHelper.h b/L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelParamsHelper.h index c168d2772bec1..4e0d8092b96d0 100644 --- a/L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelParamsHelper.h +++ b/L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelParamsHelper.h @@ -41,7 +41,7 @@ class L1TMuonBarrelParamsHelper : public L1TMuonBarrelParams - std::string AssLUTPath() const { return pnodes_[CONFIG].sparams_.size() > 0 ? pnodes_[CONFIG].sparams_[0] : ""; } + std::string AssLUTPath() const { return !pnodes_[CONFIG].sparams_.empty() ? pnodes_[CONFIG].sparams_[0] : ""; } void setAssLUTPath (std::string path) { pnodes_[CONFIG].sparams_.push_back(path); } void setpta_lut(std::vector ptalut) { lutparams_.pta_lut_ = ptalut; }; diff --git a/L1Trigger/L1TMuonBarrel/plugins/L1TMuonBarrelParamsESProducer.cc b/L1Trigger/L1TMuonBarrel/plugins/L1TMuonBarrelParamsESProducer.cc index 9d7a9e6e0484e..27d5edd7e6f38 100644 --- a/L1Trigger/L1TMuonBarrel/plugins/L1TMuonBarrelParamsESProducer.cc +++ b/L1Trigger/L1TMuonBarrel/plugins/L1TMuonBarrelParamsESProducer.cc @@ -39,7 +39,7 @@ typedef std::map > LUT; class L1TMuonBarrelParamsESProducer : public edm::ESProducer { public: L1TMuonBarrelParamsESProducer(const edm::ParameterSet&); - ~L1TMuonBarrelParamsESProducer(); + ~L1TMuonBarrelParamsESProducer() override; int load_pt(std::vector& , std::vector&, unsigned short int, std::string); int load_phi(std::vector& , unsigned short int, unsigned short int, std::string); int load_ext(std::vector&, unsigned short int, unsigned short int ); diff --git a/L1Trigger/L1TMuonBarrel/src/L1MuBMLUTHandler.cc b/L1Trigger/L1TMuonBarrel/src/L1MuBMLUTHandler.cc index eefa02b441c0f..a2bb2282ffb2a 100644 --- a/L1Trigger/L1TMuonBarrel/src/L1MuBMLUTHandler.cc +++ b/L1Trigger/L1TMuonBarrel/src/L1MuBMLUTHandler.cc @@ -29,7 +29,7 @@ #include #include #include -#include /* getenv */ +#include /* getenv */ //------------------------------- // Collaborating Class Headers -- diff --git a/L1Trigger/L1TMuonBarrel/src/L1TMuonBarrelParamsHelper.cc b/L1Trigger/L1TMuonBarrel/src/L1TMuonBarrelParamsHelper.cc index 6e9fd6c790ba2..4268dd37f2273 100644 --- a/L1Trigger/L1TMuonBarrel/src/L1TMuonBarrelParamsHelper.cc +++ b/L1Trigger/L1TMuonBarrel/src/L1TMuonBarrelParamsHelper.cc @@ -330,7 +330,7 @@ enum PtAssMethod { PT12L, PT12H, PT13L, PT13H, PT14L, PT14H, } // assemble file name - string lutpath = AssLUTpath; + const string& lutpath = AssLUTpath; edm::FileInPath lut_f = edm::FileInPath(string(lutpath + pta_str + ".lut")); string pta_file = lut_f.fullPath(); diff --git a/L1Trigger/L1TMuonEndCap/interface/TrackTools.h b/L1Trigger/L1TMuonEndCap/interface/TrackTools.h index 3e1eb7f3a2cd9..0f84b79de3406 100644 --- a/L1Trigger/L1TMuonEndCap/interface/TrackTools.h +++ b/L1Trigger/L1TMuonEndCap/interface/TrackTools.h @@ -2,7 +2,7 @@ #define L1TMuonEndCap_TrackTools_h #include -#include +#include #include "DataFormats/L1TMuon/interface/EMTFTrack.h" #include "DataFormats/L1TMuon/interface/EMTFTrack.h" diff --git a/L1Trigger/L1TMuonEndCap/interface/bdt/LossFunctions.h b/L1Trigger/L1TMuonEndCap/interface/bdt/LossFunctions.h index bfeb4b48ee916..7e2e852094019 100644 --- a/L1Trigger/L1TMuonEndCap/interface/bdt/LossFunctions.h +++ b/L1Trigger/L1TMuonEndCap/interface/bdt/LossFunctions.h @@ -41,7 +41,7 @@ class LeastSquares : public LossFunction { public: LeastSquares(){} - virtual ~LeastSquares(){} + ~LeastSquares() override{} double target(Event* e) override { @@ -75,7 +75,7 @@ class AbsoluteDeviation : public LossFunction { public: AbsoluteDeviation(){} - virtual ~AbsoluteDeviation(){} + ~AbsoluteDeviation() override{} double target(Event* e) override { @@ -131,7 +131,7 @@ class Huber : public LossFunction { public: Huber(){} - virtual ~Huber(){} + ~Huber() override{} double quantile; double residual_median; @@ -195,7 +195,7 @@ class PercentErrorSquared : public LossFunction { public: PercentErrorSquared(){} - virtual ~PercentErrorSquared(){} + ~PercentErrorSquared() override{} double target(Event* e) override { diff --git a/L1Trigger/L1TMuonOverlap/interface/OMTFinputMaker.h b/L1Trigger/L1TMuonOverlap/interface/OMTFinputMaker.h index 359184e0d5cbd..92489a095f82c 100644 --- a/L1Trigger/L1TMuonOverlap/interface/OMTFinputMaker.h +++ b/L1Trigger/L1TMuonOverlap/interface/OMTFinputMaker.h @@ -2,7 +2,7 @@ #define OMTFinputMaker_H #include -#include +#include #include #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h" diff --git a/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapParamsDBProducer.h b/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapParamsDBProducer.h index 6b7d3df3edc44..2601ac67f8eb5 100644 --- a/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapParamsDBProducer.h +++ b/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapParamsDBProducer.h @@ -14,11 +14,11 @@ class L1TMuonOverlapParams; class L1MuonOverlapParamsDBProducer : public edm::EDAnalyzer { public: L1MuonOverlapParamsDBProducer(const edm::ParameterSet & cfg); - virtual ~L1MuonOverlapParamsDBProducer(){} - virtual void beginJob(){}; - virtual void beginRun(const edm::Run&, const edm::EventSetup& es); - virtual void analyze(const edm::Event&, const edm::EventSetup& es); - virtual void endJob(){}; + ~L1MuonOverlapParamsDBProducer() override{} + void beginJob() override{}; + void beginRun(const edm::Run&, const edm::EventSetup& es) override; + void analyze(const edm::Event&, const edm::EventSetup& es) override; + void endJob() override{}; private: diff --git a/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapParamsESProducer.h b/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapParamsESProducer.h index 8fa284f663f52..e89bd25480d61 100644 --- a/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapParamsESProducer.h +++ b/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapParamsESProducer.h @@ -16,7 +16,7 @@ class L1TMuonOverlapParamsESProducer : public edm::ESProducer { public: L1TMuonOverlapParamsESProducer(const edm::ParameterSet&); - ~L1TMuonOverlapParamsESProducer(); + ~L1TMuonOverlapParamsESProducer() override; typedef std::shared_ptr ReturnType; diff --git a/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapTrackProducer.h b/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapTrackProducer.h index 7c5a1ef15b661..5244516a31984 100644 --- a/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapTrackProducer.h +++ b/L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapTrackProducer.h @@ -42,15 +42,15 @@ class L1TMuonOverlapTrackProducer : public edm::EDProducer { public: L1TMuonOverlapTrackProducer(const edm::ParameterSet&); - ~L1TMuonOverlapTrackProducer(); + ~L1TMuonOverlapTrackProducer() override; - virtual void beginJob(); + void beginJob() override; - virtual void endJob(); + void endJob() override; - virtual void beginRun(edm::Run const& run, edm::EventSetup const& iSetup); + void beginRun(edm::Run const& run, edm::EventSetup const& iSetup) override; - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: diff --git a/L1Trigger/L1TMuonOverlap/plugins/OMTFPatternMaker.cc b/L1Trigger/L1TMuonOverlap/plugins/OMTFPatternMaker.cc index 916c890769290..bdda28c7d3c60 100644 --- a/L1Trigger/L1TMuonOverlap/plugins/OMTFPatternMaker.cc +++ b/L1Trigger/L1TMuonOverlap/plugins/OMTFPatternMaker.cc @@ -35,7 +35,7 @@ OMTFPatternMaker::OMTFPatternMaker(const edm::ParameterSet& cfg): makeConnectionsMaps = theConfig.getParameter("makeConnectionsMaps"); mergeXMLFiles = theConfig.getParameter("mergeXMLFiles"); - myOMTFConfig = 0; + myOMTFConfig = nullptr; } ///////////////////////////////////////////////////// ///////////////////////////////////////////////////// @@ -283,7 +283,7 @@ void OMTFPatternMaker::analyze(const edm::Event& iEvent, const edm::EventSetup& ///////////////////////////////////////////////////// const SimTrack * OMTFPatternMaker::findSimMuon(const edm::Event &ev, const edm::EventSetup &es, const SimTrack * previous){ - const SimTrack * result = 0; + const SimTrack * result = nullptr; edm::Handle simTks; ev.getByToken(inputTokenSimHit,simTks); diff --git a/L1Trigger/L1TMuonOverlap/plugins/OMTFPatternMaker.h b/L1Trigger/L1TMuonOverlap/plugins/OMTFPatternMaker.h index 62d784f26596d..3f47c7f4bd80b 100644 --- a/L1Trigger/L1TMuonOverlap/plugins/OMTFPatternMaker.h +++ b/L1Trigger/L1TMuonOverlap/plugins/OMTFPatternMaker.h @@ -37,19 +37,19 @@ class OMTFPatternMaker : public edm::EDAnalyzer { OMTFPatternMaker(const edm::ParameterSet & cfg); - virtual ~OMTFPatternMaker(); + ~OMTFPatternMaker() override; - virtual void beginRun(edm::Run const& run, edm::EventSetup const& iSetup); + void beginRun(edm::Run const& run, edm::EventSetup const& iSetup) override; - virtual void beginJob(); + void beginJob() override; - virtual void endJob(); + void endJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: - const SimTrack *findSimMuon(const edm::Event &ev, const edm::EventSetup &es, const SimTrack *previous=0); + const SimTrack *findSimMuon(const edm::Event &ev, const edm::EventSetup &es, const SimTrack *previous=nullptr); edm::ParameterSet theConfig; edm::InputTag g4SimTrackSrc; diff --git a/L1Trigger/L1TMuonOverlap/src/GoldenPattern.cc b/L1Trigger/L1TMuonOverlap/src/GoldenPattern.cc index dba4852f9bb0a..023ea14bf2df3 100644 --- a/L1Trigger/L1TMuonOverlap/src/GoldenPattern.cc +++ b/L1Trigger/L1TMuonOverlap/src/GoldenPattern.cc @@ -89,8 +89,8 @@ std::ostream & operator << (std::ostream &out, const GoldenPattern & aPattern){ <<", number of measurement layers: "<nRefLayers();++iRefLayer){ const OMTFinput::vector1D & refLayerHits = aInput.getLayerData(myOmtfConfig->getRefToLogicNumber()[iRefLayer]); - if(!refLayerHits.size()) continue; + if(refLayerHits.empty()) continue; for(unsigned int iInput=0;iInputnInputs();++iInput){ int phiRef = refLayerHits[iInput]; unsigned int iRegion = myOmtfConfig->getRegionNumberFromMap(iInput,iRefLayer,phiRef); @@ -77,7 +77,7 @@ void OMTFConfigMaker::makeConnetionsMap(unsigned int iProcessor, for(unsigned int iRefLayer=0;iRefLayernRefLayers();++iRefLayer){ const OMTFinput::vector1D & refLayerHits = aInput.getLayerData(myOmtfConfig->getRefToLogicNumber()[iRefLayer]); - if(!refLayerHits.size()) continue; + if(refLayerHits.empty()) continue; ////////////////////// for(unsigned int iInput=0;iInput & OMTFProcessor::processInput(unsig for(unsigned int iLayer=0;iLayernLayers();++iLayer){ const OMTFinput::vector1D & layerHits = aInput.getLayerData(iLayer); - if(!layerHits.size()) continue; + if(layerHits.empty()) continue; ///Number of reference hits to be checked. unsigned int nTestedRefHits = myOmtfConfig->nTestRefHits(); for(unsigned int iRefHit=0;iRefHitnRefHits();++iRefHit){ @@ -303,7 +303,7 @@ void OMTFProcessor::fillCounts(unsigned int iProcessor, for(unsigned int iLayer=0;iLayernLayers();++iLayer){ const OMTFinput::vector1D & layerHits = aInput.getLayerData(iLayer); - if(!layerHits.size()) continue; + if(layerHits.empty()) continue; ///Number of reference hits to be checked. for(unsigned int iRefHit=0;iRefHitnRefHits();++iRefHit){ if(!refHitsBits[iRefHit]) continue; diff --git a/L1Trigger/L1TMuonOverlap/src/OMTFReconstruction.cc b/L1Trigger/L1TMuonOverlap/src/OMTFReconstruction.cc index f87ad332f74c0..099ea0903b7b9 100644 --- a/L1Trigger/L1TMuonOverlap/src/OMTFReconstruction.cc +++ b/L1Trigger/L1TMuonOverlap/src/OMTFReconstruction.cc @@ -17,11 +17,11 @@ #include "L1Trigger/RPCTrigger/interface/RPCConst.h" OMTFReconstruction::OMTFReconstruction() : - m_OMTFConfig(0), m_OMTF(0), aTopElement(0), m_OMTFConfigMaker(0), m_Writer(0){} + m_OMTFConfig(nullptr), m_OMTF(nullptr), aTopElement(nullptr), m_OMTFConfigMaker(nullptr), m_Writer(nullptr){} ///////////////////////////////////////////////////// ///////////////////////////////////////////////////// OMTFReconstruction::OMTFReconstruction(const edm::ParameterSet& theConfig) : - m_Config(theConfig), m_OMTFConfig(0), m_OMTF(0), aTopElement(0), m_OMTFConfigMaker(0), m_Writer(0) { + m_Config(theConfig), m_OMTFConfig(nullptr), m_OMTF(nullptr), aTopElement(nullptr), m_OMTFConfigMaker(nullptr), m_Writer(nullptr) { dumpResultToXML = m_Config.getParameter("dumpResultToXML"); dumpDetailedResultToXML = m_Config.getParameter("dumpDetailedResultToXML"); diff --git a/L1Trigger/L1TMuonOverlap/src/XMLConfigReader.cc b/L1Trigger/L1TMuonOverlap/src/XMLConfigReader.cc index bae623056baa5..202b19786c9f8 100644 --- a/L1Trigger/L1TMuonOverlap/src/XMLConfigReader.cc +++ b/L1Trigger/L1TMuonOverlap/src/XMLConfigReader.cc @@ -127,7 +127,7 @@ void XMLConfigReader::readLUTs(std::vector luts,const L1TMuonOverlapP ////////////////////////////////////////////////// unsigned int XMLConfigReader::getPatternsVersion() const{ - if(!patternsFile.size()) return 0; + if(patternsFile.empty()) return 0; unsigned int version=0; XMLPlatformUtils::Initialize(); @@ -181,8 +181,8 @@ std::vector> XMLConfigReader::readPatterns(const return aGPs; } - DOMNode *aNode = 0; - DOMElement* aGPElement = 0; + DOMNode *aNode = nullptr; + DOMElement* aGPElement = nullptr; unsigned int iGPNumber=0; for(unsigned int iItem=0;iItem XMLConfigReader::buildGP(DOMElement* aGPElement, std::ostringstream stringStr; if (index>0) stringStr<<"iPt"<0) stringStr<<"value"< XMLConfigReader::buildGP(DOMElement* aGPElement, unsigned int nLayers = aGPElement->getElementsByTagName(xmlLayer)->getLength(); assert(nLayers==(unsigned) aConfig.nLayers()); - DOMNode *aNode = 0; - DOMElement* aLayerElement = 0; - DOMElement* aItemElement = 0; + DOMNode *aNode = nullptr; + DOMElement* aLayerElement = nullptr; + DOMElement* aItemElement = nullptr; GoldenPattern::vector2D meanDistPhi2D(nLayers); GoldenPattern::vector1D pdf1D(exp2(aConfig.nPdfAddrBits())); GoldenPattern::vector3D pdf3D(aConfig.nLayers()); @@ -446,7 +446,7 @@ void XMLConfigReader::readConfig(L1TMuonOverlapParams *aConfig) const{ ///Start/End values for all processors, and chamber types are put into a single vector std::vector sectorsStart(3*nProcessors), sectorsEnd(3*nProcessors); nElem = aOMTFElement->getElementsByTagName(xmlConnectionMap)->getLength(); - DOMElement* aConnectionElement = 0; + DOMElement* aConnectionElement = nullptr; for(unsigned int i=0;igetElementsByTagName(xmlConnectionMap)->item(i); aConnectionElement = static_cast(aNode); @@ -475,7 +475,7 @@ void XMLConfigReader::readConfig(L1TMuonOverlapParams *aConfig) const{ L1TMuonOverlapParams::LayerMapNode aLayerMapNode; nElem = aOMTFElement->getElementsByTagName(xmlLayerMap)->getLength(); - DOMElement* aLayerElement = 0; + DOMElement* aLayerElement = nullptr; for(unsigned int i=0;igetElementsByTagName(xmlLayerMap)->item(i); aLayerElement = static_cast(aNode); @@ -496,7 +496,7 @@ void XMLConfigReader::readConfig(L1TMuonOverlapParams *aConfig) const{ L1TMuonOverlapParams::RefLayerMapNode aRefLayerNode; nElem = aOMTFElement->getElementsByTagName(xmlRefLayerMap)->getLength(); - DOMElement* aRefLayerElement = 0; + DOMElement* aRefLayerElement = nullptr; for(unsigned int i=0;igetElementsByTagName(xmlRefLayerMap)->item(i); aRefLayerElement = static_cast(aNode); @@ -518,14 +518,14 @@ void XMLConfigReader::readConfig(L1TMuonOverlapParams *aConfig) const{ nElem = aOMTFElement->getElementsByTagName(xmlProcessor)->getLength(); assert(nElem==nProcessors); - DOMElement* aProcessorElement = 0; + DOMElement* aProcessorElement = nullptr; for(unsigned int i=0;igetElementsByTagName(xmlProcessor)->item(i); aProcessorElement = static_cast(aNode); unsigned int iProcessor = std::atoi(_toString(aProcessorElement->getAttribute(xmliProcessor)).c_str()); unsigned int nElem1 = aProcessorElement->getElementsByTagName(xmlRefLayer)->getLength(); assert(nElem1==nRefLayers); - DOMElement* aRefLayerElement = 0; + DOMElement* aRefLayerElement = nullptr; for(unsigned int ii=0;iigetElementsByTagName(xmlRefLayer)->item(ii); aRefLayerElement = static_cast(aNode); @@ -536,7 +536,7 @@ void XMLConfigReader::readConfig(L1TMuonOverlapParams *aConfig) const{ /////////// nElem1 = aProcessorElement->getElementsByTagName(xmlRefHit)->getLength(); assert( (iProcessor==0 && nElem1==nRefHits) || (iProcessor!=0 && nElem1==0) ); - DOMElement* aRefHitElement = 0; + DOMElement* aRefHitElement = nullptr; for(unsigned int ii=0;iigetElementsByTagName(xmlRefHit)->item(ii); aRefHitElement = static_cast(aNode); @@ -558,14 +558,14 @@ void XMLConfigReader::readConfig(L1TMuonOverlapParams *aConfig) const{ /////////// unsigned int nElem2 = aProcessorElement->getElementsByTagName(xmlLogicRegion)->getLength(); assert( (iProcessor==0 && nElem2==nLogicRegions) || (iProcessor!=0 && nElem2==0) ); - DOMElement* aRegionElement = 0; + DOMElement* aRegionElement = nullptr; for(unsigned int ii=0;iigetElementsByTagName(xmlLogicRegion)->item(ii); aRegionElement = static_cast(aNode); unsigned int iRegion = std::atoi(_toString(aRegionElement->getAttribute(xmliRegion)).c_str()); unsigned int nElem3 = aRegionElement->getElementsByTagName(xmlLayer)->getLength(); assert(nElem3==nLayers); - DOMElement* aLayerElement = 0; + DOMElement* aLayerElement = nullptr; for(unsigned int iii=0;iiigetElementsByTagName(xmlLayer)->item(iii); aLayerElement = static_cast(aNode); diff --git a/L1Trigger/L1TMuonOverlap/src/XMLConfigWriter.cc b/L1Trigger/L1TMuonOverlap/src/XMLConfigWriter.cc index 042a59f740b7a..9a8542eebf199 100644 --- a/L1Trigger/L1TMuonOverlap/src/XMLConfigWriter.cc +++ b/L1Trigger/L1TMuonOverlap/src/XMLConfigWriter.cc @@ -85,7 +85,7 @@ XMLConfigWriter::XMLConfigWriter(const OMTFConfiguration* aOMTFConfig){ ////////////////////////////////////////////////// void XMLConfigWriter::initialiseXMLDocument(const std::string & docName){ - theDoc = domImpl->createDocument(0,_toDOMS(docName.c_str()), 0); + theDoc = domImpl->createDocument(nullptr,_toDOMS(docName), nullptr); theTopElement = theDoc->getDocumentElement(); unsigned int version = myOMTFConfig->patternsVersion(); @@ -132,8 +132,8 @@ xercesc::DOMElement * XMLConfigWriter::writeEventHeader(unsigned int eventId, unsigned int eventBx = eventId*2; - xercesc::DOMElement *aEvent = 0; - xercesc::DOMElement *aBx = 0; + xercesc::DOMElement *aEvent = nullptr; + xercesc::DOMElement *aBx = nullptr; std::ostringstream stringStr; aEvent = theDoc->createElement(_toDOMS("Event")); @@ -350,7 +350,7 @@ void XMLConfigWriter::writeResultsData(xercesc::DOMElement *aTopElement, void XMLConfigWriter::writeGPData(const GoldenPattern & aGP){ std::ostringstream stringStr; - xercesc::DOMElement *aLayer=0, *aRefLayer=0, *aPdf=0; + xercesc::DOMElement *aLayer=nullptr, *aRefLayer=nullptr, *aPdf=nullptr; xercesc::DOMElement* aGPElement = theDoc->createElement(_toDOMS("GP")); stringStr.str(""); @@ -419,7 +419,7 @@ void XMLConfigWriter::writeGPData(const GoldenPattern & aGP1, const GoldenPattern & aGP4){ std::ostringstream stringStr; - xercesc::DOMElement *aLayer=0, *aRefLayer=0, *aPdf=0; + xercesc::DOMElement *aLayer=nullptr, *aRefLayer=nullptr, *aPdf=nullptr; xercesc::DOMElement* aGPElement = theDoc->createElement(_toDOMS("GP")); stringStr.str(""); diff --git a/L1Trigger/L1TNtuples/interface/L1AnalysisRecoMetFilterDataFormat.h b/L1Trigger/L1TNtuples/interface/L1AnalysisRecoMetFilterDataFormat.h index f0678f589b87f..281c4116e9330 100644 --- a/L1Trigger/L1TNtuples/interface/L1AnalysisRecoMetFilterDataFormat.h +++ b/L1Trigger/L1TNtuples/interface/L1AnalysisRecoMetFilterDataFormat.h @@ -20,14 +20,14 @@ namespace L1Analysis void Reset() { - hbheNoiseFilter = 0; - hbheNoiseIsoFilter = 0; - cscTightHalo2015Filter = 0; - ecalDeadCellTPFilter = 0; - goodVerticesFilter = 0; - eeBadScFilter = 0; - chHadTrackResFilter = 0; - muonBadTrackFilter = 0; + hbheNoiseFilter = false; + hbheNoiseIsoFilter = false; + cscTightHalo2015Filter = false; + ecalDeadCellTPFilter = false; + goodVerticesFilter = false; + eeBadScFilter = false; + chHadTrackResFilter = false; + muonBadTrackFilter = false; } diff --git a/L1Trigger/L1TNtuples/plugins/L1CaloTowerTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1CaloTowerTreeProducer.cc index a0d8aa340d51c..7916228f1ba11 100644 --- a/L1Trigger/L1TNtuples/plugins/L1CaloTowerTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1CaloTowerTreeProducer.cc @@ -64,13 +64,13 @@ Description: Produce L1 Extra tree class L1CaloTowerTreeProducer : public edm::EDAnalyzer { public: explicit L1CaloTowerTreeProducer(const edm::ParameterSet&); - ~L1CaloTowerTreeProducer(); + ~L1CaloTowerTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; public: diff --git a/L1Trigger/L1TNtuples/plugins/L1ElectronRecoTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1ElectronRecoTreeProducer.cc index 98d7ddd68f910..4f8c3cb715101 100644 --- a/L1Trigger/L1TNtuples/plugins/L1ElectronRecoTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1ElectronRecoTreeProducer.cc @@ -45,13 +45,13 @@ class L1ElectronRecoTreeProducer : public edm::EDAnalyzer { public: explicit L1ElectronRecoTreeProducer(const edm::ParameterSet&); - ~L1ElectronRecoTreeProducer(); + ~L1ElectronRecoTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; public: L1Analysis::L1AnalysisRecoElectron* electron; diff --git a/L1Trigger/L1TNtuples/plugins/L1EventTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1EventTreeProducer.cc index 7ac322bc7a420..c578c7baf3c9e 100644 --- a/L1Trigger/L1TNtuples/plugins/L1EventTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1EventTreeProducer.cc @@ -50,13 +50,13 @@ Description: Produce L1 Extra tree class L1EventTreeProducer : public edm::EDAnalyzer { public: explicit L1EventTreeProducer(const edm::ParameterSet&); - ~L1EventTreeProducer(); + ~L1EventTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; public: diff --git a/L1Trigger/L1TNtuples/plugins/L1ExtraTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1ExtraTreeProducer.cc index 4651c52c77744..bbfec6b456992 100644 --- a/L1Trigger/L1TNtuples/plugins/L1ExtraTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1ExtraTreeProducer.cc @@ -56,13 +56,13 @@ Description: Produce L1 Extra tree class L1ExtraTreeProducer : public edm::EDAnalyzer { public: explicit L1ExtraTreeProducer(const edm::ParameterSet&); - ~L1ExtraTreeProducer(); + ~L1ExtraTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; public: diff --git a/L1Trigger/L1TNtuples/plugins/L1GenTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1GenTreeProducer.cc index 7823cc2dff021..8a450cbc8fb14 100644 --- a/L1Trigger/L1TNtuples/plugins/L1GenTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1GenTreeProducer.cc @@ -55,13 +55,13 @@ Description: Produce L1 Extra tree class L1GenTreeProducer : public edm::EDAnalyzer { public: explicit L1GenTreeProducer(const edm::ParameterSet&); - ~L1GenTreeProducer(); + ~L1GenTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; private: diff --git a/L1Trigger/L1TNtuples/plugins/L1HOTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1HOTreeProducer.cc index 30f7d23939580..a5aa7bd2c17fc 100644 --- a/L1Trigger/L1TNtuples/plugins/L1HOTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1HOTreeProducer.cc @@ -34,12 +34,12 @@ class L1HOTreeProducer : public edm::EDAnalyzer { public: explicit L1HOTreeProducer(const edm::ParameterSet&); - ~L1HOTreeProducer(); + ~L1HOTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; public: diff --git a/L1Trigger/L1TNtuples/plugins/L1JetRecoTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1JetRecoTreeProducer.cc index c4b790f574b02..184ad27835113 100644 --- a/L1Trigger/L1TNtuples/plugins/L1JetRecoTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1JetRecoTreeProducer.cc @@ -58,13 +58,13 @@ class L1JetRecoTreeProducer : public edm::EDAnalyzer { public: explicit L1JetRecoTreeProducer(const edm::ParameterSet&); - ~L1JetRecoTreeProducer(); + ~L1JetRecoTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; void doPFJets(edm::Handle pfJets); void doPFJetCorr(edm::Handle pfJets, edm::Handle pfJetCorr); diff --git a/L1Trigger/L1TNtuples/plugins/L1MenuTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1MenuTreeProducer.cc index 4147c105fc61c..e1fa48cac9e42 100644 --- a/L1Trigger/L1TNtuples/plugins/L1MenuTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1MenuTreeProducer.cc @@ -47,15 +47,15 @@ class L1MenuTreeProducer : public edm::EDAnalyzer { public: explicit L1MenuTreeProducer(const edm::ParameterSet&); - ~L1MenuTreeProducer(); + ~L1MenuTreeProducer() override; private: - virtual void beginJob(void); - virtual void beginRun(const edm::Run&, const edm::EventSetup&); - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endRun(const edm::Run&, const edm::EventSetup&) {} - virtual void endJob(); + void beginJob(void) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endRun(const edm::Run&, const edm::EventSetup&) override {} + void endJob() override; public: diff --git a/L1Trigger/L1TNtuples/plugins/L1MetFilterRecoTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1MetFilterRecoTreeProducer.cc index 5fa1ffef645c1..b884f2b16b2d9 100644 --- a/L1Trigger/L1TNtuples/plugins/L1MetFilterRecoTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1MetFilterRecoTreeProducer.cc @@ -50,13 +50,13 @@ class L1MetFilterRecoTreeProducer : public edm::EDAnalyzer { public: explicit L1MetFilterRecoTreeProducer(const edm::ParameterSet&); - ~L1MetFilterRecoTreeProducer(); + ~L1MetFilterRecoTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; void doMetFilters(edm::Handle trigRes, edm::TriggerNames trigNames, bool hbheNFRes); @@ -131,7 +131,7 @@ void L1MetFilterRecoTreeProducer::analyze(const edm::Event& iEvent, const edm::E if (trigRes.isValid()) { // get trigger names - edm::TriggerNames trigNames = iEvent.triggerNames(*trigRes); + const edm::TriggerNames& trigNames = iEvent.triggerNames(*trigRes); // get hbhe noise filter result edm::Handle hbheNoiseFilterResult; iEvent.getByToken(hbheNoiseFilterResultToken_, hbheNoiseFilterResult); diff --git a/L1Trigger/L1TNtuples/plugins/L1Muon2RecoTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1Muon2RecoTreeProducer.cc index 573e0972c16bd..8e902edb3d79d 100644 --- a/L1Trigger/L1TNtuples/plugins/L1Muon2RecoTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1Muon2RecoTreeProducer.cc @@ -87,14 +87,14 @@ using namespace std; class L1Muon2RecoTreeProducer : public edm::EDAnalyzer { public: explicit L1Muon2RecoTreeProducer(const edm::ParameterSet&); - ~L1Muon2RecoTreeProducer(); + ~L1Muon2RecoTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void beginRun(const edm::Run &, const edm::EventSetup &); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginRun(const edm::Run &, const edm::EventSetup &) override; + void endJob() override; public: L1Analysis::L1AnalysisRecoMuon2* muon; diff --git a/L1Trigger/L1TNtuples/plugins/L1MuonRecoTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1MuonRecoTreeProducer.cc index 59f4b940dec66..44e2c2a1eb28e 100644 --- a/L1Trigger/L1TNtuples/plugins/L1MuonRecoTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1MuonRecoTreeProducer.cc @@ -106,7 +106,7 @@ UserCode/L1Trigger/src/L1MuonRecoTreeProducer.cc class L1MuonRecoTreeProducer : public edm::EDAnalyzer { public: explicit L1MuonRecoTreeProducer(const edm::ParameterSet&); - ~L1MuonRecoTreeProducer(); + ~L1MuonRecoTreeProducer() override; TrajectoryStateOnSurface cylExtrapTrkSam (reco::TrackRef track, double rho); TrajectoryStateOnSurface surfExtrapTrkSam (reco::TrackRef track, double z); void empty_global(); @@ -118,11 +118,11 @@ class L1MuonRecoTreeProducer : public edm::EDAnalyzer { edm::Handle &triggerEvent, const reco::Muon &mu); private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); - virtual void beginRun(const edm::Run &, const edm::EventSetup &); - virtual void endRun(const edm::Run &, const edm::EventSetup &); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; + void beginRun(const edm::Run &, const edm::EventSetup &) override; + void endRun(const edm::Run &, const edm::EventSetup &) override; public: @@ -537,7 +537,7 @@ L1MuonRecoTreeProducer::analyze(const edm::Event& iEvent, const edm::EventSetup& if (imu->isTrackerMuon()) type=type+4; if (imu->isCaloMuon()) type=type+8; - bool isTIGHT = (vertex->size() > 0 && + bool isTIGHT = (!vertex->empty() && imu->isGlobalMuon() && imu->globalTrack()->normalizedChi2() < 10. && imu->globalTrack()->hitPattern().numberOfValidMuonHits() > 0 && imu->numberOfMatchedStations() > 1 && @@ -668,7 +668,7 @@ L1MuonRecoTreeProducer::analyze(const edm::Event& iEvent, const edm::EventSetup& const CSCSegment* cscSegment =dynamic_cast(&**hit); //std::cout << "cscSegment = " << cscSegment << std::endl; - if (cscSegment == NULL) continue; + if (cscSegment == nullptr) continue; // const CSCRecHit2D* CSChit =(CSCRecHit2D*)(&**hit); // std::cout << " after CSCRecHit2D, CSChit = " << CSChit << std::endl; diff --git a/L1Trigger/L1TNtuples/plugins/L1RecoTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1RecoTreeProducer.cc index 4cd6d4f4e7126..0e51d0f37e242 100644 --- a/L1Trigger/L1TNtuples/plugins/L1RecoTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1RecoTreeProducer.cc @@ -43,13 +43,13 @@ class L1RecoTreeProducer : public edm::EDAnalyzer { public: explicit L1RecoTreeProducer(const edm::ParameterSet&); - ~L1RecoTreeProducer(); + ~L1RecoTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; public: L1Analysis::L1AnalysisRecoVertexDataFormat* vtxData_; diff --git a/L1Trigger/L1TNtuples/plugins/L1TauRecoTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1TauRecoTreeProducer.cc index 11ff054b19987..2f52075832f21 100644 --- a/L1Trigger/L1TNtuples/plugins/L1TauRecoTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1TauRecoTreeProducer.cc @@ -65,13 +65,13 @@ class L1TauRecoTreeProducer : public edm::EDAnalyzer { public: explicit L1TauRecoTreeProducer(const edm::ParameterSet&); - ~L1TauRecoTreeProducer(); + ~L1TauRecoTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; public: L1Analysis::L1AnalysisRecoTau* tau; diff --git a/L1Trigger/L1TNtuples/plugins/L1UpgradeTfMuonTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1UpgradeTfMuonTreeProducer.cc index 975f3a6fed3be..4522853ecb06b 100644 --- a/L1Trigger/L1TNtuples/plugins/L1UpgradeTfMuonTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1UpgradeTfMuonTreeProducer.cc @@ -45,13 +45,13 @@ class L1UpgradeTfMuonTreeProducer : public edm::EDAnalyzer { public: explicit L1UpgradeTfMuonTreeProducer(const edm::ParameterSet&); - ~L1UpgradeTfMuonTreeProducer(); + ~L1UpgradeTfMuonTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; public: diff --git a/L1Trigger/L1TNtuples/plugins/L1UpgradeTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1UpgradeTreeProducer.cc index 3aac6bbbe2e1d..63e4b070345ed 100644 --- a/L1Trigger/L1TNtuples/plugins/L1UpgradeTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1UpgradeTreeProducer.cc @@ -50,13 +50,13 @@ Description: Produce L1 Extra tree class L1UpgradeTreeProducer : public edm::EDAnalyzer { public: explicit L1UpgradeTreeProducer(const edm::ParameterSet&); - ~L1UpgradeTreeProducer(); + ~L1UpgradeTreeProducer() override; private: - virtual void beginJob(void) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob(void) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; public: diff --git a/L1Trigger/L1TNtuples/plugins/L1uGTTreeProducer.cc b/L1Trigger/L1TNtuples/plugins/L1uGTTreeProducer.cc index a20d14db1b040..e393d7c0db6a0 100644 --- a/L1Trigger/L1TNtuples/plugins/L1uGTTreeProducer.cc +++ b/L1Trigger/L1TNtuples/plugins/L1uGTTreeProducer.cc @@ -28,13 +28,13 @@ class L1uGTTreeProducer : public edm::EDAnalyzer { public: explicit L1uGTTreeProducer(edm::ParameterSet const &); - ~L1uGTTreeProducer(); + ~L1uGTTreeProducer() override; private: - virtual void beginJob() override; - virtual void analyze(edm::Event const &, edm::EventSetup const &) override; - virtual void endJob() override; + void beginJob() override; + void analyze(edm::Event const &, edm::EventSetup const &) override; + void endJob() override; private: // output file @@ -56,7 +56,7 @@ class L1uGTTreeProducer : public edm::EDAnalyzer { L1uGTTreeProducer::L1uGTTreeProducer(edm::ParameterSet const & config) : - results_(NULL), tree_(NULL), + results_(nullptr), tree_(nullptr), ugt_token_( consumes(config.getParameter("ugtToken"))), cache_id_( 0 ) { diff --git a/L1Trigger/L1TNtuples/src/L1AnalysisCaloTP.cc b/L1Trigger/L1TNtuples/src/L1AnalysisCaloTP.cc index 6a179a35c83d5..2644e72f7b84f 100644 --- a/L1Trigger/L1TNtuples/src/L1AnalysisCaloTP.cc +++ b/L1Trigger/L1TNtuples/src/L1AnalysisCaloTP.cc @@ -37,7 +37,7 @@ void L1Analysis::L1AnalysisCaloTP::SetHCAL( const HcalTrigPrimDigiCollection& hc unsigned short compEt = hcalTPs[i].SOI_compressedEt(); double et = 0.; - if (hcalScale_!=0) et = hcalScale_->et( compEt, absIeta, sign ); + if (hcalScale_!=nullptr) et = hcalScale_->et( compEt, absIeta, sign ); unsigned short fineGrain = (unsigned short) hcalTPs[i].SOI_fineGrain(); @@ -68,7 +68,7 @@ void L1Analysis::L1AnalysisCaloTP::SetECAL( const EcalTrigPrimDigiCollection& ec unsigned short compEt = ecalTPs[i].compressedEt(); double et = 0.; - if (ecalScale_!=0) et = ecalScale_->et( compEt, absIeta, sign ); + if (ecalScale_!=nullptr) et = ecalScale_->et( compEt, absIeta, sign ); unsigned short fineGrain = (unsigned short) ecalTPs[i].fineGrain(); // 0 or 1 diff --git a/L1Trigger/L1TNtuples/src/L1AnalysisDTTF.cc b/L1Trigger/L1TNtuples/src/L1AnalysisDTTF.cc index 6e7addd9c46c2..3d91cba3cd5a7 100644 --- a/L1Trigger/L1TNtuples/src/L1AnalysisDTTF.cc +++ b/L1Trigger/L1TNtuples/src/L1AnalysisDTTF.cc @@ -1,6 +1,6 @@ -#include "math.h" +#include #include "L1Trigger/L1TNtuples/interface/L1AnalysisDTTF.h" -#include "math.h" +#include L1Analysis::L1AnalysisDTTF::L1AnalysisDTTF() diff --git a/L1Trigger/L1TNtuples/src/L1AnalysisEvent.cc b/L1Trigger/L1TNtuples/src/L1AnalysisEvent.cc index 6730ead5871a6..0cb6c7543e130 100644 --- a/L1Trigger/L1TNtuples/src/L1AnalysisEvent.cc +++ b/L1Trigger/L1TNtuples/src/L1AnalysisEvent.cc @@ -57,7 +57,7 @@ void L1Analysis::L1AnalysisEvent::Set(const edm::Event& e, const edm::EDGetToken if (!hlt_.isUninitialized()){ edm::Handle hltresults; e.getByToken(hlt_,hltresults); - const edm::TriggerNames TrigNames_ = e.triggerNames(*hltresults); + const edm::TriggerNames& TrigNames_ = e.triggerNames(*hltresults); const int ntrigs = hltresults->size(); for (int itr=0; itr #include "L1Trigger/L1TNtuples/interface/L1AnalysisGT.h" -#include "stdint.h" +#include L1Analysis::L1AnalysisGT::L1AnalysisGT() diff --git a/L1Trigger/L1TNtuples/src/L1AnalysisL1Extra.cc b/L1Trigger/L1TNtuples/src/L1AnalysisL1Extra.cc index 110c522263de8..3195c03ef95ea 100644 --- a/L1Trigger/L1TNtuples/src/L1AnalysisL1Extra.cc +++ b/L1Trigger/L1TNtuples/src/L1AnalysisL1Extra.cc @@ -145,7 +145,7 @@ void L1Analysis::L1AnalysisL1Extra::SetHFring(const edm::Handlesize()==0) continue; + if (hfRings->empty()) continue; l1extra_.hfEtSum[i] = (hfRings->begin()->hfEtSum((l1extra::L1HFRings::HFRingLabels) i)); l1extra_.hfBitCnt[i] = (hfRings->begin()->hfBitCount((l1extra::L1HFRings::HFRingLabels) i)); diff --git a/L1Trigger/ME0Trigger/plugins/ME0TriggerProducer.h b/L1Trigger/ME0Trigger/plugins/ME0TriggerProducer.h index 022293863cd87..797451d31c972 100644 --- a/L1Trigger/ME0Trigger/plugins/ME0TriggerProducer.h +++ b/L1Trigger/ME0Trigger/plugins/ME0TriggerProducer.h @@ -24,10 +24,10 @@ class ME0TriggerProducer : public edm::global::EDProducer<> { public: explicit ME0TriggerProducer(const edm::ParameterSet&); - ~ME0TriggerProducer(); + ~ME0TriggerProducer() override; //virtual void beginRun(const edm::EventSetup& setup); - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; private: edm::InputTag me0PadDigiClusterProducer_; diff --git a/L1Trigger/ME0Trigger/src/ME0TriggerBuilder.cc b/L1Trigger/ME0Trigger/src/ME0TriggerBuilder.cc index 5d629afe3c407..ea0ae8ade442a 100644 --- a/L1Trigger/ME0Trigger/src/ME0TriggerBuilder.cc +++ b/L1Trigger/ME0Trigger/src/ME0TriggerBuilder.cc @@ -46,7 +46,7 @@ void ME0TriggerBuilder::build(const ME0PadDigiClusterCollection* me0Pads, ME0DetId detid(region, 0, cham, 0); // Run processors only if chamber exists in geometry. - if (tmb == 0 || me0_g->chamber(detid) == 0) continue; + if (tmb == nullptr || me0_g->chamber(detid) == nullptr) continue; tmb->run(me0Pads); diff --git a/L1Trigger/RPCTechnicalTrigger/interface/LogicFactory.h b/L1Trigger/RPCTechnicalTrigger/interface/LogicFactory.h index 6f2538ec90032..1ee7f613a5107 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/LogicFactory.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/LogicFactory.h @@ -2,7 +2,7 @@ #define LOGICFACTORY_H 1 // Include files -#include +#include #include #include @@ -42,7 +42,7 @@ class LogicFactory { if ( itr != m_associations.end() ) { return ( itr->second )(); - } else return NULL; // handle error + } else return nullptr; // handle error } protected: diff --git a/L1Trigger/RPCTechnicalTrigger/interface/ProcessTestSignal.h b/L1Trigger/RPCTechnicalTrigger/interface/ProcessTestSignal.h index 7e7283be17139..6d4ab3115e950 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/ProcessTestSignal.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/ProcessTestSignal.h @@ -8,7 +8,7 @@ #include "L1Trigger/RPCTechnicalTrigger/interface/RPCData.h" #include "L1Trigger/RPCTechnicalTrigger/interface/ProcessInputSignal.h" -#include +#include #include #include #include @@ -32,9 +32,9 @@ class ProcessTestSignal : public ProcessInputSignal { ProcessTestSignal( const char * ); - virtual ~ProcessTestSignal( ); ///< Destructor + ~ProcessTestSignal( ) override; ///< Destructor - int next(); + int next() override; void rewind(); @@ -42,7 +42,7 @@ class ProcessTestSignal : public ProcessInputSignal { void reset(); - RPCInputSignal * retrievedata() { + RPCInputSignal * retrievedata() override { return m_lbin; }; diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCBasicConfig.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCBasicConfig.h index 70c7c959188d1..37337fe4c61f9 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCBasicConfig.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCBasicConfig.h @@ -20,11 +20,11 @@ class RBCBasicConfig : public RBCConfiguration { RBCBasicConfig( const RBCBoardSpecs * , RBCId * ); - virtual ~RBCBasicConfig( ); ///< Destructor + ~RBCBasicConfig( ) override; ///< Destructor - bool initialise(); + bool initialise() override; - void preprocess( RBCInput & ); + void preprocess( RBCInput & ) override; protected: diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCBoardSpecsIO.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCBoardSpecsIO.h index 524ec01e3e4ff..515583d8c09a5 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCBoardSpecsIO.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCBoardSpecsIO.h @@ -4,7 +4,7 @@ // Include files #include "CondFormats/RPCObjects/interface/RBCBoardSpecs.h" -#include +#include #include #include #include @@ -20,7 +20,7 @@ class RBCBoardSpecsIO : public RBCBoardSpecs { /// Standard constructor RBCBoardSpecsIO( ); - virtual ~RBCBoardSpecsIO( ); ///< Destructor + ~RBCBoardSpecsIO( ) override; ///< Destructor friend std::istream& operator>>(std::istream &, RBCBoardConfig &); diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCChamberORLogic.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCChamberORLogic.h index 54ecdcbbaa2ac..3dd6584a16ea5 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCChamberORLogic.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCChamberORLogic.h @@ -29,13 +29,13 @@ class RBCChamberORLogic : public RBCLogic { /// Standard constructor RBCChamberORLogic( ); - virtual ~RBCChamberORLogic( ); ///< Destructor + ~RBCChamberORLogic( ) override; ///< Destructor - void process ( const RBCInput & , std::bitset<2> & ); + void process ( const RBCInput & , std::bitset<2> & ) override; - void setBoardSpecs( const RBCBoardSpecs::RBCBoardConfig & ); + void setBoardSpecs( const RBCBoardSpecs::RBCBoardConfig & ) override; - std::bitset<6> * getlayersignal(int _idx) { return & m_layersignal[_idx]; }; + std::bitset<6> * getlayersignal(int _idx) override { return & m_layersignal[_idx]; }; typedef std::vector::iterator itr2names; typedef std::map::iterator itr2chambers; diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h index 13b7a97121944..514f3cb9379ed 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h @@ -2,7 +2,7 @@ #define INTERFACE_RBCINPUT_H 1 // Include files -#include +#include #include #include #include diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardGLSignal.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardGLSignal.h index bc73ab1b51214..25af2f42f76b8 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardGLSignal.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardGLSignal.h @@ -20,9 +20,9 @@ class RBCLinkBoardGLSignal : public RPCInputSignal { RBCLinkBoardGLSignal( std::map< int, RBCInput* > * ); - virtual ~RBCLinkBoardGLSignal( ); ///< Destructor + ~RBCLinkBoardGLSignal( ) override; ///< Destructor - void clear() { }; + void clear() override { }; std::map< int, RBCInput* > * m_linkboardin; diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardSignal.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardSignal.h index a7c033f3838a6..fce71ab69ebc5 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardSignal.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCLinkBoardSignal.h @@ -18,9 +18,9 @@ class RBCLinkBoardSignal : public RPCInputSignal { RBCLinkBoardSignal( RBCInput * ); - virtual ~RBCLinkBoardSignal( ); ///< Destructor + ~RBCLinkBoardSignal( ) override; ///< Destructor - void clear() { }; + void clear() override { }; RBCInput * m_linkboardin; diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCLogicUnit.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCLogicUnit.h index 5e735567fb3ac..9ced8137b23c1 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCLogicUnit.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCLogicUnit.h @@ -23,7 +23,7 @@ class RBCLogicUnit : public RPCLogicUnit { RBCLogicUnit( const char * ); - virtual ~RBCLogicUnit( ); ///< Destructor + ~RBCLogicUnit( ) override; ///< Destructor bool initialise(); diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCPatternLogic.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCPatternLogic.h index 451fbd6ddcc96..5e8e56deb3349 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCPatternLogic.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCPatternLogic.h @@ -21,13 +21,13 @@ class RBCPatternLogic : public RBCLogic { /// Standard constructor RBCPatternLogic( ); - virtual ~RBCPatternLogic( ); ///< Destructor + ~RBCPatternLogic( ) override; ///< Destructor - void process(const RBCInput & , std::bitset<2> & ); + void process(const RBCInput & , std::bitset<2> & ) override; - void setBoardSpecs( const RBCBoardSpecs::RBCBoardConfig & ); + void setBoardSpecs( const RBCBoardSpecs::RBCBoardConfig & ) override; - std::bitset<6> * getlayersignal( int _idx ) { return &m_testlayer[_idx];}; + std::bitset<6> * getlayersignal( int _idx ) override { return &m_testlayer[_idx];}; protected: diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessRPCDigis.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessRPCDigis.h index e2f723822282a..4c0d974e16f6d 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessRPCDigis.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessRPCDigis.h @@ -21,7 +21,7 @@ #include "L1Trigger/RPCTechnicalTrigger/interface/RPCData.h" #include "L1Trigger/RPCTechnicalTrigger/interface/ProcessInputSignal.h" -#include +#include #include #include #include @@ -44,9 +44,9 @@ class RBCProcessRPCDigis : public ProcessInputSignal { RBCProcessRPCDigis( const edm::ESHandle &, const edm::Handle & ); - virtual ~RBCProcessRPCDigis( ); ///< Destructor + ~RBCProcessRPCDigis( ) override; ///< Destructor - int next(); + int next() override; void reset(); @@ -58,7 +58,7 @@ class RBCProcessRPCDigis : public ProcessInputSignal { void print_output(); - RPCInputSignal * retrievedata() { + RPCInputSignal * retrievedata() override { return m_lbin; }; diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessRPCSimDigis.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessRPCSimDigis.h index 227150ee5b8f5..d083cab657764 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessRPCSimDigis.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessRPCSimDigis.h @@ -21,7 +21,7 @@ #include "L1Trigger/RPCTechnicalTrigger/interface/RPCData.h" #include "L1Trigger/RPCTechnicalTrigger/interface/ProcessInputSignal.h" -#include +#include #include #include #include @@ -44,7 +44,7 @@ class RBCProcessRPCSimDigis : public ProcessInputSignal { RBCProcessRPCSimDigis( const edm::ESHandle &, const edm::Handle > & ); - int next(); + int next() override; void reset(); @@ -56,14 +56,14 @@ class RBCProcessRPCSimDigis : public ProcessInputSignal { void print_output(); - RPCInputSignal * retrievedata() { + RPCInputSignal * retrievedata() override { return m_lbin; }; void rewind() {}; void showfirst() {}; - virtual ~RBCProcessRPCSimDigis( ); ///< Destructor + ~RBCProcessRPCSimDigis( ) override; ///< Destructor protected: diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessTestSignal.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessTestSignal.h index bcd660f31fc3b..9188bd30f796c 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessTestSignal.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCProcessTestSignal.h @@ -7,7 +7,7 @@ #include "L1Trigger/RPCTechnicalTrigger/interface/RPCInputSignal.h" #include "L1Trigger/RPCTechnicalTrigger/interface/ProcessInputSignal.h" -#include +#include #include #include #include @@ -29,15 +29,15 @@ class RBCProcessTestSignal : public ProcessInputSignal { RBCProcessTestSignal( const char * ); - virtual ~RBCProcessTestSignal( ); ///< Destructor + ~RBCProcessTestSignal( ) override; ///< Destructor - int next(); + int next() override; void rewind(); void showfirst(); - RPCInputSignal * retrievedata() { + RPCInputSignal * retrievedata() override { return m_lbin; }; diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RBCTestLogic.h b/L1Trigger/RPCTechnicalTrigger/interface/RBCTestLogic.h index 2d5126f4e4041..f0974eb0e7c7e 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RBCTestLogic.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RBCTestLogic.h @@ -24,13 +24,13 @@ class RBCTestLogic : public RBCLogic { /// Standard constructor RBCTestLogic( ); - virtual ~RBCTestLogic( ); ///< Destructor + ~RBCTestLogic( ) override; ///< Destructor - void process ( const RBCInput & , std::bitset<2> & ); + void process ( const RBCInput & , std::bitset<2> & ) override; - void setBoardSpecs( const RBCBoardSpecs::RBCBoardConfig & ); + void setBoardSpecs( const RBCBoardSpecs::RBCBoardConfig & ) override; - std::bitset<6> * getlayersignal( int _idx ) { return &m_testlayer[_idx];}; + std::bitset<6> * getlayersignal( int _idx ) override { return &m_testlayer[_idx];}; protected: diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RPCData.h b/L1Trigger/RPCTechnicalTrigger/interface/RPCData.h index 9f576ffd0fb67..328a6d4b3466d 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RPCData.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RPCData.h @@ -4,7 +4,7 @@ // Include files #include "L1Trigger/RPCTechnicalTrigger/interface/RBCInput.h" -#include +#include #include #include #include diff --git a/L1Trigger/RPCTechnicalTrigger/interface/RPCTechnicalTrigger.h b/L1Trigger/RPCTechnicalTrigger/interface/RPCTechnicalTrigger.h index 3fba4d5a53fb7..a5589660b3b34 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/RPCTechnicalTrigger.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/RPCTechnicalTrigger.h @@ -69,14 +69,14 @@ class RPCTechnicalTrigger : public edm::EDProducer { public: explicit RPCTechnicalTrigger(const edm::ParameterSet&); - ~RPCTechnicalTrigger(); + ~RPCTechnicalTrigger() override; private: //virtual void beginJob() ; - virtual void beginRun(edm::Run const&, const edm::EventSetup&) override final; - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginRun(edm::Run const&, const edm::EventSetup&) final; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override; //........................................................................... diff --git a/L1Trigger/RPCTechnicalTrigger/interface/TTUBasicConfig.h b/L1Trigger/RPCTechnicalTrigger/interface/TTUBasicConfig.h index b4d52028a2c60..f99bf2f8dfab7 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/TTUBasicConfig.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/TTUBasicConfig.h @@ -21,11 +21,11 @@ class TTUBasicConfig : public TTUConfiguration { TTUBasicConfig( const TTUBoardSpecs * ); - virtual ~TTUBasicConfig( ); ///< Destructor + ~TTUBasicConfig( ) override; ///< Destructor - bool initialise( int , int ); + bool initialise( int , int ) override; - void preprocess( TTUInput & ); + void preprocess( TTUInput & ) override; protected: diff --git a/L1Trigger/RPCTechnicalTrigger/interface/TTUBoardSpecsIO.h b/L1Trigger/RPCTechnicalTrigger/interface/TTUBoardSpecsIO.h index 0ba52e66ef430..144c4fbe500e9 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/TTUBoardSpecsIO.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/TTUBoardSpecsIO.h @@ -4,7 +4,7 @@ // Include files #include "CondFormats/RPCObjects/interface/TTUBoardSpecs.h" -#include +#include #include #include #include @@ -20,7 +20,7 @@ class TTUBoardSpecsIO : public TTUBoardSpecs { /// Standard constructor TTUBoardSpecsIO( ); - virtual ~TTUBoardSpecsIO( ); ///< Destructor + ~TTUBoardSpecsIO( ) override; ///< Destructor friend std::istream& operator>>(std::istream &, TTUBoardConfig &); diff --git a/L1Trigger/RPCTechnicalTrigger/interface/TTUGlobalSignal.h b/L1Trigger/RPCTechnicalTrigger/interface/TTUGlobalSignal.h index 73ac67dcb3e0d..4c49adf29ec87 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/TTUGlobalSignal.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/TTUGlobalSignal.h @@ -20,9 +20,9 @@ class TTUGlobalSignal : public RPCInputSignal { TTUGlobalSignal( std::map< int, TTUInput* > * ); - virtual ~TTUGlobalSignal( ); ///< Destructor + ~TTUGlobalSignal( ) override; ///< Destructor - void clear() { }; + void clear() override { }; std::map< int, TTUInput* > * m_wheelmap; diff --git a/L1Trigger/RPCTechnicalTrigger/interface/TTULogicUnit.h b/L1Trigger/RPCTechnicalTrigger/interface/TTULogicUnit.h index 2e09c5f2bcc9c..c43afeaa77dfd 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/TTULogicUnit.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/TTULogicUnit.h @@ -25,7 +25,7 @@ class TTULogicUnit : public RPCLogicUnit { TTULogicUnit( const char * ); - virtual ~TTULogicUnit( ); ///< Destructor + ~TTULogicUnit( ) override; ///< Destructor bool initialise(); diff --git a/L1Trigger/RPCTechnicalTrigger/interface/TTUPointingLogic.h b/L1Trigger/RPCTechnicalTrigger/interface/TTUPointingLogic.h index 7ec37a896108a..a90310cb9372c 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/TTUPointingLogic.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/TTUPointingLogic.h @@ -22,13 +22,13 @@ class TTUPointingLogic : public TTULogic { /// Standard constructor TTUPointingLogic( ); - virtual ~TTUPointingLogic( ); ///< Destructor + ~TTUPointingLogic( ) override; ///< Destructor //... from TTULogic interface: - bool process( const TTUInput & ); + bool process( const TTUInput & ) override; - void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ); + void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ) override; //... diff --git a/L1Trigger/RPCTechnicalTrigger/interface/TTUSectorORLogic.h b/L1Trigger/RPCTechnicalTrigger/interface/TTUSectorORLogic.h index df89f6b4daa47..e722a3a403c47 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/TTUSectorORLogic.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/TTUSectorORLogic.h @@ -19,13 +19,13 @@ class TTUSectorORLogic : public TTULogic { /// Standard constructor TTUSectorORLogic( ); - virtual ~TTUSectorORLogic( ); ///< Destructor + ~TTUSectorORLogic( ) override; ///< Destructor //... from TTULogic interface: - bool process( const TTUInput & ); + bool process( const TTUInput & ) override; - void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ); + void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ) override; //... diff --git a/L1Trigger/RPCTechnicalTrigger/interface/TTUTrackingAlg.h b/L1Trigger/RPCTechnicalTrigger/interface/TTUTrackingAlg.h index 19ce9f93734c3..900c9b42a66e5 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/TTUTrackingAlg.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/TTUTrackingAlg.h @@ -27,13 +27,13 @@ class TTUTrackingAlg : public TTULogic { /// Standard constructor TTUTrackingAlg( ); - virtual ~TTUTrackingAlg( ); ///< Destructor + ~TTUTrackingAlg( ) override; ///< Destructor //... from TTULogic interface: - bool process( const TTUInput & ); + bool process( const TTUInput & ) override; - void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ); + void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ) override; //... diff --git a/L1Trigger/RPCTechnicalTrigger/interface/TTUTwoORLogic.h b/L1Trigger/RPCTechnicalTrigger/interface/TTUTwoORLogic.h index a43b9488b89de..6fd1bb67c22fb 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/TTUTwoORLogic.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/TTUTwoORLogic.h @@ -24,13 +24,13 @@ class TTUTwoORLogic : public TTULogic { /// Standard constructor TTUTwoORLogic( ); - virtual ~TTUTwoORLogic( ); ///< Destructor + ~TTUTwoORLogic( ) override; ///< Destructor //... from TTULogic interface: - bool process( const TTUInput & ); + bool process( const TTUInput & ) override; - void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ); + void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ) override; //... diff --git a/L1Trigger/RPCTechnicalTrigger/interface/TTUWedgeORLogic.h b/L1Trigger/RPCTechnicalTrigger/interface/TTUWedgeORLogic.h index 873bdf2bb9526..7b6d76501ee74 100644 --- a/L1Trigger/RPCTechnicalTrigger/interface/TTUWedgeORLogic.h +++ b/L1Trigger/RPCTechnicalTrigger/interface/TTUWedgeORLogic.h @@ -20,11 +20,11 @@ class TTUWedgeORLogic : public TTULogic { /// Standard constructor TTUWedgeORLogic( ); - virtual ~TTUWedgeORLogic( ); ///< Destructor + ~TTUWedgeORLogic( ) override; ///< Destructor - bool process( const TTUInput & ); + bool process( const TTUInput & ) override; - void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ); + void setBoardSpecs( const TTUBoardSpecs::TTUBoardConfig & ) override; protected: diff --git a/L1Trigger/RPCTechnicalTrigger/src/RBCBasicConfig.cc b/L1Trigger/RPCTechnicalTrigger/src/RBCBasicConfig.cc index 69c32e9b78211..9bf7c7eed09a1 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RBCBasicConfig.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RBCBasicConfig.cc @@ -67,9 +67,9 @@ bool RBCBasicConfig::initialise() if ( !status ) { if( m_debug ) std::cout << "RBCConfiguration> Problem initialising the logic unit\n"; - return 0; }; + return false; }; - return 1; + return true; } diff --git a/L1Trigger/RPCTechnicalTrigger/src/RBCEmulator.cc b/L1Trigger/RPCTechnicalTrigger/src/RBCEmulator.cc index 11bf4589808dd..6dc0db92f28e7 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RBCEmulator.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RBCEmulator.cc @@ -17,7 +17,7 @@ //============================================================================= RBCEmulator::RBCEmulator( ) { - m_signal = NULL; + m_signal = nullptr; m_logtype = std::string("TestLogic"); m_rbcinfo = new RBCId(); m_input = new RBCInput(); @@ -33,7 +33,7 @@ RBCEmulator::RBCEmulator( ) { RBCEmulator::RBCEmulator( const char * logic_type ) { - m_signal = NULL; + m_signal = nullptr; m_logtype = std::string( logic_type ); m_rbcinfo = new RBCId(); m_input = new RBCInput(); @@ -98,9 +98,9 @@ bool RBCEmulator::initialise() if ( !status ) { if( m_debug ) std::cout << "RBCEmulator> Problem initialising the Configuration \n"; - return 0; }; + return false; }; - return 1; + return true; } diff --git a/L1Trigger/RPCTechnicalTrigger/src/RBCInput.cc b/L1Trigger/RPCTechnicalTrigger/src/RBCInput.cc index c8fbad65ab709..eedc4fae16e98 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RBCInput.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RBCInput.cc @@ -40,12 +40,12 @@ void RBCInput::mask( const std::vector & maskvec ) //... operate on the first sector for(int i=0; i < 15; ++i) - if ( maskvec[i] ) input_sec[0].set(i,0); + if ( maskvec[i] ) input_sec[0].set(i,false); //... operate on the second sector for(int i=15; i < 30; ++i) - if ( maskvec[i] ) input_sec[1].set( (i-15),0); + if ( maskvec[i] ) input_sec[1].set( (i-15),false); } diff --git a/L1Trigger/RPCTechnicalTrigger/src/RBCLinkBoardGLSignal.cc b/L1Trigger/RPCTechnicalTrigger/src/RBCLinkBoardGLSignal.cc index 37909dc78e1cc..cecdf10fd2099 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RBCLinkBoardGLSignal.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RBCLinkBoardGLSignal.cc @@ -24,7 +24,7 @@ RBCLinkBoardGLSignal::RBCLinkBoardGLSignal( std::map< int, RBCInput* > * in ) { //============================================================================= RBCLinkBoardGLSignal::~RBCLinkBoardGLSignal() { - m_linkboardin = NULL; + m_linkboardin = nullptr; } diff --git a/L1Trigger/RPCTechnicalTrigger/src/RBCLogicUnit.cc b/L1Trigger/RPCTechnicalTrigger/src/RBCLogicUnit.cc index e4d64ce90d40f..54fcc438fe172 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RBCLogicUnit.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RBCLogicUnit.cc @@ -49,15 +49,15 @@ bool RBCLogicUnit::initialise() status = m_logtool->initialise(); if ( !status ) { if( m_debug ) std::cout << "RBCLogicUnit> Problem initialising LogicTool \n"; - return 0; }; + return false; }; m_logic = dynamic_cast ( m_logtool->retrieve(m_logtype) ); if ( ! m_logic ) { if( m_debug ) std::cout << "RBCLogicUnit> No logic found \n"; - return 0; }; + return false; }; - return 1; + return true; } diff --git a/L1Trigger/RPCTechnicalTrigger/src/RBCPatternLogic.cc b/L1Trigger/RPCTechnicalTrigger/src/RBCPatternLogic.cc index 6008abb26ee0d..03c5ce07ba39f 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RBCPatternLogic.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RBCPatternLogic.cc @@ -28,13 +28,13 @@ void RBCPatternLogic::process( const RBCInput & _input, std::bitset<2> & _decisi { std::cout << "RBCPatternLogic> Working with pattern logic" << '\n'; - _decision.set(0,1); - _decision.set(1,1); + _decision.set(0,true); + _decision.set(1,true); //...Layer information: for(int k=0; k < 6; ++k) { - m_testlayer[0].set(k,1); - m_testlayer[1].set(k,0); + m_testlayer[0].set(k,true); + m_testlayer[1].set(k,false); } diff --git a/L1Trigger/RPCTechnicalTrigger/src/RBCProcessRPCDigis.cc b/L1Trigger/RPCTechnicalTrigger/src/RBCProcessRPCDigis.cc index bb192e6b76aba..b966e195e470a 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RBCProcessRPCDigis.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RBCProcessRPCDigis.cc @@ -212,7 +212,7 @@ int RBCProcessRPCDigis::next() { if ( m_debug ) (*wheelCounter).second->printSummary(); } - if ( m_data.size() <= 0 ) return 0; + if ( m_data.empty() ) return 0; return 1; @@ -365,7 +365,7 @@ void RBCProcessRPCDigis::setInputBit( std::bitset<15> & signals , int digipos ) int bitpos = m_layermap[digipos]; if( m_debug ) std::cout << "Bitpos: " << bitpos << std::endl; - signals.set( bitpos , 1 ); + signals.set( bitpos , true ); } diff --git a/L1Trigger/RPCTechnicalTrigger/src/RBCProcessRPCSimDigis.cc b/L1Trigger/RPCTechnicalTrigger/src/RBCProcessRPCSimDigis.cc index 16c67227fcbb6..3ed50f0985e71 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RBCProcessRPCSimDigis.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RBCProcessRPCSimDigis.cc @@ -192,7 +192,7 @@ int RBCProcessRPCSimDigis::next() { if ( m_debug ) std::cout << "RBCProcessRPCSimDigis: DataSize: " << m_data.size() << " ndigis " << ndigis << std::endl; - if ( m_data.size() <= 0 ) return 0; + if ( m_data.empty() ) return 0; return 1; @@ -346,7 +346,7 @@ void RBCProcessRPCSimDigis::setInputBit( std::bitset<15> & signals , int digipos int bitpos = m_layermap[digipos]; if( m_debug ) std::cout << "Bitpos: " << bitpos << std::endl; - signals.set( bitpos , 1 ); + signals.set( bitpos , true ); } diff --git a/L1Trigger/RPCTechnicalTrigger/src/RBCTestLogic.cc b/L1Trigger/RPCTechnicalTrigger/src/RBCTestLogic.cc index e80c55ef1819b..fbce201d64719 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RBCTestLogic.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RBCTestLogic.cc @@ -43,8 +43,8 @@ void RBCTestLogic::process( const RBCInput & _input, std::bitset<2> & _decision) //...Layer information: for(int k=0; k < 6; ++k) { - m_testlayer[0].set(k,1); - m_testlayer[1].set(k,0); + m_testlayer[0].set(k,true); + m_testlayer[1].set(k,false); } diff --git a/L1Trigger/RPCTechnicalTrigger/src/RPCTechnicalTrigger.cc b/L1Trigger/RPCTechnicalTrigger/src/RPCTechnicalTrigger.cc index 0b5b8b21b830a..77fae81a862fb 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RPCTechnicalTrigger.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RPCTechnicalTrigger.cc @@ -99,7 +99,7 @@ RPCTechnicalTrigger::RPCTechnicalTrigger(const edm::ParameterSet& iConfig) { m_maxTtuBoards = 3; m_maxBits = 5; m_hasConfig = false; - m_readConfig = NULL; + m_readConfig = nullptr; produces(); consumes(m_rpcDigiLabel); consumes >(edm::InputTag("simMuonRPCDigis", "RPCDigiSimLink","")); diff --git a/L1Trigger/RPCTechnicalTrigger/src/RPCWheelMap.cc b/L1Trigger/RPCTechnicalTrigger/src/RPCWheelMap.cc index 92856f490dca6..a5fd1b6e03122 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/RPCWheelMap.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/RPCWheelMap.cc @@ -56,7 +56,7 @@ void RPCWheelMap::addHit( int bx, int sec, int layer) // 0.....11 int indx1 = bx + m_maxBxWindow; int indx2 = sec + indx1*m_maxSectors; - m_wheelMapBx[ indx2 ].set( layer-1, 1); + m_wheelMapBx[ indx2 ].set( layer-1, true); } diff --git a/L1Trigger/RPCTechnicalTrigger/src/TTUBasicConfig.cc b/L1Trigger/RPCTechnicalTrigger/src/TTUBasicConfig.cc index 5b3045be769ec..61713191ae819 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/TTUBasicConfig.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/TTUBasicConfig.cc @@ -88,7 +88,7 @@ bool TTUBasicConfig::initialise( int line , int ttuid ) if ( !status ) { if( m_debug ) std::cout << "TTUConfiguration> Problem initialising the logic unit\n"; - return 0; }; + return false; }; return status; diff --git a/L1Trigger/RPCTechnicalTrigger/src/TTUEmulator.cc b/L1Trigger/RPCTechnicalTrigger/src/TTUEmulator.cc index 926c1d70e6d76..8412c981ca7ef 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/TTUEmulator.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/TTUEmulator.cc @@ -140,7 +140,7 @@ bool TTUEmulator::initialise() if ( !status ) { if( m_debug ) std::cout << "TTUEmulator> Problem initialising the Configuration \n"; - return 0; }; + return false; }; return status; diff --git a/L1Trigger/RPCTechnicalTrigger/src/TTUGlobalSignal.cc b/L1Trigger/RPCTechnicalTrigger/src/TTUGlobalSignal.cc index 7182695562846..ec36b8a32bffc 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/TTUGlobalSignal.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/TTUGlobalSignal.cc @@ -24,7 +24,7 @@ TTUGlobalSignal::TTUGlobalSignal( std::map< int, TTUInput* > * in ) { //============================================================================= TTUGlobalSignal::~TTUGlobalSignal() { - m_wheelmap = NULL; + m_wheelmap = nullptr; } diff --git a/L1Trigger/RPCTechnicalTrigger/src/TTULogicUnit.cc b/L1Trigger/RPCTechnicalTrigger/src/TTULogicUnit.cc index dafe03bcd1256..d8a74a76e1fb2 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/TTULogicUnit.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/TTULogicUnit.cc @@ -49,15 +49,15 @@ bool TTULogicUnit::initialise() status = m_logtool->initialise(); if ( !status ) { if( m_debug ) std::cout << "TTULogicUnit> Problem initialising LogicTool \n"; - return 0; }; + return false; }; m_logic = dynamic_cast ( m_logtool->retrieve(m_logtype) ); if ( ! m_logic ) { if( m_debug ) std::cout << "TTULogicUnit> No logic found \n"; - return 0; }; + return false; }; - return 1; + return true; } diff --git a/L1Trigger/RPCTechnicalTrigger/src/TTUTrackingAlg.cc b/L1Trigger/RPCTechnicalTrigger/src/TTUTrackingAlg.cc index 740de03e25991..8dc4eba4ce109 100644 --- a/L1Trigger/RPCTechnicalTrigger/src/TTUTrackingAlg.cc +++ b/L1Trigger/RPCTechnicalTrigger/src/TTUTrackingAlg.cc @@ -72,7 +72,7 @@ bool TTUTrackingAlg::process( const TTUInput & inmap ) //. runSeedBuster( inmap ); - if ( m_initialseeds.size() > 0 && m_initialseeds.size() < 20 ) // if too much hits, then cannot process + if ( !m_initialseeds.empty() && m_initialseeds.size() < 20 ) // if too much hits, then cannot process initTrk->add( m_initialseeds[0] ); else { initTrk->addnone(); diff --git a/L1Trigger/RPCTrigger/interface/MuonsGrabber.h b/L1Trigger/RPCTrigger/interface/MuonsGrabber.h index 94f5f53dc202c..38352b5ab2320 100644 --- a/L1Trigger/RPCTrigger/interface/MuonsGrabber.h +++ b/L1Trigger/RPCTrigger/interface/MuonsGrabber.h @@ -65,9 +65,9 @@ class MuonsGrabber void addMuon(RPCTBMuon & mu, int lvl, int region, int hs, int index); private: - MuonsGrabber(const MuonsGrabber&); // stop default + MuonsGrabber(const MuonsGrabber&) = delete; // stop default - const MuonsGrabber& operator=(const MuonsGrabber&); // stop default + const MuonsGrabber& operator=(const MuonsGrabber&) = delete; // stop default std::string IntToString(int i); // ---------- member data -------------------------------- diff --git a/L1Trigger/RPCTrigger/interface/RPCBasicTrigConfig.h b/L1Trigger/RPCTrigger/interface/RPCBasicTrigConfig.h index fd39f89ef8ddb..c39de0f849f45 100644 --- a/L1Trigger/RPCTrigger/interface/RPCBasicTrigConfig.h +++ b/L1Trigger/RPCTrigger/interface/RPCBasicTrigConfig.h @@ -18,37 +18,37 @@ class RPCBasicTrigConfig: public RPCTriggerConfiguration { RPCBasicTrigConfig(); ///returns count of Trigger Crates in system. - virtual int getTCsCnt(); + int getTCsCnt() override; ///returns number og Trigger Boards in one Trigger Crate. - virtual int getTBsInTC(); + int getTBsInTC() override; /** One TB covers 3 or 4 Towers. The function returns the index of m_tower * on TB. */ - virtual int getTowerNumOnTb(const RPCConst::l1RpcConeCrdnts& coneCrdnts); + int getTowerNumOnTb(const RPCConst::l1RpcConeCrdnts& coneCrdnts) override; ///Returns pointer to m_PAC that should run given LogCone. The PACs are holded by L1PacManager. - virtual const RPCPacData* getPac(const RPCConst::l1RpcConeCrdnts& coneCrdnts) const; + const RPCPacData* getPac(const RPCConst::l1RpcConeCrdnts& coneCrdnts) const override; ///Returns the index of TC that should run given LogCone. - virtual int getTCNum(const RPCConst::l1RpcConeCrdnts& coneCrdnts); + int getTCNum(const RPCConst::l1RpcConeCrdnts& coneCrdnts) override; ///Returns the index of TB (in TC) that should run given LogCone. - virtual int getTBNum(const RPCConst::l1RpcConeCrdnts& coneCrdnts); + int getTBNum(const RPCConst::l1RpcConeCrdnts& coneCrdnts) override; ///Returns the count of Towers (3 or 4), that are covered by given TB. - virtual int getTowsCntOnTB(int tbNum); + int getTowsCntOnTB(int tbNum) override; /** Converts TC GB-Sorter input m_tower address <0...35> ("m_tower number natural") * to m_tower number <-16...0...16> * TC GB-Sorter input m_tower address is 8 bits: [7...2] TB num, [1...0] m_tower num on TB.*/ - virtual int towAddr2TowNum(int towAddr); + int towAddr2TowNum(int towAddr) override; /** Converts TC GB-Sorter output m_tower address <0...31> ("m_tower number continous") * to m_tower number 2'complement*/ - virtual int towNum2TowNum2Comp(int towNum); + int towNum2TowNum2Comp(int towNum) override; - virtual ~RPCBasicTrigConfig() {} + ~RPCBasicTrigConfig() override {} private: static const int m_TRIGGER_CRATES_CNT; diff --git a/L1Trigger/RPCTrigger/interface/RPCConeBuilder.h b/L1Trigger/RPCTrigger/interface/RPCConeBuilder.h index 06cf64c96a2eb..746534ccc472e 100644 --- a/L1Trigger/RPCTrigger/interface/RPCConeBuilder.h +++ b/L1Trigger/RPCTrigger/interface/RPCConeBuilder.h @@ -36,7 +36,7 @@ class RPCConeBuilder : public edm::ESProducer { public: RPCConeBuilder(const edm::ParameterSet&); - ~RPCConeBuilder() {}; + ~RPCConeBuilder() override {}; typedef std::shared_ptr ReturnType; diff --git a/L1Trigger/RPCTrigger/interface/RPCPatternsParser.h b/L1Trigger/RPCTrigger/interface/RPCPatternsParser.h index cfb057caa68b1..650bd1e5e00bc 100644 --- a/L1Trigger/RPCTrigger/interface/RPCPatternsParser.h +++ b/L1Trigger/RPCTrigger/interface/RPCPatternsParser.h @@ -33,13 +33,13 @@ class RPCPatternsParser : public XERCES_CPP_NAMESPACE::DefaultHandler { //}; RPCPatternsParser(); - ~RPCPatternsParser(); + ~RPCPatternsParser() override; void startElement(const XMLCh* const uri, const XMLCh* const localname, - const XMLCh* const qname, const XERCES_CPP_NAMESPACE::Attributes& attrs); + const XMLCh* const qname, const XERCES_CPP_NAMESPACE::Attributes& attrs) override; - void endElement (const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname); + void endElement (const XMLCh* const uri, const XMLCh* const localname, const XMLCh* const qname) override; void parse(std::string fileName); diff --git a/L1Trigger/RPCTrigger/interface/RPCStripsRing.h b/L1Trigger/RPCTrigger/interface/RPCStripsRing.h index 9001ff56671c9..c7f79229f26cf 100644 --- a/L1Trigger/RPCTrigger/interface/RPCStripsRing.h +++ b/L1Trigger/RPCTrigger/interface/RPCStripsRing.h @@ -44,7 +44,7 @@ class RPCStripsRing : public std::map struct TOtherConnStruct { - TOtherConnStruct() : m_logplane(0), m_logplaneSize(0), m_it(0) {}; + TOtherConnStruct() : m_logplane(0), m_logplaneSize(0), m_it(nullptr) {}; short m_logplane; short m_logplaneSize; TIdToRindMap::iterator m_it; diff --git a/L1Trigger/RPCTrigger/interface/RPCTrigger.h b/L1Trigger/RPCTrigger/interface/RPCTrigger.h index e414e5bf96789..54032afe4791e 100644 --- a/L1Trigger/RPCTrigger/interface/RPCTrigger.h +++ b/L1Trigger/RPCTrigger/interface/RPCTrigger.h @@ -48,10 +48,10 @@ class RPCTrigger : public edm::EDProducer { public: explicit RPCTrigger(const edm::ParameterSet&); - ~RPCTrigger(); + ~RPCTrigger() override; - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/L1Trigger/RPCTrigger/plugins/RPCConeBuilder.cc b/L1Trigger/RPCTrigger/plugins/RPCConeBuilder.cc index ed625e8a7ff31..a33e47fe41c16 100644 --- a/L1Trigger/RPCTrigger/plugins/RPCConeBuilder.cc +++ b/L1Trigger/RPCTrigger/plugins/RPCConeBuilder.cc @@ -197,7 +197,7 @@ void RPCConeBuilder::buildCones(const edm::ESHandle & rpcGeom ){ ++it) { - if( dynamic_cast< RPCRoll const * >( *it ) == 0 ) continue; + if( dynamic_cast< RPCRoll const * >( *it ) == nullptr ) continue; ++rolls; RPCRoll const* roll = dynamic_cast< RPCRoll const*>( *it ); diff --git a/L1Trigger/RPCTrigger/plugins/RPCTrigger.cc b/L1Trigger/RPCTrigger/plugins/RPCTrigger.cc index bc54330aaa9ab..dd1d8b765001c 100644 --- a/L1Trigger/RPCTrigger/plugins/RPCTrigger.cc +++ b/L1Trigger/RPCTrigger/plugins/RPCTrigger.cc @@ -23,7 +23,7 @@ RPCTrigger::RPCTrigger(const edm::ParameterSet& iConfig): - m_trigConfig(0),m_pacTrigger(0) + m_trigConfig(nullptr),m_pacTrigger(nullptr) { produces >("RPCb"); produces >("RPCf"); @@ -52,8 +52,8 @@ RPCTrigger::RPCTrigger(const edm::ParameterSet& iConfig): RPCTrigger::~RPCTrigger(){ - if (m_pacTrigger != 0) delete m_pacTrigger; - if (m_trigConfig != 0) delete m_trigConfig; + if (m_pacTrigger != nullptr) delete m_pacTrigger; + if (m_trigConfig != nullptr) delete m_trigConfig; } diff --git a/L1Trigger/RPCTrigger/src/MuonsGrabber.cc b/L1Trigger/RPCTrigger/src/MuonsGrabber.cc index cf2f23ced472c..a1969c5b38689 100644 --- a/L1Trigger/RPCTrigger/src/MuonsGrabber.cc +++ b/L1Trigger/RPCTrigger/src/MuonsGrabber.cc @@ -79,16 +79,16 @@ MuonsGrabber::MuonsGrabber() } m_dom = DOMImplementationRegistry::getDOMImplementation(X("Core")); - if (m_dom == 0) throw cms::Exception("RPCMuonsGrabber") << "Cannot get DOM" << std::endl; + if (m_dom == nullptr) throw cms::Exception("RPCMuonsGrabber") << "Cannot get DOM" << std::endl; m_doc = m_dom->createDocument( - 0, // root element namespace URI. + nullptr, // root element namespace URI. X("rpctDataStream"), // root element name - 0); // document type object (DTD). + nullptr); // document type object (DTD). m_rootElem = m_doc->getDocumentElement(); - m_currEvent = 0; + m_currEvent = nullptr; } @@ -164,14 +164,14 @@ void MuonsGrabber::writeDataForRelativeBX(int bx){ std::sort(m_muons.begin(), m_muons.end(), RPCMuonExtraStruct::lvlCompare) ; for (int tcNum = 0; tcNum <= 11; ++tcNum ) { - DOMElement* tc = 0; - DOMElement* tcgs = 0; + DOMElement* tc = nullptr; + DOMElement* tcgs = nullptr; for (int tbNum = 0; tbNum <= 10; ++tbNum ) { // check actual range, probably till 9 total - DOMElement* tb = 0; - DOMElement* tbgs = 0; + DOMElement* tb = nullptr; + DOMElement* tbgs = nullptr; for (int PAC = 0; PAC <= 4; ++PAC ) { // same here - DOMElement* pac = 0; + DOMElement* pac = nullptr; // for (int segment = 0; segment <= 11; ++segment ) { std::vector< RPCMuonExtraStruct >::iterator it = m_muons.begin(); while ( it != m_muons.end()) { @@ -199,7 +199,7 @@ void MuonsGrabber::writeDataForRelativeBX(int bx){ // << " " << it->_mu.printDebugInfo(2) << std::endl; - if (tc==0) { + if (tc==nullptr) { tc = m_doc->createElement(X("tc")); currRelBx->appendChild(tc); tc->setAttribute(X("num"), X( IntToString(tcNum).c_str())); @@ -208,7 +208,7 @@ void MuonsGrabber::writeDataForRelativeBX(int bx){ tc->appendChild(tcgs); } - if (tb==0 && int(it->_level) <= 1) { + if (tb==nullptr && int(it->_level) <= 1) { tb = m_doc->createElement(X("tb")); tc->appendChild(tb); tb->setAttribute(X("num"), X( IntToString(tbNum).c_str())); @@ -217,7 +217,7 @@ void MuonsGrabber::writeDataForRelativeBX(int bx){ tb->appendChild(tbgs); } - if (pac == 0 && int(it->_level) == 0) { + if (pac == nullptr && int(it->_level) == 0) { pac =m_doc->createElement(X("pac")); tb->appendChild(pac); pac->setAttribute(X("num"), X( IntToString(muPACChipNo).c_str())); @@ -262,14 +262,14 @@ void MuonsGrabber::writeDataForRelativeBX(int bx){ for (int be =0; be <= 1; ++be){ // brl/endcap std::vector< RPCMuonExtraStruct >::iterator it = m_muons.begin(); - DOMElement* hs = 0; + DOMElement* hs = nullptr; while ( it != m_muons.end()) { if ( (int(it->_level) != level) || int(it->_hsHalf)!=half || int(it->_region)!=be ) { ++it; continue; } - if (hs == 0) { + if (hs == nullptr) { if (level == 3) { hs = m_doc->createElement(X("hs")); hs->setAttribute(X("num"), X( IntToString(half).c_str())); @@ -303,7 +303,7 @@ void MuonsGrabber::writeDataForRelativeBX(int bx){ } //half iteration } // lvl iteration - if (m_muons.size()!=0) { + if (!m_muons.empty()) { throw cms::Exception("RPCMuonsGrabber") << " There are still some muons in muons vec" << std::endl; } diff --git a/L1Trigger/RPCTrigger/src/RPCBasicTrigConfig.cc b/L1Trigger/RPCTrigger/src/RPCBasicTrigConfig.cc index 98d12c309a7c3..77f8d8569ebd1 100644 --- a/L1Trigger/RPCTrigger/src/RPCBasicTrigConfig.cc +++ b/L1Trigger/RPCTrigger/src/RPCBasicTrigConfig.cc @@ -8,7 +8,7 @@ RPCBasicTrigConfig::RPCBasicTrigConfig(RPCPacManager* pacManager) { /// Ctor RPCBasicTrigConfig::RPCBasicTrigConfig() { - m_PacManager = 0; + m_PacManager = nullptr; } /** Converts TC GB-Sorter output m_tower address <0...31> ("m_tower number continous") diff --git a/L1Trigger/RPCTrigger/src/RPCConst.cc b/L1Trigger/RPCTrigger/src/RPCConst.cc index e88b44e6c1607..004e10f50942a 100644 --- a/L1Trigger/RPCTrigger/src/RPCConst.cc +++ b/L1Trigger/RPCTrigger/src/RPCConst.cc @@ -15,7 +15,7 @@ int RPCConst::iptFromPt(const double pt) { std::ostringstream ostr; ostr<getTCsCnt()-1].size()==0 || hsbConf->getHsbMask(0,0) == 3 ) { + if ( tcsMuonsVec2[m_TrigCnfg->getTCsCnt()-1].empty() || hsbConf->getHsbMask(0,0) == 3 ) { firstHalfTcsMuonsVec2.push_back(tcsMuonsVec2[m_TrigCnfg->getTCsCnt()-1]); //TC=11 (last one) } else { L1RpcTBMuonsVec newVec = tcsMuonsVec2[m_TrigCnfg->getTCsCnt()-1]; @@ -161,7 +161,7 @@ L1RpcTBMuonsVec2 RPCHalfSorter::run(L1RpcTBMuonsVec2 &tcsMuonsVec2, edm::ESHandl } // iter. over muons end ++secAddr; // Next trigger crate. Update the address - if ( tcsMuonsVec2[iTC].size()==0 || hsbConf->getHsbMask(0, iTC+1) == 3 ) { + if ( tcsMuonsVec2[iTC].empty() || hsbConf->getHsbMask(0, iTC+1) == 3 ) { firstHalfTcsMuonsVec2.push_back(tcsMuonsVec2[iTC]); } else { L1RpcTBMuonsVec newVec = tcsMuonsVec2[iTC]; @@ -188,7 +188,7 @@ L1RpcTBMuonsVec2 RPCHalfSorter::run(L1RpcTBMuonsVec2 &tcsMuonsVec2, edm::ESHandl } } ++secAddr; - if ( tcsMuonsVec2[iTC].size()==0 || hsbConf->getHsbMask(1, iTC-5) == 3 ) { + if ( tcsMuonsVec2[iTC].empty() || hsbConf->getHsbMask(1, iTC-5) == 3 ) { secondHalfTcsMuonsVec2.push_back(tcsMuonsVec2[iTC]); } else { L1RpcTBMuonsVec newVec = tcsMuonsVec2[iTC]; @@ -198,7 +198,7 @@ L1RpcTBMuonsVec2 RPCHalfSorter::run(L1RpcTBMuonsVec2 &tcsMuonsVec2, edm::ESHandl } //secondHalfTcsMuonsVec2.push_back(tcsMuonsVec2[0]); - if ( tcsMuonsVec2[0].size()==0 || hsbConf->getHsbMask(1 , 7) == 3 ) { + if ( tcsMuonsVec2[0].empty() || hsbConf->getHsbMask(1 , 7) == 3 ) { secondHalfTcsMuonsVec2.push_back(tcsMuonsVec2[0]); } else { L1RpcTBMuonsVec newVec = tcsMuonsVec2[0]; diff --git a/L1Trigger/RPCTrigger/src/RPCLogCone.cc b/L1Trigger/RPCTrigger/src/RPCLogCone.cc index fbcbb190fc6ce..68e9632bbdacd 100644 --- a/L1Trigger/RPCTrigger/src/RPCLogCone.cc +++ b/L1Trigger/RPCTrigger/src/RPCLogCone.cc @@ -242,7 +242,7 @@ std::vector RPCLogCone::getLogStripDigisIdxs(int logPlane, unsigned int log bool RPCLogCone::isPlaneFired(int logPlane) const { - if(m_LogPlanesVec[logPlane].size() == 0) + if(m_LogPlanesVec[logPlane].empty()) return false; else return true; diff --git a/L1Trigger/RPCTrigger/src/RPCPac.cc b/L1Trigger/RPCTrigger/src/RPCPac.cc index 55d1009312d2b..f16b6372c24b9 100644 --- a/L1Trigger/RPCTrigger/src/RPCPac.cc +++ b/L1Trigger/RPCTrigger/src/RPCPac.cc @@ -22,11 +22,11 @@ RPCPacMuon RPCPac::run(const RPCLogCone & cone) const RPCPacMuon bestMuon; //track - if(m_pacData->m_TrackPatternsGroup.m_PatternsItVec.size() > 0) + if(!m_pacData->m_TrackPatternsGroup.m_PatternsItVec.empty()) bestMuon = runTrackPatternsGroup(cone); //energetic - if(m_pacData->m_EnergeticPatternsGroupList.size() > 0) + if(!m_pacData->m_EnergeticPatternsGroupList.empty()) { RPCPacMuon bufMuon = runEnergeticPatternsGroups(cone); if(bufMuon > bestMuon) diff --git a/L1Trigger/RPCTrigger/src/RPCPacData.cc b/L1Trigger/RPCTrigger/src/RPCPacData.cc index cec5f55be5a2c..52eee10b14247 100644 --- a/L1Trigger/RPCTrigger/src/RPCPacData.cc +++ b/L1Trigger/RPCTrigger/src/RPCPacData.cc @@ -119,7 +119,7 @@ int RPCPacData::getPatternsGroupCount() { * */ RPCPattern RPCPacData::getPattern(int patNum) const { - if(m_PatternsVec.size() == 0) { + if(m_PatternsVec.empty()) { throw RPCException("GetPattren(): Patterns vec is empty, mayby it was not filled!"); //edm::LogError("RPCTrigger") << "GetPattren(): Patterns vec is empty, mayby it was not filled!"; @@ -252,7 +252,7 @@ void RPCPacData::insertPatterns(const RPCPattern::RPCPatVec& patternsVec, const //edm::LogError("RPCTrigger") << "InsertPattern(): unsupported pattern type"; } - if(m_EnergeticPatternsGroupList.size() != 0) { + if(!m_EnergeticPatternsGroupList.empty()) { m_EnergeticPatternsGroupList.sort(); //to jest potrzebne, bo w run() przechodzi //pierwszy paettern, ktory ma Maxymalna quality, wiec diff --git a/L1Trigger/RPCTrigger/src/RPCPatternsParser.cc b/L1Trigger/RPCTrigger/src/RPCPatternsParser.cc index 343abaf75a765..6a3ab4f3aed23 100644 --- a/L1Trigger/RPCTrigger/src/RPCPatternsParser.cc +++ b/L1Trigger/RPCTrigger/src/RPCPatternsParser.cc @@ -29,7 +29,7 @@ string xMLCh2String(const XMLCh* ch) { AnsiString astr(wstr); return astr.c_str(); #else - if(ch == 0) return ""; + if(ch == nullptr) return ""; //unique_ptr v(XMLString::transcode(ch)); //return string(v.get()); diff --git a/L1Trigger/RPCTrigger/src/RPCTBGhostBuster.cc b/L1Trigger/RPCTrigger/src/RPCTBGhostBuster.cc index b0b993149e592..3d21afbf67395 100644 --- a/L1Trigger/RPCTrigger/src/RPCTBGhostBuster.cc +++ b/L1Trigger/RPCTrigger/src/RPCTBGhostBuster.cc @@ -50,7 +50,7 @@ L1RpcTBMuonsVec RPCTBGhostBuster::run(L1RpcTBMuonsVec2 &pacMuonsVec2) const { */ L1RpcTBMuonsVec RPCTBGhostBuster::gBPhi(L1RpcTBMuonsVec &pacMuonsVec) const { - if(pacMuonsVec.size() == 0) + if(pacMuonsVec.empty()) return L1RpcTBMuonsVec(); //empty vector; //--------- killing ghosts --------------------------------------- pacMuonsVec.push_back(RPCTBMuon()); //adding empty muon to the end, diff --git a/L1Trigger/RPCTrigger/src/RPCTriggerBoard.cc b/L1Trigger/RPCTrigger/src/RPCTriggerBoard.cc index 4d3389a0e7291..600bef97ec2cd 100644 --- a/L1Trigger/RPCTrigger/src/RPCTriggerBoard.cc +++ b/L1Trigger/RPCTrigger/src/RPCTriggerBoard.cc @@ -86,14 +86,14 @@ bool RPCTriggerBoard::runCone(const RPCLogCone& cone) { } //--------------------------------------------------------------------------- L1RpcTBMuonsVec RPCTriggerBoard::runTBGB() { //4 muons or empty vector - if(m_PacsMuonsVec.size() == 0) + if(m_PacsMuonsVec.empty()) return L1RpcTBMuonsVec(); L1RpcTBMuonsVec2 gbMuons(RPCConst::m_TOWERS_ON_TB_CNT, L1RpcTBMuonsVec()); for(unsigned int iMu = 0; iMu < m_PacsMuonsVec.size(); iMu++) { int tbTower = m_TriggerConfig->getTowerNumOnTb(m_PacsMuonsVec[iMu].getConeCrdnts()); - if(gbMuons[tbTower].size() == 0) + if(gbMuons[tbTower].empty()) gbMuons[tbTower].assign(RPCConst::m_SEGMENTS_IN_SECTOR_CNT, RPCTBMuon()); gbMuons[tbTower][m_PacsMuonsVec[iMu].getLogSegment()] = m_PacsMuonsVec[iMu]; diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTCrate.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTCrate.h index b37c3ad8168c7..7bc2f40156b1a 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTCrate.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTCrate.h @@ -107,7 +107,7 @@ class L1RCTCrate { int crtNo; const L1RCTLookupTables* rctLookupTables_; - L1RCTCrate(); + L1RCTCrate() = delete; //L1RCTJetCaptureCard jetCaptureCard; }; diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTElectronIsolationCard.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTElectronIsolationCard.h index 4f4a91e001ac0..39a31b410e24a 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTElectronIsolationCard.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTElectronIsolationCard.h @@ -64,7 +64,7 @@ class L1RCTElectronIsolationCard { std::vector nonIsoElectrons; std::vector regions; - L1RCTElectronIsolationCard(); + L1RCTElectronIsolationCard() = delete; }; #endif diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTInputProducer.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTInputProducer.h index cf571c1ccaab2..658ee6cd556de 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTInputProducer.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTInputProducer.h @@ -20,8 +20,8 @@ class L1RCTInputProducer : public edm::EDProducer { public: explicit L1RCTInputProducer(const edm::ParameterSet& ps); - virtual ~L1RCTInputProducer(); - virtual void produce(edm::Event& e, const edm::EventSetup& c); + ~L1RCTInputProducer() override; + void produce(edm::Event& e, const edm::EventSetup& c) override; private: L1RCTLookupTables* rctLookupTables; L1RCT* rct; diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTJetSummaryCard.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTJetSummaryCard.h index 33106909e3187..2346f497a8510 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTJetSummaryCard.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTJetSummaryCard.h @@ -115,6 +115,6 @@ class L1RCTJetSummaryCard // Disabled constructors and operators - L1RCTJetSummaryCard(); + L1RCTJetSummaryCard() = delete; }; #endif diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h index feaeb5ba561eb..70e4aaa5869a2 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h @@ -14,7 +14,7 @@ class L1RCTLookupTables { // constructor - L1RCTLookupTables() : rctParameters_(0), channelMask_(0), ecalScale_(0), hcalScale_(0), etScale_(0) {} + L1RCTLookupTables() : rctParameters_(nullptr), channelMask_(nullptr), ecalScale_(nullptr), hcalScale_(nullptr), etScale_(nullptr) {} // this needs to be refreshed every event -- constructor inits to zero // to indicate that it cannot be used -- if this set function is diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTLutWriter.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTLutWriter.h index 3f1a21b299a79..b2ab2205c4d94 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTLutWriter.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTLutWriter.h @@ -48,12 +48,12 @@ class L1RCTParameters; class L1RCTLutWriter : public edm::EDAnalyzer { public: explicit L1RCTLutWriter(const edm::ParameterSet&); - ~L1RCTLutWriter(); + ~L1RCTLutWriter() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; void writeRcLutFile(unsigned short card); void writeEicLutFile(unsigned short card); void writeJscLutFile(); diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTProducer.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTProducer.h index d5dd129b8f271..df47abf14bb2e 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTProducer.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTProducer.h @@ -48,10 +48,10 @@ class L1RCTProducer : public edm::EDProducer { public: explicit L1RCTProducer(const edm::ParameterSet& ps); - virtual ~L1RCTProducer(); - virtual void beginRun(edm::Run const& r, const edm::EventSetup& c) override final; - virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, const edm::EventSetup& context) override final; - virtual void produce(edm::Event& e, const edm::EventSetup& c) override final; + ~L1RCTProducer() override; + void beginRun(edm::Run const& r, const edm::EventSetup& c) final; + void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, const edm::EventSetup& context) final; + void produce(edm::Event& e, const edm::EventSetup& c) final; void updateConfiguration(const edm::EventSetup&); diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTReceiverCard.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTReceiverCard.h index 1db2b7a019e81..a0c3dac480c29 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTReceiverCard.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTReceiverCard.h @@ -91,6 +91,6 @@ class L1RCTReceiverCard { //No default constructor, no copy constructor, //and no assignment operator - L1RCTReceiverCard(); + L1RCTReceiverCard() = delete; }; #endif diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTRelValAnalyzer.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTRelValAnalyzer.h index 73c027a3ebf09..9df0496a617da 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTRelValAnalyzer.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTRelValAnalyzer.h @@ -44,10 +44,10 @@ class L1RCTRelValAnalyzer : public edm::EDAnalyzer { public: explicit L1RCTRelValAnalyzer(const edm::ParameterSet&); - ~L1RCTRelValAnalyzer(); + ~L1RCTRelValAnalyzer() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- edm::InputTag rctEmCandsLabel; diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTSaveInput.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTSaveInput.h index ec37a4c5eb1b1..d3c565755f290 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTSaveInput.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTSaveInput.h @@ -38,8 +38,8 @@ class L1RCT; class L1RCTSaveInput : public edm::EDAnalyzer { public: explicit L1RCTSaveInput(const edm::ParameterSet&); - ~L1RCTSaveInput(); - virtual void analyze(const edm::Event&, const edm::EventSetup&); + ~L1RCTSaveInput() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: std::string fileName; L1RCTLookupTables* rctLookupTables; diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTTPGProvider.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTTPGProvider.h index 4d047ea572062..db38d5a107b5b 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTTPGProvider.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTTPGProvider.h @@ -36,11 +36,11 @@ class L1RCTTPGProvider : public edm::EDProducer { public: explicit L1RCTTPGProvider(const edm::ParameterSet&); - ~L1RCTTPGProvider(); + ~L1RCTTPGProvider() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- edm::InputTag ecalTPG_; diff --git a/L1Trigger/RegionalCaloTrigger/interface/L1RCTTestAnalyzer.h b/L1Trigger/RegionalCaloTrigger/interface/L1RCTTestAnalyzer.h index 63a49c387cf2a..886ad22d12387 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/L1RCTTestAnalyzer.h +++ b/L1Trigger/RegionalCaloTrigger/interface/L1RCTTestAnalyzer.h @@ -55,10 +55,10 @@ class L1RCTTestAnalyzer : public edm::EDAnalyzer { public: explicit L1RCTTestAnalyzer(const edm::ParameterSet&); - ~L1RCTTestAnalyzer(); + ~L1RCTTestAnalyzer() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: static bool compareEmCands(const L1CaloEmCand& cand1, const L1CaloEmCand& cand2); diff --git a/L1Trigger/RegionalCaloTrigger/interface/MaskedRctInputDigiProducer.h b/L1Trigger/RegionalCaloTrigger/interface/MaskedRctInputDigiProducer.h index cc281d1ea0f9e..f5739ea39b5f6 100644 --- a/L1Trigger/RegionalCaloTrigger/interface/MaskedRctInputDigiProducer.h +++ b/L1Trigger/RegionalCaloTrigger/interface/MaskedRctInputDigiProducer.h @@ -45,11 +45,11 @@ RCT. class MaskedRctInputDigiProducer : public edm::EDProducer { public: explicit MaskedRctInputDigiProducer(const edm::ParameterSet&); - ~MaskedRctInputDigiProducer(); + ~MaskedRctInputDigiProducer() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- diff --git a/L1Trigger/RegionalCaloTrigger/plugins/L1RCTInputProducer.cc b/L1Trigger/RegionalCaloTrigger/plugins/L1RCTInputProducer.cc index 0c388d3f2f8e5..c47c0ce80716a 100644 --- a/L1Trigger/RegionalCaloTrigger/plugins/L1RCTInputProducer.cc +++ b/L1Trigger/RegionalCaloTrigger/plugins/L1RCTInputProducer.cc @@ -51,8 +51,8 @@ L1RCTInputProducer::L1RCTInputProducer(const edm::ParameterSet& conf) : L1RCTInputProducer::~L1RCTInputProducer() { - if(rct != 0) delete rct; - if(rctLookupTables != 0) delete rctLookupTables; + if(rct != nullptr) delete rct; + if(rctLookupTables != nullptr) delete rctLookupTables; } @@ -141,7 +141,7 @@ void L1RCTInputProducer::produce(edm::Event& event, const edm::EventSetup& event rctHoEFGVetoBit->push_back(hOeFGVetoBit); rctJetMETET->push_back(jetMETETCode); rctTowerActivityBit->push_back(activityBit); - rctTowerMIPBit->push_back(0); // FIXME: MIP bit is not yet defined + rctTowerMIPBit->push_back(false); // FIXME: MIP bit is not yet defined } } } @@ -162,7 +162,7 @@ void L1RCTInputProducer::produce(edm::Event& event, const edm::EventSetup& event rctHFCrate->push_back(crate); rctHFRegion->push_back(hfRegion); rctHFET->push_back(hfETCode); - rctHFFG->push_back(0); // FIXME: HF FG is not yet defined + rctHFFG->push_back(false); // FIXME: HF FG is not yet defined } } } diff --git a/L1Trigger/RegionalCaloTrigger/plugins/L1RCTLutWriter.cc b/L1Trigger/RegionalCaloTrigger/plugins/L1RCTLutWriter.cc index 911abbf613105..9430d9de2b967 100644 --- a/L1Trigger/RegionalCaloTrigger/plugins/L1RCTLutWriter.cc +++ b/L1Trigger/RegionalCaloTrigger/plugins/L1RCTLutWriter.cc @@ -50,7 +50,7 @@ L1RCTLutWriter::~L1RCTLutWriter() // do anything here that needs to be done at destruction time // (e.g. close files, deallocate resources etc.) - if (lookupTable_ != 0) delete lookupTable_; + if (lookupTable_ != nullptr) delete lookupTable_; } @@ -119,8 +119,8 @@ L1RCTLutWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) // use these dummies to get the delete right when using old-style // scales to create set of L1CaloXcalScales - L1CaloEcalScale* dummyE(0); - L1CaloHcalScale* dummyH(0); + L1CaloEcalScale* dummyE(nullptr); + L1CaloHcalScale* dummyH(nullptr); if (useDebugTpgScales_) // generate new-style scales from tpg scales { @@ -234,8 +234,8 @@ L1RCTLutWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) unsigned int jscThresholdEndcap = rctParameters_->jscQuietThresholdEndcap(); writeThresholdsFile(eicThreshold, jscThresholdBarrel, jscThresholdEndcap); - if (dummyE != 0) delete dummyE; - if (dummyH != 0) delete dummyH; + if (dummyE != nullptr) delete dummyE; + if (dummyH != nullptr) delete dummyH; } diff --git a/L1Trigger/RegionalCaloTrigger/plugins/L1RCTProducer.cc b/L1Trigger/RegionalCaloTrigger/plugins/L1RCTProducer.cc index 512b80eba3537..97f0fd357f567 100644 --- a/L1Trigger/RegionalCaloTrigger/plugins/L1RCTProducer.cc +++ b/L1Trigger/RegionalCaloTrigger/plugins/L1RCTProducer.cc @@ -45,7 +45,7 @@ L1RCTProducer::L1RCTProducer(const edm::ParameterSet& conf) : queryDelayInLS(conf.getParameter("queryDelayInLS")), queryIntervalInLS(conf.getParameter("queryIntervalInLS")), conditionsLabel(conf.getParameter("conditionsLabel")), - fedUpdatedMask(0) + fedUpdatedMask(nullptr) { produces(); produces(); @@ -61,9 +61,9 @@ L1RCTProducer::L1RCTProducer(const edm::ParameterSet& conf) : L1RCTProducer::~L1RCTProducer() { - if(rct != 0) delete rct; - if(rctLookupTables != 0) delete rctLookupTables; - if(fedUpdatedMask != 0) delete fedUpdatedMask; + if(rct != nullptr) delete rct; + if(rctLookupTables != nullptr) delete rctLookupTables; + if(fedUpdatedMask != nullptr) delete fedUpdatedMask; } @@ -160,7 +160,7 @@ void L1RCTProducer::updateFedVector(const edm::EventSetup& eventSetup, bool getF //This is the beginning of run. We delete the old //create the new and set it in the LUTs - if(fedUpdatedMask!=0) delete fedUpdatedMask; + if(fedUpdatedMask!=nullptr) delete fedUpdatedMask; fedUpdatedMask = new L1RCTChannelMask(); // copy a constant object @@ -432,7 +432,7 @@ void L1RCTProducer::printFedVector(const std::vector& fedVector) // print contents of RCT channel mask fedUpdatedMask void L1RCTProducer::printUpdatedFedMask() { - if (fedUpdatedMask != 0) + if (fedUpdatedMask != nullptr) { fedUpdatedMask->print(std::cout); } @@ -445,7 +445,7 @@ void L1RCTProducer::printUpdatedFedMask() // print contents of RCT channel mask fedUpdatedMask void L1RCTProducer::printUpdatedFedMaskVerbose() { - if (fedUpdatedMask != 0) + if (fedUpdatedMask != nullptr) { // print contents of fedvector std::cout << "Contents of fedUpdatedMask: "; diff --git a/L1Trigger/RegionalCaloTrigger/plugins/L1RCTSaveInput.cc b/L1Trigger/RegionalCaloTrigger/plugins/L1RCTSaveInput.cc index 1c6597aec820f..cca30e009a9c0 100644 --- a/L1Trigger/RegionalCaloTrigger/plugins/L1RCTSaveInput.cc +++ b/L1Trigger/RegionalCaloTrigger/plugins/L1RCTSaveInput.cc @@ -62,8 +62,8 @@ L1RCTSaveInput::L1RCTSaveInput(const edm::ParameterSet& conf) : L1RCTSaveInput::~L1RCTSaveInput() { - if(rct != 0) delete rct; - if(rctLookupTables != 0) delete rctLookupTables; + if(rct != nullptr) delete rct; + if(rctLookupTables != nullptr) delete rctLookupTables; } void diff --git a/L1Trigger/RegionalCaloTrigger/src/L1RCT.cc b/L1Trigger/RegionalCaloTrigger/src/L1RCT.cc index 1bdc9f8bc8e51..3af2f793f564f 100644 --- a/L1Trigger/RegionalCaloTrigger/src/L1RCT.cc +++ b/L1Trigger/RegionalCaloTrigger/src/L1RCT.cc @@ -340,7 +340,7 @@ L1CaloEmCollection L1RCT::getIsolatedEGObjects(unsigned crate){ unsigned crd = (((isoEmObjects.at(i))/2) & 7); unsigned energy = ((isoEmObjects.at(i))/16); unsigned rank = rctLookupTables_->emRank(energy); - L1CaloEmCand isoCand(rank, rgn, crd, crate, 1, i, 0); // includes emcand index + L1CaloEmCand isoCand(rank, rgn, crd, crate, true, i, 0); // includes emcand index isoEmCands.push_back(isoCand); } return isoEmCands; @@ -357,7 +357,7 @@ L1CaloEmCollection L1RCT::getNonisolatedEGObjects(unsigned crate){ unsigned crd = (((nonIsoEmObjects.at(i))/2) & 7); unsigned energy = ((nonIsoEmObjects.at(i))/16); unsigned rank = rctLookupTables_->emRank(energy); - L1CaloEmCand nonIsoCand(rank, rgn, crd, crate, 0, i, 0); // includes emcand index + L1CaloEmCand nonIsoCand(rank, rgn, crd, crate, false, i, 0); // includes emcand index nonIsoEmCands.push_back(nonIsoCand); } return nonIsoEmCands; diff --git a/L1Trigger/RegionalCaloTrigger/src/L1RCTJetSummaryCard.cc b/L1Trigger/RegionalCaloTrigger/src/L1RCTJetSummaryCard.cc index 1e3fc386cda0b..fc8c6d39d25bd 100644 --- a/L1Trigger/RegionalCaloTrigger/src/L1RCTJetSummaryCard.cc +++ b/L1Trigger/RegionalCaloTrigger/src/L1RCTJetSummaryCard.cc @@ -195,16 +195,16 @@ void L1RCTJetSummaryCard::fillQuietBits(){ // use one threshold for barrel regions (first 8 in list, cards 0-3) for(int i = 0; i<8; i++){ if((barrelRegions.at(i))>quietThresholdBarrel) - quiet[i] = 0; //switched 0 and 1 + quiet[i] = false; //switched 0 and 1 else - quiet[i] = 1; + quiet[i] = true; } // use second for endcap regions (last 6 in list, cards 4-6) for(int i = 8; i<14; i++){ if((barrelRegions.at(i))>quietThresholdEndcap) - quiet[i] = 0; //switched 0 and 1 + quiet[i] = false; //switched 0 and 1 else - quiet[i] = 1; + quiet[i] = true; } quietBits = quiet.to_ulong(); diff --git a/L1Trigger/RegionalCaloTrigger/src/L1RCTLookupTables.cc b/L1Trigger/RegionalCaloTrigger/src/L1RCTLookupTables.cc index 89a966775e181..c5f87b5188dc9 100644 --- a/L1Trigger/RegionalCaloTrigger/src/L1RCTLookupTables.cc +++ b/L1Trigger/RegionalCaloTrigger/src/L1RCTLookupTables.cc @@ -25,13 +25,13 @@ unsigned int L1RCTLookupTables::lookup(unsigned short ecalInput, unsigned short crdNo, unsigned short twrNo) const { - if(rctParameters_ == 0) + if(rctParameters_ == nullptr) throw cms::Exception("L1RCTParameters Invalid") << "L1RCTParameters should be set every event" << rctParameters_; - if(channelMask_ == 0) + if(channelMask_ == nullptr) throw cms::Exception("L1RCTChannelMask Invalid") << "L1RCTChannelMask should be set every event" << channelMask_; - if(noisyChannelMask_ == 0) + if(noisyChannelMask_ == nullptr) throw cms::Exception("L1RCTNoisyChannelMask Invalid") << "L1RCTNoisyChannelMask should be set every event" << noisyChannelMask_; if(ecalInput > 0xFF) @@ -166,10 +166,10 @@ unsigned int L1RCTLookupTables::lookup(unsigned short hfInput, unsigned short twrNo ) const { - if(rctParameters_ == 0) + if(rctParameters_ == nullptr) throw cms::Exception("L1RCTParameters Invalid") << "L1RCTParameters should be set every event" << rctParameters_; - if(channelMask_ == 0) + if(channelMask_ == nullptr) throw cms::Exception("L1RCTChannelMask Invalid") << "L1RCTChannelMask should be set every event" << channelMask_; if(hfInput > 0xFF) @@ -217,7 +217,7 @@ unsigned int L1RCTLookupTables::lookup(unsigned short hfInput, bool L1RCTLookupTables::hOeFGVetoBit(float ecal, float hcal, bool fgbit) const { - if(rctParameters_ == 0) + if(rctParameters_ == nullptr) throw cms::Exception("L1RCTParameters Invalid") << "L1RCTParameters should be set every event" << rctParameters_; bool veto = false; @@ -242,7 +242,7 @@ bool L1RCTLookupTables::hOeFGVetoBit(float ecal, float hcal, bool fgbit) const bool L1RCTLookupTables::activityBit(float ecal, float hcal) const { // Redefined for upgrade as EM activity only - if(rctParameters_ == 0) + if(rctParameters_ == nullptr) throw cms::Exception("L1RCTParameters Invalid") << "L1RCTParameters should be set every event" << rctParameters_; bool aBit = false; @@ -309,7 +309,7 @@ float L1RCTLookupTables::convertEcal(unsigned short ecal, unsigned short iAbsEta // converts compressed hcal energy to linear (real) scale float L1RCTLookupTables::convertHcal(unsigned short hcal, unsigned short iAbsEta, short sign) const { - if (hcalScale_ != 0) + if (hcalScale_ != nullptr) { return (hcalScale_->et( hcal, iAbsEta, sign )); } @@ -336,7 +336,7 @@ unsigned long L1RCTLookupTables::convertToInteger(float et, unsigned int L1RCTLookupTables::eGammaETCode(float ecal, float hcal, int iAbsEta) const { - if(rctParameters_ == 0) + if(rctParameters_ == nullptr) throw cms::Exception("L1RCTParameters Invalid") << "L1RCTParameters should be set every event" << rctParameters_; float etLinear = rctParameters_->EGammaTPGSum(ecal,hcal,iAbsEta); @@ -345,7 +345,7 @@ unsigned int L1RCTLookupTables::eGammaETCode(float ecal, float hcal, int iAbsEta unsigned int L1RCTLookupTables::jetMETETCode(float ecal, float hcal, int iAbsEta) const { - if(rctParameters_ == 0) + if(rctParameters_ == nullptr) throw cms::Exception("L1RCTParameters Invalid") << "L1RCTParameters should be set every event" << rctParameters_; float etLinear = rctParameters_->JetMETTPGSum(ecal,hcal,iAbsEta); diff --git a/L1Trigger/Skimmer/src/L1Filter.cc b/L1Trigger/Skimmer/src/L1Filter.cc index 1a07eda947d94..8772b17900748 100644 --- a/L1Trigger/Skimmer/src/L1Filter.cc +++ b/L1Trigger/Skimmer/src/L1Filter.cc @@ -25,9 +25,9 @@ class L1Filter : public edm::EDFilter public: explicit L1Filter(edm::ParameterSet const&); - virtual ~L1Filter(); + ~L1Filter() override; - virtual bool filter(edm::Event& e, edm::EventSetup const& c) override; + bool filter(edm::Event& e, edm::EventSetup const& c) override; void endJob() override; private: diff --git a/L1Trigger/TextToDigi/plugins/GctDigiToPsbText.h b/L1Trigger/TextToDigi/plugins/GctDigiToPsbText.h index 556398f075b06..393070bc7d8d0 100644 --- a/L1Trigger/TextToDigi/plugins/GctDigiToPsbText.h +++ b/L1Trigger/TextToDigi/plugins/GctDigiToPsbText.h @@ -25,11 +25,11 @@ class GctDigiToPsbText : public edm::EDAnalyzer { public: explicit GctDigiToPsbText(const edm::ParameterSet&); - ~GctDigiToPsbText(); + ~GctDigiToPsbText() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// label for input digis edm::InputTag m_gctInputLabel; diff --git a/L1Trigger/TextToDigi/plugins/GtPsbTextToDigi.cc b/L1Trigger/TextToDigi/plugins/GtPsbTextToDigi.cc index a10b2794a965b..048d6f3b98c39 100644 --- a/L1Trigger/TextToDigi/plugins/GtPsbTextToDigi.cc +++ b/L1Trigger/TextToDigi/plugins/GtPsbTextToDigi.cc @@ -64,11 +64,11 @@ void GtPsbTextToDigi::putEmptyDigi(edm::Event& iEvent) { std::unique_ptr gctTauJets( new L1GctJetCandCollection() ); //std::unique_ptr gctEtTotal( new L1GctEtTotal () ); for (int i=0; i<4; i++){ - gctIsolaEm->push_back(L1GctEmCand (0,1)); - gctNoIsoEm->push_back(L1GctEmCand (0,0)); - gctCenJets->push_back(L1GctJetCand(0,0,0)); - gctForJets->push_back(L1GctJetCand(0,0,1)); - gctTauJets->push_back(L1GctJetCand(0,1,0)); + gctIsolaEm->push_back(L1GctEmCand (0,true)); + gctNoIsoEm->push_back(L1GctEmCand (0,false)); + gctCenJets->push_back(L1GctJetCand(0,false,false)); + gctForJets->push_back(L1GctJetCand(0,false,true)); + gctTauJets->push_back(L1GctJetCand(0,true,false)); //gctEtTotal->push_back(()); } iEvent.put(std::move(gctIsolaEm), "isoEm"); @@ -203,10 +203,10 @@ void GtPsbTextToDigi::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) for (unsigned i=0; i<2; i++){ iIsola = i+2; iNoIso = i; - gctIsolaEm->push_back(L1GctEmCand(data[iIsola][cycle]&0x7fff,1)); - gctNoIsoEm->push_back(L1GctEmCand(data[iNoIso][cycle]&0x7fff,0)); - L1GctEmCand candI(data[iIsola][cycle],1); - L1GctEmCand candN(data[iNoIso][cycle],0); + gctIsolaEm->push_back(L1GctEmCand(data[iIsola][cycle]&0x7fff,true)); + gctNoIsoEm->push_back(L1GctEmCand(data[iNoIso][cycle]&0x7fff,false)); + L1GctEmCand candI(data[iIsola][cycle],true); + L1GctEmCand candN(data[iNoIso][cycle],false); } } diff --git a/L1Trigger/TextToDigi/plugins/GtPsbTextToDigi.h b/L1Trigger/TextToDigi/plugins/GtPsbTextToDigi.h index 92ca95f1d9d09..7e800ffee5ee6 100644 --- a/L1Trigger/TextToDigi/plugins/GtPsbTextToDigi.h +++ b/L1Trigger/TextToDigi/plugins/GtPsbTextToDigi.h @@ -34,11 +34,11 @@ class GtPsbTextToDigi : public edm::EDProducer { public: explicit GtPsbTextToDigi(const edm::ParameterSet&); - ~GtPsbTextToDigi(); + ~GtPsbTextToDigi() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override; private: /// Create empty digi collection diff --git a/L1Trigger/TextToDigi/plugins/RawToText.h b/L1Trigger/TextToDigi/plugins/RawToText.h index e3dbc4f6e93e9..a5f83f5c4fd4d 100644 --- a/L1Trigger/TextToDigi/plugins/RawToText.h +++ b/L1Trigger/TextToDigi/plugins/RawToText.h @@ -25,12 +25,12 @@ class RawToText : public edm::EDAnalyzer { public: explicit RawToText(const edm::ParameterSet&); - ~RawToText(); + ~RawToText() override; private: - virtual void beginJob(); - virtual void analyze (const edm::Event&, const edm::EventSetup&); - virtual void endJob (); + void beginJob() override; + void analyze (const edm::Event&, const edm::EventSetup&) override; + void endJob () override; private: diff --git a/L1Trigger/TextToDigi/plugins/RctDigiToRctText.cc b/L1Trigger/TextToDigi/plugins/RctDigiToRctText.cc index 58ac17b4a9122..458be3ad48179 100644 --- a/L1Trigger/TextToDigi/plugins/RctDigiToRctText.cc +++ b/L1Trigger/TextToDigi/plugins/RctDigiToRctText.cc @@ -57,7 +57,7 @@ RctDigiToRctText::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu /// debug flags and stream bool ldebug = false; - bool debug_NOTEMPTY[18]={0}; + bool debug_NOTEMPTY[18]={false}; for(int i=0; i<18; i++) debug_NOTEMPTY[i]=false; std::stringstream dstrm; diff --git a/L1Trigger/TextToDigi/plugins/RctDigiToRctText.h b/L1Trigger/TextToDigi/plugins/RctDigiToRctText.h index 04f771ee4c12c..ad3ad383e12ec 100644 --- a/L1Trigger/TextToDigi/plugins/RctDigiToRctText.h +++ b/L1Trigger/TextToDigi/plugins/RctDigiToRctText.h @@ -33,11 +33,11 @@ class RctDigiToRctText : public edm::EDAnalyzer { public: explicit RctDigiToRctText(const edm::ParameterSet&); - ~RctDigiToRctText(); + ~RctDigiToRctText() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// label for RCT digis edm::InputTag m_rctInputLabel; diff --git a/L1Trigger/TextToDigi/plugins/RctDigiToSourceCardText.h b/L1Trigger/TextToDigi/plugins/RctDigiToSourceCardText.h index 0b5755afbab79..ecfd7b6f2954e 100644 --- a/L1Trigger/TextToDigi/plugins/RctDigiToSourceCardText.h +++ b/L1Trigger/TextToDigi/plugins/RctDigiToSourceCardText.h @@ -43,10 +43,10 @@ class RctDigiToSourceCardText : public edm::EDAnalyzer { public: explicit RctDigiToSourceCardText(const edm::ParameterSet&); - ~RctDigiToSourceCardText(); + ~RctDigiToSourceCardText() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// Label for RCT digis edm::InputTag m_rctInputLabel; diff --git a/L1Trigger/TextToDigi/plugins/RctInputTextToDigi.cc b/L1Trigger/TextToDigi/plugins/RctInputTextToDigi.cc index fa0d3cf31f495..dce639b3c9c9a 100644 --- a/L1Trigger/TextToDigi/plugins/RctInputTextToDigi.cc +++ b/L1Trigger/TextToDigi/plugins/RctInputTextToDigi.cc @@ -204,7 +204,7 @@ RctInputTextToDigi::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) HcalTriggerPrimitiveDigi hfDigi(HcalTrigTowerDetId(hfIEta, hfIPhi)); hfDigi.setSize(1); - hfDigi.setSample(0, HcalTriggerPrimitiveSample(0,0,0,0)); + hfDigi.setSample(0, HcalTriggerPrimitiveSample(0,false,0,0)); hcalTPs->push_back(hfDigi); } } diff --git a/L1Trigger/TextToDigi/plugins/RctInputTextToDigi.h b/L1Trigger/TextToDigi/plugins/RctInputTextToDigi.h index 029f35b4fa009..92b4e66b6e86e 100644 --- a/L1Trigger/TextToDigi/plugins/RctInputTextToDigi.h +++ b/L1Trigger/TextToDigi/plugins/RctInputTextToDigi.h @@ -50,12 +50,12 @@ class RctInputTextToDigi : public edm::EDProducer { public: explicit RctInputTextToDigi(const edm::ParameterSet&); - ~RctInputTextToDigi(); + ~RctInputTextToDigi() override; private: - virtual void beginJob(); - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- diff --git a/L1Trigger/TextToDigi/plugins/RctTextToRctDigi.cc b/L1Trigger/TextToDigi/plugins/RctTextToRctDigi.cc index 491dda8dc7e3e..78a79e361c50a 100644 --- a/L1Trigger/TextToDigi/plugins/RctTextToRctDigi.cc +++ b/L1Trigger/TextToDigi/plugins/RctTextToRctDigi.cc @@ -180,13 +180,13 @@ void RctTextToRctDigi::produce(edm::Event& iEvent, const edm::EventSetup& iSetup // Isolated electrons for (unsigned j=0; j<4; j++){ m_file[i] >> uLongBuffer; - em->push_back(L1CaloEmCand(uLongBuffer, i, true, j,BXNum,0)); + em->push_back(L1CaloEmCand(uLongBuffer, i, true, j,BXNum,false)); } // Non-isolated electrons for (unsigned j=0; j<4; j++){ m_file[i] >> uLongBuffer; - em->push_back(L1CaloEmCand(uLongBuffer, i, false, j,BXNum,0)); + em->push_back(L1CaloEmCand(uLongBuffer, i, false, j,BXNum,false)); } // MIP bits diff --git a/L1Trigger/TextToDigi/plugins/RctTextToRctDigi.h b/L1Trigger/TextToDigi/plugins/RctTextToRctDigi.h index 1bfa3f0cbd561..a1d1aa4f1dd4c 100644 --- a/L1Trigger/TextToDigi/plugins/RctTextToRctDigi.h +++ b/L1Trigger/TextToDigi/plugins/RctTextToRctDigi.h @@ -39,10 +39,10 @@ class RctTextToRctDigi : public edm::EDProducer { public: explicit RctTextToRctDigi(const edm::ParameterSet&); - ~RctTextToRctDigi(); + ~RctTextToRctDigi() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; /// Create empty digi collection void putEmptyDigi(edm::Event&); diff --git a/L1Trigger/TextToDigi/plugins/SourceCardTextToRctDigi.h b/L1Trigger/TextToDigi/plugins/SourceCardTextToRctDigi.h index 2aac4e78d4300..a9a7d3e535599 100644 --- a/L1Trigger/TextToDigi/plugins/SourceCardTextToRctDigi.h +++ b/L1Trigger/TextToDigi/plugins/SourceCardTextToRctDigi.h @@ -43,10 +43,10 @@ class SourceCardTextToRctDigi : public edm::EDProducer { public: explicit SourceCardTextToRctDigi(const edm::ParameterSet&); - ~SourceCardTextToRctDigi(); + ~SourceCardTextToRctDigi() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; /// Create empty digi collection void putEmptyDigi(edm::Event&); diff --git a/L1Trigger/TextToDigi/plugins/TextToRaw.h b/L1Trigger/TextToDigi/plugins/TextToRaw.h index e0a8caf8c30a2..bbd938dcfb88f 100644 --- a/L1Trigger/TextToDigi/plugins/TextToRaw.h +++ b/L1Trigger/TextToDigi/plugins/TextToRaw.h @@ -40,12 +40,12 @@ class TextToRaw : public edm::EDProducer { public: explicit TextToRaw(const edm::ParameterSet&); - ~TextToRaw(); + ~TextToRaw() override; private: // methods - virtual void beginJob(); - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; private: diff --git a/L1Trigger/TrackTrigger/interface/TTClusterAlgorithm_neighbor.h b/L1Trigger/TrackTrigger/interface/TTClusterAlgorithm_neighbor.h index 08c0428be9406..f4023a7365e4b 100644 --- a/L1Trigger/TrackTrigger/interface/TTClusterAlgorithm_neighbor.h +++ b/L1Trigger/TrackTrigger/interface/TTClusterAlgorithm_neighbor.h @@ -44,11 +44,11 @@ class TTClusterAlgorithm_neighbor : public TTClusterAlgorithm< T > : TTClusterAlgorithm< T >( __func__ ){} /// Destructor - ~TTClusterAlgorithm_neighbor(){} + ~TTClusterAlgorithm_neighbor() override{} /// Clustering operations void Cluster( std::vector< std::vector< T > > &output, - const std::vector< T > &input) const; + const std::vector< T > &input) const override; /// Needed for neighbours bool isANeighbor( const T& center, const T& mayNeigh) const; @@ -108,7 +108,7 @@ class ES_TTClusterAlgorithm_neighbor : public edm::ESProducer } /// Destructor - virtual ~ES_TTClusterAlgorithm_neighbor(){} + ~ES_TTClusterAlgorithm_neighbor() override{} /// Implement the producer std::shared_ptr< TTClusterAlgorithm< T > > produce( const TTClusterAlgorithmRecord & record ) diff --git a/L1Trigger/TrackTrigger/interface/TTClusterAlgorithm_official.h b/L1Trigger/TrackTrigger/interface/TTClusterAlgorithm_official.h index e4985115507bd..84cbe2632bb1a 100644 --- a/L1Trigger/TrackTrigger/interface/TTClusterAlgorithm_official.h +++ b/L1Trigger/TrackTrigger/interface/TTClusterAlgorithm_official.h @@ -48,12 +48,12 @@ class TTClusterAlgorithm_official : public TTClusterAlgorithm< T > } /// Destructor - ~TTClusterAlgorithm_official(){} + ~TTClusterAlgorithm_official() override{} /// Clustering operations void Cluster( std::vector< std::vector< T > > &output, const std::vector< T > &input, - bool isPS ) const; + bool isPS ) const override; }; /// Close class @@ -103,7 +103,7 @@ class ES_TTClusterAlgorithm_official: public edm::ESProducer } /// Destructor - virtual ~ES_TTClusterAlgorithm_official(){} + ~ES_TTClusterAlgorithm_official() override{} /// Implement the producer std::shared_ptr< TTClusterAlgorithm< T > > produce( const TTClusterAlgorithmRecord & record ) diff --git a/L1Trigger/TrackTrigger/interface/TTStubAlgorithm_cbc3.h b/L1Trigger/TrackTrigger/interface/TTStubAlgorithm_cbc3.h index 64e4eb44bac25..f5954bdf39de5 100644 --- a/L1Trigger/TrackTrigger/interface/TTStubAlgorithm_cbc3.h +++ b/L1Trigger/TrackTrigger/interface/TTStubAlgorithm_cbc3.h @@ -44,13 +44,13 @@ class TTStubAlgorithm_cbc3 : public TTStubAlgorithm< T > } /// Destructor - ~TTStubAlgorithm_cbc3(){} + ~TTStubAlgorithm_cbc3() override{} /// Matching operations void PatternHitCorrelation( bool &aConfirmation, int &aDisplacement, int &anOffset, - const TTStub< T > &aTTStub ) const; + const TTStub< T > &aTTStub ) const override; }; /// Close class @@ -95,7 +95,7 @@ class ES_TTStubAlgorithm_cbc3 : public edm::ESProducer } /// Destructor - virtual ~ES_TTStubAlgorithm_cbc3(){} + ~ES_TTStubAlgorithm_cbc3() override{} /// Implement the producer std::shared_ptr< TTStubAlgorithm< T > > produce( const TTStubAlgorithmRecord & record ) diff --git a/L1Trigger/TrackTrigger/interface/TTStubAlgorithm_official.h b/L1Trigger/TrackTrigger/interface/TTStubAlgorithm_official.h index 53539ebd9d42d..87947e1176d85 100644 --- a/L1Trigger/TrackTrigger/interface/TTStubAlgorithm_official.h +++ b/L1Trigger/TrackTrigger/interface/TTStubAlgorithm_official.h @@ -68,13 +68,13 @@ class TTStubAlgorithm_official : public TTStubAlgorithm< T > } /// Destructor - ~TTStubAlgorithm_official(){} + ~TTStubAlgorithm_official() override{} /// Matching operations void PatternHitCorrelation( bool &aConfirmation, int &aDisplacement, int &anOffset, - const TTStub< T > &aTTStub ) const; + const TTStub< T > &aTTStub ) const override; }; /// Close class @@ -146,7 +146,7 @@ class ES_TTStubAlgorithm_official : public edm::ESProducer } /// Destructor - virtual ~ES_TTStubAlgorithm_official(){} + ~ES_TTStubAlgorithm_official() override{} /// Implement the producer std::shared_ptr< TTStubAlgorithm< T > > produce( const TTStubAlgorithmRecord & record ) diff --git a/L1Trigger/TrackTrigger/plugins/TTClusterBuilder.h b/L1Trigger/TrackTrigger/plugins/TTClusterBuilder.h index 420340fd22ec3..dd1e8ce098b65 100644 --- a/L1Trigger/TrackTrigger/plugins/TTClusterBuilder.h +++ b/L1Trigger/TrackTrigger/plugins/TTClusterBuilder.h @@ -46,7 +46,7 @@ class TTClusterBuilder : public edm::EDProducer /// Constructors explicit TTClusterBuilder( const edm::ParameterSet& iConfig ); /// Destructor - ~TTClusterBuilder(); + ~TTClusterBuilder() override; private: /// Data members @@ -56,9 +56,9 @@ class TTClusterBuilder : public edm::EDProducer bool storeLocalCoord; /// Mandatory methods - virtual void beginRun( const edm::Run& run, const edm::EventSetup& iSetup ); - virtual void endRun( const edm::Run& run, const edm::EventSetup& iSetup ); - virtual void produce( edm::Event& iEvent, const edm::EventSetup& iSetup ); + void beginRun( const edm::Run& run, const edm::EventSetup& iSetup ) override; + void endRun( const edm::Run& run, const edm::EventSetup& iSetup ) override; + void produce( edm::Event& iEvent, const edm::EventSetup& iSetup ) override; /// Get hits void RetrieveRawHits( std::map< DetId, std::vector< T > > &mRawHits, diff --git a/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFAlignmentOnlineProd.h b/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFAlignmentOnlineProd.h index 07b395c4cb03f..5f17888e1f9d6 100644 --- a/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFAlignmentOnlineProd.h +++ b/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFAlignmentOnlineProd.h @@ -6,8 +6,8 @@ class CSCTFAlignmentOnlineProd : public L1ConfigOnlineProdBase< L1MuCSCTFAlignme public: CSCTFAlignmentOnlineProd(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBase< L1MuCSCTFAlignmentRcd, L1MuCSCTFAlignment >( iConfig ) {} - ~CSCTFAlignmentOnlineProd() {} - virtual std::shared_ptr< L1MuCSCTFAlignment > newObject( const std::string& objectKey ) ; + ~CSCTFAlignmentOnlineProd() override {} + std::shared_ptr< L1MuCSCTFAlignment > newObject( const std::string& objectKey ) override ; private: }; diff --git a/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFConfigOnlineProd.h b/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFConfigOnlineProd.h index 22b5269588811..fd28de230cc46 100644 --- a/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFConfigOnlineProd.h +++ b/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFConfigOnlineProd.h @@ -6,9 +6,9 @@ class CSCTFConfigOnlineProd : public L1ConfigOnlineProdBase< L1MuCSCTFConfigurat public: CSCTFConfigOnlineProd(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBase< L1MuCSCTFConfigurationRcd, L1MuCSCTFConfiguration >( iConfig ) {} - ~CSCTFConfigOnlineProd() {} + ~CSCTFConfigOnlineProd() override {} - virtual std::shared_ptr< L1MuCSCTFConfiguration > newObject( const std::string& objectKey ) ; + std::shared_ptr< L1MuCSCTFConfiguration > newObject( const std::string& objectKey ) override ; private: }; diff --git a/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFConfigProducer.h b/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFConfigProducer.h index 62f10e52373f1..64f61f1e093a3 100644 --- a/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFConfigProducer.h +++ b/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFConfigProducer.h @@ -29,7 +29,7 @@ class CSCTFConfigProducer : public edm::ESProducer { void readLUT(std::string path, unsigned short* lut, unsigned long length); CSCTFConfigProducer(const edm::ParameterSet& pset); - ~CSCTFConfigProducer(void){} + ~CSCTFConfigProducer(void) override{} }; #endif diff --git a/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFObjectKeysOnlineProd.h b/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFObjectKeysOnlineProd.h index b345dd9c45d32..82923d8460eff 100644 --- a/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFObjectKeysOnlineProd.h +++ b/L1TriggerConfig/CSCTFConfigProducers/interface/CSCTFObjectKeysOnlineProd.h @@ -4,9 +4,9 @@ class CSCTFObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase { public: CSCTFObjectKeysOnlineProd(const edm::ParameterSet& iConfig) ; - ~CSCTFObjectKeysOnlineProd() {} + ~CSCTFObjectKeysOnlineProd() override {} - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: bool m_enableConfiguration ; bool m_enablePtLut ; diff --git a/L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCPtLutConfigOnlineProd.h b/L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCPtLutConfigOnlineProd.h index 267cf51de1d9d..87245fb593992 100644 --- a/L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCPtLutConfigOnlineProd.h +++ b/L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCPtLutConfigOnlineProd.h @@ -6,9 +6,9 @@ class L1MuCSCPtLutConfigOnlineProd : public L1ConfigOnlineProdBase< L1MuCSCPtLut public: L1MuCSCPtLutConfigOnlineProd(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBase< L1MuCSCPtLutRcd, L1MuCSCPtLut >( iConfig ) {} - ~L1MuCSCPtLutConfigOnlineProd() {} + ~L1MuCSCPtLutConfigOnlineProd() override {} - virtual std::shared_ptr< L1MuCSCPtLut > newObject( const std::string& objectKey ) ; + std::shared_ptr< L1MuCSCPtLut > newObject( const std::string& objectKey ) override ; private: }; diff --git a/L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCTFParametersTester.h b/L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCTFParametersTester.h index 086f60a8f5340..7f9cfa5c08d30 100644 --- a/L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCTFParametersTester.h +++ b/L1TriggerConfig/CSCTFConfigProducers/interface/L1MuCSCTFParametersTester.h @@ -41,9 +41,9 @@ class L1MuCSCTFParametersTester : public edm::EDAnalyzer explicit L1MuCSCTFParametersTester(const edm::ParameterSet&); // destructor - virtual ~L1MuCSCTFParametersTester(); + ~L1MuCSCTFParametersTester() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1TriggerConfig/CSCTFConfigProducers/src/CSCTFConfigProducer.cc b/L1TriggerConfig/CSCTFConfigProducers/src/CSCTFConfigProducer.cc index 586ffeb894a26..65c1aef6f8eee 100644 --- a/L1TriggerConfig/CSCTFConfigProducers/src/CSCTFConfigProducer.cc +++ b/L1TriggerConfig/CSCTFConfigProducers/src/CSCTFConfigProducer.cc @@ -1,8 +1,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/L1TriggerConfig/CSCTFConfigProducers/src/CSCTFConfigTestAnalyzer.cc b/L1TriggerConfig/CSCTFConfigProducers/src/CSCTFConfigTestAnalyzer.cc index 4e93d12456f11..f704c183ff5da 100644 --- a/L1TriggerConfig/CSCTFConfigProducers/src/CSCTFConfigTestAnalyzer.cc +++ b/L1TriggerConfig/CSCTFConfigProducers/src/CSCTFConfigTestAnalyzer.cc @@ -36,13 +36,13 @@ class CSCTFConfigTestAnalyzer : public edm::EDAnalyzer { public: explicit CSCTFConfigTestAnalyzer(const edm::ParameterSet&); - ~CSCTFConfigTestAnalyzer(); + ~CSCTFConfigTestAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- }; diff --git a/L1TriggerConfig/DTTPGConfig/interface/BitArray.h b/L1TriggerConfig/DTTPGConfig/interface/BitArray.h index 7d8b52f48910b..ed8e149bb47a5 100644 --- a/L1TriggerConfig/DTTPGConfig/interface/BitArray.h +++ b/L1TriggerConfig/DTTPGConfig/interface/BitArray.h @@ -358,13 +358,13 @@ class BitArray { int nw = this->nWords(); int ub = this->unusedBits(); if(this->dataWord(nw-1)<1){ for (int iw=0;iwdataWord(iw)!=a.dataWord(iw)) return 0; + if(this->dataWord(iw)!=a.dataWord(iw)) return false; } } - return 1; + return true; } // logical operators < @@ -374,20 +374,20 @@ class BitArray { unsigned aaa = this->dataWord(nw-1)<bbb) { - return 0; + return false; } if(nw>1){ for (int iw=nw-2;iw>=0;iw--){ if (this->dataWord(iw)dataWord(iw)>a.dataWord(iw)) { - return 0; + return false; } } } - return 0; + return false; } // logical operators != diff --git a/L1TriggerConfig/DTTPGConfig/interface/DTConfigBti.h b/L1TriggerConfig/DTTPGConfig/interface/DTConfigBti.h index e330eef21db6b..a6098fb4740e3 100644 --- a/L1TriggerConfig/DTTPGConfig/interface/DTConfigBti.h +++ b/L1TriggerConfig/DTTPGConfig/interface/DTConfigBti.h @@ -53,7 +53,7 @@ class DTConfigBti : DTConfig { DTConfigBti(int debug, unsigned short int * buffer); //! Destructor - ~DTConfigBti(); + ~DTConfigBti() override; //! Set default parameters void setDefaults(const edm::ParameterSet& ps); diff --git a/L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h b/L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h index e67731b2f26d1..ce361eb27fced 100644 --- a/L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h +++ b/L1TriggerConfig/DTTPGConfig/interface/DTConfigLUTs.h @@ -47,7 +47,7 @@ class DTConfigLUTs : public DTConfig { DTConfigLUTs(bool debug, unsigned short int * buffer); //! Destructor - ~DTConfigLUTs(); + ~DTConfigLUTs() override; //! Debug flag inline bool debug() const { return m_debug; } diff --git a/L1TriggerConfig/DTTPGConfig/interface/DTConfigPedestals.h b/L1TriggerConfig/DTTPGConfig/interface/DTConfigPedestals.h index 182909562f7f8..20a2e754a4f93 100644 --- a/L1TriggerConfig/DTTPGConfig/interface/DTConfigPedestals.h +++ b/L1TriggerConfig/DTTPGConfig/interface/DTConfigPedestals.h @@ -42,14 +42,14 @@ class DTConfigPedestals : DTConfig { DTConfigPedestals(); //! Destructor - ~DTConfigPedestals(); + ~DTConfigPedestals() override; //! Get wire by wire delay float getOffset(const DTWireId& wire) const; //! Set parameters from ES void setES(DTTPGParameters const *tpgParams, - DTT0 const *t0Params = 0); + DTT0 const *t0Params = nullptr); //! Set t0i subtraction void setUseT0 (bool useT0) { my_useT0 = useT0; } diff --git a/L1TriggerConfig/DTTPGConfig/interface/DTConfigSectColl.h b/L1TriggerConfig/DTTPGConfig/interface/DTConfigSectColl.h index a71d42b81a5ad..9fa8e2ba98ae6 100644 --- a/L1TriggerConfig/DTTPGConfig/interface/DTConfigSectColl.h +++ b/L1TriggerConfig/DTTPGConfig/interface/DTConfigSectColl.h @@ -52,7 +52,7 @@ class DTConfigSectColl : public DTConfig { DTConfigSectColl(); //! Destructor - ~DTConfigSectColl(); + ~DTConfigSectColl() override; //! Return the debug flag inline bool debug() const { return m_debug; } diff --git a/L1TriggerConfig/DTTPGConfig/interface/DTConfigTSPhi.h b/L1TriggerConfig/DTTPGConfig/interface/DTConfigTSPhi.h index 7e0b404957ab7..0007b35ddfa96 100644 --- a/L1TriggerConfig/DTTPGConfig/interface/DTConfigTSPhi.h +++ b/L1TriggerConfig/DTTPGConfig/interface/DTConfigTSPhi.h @@ -57,7 +57,7 @@ class DTConfigTSPhi : public DTConfig { DTConfigTSPhi(bool debug, unsigned short int tss_buffer[7][31], int ntss, unsigned short int tsm_buffer[9]); //! Destructor - ~DTConfigTSPhi(); + ~DTConfigTSPhi() override; //! Return the debug flag inline bool debug() const { return m_debug; } diff --git a/L1TriggerConfig/DTTPGConfig/interface/DTConfigTSTheta.h b/L1TriggerConfig/DTTPGConfig/interface/DTConfigTSTheta.h index b45687e240c3e..e98b50bb01f69 100644 --- a/L1TriggerConfig/DTTPGConfig/interface/DTConfigTSTheta.h +++ b/L1TriggerConfig/DTTPGConfig/interface/DTConfigTSTheta.h @@ -49,7 +49,7 @@ class DTConfigTSTheta : public DTConfig { DTConfigTSTheta(); //! Destructor - ~DTConfigTSTheta(); + ~DTConfigTSTheta() override; //! Return the debug flag inline bool debug() const { return m_debug; } diff --git a/L1TriggerConfig/DTTPGConfig/interface/DTConfigTraco.h b/L1TriggerConfig/DTTPGConfig/interface/DTConfigTraco.h index d6f5d168b18be..d72521e82912f 100644 --- a/L1TriggerConfig/DTTPGConfig/interface/DTConfigTraco.h +++ b/L1TriggerConfig/DTTPGConfig/interface/DTConfigTraco.h @@ -58,7 +58,7 @@ class DTConfigTraco : public DTConfig { DTConfigTraco(int debug, unsigned short int * buffer); //! Destructor - ~DTConfigTraco(); + ~DTConfigTraco() override; //! Set default parameters void setDefaults(const edm::ParameterSet& ps); diff --git a/L1TriggerConfig/DTTPGConfig/interface/DTConfigTrigUnit.h b/L1TriggerConfig/DTTPGConfig/interface/DTConfigTrigUnit.h index 2b3bd76a9a6b7..5ab89b877c49a 100644 --- a/L1TriggerConfig/DTTPGConfig/interface/DTConfigTrigUnit.h +++ b/L1TriggerConfig/DTTPGConfig/interface/DTConfigTrigUnit.h @@ -44,7 +44,7 @@ class DTConfigTrigUnit : public DTConfig { DTConfigTrigUnit() {}; //! Destructor - ~DTConfigTrigUnit(); + ~DTConfigTrigUnit() override; //! Debug flag inline bool debug() const { return m_debug; } diff --git a/L1TriggerConfig/DTTPGConfig/src/DTConfigBti.cc b/L1TriggerConfig/DTTPGConfig/src/DTConfigBti.cc index 9abf2ea81ce60..fdedd90d037ca 100644 --- a/L1TriggerConfig/DTTPGConfig/src/DTConfigBti.cc +++ b/L1TriggerConfig/DTTPGConfig/src/DTConfigBti.cc @@ -25,9 +25,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include //------------------------------- diff --git a/L1TriggerConfig/DTTPGConfig/src/DTConfigLUTs.cc b/L1TriggerConfig/DTTPGConfig/src/DTConfigLUTs.cc index 1c5a931c149aa..e47f27671e9fa 100644 --- a/L1TriggerConfig/DTTPGConfig/src/DTConfigLUTs.cc +++ b/L1TriggerConfig/DTTPGConfig/src/DTConfigLUTs.cc @@ -19,7 +19,7 @@ //--------------- // C++ Headers -- //--------------- -#include +#include #include //------------------------------- @@ -124,7 +124,7 @@ DTConfigLUTs::DSPtoIEEE32(short DSPmantissa, short DSPexp, float *f) const void DTConfigLUTs::IEEE32toDSP(float f, short int & DSPmantissa, short int & DSPexp) const { - long int *pl=0, lm; + long int *pl=nullptr, lm; bool sign=false; DSPmantissa = 0; diff --git a/L1TriggerConfig/DTTPGConfig/src/DTConfigManager.cc b/L1TriggerConfig/DTTPGConfig/src/DTConfigManager.cc index 335739fc38563..64f40b8464596 100644 --- a/L1TriggerConfig/DTTPGConfig/src/DTConfigManager.cc +++ b/L1TriggerConfig/DTTPGConfig/src/DTConfigManager.cc @@ -69,7 +69,7 @@ const DTConfigBti* DTConfigManager::getDTConfigBti(DTBtiId btiid) const { << "," << chambid.sector() << "," << chambid.station() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } innerBtiMap::const_iterator biter2 = (*biter1).second.find(btiid); @@ -80,7 +80,7 @@ const DTConfigBti* DTConfigManager::getDTConfigBti(DTBtiId btiid) const { << "," << btiid.superlayer() << "," << btiid.bti() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } return &(*biter2).second; @@ -109,7 +109,7 @@ const DTConfigTraco* DTConfigManager::getDTConfigTraco(DTTracoId tracoid) const << "," << chambid.sector() << "," << chambid.station() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } innerTracoMap::const_iterator titer2 = (*titer1).second.find(tracoid); @@ -119,7 +119,7 @@ const DTConfigTraco* DTConfigManager::getDTConfigTraco(DTTracoId tracoid) const << "," << tracoid.station() << "," << tracoid.traco() << ") not found, return a reference to the end of the map" << std::endl; - return 0; + return nullptr; } return &(*titer2).second; @@ -147,7 +147,7 @@ const DTConfigTSTheta* DTConfigManager::getDTConfigTSTheta(DTChamberId chambid) << "," << chambid.sector() << "," << chambid.station() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } return &(*thiter).second; @@ -162,7 +162,7 @@ const DTConfigTSPhi* DTConfigManager::getDTConfigTSPhi(DTChamberId chambid) cons << "," << chambid.sector() << "," << chambid.station() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } return &(*phiter).second; @@ -177,7 +177,7 @@ const DTConfigTrigUnit* DTConfigManager::getDTConfigTrigUnit(DTChamberId chambid << "," << chambid.sector() << "," << chambid.station() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } return &(*tuiter).second; @@ -192,7 +192,7 @@ const DTConfigLUTs* DTConfigManager::getDTConfigLUTs(DTChamberId chambid) const << "," << chambid.sector() << "," << chambid.station() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } return &(*lutiter).second; @@ -206,7 +206,7 @@ const DTConfigSectColl* DTConfigManager::getDTConfigSectColl(DTSectCollId scid) std::cout << "DTConfigManager::getConfigSectColl : SectorCollector (" << scid.wheel() << "," << scid.sector() << ") not found, return 0" << std::endl; - return 0; + return nullptr; } return &(*sciter).second; diff --git a/L1TriggerConfig/DTTPGConfig/src/DTConfigPedestals.cc b/L1TriggerConfig/DTTPGConfig/src/DTConfigPedestals.cc index 2eadb7b647846..1edb1c4c940f1 100644 --- a/L1TriggerConfig/DTTPGConfig/src/DTConfigPedestals.cc +++ b/L1TriggerConfig/DTTPGConfig/src/DTConfigPedestals.cc @@ -32,7 +32,7 @@ //---------------- DTConfigPedestals::DTConfigPedestals() : my_debug(false) , my_useT0(false) , - my_tpgParams(0) , my_t0i(0) { + my_tpgParams(nullptr) , my_t0i(nullptr) { //my_tpgParams = 0; // CB check that it could be done outside this //my_t0i = 0; diff --git a/L1TriggerConfig/DTTPGConfig/src/DTConfigSectColl.cc b/L1TriggerConfig/DTTPGConfig/src/DTConfigSectColl.cc index a0fd631302181..24bbb487bedbb 100644 --- a/L1TriggerConfig/DTTPGConfig/src/DTConfigSectColl.cc +++ b/L1TriggerConfig/DTTPGConfig/src/DTConfigSectColl.cc @@ -30,9 +30,9 @@ //---------------- DTConfigSectColl::DTConfigSectColl() { - m_debug = 0; + m_debug = false; for (int i=1; i<4; i++) - setSCCarryFlag(0,i); + setSCCarryFlag(false,i); for (int i=1; i<5; i++) setCoarseSync(0,i); diff --git a/L1TriggerConfig/DTTPGConfig/src/DTConfigTSPhi.cc b/L1TriggerConfig/DTTPGConfig/src/DTConfigTSPhi.cc index f945ba0936a82..7cb01b4cd9f0f 100644 --- a/L1TriggerConfig/DTTPGConfig/src/DTConfigTSPhi.cc +++ b/L1TriggerConfig/DTTPGConfig/src/DTConfigTSPhi.cc @@ -52,8 +52,8 @@ DTConfigTSPhi::DTConfigTSPhi(bool debugTS, unsigned short int tss_buffer[7][31], bool tsscce2, tsshte2, tssnoe2, tssccec, tsshtec, tssnoec; unsigned short tssgs1, tssgs2, tssmsk1, tssmsk2; - tsscgs2 = tsscgs1 = tsscce1 = tsshte1 = tssnoe1 = carrytss = 0; - tsscce2 = tsshte2 = tssnoe2 = tssccec = tsshtec = tssnoec = 0; + tsscgs2 = tsscgs1 = tsscce1 = tsshte1 = tssnoe1 = carrytss = false; + tsscce2 = tsshte2 = tssnoe2 = tssccec = tsshtec = tssnoec = false; tssgs1 = tssgs2 = tssmsk1 = tssmsk2 = 0; memset(tstren,true,24*sizeof(bool)); diff --git a/L1TriggerConfig/DTTPGConfig/src/DTConfigTraco.cc b/L1TriggerConfig/DTTPGConfig/src/DTConfigTraco.cc index 0c1ef213847e6..22b1ce915059d 100644 --- a/L1TriggerConfig/DTTPGConfig/src/DTConfigTraco.cc +++ b/L1TriggerConfig/DTTPGConfig/src/DTConfigTraco.cc @@ -23,9 +23,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include //------------------------------- diff --git a/L1TriggerConfig/DTTPGConfigProducers/plugins/DTTPGParamsWriter.h b/L1TriggerConfig/DTTPGConfigProducers/plugins/DTTPGParamsWriter.h index 1478c2b970567..1162118b8ac82 100644 --- a/L1TriggerConfig/DTTPGConfigProducers/plugins/DTTPGParamsWriter.h +++ b/L1TriggerConfig/DTTPGConfigProducers/plugins/DTTPGParamsWriter.h @@ -26,15 +26,15 @@ class DTTPGParamsWriter : public edm::EDAnalyzer { DTTPGParamsWriter(const edm::ParameterSet& pset); /// Destructor - virtual ~DTTPGParamsWriter(); + ~DTTPGParamsWriter() override; // Operations /// Compute the ttrig by fiting the TB rising edge - void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); + void analyze(const edm::Event & event, const edm::EventSetup& eventSetup) override; /// Write ttrig in the DB - void endJob(); + void endJob() override; private: diff --git a/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigDBProducer.h b/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigDBProducer.h index 25083a2945f08..373b259082a04 100644 --- a/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigDBProducer.h +++ b/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigDBProducer.h @@ -51,7 +51,7 @@ class DTConfigDBProducer : public edm::ESProducer{ DTConfigDBProducer(const edm::ParameterSet&); //! Destructor - ~DTConfigDBProducer(); + ~DTConfigDBProducer() override; //! ES produce method std::unique_ptr produce(const DTConfigManagerRcd&); diff --git a/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTester.h b/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTester.h index 388b82ab9e611..f89c1b2ca6a4f 100644 --- a/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTester.h +++ b/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTester.h @@ -36,10 +36,10 @@ public : explicit DTConfigTester(const edm::ParameterSet&); //! Destructor - ~DTConfigTester(); + ~DTConfigTester() override; // Analyze Method - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: diff --git a/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTrivialProducer.h b/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTrivialProducer.h index 45d6ccac556bb..1aed7ca583342 100644 --- a/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTrivialProducer.h +++ b/L1TriggerConfig/DTTPGConfigProducers/src/DTConfigTrivialProducer.h @@ -45,7 +45,7 @@ class DTConfigTrivialProducer : public edm::ESProducer { DTConfigTrivialProducer(const edm::ParameterSet&); //! destructor - ~DTConfigTrivialProducer(); + ~DTConfigTrivialProducer() override; //! ES produce method std::unique_ptr produce(const DTConfigManagerRcd&); diff --git a/L1TriggerConfig/DTTrackFinder/interface/DTEtaPatternLutTester.h b/L1TriggerConfig/DTTrackFinder/interface/DTEtaPatternLutTester.h index dee7e35b0af49..01c114b6b1cff 100644 --- a/L1TriggerConfig/DTTrackFinder/interface/DTEtaPatternLutTester.h +++ b/L1TriggerConfig/DTTrackFinder/interface/DTEtaPatternLutTester.h @@ -26,9 +26,9 @@ class DTEtaPatternLutTester : public edm::EDAnalyzer { DTEtaPatternLutTester(const edm::ParameterSet& ps); - ~DTEtaPatternLutTester(); + ~DTEtaPatternLutTester() override; - virtual void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; private: diff --git a/L1TriggerConfig/DTTrackFinder/interface/DTExtLutTester.h b/L1TriggerConfig/DTTrackFinder/interface/DTExtLutTester.h index 9af6f4afeb93a..9840fc8e394d9 100644 --- a/L1TriggerConfig/DTTrackFinder/interface/DTExtLutTester.h +++ b/L1TriggerConfig/DTTrackFinder/interface/DTExtLutTester.h @@ -26,9 +26,9 @@ class DTExtLutTester : public edm::EDAnalyzer { DTExtLutTester(const edm::ParameterSet& ps); - ~DTExtLutTester(); + ~DTExtLutTester() override; - virtual void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; private: diff --git a/L1TriggerConfig/DTTrackFinder/interface/DTPhiLutTester.h b/L1TriggerConfig/DTTrackFinder/interface/DTPhiLutTester.h index 2ce27aa866b83..6deb2c6e5adfd 100644 --- a/L1TriggerConfig/DTTrackFinder/interface/DTPhiLutTester.h +++ b/L1TriggerConfig/DTTrackFinder/interface/DTPhiLutTester.h @@ -26,9 +26,9 @@ class DTPhiLutTester : public edm::EDAnalyzer { DTPhiLutTester(const edm::ParameterSet& ps); - ~DTPhiLutTester(); + ~DTPhiLutTester() override; - virtual void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; private: diff --git a/L1TriggerConfig/DTTrackFinder/interface/DTPtaLutTester.h b/L1TriggerConfig/DTTrackFinder/interface/DTPtaLutTester.h index 1cb1ed7243e52..a05cb3f9bbfd2 100644 --- a/L1TriggerConfig/DTTrackFinder/interface/DTPtaLutTester.h +++ b/L1TriggerConfig/DTTrackFinder/interface/DTPtaLutTester.h @@ -26,9 +26,9 @@ class DTPtaLutTester : public edm::EDAnalyzer { DTPtaLutTester(const edm::ParameterSet& ps); - ~DTPtaLutTester(); + ~DTPtaLutTester() override; - virtual void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; private: diff --git a/L1TriggerConfig/DTTrackFinder/interface/DTQualPatternLutTester.h b/L1TriggerConfig/DTTrackFinder/interface/DTQualPatternLutTester.h index 89e2260bb93bb..9b813704f081e 100644 --- a/L1TriggerConfig/DTTrackFinder/interface/DTQualPatternLutTester.h +++ b/L1TriggerConfig/DTTrackFinder/interface/DTQualPatternLutTester.h @@ -26,9 +26,9 @@ class DTQualPatternLutTester : public edm::EDAnalyzer { DTQualPatternLutTester(const edm::ParameterSet& ps); - ~DTQualPatternLutTester(); + ~DTQualPatternLutTester() override; - virtual void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; private: diff --git a/L1TriggerConfig/DTTrackFinder/interface/DTTFMasksTester.h b/L1TriggerConfig/DTTrackFinder/interface/DTTFMasksTester.h index 8b7c8b1cec625..63a9f12f4a933 100644 --- a/L1TriggerConfig/DTTrackFinder/interface/DTTFMasksTester.h +++ b/L1TriggerConfig/DTTrackFinder/interface/DTTFMasksTester.h @@ -26,9 +26,9 @@ class DTTFMasksTester : public edm::EDAnalyzer { DTTFMasksTester(const edm::ParameterSet& ps); - ~DTTFMasksTester(); + ~DTTFMasksTester() override; - virtual void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; private: diff --git a/L1TriggerConfig/DTTrackFinder/interface/DTTFParametersTester.h b/L1TriggerConfig/DTTrackFinder/interface/DTTFParametersTester.h index 89101009e8e79..27d613997aa37 100644 --- a/L1TriggerConfig/DTTrackFinder/interface/DTTFParametersTester.h +++ b/L1TriggerConfig/DTTrackFinder/interface/DTTFParametersTester.h @@ -26,9 +26,9 @@ class DTTFParametersTester : public edm::EDAnalyzer { DTTFParametersTester(const edm::ParameterSet& ps); - ~DTTFParametersTester(); + ~DTTFParametersTester() override; - virtual void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; private: diff --git a/L1TriggerConfig/DTTrackFinder/interface/DTTrackFinderConfig.h b/L1TriggerConfig/DTTrackFinder/interface/DTTrackFinderConfig.h index ae1f6e93aebb0..4cd12e13c6cf7 100644 --- a/L1TriggerConfig/DTTrackFinder/interface/DTTrackFinderConfig.h +++ b/L1TriggerConfig/DTTrackFinder/interface/DTTrackFinderConfig.h @@ -42,7 +42,7 @@ class DTTrackFinderConfig : public edm::ESProducer { DTTrackFinderConfig(const edm::ParameterSet&); - ~DTTrackFinderConfig(); + ~DTTrackFinderConfig() override; std::unique_ptr produceL1MuDTExtLut(const L1MuDTExtLutRcd&); diff --git a/L1TriggerConfig/DTTrackFinder/src/DTEtaPatternLutOnlineProd.cc b/L1TriggerConfig/DTTrackFinder/src/DTEtaPatternLutOnlineProd.cc index de8cf054d34ed..956359e0b93d9 100644 --- a/L1TriggerConfig/DTTrackFinder/src/DTEtaPatternLutOnlineProd.cc +++ b/L1TriggerConfig/DTTrackFinder/src/DTEtaPatternLutOnlineProd.cc @@ -37,9 +37,9 @@ class DTEtaPatternLutOnlineProd : { public: DTEtaPatternLutOnlineProd(const edm::ParameterSet&); - ~DTEtaPatternLutOnlineProd(); + ~DTEtaPatternLutOnlineProd() override; - virtual std::shared_ptr< L1MuDTEtaPatternLut > newObject( + std::shared_ptr< L1MuDTEtaPatternLut > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/DTTrackFinder/src/DTExtLutOnlineProd.cc b/L1TriggerConfig/DTTrackFinder/src/DTExtLutOnlineProd.cc index eb01017603c58..87606f4f7bf35 100644 --- a/L1TriggerConfig/DTTrackFinder/src/DTExtLutOnlineProd.cc +++ b/L1TriggerConfig/DTTrackFinder/src/DTExtLutOnlineProd.cc @@ -37,9 +37,9 @@ class DTExtLutOnlineProd : { public: DTExtLutOnlineProd(const edm::ParameterSet&); - ~DTExtLutOnlineProd(); + ~DTExtLutOnlineProd() override; - virtual std::shared_ptr< L1MuDTExtLut > newObject( + std::shared_ptr< L1MuDTExtLut > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/DTTrackFinder/src/DTPhiLutOnlineProd.cc b/L1TriggerConfig/DTTrackFinder/src/DTPhiLutOnlineProd.cc index 85c608d170d29..5764f8fdfe3d0 100644 --- a/L1TriggerConfig/DTTrackFinder/src/DTPhiLutOnlineProd.cc +++ b/L1TriggerConfig/DTTrackFinder/src/DTPhiLutOnlineProd.cc @@ -37,9 +37,9 @@ class DTPhiLutOnlineProd : { public: DTPhiLutOnlineProd(const edm::ParameterSet&); - ~DTPhiLutOnlineProd(); + ~DTPhiLutOnlineProd() override; - virtual std::shared_ptr< L1MuDTPhiLut > newObject( + std::shared_ptr< L1MuDTPhiLut > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/DTTrackFinder/src/DTPtaLutOnlineProd.cc b/L1TriggerConfig/DTTrackFinder/src/DTPtaLutOnlineProd.cc index 8f16f90977bfa..03c34faf388d5 100644 --- a/L1TriggerConfig/DTTrackFinder/src/DTPtaLutOnlineProd.cc +++ b/L1TriggerConfig/DTTrackFinder/src/DTPtaLutOnlineProd.cc @@ -37,9 +37,9 @@ class DTPtaLutOnlineProd : { public: DTPtaLutOnlineProd(const edm::ParameterSet&); - ~DTPtaLutOnlineProd(); + ~DTPtaLutOnlineProd() override; - virtual std::shared_ptr< L1MuDTPtaLut > newObject( + std::shared_ptr< L1MuDTPtaLut > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/DTTrackFinder/src/DTQualPatternLutOnlineProd.cc b/L1TriggerConfig/DTTrackFinder/src/DTQualPatternLutOnlineProd.cc index 9fa0bd1325fdb..769cee072e34e 100644 --- a/L1TriggerConfig/DTTrackFinder/src/DTQualPatternLutOnlineProd.cc +++ b/L1TriggerConfig/DTTrackFinder/src/DTQualPatternLutOnlineProd.cc @@ -37,9 +37,9 @@ class DTQualPatternLutOnlineProd : { public: DTQualPatternLutOnlineProd(const edm::ParameterSet&); - ~DTQualPatternLutOnlineProd(); + ~DTQualPatternLutOnlineProd() override; - virtual std::shared_ptr< L1MuDTQualPatternLut > newObject( + std::shared_ptr< L1MuDTQualPatternLut > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/DTTrackFinder/src/DTTFMasksOnlineProd.cc b/L1TriggerConfig/DTTrackFinder/src/DTTFMasksOnlineProd.cc index 8d38062ce73b7..ff6a554009c14 100644 --- a/L1TriggerConfig/DTTrackFinder/src/DTTFMasksOnlineProd.cc +++ b/L1TriggerConfig/DTTrackFinder/src/DTTFMasksOnlineProd.cc @@ -34,9 +34,9 @@ class DTTFMasksOnlineProd : public L1ConfigOnlineProdBase< L1MuDTTFMasksRcd, L1MuDTTFMasks > { public: DTTFMasksOnlineProd(const edm::ParameterSet&); - ~DTTFMasksOnlineProd(); + ~DTTFMasksOnlineProd() override; - virtual std::shared_ptr< L1MuDTTFMasks > newObject( + std::shared_ptr< L1MuDTTFMasks > newObject( const std::string& objectKey ) override ; private: @@ -119,12 +119,12 @@ DTTFMasksOnlineProd::newObject( const std::string& objectKey ) crateMask ) ; char* pEnd; crateMaskL[ icrate ] = std::strtol( crateMask.c_str(), &pEnd, 16 ) ; - crateMaskR[ icrate ] = std::strtol( pEnd, (char **)NULL, 16 ) ; + crateMaskR[ icrate ] = std::strtol( pEnd, (char **)nullptr, 16 ) ; crateMaskResults.fillVariable( crateMaskColumns[ icrate+6 ], crateMask ) ; krateMaskL[ icrate ] = std::strtol( crateMask.c_str(), &pEnd, 16 ) ; - krateMaskR[ icrate ] = std::strtol( pEnd, (char **)NULL, 16 ) ; + krateMaskR[ icrate ] = std::strtol( pEnd, (char **)nullptr, 16 ) ; std::cout << "Crate " << icrate << " masks" << " L: " << std::hex << crateMaskL[ icrate ] diff --git a/L1TriggerConfig/DTTrackFinder/src/DTTFParametersOnlineProd.cc b/L1TriggerConfig/DTTrackFinder/src/DTTFParametersOnlineProd.cc index ffb1af5b7182c..ba5e38e74a48b 100644 --- a/L1TriggerConfig/DTTrackFinder/src/DTTFParametersOnlineProd.cc +++ b/L1TriggerConfig/DTTrackFinder/src/DTTFParametersOnlineProd.cc @@ -34,9 +34,9 @@ class DTTFParametersOnlineProd : public L1ConfigOnlineProdBase< L1MuDTTFParametersRcd, L1MuDTTFParameters > { public: DTTFParametersOnlineProd(const edm::ParameterSet&); - ~DTTFParametersOnlineProd(); + ~DTTFParametersOnlineProd() override; - virtual std::shared_ptr< L1MuDTTFParameters > newObject( + std::shared_ptr< L1MuDTTFParameters > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/DTTrackFinder/src/DTTFRSKeysOnlineProd.cc b/L1TriggerConfig/DTTrackFinder/src/DTTFRSKeysOnlineProd.cc index f733323f5c054..55af87d7e9cde 100644 --- a/L1TriggerConfig/DTTrackFinder/src/DTTFRSKeysOnlineProd.cc +++ b/L1TriggerConfig/DTTrackFinder/src/DTTFRSKeysOnlineProd.cc @@ -31,9 +31,9 @@ class DTTFRSKeysOnlineProd : public L1ObjectKeysOnlineProdBase { public: DTTFRSKeysOnlineProd(const edm::ParameterSet&); - ~DTTFRSKeysOnlineProd(); + ~DTTFRSKeysOnlineProd() override; - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: // ----------member data --------------------------- }; diff --git a/L1TriggerConfig/DTTrackFinder/src/DTTFTSCObjectKeysOnlineProd.cc b/L1TriggerConfig/DTTrackFinder/src/DTTFTSCObjectKeysOnlineProd.cc index a06465c2dec27..fc0de408747ff 100644 --- a/L1TriggerConfig/DTTrackFinder/src/DTTFTSCObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/DTTrackFinder/src/DTTFTSCObjectKeysOnlineProd.cc @@ -31,9 +31,9 @@ class DTTFTSCObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase { public: DTTFTSCObjectKeysOnlineProd(const edm::ParameterSet&); - ~DTTFTSCObjectKeysOnlineProd(); + ~DTTFTSCObjectKeysOnlineProd() override; - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: // ----------member data --------------------------- }; diff --git a/L1TriggerConfig/GMTConfigProducers/interface/L1MuGMTParametersOnlineProducer.h b/L1TriggerConfig/GMTConfigProducers/interface/L1MuGMTParametersOnlineProducer.h index b52c1356c8a37..e45364d6f1620 100644 --- a/L1TriggerConfig/GMTConfigProducers/interface/L1MuGMTParametersOnlineProducer.h +++ b/L1TriggerConfig/GMTConfigProducers/interface/L1MuGMTParametersOnlineProducer.h @@ -30,10 +30,10 @@ class L1MuGMTParametersOnlineProducer : public L1ConfigOnlineProdBase { public: L1MuGMTParametersOnlineProducer(const edm::ParameterSet&); - ~L1MuGMTParametersOnlineProducer(); + ~L1MuGMTParametersOnlineProducer() override; /// The method that actually implements the production of the parameter objects - virtual std::shared_ptr newObject( const std::string& objectKey ); + std::shared_ptr newObject( const std::string& objectKey ) override; protected: void checkCMSSWVersion(const coral::AttributeList& configRecord); diff --git a/L1TriggerConfig/GMTConfigProducers/interface/L1MuGMTParametersProducer.h b/L1TriggerConfig/GMTConfigProducers/interface/L1MuGMTParametersProducer.h index 86eb6e9e7b5cc..4da52207008ea 100644 --- a/L1TriggerConfig/GMTConfigProducers/interface/L1MuGMTParametersProducer.h +++ b/L1TriggerConfig/GMTConfigProducers/interface/L1MuGMTParametersProducer.h @@ -34,7 +34,7 @@ class L1MuGMTParametersProducer : public edm::ESProducer { public: L1MuGMTParametersProducer(const edm::ParameterSet&); - ~L1MuGMTParametersProducer(); + ~L1MuGMTParametersProducer() override; std::unique_ptr produceL1MuGMTParameters(const L1MuGMTParametersRcd&); std::unique_ptr produceL1MuGMTChannelMask(const L1MuGMTChannelMaskRcd&); diff --git a/L1TriggerConfig/GMTConfigProducers/interface/RecordHelper.h b/L1TriggerConfig/GMTConfigProducers/interface/RecordHelper.h index 684a0bbf3c32b..d8d668ae0fd7b 100644 --- a/L1TriggerConfig/GMTConfigProducers/interface/RecordHelper.h +++ b/L1TriggerConfig/GMTConfigProducers/interface/RecordHelper.h @@ -66,7 +66,7 @@ template class FieldHandler : pub { } /** Actual data extraction. */ - virtual void extractValue(const AttributeList& src, TOutput& dest) { + void extractValue(const AttributeList& src, TOutput& dest) override { #ifdef RECORDHELPER_DEBUG std::cout << "Parsing field " << this->getName() << " with type " << typeid(TCField).name() ; #endif @@ -100,7 +100,7 @@ template class ASCIIBoolFieldHandler : publ { } /** Extract value as char, then see compare it to '0' to get its truth value. */ - virtual void extractValue(const AttributeList& src, TOutput& dest) + void extractValue(const AttributeList& src, TOutput& dest) override { char value = src[this->getColumnName()].template data(); #ifdef RECORDHELPER_DEBUG diff --git a/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTChannelMaskOnlineProducer.cc b/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTChannelMaskOnlineProducer.cc index 610916aa84aea..a723eb9ff3727 100644 --- a/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTChannelMaskOnlineProducer.cc +++ b/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTChannelMaskOnlineProducer.cc @@ -6,9 +6,9 @@ class L1MuGMTChannelMaskOnlineProducer : public L1ConfigOnlineProdBase< L1MuGMTC public: L1MuGMTChannelMaskOnlineProducer(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBase< L1MuGMTChannelMaskRcd, L1MuGMTChannelMask >( iConfig ) {} - ~L1MuGMTChannelMaskOnlineProducer() {} + ~L1MuGMTChannelMaskOnlineProducer() override {} - virtual std::shared_ptr< L1MuGMTChannelMask > newObject( const std::string& objectKey ) override ; + std::shared_ptr< L1MuGMTChannelMask > newObject( const std::string& objectKey ) override ; private: }; diff --git a/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTParametersKeysOnlineProd.cc b/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTParametersKeysOnlineProd.cc index 65a767e128421..316c5d08b8186 100644 --- a/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTParametersKeysOnlineProd.cc +++ b/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTParametersKeysOnlineProd.cc @@ -24,9 +24,9 @@ class L1MuGMTParametersKeysOnlineProd : public L1ObjectKeysOnlineProdBase { { LogDebug( "L1-O2O" ) << "L1MuGMTParametersKeysOnlineProd created" << std::endl; } - ~L1MuGMTParametersKeysOnlineProd() {} + ~L1MuGMTParametersKeysOnlineProd() override {} - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: }; diff --git a/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTRSKeysOnlineProd.cc b/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTRSKeysOnlineProd.cc index 460aec0b07617..fe33cfae9ce97 100644 --- a/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTRSKeysOnlineProd.cc +++ b/L1TriggerConfig/GMTConfigProducers/src/L1MuGMTRSKeysOnlineProd.cc @@ -19,9 +19,9 @@ class L1MuGMTRSKeysOnlineProd : public L1ObjectKeysOnlineProdBase { public: L1MuGMTRSKeysOnlineProd(const edm::ParameterSet& iConfig) ; - ~L1MuGMTRSKeysOnlineProd() {} + ~L1MuGMTRSKeysOnlineProd() override {} - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: bool m_enableL1MuGMTChannelMask ; }; diff --git a/L1TriggerConfig/GctConfigProducers/interface/L1GctConfigDump.h b/L1TriggerConfig/GctConfigProducers/interface/L1GctConfigDump.h index f8247fc801de5..adf70d5be6004 100644 --- a/L1TriggerConfig/GctConfigProducers/interface/L1GctConfigDump.h +++ b/L1TriggerConfig/GctConfigProducers/interface/L1GctConfigDump.h @@ -35,9 +35,9 @@ class L1GctConfigDump : public edm::EDAnalyzer explicit L1GctConfigDump(const edm::ParameterSet&); // destructor - virtual ~L1GctConfigDump(); + ~L1GctConfigDump() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1TriggerConfig/GctConfigProducers/interface/L1GctConfigProducers.h b/L1TriggerConfig/GctConfigProducers/interface/L1GctConfigProducers.h index 9ae45e3099179..5ab5e6df3b71c 100644 --- a/L1TriggerConfig/GctConfigProducers/interface/L1GctConfigProducers.h +++ b/L1TriggerConfig/GctConfigProducers/interface/L1GctConfigProducers.h @@ -49,7 +49,7 @@ class L1GctChannelMaskRcd; class L1GctConfigProducers : public edm::ESProducer { public: L1GctConfigProducers(const edm::ParameterSet&); - ~L1GctConfigProducers(); + ~L1GctConfigProducers() override; typedef std::shared_ptr JfParamsReturnType; typedef std::shared_ptr ChanMaskReturnType; diff --git a/L1TriggerConfig/GctConfigProducers/src/L1GctChannelMaskOnlineProd.cc b/L1TriggerConfig/GctConfigProducers/src/L1GctChannelMaskOnlineProd.cc index 9a2f53413a2f8..ed9c58a031ea9 100644 --- a/L1TriggerConfig/GctConfigProducers/src/L1GctChannelMaskOnlineProd.cc +++ b/L1TriggerConfig/GctConfigProducers/src/L1GctChannelMaskOnlineProd.cc @@ -6,9 +6,9 @@ class L1GctChannelMaskOnlineProd : public L1ConfigOnlineProdBase< L1GctChannelMa public: L1GctChannelMaskOnlineProd(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBase< L1GctChannelMaskRcd, L1GctChannelMask >( iConfig ) {} - ~L1GctChannelMaskOnlineProd() {} + ~L1GctChannelMaskOnlineProd() override {} - virtual std::shared_ptr< L1GctChannelMask > newObject( const std::string& objectKey ) override ; + std::shared_ptr< L1GctChannelMask > newObject( const std::string& objectKey ) override ; private: }; diff --git a/L1TriggerConfig/GctConfigProducers/src/L1GctJetFinderParamsOnlineProd.cc b/L1TriggerConfig/GctConfigProducers/src/L1GctJetFinderParamsOnlineProd.cc index c3f8e4dc1c9b7..2b74c7abe6865 100644 --- a/L1TriggerConfig/GctConfigProducers/src/L1GctJetFinderParamsOnlineProd.cc +++ b/L1TriggerConfig/GctConfigProducers/src/L1GctJetFinderParamsOnlineProd.cc @@ -6,9 +6,9 @@ class L1GctJetFinderParamsOnlineProd : public L1ConfigOnlineProdBase< L1GctJetFi public: L1GctJetFinderParamsOnlineProd(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBase< L1GctJetFinderParamsRcd, L1GctJetFinderParams >( iConfig ) {} - ~L1GctJetFinderParamsOnlineProd() {} + ~L1GctJetFinderParamsOnlineProd() override {} - virtual std::shared_ptr< L1GctJetFinderParams > newObject( const std::string& objectKey ) override ; + std::shared_ptr< L1GctJetFinderParams > newObject( const std::string& objectKey ) override ; private: }; diff --git a/L1TriggerConfig/GctConfigProducers/src/L1GctRSObjectKeysOnlineProd.cc b/L1TriggerConfig/GctConfigProducers/src/L1GctRSObjectKeysOnlineProd.cc index e36bde0537150..9ea72e8909a5e 100644 --- a/L1TriggerConfig/GctConfigProducers/src/L1GctRSObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/GctConfigProducers/src/L1GctRSObjectKeysOnlineProd.cc @@ -4,9 +4,9 @@ class L1GctRSObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase { public: L1GctRSObjectKeysOnlineProd(const edm::ParameterSet& iConfig) ; - ~L1GctRSObjectKeysOnlineProd() {} + ~L1GctRSObjectKeysOnlineProd() override {} - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: bool m_enableL1GctChannelMask ; }; diff --git a/L1TriggerConfig/GctConfigProducers/src/L1GctTSCObjectKeysOnlineProd.cc b/L1TriggerConfig/GctConfigProducers/src/L1GctTSCObjectKeysOnlineProd.cc index 386f46449a02e..529a51ee2586d 100644 --- a/L1TriggerConfig/GctConfigProducers/src/L1GctTSCObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/GctConfigProducers/src/L1GctTSCObjectKeysOnlineProd.cc @@ -5,9 +5,9 @@ class L1GctTSCObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase { public: L1GctTSCObjectKeysOnlineProd(const edm::ParameterSet& iConfig) : L1ObjectKeysOnlineProdBase( iConfig ) {} - ~L1GctTSCObjectKeysOnlineProd() {} + ~L1GctTSCObjectKeysOnlineProd() override {} - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: }; diff --git a/L1TriggerConfig/L1CSCTPConfigProducers/src/L1CSCTriggerPrimitivesConfigProducer.h b/L1TriggerConfig/L1CSCTPConfigProducers/src/L1CSCTriggerPrimitivesConfigProducer.h index 0448177d14b82..1ed63576722cd 100644 --- a/L1TriggerConfig/L1CSCTPConfigProducers/src/L1CSCTriggerPrimitivesConfigProducer.h +++ b/L1TriggerConfig/L1CSCTPConfigProducers/src/L1CSCTriggerPrimitivesConfigProducer.h @@ -24,7 +24,7 @@ class CSCDBL1TPParametersRcd; class L1CSCTriggerPrimitivesConfigProducer : public edm::ESProducer { public: L1CSCTriggerPrimitivesConfigProducer(const edm::ParameterSet&); - ~L1CSCTriggerPrimitivesConfigProducer(); + ~L1CSCTriggerPrimitivesConfigProducer() override; //typedef std::shared_ptr ReturnType; diff --git a/L1TriggerConfig/L1GeometryProducers/interface/L1CaloGeometryProd.h b/L1TriggerConfig/L1GeometryProducers/interface/L1CaloGeometryProd.h index a62c27edfce2d..5934a8b4a74e1 100644 --- a/L1TriggerConfig/L1GeometryProducers/interface/L1CaloGeometryProd.h +++ b/L1TriggerConfig/L1GeometryProducers/interface/L1CaloGeometryProd.h @@ -33,7 +33,7 @@ class L1CaloGeometryProd : public edm::ESProducer { public: L1CaloGeometryProd(const edm::ParameterSet&); - ~L1CaloGeometryProd(); + ~L1CaloGeometryProd() override; typedef std::unique_ptr ReturnType; diff --git a/L1TriggerConfig/L1GeometryProducers/src/L1CaloGeometryDump.cc b/L1TriggerConfig/L1GeometryProducers/src/L1CaloGeometryDump.cc index b8ac49313e29c..0528b4a02c2af 100644 --- a/L1TriggerConfig/L1GeometryProducers/src/L1CaloGeometryDump.cc +++ b/L1TriggerConfig/L1GeometryProducers/src/L1CaloGeometryDump.cc @@ -43,13 +43,13 @@ class L1CaloGeometryDump : public edm::EDAnalyzer { public: explicit L1CaloGeometryDump(const edm::ParameterSet&); - ~L1CaloGeometryDump(); + ~L1CaloGeometryDump() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- }; diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtBoardMapsTester.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtBoardMapsTester.h index 03e6b5f78d9b9..fb556e334cf97 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtBoardMapsTester.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtBoardMapsTester.h @@ -37,9 +37,9 @@ class L1GtBoardMapsTester : public edm::EDAnalyzer explicit L1GtBoardMapsTester(const edm::ParameterSet&); // destructor - virtual ~L1GtBoardMapsTester(); + ~L1GtBoardMapsTester() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtBoardMapsTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtBoardMapsTrivialProducer.h index e620add455fca..71edb11912f83 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtBoardMapsTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtBoardMapsTrivialProducer.h @@ -40,7 +40,7 @@ class L1GtBoardMapsTrivialProducer : public edm::ESProducer L1GtBoardMapsTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtBoardMapsTrivialProducer(); + ~L1GtBoardMapsTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersConfigOnlineProd.h index c83e8ccfa27bb..f0956eaf03b4b 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersConfigOnlineProd.h @@ -39,10 +39,10 @@ class L1GtParametersConfigOnlineProd : L1GtParametersConfigOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtParametersConfigOnlineProd(); + ~L1GtParametersConfigOnlineProd() override; /// public methods - virtual std::shared_ptr newObject(const std::string& objectKey); + std::shared_ptr newObject(const std::string& objectKey) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersTester.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersTester.h index 8b57de64affc7..61a29ae1a441e 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersTester.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersTester.h @@ -41,9 +41,9 @@ class L1GtParametersTester : public edm::EDAnalyzer explicit L1GtParametersTester(const edm::ParameterSet&); // destructor - virtual ~L1GtParametersTester(); + ~L1GtParametersTester() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersTrivialProducer.h index a228668ddc18b..8853b0d044aec 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtParametersTrivialProducer.h @@ -42,7 +42,7 @@ class L1GtParametersTrivialProducer : public edm::ESProducer L1GtParametersTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtParametersTrivialProducer(); + ~L1GtParametersTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigConfigOnlineProd.h index d1323a754e227..28a000bd2d2f6 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigConfigOnlineProd.h @@ -39,10 +39,10 @@ class L1GtPrescaleFactorsAlgoTrigConfigOnlineProd : L1GtPrescaleFactorsAlgoTrigConfigOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtPrescaleFactorsAlgoTrigConfigOnlineProd(); + ~L1GtPrescaleFactorsAlgoTrigConfigOnlineProd() override; /// public methods - virtual std::shared_ptr newObject(const std::string& objectKey); + std::shared_ptr newObject(const std::string& objectKey) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigTrivialProducer.h index 8fe3a99d85e5e..8c9e5b196c2cc 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAlgoTrigTrivialProducer.h @@ -42,7 +42,7 @@ class L1GtPrescaleFactorsAlgoTrigTrivialProducer : public edm::ESProducer L1GtPrescaleFactorsAlgoTrigTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtPrescaleFactorsAlgoTrigTrivialProducer(); + ~L1GtPrescaleFactorsAlgoTrigTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAndMasksTester.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAndMasksTester.h index edb9e34928180..3579834cee541 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAndMasksTester.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsAndMasksTester.h @@ -38,32 +38,32 @@ class L1GtPrescaleFactorsAndMasksTester: public edm::EDAnalyzer { explicit L1GtPrescaleFactorsAndMasksTester(const edm::ParameterSet&); // destructor - virtual ~L1GtPrescaleFactorsAndMasksTester(); + ~L1GtPrescaleFactorsAndMasksTester() override; private: /// begin job - void beginJob(); + void beginJob() override; /// begin run - void beginRun(const edm::Run&, const edm::EventSetup&); + void beginRun(const edm::Run&, const edm::EventSetup&) override; /// begin luminosity block void beginLuminosityBlock(const edm::LuminosityBlock&, - const edm::EventSetup&); + const edm::EventSetup&) override; /// analyze - void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// end luminosity block void - endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&); + endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override; /// end run - void endRun(const edm::Run&, const edm::EventSetup&); + void endRun(const edm::Run&, const edm::EventSetup&) override; /// end job - void endJob(); + void endJob() override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigConfigOnlineProd.h index 5472396ebb3fe..43677051ac3f4 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigConfigOnlineProd.h @@ -39,10 +39,10 @@ class L1GtPrescaleFactorsTechTrigConfigOnlineProd : L1GtPrescaleFactorsTechTrigConfigOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtPrescaleFactorsTechTrigConfigOnlineProd(); + ~L1GtPrescaleFactorsTechTrigConfigOnlineProd() override; /// public methods - virtual std::shared_ptr newObject(const std::string& objectKey); + std::shared_ptr newObject(const std::string& objectKey) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigTrivialProducer.h index 12dcdc8795618..3c9bb67c79aa0 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPrescaleFactorsTechTrigTrivialProducer.h @@ -42,7 +42,7 @@ class L1GtPrescaleFactorsTechTrigTrivialProducer : public edm::ESProducer L1GtPrescaleFactorsTechTrigTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtPrescaleFactorsTechTrigTrivialProducer(); + ~L1GtPrescaleFactorsTechTrigTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h index 17b5ccb00dc8e..fd4994007c569 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h @@ -42,10 +42,10 @@ class L1GtPsbSetupConfigOnlineProd : L1GtPsbSetupConfigOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtPsbSetupConfigOnlineProd(); + ~L1GtPsbSetupConfigOnlineProd() override; /// public methods - virtual std::shared_ptr newObject(const std::string& objectKey); + std::shared_ptr newObject(const std::string& objectKey) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupTester.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupTester.h index b8681ce917c89..9e15ce50b5d2a 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupTester.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupTester.h @@ -37,9 +37,9 @@ class L1GtPsbSetupTester : public edm::EDAnalyzer explicit L1GtPsbSetupTester(const edm::ParameterSet&); // destructor - virtual ~L1GtPsbSetupTester(); + ~L1GtPsbSetupTester() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupTrivialProducer.h index d88a09114f9c1..dfbb8b317ee86 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupTrivialProducer.h @@ -40,7 +40,7 @@ class L1GtPsbSetupTrivialProducer : public edm::ESProducer L1GtPsbSetupTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtPsbSetupTrivialProducer(); + ~L1GtPsbSetupTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtRsObjectKeysOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtRsObjectKeysOnlineProd.h index 8bda121f72b7b..71ce61eeba375 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtRsObjectKeysOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtRsObjectKeysOnlineProd.h @@ -31,10 +31,10 @@ class L1GtRsObjectKeysOnlineProd : L1GtRsObjectKeysOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtRsObjectKeysOnlineProd(); + ~L1GtRsObjectKeysOnlineProd() override; /// public methods - virtual void fillObjectKeys(ReturnType pL1TriggerKey); + void fillObjectKeys(ReturnType pL1TriggerKey) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtStableParametersTester.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtStableParametersTester.h index c10897e4935f8..3cccb495826c6 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtStableParametersTester.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtStableParametersTester.h @@ -40,9 +40,9 @@ class L1GtStableParametersTester : public edm::EDAnalyzer explicit L1GtStableParametersTester(const edm::ParameterSet&); // destructor - virtual ~L1GtStableParametersTester(); + ~L1GtStableParametersTester() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtStableParametersTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtStableParametersTrivialProducer.h index 214c655922656..19ec79f45fea6 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtStableParametersTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtStableParametersTrivialProducer.h @@ -44,7 +44,7 @@ class L1GtStableParametersTrivialProducer : public edm::ESProducer L1GtStableParametersTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtStableParametersTrivialProducer(); + ~L1GtStableParametersTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskAlgoTrigConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskAlgoTrigConfigOnlineProd.h index d10e9ca34bba5..c1370779602e4 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskAlgoTrigConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskAlgoTrigConfigOnlineProd.h @@ -39,10 +39,10 @@ class L1GtTriggerMaskAlgoTrigConfigOnlineProd : L1GtTriggerMaskAlgoTrigConfigOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtTriggerMaskAlgoTrigConfigOnlineProd(); + ~L1GtTriggerMaskAlgoTrigConfigOnlineProd() override; /// public methods - virtual std::shared_ptr newObject(const std::string& objectKey); + std::shared_ptr newObject(const std::string& objectKey) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskAlgoTrigTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskAlgoTrigTrivialProducer.h index 12bcc2bcceb35..b9c5ece1160b3 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskAlgoTrigTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskAlgoTrigTrivialProducer.h @@ -42,7 +42,7 @@ class L1GtTriggerMaskAlgoTrigTrivialProducer : public edm::ESProducer L1GtTriggerMaskAlgoTrigTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtTriggerMaskAlgoTrigTrivialProducer(); + ~L1GtTriggerMaskAlgoTrigTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskTechTrigConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskTechTrigConfigOnlineProd.h index 45796586423a4..aa7923d397279 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskTechTrigConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskTechTrigConfigOnlineProd.h @@ -39,10 +39,10 @@ class L1GtTriggerMaskTechTrigConfigOnlineProd : L1GtTriggerMaskTechTrigConfigOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtTriggerMaskTechTrigConfigOnlineProd(); + ~L1GtTriggerMaskTechTrigConfigOnlineProd() override; /// public methods - virtual std::shared_ptr newObject(const std::string& objectKey); + std::shared_ptr newObject(const std::string& objectKey) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskTechTrigTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskTechTrigTrivialProducer.h index cb5faf195894a..12996555dfcc1 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskTechTrigTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskTechTrigTrivialProducer.h @@ -42,7 +42,7 @@ class L1GtTriggerMaskTechTrigTrivialProducer : public edm::ESProducer L1GtTriggerMaskTechTrigTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtTriggerMaskTechTrigTrivialProducer(); + ~L1GtTriggerMaskTechTrigTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoAlgoTrigTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoAlgoTrigTrivialProducer.h index e1053a1b5788d..eaf3c9561bf43 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoAlgoTrigTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoAlgoTrigTrivialProducer.h @@ -42,7 +42,7 @@ class L1GtTriggerMaskVetoAlgoTrigTrivialProducer : public edm::ESProducer L1GtTriggerMaskVetoAlgoTrigTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtTriggerMaskVetoAlgoTrigTrivialProducer(); + ~L1GtTriggerMaskVetoAlgoTrigTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h index 673454731927c..a79fba586c2ac 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h @@ -39,10 +39,10 @@ class L1GtTriggerMaskVetoTechTrigConfigOnlineProd : L1GtTriggerMaskVetoTechTrigConfigOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtTriggerMaskVetoTechTrigConfigOnlineProd(); + ~L1GtTriggerMaskVetoTechTrigConfigOnlineProd() override; /// public methods - virtual std::shared_ptr newObject(const std::string& objectKey); + std::shared_ptr newObject(const std::string& objectKey) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoTechTrigTrivialProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoTechTrigTrivialProducer.h index 5d9b4f99a0375..ad108f7729a13 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoTechTrigTrivialProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMaskVetoTechTrigTrivialProducer.h @@ -42,7 +42,7 @@ class L1GtTriggerMaskVetoTechTrigTrivialProducer : public edm::ESProducer L1GtTriggerMaskVetoTechTrigTrivialProducer(const edm::ParameterSet&); /// destructor - ~L1GtTriggerMaskVetoTechTrigTrivialProducer(); + ~L1GtTriggerMaskVetoTechTrigTrivialProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuConfigOnlineProd.h index c3807afe1415c..1b1c80536b9df 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuConfigOnlineProd.h @@ -55,10 +55,10 @@ class L1GtTriggerMenuConfigOnlineProd : L1GtTriggerMenuConfigOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtTriggerMenuConfigOnlineProd(); + ~L1GtTriggerMenuConfigOnlineProd() override; /// public methods - virtual std::shared_ptr newObject(const std::string& objectKey); + std::shared_ptr newObject(const std::string& objectKey) override; /// initialize the class (mainly reserve/resize) void init(const int numberConditionChips); diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuTester.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuTester.h index 45e6a7a0965a1..f4b2b253b6202 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuTester.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuTester.h @@ -49,32 +49,32 @@ class L1GtTriggerMenuTester: public edm::EDAnalyzer { explicit L1GtTriggerMenuTester(const edm::ParameterSet&); // destructor - virtual ~L1GtTriggerMenuTester(); + ~L1GtTriggerMenuTester() override; private: /// begin job - void beginJob(); + void beginJob() override; /// begin run - void beginRun(const edm::Run&, const edm::EventSetup&); + void beginRun(const edm::Run&, const edm::EventSetup&) override; /// begin luminosity block void beginLuminosityBlock(const edm::LuminosityBlock&, - const edm::EventSetup&); + const edm::EventSetup&) override; /// analyze - void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; /// end luminosity block void - endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&); + endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override; /// end run - void endRun(const edm::Run&, const edm::EventSetup&); + void endRun(const edm::Run&, const edm::EventSetup&) override; /// end job - void endJob(); + void endJob() override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuXmlParser.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuXmlParser.h index 7e151640b662b..46c95a3b0af06 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuXmlParser.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuXmlParser.h @@ -59,7 +59,7 @@ class L1GtTriggerMenuXmlParser : public L1GtXmlParserTags L1GtTriggerMenuXmlParser(); /// destructor - virtual ~L1GtTriggerMenuXmlParser(); + ~L1GtTriggerMenuXmlParser() override; public: @@ -343,7 +343,7 @@ class L1GtTriggerMenuXmlParser : public L1GtXmlParserTags XERCES_CPP_NAMESPACE::DOMNode* findXMLChild( XERCES_CPP_NAMESPACE::DOMNode* startChild, const std::string& tagName, bool beginOnly = false, - std::string* rest = 0); + std::string* rest = nullptr); /// get a named attribute for an xml node as string std::string getXMLAttribute(const XERCES_CPP_NAMESPACE::DOMNode* node, diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuXmlProducer.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuXmlProducer.h index 8307640f45e1a..011fb1f4a9750 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuXmlProducer.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTriggerMenuXmlProducer.h @@ -43,7 +43,7 @@ class L1GtTriggerMenuXmlProducer : public edm::ESProducer L1GtTriggerMenuXmlProducer(const edm::ParameterSet&); /// destructor - ~L1GtTriggerMenuXmlProducer(); + ~L1GtTriggerMenuXmlProducer() override; /// public methods diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTscObjectKeysOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTscObjectKeysOnlineProd.h index ad941b7e5aec5..98bbce61b15f8 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTscObjectKeysOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtTscObjectKeysOnlineProd.h @@ -31,10 +31,10 @@ class L1GtTscObjectKeysOnlineProd : L1GtTscObjectKeysOnlineProd(const edm::ParameterSet&); /// destructor - ~L1GtTscObjectKeysOnlineProd(); + ~L1GtTscObjectKeysOnlineProd() override; /// public methods - virtual void fillObjectKeys(ReturnType pL1TriggerKey); + void fillObjectKeys(ReturnType pL1TriggerKey) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVhdlWriter.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVhdlWriter.h index b38666b431a69..a05c3188ee9fd 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVhdlWriter.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVhdlWriter.h @@ -44,9 +44,9 @@ class L1GtVhdlWriter : public edm::EDAnalyzer explicit L1GtVhdlWriter(const edm::ParameterSet&); /// destructor - virtual ~L1GtVhdlWriter(); + ~L1GtVhdlWriter() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVhdlWriterCore.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVhdlWriterCore.h index f4a4375ac868d..c260e238a0cbb 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVhdlWriterCore.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVhdlWriterCore.h @@ -48,7 +48,7 @@ class L1GtVhdlWriterCore : public L1GtVhdlDefinitions L1GtVhdlWriterCore(const std::string &templatesDirectory, const std::string &outputDirectory, const bool &debug); /// destructor - ~L1GtVhdlWriterCore(); + ~L1GtVhdlWriterCore() override; /// returns all condition of the same class. Conditions belong to one class if they are matching /// in type (Type1s, Type2s..) category (CondMuon, CondCalo,)and are defined for the same object (Mu, fwdJet..) diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVmeWriterCore.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVmeWriterCore.h index 8583244d186a7..6cdef20a39811 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVmeWriterCore.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtVmeWriterCore.h @@ -41,7 +41,7 @@ class L1GtVmeWriterCore : public L1GtXmlParserTags const std::string& vmeXmlFile); /// destructor - virtual ~L1GtVmeWriterCore(); + ~L1GtVmeWriterCore() override; void writeVME(const std::vector &conditionMap, const std::map& cond2intMap, const L1GtVhdlTemplateFile& header, const int spacesPerLevel=2); diff --git a/L1TriggerConfig/L1GtConfigProducers/src/L1GtTriggerMenuTester.cc b/L1TriggerConfig/L1GtConfigProducers/src/L1GtTriggerMenuTester.cc index c4e45f5f76dc7..0dd5bf510ebf2 100644 --- a/L1TriggerConfig/L1GtConfigProducers/src/L1GtTriggerMenuTester.cc +++ b/L1TriggerConfig/L1GtConfigProducers/src/L1GtTriggerMenuTester.cc @@ -436,7 +436,7 @@ void L1GtTriggerMenuTester::printTriggerGroup(const std::string& trigGroupName, const std::vector & hltPaths = m_hltPathsForL1AlgorithmTrigger.at(bitNumber); - if (hltPaths.size() < 1) { + if (hltPaths.empty()) { algoTriggerNotSeed.push_back(aAlias); seedsHlt = "Not used as seed by any !HLT path"; @@ -492,7 +492,7 @@ void L1GtTriggerMenuTester::printTriggerGroup(const std::string& trigGroupName, << "\n Algorithm triggers from " << trigGroupName << " not used as seeds by !HLT:" << std::endl; - if (algoTriggerNotSeed.size() != 0) { + if (!algoTriggerNotSeed.empty()) { for (std::vector::const_iterator strIter = algoTriggerNotSeed.begin(); strIter != algoTriggerNotSeed.end(); ++strIter) { diff --git a/L1TriggerConfig/L1GtConfigProducers/src/L1GtTriggerMenuXmlParser.cc b/L1TriggerConfig/L1GtConfigProducers/src/L1GtTriggerMenuXmlParser.cc index 56d0e22a4c8d1..a827ed0013674 100644 --- a/L1TriggerConfig/L1GtConfigProducers/src/L1GtTriggerMenuXmlParser.cc +++ b/L1TriggerConfig/L1GtConfigProducers/src/L1GtTriggerMenuXmlParser.cc @@ -38,7 +38,7 @@ // constructor L1GtTriggerMenuXmlParser::L1GtTriggerMenuXmlParser() : - L1GtXmlParserTags(), m_xmlErrHandler(0), m_triggerMenuInterface("NULL"), + L1GtXmlParserTags(), m_xmlErrHandler(nullptr), m_triggerMenuInterface("NULL"), m_triggerMenuName("NULL"), m_triggerMenuImplementation("NULL"), m_scaleDbKey("NULL") { @@ -267,13 +267,13 @@ void L1GtTriggerMenuXmlParser::parseXmlFile(const std::string& defXmlFile, m_triggerMenuName.erase(m_triggerMenuName.begin() + xmlPos, m_triggerMenuName.end()); // error handler for xml-parser - m_xmlErrHandler = 0; + m_xmlErrHandler = nullptr; XercesDOMParser* parser; LogTrace("L1GtTriggerMenuXmlParser") << "\nOpening XML-File: \n " << defXmlFile << std::endl; - if ((parser = initXML(defXmlFile)) != 0) { + if ((parser = initXML(defXmlFile)) != nullptr) { workXML(parser); } cleanupXML(parser); @@ -354,14 +354,14 @@ XERCES_CPP_NAMESPACE::XercesDOMParser* L1GtTriggerMenuXmlParser::initXML(const s << message << std::endl; XMLString::release(&message); - return 0; + return nullptr; } XercesDOMParser* parser = new XercesDOMParser(); parser->setValidationScheme(XercesDOMParser::Val_Always); parser->setDoNamespaces(false); // we got no dtd - if (m_xmlErrHandler == 0) { // redundant check + if (m_xmlErrHandler == nullptr) { // redundant check m_xmlErrHandler = (ErrorHandler*) new HandlerBase(); } else { @@ -383,8 +383,8 @@ XERCES_CPP_NAMESPACE::XercesDOMParser* L1GtTriggerMenuXmlParser::initXML(const s XMLString::release(&message); delete parser; delete m_xmlErrHandler; - m_xmlErrHandler = 0; - return 0; + m_xmlErrHandler = nullptr; + return nullptr; } catch (const DOMException &toCatch) { char *message = XMLString::transcode(toCatch.msg); @@ -396,8 +396,8 @@ XERCES_CPP_NAMESPACE::XercesDOMParser* L1GtTriggerMenuXmlParser::initXML(const s XMLString::release(&message); delete parser; delete m_xmlErrHandler; - m_xmlErrHandler = 0; - return 0; + m_xmlErrHandler = nullptr; + return nullptr; } catch (...) { @@ -407,8 +407,8 @@ XERCES_CPP_NAMESPACE::XercesDOMParser* L1GtTriggerMenuXmlParser::initXML(const s delete parser; delete m_xmlErrHandler; - m_xmlErrHandler = 0; - return 0; + m_xmlErrHandler = nullptr; + return nullptr; } return parser; @@ -421,11 +421,11 @@ XERCES_CPP_NAMESPACE::DOMNode* L1GtTriggerMenuXmlParser::findXMLChild( XERCES_CPP_NAMESPACE_USE - char* nodeName = 0; + char* nodeName = nullptr; DOMNode *n1 = startChild; - if (n1 == 0) { - return 0; + if (n1 == nullptr) { + return nullptr; } if ( !tagName.empty() ) { @@ -437,7 +437,7 @@ XERCES_CPP_NAMESPACE::DOMNode* L1GtTriggerMenuXmlParser::findXMLChild( XMLString::release(&nodeName); n1 = n1->getNextSibling(); - if (n1 == 0) { + if (n1 == nullptr) { break; } @@ -449,13 +449,13 @@ XERCES_CPP_NAMESPACE::DOMNode* L1GtTriggerMenuXmlParser::findXMLChild( while (XMLString::compareNIString(nodeName, tagName.c_str(), tagName.length())) { XMLString::release(&nodeName); n1 = n1->getNextSibling(); - if (n1 == 0) { + if (n1 == nullptr) { break; } nodeName = XMLString::transcode(n1->getNodeName()); } - if (n1 != 0 && rest != 0) { + if (n1 != nullptr && rest != nullptr) { *rest = std::string(nodeName).substr(tagName.length(), strlen(nodeName) - tagName.length()); } } @@ -463,12 +463,12 @@ XERCES_CPP_NAMESPACE::DOMNode* L1GtTriggerMenuXmlParser::findXMLChild( else { // empty string given while (n1->getNodeType() != DOMNode::ELEMENT_NODE) { n1 = n1->getNextSibling(); - if (n1 == 0) { + if (n1 == nullptr) { break; } } - if (n1 != 0 && rest != 0) { + if (n1 != nullptr && rest != nullptr) { nodeName = XMLString::transcode(n1->getNodeName()); *rest = std::string(nodeName); } @@ -498,7 +498,7 @@ std::string L1GtTriggerMenuXmlParser::getXMLAttribute(const XERCES_CPP_NAMESPACE // get attributes list DOMNamedNodeMap* attributes = node->getAttributes(); - if (attributes == 0) { + if (attributes == nullptr) { return ret; } @@ -507,7 +507,7 @@ std::string L1GtTriggerMenuXmlParser::getXMLAttribute(const XERCES_CPP_NAMESPACE DOMNode* attribNode = attributes->getNamedItem(attrName); XMLString::release(&attrName); - if (attribNode == 0) { + if (attribNode == nullptr) { return ret; } @@ -533,12 +533,12 @@ std::string L1GtTriggerMenuXmlParser::getXMLTextValue(XERCES_CPP_NAMESPACE::DOMN std::string ret; DOMNode* n1 = node; - if (n1 == 0) { + if (n1 == nullptr) { return ret; } const XMLCh* retXmlCh = n1->getTextContent(); - if (retXmlCh == 0) { + if (retXmlCh == nullptr) { return ret; } @@ -648,7 +648,7 @@ bool L1GtTriggerMenuXmlParser::hexString2UInt128(const std::string& hexString, bool L1GtTriggerMenuXmlParser::getXMLHexTextValue128(XERCES_CPP_NAMESPACE::DOMNode* node, boost::uint64_t& dstL, boost::uint64_t& dstH) { - if (node == 0) { + if (node == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "node == 0 in " << __PRETTY_FUNCTION__ << std::endl; @@ -716,7 +716,7 @@ bool L1GtTriggerMenuXmlParser::countConditionChildMaxBits(XERCES_CPP_NAMESPACE:: XERCES_CPP_NAMESPACE_USE // should never happen... - if (node == 0) { + if (node == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "node == 0 in " << __PRETTY_FUNCTION__ << std::endl; @@ -726,7 +726,7 @@ bool L1GtTriggerMenuXmlParser::countConditionChildMaxBits(XERCES_CPP_NAMESPACE:: DOMNode* n1 = findXMLChild(node->getFirstChild(), childName); - if (n1 == 0) { + if (n1 == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "Child of condition not found ( " << childName << ")" << std::endl; @@ -736,7 +736,7 @@ bool L1GtTriggerMenuXmlParser::countConditionChildMaxBits(XERCES_CPP_NAMESPACE:: DOMNode* n2 = findXMLChild(n1->getFirstChild(), m_xmlTagValue); - if (n2 == 0) { + if (n2 == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "No value tag found for child " << childName << " in " << __PRETTY_FUNCTION__ << std::endl; @@ -837,7 +837,7 @@ bool L1GtTriggerMenuXmlParser::getConditionChildValues(XERCES_CPP_NAMESPACE::DOM XERCES_CPP_NAMESPACE_USE - if (node == 0) { + if (node == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "node == 0 in " << __PRETTY_FUNCTION__ @@ -849,7 +849,7 @@ bool L1GtTriggerMenuXmlParser::getConditionChildValues(XERCES_CPP_NAMESPACE::DOM DOMNode* n1 = findXMLChild(node->getFirstChild(), childName); // if child not found - if (n1 == 0) { + if (n1 == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "Child of condition not found ( " << childName << ")" << std::endl; @@ -868,7 +868,7 @@ bool L1GtTriggerMenuXmlParser::getConditionChildValues(XERCES_CPP_NAMESPACE::DOM // n1 = findXMLChild(n1->getFirstChild(), m_xmlTagValue); for (unsigned int i = 0; i < num; i++) { - if (n1 == 0) { + if (n1 == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "Not enough values in condition child ( " << childName << ")" << std::endl; @@ -901,13 +901,13 @@ void L1GtTriggerMenuXmlParser::cleanupXML(XERCES_CPP_NAMESPACE::XercesDOMParser* XERCES_CPP_NAMESPACE_USE - if (parser != 0) { + if (parser != nullptr) { delete parser; } - if (m_xmlErrHandler != 0) { + if (m_xmlErrHandler != nullptr) { delete m_xmlErrHandler; - m_xmlErrHandler = 0; + m_xmlErrHandler = nullptr; } cms::concurrency::xercesTerminate(); @@ -934,7 +934,7 @@ bool L1GtTriggerMenuXmlParser::parseVmeXML(XERCES_CPP_NAMESPACE::XercesDOMParser DOMDocument* doc = parser->getDocument(); DOMNode* n1 = doc->getFirstChild(); - if (n1 == 0) { + if (n1 == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << "Error: Found no XML child" << std::endl; @@ -943,7 +943,7 @@ bool L1GtTriggerMenuXmlParser::parseVmeXML(XERCES_CPP_NAMESPACE::XercesDOMParser // find "vme"-tag n1 = findXMLChild(n1, m_xmlTagVme); - if (n1 == 0) { + if (n1 == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << "Error: No vme tag found." << std::endl; return false; @@ -956,7 +956,7 @@ bool L1GtTriggerMenuXmlParser::parseVmeXML(XERCES_CPP_NAMESPACE::XercesDOMParser while (chipCounter < m_numberConditionChips) { n1 = findXMLChild(n1, m_xmlTagChip, true); - if (n1 == 0) { + if (n1 == nullptr) { // just break if no more chips found break; } @@ -1025,7 +1025,7 @@ bool L1GtTriggerMenuXmlParser::insertConditionIntoMap(L1GtCondition& cond, const bool L1GtTriggerMenuXmlParser::insertAlgorithmIntoMap(const L1GtAlgorithm& alg) { std::string algName = alg.algoName(); - std::string algAlias = alg.algoAlias(); + const std::string& algAlias = alg.algoAlias(); //LogTrace("L1GtTriggerMenuXmlParser") //<< " Trying to insert algorithm \"" << algName << "\" in the algorithm map." ; @@ -1293,7 +1293,7 @@ int L1GtTriggerMenuXmlParser::getGEqFlag(XERCES_CPP_NAMESPACE::DOMNode* node, XERCES_CPP_NAMESPACE_USE - if (node == 0) { + if (node == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "node == 0 in " << __PRETTY_FUNCTION__ @@ -1306,9 +1306,9 @@ int L1GtTriggerMenuXmlParser::getGEqFlag(XERCES_CPP_NAMESPACE::DOMNode* node, DOMNode* n1 = node->getFirstChild(); n1 = findXMLChild(n1, nodeName); - if (n1 != 0) { + if (n1 != nullptr) { n1 = findXMLChild(n1->getFirstChild(), m_xmlTagGEq); - if (n1 == 0) { + if (n1 == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "No \"greater or equal\" tag found" << std::endl; @@ -1344,14 +1344,14 @@ bool L1GtTriggerMenuXmlParser::getMuonMipIsoBits(XERCES_CPP_NAMESPACE::DOMNode* XERCES_CPP_NAMESPACE_USE - if (node == 0) { + if (node == nullptr) { return false; } // find ptLowThreshold child DOMNode* n1 = findXMLChild(node->getFirstChild(), m_xmlTagPtLowThreshold); - if (n1 == 0) { + if (n1 == nullptr) { return false; } @@ -1360,14 +1360,14 @@ bool L1GtTriggerMenuXmlParser::getMuonMipIsoBits(XERCES_CPP_NAMESPACE::DOMNode* for (unsigned int i = 0; i < num; i++) { - if (n1 == 0) { + if (n1 == nullptr) { return false; } // MIP bit DOMNode* bitnode = findXMLChild(n1->getFirstChild(), m_xmlTagEnableMip); - if (bitnode == 0) { + if (bitnode == nullptr) { return true; } @@ -1385,7 +1385,7 @@ bool L1GtTriggerMenuXmlParser::getMuonMipIsoBits(XERCES_CPP_NAMESPACE::DOMNode* // enable iso bit bitnode = findXMLChild(n1->getFirstChild(), m_xmlTagEnableIso); - if (bitnode == 0) { + if (bitnode == nullptr) { return true; } @@ -1402,7 +1402,7 @@ bool L1GtTriggerMenuXmlParser::getMuonMipIsoBits(XERCES_CPP_NAMESPACE::DOMNode* // request iso bit bitnode = findXMLChild(n1->getFirstChild(), m_xmlTagRequestIso); - if (bitnode == 0) { + if (bitnode == nullptr) { return true; } @@ -2038,13 +2038,13 @@ bool L1GtTriggerMenuXmlParser::parseEnergySum( // get energyOverflow logical flag and fill into structure DOMNode* n1; - if ( (n1 = findXMLChild(node->getFirstChild(), m_xmlTagEtThreshold)) == 0) { + if ( (n1 = findXMLChild(node->getFirstChild(), m_xmlTagEtThreshold)) == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << " Could not get energyOverflow for EnergySum condition (" << name << ")" << std::endl; return false; } - if ( (n1 = findXMLChild(n1->getFirstChild(), m_xmlTagEnergyOverflow)) == 0) { + if ( (n1 = findXMLChild(n1->getFirstChild(), m_xmlTagEnergyOverflow)) == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << " Could not get energyOverflow for EnergySum condition (" << name << ")" << std::endl; @@ -3017,7 +3017,7 @@ bool L1GtTriggerMenuXmlParser::parseCorrelation( std::string valString; - if (node1 == 0) { + if (node1 == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << " Could not get deltaEta for correlation condition " << name << ". " << std::endl; @@ -3042,7 +3042,7 @@ bool L1GtTriggerMenuXmlParser::parseCorrelation( node1 = findXMLChild(node->getFirstChild(), m_xmlTagDeltaPhi); - if (node1 == 0) { + if (node1 == nullptr) { return false; edm::LogError("L1GtTriggerMenuXmlParser") << " Could not get deltaPhi for correlation condition " @@ -3121,14 +3121,14 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa // we assume that the first child is m_xmlTagDef because it was checked in workXML DOMNode* headerNode = n1->getFirstChild(); - if (headerNode == 0) { + if (headerNode == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << "Error: No child of <" << m_xmlTagDef << "> tag found." << std::endl; return false; } headerNode = findXMLChild(headerNode, m_xmlTagHeader); - if (headerNode == 0) { + if (headerNode == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" << m_xmlTagHeader << "> tag" << "\n - No header information." << std::endl; @@ -3139,7 +3139,7 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa // find menu interface name idNode = findXMLChild(idNode, m_xmlTagMenuInterface); - if (idNode == 0) { + if (idNode == nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" << m_xmlTagMenuInterface << "> tag" @@ -3168,7 +3168,7 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa idNode = headerNode->getFirstChild(); idNode = findXMLChild(idNode, m_xmlTagMenuInterfaceDate); - if (idNode == 0) { + if (idNode == nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" << m_xmlTagMenuInterfaceDate << "> tag" << "\n - No creation date." @@ -3183,7 +3183,7 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa idNode = headerNode->getFirstChild(); idNode = findXMLChild(idNode, m_xmlTagMenuInterfaceAuthor); - if (idNode == 0) { + if (idNode == nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" << m_xmlTagMenuInterfaceAuthor << "> tag" << "\n - No creation author." @@ -3198,7 +3198,7 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa idNode = headerNode->getFirstChild(); idNode = findXMLChild(idNode, m_xmlTagMenuInterfaceDescription); - if (idNode == 0) { + if (idNode == nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" << m_xmlTagMenuInterfaceDescription << "> tag" << "\n - No description." @@ -3213,7 +3213,7 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa idNode = headerNode->getFirstChild(); idNode = findXMLChild(idNode, m_xmlTagMenuDate); - if (idNode == 0) { + if (idNode == nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" << m_xmlTagMenuDate << "> tag" << "\n - No creation date." @@ -3228,7 +3228,7 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa idNode = headerNode->getFirstChild(); idNode = findXMLChild(idNode, m_xmlTagMenuAuthor); - if (idNode == 0) { + if (idNode == nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" << m_xmlTagMenuAuthor << "> tag" << "\n - No creation author." @@ -3243,7 +3243,7 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa idNode = headerNode->getFirstChild(); idNode = findXMLChild(idNode, m_xmlTagMenuDescription); - if (idNode == 0) { + if (idNode == nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" << m_xmlTagMenuDescription << "> tag" << "\n - No description." @@ -3259,7 +3259,7 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa idNode = headerNode->getFirstChild(); idNode = findXMLChild(idNode, m_xmlTagMenuAlgImpl); - if (idNode == 0) { + if (idNode == nullptr) { m_algorithmImplementation = ""; LogTrace("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" @@ -3276,7 +3276,7 @@ bool L1GtTriggerMenuXmlParser::parseId(XERCES_CPP_NAMESPACE::XercesDOMParser* pa idNode = headerNode->getFirstChild(); idNode = findXMLChild(idNode, m_xmlTagScaleDbKey); - if (idNode == 0) { + if (idNode == nullptr) { m_scaleDbKey = "NULL"; LogTrace("L1GtTriggerMenuXmlParser") << "\n Warning: Could not find <" @@ -3436,7 +3436,7 @@ bool L1GtTriggerMenuXmlParser::parseConditions(XERCES_CPP_NAMESPACE::XercesDOMPa // we assume that the first child is m_xmlTagDef because it was checked in workXML DOMNode* chipNode = n1->getFirstChild(); - if (chipNode == 0) { + if (chipNode == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << "Error: No child of <" << m_xmlTagDef << "> tag found." << std::endl; @@ -3448,7 +3448,7 @@ bool L1GtTriggerMenuXmlParser::parseConditions(XERCES_CPP_NAMESPACE::XercesDOMPa std::string chipName; // name of the actual chip chipNode = findXMLChild(chipNode, m_xmlTagChip, true, &chipName); - if (chipNode == 0) { + if (chipNode == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << " Error: Could not find <" << m_xmlTagChip << "> tag" << std::endl; @@ -3462,7 +3462,7 @@ bool L1GtTriggerMenuXmlParser::parseConditions(XERCES_CPP_NAMESPACE::XercesDOMPa // find conditions DOMNode* conditionsNode = chipNode->getFirstChild(); conditionsNode = findXMLChild(conditionsNode, m_xmlTagConditions); - if (conditionsNode == 0) { + if (conditionsNode == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << "Error: No <" << m_xmlTagConditions << "> child found in Chip " << chipName << std::endl; @@ -3481,7 +3481,7 @@ bool L1GtTriggerMenuXmlParser::parseConditions(XERCES_CPP_NAMESPACE::XercesDOMPa DOMNode* conditionNameNode = conditionsNode->getFirstChild(); std::string conditionNameNodeName; conditionNameNode = findXMLChild(conditionNameNode, "", true, &conditionNameNodeName); - while (conditionNameNode != 0) { + while (conditionNameNode != nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << "\n Found a condition with name: " << conditionNameNodeName @@ -3498,7 +3498,7 @@ bool L1GtTriggerMenuXmlParser::parseConditions(XERCES_CPP_NAMESPACE::XercesDOMPa chipNode = findXMLChild(chipNode->getNextSibling(), m_xmlTagChip, true, &chipName); chipNr++; - } while (chipNode != 0 && chipNr < m_numberConditionChips); + } while (chipNode != nullptr && chipNr < m_numberConditionChips); return true; } @@ -3519,7 +3519,7 @@ bool L1GtTriggerMenuXmlParser::workAlgorithm(XERCES_CPP_NAMESPACE::DOMNode* node XERCES_CPP_NAMESPACE_USE - if (node == 0) { + if (node == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << " Node is 0 in " << __PRETTY_FUNCTION__ << " can not parse the algorithm " << algName @@ -3559,7 +3559,7 @@ bool L1GtTriggerMenuXmlParser::workAlgorithm(XERCES_CPP_NAMESPACE::DOMNode* node int outputPin = 0; pinNode = node->getFirstChild(); - if ( (pinNode = findXMLChild(pinNode, m_xmlTagOutputPin) ) != 0) { + if ( (pinNode = findXMLChild(pinNode, m_xmlTagOutputPin) ) != nullptr) { pinString = getXMLAttribute(pinNode, m_xmlAttrNr); // convert pinString to integer @@ -3576,7 +3576,7 @@ bool L1GtTriggerMenuXmlParser::workAlgorithm(XERCES_CPP_NAMESPACE::DOMNode* node } - if (pinNode == 0) { + if (pinNode == nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << " Warning: No pin number found for algorithm: " << algName << std::endl; @@ -3642,7 +3642,7 @@ bool L1GtTriggerMenuXmlParser::parseAlgorithms(XERCES_CPP_NAMESPACE::XercesDOMPa DOMNode* node = doc->getFirstChild(); DOMNode* chipNode = node->getFirstChild(); - if (chipNode == 0) { + if (chipNode == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << " Error: No child found for " << m_xmlTagDef << std::endl; return false; @@ -3651,7 +3651,7 @@ bool L1GtTriggerMenuXmlParser::parseAlgorithms(XERCES_CPP_NAMESPACE::XercesDOMPa // find first chip std::string chipName; chipNode = findXMLChild(chipNode, m_xmlTagChip, true, &chipName); - if (chipNode == 0) { + if (chipNode == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << " Error: Could not find <" << m_xmlTagChip << std::endl; return false; @@ -3670,7 +3670,7 @@ bool L1GtTriggerMenuXmlParser::parseAlgorithms(XERCES_CPP_NAMESPACE::XercesDOMPa // find algorithms DOMNode* algNode = chipNode->getFirstChild(); algNode = findXMLChild(algNode, m_xmlTagAlgorithms); - if (algNode == 0) { + if (algNode == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << " Error: No <" << m_xmlTagAlgorithms << "> child found in chip " << chipName << std::endl; return false; @@ -3681,7 +3681,7 @@ bool L1GtTriggerMenuXmlParser::parseAlgorithms(XERCES_CPP_NAMESPACE::XercesDOMPa std::string algNameNodeName; algNameNode = findXMLChild(algNameNode, "", true, &algNameNodeName); - while (algNameNode != 0) { + while (algNameNode != nullptr) { //LogTrace("L1GtTriggerMenuXmlParser") //<< " Found an algorithm with name: " << algNameNodeName //<< std::endl; @@ -3698,7 +3698,7 @@ bool L1GtTriggerMenuXmlParser::parseAlgorithms(XERCES_CPP_NAMESPACE::XercesDOMPa chipNode = findXMLChild(chipNode->getNextSibling(), m_xmlTagChip, true, &chipName); chipNr++; - } while (chipNode != 0 && chipNr < m_numberConditionChips); + } while (chipNode != nullptr && chipNr < m_numberConditionChips); return true; } @@ -3718,7 +3718,7 @@ bool L1GtTriggerMenuXmlParser::workTechTrigger(XERCES_CPP_NAMESPACE::DOMNode* no XERCES_CPP_NAMESPACE_USE - if (node == 0) { + if (node == nullptr) { LogDebug("L1GtTriggerMenuXmlParser") << " Node is 0 in " << __PRETTY_FUNCTION__ << " can not parse the technical trigger " << algName @@ -3739,7 +3739,7 @@ bool L1GtTriggerMenuXmlParser::workTechTrigger(XERCES_CPP_NAMESPACE::DOMNode* no int outputPin = 0; pinNode = node->getFirstChild(); - if ( (pinNode = findXMLChild(pinNode, m_xmlTagOutputPin) ) != 0) { + if ( (pinNode = findXMLChild(pinNode, m_xmlTagOutputPin) ) != nullptr) { pinString = getXMLAttribute(pinNode, m_xmlAttrNr); // convert pinString to integer @@ -3756,7 +3756,7 @@ bool L1GtTriggerMenuXmlParser::workTechTrigger(XERCES_CPP_NAMESPACE::DOMNode* no } - if (pinNode == 0) { + if (pinNode == nullptr) { LogTrace("L1GtTriggerMenuXmlParser") << " Warning: No pin number found for technical trigger: " << algName << std::endl; @@ -3813,14 +3813,14 @@ bool L1GtTriggerMenuXmlParser::parseTechTriggers(XERCES_CPP_NAMESPACE::XercesDOM DOMNode* node = doc->getFirstChild(); DOMNode* algNode = node->getFirstChild(); - if (algNode == 0) { + if (algNode == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << " Error: No child found for " << m_xmlTagDef << std::endl; return false; } algNode = findXMLChild(algNode, m_xmlTagTechTriggers); - if (algNode == 0) { + if (algNode == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << " Error: No <" << m_xmlTagTechTriggers << "> child found." << std::endl; @@ -3832,7 +3832,7 @@ bool L1GtTriggerMenuXmlParser::parseTechTriggers(XERCES_CPP_NAMESPACE::XercesDOM std::string algNameNodeName; algNameNode = findXMLChild(algNameNode, "", true, &algNameNodeName); - while (algNameNode != 0) { + while (algNameNode != nullptr) { //LogTrace("L1GtTriggerMenuXmlParser") //<< " Found an technical trigger with name: " << algNameNodeName //<< std::endl; @@ -3865,7 +3865,7 @@ bool L1GtTriggerMenuXmlParser::workXML(XERCES_CPP_NAMESPACE::XercesDOMParser* pa DOMDocument* doc = parser->getDocument(); DOMNode* n1 = doc->getFirstChild(); - if (n1 == 0) { + if (n1 == nullptr) { edm::LogError("L1GtTriggerMenuXmlParser") << "Error: Found no XML child" << std::endl; diff --git a/L1TriggerConfig/L1GtConfigProducers/src/L1GtVhdlWriterCore.cc b/L1TriggerConfig/L1GtConfigProducers/src/L1GtVhdlWriterCore.cc index 686816ec10573..5c1d1ef87c557 100644 --- a/L1TriggerConfig/L1GtConfigProducers/src/L1GtVhdlWriterCore.cc +++ b/L1TriggerConfig/L1GtConfigProducers/src/L1GtVhdlWriterCore.cc @@ -851,7 +851,7 @@ bool L1GtVhdlWriterCore::processAlgorithmMap(std::vector< std::mapobjectType()).at(0)]; newExpr << "_" << condType2Str_[cond->condType()] << "("; @@ -1811,7 +1811,7 @@ void L1GtVhdlWriterCore::initializeDeltaConditions() std::vector caloObjectsCp = caloObjects_; - while (caloObjectsCp.size()>0) + while (!caloObjectsCp.empty()) { std::vector::iterator iter=caloObjectsCp.begin(); L1GtObject firstPartner = (*iter); diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScaleTester.h b/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScaleTester.h index c965c64d7ffc7..d81e7cc820b4b 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScaleTester.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScaleTester.h @@ -27,13 +27,13 @@ class L1CaloInputScaleTester : public edm::EDAnalyzer { public: explicit L1CaloInputScaleTester(const edm::ParameterSet&); - ~L1CaloInputScaleTester(); + ~L1CaloInputScaleTester() override; private: - virtual void beginJob() ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- }; diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScalesGenerator.h b/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScalesGenerator.h index 549bdc9682c46..2f7630e7e1bd6 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScalesGenerator.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScalesGenerator.h @@ -27,13 +27,13 @@ class L1CaloInputScalesGenerator : public edm::EDAnalyzer { public: explicit L1CaloInputScalesGenerator(const edm::ParameterSet&); - ~L1CaloInputScalesGenerator(); + ~L1CaloInputScalesGenerator() override; private: - virtual void beginJob() ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- }; diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScalesProducer.h b/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScalesProducer.h index 2a7ee012bddf3..b420cbda12829 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScalesProducer.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1CaloInputScalesProducer.h @@ -36,7 +36,7 @@ class L1CaloInputScalesProducer : public edm::ESProducer { public: L1CaloInputScalesProducer(const edm::ParameterSet&); - ~L1CaloInputScalesProducer(); + ~L1CaloInputScalesProducer() override; //typedef std::shared_ptr ReturnType; diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1MuGMTScalesProducer.h b/L1TriggerConfig/L1ScalesProducers/interface/L1MuGMTScalesProducer.h index 2241af5e2ab88..0ce9a2845dbeb 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1MuGMTScalesProducer.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1MuGMTScalesProducer.h @@ -33,7 +33,7 @@ class L1MuGMTScalesProducer : public edm::ESProducer { public: L1MuGMTScalesProducer(const edm::ParameterSet&); - ~L1MuGMTScalesProducer(); + ~L1MuGMTScalesProducer() override; std::unique_ptr produceL1MuGMTScales(const L1MuGMTScalesRcd&); diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1MuScalesTester.h b/L1TriggerConfig/L1ScalesProducers/interface/L1MuScalesTester.h index 80e659c44030e..baf0f3137e984 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1MuScalesTester.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1MuScalesTester.h @@ -18,10 +18,10 @@ class L1MuScale; class L1MuScalesTester : public edm::EDAnalyzer { public: explicit L1MuScalesTester(const edm::ParameterSet&); - ~L1MuScalesTester(); + ~L1MuScalesTester() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; void printScale(const L1MuScale*); diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerPtScaleOnlineProducer.h b/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerPtScaleOnlineProducer.h index 16306cbc0be26..9cf7c61784e10 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerPtScaleOnlineProducer.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerPtScaleOnlineProducer.h @@ -33,9 +33,9 @@ class L1MuTriggerPtScaleOnlineProducer : public L1ConfigOnlineProdBase { public: L1MuTriggerPtScaleOnlineProducer(const edm::ParameterSet&); - ~L1MuTriggerPtScaleOnlineProducer(); + ~L1MuTriggerPtScaleOnlineProducer() override; - std::shared_ptr newObject(const std::string& objectKey); + std::shared_ptr newObject(const std::string& objectKey) override; private: // ----------member data --------------------------- diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerPtScaleProducer.h b/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerPtScaleProducer.h index 71e34d5aa24a4..b5b36b56598e7 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerPtScaleProducer.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerPtScaleProducer.h @@ -33,7 +33,7 @@ class L1MuTriggerPtScaleProducer : public edm::ESProducer { public: L1MuTriggerPtScaleProducer(const edm::ParameterSet&); - ~L1MuTriggerPtScaleProducer(); + ~L1MuTriggerPtScaleProducer() override; std::unique_ptr produceL1MuTriggerPtScale(const L1MuTriggerPtScaleRcd&); diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerScalesOnlineProducer.h b/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerScalesOnlineProducer.h index aec23c5c1e99c..4ce07c09c4fe0 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerScalesOnlineProducer.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerScalesOnlineProducer.h @@ -35,10 +35,10 @@ class L1MuTriggerScalesOnlineProducer : public L1ConfigOnlineProdBase { public: L1MuTriggerScalesOnlineProducer(const edm::ParameterSet&); - ~L1MuTriggerScalesOnlineProducer(); + ~L1MuTriggerScalesOnlineProducer() override; - virtual std::shared_ptr newObject( - const std::string& objectKey ) ; + std::shared_ptr newObject( + const std::string& objectKey ) override ; private: // ----------member data --------------------------- diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerScalesProducer.h b/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerScalesProducer.h index 842988f39557e..89a336264c3f7 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerScalesProducer.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1MuTriggerScalesProducer.h @@ -33,7 +33,7 @@ class L1MuTriggerScalesProducer : public edm::ESProducer { public: L1MuTriggerScalesProducer(const edm::ParameterSet&); - ~L1MuTriggerScalesProducer(); + ~L1MuTriggerScalesProducer() override; std::unique_ptr produceL1MuTriggerScales(const L1MuTriggerScalesRcd&); diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTester.h b/L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTester.h index b42c608cf9359..3c73e3af65208 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTester.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTester.h @@ -31,10 +31,10 @@ class L1ScalesTester : public edm::EDAnalyzer { public: explicit L1ScalesTester(const edm::ParameterSet&); - ~L1ScalesTester(); + ~L1ScalesTester() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- }; diff --git a/L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTrivialProducer.h b/L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTrivialProducer.h index fc8738c708bca..00adc104dc727 100644 --- a/L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTrivialProducer.h +++ b/L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTrivialProducer.h @@ -44,7 +44,7 @@ class L1ScalesTrivialProducer : public edm::ESProducer { public: L1ScalesTrivialProducer(const edm::ParameterSet&); - ~L1ScalesTrivialProducer(); + ~L1ScalesTrivialProducer() override; std::unique_ptr produceEmScale(const L1EmEtScaleRcd&); std::unique_ptr produceJetScale(const L1JetEtScaleRcd&); diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1CaloEcalScaleConfigOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1CaloEcalScaleConfigOnlineProd.cc index d631c41970d1c..4eed321d1ad6e 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1CaloEcalScaleConfigOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1CaloEcalScaleConfigOnlineProd.cc @@ -39,9 +39,9 @@ class L1CaloEcalScaleConfigOnlineProd : public L1ConfigOnlineProdBase< L1CaloEcalScaleRcd, L1CaloEcalScale > { public: L1CaloEcalScaleConfigOnlineProd(const edm::ParameterSet&); - ~L1CaloEcalScaleConfigOnlineProd(); + ~L1CaloEcalScaleConfigOnlineProd() override; - virtual std::shared_ptr< L1CaloEcalScale > newObject( + std::shared_ptr< L1CaloEcalScale > newObject( const std::string& objectKey ) override ; @@ -99,7 +99,7 @@ L1CaloEcalScaleConfigOnlineProd::newObject( const std::string& objectKey ) if(objectKey == "NULL" || objectKey == "") // return default blank ecal scale return std::shared_ptr< L1CaloEcalScale >( ecalScale ); if(objectKey == "IDENTITY"){ // return identity ecal scale - ecalScale = 0; + ecalScale = nullptr; ecalScale = new L1CaloEcalScale(1); return std::shared_ptr< L1CaloEcalScale >( ecalScale); } diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc index bb5c94258b5d1..6240c8aa4334f 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc @@ -41,11 +41,11 @@ class L1CaloHcalScaleConfigOnlineProd : public L1ConfigOnlineProdBase< L1CaloHcalScaleRcd, L1CaloHcalScale > { public: L1CaloHcalScaleConfigOnlineProd(const edm::ParameterSet& iConfig); - ~L1CaloHcalScaleConfigOnlineProd(); + ~L1CaloHcalScaleConfigOnlineProd() override; std::shared_ptr< L1CaloHcalScale > produce(const L1CaloHcalScaleRcd& iRecord) override ; - virtual std::shared_ptr< L1CaloHcalScale > newObject( + std::shared_ptr< L1CaloHcalScale > newObject( const std::string& objectKey ) override ; private: @@ -90,7 +90,7 @@ L1CaloHcalScaleConfigOnlineProd::~L1CaloHcalScaleConfigOnlineProd() // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) - if(caloTPG != 0) + if(caloTPG != nullptr) delete caloTPG; } diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1EmEtScaleOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1EmEtScaleOnlineProd.cc index 4d2ea473e4517..da5c557c423fd 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1EmEtScaleOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1EmEtScaleOnlineProd.cc @@ -34,9 +34,9 @@ class L1EmEtScaleOnlineProd : public L1ConfigOnlineProdBase< L1EmEtScaleRcd, L1CaloEtScale > { public: L1EmEtScaleOnlineProd(const edm::ParameterSet&); - ~L1EmEtScaleOnlineProd(); + ~L1EmEtScaleOnlineProd() override; - virtual std::shared_ptr< L1CaloEtScale > newObject( + std::shared_ptr< L1CaloEtScale > newObject( const std::string& objectKey ) override ; diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1HfRingEtScaleOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1HfRingEtScaleOnlineProd.cc index a8ab8ac97cb5d..2a535c8704257 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1HfRingEtScaleOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1HfRingEtScaleOnlineProd.cc @@ -34,9 +34,9 @@ class L1HfRingEtScaleOnlineProd : public L1ConfigOnlineProdBase< L1HfRingEtScaleRcd, L1CaloEtScale > { public: L1HfRingEtScaleOnlineProd(const edm::ParameterSet&); - ~L1HfRingEtScaleOnlineProd(); + ~L1HfRingEtScaleOnlineProd() override; - virtual std::shared_ptr< L1CaloEtScale > newObject( + std::shared_ptr< L1CaloEtScale > newObject( const std::string& objectKey ) override ; diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1HtMissScaleOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1HtMissScaleOnlineProd.cc index a4b00c8961202..d2bebe5dbbda8 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1HtMissScaleOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1HtMissScaleOnlineProd.cc @@ -34,9 +34,9 @@ class L1HtMissScaleOnlineProd : public L1ConfigOnlineProdBase< L1HtMissScaleRcd, L1CaloEtScale > { public: L1HtMissScaleOnlineProd(const edm::ParameterSet&); - ~L1HtMissScaleOnlineProd(); + ~L1HtMissScaleOnlineProd() override; - virtual std::shared_ptr< L1CaloEtScale > newObject( + std::shared_ptr< L1CaloEtScale > newObject( const std::string& objectKey ) override ; diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1JetEtScaleOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1JetEtScaleOnlineProd.cc index 40bc6fd5c916d..8b5712ff09f8b 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1JetEtScaleOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1JetEtScaleOnlineProd.cc @@ -34,9 +34,9 @@ class L1JetEtScaleOnlineProd : public L1ConfigOnlineProdBase< L1JetEtScaleRcd, L1CaloEtScale > { public: L1JetEtScaleOnlineProd(const edm::ParameterSet&); - ~L1JetEtScaleOnlineProd(); + ~L1JetEtScaleOnlineProd() override; - virtual std::shared_ptr< L1CaloEtScale > newObject( + std::shared_ptr< L1CaloEtScale > newObject( const std::string& objectKey ) override ; diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc index 9ce13e0c0cee9..49199b12a888e 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc @@ -29,9 +29,9 @@ class L1MuTriggerScaleKeysOnlineProd : public L1ObjectKeysOnlineProdBase { } } - ~L1MuTriggerScaleKeysOnlineProd() {} + ~L1MuTriggerScaleKeysOnlineProd() override {} - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: std::vector m_objectTypes; diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TCaloParamsObjectKeysOnlineProd.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TCaloParamsObjectKeysOnlineProd.cc index 685dc653f716f..0be123dadcff8 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TCaloParamsObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TCaloParamsObjectKeysOnlineProd.cc @@ -6,10 +6,10 @@ class L1TCaloParamsObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBaseExt { private: public: - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; L1TCaloParamsObjectKeysOnlineProd(const edm::ParameterSet&); - ~L1TCaloParamsObjectKeysOnlineProd(void){} + ~L1TCaloParamsObjectKeysOnlineProd(void) override{} }; L1TCaloParamsObjectKeysOnlineProd::L1TCaloParamsObjectKeysOnlineProd(const edm::ParameterSet& iConfig) diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TGlobalPrescalesVetosObjectKeysOnlineProd.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TGlobalPrescalesVetosObjectKeysOnlineProd.cc index 2002a7a3532e5..c1305f3fa624f 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TGlobalPrescalesVetosObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TGlobalPrescalesVetosObjectKeysOnlineProd.cc @@ -6,10 +6,10 @@ class L1TGlobalPrescalesVetosObjectKeysOnlineProd : public L1ObjectKeysOnlinePro private: public: - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; L1TGlobalPrescalesVetosObjectKeysOnlineProd(const edm::ParameterSet&); - ~L1TGlobalPrescalesVetosObjectKeysOnlineProd(void){} + ~L1TGlobalPrescalesVetosObjectKeysOnlineProd(void) override{} }; L1TGlobalPrescalesVetosObjectKeysOnlineProd::L1TGlobalPrescalesVetosObjectKeysOnlineProd(const edm::ParameterSet& iConfig) diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonBarrelObjectKeysOnlineProd.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonBarrelObjectKeysOnlineProd.cc index 5aab95ba30eaa..673ac46773355 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonBarrelObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonBarrelObjectKeysOnlineProd.cc @@ -6,10 +6,10 @@ class L1TMuonBarrelObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBaseExt { private: public: - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; L1TMuonBarrelObjectKeysOnlineProd(const edm::ParameterSet&); - ~L1TMuonBarrelObjectKeysOnlineProd(void){} + ~L1TMuonBarrelObjectKeysOnlineProd(void) override{} }; L1TMuonBarrelObjectKeysOnlineProd::L1TMuonBarrelObjectKeysOnlineProd(const edm::ParameterSet& iConfig) diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonGlobalObjectKeysOnlineProd.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonGlobalObjectKeysOnlineProd.cc index 23c2b9b7f5943..77245fda891dd 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonGlobalObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonGlobalObjectKeysOnlineProd.cc @@ -6,10 +6,10 @@ class L1TMuonGlobalObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBaseExt { private: public: - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; L1TMuonGlobalObjectKeysOnlineProd(const edm::ParameterSet&); - ~L1TMuonGlobalObjectKeysOnlineProd(void){} + ~L1TMuonGlobalObjectKeysOnlineProd(void) override{} }; L1TMuonGlobalObjectKeysOnlineProd::L1TMuonGlobalObjectKeysOnlineProd(const edm::ParameterSet& iConfig) diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonGlobalParamsOnlineProd.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonGlobalParamsOnlineProd.cc index 68a98d792a731..f06d843a8e7d5 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonGlobalParamsOnlineProd.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonGlobalParamsOnlineProd.cc @@ -15,10 +15,10 @@ class L1TMuonGlobalParamsOnlineProd : public L1ConfigOnlineProdBaseExt { private: public: - virtual std::shared_ptr newObject(const std::string& objectKey, const L1TMuonGlobalParamsO2ORcd &record) override ; + std::shared_ptr newObject(const std::string& objectKey, const L1TMuonGlobalParamsO2ORcd &record) override ; L1TMuonGlobalParamsOnlineProd(const edm::ParameterSet&); - ~L1TMuonGlobalParamsOnlineProd(void){} + ~L1TMuonGlobalParamsOnlineProd(void) override{} }; L1TMuonGlobalParamsOnlineProd::L1TMuonGlobalParamsOnlineProd(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBaseExt(iConfig) {} diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapObjectKeysOnlineProd.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapObjectKeysOnlineProd.cc index e9ef1a49e0ae9..63535e4397e01 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapObjectKeysOnlineProd.cc @@ -6,10 +6,10 @@ class L1TMuonOverlapObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBaseExt private: public: - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; L1TMuonOverlapObjectKeysOnlineProd(const edm::ParameterSet&); - ~L1TMuonOverlapObjectKeysOnlineProd(void){} + ~L1TMuonOverlapObjectKeysOnlineProd(void) override{} }; L1TMuonOverlapObjectKeysOnlineProd::L1TMuonOverlapObjectKeysOnlineProd(const edm::ParameterSet& iConfig) diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapParamsOnlineProd.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapParamsOnlineProd.cc index 8e72d41aebd8c..c4b8a9570b452 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapParamsOnlineProd.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapParamsOnlineProd.cc @@ -10,10 +10,10 @@ class L1TMuonOverlapParamsOnlineProd : public L1ConfigOnlineProdBaseExt { private: public: - virtual std::shared_ptr newObject(const std::string& objectKey, const L1TMuonOverlapParamsO2ORcd& record) override ; + std::shared_ptr newObject(const std::string& objectKey, const L1TMuonOverlapParamsO2ORcd& record) override ; L1TMuonOverlapParamsOnlineProd(const edm::ParameterSet&); - ~L1TMuonOverlapParamsOnlineProd(void){} + ~L1TMuonOverlapParamsOnlineProd(void) override{} }; L1TMuonOverlapParamsOnlineProd::L1TMuonOverlapParamsOnlineProd(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBaseExt(iConfig) {} diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapParamsOnlineProxy.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapParamsOnlineProxy.cc index e0d25db56c308..938f6981a3d6a 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapParamsOnlineProxy.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TMuonOverlapParamsOnlineProxy.cc @@ -14,7 +14,7 @@ class L1TMuonOverlapParamsOnlineProxy : public edm::ESProducer { std::shared_ptr produce(const L1TMuonOverlapParamsO2ORcd& record); L1TMuonOverlapParamsOnlineProxy(const edm::ParameterSet&); - ~L1TMuonOverlapParamsOnlineProxy(void){} + ~L1TMuonOverlapParamsOnlineProxy(void) override{} }; L1TMuonOverlapParamsOnlineProxy::L1TMuonOverlapParamsOnlineProxy(const edm::ParameterSet& iConfig) : edm::ESProducer() { diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TUtmTriggerMenuObjectKeysOnlineProd.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TUtmTriggerMenuObjectKeysOnlineProd.cc index cd08d609b5b8d..9453e28e45b94 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TUtmTriggerMenuObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TUtmTriggerMenuObjectKeysOnlineProd.cc @@ -6,10 +6,10 @@ class L1TUtmTriggerMenuObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBaseE private: public: - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; L1TUtmTriggerMenuObjectKeysOnlineProd(const edm::ParameterSet&); - ~L1TUtmTriggerMenuObjectKeysOnlineProd(void){} + ~L1TUtmTriggerMenuObjectKeysOnlineProd(void) override{} }; L1TUtmTriggerMenuObjectKeysOnlineProd::L1TUtmTriggerMenuObjectKeysOnlineProd(const edm::ParameterSet& iConfig) diff --git a/L1TriggerConfig/L1TConfigProducers/src/L1TUtmTriggerMenuOnlineProd.cc b/L1TriggerConfig/L1TConfigProducers/src/L1TUtmTriggerMenuOnlineProd.cc index a1d967f1efc6a..89c83d6b4e463 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/L1TUtmTriggerMenuOnlineProd.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/L1TUtmTriggerMenuOnlineProd.cc @@ -20,10 +20,10 @@ class L1TUtmTriggerMenuOnlineProd : public L1ConfigOnlineProdBaseExt { private: public: - virtual std::shared_ptr newObject(const std::string& objectKey, const L1TUtmTriggerMenuO2ORcd& record) override ; + std::shared_ptr newObject(const std::string& objectKey, const L1TUtmTriggerMenuO2ORcd& record) override ; L1TUtmTriggerMenuOnlineProd(const edm::ParameterSet&); - ~L1TUtmTriggerMenuOnlineProd(void){} + ~L1TUtmTriggerMenuOnlineProd(void) override{} }; L1TUtmTriggerMenuOnlineProd::L1TUtmTriggerMenuOnlineProd(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBaseExt(iConfig) {} diff --git a/L1TriggerConfig/L1TConfigProducers/src/OnlineDBqueryHelper.cc b/L1TriggerConfig/L1TConfigProducers/src/OnlineDBqueryHelper.cc index a653602c4e68d..5f86bf515843f 100644 --- a/L1TriggerConfig/L1TConfigProducers/src/OnlineDBqueryHelper.cc +++ b/L1TriggerConfig/L1TConfigProducers/src/OnlineDBqueryHelper.cc @@ -6,7 +6,7 @@ std::map l1t::OnlineDBqueryHelper::fetch( const std::string &key, l1t::OMDSReader &m_omdsReader) { - if( queryColumns.size() == 0 || table.length() == 0 ) + if( queryColumns.empty() || table.length() == 0 ) return std::map(); l1t::OMDSReader::QueryResults queryResult = diff --git a/L1TriggerConfig/RCTConfigProducers/src/L1RCTChannelMaskOnlineProd.cc b/L1TriggerConfig/RCTConfigProducers/src/L1RCTChannelMaskOnlineProd.cc index 83988b76b77c4..d7fe06113d4c2 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/L1RCTChannelMaskOnlineProd.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/L1RCTChannelMaskOnlineProd.cc @@ -39,9 +39,9 @@ class L1RCTChannelMaskOnlineProd : public: L1RCTChannelMaskOnlineProd(const edm::ParameterSet& iConfig) : L1ConfigOnlineProdBase< L1RCTChannelMaskRcd, L1RCTChannelMask > (iConfig) {} - ~L1RCTChannelMaskOnlineProd() {} + ~L1RCTChannelMaskOnlineProd() override {} - virtual std::shared_ptr< L1RCTChannelMask > newObject(const std::string& objectKey ) override ; + std::shared_ptr< L1RCTChannelMask > newObject(const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/RCTConfigProducers/src/L1RCTChannelMaskTester.cc b/L1TriggerConfig/RCTConfigProducers/src/L1RCTChannelMaskTester.cc index 49b142b65e283..5d2d99ee83304 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/L1RCTChannelMaskTester.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/L1RCTChannelMaskTester.cc @@ -43,9 +43,9 @@ class L1RCTChannelMaskTester: public edm::EDAnalyzer { public: explicit L1RCTChannelMaskTester(const edm::ParameterSet&) { } - virtual ~L1RCTChannelMaskTester() { + ~L1RCTChannelMaskTester() override { } - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; }; @@ -63,7 +63,7 @@ void L1RCTChannelMaskTester::analyze(const edm::Event& iEvent, edm::eventsetup::EventSetupRecordKey::TypeTag::findType( "L1RCTNoisyChannelMaskRcd")); - if (evSetup.find(recordKey) == 0) { + if (evSetup.find(recordKey) == nullptr) { //record not found std::cout << "\nRecord \"" << "L1RCTNoisyChannelMaskRcd" << "\" does not exist.\n" << std::endl; diff --git a/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc b/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc index 78bc93c41e5cc..e795de22eeaef 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc @@ -55,7 +55,7 @@ class L1RCTOmdsFedVectorProducer : public edm::ESProducer { public: L1RCTOmdsFedVectorProducer(const edm::ParameterSet&); - ~L1RCTOmdsFedVectorProducer(); + ~L1RCTOmdsFedVectorProducer() override; typedef std::shared_ptr ReturnType; diff --git a/L1TriggerConfig/RCTConfigProducers/src/L1RCTParametersOnlineProd.cc b/L1TriggerConfig/RCTConfigProducers/src/L1RCTParametersOnlineProd.cc index 8f77fd1c21d0b..9061e59bd452d 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/L1RCTParametersOnlineProd.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/L1RCTParametersOnlineProd.cc @@ -36,9 +36,9 @@ class L1RCTParametersOnlineProd : public L1ConfigOnlineProdBase< L1RCTParametersRcd, L1RCTParameters > { public: L1RCTParametersOnlineProd(const edm::ParameterSet&); - ~L1RCTParametersOnlineProd(); + ~L1RCTParametersOnlineProd() override; - virtual std::shared_ptr< L1RCTParameters > newObject( + std::shared_ptr< L1RCTParameters > newObject( const std::string& objectKey ) override ; void fillScaleFactors( diff --git a/L1TriggerConfig/RCTConfigProducers/src/L1RCTParametersTester.cc b/L1TriggerConfig/RCTConfigProducers/src/L1RCTParametersTester.cc index e77b4a11904c3..79f517ea3515a 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/L1RCTParametersTester.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/L1RCTParametersTester.cc @@ -45,8 +45,8 @@ using std::endl; class L1RCTParametersTester : public edm::EDAnalyzer { public: explicit L1RCTParametersTester(const edm::ParameterSet&) {} - virtual ~L1RCTParametersTester() {} - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~L1RCTParametersTester() override {} + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/L1TriggerConfig/RCTConfigProducers/src/L1RCT_RSKeysOnlineProd.cc b/L1TriggerConfig/RCTConfigProducers/src/L1RCT_RSKeysOnlineProd.cc index 6a096baa558ac..8f640e5e63bb1 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/L1RCT_RSKeysOnlineProd.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/L1RCT_RSKeysOnlineProd.cc @@ -23,7 +23,7 @@ #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h" #include #include "CoralBase/TimeStamp.h" -#include +#include #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -34,9 +34,9 @@ class L1RCT_RSKeysOnlineProd : public L1ObjectKeysOnlineProdBase { public: L1RCT_RSKeysOnlineProd(const edm::ParameterSet& iConfig); - ~L1RCT_RSKeysOnlineProd() {} + ~L1RCT_RSKeysOnlineProd() override {} - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: // ----------member data --------------------------- bool m_enableL1RCTChannelMask; diff --git a/L1TriggerConfig/RCTConfigProducers/src/RCTConfigProducers.cc b/L1TriggerConfig/RCTConfigProducers/src/RCTConfigProducers.cc index 12b6e05735a09..70780e03c1668 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/RCTConfigProducers.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/RCTConfigProducers.cc @@ -40,7 +40,7 @@ class RCTConfigProducers : public edm::ESProducer { public: RCTConfigProducers(const edm::ParameterSet&); - ~RCTConfigProducers(); + ~RCTConfigProducers() override; //typedef std::shared_ptr ReturnType; //typedef edm::ESProducts< std::shared_ptr, std::shared_ptr > ReturnType; diff --git a/L1TriggerConfig/RCTConfigProducers/src/RCTObjectKeysOnlineProd.cc b/L1TriggerConfig/RCTConfigProducers/src/RCTObjectKeysOnlineProd.cc index 4619d40961942..22d45a0b62d7a 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/RCTObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/RCTObjectKeysOnlineProd.cc @@ -32,9 +32,9 @@ class RCTObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase { public: RCTObjectKeysOnlineProd(const edm::ParameterSet&); - ~RCTObjectKeysOnlineProd(); + ~RCTObjectKeysOnlineProd() override; - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: // ----------member data --------------------------- }; diff --git a/L1TriggerConfig/RPCTriggerConfig/src/L1RPCBxOrConfigOnlineProd.cc b/L1TriggerConfig/RPCTriggerConfig/src/L1RPCBxOrConfigOnlineProd.cc index b1f6da2575d37..4c11253946cd2 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/L1RPCBxOrConfigOnlineProd.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/L1RPCBxOrConfigOnlineProd.cc @@ -29,9 +29,9 @@ class L1RPCBxOrConfigOnlineProd : public L1ConfigOnlineProdBase< L1RPCBxOrConfig L1RPCBxOrConfig > { public: L1RPCBxOrConfigOnlineProd(const edm::ParameterSet&); - ~L1RPCBxOrConfigOnlineProd(); + ~L1RPCBxOrConfigOnlineProd() override; - virtual std::shared_ptr< L1RPCBxOrConfig > newObject( + std::shared_ptr< L1RPCBxOrConfig > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/RPCTriggerConfig/src/L1RPCConeDefinitionOnlineProd.cc b/L1TriggerConfig/RPCTriggerConfig/src/L1RPCConeDefinitionOnlineProd.cc index 0831bba54f20f..8ba22665484cf 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/L1RPCConeDefinitionOnlineProd.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/L1RPCConeDefinitionOnlineProd.cc @@ -36,9 +36,9 @@ class L1RPCConeDefinitionOnlineProd : public L1ConfigOnlineProdBase< L1RPCConeDefinitionRcd, L1RPCConeDefinition > { public: L1RPCConeDefinitionOnlineProd(const edm::ParameterSet&); - ~L1RPCConeDefinitionOnlineProd(); + ~L1RPCConeDefinitionOnlineProd() override; - virtual std::shared_ptr< L1RPCConeDefinition > newObject( + std::shared_ptr< L1RPCConeDefinition > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/RPCTriggerConfig/src/L1RPCConeDefinitionProducer.cc b/L1TriggerConfig/RPCTriggerConfig/src/L1RPCConeDefinitionProducer.cc index 19e84e0b59d56..b2e26486f7a70 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/L1RPCConeDefinitionProducer.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/L1RPCConeDefinitionProducer.cc @@ -37,7 +37,7 @@ class L1RPCConeDefinitionProducer : public edm::ESProducer { public: L1RPCConeDefinitionProducer(const edm::ParameterSet&); - ~L1RPCConeDefinitionProducer(); + ~L1RPCConeDefinitionProducer() override; typedef std::shared_ptr ReturnType; diff --git a/L1TriggerConfig/RPCTriggerConfig/src/L1RPCHsbConfigOnlineProd.cc b/L1TriggerConfig/RPCTriggerConfig/src/L1RPCHsbConfigOnlineProd.cc index d2d3aa697d705..089c8b488273b 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/L1RPCHsbConfigOnlineProd.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/L1RPCHsbConfigOnlineProd.cc @@ -29,9 +29,9 @@ class L1RPCHsbConfigOnlineProd : public L1ConfigOnlineProdBase< L1RPCHsbConfigRc L1RPCHsbConfig > { public: L1RPCHsbConfigOnlineProd(const edm::ParameterSet&); - ~L1RPCHsbConfigOnlineProd(); + ~L1RPCHsbConfigOnlineProd() override; - virtual std::shared_ptr< L1RPCHsbConfig > newObject( + std::shared_ptr< L1RPCHsbConfig > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/RPCTriggerConfig/src/RPCConfigOnlineProd.cc b/L1TriggerConfig/RPCTriggerConfig/src/RPCConfigOnlineProd.cc index b770321a46c48..f34903cbac226 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/RPCConfigOnlineProd.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/RPCConfigOnlineProd.cc @@ -36,9 +36,9 @@ class RPCConfigOnlineProd : public L1ConfigOnlineProdBase< L1RPCConfigRcd, L1RPCConfig > { public: RPCConfigOnlineProd(const edm::ParameterSet&); - ~RPCConfigOnlineProd(); + ~RPCConfigOnlineProd() override; - virtual std::shared_ptr< L1RPCConfig > newObject( + std::shared_ptr< L1RPCConfig > newObject( const std::string& objectKey ) override ; private: diff --git a/L1TriggerConfig/RPCTriggerConfig/src/RPCObjectKeysOnlineProd.cc b/L1TriggerConfig/RPCTriggerConfig/src/RPCObjectKeysOnlineProd.cc index 6cbaa05fc95dc..b8ba19654143d 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/RPCObjectKeysOnlineProd.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/RPCObjectKeysOnlineProd.cc @@ -31,9 +31,9 @@ class RPCObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase { public: RPCObjectKeysOnlineProd(const edm::ParameterSet&); - ~RPCObjectKeysOnlineProd(); + ~RPCObjectKeysOnlineProd() override; - virtual void fillObjectKeys( ReturnType pL1TriggerKey ) override ; + void fillObjectKeys( ReturnType pL1TriggerKey ) override ; private: // ----------member data --------------------------- bool m_enableL1RPCConfig ; diff --git a/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerBxOrConfig.cc b/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerBxOrConfig.cc index 86f98f6a82e37..2fac45ff686fa 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerBxOrConfig.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerBxOrConfig.cc @@ -38,7 +38,7 @@ class RPCTriggerBxOrConfig : public edm::ESProducer { public: RPCTriggerBxOrConfig(const edm::ParameterSet&); - ~RPCTriggerBxOrConfig(); + ~RPCTriggerBxOrConfig() override; typedef std::unique_ptr ReturnType; diff --git a/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerConfig.cc b/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerConfig.cc index 8b8a315ceb39b..050bf371077c6 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerConfig.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerConfig.cc @@ -42,7 +42,7 @@ class RPCTriggerConfig : public edm::ESProducer { public: RPCTriggerConfig(const edm::ParameterSet&); - ~RPCTriggerConfig(); + ~RPCTriggerConfig() override; typedef std::unique_ptr ReturnType; diff --git a/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerHsbConfig.cc b/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerHsbConfig.cc index d256f45f2362e..636f830c03a8f 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerHsbConfig.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerHsbConfig.cc @@ -38,7 +38,7 @@ class RPCTriggerHsbConfig : public edm::ESProducer { public: RPCTriggerHsbConfig(const edm::ParameterSet&); - ~RPCTriggerHsbConfig(); + ~RPCTriggerHsbConfig() override; typedef std::unique_ptr ReturnType; diff --git a/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerHwConfig.cc b/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerHwConfig.cc index 64432819c80aa..0b8bc47c1106d 100644 --- a/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerHwConfig.cc +++ b/L1TriggerConfig/RPCTriggerConfig/src/RPCTriggerHwConfig.cc @@ -38,7 +38,7 @@ class RPCTriggerHwConfig : public edm::ESProducer { public: RPCTriggerHwConfig(const edm::ParameterSet&); - ~RPCTriggerHwConfig(); + ~RPCTriggerHwConfig() override; typedef std::unique_ptr ReturnType; diff --git a/L1TriggerConfig/Utilities/src/L1KeyListWriter.cc b/L1TriggerConfig/Utilities/src/L1KeyListWriter.cc index a8bf2a294d77a..2997f17419c01 100644 --- a/L1TriggerConfig/Utilities/src/L1KeyListWriter.cc +++ b/L1TriggerConfig/Utilities/src/L1KeyListWriter.cc @@ -17,10 +17,10 @@ class L1KeyListWriter : public edm::EDAnalyzer { public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1KeyListWriter(const edm::ParameterSet&) : edm::EDAnalyzer(){} - virtual ~L1KeyListWriter(void){} + ~L1KeyListWriter(void) override{} }; void L1KeyListWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1KeyWriter.cc b/L1TriggerConfig/Utilities/src/L1KeyWriter.cc index d80f944acd2be..0ae14336b2a5b 100644 --- a/L1TriggerConfig/Utilities/src/L1KeyWriter.cc +++ b/L1TriggerConfig/Utilities/src/L1KeyWriter.cc @@ -17,10 +17,10 @@ class L1KeyWriter : public edm::EDAnalyzer { public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1KeyWriter(const edm::ParameterSet&) : edm::EDAnalyzer(){} - virtual ~L1KeyWriter(void){} + ~L1KeyWriter(void) override{} }; void L1KeyWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1MenuReader.cc b/L1TriggerConfig/Utilities/src/L1MenuReader.cc index 5ca448b95690a..9afd09df1d45c 100644 --- a/L1TriggerConfig/Utilities/src/L1MenuReader.cc +++ b/L1TriggerConfig/Utilities/src/L1MenuReader.cc @@ -20,10 +20,10 @@ using namespace std; class L1MenuReader : public edm::EDAnalyzer { public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1MenuReader(const edm::ParameterSet&) : edm::EDAnalyzer(){} - virtual ~L1MenuReader(void){} + ~L1MenuReader(void) override{} }; void L1MenuReader::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1MenuWriter.cc b/L1TriggerConfig/Utilities/src/L1MenuWriter.cc index 17c5da9a79973..d385c1a329dff 100644 --- a/L1TriggerConfig/Utilities/src/L1MenuWriter.cc +++ b/L1TriggerConfig/Utilities/src/L1MenuWriter.cc @@ -20,12 +20,12 @@ class L1MenuWriter : public edm::EDAnalyzer { private: bool isO2Opayload; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1MenuWriter(const edm::ParameterSet& pset) : edm::EDAnalyzer(){ isO2Opayload = pset.getUntrackedParameter("isO2Opayload", false); } - virtual ~L1MenuWriter(void){} + ~L1MenuWriter(void) override{} }; void L1MenuWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1TCaloParamsUpdater.cc b/L1TriggerConfig/Utilities/src/L1TCaloParamsUpdater.cc index fbeb0b00e46a1..ffc6e53aae667 100644 --- a/L1TriggerConfig/Utilities/src/L1TCaloParamsUpdater.cc +++ b/L1TriggerConfig/Utilities/src/L1TCaloParamsUpdater.cc @@ -18,10 +18,10 @@ class L1TCaloParamsUpdater : public edm::EDAnalyzer { public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TCaloParamsUpdater(const edm::ParameterSet&) : edm::EDAnalyzer(){} - virtual ~L1TCaloParamsUpdater(void){} + ~L1TCaloParamsUpdater(void) override{} }; void L1TCaloParamsUpdater::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1TCaloParamsViewer.cc b/L1TriggerConfig/Utilities/src/L1TCaloParamsViewer.cc index 788cf67c21f23..f598bf7fd7c7f 100644 --- a/L1TriggerConfig/Utilities/src/L1TCaloParamsViewer.cc +++ b/L1TriggerConfig/Utilities/src/L1TCaloParamsViewer.cc @@ -23,7 +23,7 @@ class L1TCaloParamsViewer: public edm::EDAnalyzer { std::string hash(void *buf, size_t len) const ; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TCaloParamsViewer(const edm::ParameterSet& pset) : edm::EDAnalyzer(){ printPUSParams = pset.getUntrackedParameter("printPUSParams", false); @@ -34,11 +34,11 @@ class L1TCaloParamsViewer: public edm::EDAnalyzer { printEgIsoLUT = pset.getUntrackedParameter("printEgIsoLUT", false); } - virtual ~L1TCaloParamsViewer(void){} + ~L1TCaloParamsViewer(void) override{} }; #include -#include +#include #include using namespace std; @@ -70,7 +70,7 @@ void L1TCaloParamsViewer::analyze(const edm::Event& iEvent, const edm::EventSetu evSetup.get().get( handle1 ) ; boost::shared_ptr ptr(new l1t::CaloParams(*(handle1.product ()))); - l1t::CaloParamsHelper *ptr1 = 0; + l1t::CaloParamsHelper *ptr1 = nullptr; ptr1 = (l1t::CaloParamsHelper*) (&(*ptr)); edm::LogInfo("")<<"L1TCaloParamsViewer:"; @@ -99,7 +99,7 @@ void L1TCaloParamsViewer::analyze(const edm::Event& iEvent, const edm::EventSetu if( printPUSParams ) cout<<" "<regionPUSParams().size() ) + if( !ptr1->regionPUSParams().empty() ) cout << hash(pusParams, sizeof(float)*ptr1->regionPUSParams().size()) << endl; else cout<egPUSParams().size()]; for(unsigned int i=0; iegPUSParams().size(); i++) egPUSParams[i] = ptr1->egPUSParams()[i]; - if( ptr1->egPUSParams().size() ) + if( !ptr1->egPUSParams().empty() ) cout << hash( egPUSParams, sizeof(float)*ptr1->egPUSParams().size() ) << endl; else cout<egCalibrationParams().size()]; for(unsigned int i=0; iegCalibrationParams().size(); i++) egCalibrationParams[i] = ptr1->egCalibrationParams()[i]; - if( ptr1->egCalibrationParams().size() ) + if( !ptr1->egCalibrationParams().empty() ) cout << hash( egCalibrationParams, sizeof(double)*ptr1->egCalibrationParams().size() ) << endl; else cout<tauPUSParams().size()]; for(unsigned int i=0; itauPUSParams().size(); i++) tauPUSParams[i] = ptr1->tauPUSParams()[i]; - if( ptr1->tauPUSParams().size() ) + if( !ptr1->tauPUSParams().empty() ) cout << hash( tauPUSParams, sizeof(float)*ptr1->tauPUSParams().size() ) << endl; else cout<jetCalibrationParams().size()]; // deliberately drop double precision for(unsigned int i=0; ijetCalibrationParams().size(); i++) jetCalibrationParams[i] = ptr1->jetCalibrationParams()[i]; - if( ptr1->jetCalibrationParams().size() ){ + if( !ptr1->jetCalibrationParams().empty() ){ cout << hash( jetCalibrationParams, sizeof(float)*ptr1->jetCalibrationParams().size() ) << endl; if( printJetCalibPar ) for(unsigned int i=0; ijetCalibrationParams().size(); i++) diff --git a/L1TriggerConfig/Utilities/src/L1TCaloParamsWriter.cc b/L1TriggerConfig/Utilities/src/L1TCaloParamsWriter.cc index c2538cea6e556..d323a1ba8e968 100644 --- a/L1TriggerConfig/Utilities/src/L1TCaloParamsWriter.cc +++ b/L1TriggerConfig/Utilities/src/L1TCaloParamsWriter.cc @@ -19,12 +19,12 @@ class L1TCaloStage2ParamsWriter : public edm::EDAnalyzer { private: bool isO2Opayload; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TCaloStage2ParamsWriter(const edm::ParameterSet& pset) : edm::EDAnalyzer(){ isO2Opayload = pset.getUntrackedParameter("isO2Opayload", false); } - virtual ~L1TCaloStage2ParamsWriter(void){} + ~L1TCaloStage2ParamsWriter(void) override{} }; void L1TCaloStage2ParamsWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1TGlobalPrescalesVetosViewer.cc b/L1TriggerConfig/Utilities/src/L1TGlobalPrescalesVetosViewer.cc index 8de6e444aae85..4ff6c95277848 100644 --- a/L1TriggerConfig/Utilities/src/L1TGlobalPrescalesVetosViewer.cc +++ b/L1TriggerConfig/Utilities/src/L1TGlobalPrescalesVetosViewer.cc @@ -19,7 +19,7 @@ class L1TGlobalPrescalesVetosViewer: public edm::EDAnalyzer { std::string hash(void *buf, size_t len) const ; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TGlobalPrescalesVetosViewer(const edm::ParameterSet& pset) : edm::EDAnalyzer(){ prescale_table_verbosity = pset.getUntrackedParameter("prescale_table_verbosity", 0); @@ -27,11 +27,11 @@ class L1TGlobalPrescalesVetosViewer: public edm::EDAnalyzer { veto_verbosity = pset.getUntrackedParameter("veto_verbosity", 0); } - virtual ~L1TGlobalPrescalesVetosViewer(void){} + ~L1TGlobalPrescalesVetosViewer(void) override{} }; #include -#include +#include #include using namespace std; @@ -116,7 +116,7 @@ void L1TGlobalPrescalesVetosViewer::analyze(const edm::Event& iEvent, const edm: for(size_t i=0; isecond.size(); i++) masks[ i ] = it->second[i]; cout << " bxmask_map_[" << it->first << "][" << it->second.size() << "] = "; - if( it->second.size() ) + if( !it->second.empty() ) cout << hash( masks, sizeof(int)*it->second.size() ) << endl; else cout << 0 << endl; } @@ -144,7 +144,7 @@ void L1TGlobalPrescalesVetosViewer::analyze(const edm::Event& iEvent, const edm: } cout << " veto_[" << (ptr->veto_).size() << "] = "; if( veto_verbosity == 0 ){ - if( (ptr->veto_).size() ){ + if( !(ptr->veto_).empty() ){ cout << hash( veto_, sizeof(int)*(ptr->veto_).size() ); if( veto_allZeros ) cout << " (all zeros)" << endl; else cout << endl; @@ -155,14 +155,14 @@ void L1TGlobalPrescalesVetosViewer::analyze(const edm::Event& iEvent, const edm: int exp_ints_[ (ptr->exp_ints_).size() ]; for(size_t i=0; i<(ptr->exp_ints_).size(); i++) exp_ints_[i] = (ptr->exp_ints_)[i]; cout << " exp_ints_[" << (ptr->exp_ints_).size() << "] = "; - if( (ptr->exp_ints_).size() ) + if( !(ptr->exp_ints_).empty() ) cout << hash( exp_ints_, sizeof(int)*(ptr->exp_ints_).size() ) << endl; else cout << 0 << endl; int exp_doubles_[ (ptr->exp_doubles_).size() ]; for(size_t i=0; i<(ptr->exp_doubles_).size(); i++) exp_ints_[i] = (ptr->exp_doubles_)[i]; cout << " exp_doubles_[" << (ptr->exp_doubles_).size() << "] = "; - if( (ptr->exp_doubles_).size() ) + if( !(ptr->exp_doubles_).empty() ) cout << hash( exp_doubles_, sizeof(int)*(ptr->exp_doubles_).size() ) << endl; else cout << 0 << endl; } diff --git a/L1TriggerConfig/Utilities/src/L1TGlobalPrescalesVetosWriter.cc b/L1TriggerConfig/Utilities/src/L1TGlobalPrescalesVetosWriter.cc index 1fbd9815ce85b..f144356feeb63 100644 --- a/L1TriggerConfig/Utilities/src/L1TGlobalPrescalesVetosWriter.cc +++ b/L1TriggerConfig/Utilities/src/L1TGlobalPrescalesVetosWriter.cc @@ -19,12 +19,12 @@ class L1TGlobalPrescalesVetosWriter : public edm::EDAnalyzer { private: bool isO2Opayload; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TGlobalPrescalesVetosWriter(const edm::ParameterSet &pset) : edm::EDAnalyzer(){ isO2Opayload = pset.getUntrackedParameter("isO2Opayload", false); } - virtual ~L1TGlobalPrescalesVetosWriter(void){} + ~L1TGlobalPrescalesVetosWriter(void) override{} }; void L1TGlobalPrescalesVetosWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1TMuonBarrelParamsWriter.cc b/L1TriggerConfig/Utilities/src/L1TMuonBarrelParamsWriter.cc index 98adc21bc2569..800a731eb3efc 100644 --- a/L1TriggerConfig/Utilities/src/L1TMuonBarrelParamsWriter.cc +++ b/L1TriggerConfig/Utilities/src/L1TMuonBarrelParamsWriter.cc @@ -19,12 +19,12 @@ class L1TMuonBarrelParamsWriter : public edm::EDAnalyzer { private: bool isO2Opayload; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TMuonBarrelParamsWriter(const edm::ParameterSet &pset) : edm::EDAnalyzer(){ isO2Opayload = pset.getUntrackedParameter("isO2Opayload", false); } - virtual ~L1TMuonBarrelParamsWriter(void){} + ~L1TMuonBarrelParamsWriter(void) override{} }; void L1TMuonBarrelParamsWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1TMuonGlobalParamsViewer.cc b/L1TriggerConfig/Utilities/src/L1TMuonGlobalParamsViewer.cc index 259eb04d932b4..33dade653b135 100644 --- a/L1TriggerConfig/Utilities/src/L1TMuonGlobalParamsViewer.cc +++ b/L1TriggerConfig/Utilities/src/L1TMuonGlobalParamsViewer.cc @@ -25,17 +25,17 @@ class L1TMuonGlobalParamsViewer: public edm::EDAnalyzer { std::string hash(void *buf, size_t len) const ; void printLUT(l1t::LUT* lut, const char *name) const ; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; // string hash(void *buf, size_t len) const ; explicit L1TMuonGlobalParamsViewer(const edm::ParameterSet& pset) : edm::EDAnalyzer(){ // printLayerMap = pset.getUntrackedParameter("printLayerMap", false); } - virtual ~L1TMuonGlobalParamsViewer(void){} + ~L1TMuonGlobalParamsViewer(void) override{} }; #include -#include +#include #include using namespace std; diff --git a/L1TriggerConfig/Utilities/src/L1TMuonGlobalParamsWriter.cc b/L1TriggerConfig/Utilities/src/L1TMuonGlobalParamsWriter.cc index fd384e1e479f5..34b8ca3d44671 100644 --- a/L1TriggerConfig/Utilities/src/L1TMuonGlobalParamsWriter.cc +++ b/L1TriggerConfig/Utilities/src/L1TMuonGlobalParamsWriter.cc @@ -19,12 +19,12 @@ class L1TMuonGlobalParamsWriter : public edm::EDAnalyzer { private: bool isO2Opayload; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TMuonGlobalParamsWriter(const edm::ParameterSet &pset) : edm::EDAnalyzer(){ isO2Opayload = pset.getUntrackedParameter("isO2Opayload", false); } - virtual ~L1TMuonGlobalParamsWriter(void){} + ~L1TMuonGlobalParamsWriter(void) override{} }; void L1TMuonGlobalParamsWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1TMuonOverlapReader.cc b/L1TriggerConfig/Utilities/src/L1TMuonOverlapReader.cc index cf60a6e91ab80..99bf300c96821 100644 --- a/L1TriggerConfig/Utilities/src/L1TMuonOverlapReader.cc +++ b/L1TriggerConfig/Utilities/src/L1TMuonOverlapReader.cc @@ -22,18 +22,18 @@ class L1TMuonOverlapReader: public edm::EDAnalyzer { private: bool printLayerMap; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; string hash(void *buf, size_t len) const ; explicit L1TMuonOverlapReader(const edm::ParameterSet& pset) : edm::EDAnalyzer(){ printLayerMap = pset.getUntrackedParameter("printLayerMap", false); } - virtual ~L1TMuonOverlapReader(void){} + ~L1TMuonOverlapReader(void) override{} }; #include -#include +#include #include using namespace std; @@ -90,7 +90,7 @@ void L1TMuonOverlapReader::analyze(const edm::Event& iEvent, const edm::EventSet cout< *lm = ptr1->layerMap(); - if( lm->size() ){ + if( !lm->empty() ){ cout<<" layerMap() = ["<size()<<"] "; L1TMuonOverlapParams::LayerMapNode *lm_ = new L1TMuonOverlapParams::LayerMapNode[ lm->size() ]; for(unsigned int i=0; isize(); i++) lm_[i] = (*lm)[i]; @@ -111,7 +111,7 @@ void L1TMuonOverlapReader::analyze(const edm::Event& iEvent, const edm::EventSet } const std::vector *rlm = ptr1->refLayerMap(); - if( rlm->size() ){ + if( !rlm->empty() ){ cout<<" refLayerMap() = ["<size()<<"] "; L1TMuonOverlapParams::RefLayerMapNode *rlm_ = new L1TMuonOverlapParams::RefLayerMapNode[ rlm->size() ]; for(unsigned int i=0; isize(); i++) rlm_[i] = (*rlm)[i]; @@ -122,7 +122,7 @@ void L1TMuonOverlapReader::analyze(const edm::Event& iEvent, const edm::EventSet } const std::vector *rhn = ptr1->refHitMap(); - if( rhn->size() ){ + if( !rhn->empty() ){ cout<<" refHitMap() = ["<size()<<"] "; L1TMuonOverlapParams::RefHitNode *rhn_ = new L1TMuonOverlapParams::RefHitNode[ rhn->size() ]; for(unsigned int i=0; isize(); i++) rhn_[i] = (*rhn)[i]; @@ -133,7 +133,7 @@ void L1TMuonOverlapReader::analyze(const edm::Event& iEvent, const edm::EventSet } const std::vector *gpsm = ptr1->globalPhiStartMap(); - if( gpsm->size() ){ + if( !gpsm->empty() ){ cout<<" globalPhiStartMap() = ["<size()<<"] "; int gpsm_[gpsm->size()]; for(unsigned int i=0; isize(); i++) gpsm_[i] = (*gpsm)[i]; @@ -143,7 +143,7 @@ void L1TMuonOverlapReader::analyze(const edm::Event& iEvent, const edm::EventSet } const std::vector *lim = ptr1->layerInputMap(); - if( lim->size() ){ + if( !lim->empty() ){ cout<<" layerInputMap() = ["<size()<<"] "; L1TMuonOverlapParams::LayerInputNode *lim_ = new L1TMuonOverlapParams::LayerInputNode[lim->size()]; for(unsigned int i=0; isize(); i++) lim_[i] = (*lim)[i]; @@ -154,7 +154,7 @@ void L1TMuonOverlapReader::analyze(const edm::Event& iEvent, const edm::EventSet } const std::vector *css = ptr1->connectedSectorsStart(); - if( css->size() ){ + if( !css->empty() ){ cout<<" connectedSectorsStart() = ["<size()<<"] "; int css_[css->size()]; for(unsigned int i=0; isize(); i++) css_[i] = (*css)[i]; @@ -164,7 +164,7 @@ void L1TMuonOverlapReader::analyze(const edm::Event& iEvent, const edm::EventSet } const std::vector *cse = ptr1->connectedSectorsEnd(); - if( cse->size() ){ + if( !cse->empty() ){ cout<<" connectedSectorsEnd() = ["<size()<<"] "; int cse_[cse->size()]; for(unsigned int i=0; isize(); i++) cse_[i] = (*cse)[i]; diff --git a/L1TriggerConfig/Utilities/src/L1TMuonOverlapWriter.cc b/L1TriggerConfig/Utilities/src/L1TMuonOverlapWriter.cc index 5f5c6f8f2b6e7..5e410632561c1 100644 --- a/L1TriggerConfig/Utilities/src/L1TMuonOverlapWriter.cc +++ b/L1TriggerConfig/Utilities/src/L1TMuonOverlapWriter.cc @@ -17,10 +17,10 @@ class L1TMuonOverlapWriter : public edm::EDAnalyzer { public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TMuonOverlapWriter(const edm::ParameterSet&) : edm::EDAnalyzer(){} - virtual ~L1TMuonOverlapWriter(void){} + ~L1TMuonOverlapWriter(void) override{} }; void L1TMuonOverlapWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup){ diff --git a/L1TriggerConfig/Utilities/src/L1TriggerKeyExtReader.cc b/L1TriggerConfig/Utilities/src/L1TriggerKeyExtReader.cc index ff7a50d2d17d7..3d4b2862d0d8c 100644 --- a/L1TriggerConfig/Utilities/src/L1TriggerKeyExtReader.cc +++ b/L1TriggerConfig/Utilities/src/L1TriggerKeyExtReader.cc @@ -12,11 +12,11 @@ class L1TriggerKeyExtReader : public edm::EDAnalyzer { private: std::string label; public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TriggerKeyExtReader(const edm::ParameterSet &pset) : edm::EDAnalyzer(), label( pset.getParameter< std::string >( "label" ) ) {} - virtual ~L1TriggerKeyExtReader(void){} + ~L1TriggerKeyExtReader(void) override{} }; #include diff --git a/L1TriggerConfig/Utilities/src/L1TriggerKeyListExtReader.cc b/L1TriggerConfig/Utilities/src/L1TriggerKeyListExtReader.cc index 8a1b2ded986c7..bd1b9628ab8b4 100644 --- a/L1TriggerConfig/Utilities/src/L1TriggerKeyListExtReader.cc +++ b/L1TriggerConfig/Utilities/src/L1TriggerKeyListExtReader.cc @@ -12,11 +12,11 @@ class L1TriggerKeyListExtReader : public edm::EDAnalyzer { private: public: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; explicit L1TriggerKeyListExtReader(const edm::ParameterSet&) : edm::EDAnalyzer(){ } - virtual ~L1TriggerKeyListExtReader(void){} + ~L1TriggerKeyListExtReader(void) override{} }; #include diff --git a/OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h b/OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h index 5a24c39af36a1..9f1828a2ab5df 100644 --- a/OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h +++ b/OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h @@ -13,8 +13,8 @@ class CSCAFEBAnalyzer : public edm::EDAnalyzer { public: explicit CSCAFEBAnalyzer(edm::ParameterSet const& conf); - virtual void analyze(edm::Event const& e, edm::EventSetup const& iSetup); - virtual void endJob(); + void analyze(edm::Event const& e, edm::EventSetup const& iSetup) override; + void endJob() override; private: /// variables persistent across events should be declared here. std::string testname; diff --git a/OnlineDB/CSCCondDB/interface/CSCAFEBConnectAnalysis.h b/OnlineDB/CSCCondDB/interface/CSCAFEBConnectAnalysis.h index 437794dc13829..a80d015fc47e5 100644 --- a/OnlineDB/CSCCondDB/interface/CSCAFEBConnectAnalysis.h +++ b/OnlineDB/CSCCondDB/interface/CSCAFEBConnectAnalysis.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include /** \class CSCAFEBConnectAnalysis * diff --git a/OnlineDB/CSCCondDB/interface/CSCAFEBThrAnalysis.h b/OnlineDB/CSCCondDB/interface/CSCAFEBThrAnalysis.h index 447bae81b4aaf..86cc12ef7b3ef 100644 --- a/OnlineDB/CSCCondDB/interface/CSCAFEBThrAnalysis.h +++ b/OnlineDB/CSCCondDB/interface/CSCAFEBThrAnalysis.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include /** \class CSCAFEBThrAnalysis * diff --git a/OnlineDB/CSCCondDB/interface/CSCChamberIndexValues.h b/OnlineDB/CSCCondDB/interface/CSCChamberIndexValues.h index 994c3318cc048..38514a84928c5 100644 --- a/OnlineDB/CSCCondDB/interface/CSCChamberIndexValues.h +++ b/OnlineDB/CSCCondDB/interface/CSCChamberIndexValues.h @@ -22,7 +22,7 @@ class CSCChamberIndexValues: public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { public: CSCChamberIndexValues(const edm::ParameterSet&); - ~CSCChamberIndexValues(); + ~CSCChamberIndexValues() override; inline static CSCChamberIndex * fillChamberIndex(); @@ -32,7 +32,7 @@ class CSCChamberIndexValues: public edm::ESProducer, public edm::EventSetupRecor private: // ----------member data --------------------------- - void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ); + void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ) override; CSCChamberIndex *mapObj ; }; diff --git a/OnlineDB/CSCCondDB/interface/CSCChamberMapValues.h b/OnlineDB/CSCCondDB/interface/CSCChamberMapValues.h index 70dfadd6d5d92..cb6263b1a1097 100644 --- a/OnlineDB/CSCCondDB/interface/CSCChamberMapValues.h +++ b/OnlineDB/CSCCondDB/interface/CSCChamberMapValues.h @@ -22,7 +22,7 @@ class CSCChamberMapValues: public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { public: CSCChamberMapValues(const edm::ParameterSet&); - ~CSCChamberMapValues(); + ~CSCChamberMapValues() override; inline static CSCChamberMap * fillChamberMap(); @@ -32,7 +32,7 @@ class CSCChamberMapValues: public edm::ESProducer, public edm::EventSetupRecordI private: // ----------member data --------------------------- - void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ); + void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ) override; CSCChamberMap *mapObj ; }; diff --git a/OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsReadTest.h b/OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsReadTest.h index 2eb23e6c4e5ca..f058204b7e929 100644 --- a/OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsReadTest.h +++ b/OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsReadTest.h @@ -18,10 +18,10 @@ class CSCChamberTimeCorrectionsReadTest : public edm::EDAnalyzer { public: explicit CSCChamberTimeCorrectionsReadTest(const edm::ParameterSet&); - ~CSCChamberTimeCorrectionsReadTest(); + ~CSCChamberTimeCorrectionsReadTest() override; private: - virtual void beginJob() ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; }; diff --git a/OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsValues.h b/OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsValues.h index e3f2ae5f7ab97..de7a59405b564 100644 --- a/OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsValues.h +++ b/OnlineDB/CSCCondDB/interface/CSCChamberTimeCorrectionsValues.h @@ -23,7 +23,7 @@ class CSCChamberTimeCorrectionsValues: public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { public: CSCChamberTimeCorrectionsValues(const edm::ParameterSet&); - ~CSCChamberTimeCorrectionsValues(); + ~CSCChamberTimeCorrectionsValues() override; inline static CSCChamberTimeCorrections * prefill(bool isMC, float ME11offset, float nonME11offset); @@ -33,7 +33,7 @@ class CSCChamberTimeCorrectionsValues: public edm::ESProducer, public edm::Event private: // ----------member data --------------------------- - void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ); + void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ) override; CSCChamberTimeCorrections *chamberObj ; //Flag for determining if this is for setting MC or data corrections diff --git a/OnlineDB/CSCCondDB/interface/CSCCrateMapValues.h b/OnlineDB/CSCCondDB/interface/CSCCrateMapValues.h index 1714a8571dd5b..a170bf0d4bd78 100644 --- a/OnlineDB/CSCCondDB/interface/CSCCrateMapValues.h +++ b/OnlineDB/CSCCondDB/interface/CSCCrateMapValues.h @@ -22,7 +22,7 @@ class CSCCrateMapValues: public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { public: CSCCrateMapValues(const edm::ParameterSet&); - ~CSCCrateMapValues(); + ~CSCCrateMapValues() override; inline static CSCCrateMap * fillCrateMap(); @@ -32,7 +32,7 @@ class CSCCrateMapValues: public edm::ESProducer, public edm::EventSetupRecordInt private: // ----------member data --------------------------- - void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ); + void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ) override; CSCCrateMap *mapObj ; }; diff --git a/OnlineDB/CSCCondDB/interface/CSCDDUMapValues.h b/OnlineDB/CSCCondDB/interface/CSCDDUMapValues.h index 7a9f000f9f911..595a006ff2a1a 100644 --- a/OnlineDB/CSCCondDB/interface/CSCDDUMapValues.h +++ b/OnlineDB/CSCCondDB/interface/CSCDDUMapValues.h @@ -22,7 +22,7 @@ class CSCDDUMapValues: public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { public: CSCDDUMapValues(const edm::ParameterSet&); - ~CSCDDUMapValues(); + ~CSCDDUMapValues() override; inline static CSCDDUMap * fillDDUMap(); @@ -32,7 +32,7 @@ class CSCDDUMapValues: public edm::ESProducer, public edm::EventSetupRecordInter private: // ----------member data --------------------------- - void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ); + void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue&, edm::ValidityInterval & ) override; CSCDDUMap *mapObj ; }; diff --git a/OnlineDB/CSCCondDB/interface/CSCMap1Read.h b/OnlineDB/CSCCondDB/interface/CSCMap1Read.h index 930622f6fea56..42c462c144c57 100644 --- a/OnlineDB/CSCCondDB/interface/CSCMap1Read.h +++ b/OnlineDB/CSCCondDB/interface/CSCMap1Read.h @@ -18,10 +18,10 @@ class CSCMap1Read : public edm::EDAnalyzer { public: explicit CSCMap1Read(const edm::ParameterSet&); - ~CSCMap1Read(); + ~CSCMap1Read() override; private: - virtual void beginJob() ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; }; diff --git a/OnlineDB/CSCCondDB/interface/CSCOnlineDB.h b/OnlineDB/CSCCondDB/interface/CSCOnlineDB.h index 42e6a0fe3f1f6..83dee7f502273 100644 --- a/OnlineDB/CSCCondDB/interface/CSCOnlineDB.h +++ b/OnlineDB/CSCCondDB/interface/CSCOnlineDB.h @@ -6,9 +6,9 @@ #include #include "OnlineDB/Oracle/interface/Oracle.h" #include -#include -#include -#include +#include +#include +#include #include "CondFormats/CSCObjects/interface/CSCobject.h" #include diff --git a/OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h b/OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h index 26f23e424299a..f88b16caf996f 100644 --- a/OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h +++ b/OnlineDB/CSCCondDB/interface/CSCThrTurnOnFcn.h @@ -41,10 +41,10 @@ class CSCThrTurnOnFcn : public ROOT::Minuit2::FCNBase { void setNorm(float n) {norm=n;}; /// Provide the chi-squared function for the given data - virtual double operator() (const std::vector&) const; + double operator() (const std::vector&) const override; ///@@ What? - virtual double Up() const {return 1.;} + double Up() const override {return 1.;} }; diff --git a/OnlineDB/CSCCondDB/src/CSCAFEBConnectAnalysis.cc b/OnlineDB/CSCCondDB/src/CSCAFEBConnectAnalysis.cc index ca2e2f68ae282..565a4ac0d2d83 100644 --- a/OnlineDB/CSCCondDB/src/CSCAFEBConnectAnalysis.cc +++ b/OnlineDB/CSCCondDB/src/CSCAFEBConnectAnalysis.cc @@ -6,7 +6,7 @@ CSCAFEBConnectAnalysis::CSCAFEBConnectAnalysis() { -hist_file=0; // set to null +hist_file=nullptr; // set to null nmbev=0; nmbev_no_wire=0; @@ -346,10 +346,10 @@ void CSCAFEBConnectAnalysis::done() { if(debug) dbon->cdbon_write(cn,"afeb_thresholds",run+1,myTime); */ - if(hist_file!=0) { // if there was a histogram file... + if(hist_file!=nullptr) { // if there was a histogram file... hist_file->Write(); // write out the histrograms delete hist_file; // close and delete the file - hist_file=0; // set to zero to clean up + hist_file=nullptr; // set to zero to clean up std::cout << "Hist. file was closed\n"; } std::cout<<" End of CSCAFEBConnectAnalysis"<ThresholdNoise(inputx,inputy,npulses,vecDacOccup,mypar,ermypar,erco //std::cout<<"Last AFEB thresholds run "<cdbon_write(cn,"afeb_thresholds",run+1,myTime); - if(hist_file!=0) { // if there was a histogram file... + if(hist_file!=nullptr) { // if there was a histogram file... hist_file->Write(); // write out the histrograms delete hist_file; // close and delete the file - hist_file=0; // set to zero to clean up + hist_file=nullptr; // set to zero to clean up std::cout << "Hist. file was closed\n"; } diff --git a/OnlineDB/EcalCondDB/interface/CaliCrystalIntercalDat.h b/OnlineDB/EcalCondDB/interface/CaliCrystalIntercalDat.h index b8cf00bbbca88..68a6d9699b2aa 100644 --- a/OnlineDB/EcalCondDB/interface/CaliCrystalIntercalDat.h +++ b/OnlineDB/EcalCondDB/interface/CaliCrystalIntercalDat.h @@ -13,10 +13,10 @@ class CaliCrystalIntercalDat : public IDataItem { public: friend class EcalCondDBInterface; CaliCrystalIntercalDat(); - ~CaliCrystalIntercalDat(); + ~CaliCrystalIntercalDat() override; // User data methods - inline std::string getTable() { return "CALI_CRYSTAL_INTERCAL_DAT"; } + inline std::string getTable() override { return "CALI_CRYSTAL_INTERCAL_DAT"; } inline void setCali(float c) { m_cali = c; } inline float getCali() const { return m_cali; } @@ -32,7 +32,7 @@ class CaliCrystalIntercalDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const CaliCrystalIntercalDat* item, CaliIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/CaliGainRatioDat.h b/OnlineDB/EcalCondDB/interface/CaliGainRatioDat.h index 36c47dc1aa1a6..47403477430ab 100644 --- a/OnlineDB/EcalCondDB/interface/CaliGainRatioDat.h +++ b/OnlineDB/EcalCondDB/interface/CaliGainRatioDat.h @@ -13,10 +13,10 @@ class CaliGainRatioDat : public IDataItem { public: friend class EcalCondDBInterface; CaliGainRatioDat(); - ~CaliGainRatioDat(); + ~CaliGainRatioDat() override; // User data methods - inline std::string getTable() { return "CALI_GAIN_RATIO_DAT"; } + inline std::string getTable() override { return "CALI_GAIN_RATIO_DAT"; } inline void setG1G12(float c) { m_g1_g12 = c; } inline float getG1G12() const { return m_g1_g12; } @@ -29,7 +29,7 @@ class CaliGainRatioDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const CaliGainRatioDat* item, CaliIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/CaliGeneralDat.h b/OnlineDB/EcalCondDB/interface/CaliGeneralDat.h index 4b26cde157fbb..dffe228913cc7 100644 --- a/OnlineDB/EcalCondDB/interface/CaliGeneralDat.h +++ b/OnlineDB/EcalCondDB/interface/CaliGeneralDat.h @@ -13,10 +13,10 @@ class CaliGeneralDat : public IDataItem { public: friend class EcalCondDBInterface; CaliGeneralDat(); - ~CaliGeneralDat(); + ~CaliGeneralDat() override; // User data methods - inline std::string getTable() { return "CALI_GENERAL_DAT"; } + inline std::string getTable() override { return "CALI_GENERAL_DAT"; } inline void setNumEvents(int n) { m_numEvents = n; } inline int getNumEvents() const { return m_numEvents; } @@ -26,7 +26,7 @@ class CaliGeneralDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const CaliGeneralDat* item, CaliIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/CaliHVScanRatioDat.h b/OnlineDB/EcalCondDB/interface/CaliHVScanRatioDat.h index c3cdd08e1c814..beeb74a3aa34d 100644 --- a/OnlineDB/EcalCondDB/interface/CaliHVScanRatioDat.h +++ b/OnlineDB/EcalCondDB/interface/CaliHVScanRatioDat.h @@ -13,10 +13,10 @@ class CaliHVScanRatioDat : public IDataItem { public: friend class EcalCondDBInterface; CaliHVScanRatioDat(); - ~CaliHVScanRatioDat(); + ~CaliHVScanRatioDat() override; // User data methods - inline std::string getTable() { return "CALI_HV_SCAN_RATIO_DAT"; } + inline std::string getTable() override { return "CALI_HV_SCAN_RATIO_DAT"; } inline void setHVRatio(float c) { m_hvratio = c; } inline float getHVRatio() const { return m_hvratio; } @@ -29,7 +29,7 @@ class CaliHVScanRatioDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const CaliHVScanRatioDat* item, CaliIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/CaliIOV.h b/OnlineDB/EcalCondDB/interface/CaliIOV.h index 202842bb7c9f3..6b433a7aeb605 100644 --- a/OnlineDB/EcalCondDB/interface/CaliIOV.h +++ b/OnlineDB/EcalCondDB/interface/CaliIOV.h @@ -15,7 +15,7 @@ class CaliIOV : public IIOV { friend class EcalCondDBInterface; CaliIOV(); - ~CaliIOV(); + ~CaliIOV() override; // Methods for user data @@ -29,8 +29,8 @@ class CaliIOV : public IIOV { // Methods from IUniqueDBObject int getID(){ return m_ID;} ; - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators inline bool operator==(const CaliIOV &m) const diff --git a/OnlineDB/EcalCondDB/interface/CaliTag.h b/OnlineDB/EcalCondDB/interface/CaliTag.h index a61531ff74b41..79a2739d54012 100644 --- a/OnlineDB/EcalCondDB/interface/CaliTag.h +++ b/OnlineDB/EcalCondDB/interface/CaliTag.h @@ -16,7 +16,7 @@ class CaliTag : public ITag { friend class EcalCondDBInterface; CaliTag(); - ~CaliTag(); + ~CaliTag() override; // Methods for user data std::string getGeneralTag() const; @@ -36,8 +36,8 @@ class CaliTag : public ITag { // Methods using ID - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators inline bool operator==(const CaliTag &t) const diff --git a/OnlineDB/EcalCondDB/interface/CaliTempDat.h b/OnlineDB/EcalCondDB/interface/CaliTempDat.h index 00847f706b550..aea72474a9115 100644 --- a/OnlineDB/EcalCondDB/interface/CaliTempDat.h +++ b/OnlineDB/EcalCondDB/interface/CaliTempDat.h @@ -13,10 +13,10 @@ class CaliTempDat : public IDataItem { public: friend class EcalCondDBInterface; CaliTempDat(); - ~CaliTempDat(); + ~CaliTempDat() override; // User data methods - inline std::string getTable() { return "CALI_TEMP_DAT"; } + inline std::string getTable() override { return "CALI_TEMP_DAT"; } inline void setBeta(float c) { m_beta = c; } inline float getBeta() const { return m_beta; } @@ -32,7 +32,7 @@ class CaliTempDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const CaliTempDat* item, CaliIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DCSPTMTemp.h b/OnlineDB/EcalCondDB/interface/DCSPTMTemp.h index 0f452886e1351..b667c79b8275f 100644 --- a/OnlineDB/EcalCondDB/interface/DCSPTMTemp.h +++ b/OnlineDB/EcalCondDB/interface/DCSPTMTemp.h @@ -17,7 +17,7 @@ class DCSPTMTemp : public IDBObject { friend class EcalCondDBInterface; DCSPTMTemp(); - ~DCSPTMTemp(); + ~DCSPTMTemp() override; // Methods for user data inline std::string getTable() { return ""; } diff --git a/OnlineDB/EcalCondDB/interface/DCSPTMTempList.h b/OnlineDB/EcalCondDB/interface/DCSPTMTempList.h index 1da1a51a745ca..2f46e0cf660dd 100644 --- a/OnlineDB/EcalCondDB/interface/DCSPTMTempList.h +++ b/OnlineDB/EcalCondDB/interface/DCSPTMTempList.h @@ -17,7 +17,7 @@ class DCSPTMTempList : public IDBObject { friend class EcalCondDBInterface; DCSPTMTempList(); - ~DCSPTMTempList(); + ~DCSPTMTempList() override; // Methods for user data diff --git a/OnlineDB/EcalCondDB/interface/DCUCCSDat.h b/OnlineDB/EcalCondDB/interface/DCUCCSDat.h index f065f58dfa265..57a046d1af4f9 100644 --- a/OnlineDB/EcalCondDB/interface/DCUCCSDat.h +++ b/OnlineDB/EcalCondDB/interface/DCUCCSDat.h @@ -13,10 +13,10 @@ class DCUCCSDat : public IDataItem { public: friend class EcalCondDBInterface; DCUCCSDat(); - ~DCUCCSDat(); + ~DCUCCSDat() override; // User data methods - inline std::string getTable() { return "DCU_CCS_DAT"; } + inline std::string getTable() override { return "DCU_CCS_DAT"; } inline void setM1VDD1(float temp) { m_m1_vdd1 = temp; } inline void setM2VDD1(float temp) { m_m2_vdd1 = temp; } @@ -83,7 +83,7 @@ class DCUCCSDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const DCUCCSDat* item, DCUIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DCUCapsuleTempDat.h b/OnlineDB/EcalCondDB/interface/DCUCapsuleTempDat.h index 961485f182cf3..64903483f71e1 100644 --- a/OnlineDB/EcalCondDB/interface/DCUCapsuleTempDat.h +++ b/OnlineDB/EcalCondDB/interface/DCUCapsuleTempDat.h @@ -13,17 +13,17 @@ class DCUCapsuleTempDat : public IDataItem { public: friend class EcalCondDBInterface; DCUCapsuleTempDat(); - ~DCUCapsuleTempDat(); + ~DCUCapsuleTempDat() override; // User data methods - inline std::string getTable() { return "DCU_CAPSULE_TEMP_DAT"; } + inline std::string getTable() override { return "DCU_CAPSULE_TEMP_DAT"; } inline void setCapsuleTemp(float temp) { m_capsuleTemp = temp; } inline float getCapsuleTemp() const { return m_capsuleTemp; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const DCUCapsuleTempDat* item, DCUIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DCUCapsuleTempRawDat.h b/OnlineDB/EcalCondDB/interface/DCUCapsuleTempRawDat.h index 35097648eed37..a50e4a6b66389 100644 --- a/OnlineDB/EcalCondDB/interface/DCUCapsuleTempRawDat.h +++ b/OnlineDB/EcalCondDB/interface/DCUCapsuleTempRawDat.h @@ -13,10 +13,10 @@ class DCUCapsuleTempRawDat : public IDataItem { public: friend class EcalCondDBInterface; DCUCapsuleTempRawDat(); - ~DCUCapsuleTempRawDat(); + ~DCUCapsuleTempRawDat() override; // User data methods - inline std::string getTable() { return "DCU_CAPSULE_TEMP_RAW_DAT"; } + inline std::string getTable() override { return "DCU_CAPSULE_TEMP_RAW_DAT"; } inline void setCapsuleTempADC(float adc) { m_capsuleTempADC = adc; } inline float getCapsuleTempADC() const { return m_capsuleTempADC; } @@ -26,7 +26,7 @@ class DCUCapsuleTempRawDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const DCUCapsuleTempRawDat* item, DCUIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DCUIDarkDat.h b/OnlineDB/EcalCondDB/interface/DCUIDarkDat.h index 6331895954dcc..7f4f5d25af13c 100644 --- a/OnlineDB/EcalCondDB/interface/DCUIDarkDat.h +++ b/OnlineDB/EcalCondDB/interface/DCUIDarkDat.h @@ -13,17 +13,17 @@ class DCUIDarkDat : public IDataItem { public: friend class EcalCondDBInterface; DCUIDarkDat(); - ~DCUIDarkDat(); + ~DCUIDarkDat() override; // User data methods - inline std::string getTable() { return "DCU_IDARK_DAT"; } + inline std::string getTable() override { return "DCU_IDARK_DAT"; } inline void setAPDIDark(float i) { m_apdIDark = i; } inline float getAPDIDark() const { return m_apdIDark; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const DCUIDarkDat* item, DCUIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DCUIDarkPedDat.h b/OnlineDB/EcalCondDB/interface/DCUIDarkPedDat.h index 58b6bcdabb1a4..d65bc95f81d19 100644 --- a/OnlineDB/EcalCondDB/interface/DCUIDarkPedDat.h +++ b/OnlineDB/EcalCondDB/interface/DCUIDarkPedDat.h @@ -13,17 +13,17 @@ class DCUIDarkPedDat : public IDataItem { public: friend class EcalCondDBInterface; DCUIDarkPedDat(); - ~DCUIDarkPedDat(); + ~DCUIDarkPedDat() override; // User data methods - inline std::string getTable() { return "DCU_IDARK_PED_DAT"; } + inline std::string getTable() override { return "DCU_IDARK_PED_DAT"; } inline void setPed(float temp) { m_ped = temp; } inline float getPed() const { return m_ped; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const DCUIDarkPedDat* item, DCUIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DCUIOV.h b/OnlineDB/EcalCondDB/interface/DCUIOV.h index ac52c5b07b2b6..89dec52fb0798 100644 --- a/OnlineDB/EcalCondDB/interface/DCUIOV.h +++ b/OnlineDB/EcalCondDB/interface/DCUIOV.h @@ -15,7 +15,7 @@ class DCUIOV : public IIOV { friend class EcalCondDBInterface; DCUIOV(); - ~DCUIOV(); + ~DCUIOV() override; // Methods for user data void setSince(const Tm& since); @@ -27,8 +27,8 @@ class DCUIOV : public IIOV { // Methods from IUniqueDBObject int getID(){ return m_ID;} ; - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators inline bool operator==(const DCUIOV &m) const diff --git a/OnlineDB/EcalCondDB/interface/DCULVRBTempsDat.h b/OnlineDB/EcalCondDB/interface/DCULVRBTempsDat.h index 3d45af705cb51..daecba1312c4c 100644 --- a/OnlineDB/EcalCondDB/interface/DCULVRBTempsDat.h +++ b/OnlineDB/EcalCondDB/interface/DCULVRBTempsDat.h @@ -13,10 +13,10 @@ class DCULVRBTempsDat : public IDataItem { public: friend class EcalCondDBInterface; DCULVRBTempsDat(); - ~DCULVRBTempsDat(); + ~DCULVRBTempsDat() override; // User data methods - inline std::string getTable() { return "DCU_LVRB_TEMPS_DAT"; } + inline std::string getTable() override { return "DCU_LVRB_TEMPS_DAT"; } inline void setT1(float temp) { m_t1 = temp; } inline float getT1() const { return m_t1; } @@ -30,7 +30,7 @@ class DCULVRBTempsDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const DCULVRBTempsDat* item, DCUIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DCULVRTempsDat.h b/OnlineDB/EcalCondDB/interface/DCULVRTempsDat.h index 0bd165b54f4b5..47e1dd389a61a 100644 --- a/OnlineDB/EcalCondDB/interface/DCULVRTempsDat.h +++ b/OnlineDB/EcalCondDB/interface/DCULVRTempsDat.h @@ -13,10 +13,10 @@ class DCULVRTempsDat : public IDataItem { public: friend class EcalCondDBInterface; DCULVRTempsDat(); - ~DCULVRTempsDat(); + ~DCULVRTempsDat() override; // User data methods - inline std::string getTable() { return "DCU_LVR_TEMPS_DAT"; } + inline std::string getTable() override { return "DCU_LVR_TEMPS_DAT"; } inline void setT1(float temp) { m_t1 = temp; } inline float getT1() const { return m_t1; } @@ -30,7 +30,7 @@ class DCULVRTempsDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const DCULVRTempsDat* item, DCUIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DCULVRVoltagesDat.h b/OnlineDB/EcalCondDB/interface/DCULVRVoltagesDat.h index 1433cf00d17e3..1a64201fe14d8 100644 --- a/OnlineDB/EcalCondDB/interface/DCULVRVoltagesDat.h +++ b/OnlineDB/EcalCondDB/interface/DCULVRVoltagesDat.h @@ -13,10 +13,10 @@ class DCULVRVoltagesDat : public IDataItem { public: friend class EcalCondDBInterface; DCULVRVoltagesDat(); - ~DCULVRVoltagesDat(); + ~DCULVRVoltagesDat() override; // User data methods - inline std::string getTable() { return "DCU_LVR_VOLTAGES_DAT"; } + inline std::string getTable() override { return "DCU_LVR_VOLTAGES_DAT"; } inline void setVFE1_A(float v) { m_vfe1_A = v; } inline float getVFE1_A() const { return m_vfe1_A; } @@ -66,7 +66,7 @@ class DCULVRVoltagesDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const DCULVRVoltagesDat* item, DCUIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DCUTag.h b/OnlineDB/EcalCondDB/interface/DCUTag.h index 46239a4ff2dbc..5600c1f581492 100644 --- a/OnlineDB/EcalCondDB/interface/DCUTag.h +++ b/OnlineDB/EcalCondDB/interface/DCUTag.h @@ -16,7 +16,7 @@ class DCUTag : public ITag { friend class EcalCondDBInterface; DCUTag(); - ~DCUTag(); + ~DCUTag() override; // Methods for user data std::string getGeneralTag() const; @@ -26,8 +26,8 @@ class DCUTag : public ITag { void setLocationDef(const LocationDef& locDef); // Methods using ID - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators inline bool operator==(const DCUTag &t) const diff --git a/OnlineDB/EcalCondDB/interface/DCUVFETempDat.h b/OnlineDB/EcalCondDB/interface/DCUVFETempDat.h index 9e321e0846b94..5575bdaf846d4 100644 --- a/OnlineDB/EcalCondDB/interface/DCUVFETempDat.h +++ b/OnlineDB/EcalCondDB/interface/DCUVFETempDat.h @@ -13,17 +13,17 @@ class DCUVFETempDat : public IDataItem { public: friend class EcalCondDBInterface; DCUVFETempDat(); - ~DCUVFETempDat(); + ~DCUVFETempDat() override; // User data methods - inline std::string getTable() { return "DCU_VFE_TEMP_DAT"; } + inline std::string getTable() override { return "DCU_VFE_TEMP_DAT"; } inline void setVFETemp(float temp) { m_vfeTemp = temp; } inline float getVFETemp() const { return m_vfeTemp; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const DCUVFETempDat* item, DCUIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/DateHandler.h b/OnlineDB/EcalCondDB/interface/DateHandler.h index 1b43f7444828b..f21be81ff1b16 100644 --- a/OnlineDB/EcalCondDB/interface/DateHandler.h +++ b/OnlineDB/EcalCondDB/interface/DateHandler.h @@ -51,7 +51,7 @@ class DateHandler { Tm dateToTm(oracle::occi::Date& date) const; private: - DateHandler(); // hide the default constructor + DateHandler() = delete; // hide the default constructor oracle::occi::Connection* m_conn; oracle::occi::Environment* m_env; diff --git a/OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h b/OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h index 7d07eb4951cac..894212571b8a6 100644 --- a/OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h +++ b/OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h @@ -88,8 +88,8 @@ class EcalCondDBInterface : public EcalDBConnection { /** * Destructor */ - virtual ~EcalCondDBInterface() - noexcept(false) + ~EcalCondDBInterface() + noexcept(false) override { // call the parent destructor @@ -685,7 +685,7 @@ class EcalCondDBInterface : public EcalDBConnection { inline int getDetIdFromLogicId(int logic_id) { int detid = -1; - if (_logicId2DetId.size() == 0) { + if (_logicId2DetId.empty()) { fillLogicId2DetIdMaps(); } if (_logicId2DetId.find(logic_id) != _logicId2DetId.end()) { @@ -696,7 +696,7 @@ class EcalCondDBInterface : public EcalDBConnection { inline int getLogicIdFromDetId(int det_id) { int logic_id = -1; - if (_logicId2DetId.size() == 0) { + if (_logicId2DetId.empty()) { fillLogicId2DetIdMaps(); } if (_detId2LogicId.find(det_id) != _detId2LogicId.end()) { @@ -706,14 +706,14 @@ class EcalCondDBInterface : public EcalDBConnection { } inline std::map getLogicId2DetIdMap() { - if (_logicId2DetId.size() == 0) { + if (_logicId2DetId.empty()) { fillLogicId2DetIdMaps(); } return _logicId2DetId; } inline std::map getDetId2LogicIdMap() { - if (_logicId2DetId.size() == 0) { + if (_logicId2DetId.empty()) { fillLogicId2DetIdMaps(); } return _detId2LogicId; @@ -735,8 +735,8 @@ class EcalCondDBInterface : public EcalDBConnection { DateHandler* dh; - EcalCondDBInterface(); - EcalCondDBInterface(const EcalCondDBInterface& copy); + EcalCondDBInterface() = delete; + EcalCondDBInterface(const EcalCondDBInterface& copy) = delete; std::map _logicId2DetId; std::map _detId2LogicId; diff --git a/OnlineDB/EcalCondDB/interface/FEConfigBadStripDat.h b/OnlineDB/EcalCondDB/interface/FEConfigBadStripDat.h index bcd630777a50f..092e840088069 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigBadStripDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigBadStripDat.h @@ -11,10 +11,10 @@ class FEConfigBadStripDat : public IODConfig { public: friend class EcalCondDBInterface; FEConfigBadStripDat(); - ~FEConfigBadStripDat(); + ~FEConfigBadStripDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_BadST_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_BadST_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -37,7 +37,7 @@ class FEConfigBadStripDat : public IODConfig { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const FEConfigBadStripDat* item, FEConfigBadStripInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigBadStripInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigBadStripInfo.h index 9380978465f11..8f1c6faafbcee 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigBadStripInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigBadStripInfo.h @@ -10,10 +10,10 @@ class FEConfigBadStripInfo : public IODConfig { public: friend class EcalCondDBInterface; FEConfigBadStripInfo(); - ~FEConfigBadStripInfo(); + ~FEConfigBadStripInfo() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_BadST_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_BadST_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class FEConfigBadStripInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigBadTTDat.h b/OnlineDB/EcalCondDB/interface/FEConfigBadTTDat.h index 649ef1921c4cb..619e335fc9aa8 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigBadTTDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigBadTTDat.h @@ -11,10 +11,10 @@ class FEConfigBadTTDat : public IODConfig { public: friend class EcalCondDBInterface; FEConfigBadTTDat(); - ~FEConfigBadTTDat(); + ~FEConfigBadTTDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_BadTT_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_BadTT_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -34,7 +34,7 @@ class FEConfigBadTTDat : public IODConfig { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const FEConfigBadTTDat* item, FEConfigBadTTInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigBadTTInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigBadTTInfo.h index 4332c23597963..b6baeb4e898d6 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigBadTTInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigBadTTInfo.h @@ -10,10 +10,10 @@ class FEConfigBadTTInfo : public IODConfig { public: friend class EcalCondDBInterface; FEConfigBadTTInfo(); - ~FEConfigBadTTInfo(); + ~FEConfigBadTTInfo() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_BADTT_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_BADTT_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class FEConfigBadTTInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigBadXTDat.h b/OnlineDB/EcalCondDB/interface/FEConfigBadXTDat.h index 99ce22642769b..4240ef95be48d 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigBadXTDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigBadXTDat.h @@ -11,10 +11,10 @@ class FEConfigBadXTDat : public IODConfig { public: friend class EcalCondDBInterface; FEConfigBadXTDat(); - ~FEConfigBadXTDat(); + ~FEConfigBadXTDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_BadCRYSTALS_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_BadCRYSTALS_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -37,7 +37,7 @@ class FEConfigBadXTDat : public IODConfig { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const FEConfigBadXTDat* item, FEConfigBadXTInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigBadXTInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigBadXTInfo.h index 84cd8eab5eff2..fc033efc8307d 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigBadXTInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigBadXTInfo.h @@ -10,10 +10,10 @@ class FEConfigBadXTInfo : public IODConfig { public: friend class EcalCondDBInterface; FEConfigBadXTInfo(); - ~FEConfigBadXTInfo(); + ~FEConfigBadXTInfo() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_BadCrystals_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_BadCrystals_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class FEConfigBadXTInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigFgrDat.h b/OnlineDB/EcalCondDB/interface/FEConfigFgrDat.h index c0efcb5016ea4..5274f4e10e1d2 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigFgrDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigFgrDat.h @@ -12,16 +12,16 @@ class FEConfigFgrDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigFgrDat(); - ~FEConfigFgrDat(); + ~FEConfigFgrDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_FGR_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_FGR_DAT"; } inline void setFgrGroupId(int x) { m_group_id = x; } inline int getFgrGroupId() const { return m_group_id; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigFgrDat* item, FEConfigFgrInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigFgrEEStripDat.h b/OnlineDB/EcalCondDB/interface/FEConfigFgrEEStripDat.h index 734e90d2c7b6b..cf53c43cf2b63 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigFgrEEStripDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigFgrEEStripDat.h @@ -12,10 +12,10 @@ class FEConfigFgrEEStripDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigFgrEEStripDat(); - ~FEConfigFgrEEStripDat(); + ~FEConfigFgrEEStripDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_FGREEST_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_FGREEST_DAT"; } inline void setThreshold(unsigned int mean) { m_thresh = mean; } inline unsigned int getThreshold() const { return m_thresh; } @@ -27,7 +27,7 @@ class FEConfigFgrEEStripDat : public IDataItem { inline unsigned int getLutFgr() const { return m_lut_fg; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigFgrEEStripDat* item, FEConfigFgrInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigFgrEETowerDat.h b/OnlineDB/EcalCondDB/interface/FEConfigFgrEETowerDat.h index cfcfaaaef1137..f97223af31b43 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigFgrEETowerDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigFgrEETowerDat.h @@ -12,10 +12,10 @@ class FEConfigFgrEETowerDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigFgrEETowerDat(); - ~FEConfigFgrEETowerDat(); + ~FEConfigFgrEETowerDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_FGREETT_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_FGREETT_DAT"; } inline void setLUTValue(int mean) { m_lut = mean; } inline int getLUTValue() const { return m_lut; } @@ -23,7 +23,7 @@ class FEConfigFgrEETowerDat : public IDataItem { inline int getLutValue() const { return m_lut; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigFgrEETowerDat* item, FEConfigFgrInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigFgrGroupDat.h b/OnlineDB/EcalCondDB/interface/FEConfigFgrGroupDat.h index b51eb98a3e4ad..d98427424ab8a 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigFgrGroupDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigFgrGroupDat.h @@ -12,10 +12,10 @@ class FEConfigFgrGroupDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigFgrGroupDat(); - ~FEConfigFgrGroupDat(); + ~FEConfigFgrGroupDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_FGR_PER_GROUP_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_FGR_PER_GROUP_DAT"; } inline void setFgrGroupId(int x) { m_group_id = x; } inline int getFgrGroupId() const { return m_group_id; } @@ -32,7 +32,7 @@ class FEConfigFgrGroupDat : public IDataItem { inline int getLUTValue() const { return m_lut; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigFgrGroupDat* item, FEConfigFgrInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigFgrInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigFgrInfo.h index 8c7cc5171e0ac..50a0bb632b379 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigFgrInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigFgrInfo.h @@ -13,10 +13,10 @@ class FEConfigFgrInfo : public IODConfig { friend class EcalCondDBInterface; FEConfigFgrInfo(); - ~FEConfigFgrInfo(); + ~FEConfigFgrInfo() override; // Methods for user data - inline std::string getTable() { return "FE_CONFIG_FGR_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_FGR_INFO"; } inline void setNumberOfGroups(int iov_id){ m_iov_id = iov_id; } @@ -53,7 +53,7 @@ class FEConfigFgrInfo : public IODConfig { Tm m_db_time; int m_version; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(FEConfigFgrInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigFgrParamDat.h b/OnlineDB/EcalCondDB/interface/FEConfigFgrParamDat.h index 77bf38864c30d..cf5e94ff9b0f2 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigFgrParamDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigFgrParamDat.h @@ -12,10 +12,10 @@ class FEConfigFgrParamDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigFgrParamDat(); - ~FEConfigFgrParamDat(); + ~FEConfigFgrParamDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_FGRPARAM_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_FGRPARAM_DAT"; } inline void setFGlowthresh(float x) { m_fglowthresh = x; } @@ -29,7 +29,7 @@ class FEConfigFgrParamDat : public IDataItem { inline float getFGhighratio() const { return m_highratio; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigFgrParamDat* item, FEConfigFgrInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigLUTDat.h b/OnlineDB/EcalCondDB/interface/FEConfigLUTDat.h index ae4c8ec96f053..e04c5ec0352e5 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigLUTDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigLUTDat.h @@ -12,16 +12,16 @@ class FEConfigLUTDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigLUTDat(); - ~FEConfigLUTDat(); + ~FEConfigLUTDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_LUT_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_LUT_DAT"; } inline void setLUTGroupId(int x) { m_group_id = x; } inline int getLUTGroupId() const { return m_group_id; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigLUTDat* item, FEConfigLUTInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigLUTGroupDat.h b/OnlineDB/EcalCondDB/interface/FEConfigLUTGroupDat.h index 1649bf526e34a..3e803e67b4299 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigLUTGroupDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigLUTGroupDat.h @@ -12,10 +12,10 @@ class FEConfigLUTGroupDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigLUTGroupDat(); - ~FEConfigLUTGroupDat(); + ~FEConfigLUTGroupDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_LUT_PER_GROUP_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_LUT_PER_GROUP_DAT"; } inline void setLUTGroupId(int x) { m_group_id = x; } inline int getLUTGroupId() const { return m_group_id; } @@ -26,7 +26,7 @@ class FEConfigLUTGroupDat : public IDataItem { private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigLUTGroupDat* item, FEConfigLUTInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigLUTInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigLUTInfo.h index e09f303257789..f523058eacbc7 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigLUTInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigLUTInfo.h @@ -13,10 +13,10 @@ class FEConfigLUTInfo : public IODConfig { friend class EcalCondDBInterface; FEConfigLUTInfo(); - ~FEConfigLUTInfo(); + ~FEConfigLUTInfo() override; // Methods for user data - inline std::string getTable() { return "FE_CONFIG_LUT_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_LUT_INFO"; } inline void setNumberOfGroups(int iov_id){ m_iov_id = iov_id; } @@ -53,7 +53,7 @@ class FEConfigLUTInfo : public IODConfig { Tm m_db_time; int m_version; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(FEConfigLUTInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigLUTParamDat.h b/OnlineDB/EcalCondDB/interface/FEConfigLUTParamDat.h index ec18fd7232e00..4acb4741ebc3b 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigLUTParamDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigLUTParamDat.h @@ -12,10 +12,10 @@ class FEConfigLUTParamDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigLUTParamDat(); - ~FEConfigLUTParamDat(); + ~FEConfigLUTParamDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_LUTPARAM_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_LUTPARAM_DAT"; } inline void setETSat(float x) { m_etsat = x; } @@ -29,7 +29,7 @@ class FEConfigLUTParamDat : public IDataItem { inline float getTTThreshhigh() const{ return m_tthreshhigh; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigLUTParamDat* item, FEConfigLUTInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigLinDat.h b/OnlineDB/EcalCondDB/interface/FEConfigLinDat.h index 466384e7c1153..1569555296fb4 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigLinDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigLinDat.h @@ -12,10 +12,10 @@ class FEConfigLinDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigLinDat(); - ~FEConfigLinDat(); + ~FEConfigLinDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_LIN_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_LIN_DAT"; } inline void setMultX12(int x) { m_multx12 = x; } inline void setMultX6(int x) { m_multx6 = x; } @@ -33,7 +33,7 @@ class FEConfigLinDat : public IDataItem { inline int getShift1() const { return m_shift1; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigLinDat* item, FEConfigLinInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigLinInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigLinInfo.h index b62646afe15c0..e3aac69d95a1f 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigLinInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigLinInfo.h @@ -13,10 +13,10 @@ class FEConfigLinInfo : public IODConfig { friend class EcalCondDBInterface; FEConfigLinInfo(); - ~FEConfigLinInfo(); + ~FEConfigLinInfo() override; // Methods for user data - inline std::string getTable() { return "FE_CONFIG_LIN_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_LIN_INFO"; } inline void setIOVId(int iov_id){ m_iov_id = iov_id; } @@ -53,7 +53,7 @@ class FEConfigLinInfo : public IODConfig { Tm m_db_time; int m_version; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(FEConfigLinInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigLinParamDat.h b/OnlineDB/EcalCondDB/interface/FEConfigLinParamDat.h index 36d724c44c91a..abaed16cab51a 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigLinParamDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigLinParamDat.h @@ -12,10 +12,10 @@ class FEConfigLinParamDat : public IDataItem { public: friend class EcalCondDBInterface; FEConfigLinParamDat(); - ~FEConfigLinParamDat(); + ~FEConfigLinParamDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_LINPARAM_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_LINPARAM_DAT"; } inline void setETSat(float x) { m_etsat = x; } @@ -23,7 +23,7 @@ class FEConfigLinParamDat : public IDataItem { inline float getETSat() const { return m_etsat; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigLinParamDat* item, FEConfigLinInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigMainInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigMainInfo.h index f7a05d7c58de7..0e72cb68d9237 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigMainInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigMainInfo.h @@ -21,9 +21,9 @@ class FEConfigMainInfo : public IODConfig { friend class EcalCondDBInterface; FEConfigMainInfo(); - ~FEConfigMainInfo(); + ~FEConfigMainInfo() override; - inline std::string getTable() { return "FE_CONFIG_MAIN"; } + inline std::string getTable() override { return "FE_CONFIG_MAIN"; } // Methods for user data inline void setId(int id) { m_ID = id; } @@ -96,7 +96,7 @@ int getBstId()const {return m_bst_id; } Tm m_db_time; std::string m_description; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(FEConfigMainInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigParamDat.h b/OnlineDB/EcalCondDB/interface/FEConfigParamDat.h index 2c858dd693ed1..a5af8aa97ad6c 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigParamDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigParamDat.h @@ -12,10 +12,10 @@ class FEConfigParamDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigParamDat(); - ~FEConfigParamDat(); + ~FEConfigParamDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_PARAM_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_PARAM_DAT"; } inline void setETSat(float x) { m_etsat = x; } @@ -36,7 +36,7 @@ class FEConfigParamDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigParamDat* item, FEConfigLinInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigPedDat.h b/OnlineDB/EcalCondDB/interface/FEConfigPedDat.h index 9612480280baa..3a02a9014c4ae 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigPedDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigPedDat.h @@ -12,10 +12,10 @@ class FEConfigPedDat : public IDataItem { public: friend class EcalCondDBInterface; FEConfigPedDat(); - ~FEConfigPedDat(); + ~FEConfigPedDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_PED_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_PED_DAT"; } inline void setId(int x) { m_ID = x; } inline int getId() const { return m_ID; } @@ -31,7 +31,7 @@ class FEConfigPedDat : public IDataItem { private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigPedDat* item, FEConfigPedInfo* iconf ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigPedInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigPedInfo.h index 211526887a3f3..acfa9c205a716 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigPedInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigPedInfo.h @@ -13,10 +13,10 @@ class FEConfigPedInfo : public IODConfig { friend class EcalCondDBInterface; FEConfigPedInfo(); - ~FEConfigPedInfo(); + ~FEConfigPedInfo() override; // Methods for user data - inline std::string getTable() { return "FE_CONFIG_PED_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_PED_INFO"; } inline void setIOVId(int iov_id){ m_iov_id = iov_id; } @@ -53,7 +53,7 @@ class FEConfigPedInfo : public IODConfig { Tm m_db_time; int m_version; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(FEConfigPedInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigSlidingDat.h b/OnlineDB/EcalCondDB/interface/FEConfigSlidingDat.h index 404672cdd69de..43d90c8c98012 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigSlidingDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigSlidingDat.h @@ -12,16 +12,16 @@ class FEConfigSlidingDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigSlidingDat(); - ~FEConfigSlidingDat(); + ~FEConfigSlidingDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_SLIDING_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_SLIDING_DAT"; } inline void setSliding(float mean) { m_sliding = mean; } inline float getSliding() const { return m_sliding; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigSlidingDat* item, FEConfigSlidingInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigSlidingInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigSlidingInfo.h index ab8cb56225739..c4a61873d9c73 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigSlidingInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigSlidingInfo.h @@ -13,10 +13,10 @@ class FEConfigSlidingInfo : public IODConfig { friend class EcalCondDBInterface; FEConfigSlidingInfo(); - ~FEConfigSlidingInfo(); + ~FEConfigSlidingInfo() override; // Methods for user data - inline std::string getTable() { return "FE_CONFIG_SLIDING_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_SLIDING_INFO"; } inline void setIOVId(int iov_id){ m_iov_id = iov_id; } @@ -53,7 +53,7 @@ class FEConfigSlidingInfo : public IODConfig { Tm m_db_time; int m_version; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(FEConfigSlidingInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigSpikeDat.h b/OnlineDB/EcalCondDB/interface/FEConfigSpikeDat.h index 480c1f6a80593..d3d5e9d41cec4 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigSpikeDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigSpikeDat.h @@ -12,16 +12,16 @@ class FEConfigSpikeDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigSpikeDat(); - ~FEConfigSpikeDat(); + ~FEConfigSpikeDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_SPIKE_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_SPIKE_DAT"; } inline void setSpikeThreshold(int x) { m_thr = x; } inline int getSpikeThreshold() const { return m_thr; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigSpikeDat* item, FEConfigSpikeInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigSpikeInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigSpikeInfo.h index e9ad6e05746f6..7e0c38b4bd0b8 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigSpikeInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigSpikeInfo.h @@ -13,10 +13,10 @@ class FEConfigSpikeInfo : public IODConfig { friend class EcalCondDBInterface; FEConfigSpikeInfo(); - ~FEConfigSpikeInfo(); + ~FEConfigSpikeInfo() override; // Methods for user data - inline std::string getTable() { return "FE_CONFIG_SPIKE_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_SPIKE_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -49,7 +49,7 @@ class FEConfigSpikeInfo : public IODConfig { Tm m_db_time; int m_version; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(FEConfigSpikeInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigTimingDat.h b/OnlineDB/EcalCondDB/interface/FEConfigTimingDat.h index fbbbe02689420..9c9d5d9acd05e 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigTimingDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigTimingDat.h @@ -12,10 +12,10 @@ class FEConfigTimingDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigTimingDat(); - ~FEConfigTimingDat(); + ~FEConfigTimingDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_Time_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_Time_DAT"; } inline void setTimingPar1(int x) { m_par1 = x; } inline int getTimingPar1() const { return m_par1; } @@ -23,7 +23,7 @@ class FEConfigTimingDat : public IDataItem { inline int getTimingPar2() const { return m_par2; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigTimingDat* item, FEConfigTimingInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigTimingInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigTimingInfo.h index c7738d3a015eb..6fb11a9ecb01e 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigTimingInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigTimingInfo.h @@ -13,10 +13,10 @@ class FEConfigTimingInfo : public IODConfig { friend class EcalCondDBInterface; FEConfigTimingInfo(); - ~FEConfigTimingInfo(); + ~FEConfigTimingInfo() override; // Methods for user data - inline std::string getTable() { return "FE_CONFIG_TIME_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_TIME_INFO"; } inline void setId(int id) { m_ID = id; } @@ -49,7 +49,7 @@ class FEConfigTimingInfo : public IODConfig { Tm m_db_time; int m_version; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(FEConfigTimingInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigWeightDat.h b/OnlineDB/EcalCondDB/interface/FEConfigWeightDat.h index c5334d7f557ba..aec5fd04855d5 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigWeightDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigWeightDat.h @@ -12,16 +12,16 @@ class FEConfigWeightDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigWeightDat(); - ~FEConfigWeightDat(); + ~FEConfigWeightDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_WEIGHT_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_WEIGHT_DAT"; } inline void setWeightGroupId(int x) { m_group_id = x; } inline int getWeightGroupId() const { return m_group_id; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigWeightDat* item, FEConfigWeightInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigWeightGroupDat.h b/OnlineDB/EcalCondDB/interface/FEConfigWeightGroupDat.h index 202746ccd228a..d427e7f07d343 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigWeightGroupDat.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigWeightGroupDat.h @@ -12,10 +12,10 @@ class FEConfigWeightGroupDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need FEConfigWeightGroupDat(); - ~FEConfigWeightGroupDat(); + ~FEConfigWeightGroupDat() override; // User data methods - inline std::string getTable() { return "FE_CONFIG_WEIGHT_PER_GROUP_DAT"; } + inline std::string getTable() override { return "FE_CONFIG_WEIGHT_PER_GROUP_DAT"; } inline void setWeightGroupId(int x) { m_group_id = x; } inline int getWeightGroupId() const { return m_group_id; } @@ -32,7 +32,7 @@ class FEConfigWeightGroupDat : public IDataItem { inline float getWeight4() const { return m_w4; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const FEConfigWeightGroupDat* item, FEConfigWeightInfo* iconf) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/FEConfigWeightInfo.h b/OnlineDB/EcalCondDB/interface/FEConfigWeightInfo.h index 0973fb0f2d702..feba539ef8051 100644 --- a/OnlineDB/EcalCondDB/interface/FEConfigWeightInfo.h +++ b/OnlineDB/EcalCondDB/interface/FEConfigWeightInfo.h @@ -13,10 +13,10 @@ class FEConfigWeightInfo : public IODConfig { friend class EcalCondDBInterface; FEConfigWeightInfo(); - ~FEConfigWeightInfo(); + ~FEConfigWeightInfo() override; // Methods for user data - inline std::string getTable() { return "FE_CONFIG_WEIGHT_INFO"; } + inline std::string getTable() override { return "FE_CONFIG_WEIGHT_INFO"; } void setNumberOfGroups(int n){m_ngr=n;} @@ -53,7 +53,7 @@ class FEConfigWeightInfo : public IODConfig { Tm m_db_time; int m_version; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(FEConfigWeightInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/IDBObject.h b/OnlineDB/EcalCondDB/interface/IDBObject.h index 53011f535db43..06ad793760d15 100644 --- a/OnlineDB/EcalCondDB/interface/IDBObject.h +++ b/OnlineDB/EcalCondDB/interface/IDBObject.h @@ -40,7 +40,7 @@ class IDBObject { void checkConnection() const noexcept(false) { - if (m_conn == NULL) { + if (m_conn == nullptr) { throw std::runtime_error("ERROR: Connection was not set"); } } diff --git a/OnlineDB/EcalCondDB/interface/IDataItem.h b/OnlineDB/EcalCondDB/interface/IDataItem.h index 30d98750c8cbb..3e68ce76972cb 100644 --- a/OnlineDB/EcalCondDB/interface/IDataItem.h +++ b/OnlineDB/EcalCondDB/interface/IDataItem.h @@ -17,8 +17,8 @@ class IDataItem : public IDBObject { public: IDataItem() - : m_writeStmt(0), - m_readStmt(0) + : m_writeStmt(nullptr), + m_readStmt(nullptr) {} virtual std::string getTable() =0; @@ -30,14 +30,14 @@ class IDataItem : public IDBObject { inline void checkPrepare() noexcept(false) { - if (m_writeStmt == NULL) { + if (m_writeStmt == nullptr) { throw(std::runtime_error("Write statement not prepared")); } } inline void terminateWriteStatement() noexcept(false) { - if (m_writeStmt != NULL) { + if (m_writeStmt != nullptr) { m_conn->terminateStatement(m_writeStmt); } else { std::cout << "Warning from IDataItem: statement was aleady closed"<< std::endl; @@ -57,7 +57,7 @@ class IDataItem : public IDBObject { inline void terminateReadStatement() noexcept(false) { - if (m_readStmt != NULL) { + if (m_readStmt != nullptr) { m_conn->terminateStatement(m_readStmt); } else { std::cout << "Warning from IDataItem: statement was aleady closed"<< std::endl; diff --git a/OnlineDB/EcalCondDB/interface/IODConfig.h b/OnlineDB/EcalCondDB/interface/IODConfig.h index 9b4f008faf8bf..46d5a9a867819 100644 --- a/OnlineDB/EcalCondDB/interface/IODConfig.h +++ b/OnlineDB/EcalCondDB/interface/IODConfig.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include @@ -38,14 +38,14 @@ class IODConfig : public IDBObject { inline void checkPrepare() noexcept(false) { - if (m_writeStmt == NULL) { + if (m_writeStmt == nullptr) { throw(std::runtime_error("Write statement not prepared")); } } inline void terminateWriteStatement() noexcept(false) { - if (m_writeStmt != NULL) { + if (m_writeStmt != nullptr) { m_conn->terminateStatement(m_writeStmt); } else { std::cout << "Warning from IDataItem: statement was aleady closed"<< std::endl; @@ -65,7 +65,7 @@ class IODConfig : public IDBObject { inline void terminateReadStatement() noexcept(false) { - if (m_readStmt != NULL) { + if (m_readStmt != nullptr) { m_conn->terminateStatement(m_readStmt); } else { std::cout << "Warning from IDataItem: statement was aleady closed"<< std::endl; diff --git a/OnlineDB/EcalCondDB/interface/ITimingDat.h b/OnlineDB/EcalCondDB/interface/ITimingDat.h index 50c9c8def8717..18dac555410d2 100644 --- a/OnlineDB/EcalCondDB/interface/ITimingDat.h +++ b/OnlineDB/EcalCondDB/interface/ITimingDat.h @@ -23,23 +23,23 @@ class ITimingDat : public IDataItem { ITimingDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_timingMean = 0; m_timingRMS = 0; - m_taskStatus=0; + m_taskStatus=false; }; - ~ITimingDat(){}; + ~ITimingDat() override{}; // User data methods - inline std::string getTable() { return m_table_name;} + inline std::string getTable() override { return m_table_name;} inline void setTable(std::string x) { m_table_name=x; } inline void setTimingMean(float mean) { m_timingMean = mean; } @@ -53,7 +53,7 @@ ITimingDat() private: -void prepareWrite() noexcept(false) +void prepareWrite() noexcept(false) override { this->checkConnection(); diff --git a/OnlineDB/EcalCondDB/interface/LMFClsDat.h b/OnlineDB/EcalCondDB/interface/LMFClsDat.h index 12463535f60bd..ba105006a827d 100644 --- a/OnlineDB/EcalCondDB/interface/LMFClsDat.h +++ b/OnlineDB/EcalCondDB/interface/LMFClsDat.h @@ -7,7 +7,7 @@ #include "OnlineDB/EcalCondDB/interface/LMFColoredTable.h" -#include +#include /** * LMF_CLS_XXXX_DAT interface @@ -32,14 +32,14 @@ class LMFClsDat : public LMFColoredTable { LMFClsDat(oracle::occi::Environment* env, oracle::occi::Connection* conn, int color); LMFClsDat(EcalDBConnection *c, int color); - ~LMFClsDat() {} + ~LMFClsDat() override {} - std::string getTableName() const { + std::string getTableName() const override { return "LMF_CLS_" + getColor() + "_DAT"; } - LMFClsDat& setSystem(int system) { return *this; } - LMFClsDat& setSystem(std::string system) { return *this; } + LMFClsDat& setSystem(int system) override { return *this; } + LMFClsDat& setSystem(std::string system) override { return *this; } LMFClsDat& setLMFRefRunIOVID(EcalLogicID &id, int v); LMFClsDat& setMean(EcalLogicID &id, float v); @@ -59,9 +59,9 @@ class LMFClsDat : public LMFColoredTable { int getFlag(EcalLogicID &id); float getFlagNorm(EcalLogicID &id); - std::string getSystem() const { return ""; } + std::string getSystem() const override { return ""; } - bool isValid(); + bool isValid() override; // to do: complete list of set/get methods private: diff --git a/OnlineDB/EcalCondDB/interface/LMFColor.h b/OnlineDB/EcalCondDB/interface/LMFColor.h index 10d094b6fd580..5faa8df99c078 100644 --- a/OnlineDB/EcalCondDB/interface/LMFColor.h +++ b/OnlineDB/EcalCondDB/interface/LMFColor.h @@ -18,7 +18,7 @@ class LMFColor : public LMFUnique { oracle::occi::Connection* conn); LMFColor(EcalDBConnection *c); LMFColor(EcalDBConnection *c, std::string col); - ~LMFColor(); + ~LMFColor() override; LMFColor& setName(const std::string &s = "blue") { setString("sname", s); @@ -46,7 +46,7 @@ class LMFColor : public LMFUnique { int getColorIndex() const { return getInt("color"); } int getColor() const { return getColorIndex(); } - bool isValid(); + bool isValid() override; // Operators inline bool operator==(const LMFColor &m) const @@ -58,11 +58,11 @@ class LMFColor : public LMFUnique { inline bool operator!=(const LMFColor &m) const { return !(*this == m); } private: - std::string fetchIdSql(Statement *stmt); - std::string fetchAllSql(Statement *stmt) const; - std::string setByIDSql(Statement *stmt, int id); - void getParameters(ResultSet *rset); - LMFUnique *createObject() const; + std::string fetchIdSql(Statement *stmt) override; + std::string fetchAllSql(Statement *stmt) const override; + std::string setByIDSql(Statement *stmt, int id) override; + void getParameters(ResultSet *rset) override; + LMFUnique *createObject() const override; }; #endif diff --git a/OnlineDB/EcalCondDB/interface/LMFColoredTable.h b/OnlineDB/EcalCondDB/interface/LMFColoredTable.h index 8bf3afbde114c..a136c4f660b1e 100644 --- a/OnlineDB/EcalCondDB/interface/LMFColoredTable.h +++ b/OnlineDB/EcalCondDB/interface/LMFColoredTable.h @@ -23,9 +23,9 @@ class LMFColoredTable : public LMFDat { LMFColoredTable(EcalDBConnection *c); LMFColoredTable(oracle::occi::Environment* env, oracle::occi::Connection* conn); - ~LMFColoredTable() {} + ~LMFColoredTable() override {} - virtual std::string getTableName() const = 0; + std::string getTableName() const override = 0; std::string getColor() const; virtual std::string getSystem() const; @@ -69,7 +69,7 @@ class LMFColoredTable : public LMFDat { return getData(id, "VMAX"); } - int writeDB() noexcept(false); + int writeDB() noexcept(false) override; protected: diff --git a/OnlineDB/EcalCondDB/interface/LMFCorrCoefDatComponent.h b/OnlineDB/EcalCondDB/interface/LMFCorrCoefDatComponent.h index 99c758864bf3e..26c1ed82d452f 100644 --- a/OnlineDB/EcalCondDB/interface/LMFCorrCoefDatComponent.h +++ b/OnlineDB/EcalCondDB/interface/LMFCorrCoefDatComponent.h @@ -26,7 +26,7 @@ class LMFCorrCoefDatComponent: public LMFDat { LMFCorrCoefDatComponent(EcalDBConnection *c); LMFCorrCoefDatComponent(oracle::occi::Environment* env, oracle::occi::Connection* conn); - ~LMFCorrCoefDatComponent() {}; + ~LMFCorrCoefDatComponent() override {}; LMFCorrCoefDatComponent& setLMFLmrSubIOV(const LMFLmrSubIOV &iov); LMFCorrCoefDatComponent& setP123(const EcalLogicID &id, float p1, float p2, float p3); @@ -49,10 +49,10 @@ class LMFCorrCoefDatComponent: public LMFDat { int getSeqID(int id); LMFSeqDat getSequence(const EcalLogicID &id); - std::string foreignKeyName() const; - std::string getTableName() const; - std::string getIovIdFieldName() const; - int writeDB() noexcept(false); + std::string foreignKeyName() const override; + std::string getTableName() const override; + std::string getIovIdFieldName() const override; + int writeDB() noexcept(false) override; private: void init(); diff --git a/OnlineDB/EcalCondDB/interface/LMFCorrVers.h b/OnlineDB/EcalCondDB/interface/LMFCorrVers.h index 8a6f08a205c89..f840c13348dc8 100644 --- a/OnlineDB/EcalCondDB/interface/LMFCorrVers.h +++ b/OnlineDB/EcalCondDB/interface/LMFCorrVers.h @@ -22,7 +22,7 @@ class LMFCorrVers : public LMFPrimVers { LMFCorrVers(EcalDBConnection *c); LMFCorrVers(oracle::occi::Environment* env, oracle::occi::Connection* conn); - ~LMFCorrVers(); + ~LMFCorrVers() override; // Operators inline bool operator==(const LMFCorrVers &t) const { @@ -34,11 +34,11 @@ class LMFCorrVers : public LMFPrimVers { private: // Methods from LMFUnique - std::string fetchIdSql(Statement *stmt); - std::string fetchAllSql(Statement *stmt) const; - std::string setByIDSql(Statement *stmt, int id); - void getParameters(ResultSet *rset); - LMFUnique *createObject() const; + std::string fetchIdSql(Statement *stmt) override; + std::string fetchAllSql(Statement *stmt) const override; + std::string setByIDSql(Statement *stmt, int id) override; + void getParameters(ResultSet *rset) override; + LMFUnique *createObject() const override; }; #endif diff --git a/OnlineDB/EcalCondDB/interface/LMFDat.h b/OnlineDB/EcalCondDB/interface/LMFDat.h index a00276e7b844e..7d7aaa909a7c8 100644 --- a/OnlineDB/EcalCondDB/interface/LMFDat.h +++ b/OnlineDB/EcalCondDB/interface/LMFDat.h @@ -24,7 +24,7 @@ class LMFDat : public LMFUnique { LMFDat(EcalDBConnection *c); LMFDat(oracle::occi::Environment* env, oracle::occi::Connection* conn); - ~LMFDat() { } + ~LMFDat() override { } virtual std::string foreignKeyName() const; @@ -121,8 +121,8 @@ class LMFDat : public LMFUnique { return l; } LMFDat& setMaxDataToDump(int n); - void dump() const ; - void dump(int n) const ; + void dump() const override ; + void dump(int n) const override ; virtual void dump(int n, int max) const ; std::map > fetchData() noexcept(false); void fetch() noexcept(false); @@ -133,12 +133,12 @@ class LMFDat : public LMFUnique { void fetch(const EcalLogicID &id, const Tm &tm, int dir) noexcept(false); void fetch(const EcalLogicID &id) noexcept(false); - virtual bool isValid(); + bool isValid() override; void setWhereClause(std::string w); void setWhereClause(std::string w, const std::vector& p); protected: void getNeighbour(LMFDat *dat, int which) noexcept(false); - int writeDB() noexcept(false); + int writeDB() noexcept(false) override; bool check(); void adjustParameters(int n, std::string &sql, Statement *stmt); std::string buildInsertSql(); diff --git a/OnlineDB/EcalCondDB/interface/LMFDefFabric.h b/OnlineDB/EcalCondDB/interface/LMFDefFabric.h index 4948058f1b81c..4073dd67a34c5 100644 --- a/OnlineDB/EcalCondDB/interface/LMFDefFabric.h +++ b/OnlineDB/EcalCondDB/interface/LMFDefFabric.h @@ -28,7 +28,7 @@ class LMFDefFabric: public IDBObject { LMFDefFabric(oracle::occi::Environment* env, oracle::occi::Connection* conn); LMFDefFabric(EcalDBConnection *c); - ~LMFDefFabric(); + ~LMFDefFabric() override; LMFColor getColor(std::string name) const; LMFColor getColor(int color_index) const; diff --git a/OnlineDB/EcalCondDB/interface/LMFIOV.h b/OnlineDB/EcalCondDB/interface/LMFIOV.h index 0975323677b75..36b010572d70d 100644 --- a/OnlineDB/EcalCondDB/interface/LMFIOV.h +++ b/OnlineDB/EcalCondDB/interface/LMFIOV.h @@ -22,7 +22,7 @@ class LMFIOV : public LMFUnique { LMFIOV(EcalDBConnection *c); LMFIOV(const oracle::occi::Environment* env, const oracle::occi::Connection* conn); - ~LMFIOV(); + ~LMFIOV() override; LMFIOV& setStart(const Tm &start); LMFIOV& setStop(const Tm &stop); @@ -36,19 +36,19 @@ class LMFIOV : public LMFUnique { int getVmin() const; int getVmax() const; - void dump() const; + void dump() const override; private: // Methods from LMFUnique - std::string writeDBSql(Statement *stmt); - std::string fetchIdSql(Statement *stmt); + std::string writeDBSql(Statement *stmt) override; + std::string fetchIdSql(Statement *stmt) override; // std::string fetchAllSql(Statement *stmt) const; std::string setByIDSql(Statement *stmt, - int id); + int id) override; - void getParameters(ResultSet *rset); - void fetchParentIDs() {} - LMFUnique * createObject() const; + void getParameters(ResultSet *rset) override; + void fetchParentIDs() override {} + LMFUnique * createObject() const override; Tm m_iov_start; Tm m_iov_stop; diff --git a/OnlineDB/EcalCondDB/interface/LMFLaserConfigDat.h b/OnlineDB/EcalCondDB/interface/LMFLaserConfigDat.h index c9b4fc052b7a2..f0c8d3f53f5be 100644 --- a/OnlineDB/EcalCondDB/interface/LMFLaserConfigDat.h +++ b/OnlineDB/EcalCondDB/interface/LMFLaserConfigDat.h @@ -36,7 +36,7 @@ class LMFLaserConfigDat : public LMFDat { m_keys["LSR_DELAY_1"] = 6; m_keys["LSR_DELAY_2"] = 7; } - ~LMFLaserConfigDat() {} + ~LMFLaserConfigDat() override {} LMFLaserConfigDat& setWavelength(EcalLogicID &id, int w) { LMFDat::setData(id, "WAVELENGTH", w); diff --git a/OnlineDB/EcalCondDB/interface/LMFLaserPulseDat.h b/OnlineDB/EcalCondDB/interface/LMFLaserPulseDat.h index ec5fd453b6ea6..4db125235c591 100644 --- a/OnlineDB/EcalCondDB/interface/LMFLaserPulseDat.h +++ b/OnlineDB/EcalCondDB/interface/LMFLaserPulseDat.h @@ -7,7 +7,7 @@ #include "OnlineDB/EcalCondDB/interface/LMFColoredTable.h" -#include +#include /** * LMF_LASER_XXX_PULSE_DAT interface @@ -30,9 +30,9 @@ class LMFLaserPulseDat : public LMFColoredTable { oracle::occi::Connection* conn, int color); LMFLaserPulseDat(EcalDBConnection *c, std::string color); LMFLaserPulseDat(EcalDBConnection *c, int color); - ~LMFLaserPulseDat() {} + ~LMFLaserPulseDat() override {} - std::string getTableName() const { + std::string getTableName() const override { return "LMF_LASER_" + getColor() + "_PULSE_DAT"; } @@ -66,7 +66,7 @@ class LMFLaserPulseDat : public LMFColoredTable { float getMTQFW80(int id); float getMTQSliding(int id); - bool isValid(); + bool isValid() override; // to do: complete list of set/get methods private: diff --git a/OnlineDB/EcalCondDB/interface/LMFLmrSubIOV.h b/OnlineDB/EcalCondDB/interface/LMFLmrSubIOV.h index 340719e0349eb..78fc1a87de4d8 100644 --- a/OnlineDB/EcalCondDB/interface/LMFLmrSubIOV.h +++ b/OnlineDB/EcalCondDB/interface/LMFLmrSubIOV.h @@ -18,7 +18,7 @@ class LMFLmrSubIOV : public LMFUnique { LMFLmrSubIOV(EcalDBConnection *c); LMFLmrSubIOV(oracle::occi::Environment* env, oracle::occi::Connection* conn); - ~LMFLmrSubIOV(); + ~LMFLmrSubIOV() override; LMFLmrSubIOV& setLMFIOV(const LMFIOV &iov); LMFLmrSubIOV& setLMFIOV(int i); @@ -90,10 +90,10 @@ class LMFLmrSubIOV : public LMFUnique { int m_lmfIOV; Tm m_t[3]; - std::string fetchIdSql(Statement *stmt); - std::string setByIDSql(Statement *stmt, int id); - std::string writeDBSql(Statement *stmt); - void getParameters(ResultSet *rset); + std::string fetchIdSql(Statement *stmt) override; + std::string setByIDSql(Statement *stmt, int id) override; + std::string writeDBSql(Statement *stmt) override; + void getParameters(ResultSet *rset) override; void init(); }; diff --git a/OnlineDB/EcalCondDB/interface/LMFPnPrimDat.h b/OnlineDB/EcalCondDB/interface/LMFPnPrimDat.h index 9808e1453c1ab..c1f55fe6e96af 100644 --- a/OnlineDB/EcalCondDB/interface/LMFPnPrimDat.h +++ b/OnlineDB/EcalCondDB/interface/LMFPnPrimDat.h @@ -7,7 +7,7 @@ #include "OnlineDB/EcalCondDB/interface/LMFColoredTable.h" -#include +#include /** * LMF_YYYY_XXX_PN_PRIM_DAT interface @@ -34,9 +34,9 @@ class LMFPnPrimDat : public LMFColoredTable { oracle::occi::Connection* conn, int color, std::string system); LMFPnPrimDat(EcalDBConnection *c, int color, std::string system); - ~LMFPnPrimDat() {} + ~LMFPnPrimDat() override {} - std::string getTableName() const { + std::string getTableName() const override { return "LMF_" + getSystem() + "_" + getColor() + "_PN_PRIM_DAT"; } @@ -51,7 +51,7 @@ class LMFPnPrimDat : public LMFColoredTable { LMFPnPrimDat& setPNAoverB(EcalLogicID &id, float mean, float rms, float m3); LMFPnPrimDat& setFlag(EcalLogicID &id, int v); - LMFPnPrimDat& setSystem(std::string s); + LMFPnPrimDat& setSystem(std::string s) override; float getMean(EcalLogicID &id); float getRMS(EcalLogicID &id); @@ -71,7 +71,7 @@ class LMFPnPrimDat : public LMFColoredTable { float getShapeCor(int id); int getFlag(int id); - bool isValid(); + bool isValid() override; // to do: complete list of set/get methods private: diff --git a/OnlineDB/EcalCondDB/interface/LMFPrimDat.h b/OnlineDB/EcalCondDB/interface/LMFPrimDat.h index cdbb7c12b77ba..dd5343fcd7fe6 100644 --- a/OnlineDB/EcalCondDB/interface/LMFPrimDat.h +++ b/OnlineDB/EcalCondDB/interface/LMFPrimDat.h @@ -7,7 +7,7 @@ #include "OnlineDB/EcalCondDB/interface/LMFColoredTable.h" -#include +#include /** * LMF_YYYY_XXX_PPRIM_DAT interface @@ -32,9 +32,9 @@ class LMFPrimDat : public LMFColoredTable { oracle::occi::Connection* conn, int color, std::string system); LMFPrimDat(EcalDBConnection *c, int color, std::string system); - ~LMFPrimDat() {} + ~LMFPrimDat() override {} - std::string getTableName() const { + std::string getTableName() const override { return "LMF_" + getSystem() + "_" + getColor() + "_PRIM_DAT"; } @@ -93,7 +93,7 @@ class LMFPrimDat : public LMFColoredTable { float getBeta(int id); float getShapeCorr(int id); - bool isValid(); + bool isValid() override; // to do: complete list of set/get methods private: diff --git a/OnlineDB/EcalCondDB/interface/LMFPrimVers.h b/OnlineDB/EcalCondDB/interface/LMFPrimVers.h index 0748438aa2f78..49a6011e39eaa 100644 --- a/OnlineDB/EcalCondDB/interface/LMFPrimVers.h +++ b/OnlineDB/EcalCondDB/interface/LMFPrimVers.h @@ -27,7 +27,7 @@ class LMFPrimVers : public LMFUnique { LMFPrimVers(EcalDBConnection *c); LMFPrimVers(oracle::occi::Environment* env, oracle::occi::Connection* conn); - ~LMFPrimVers(); + ~LMFPrimVers() override; // Methods for user data int getVersion() const { return m_ID; } @@ -45,11 +45,11 @@ class LMFPrimVers : public LMFUnique { private: // Methods from LMFUnique - std::string fetchIdSql(Statement *stmt); - std::string fetchAllSql(Statement *stmt) const; - std::string setByIDSql(Statement *stmt, int id); - void getParameters(ResultSet *rset); - LMFUnique *createObject() const; + std::string fetchIdSql(Statement *stmt) override; + std::string fetchAllSql(Statement *stmt) const override; + std::string setByIDSql(Statement *stmt, int id) override; + void getParameters(ResultSet *rset) override; + LMFUnique *createObject() const override; }; #endif diff --git a/OnlineDB/EcalCondDB/interface/LMFRunDat.h b/OnlineDB/EcalCondDB/interface/LMFRunDat.h index 7e34e84b0318c..904836b696e14 100644 --- a/OnlineDB/EcalCondDB/interface/LMFRunDat.h +++ b/OnlineDB/EcalCondDB/interface/LMFRunDat.h @@ -1,7 +1,7 @@ #ifndef LMFRUNDAT_H #define LMFRUNDAT_H -#include +#include /* Last updated by Giovanni.Organtini@roma1.infn.it 2010 @@ -18,7 +18,7 @@ class LMFRunDat : public LMFDat { LMFRunDat(EcalDBConnection *conn); LMFRunDat(oracle::occi::Environment* env, oracle::occi::Connection* conn); - ~LMFRunDat() { } + ~LMFRunDat() override { } int getEvents(const EcalLogicID &id) { return (int)rint(LMFDat::getData(id, "NEVENTS")); diff --git a/OnlineDB/EcalCondDB/interface/LMFRunIOV.h b/OnlineDB/EcalCondDB/interface/LMFRunIOV.h index 632b07654edab..521ea3a55a0ca 100644 --- a/OnlineDB/EcalCondDB/interface/LMFRunIOV.h +++ b/OnlineDB/EcalCondDB/interface/LMFRunIOV.h @@ -25,7 +25,7 @@ class LMFRunIOV : public LMFUnique { oracle::occi::Connection* conn); LMFRunIOV(EcalDBConnection *c); LMFRunIOV(const LMFRunIOV &r); - ~LMFRunIOV(); + ~LMFRunIOV() override; // Methods for user data LMFRunIOV& setLMFRunTag(const LMFRunTag &tag); @@ -57,9 +57,9 @@ class LMFRunIOV : public LMFUnique { Tm getSubRunStart() const; Tm getSubRunEnd() const; Tm getDBInsertionTime() const; - bool isValid(); + bool isValid() override; - virtual void dump() const; + void dump() const override; virtual LMFRunIOV& operator=(const LMFRunIOV &r); std::list fetchBySequence(const LMFSeqDat &s); std::list fetchBySequence(const LMFSeqDat &s, int lmr); @@ -83,10 +83,10 @@ class LMFRunIOV : public LMFUnique { bool operator!=(const LMFRunIOV &m) const { return !(*this == m); } - std::string fetchIdSql(Statement *stmt); - std::string setByIDSql(Statement *stmt, int id); - std::string writeDBSql(Statement *stmt); - void getParameters(ResultSet *rset); + std::string fetchIdSql(Statement *stmt) override; + std::string setByIDSql(Statement *stmt, int id) override; + std::string writeDBSql(Statement *stmt) override; + void getParameters(ResultSet *rset) override; private: void checkFabric(); diff --git a/OnlineDB/EcalCondDB/interface/LMFRunTag.h b/OnlineDB/EcalCondDB/interface/LMFRunTag.h index e6e76f9d31c0d..cace834630503 100644 --- a/OnlineDB/EcalCondDB/interface/LMFRunTag.h +++ b/OnlineDB/EcalCondDB/interface/LMFRunTag.h @@ -22,7 +22,7 @@ class LMFRunTag : public LMFUnique { LMFRunTag(oracle::occi::Environment* env, oracle::occi::Connection* conn); LMFRunTag(EcalDBConnection *c); - ~LMFRunTag(); + ~LMFRunTag() override; // Methods for user data std::string getGeneralTag() const; @@ -36,7 +36,7 @@ class LMFRunTag : public LMFUnique { return *this; } - bool isValid(); + bool isValid() override; // Operators inline bool operator==(const LMFRunTag &t) const { @@ -51,11 +51,11 @@ class LMFRunTag : public LMFUnique { private: // Methods from LMFUnique - std::string fetchIdSql(Statement *stmt); - std::string fetchAllSql(Statement *stmt) const; - std::string setByIDSql(Statement *stmt, int id); - void getParameters(ResultSet *rset); - LMFUnique *createObject() const; + std::string fetchIdSql(Statement *stmt) override; + std::string fetchAllSql(Statement *stmt) const override; + std::string setByIDSql(Statement *stmt, int id) override; + void getParameters(ResultSet *rset) override; + LMFUnique *createObject() const override; }; diff --git a/OnlineDB/EcalCondDB/interface/LMFSeqDat.h b/OnlineDB/EcalCondDB/interface/LMFSeqDat.h index a02d2769f129b..a46990de84b2f 100644 --- a/OnlineDB/EcalCondDB/interface/LMFSeqDat.h +++ b/OnlineDB/EcalCondDB/interface/LMFSeqDat.h @@ -19,7 +19,7 @@ class LMFSeqDat : public LMFUnique { LMFSeqDat(oracle::occi::Environment* env, oracle::occi::Connection* conn); LMFSeqDat(EcalDBConnection *c); - ~LMFSeqDat(); + ~LMFSeqDat() override; // Methods for user data LMFSeqDat& setRunIOV(const RunIOV &iov); @@ -48,7 +48,7 @@ class LMFSeqDat : public LMFUnique { int getVmin() const { return getInt("vmin"); } int getVmax() const { return getInt("vmax"); } - bool isValid() const ; + bool isValid() const override ; // Operators bool operator==(const LMFSeqDat &m) const { @@ -84,12 +84,12 @@ class LMFSeqDat : public LMFUnique { void setVmax(int v) { setInt("vmax", v); } - std::string fetchIdSql(Statement *stmt); - std::string setByIDSql(Statement *stmt, int id); - std::string writeDBSql(Statement *stmt); - void getParameters(ResultSet *rset); + std::string fetchIdSql(Statement *stmt) override; + std::string setByIDSql(Statement *stmt, int id) override; + std::string writeDBSql(Statement *stmt) override; + void getParameters(ResultSet *rset) override; - void fetchParentIDs() noexcept(false); + void fetchParentIDs() noexcept(false) override; std::map fetchByRunIOV(const std::vector& par, std::string sql, std::string method) diff --git a/OnlineDB/EcalCondDB/interface/LMFSeqVers.h b/OnlineDB/EcalCondDB/interface/LMFSeqVers.h index e92adef7d7aea..26ae27659a1cc 100644 --- a/OnlineDB/EcalCondDB/interface/LMFSeqVers.h +++ b/OnlineDB/EcalCondDB/interface/LMFSeqVers.h @@ -22,7 +22,7 @@ class LMFSeqVers : public LMFPrimVers { LMFSeqVers(EcalDBConnection *c); LMFSeqVers(oracle::occi::Environment* env, oracle::occi::Connection* conn); - ~LMFSeqVers(); + ~LMFSeqVers() override; // Operators inline bool operator==(const LMFSeqVers &t) const { @@ -34,11 +34,11 @@ class LMFSeqVers : public LMFPrimVers { private: // Methods from LMFUnique - std::string fetchIdSql(Statement *stmt); - std::string fetchAllSql(Statement *stmt) const; - std::string setByIDSql(Statement *stmt, int id); - void getParameters(ResultSet *rset); - LMFUnique *createObject() const; + std::string fetchIdSql(Statement *stmt) override; + std::string fetchAllSql(Statement *stmt) const override; + std::string setByIDSql(Statement *stmt, int id) override; + void getParameters(ResultSet *rset) override; + LMFUnique *createObject() const override; }; #endif diff --git a/OnlineDB/EcalCondDB/interface/LMFTestPulseConfigDat.h b/OnlineDB/EcalCondDB/interface/LMFTestPulseConfigDat.h index 8456999dbba0a..6182234133906 100644 --- a/OnlineDB/EcalCondDB/interface/LMFTestPulseConfigDat.h +++ b/OnlineDB/EcalCondDB/interface/LMFTestPulseConfigDat.h @@ -28,7 +28,7 @@ class LMFTestPulseConfigDat : public LMFDat { m_keys["PN_GAIN"] = 2; m_keys["PN_VINJ"] = 3; } - ~LMFTestPulseConfigDat() {} + ~LMFTestPulseConfigDat() override {} LMFTestPulseConfigDat& setVFEGain(EcalLogicID &id, float g) { LMFDat::setData(id, "VFE_GAIN", g); diff --git a/OnlineDB/EcalCondDB/interface/LMFTrigType.h b/OnlineDB/EcalCondDB/interface/LMFTrigType.h index 8c0b2cdb0aecd..bbcf476632d27 100644 --- a/OnlineDB/EcalCondDB/interface/LMFTrigType.h +++ b/OnlineDB/EcalCondDB/interface/LMFTrigType.h @@ -15,7 +15,7 @@ class LMFTrigType : public LMFUnique { LMFTrigType(EcalDBConnection *c); LMFTrigType(oracle::occi::Environment* env, oracle::occi::Connection* conn); - ~LMFTrigType(); + ~LMFTrigType() override; std::string getShortName() { return getString("short_name"); } std::string getLongName() { return getString("long_name"); } @@ -40,11 +40,11 @@ class LMFTrigType : public LMFUnique { private: // Methods from LMFUnique - std::string fetchIdSql(Statement *stmt); - std::string fetchAllSql(Statement *stmt) const; - std::string setByIDSql(Statement *stmt, int id); - void getParameters(ResultSet *rset); - LMFTrigType * createObject() const; + std::string fetchIdSql(Statement *stmt) override; + std::string fetchAllSql(Statement *stmt) const override; + std::string setByIDSql(Statement *stmt, int id) override; + void getParameters(ResultSet *rset) override; + LMFTrigType * createObject() const override; }; #endif diff --git a/OnlineDB/EcalCondDB/interface/LMFUnique.h b/OnlineDB/EcalCondDB/interface/LMFUnique.h index 9beca01e3ba18..65a72adf3158f 100644 --- a/OnlineDB/EcalCondDB/interface/LMFUnique.h +++ b/OnlineDB/EcalCondDB/interface/LMFUnique.h @@ -22,8 +22,8 @@ class LMFUnique: public IUniqueDBObject { LMFUnique() { _profiling = false; - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; setClassName("LMFUnique"); nodebug(); } @@ -41,7 +41,7 @@ class LMFUnique: public IUniqueDBObject { setConnection(c->getEnv(), c->getConn()); } - virtual ~LMFUnique(); + ~LMFUnique() override; virtual bool isValid() const { return true; } virtual bool isValid() { return true; } @@ -55,12 +55,12 @@ class LMFUnique: public IUniqueDBObject { std::string getClassName() const { return m_className; } std::string getString(std::string fieldname) const; - int fetchID() noexcept(false); + int fetchID() noexcept(false) override; LMFUnique& setString(std::string key, std::string value); LMFUnique& setInt(std::string key, int value); void attach(std::string name, LMFUnique *u); - void setByID(int id) noexcept(false); + void setByID(int id) noexcept(false) override; virtual void dump() const ; virtual void dump(int n) const ; diff --git a/OnlineDB/EcalCondDB/interface/LocationDef.h b/OnlineDB/EcalCondDB/interface/LocationDef.h index e12750f726580..bec22e2c7a4e6 100644 --- a/OnlineDB/EcalCondDB/interface/LocationDef.h +++ b/OnlineDB/EcalCondDB/interface/LocationDef.h @@ -14,15 +14,15 @@ class LocationDef : public IDef { friend class EcalCondDBInterface; LocationDef(); - virtual ~LocationDef(); + ~LocationDef() override; // Methods for user data std::string getLocation() const; void setLocation(std::string loc); // Methods from IUniqueDBObject - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; inline bool operator==(const LocationDef& l) const { return m_loc == l.m_loc; } inline bool operator!=(const LocationDef& l) const { return m_loc != l.m_loc; } diff --git a/OnlineDB/EcalCondDB/interface/MODCCSFEDat.h b/OnlineDB/EcalCondDB/interface/MODCCSFEDat.h index c62727949e12b..9a136a0f9150f 100644 --- a/OnlineDB/EcalCondDB/interface/MODCCSFEDat.h +++ b/OnlineDB/EcalCondDB/interface/MODCCSFEDat.h @@ -12,17 +12,17 @@ class MODCCSFEDat : public IDataItem { public: friend class EcalCondDBInterface; MODCCSFEDat(); - ~MODCCSFEDat(); + ~MODCCSFEDat() override; // User data methods - inline std::string getTable() { return "OD_CCS_FE_DAT"; } + inline std::string getTable() override { return "OD_CCS_FE_DAT"; } inline void setWord(int x) { m_word = x; } inline int getWord() const { return m_word; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MODCCSFEDat* item, MODRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MODCCSHFDat.h b/OnlineDB/EcalCondDB/interface/MODCCSHFDat.h index 4a3f5a76caa02..a60ad1951eca1 100644 --- a/OnlineDB/EcalCondDB/interface/MODCCSHFDat.h +++ b/OnlineDB/EcalCondDB/interface/MODCCSHFDat.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include "OnlineDB/Oracle/interface/Oracle.h" @@ -21,10 +21,10 @@ class MODCCSHFDat : public IDataItem { typedef oracle::occi::Clob Clob; friend class EcalCondDBInterface; MODCCSHFDat(); - ~MODCCSHFDat(); + ~MODCCSHFDat() override; // User data methods - inline std::string getTable() { return "OD_CCS_HF_DAT"; } + inline std::string getTable() override { return "OD_CCS_HF_DAT"; } inline void setClob(unsigned char* x) { m_clob = x; } inline unsigned char* getClob() const { return m_clob; } @@ -40,7 +40,7 @@ class MODCCSHFDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MODCCSHFDat* item, MODRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MODCCSTRDat.h b/OnlineDB/EcalCondDB/interface/MODCCSTRDat.h index 1ed0ed3a96d11..3d2a25e72927d 100644 --- a/OnlineDB/EcalCondDB/interface/MODCCSTRDat.h +++ b/OnlineDB/EcalCondDB/interface/MODCCSTRDat.h @@ -12,17 +12,17 @@ class MODCCSTRDat : public IDataItem { public: friend class EcalCondDBInterface; MODCCSTRDat(); - ~MODCCSTRDat(); + ~MODCCSTRDat() override; // User data methods - inline std::string getTable() { return "OD_CCS_TR_DAT"; } + inline std::string getTable() override { return "OD_CCS_TR_DAT"; } inline void setWord(int x) { m_word = x; } inline int getWord() const { return m_word; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MODCCSTRDat* item, MODRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MODDCCDetailsDat.h b/OnlineDB/EcalCondDB/interface/MODDCCDetailsDat.h index 7c5db395835e4..ca9b89064d150 100644 --- a/OnlineDB/EcalCondDB/interface/MODDCCDetailsDat.h +++ b/OnlineDB/EcalCondDB/interface/MODDCCDetailsDat.h @@ -12,10 +12,10 @@ class MODDCCDetailsDat : public IDataItem { public: friend class EcalCondDBInterface; MODDCCDetailsDat(); - ~MODDCCDetailsDat(); + ~MODDCCDetailsDat() override; // User data methods - inline std::string getTable() { return "OD_DCC_DETAILS_DAT"; } + inline std::string getTable() override { return "OD_DCC_DETAILS_DAT"; } inline void setQPLL(int x) { m_qpll = x; } inline int getQPLL() const { return m_qpll; } @@ -55,7 +55,7 @@ class MODDCCDetailsDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MODDCCDetailsDat* item, MODRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MODDCCOperationDat.h b/OnlineDB/EcalCondDB/interface/MODDCCOperationDat.h index 22aa1b0e951b8..94deed44ecc14 100644 --- a/OnlineDB/EcalCondDB/interface/MODDCCOperationDat.h +++ b/OnlineDB/EcalCondDB/interface/MODDCCOperationDat.h @@ -12,17 +12,17 @@ class MODDCCOperationDat : public IDataItem { public: friend class EcalCondDBInterface; MODDCCOperationDat(); - ~MODDCCOperationDat(); + ~MODDCCOperationDat() override; // User data methods - inline std::string getTable() { return "OD_DCC_OPERATION_DAT"; } + inline std::string getTable() override { return "OD_DCC_OPERATION_DAT"; } inline void setOperation(std::string x) { m_word = x; } inline std::string getOperation() const { return m_word; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MODDCCOperationDat* item, MODRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MODRunIOV.h b/OnlineDB/EcalCondDB/interface/MODRunIOV.h index a5d1f10145fac..bf0540add00a0 100644 --- a/OnlineDB/EcalCondDB/interface/MODRunIOV.h +++ b/OnlineDB/EcalCondDB/interface/MODRunIOV.h @@ -15,7 +15,7 @@ class MODRunIOV : public IIOV { friend class EcalCondDBInterface; MODRunIOV(); - ~MODRunIOV(); + ~MODRunIOV() override; void setID(int id); int getID(){ return m_ID;} ; @@ -31,8 +31,8 @@ class MODRunIOV : public IIOV { Tm getSubRunEnd() const; // Methods from IUniqueDBObject - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators inline bool operator==(const MODRunIOV &m) const diff --git a/OnlineDB/EcalCondDB/interface/MonCrystalConsistencyDat.h b/OnlineDB/EcalCondDB/interface/MonCrystalConsistencyDat.h index 73ebe2e2e6011..663852899a545 100644 --- a/OnlineDB/EcalCondDB/interface/MonCrystalConsistencyDat.h +++ b/OnlineDB/EcalCondDB/interface/MonCrystalConsistencyDat.h @@ -13,10 +13,10 @@ class MonCrystalConsistencyDat : public IDataItem { public: friend class EcalCondDBInterface; MonCrystalConsistencyDat(); - ~MonCrystalConsistencyDat(); + ~MonCrystalConsistencyDat() override; // User data methods - inline std::string getTable() { return "MON_CRYSTAL_CONSISTENCY_DAT"; } + inline std::string getTable() override { return "MON_CRYSTAL_CONSISTENCY_DAT"; } inline void setProcessedEvents(int proc) { m_processedEvents = proc; } inline int getProcessedEvents() const { return m_processedEvents; } @@ -38,7 +38,7 @@ class MonCrystalConsistencyDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonCrystalConsistencyDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonDelaysTTDat.h b/OnlineDB/EcalCondDB/interface/MonDelaysTTDat.h index 9e303f61eaad0..0e54f0e58abfe 100644 --- a/OnlineDB/EcalCondDB/interface/MonDelaysTTDat.h +++ b/OnlineDB/EcalCondDB/interface/MonDelaysTTDat.h @@ -13,10 +13,10 @@ class MonDelaysTTDat : public IDataItem { public: friend class EcalCondDBInterface; MonDelaysTTDat(); - ~MonDelaysTTDat(); + ~MonDelaysTTDat() override; // User data methods - inline std::string getTable() { return "MON_DELAYS_TT_DAT"; } + inline std::string getTable() override { return "MON_DELAYS_TT_DAT"; } inline void setDelayMean(float mean) { m_delayMean = mean; } inline float getDelayMean() const { return m_delayMean; } @@ -30,7 +30,7 @@ class MonDelaysTTDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonDelaysTTDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonH4TablePositionDat.h b/OnlineDB/EcalCondDB/interface/MonH4TablePositionDat.h index 8999816dbc9ab..b06ac0b1e2458 100644 --- a/OnlineDB/EcalCondDB/interface/MonH4TablePositionDat.h +++ b/OnlineDB/EcalCondDB/interface/MonH4TablePositionDat.h @@ -12,10 +12,10 @@ class MonH4TablePositionDat : public IDataItem { public: friend class EcalCondDBInterface; MonH4TablePositionDat(); - ~MonH4TablePositionDat(); + ~MonH4TablePositionDat() override; // User data methods - inline std::string getTable() { return "MON_H4_TABLE_POSITION_DAT"; } + inline std::string getTable() override { return "MON_H4_TABLE_POSITION_DAT"; } inline void setTableX(float x) { m_tableX = x; } inline float getTableX() const { return m_tableX; } @@ -25,7 +25,7 @@ class MonH4TablePositionDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonH4TablePositionDat* item, MonRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonLaserBlueDat.h b/OnlineDB/EcalCondDB/interface/MonLaserBlueDat.h index 95b07327ad95d..3c925e18c2288 100644 --- a/OnlineDB/EcalCondDB/interface/MonLaserBlueDat.h +++ b/OnlineDB/EcalCondDB/interface/MonLaserBlueDat.h @@ -13,10 +13,10 @@ class MonLaserBlueDat : public IDataItem { public: friend class EcalCondDBInterface; MonLaserBlueDat(); - ~MonLaserBlueDat(); + ~MonLaserBlueDat() override; // User data methods - inline std::string getTable() { return "MON_LASER_BLUE_DAT"; } + inline std::string getTable() override { return "MON_LASER_BLUE_DAT"; } inline void setAPDMean(float mean) { m_apdMean = mean; } inline float getAPDMean() const { return m_apdMean; } @@ -36,7 +36,7 @@ class MonLaserBlueDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonLaserBlueDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonLaserGreenDat.h b/OnlineDB/EcalCondDB/interface/MonLaserGreenDat.h index f0c666188798b..49518bb45339f 100644 --- a/OnlineDB/EcalCondDB/interface/MonLaserGreenDat.h +++ b/OnlineDB/EcalCondDB/interface/MonLaserGreenDat.h @@ -13,10 +13,10 @@ class MonLaserGreenDat : public IDataItem { public: friend class EcalCondDBInterface; MonLaserGreenDat(); - ~MonLaserGreenDat(); + ~MonLaserGreenDat() override; // User data methods - inline std::string getTable() { return "MON_LASER_GREEN_DAT"; } + inline std::string getTable() override { return "MON_LASER_GREEN_DAT"; } inline void setAPDMean(float mean) { m_apdMean = mean; } inline float getAPDMean() const { return m_apdMean; } @@ -36,7 +36,7 @@ class MonLaserGreenDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonLaserGreenDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonLaserIRedDat.h b/OnlineDB/EcalCondDB/interface/MonLaserIRedDat.h index 9a46f8935f286..56d3fec2118fd 100644 --- a/OnlineDB/EcalCondDB/interface/MonLaserIRedDat.h +++ b/OnlineDB/EcalCondDB/interface/MonLaserIRedDat.h @@ -13,10 +13,10 @@ class MonLaserIRedDat : public IDataItem { public: friend class EcalCondDBInterface; MonLaserIRedDat(); - ~MonLaserIRedDat(); + ~MonLaserIRedDat() override; // User data methods - inline std::string getTable() { return "MON_LASER_IRED_DAT"; } + inline std::string getTable() override { return "MON_LASER_IRED_DAT"; } inline void setAPDMean(float mean) { m_apdMean = mean; } inline float getAPDMean() const { return m_apdMean; } @@ -36,7 +36,7 @@ class MonLaserIRedDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonLaserIRedDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonLaserPulseDat.h b/OnlineDB/EcalCondDB/interface/MonLaserPulseDat.h index 4526cec52eb37..11f8eae1cee64 100644 --- a/OnlineDB/EcalCondDB/interface/MonLaserPulseDat.h +++ b/OnlineDB/EcalCondDB/interface/MonLaserPulseDat.h @@ -12,10 +12,10 @@ class MonLaserPulseDat : public IDataItem { public: friend class EcalCondDBInterface; MonLaserPulseDat(); - ~MonLaserPulseDat(); + ~MonLaserPulseDat() override; // User data methods - inline std::string getTable() { return "MON_LASER_PULSE_DAT"; } + inline std::string getTable() override { return "MON_LASER_PULSE_DAT"; } inline void setPulseHeightMean(float p) { m_pulseHeightMean = p; } inline float getPulseHeightMean() const { return m_pulseHeightMean; } @@ -31,7 +31,7 @@ class MonLaserPulseDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonLaserPulseDat* item, MonRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonLaserRedDat.h b/OnlineDB/EcalCondDB/interface/MonLaserRedDat.h index 39376692977bb..5a47533bc1c1c 100644 --- a/OnlineDB/EcalCondDB/interface/MonLaserRedDat.h +++ b/OnlineDB/EcalCondDB/interface/MonLaserRedDat.h @@ -13,10 +13,10 @@ class MonLaserRedDat : public IDataItem { public: friend class EcalCondDBInterface; MonLaserRedDat(); - ~MonLaserRedDat(); + ~MonLaserRedDat() override; // User data methods - inline std::string getTable() { return "MON_LASER_RED_DAT"; } + inline std::string getTable() override { return "MON_LASER_RED_DAT"; } inline void setAPDMean(float mean) { m_apdMean = mean; } inline float getAPDMean() const { return m_apdMean; } @@ -36,7 +36,7 @@ class MonLaserRedDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonLaserRedDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonLaserStatusDat.h b/OnlineDB/EcalCondDB/interface/MonLaserStatusDat.h index 63c42c00fa3c9..ca000e9203845 100644 --- a/OnlineDB/EcalCondDB/interface/MonLaserStatusDat.h +++ b/OnlineDB/EcalCondDB/interface/MonLaserStatusDat.h @@ -12,10 +12,10 @@ class MonLaserStatusDat : public IDataItem { public: friend class EcalCondDBInterface; MonLaserStatusDat(); - ~MonLaserStatusDat(); + ~MonLaserStatusDat() override; // User data methods - inline std::string getTable() { return "MON_LASER_STATUS_DAT"; } + inline std::string getTable() override { return "MON_LASER_STATUS_DAT"; } inline void setLaserPower(float p) { m_laserPower = p; } inline float getLaserPower() const { return m_laserPower; } @@ -30,7 +30,7 @@ class MonLaserStatusDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonLaserStatusDat* item, MonRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonLed1Dat.h b/OnlineDB/EcalCondDB/interface/MonLed1Dat.h index 6a15d2fb6e322..98aadf1db497c 100644 --- a/OnlineDB/EcalCondDB/interface/MonLed1Dat.h +++ b/OnlineDB/EcalCondDB/interface/MonLed1Dat.h @@ -13,10 +13,10 @@ class MonLed1Dat : public IDataItem { public: friend class EcalCondDBInterface; MonLed1Dat(); - ~MonLed1Dat(); + ~MonLed1Dat() override; // User data methods - inline std::string getTable() { return "MON_LED1_DAT"; } + inline std::string getTable() override { return "MON_LED1_DAT"; } inline void setVPTMean(float mean) { m_vptMean = mean; } inline float getVPTMean() const { return m_vptMean; } @@ -36,7 +36,7 @@ class MonLed1Dat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonLed1Dat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonLed2Dat.h b/OnlineDB/EcalCondDB/interface/MonLed2Dat.h index 22d72d5eace16..d0825e341e334 100644 --- a/OnlineDB/EcalCondDB/interface/MonLed2Dat.h +++ b/OnlineDB/EcalCondDB/interface/MonLed2Dat.h @@ -13,10 +13,10 @@ class MonLed2Dat : public IDataItem { public: friend class EcalCondDBInterface; MonLed2Dat(); - ~MonLed2Dat(); + ~MonLed2Dat() override; // User data methods - inline std::string getTable() { return "MON_LED2_DAT"; } + inline std::string getTable() override { return "MON_LED2_DAT"; } inline void setVPTMean(float mean) { m_vptMean = mean; } inline float getVPTMean() const { return m_vptMean; } @@ -36,7 +36,7 @@ class MonLed2Dat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonLed2Dat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonMemChConsistencyDat.h b/OnlineDB/EcalCondDB/interface/MonMemChConsistencyDat.h index b3eb3a120a505..f0033e2bee489 100644 --- a/OnlineDB/EcalCondDB/interface/MonMemChConsistencyDat.h +++ b/OnlineDB/EcalCondDB/interface/MonMemChConsistencyDat.h @@ -13,10 +13,10 @@ class MonMemChConsistencyDat : public IDataItem { public: friend class EcalCondDBInterface; MonMemChConsistencyDat(); - ~MonMemChConsistencyDat(); + ~MonMemChConsistencyDat() override; // User data methods - inline std::string getTable() { return "MON_MEM_CH_CONSISTENCY_DAT"; } + inline std::string getTable() override { return "MON_MEM_CH_CONSISTENCY_DAT"; } inline void setProcessedEvents(int proc) { m_processedEvents = proc; } inline int getProcessedEvents() const { return m_processedEvents; } @@ -38,7 +38,7 @@ class MonMemChConsistencyDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonMemChConsistencyDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonMemTTConsistencyDat.h b/OnlineDB/EcalCondDB/interface/MonMemTTConsistencyDat.h index e4d08645b7b38..8866a7e46ef9b 100644 --- a/OnlineDB/EcalCondDB/interface/MonMemTTConsistencyDat.h +++ b/OnlineDB/EcalCondDB/interface/MonMemTTConsistencyDat.h @@ -13,10 +13,10 @@ class MonMemTTConsistencyDat : public IDataItem { public: friend class EcalCondDBInterface; MonMemTTConsistencyDat(); - ~MonMemTTConsistencyDat(); + ~MonMemTTConsistencyDat() override; // User data methods - inline std::string getTable() { return "MON_MEM_TT_CONSISTENCY_DAT"; } + inline std::string getTable() override { return "MON_MEM_TT_CONSISTENCY_DAT"; } inline void setProcessedEvents(int proc) { m_processedEvents = proc; } inline int getProcessedEvents() const { return m_processedEvents; } @@ -41,7 +41,7 @@ class MonMemTTConsistencyDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonMemTTConsistencyDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonOccupancyDat.h b/OnlineDB/EcalCondDB/interface/MonOccupancyDat.h index bd0d6f6657b68..c2f2e2c06567f 100644 --- a/OnlineDB/EcalCondDB/interface/MonOccupancyDat.h +++ b/OnlineDB/EcalCondDB/interface/MonOccupancyDat.h @@ -13,10 +13,10 @@ class MonOccupancyDat : public IDataItem { public: friend class EcalCondDBInterface; MonOccupancyDat(); - ~MonOccupancyDat(); + ~MonOccupancyDat() override; // User data methods - inline std::string getTable() { return "MON_OCCUPANCY_DAT"; } + inline std::string getTable() override { return "MON_OCCUPANCY_DAT"; } void setEventsOverLowThreshold(int events) { m_eventsOverLowThreshold = events; } int getEventsOverLowThreshold() const { return m_eventsOverLowThreshold; } @@ -29,7 +29,7 @@ class MonOccupancyDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonOccupancyDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPNBlueDat.h b/OnlineDB/EcalCondDB/interface/MonPNBlueDat.h index 04fbbbab67e8c..993c83b44d9c1 100644 --- a/OnlineDB/EcalCondDB/interface/MonPNBlueDat.h +++ b/OnlineDB/EcalCondDB/interface/MonPNBlueDat.h @@ -13,10 +13,10 @@ class MonPNBlueDat : public IDataItem { public: friend class EcalCondDBInterface; MonPNBlueDat(); - ~MonPNBlueDat(); + ~MonPNBlueDat() override; // User data methods - inline std::string getTable() { return "MON_PN_BLUE_DAT"; } + inline std::string getTable() override { return "MON_PN_BLUE_DAT"; } inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; } inline float getADCMeanG1() const { return m_adcMeanG1; } @@ -47,7 +47,7 @@ class MonPNBlueDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPNBlueDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPNGreenDat.h b/OnlineDB/EcalCondDB/interface/MonPNGreenDat.h index 18baf7a5e6b38..653dc3493e799 100644 --- a/OnlineDB/EcalCondDB/interface/MonPNGreenDat.h +++ b/OnlineDB/EcalCondDB/interface/MonPNGreenDat.h @@ -13,10 +13,10 @@ class MonPNGreenDat : public IDataItem { public: friend class EcalCondDBInterface; MonPNGreenDat(); - ~MonPNGreenDat(); + ~MonPNGreenDat() override; // User data methods - inline std::string getTable() { return "MON_PN_GREEN_DAT"; } + inline std::string getTable() override { return "MON_PN_GREEN_DAT"; } inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; } inline float getADCMeanG1() const { return m_adcMeanG1; } @@ -47,7 +47,7 @@ class MonPNGreenDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPNGreenDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPNIRedDat.h b/OnlineDB/EcalCondDB/interface/MonPNIRedDat.h index 47a1dfa85427c..bc415cdb3e1da 100644 --- a/OnlineDB/EcalCondDB/interface/MonPNIRedDat.h +++ b/OnlineDB/EcalCondDB/interface/MonPNIRedDat.h @@ -13,10 +13,10 @@ class MonPNIRedDat : public IDataItem { public: friend class EcalCondDBInterface; MonPNIRedDat(); - ~MonPNIRedDat(); + ~MonPNIRedDat() override; // User data methods - inline std::string getTable() { return "MON_PN_IRED_DAT"; } + inline std::string getTable() override { return "MON_PN_IRED_DAT"; } inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; } inline float getADCMeanG1() const { return m_adcMeanG1; } @@ -47,7 +47,7 @@ class MonPNIRedDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPNIRedDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPNLed1Dat.h b/OnlineDB/EcalCondDB/interface/MonPNLed1Dat.h index a38d20b5d60dc..dd63fe5bfeb83 100644 --- a/OnlineDB/EcalCondDB/interface/MonPNLed1Dat.h +++ b/OnlineDB/EcalCondDB/interface/MonPNLed1Dat.h @@ -13,10 +13,10 @@ class MonPNLed1Dat : public IDataItem { public: friend class EcalCondDBInterface; MonPNLed1Dat(); - ~MonPNLed1Dat(); + ~MonPNLed1Dat() override; // User data methods - inline std::string getTable() { return "MON_PN_LED1_DAT"; } + inline std::string getTable() override { return "MON_PN_LED1_DAT"; } inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; } inline float getADCMeanG1() const { return m_adcMeanG1; } @@ -47,7 +47,7 @@ class MonPNLed1Dat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPNLed1Dat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPNLed2Dat.h b/OnlineDB/EcalCondDB/interface/MonPNLed2Dat.h index d6312dbad439b..3de0eb7c9c144 100644 --- a/OnlineDB/EcalCondDB/interface/MonPNLed2Dat.h +++ b/OnlineDB/EcalCondDB/interface/MonPNLed2Dat.h @@ -13,10 +13,10 @@ class MonPNLed2Dat : public IDataItem { public: friend class EcalCondDBInterface; MonPNLed2Dat(); - ~MonPNLed2Dat(); + ~MonPNLed2Dat() override; // User data methods - inline std::string getTable() { return "MON_PN_LED2_DAT"; } + inline std::string getTable() override { return "MON_PN_LED2_DAT"; } inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; } inline float getADCMeanG1() const { return m_adcMeanG1; } @@ -47,7 +47,7 @@ class MonPNLed2Dat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPNLed2Dat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPNMGPADat.h b/OnlineDB/EcalCondDB/interface/MonPNMGPADat.h index 10001a73f88b8..1ba8d1196b4d8 100644 --- a/OnlineDB/EcalCondDB/interface/MonPNMGPADat.h +++ b/OnlineDB/EcalCondDB/interface/MonPNMGPADat.h @@ -13,10 +13,10 @@ class MonPNMGPADat : public IDataItem { public: friend class EcalCondDBInterface; MonPNMGPADat(); - ~MonPNMGPADat(); + ~MonPNMGPADat() override; // User data methods - inline std::string getTable() { return "MON_PN_MGPA_DAT"; } + inline std::string getTable() override { return "MON_PN_MGPA_DAT"; } inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; } inline float getADCMeanG1() const { return m_adcMeanG1; } @@ -47,7 +47,7 @@ class MonPNMGPADat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPNMGPADat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPNPedDat.h b/OnlineDB/EcalCondDB/interface/MonPNPedDat.h index c4449f2beadf0..95742282fbd6d 100644 --- a/OnlineDB/EcalCondDB/interface/MonPNPedDat.h +++ b/OnlineDB/EcalCondDB/interface/MonPNPedDat.h @@ -13,10 +13,10 @@ class MonPNPedDat : public IDataItem { public: friend class EcalCondDBInterface; MonPNPedDat(); - ~MonPNPedDat(); + ~MonPNPedDat() override; // User data methods - inline std::string getTable() { return "MON_PN_PED_DAT"; } + inline std::string getTable() override { return "MON_PN_PED_DAT"; } inline void setPedMeanG1(float mean) { m_pedMeanG1 = mean; } inline float getPedMeanG1() const { return m_pedMeanG1; } @@ -35,7 +35,7 @@ class MonPNPedDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPNPedDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPNRedDat.h b/OnlineDB/EcalCondDB/interface/MonPNRedDat.h index 6d6a9265f0edd..23c54c610c73f 100644 --- a/OnlineDB/EcalCondDB/interface/MonPNRedDat.h +++ b/OnlineDB/EcalCondDB/interface/MonPNRedDat.h @@ -13,10 +13,10 @@ class MonPNRedDat : public IDataItem { public: friend class EcalCondDBInterface; MonPNRedDat(); - ~MonPNRedDat(); + ~MonPNRedDat() override; // User data methods - inline std::string getTable() { return "MON_PN_RED_DAT"; } + inline std::string getTable() override { return "MON_PN_RED_DAT"; } inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; } inline float getADCMeanG1() const { return m_adcMeanG1; } @@ -47,7 +47,7 @@ class MonPNRedDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPNRedDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPedestalOffsetsDat.h b/OnlineDB/EcalCondDB/interface/MonPedestalOffsetsDat.h index 9dc366955e592..b2cc5c019dfd1 100644 --- a/OnlineDB/EcalCondDB/interface/MonPedestalOffsetsDat.h +++ b/OnlineDB/EcalCondDB/interface/MonPedestalOffsetsDat.h @@ -13,10 +13,10 @@ class MonPedestalOffsetsDat : public IDataItem { public: friend class EcalCondDBInterface; MonPedestalOffsetsDat(); - ~MonPedestalOffsetsDat(); + ~MonPedestalOffsetsDat() override; // User data methods - inline std::string getTable() { return "MON_PEDESTAL_OFFSETS_DAT"; } + inline std::string getTable() override { return "MON_PEDESTAL_OFFSETS_DAT"; } inline void setDACG1(int dac) { m_dacG1 = dac; } inline int getDACG1() const { return m_dacG1; } @@ -32,7 +32,7 @@ class MonPedestalOffsetsDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPedestalOffsetsDat* item, MonRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPedestalsDat.h b/OnlineDB/EcalCondDB/interface/MonPedestalsDat.h index 66e5a5903d723..cc89fdb711e27 100644 --- a/OnlineDB/EcalCondDB/interface/MonPedestalsDat.h +++ b/OnlineDB/EcalCondDB/interface/MonPedestalsDat.h @@ -12,10 +12,10 @@ class MonPedestalsDat : public IDataItem { public: friend class EcalCondDBInterface; // XXX temp should not need MonPedestalsDat(); - ~MonPedestalsDat(); + ~MonPedestalsDat() override; // User data methods - inline std::string getTable() { return "MON_PEDESTALS_DAT"; } + inline std::string getTable() override { return "MON_PEDESTALS_DAT"; } inline void setPedMeanG1(float mean) { m_pedMeanG1 = mean; } inline float getPedMeanG1() const { return m_pedMeanG1; } @@ -40,7 +40,7 @@ class MonPedestalsDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPedestalsDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPedestalsOnlineDat.h b/OnlineDB/EcalCondDB/interface/MonPedestalsOnlineDat.h index 92fe7559b3eca..e0038d7bea17b 100644 --- a/OnlineDB/EcalCondDB/interface/MonPedestalsOnlineDat.h +++ b/OnlineDB/EcalCondDB/interface/MonPedestalsOnlineDat.h @@ -13,10 +13,10 @@ class MonPedestalsOnlineDat : public IDataItem { public: friend class EcalCondDBInterface; MonPedestalsOnlineDat(); - ~MonPedestalsOnlineDat(); + ~MonPedestalsOnlineDat() override; // User data methods - inline std::string getTable() { return "MON_PEDESTALS_ONLINE_DAT"; } + inline std::string getTable() override { return "MON_PEDESTALS_ONLINE_DAT"; } inline void setADCMeanG12(float mean) { m_adcMeanG12 = mean; } inline float getADCMeanG12() const { return m_adcMeanG12; } @@ -29,7 +29,7 @@ class MonPedestalsOnlineDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPedestalsOnlineDat* item, MonRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonPulseShapeDat.h b/OnlineDB/EcalCondDB/interface/MonPulseShapeDat.h index 6c438e15ff087..56d75a54795b4 100644 --- a/OnlineDB/EcalCondDB/interface/MonPulseShapeDat.h +++ b/OnlineDB/EcalCondDB/interface/MonPulseShapeDat.h @@ -14,10 +14,10 @@ class MonPulseShapeDat : public IDataItem { public: friend class EcalCondDBInterface; MonPulseShapeDat(); - ~MonPulseShapeDat(); + ~MonPulseShapeDat() override; // User data methods - inline std::string getTable() { return "MON_PULSE_SHAPE_DAT"; } + inline std::string getTable() override { return "MON_PULSE_SHAPE_DAT"; } inline void setSamples( std::vector &samples, int gain ) noexcept(false) @@ -53,7 +53,7 @@ class MonPulseShapeDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonPulseShapeDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonRunDat.h b/OnlineDB/EcalCondDB/interface/MonRunDat.h index 6367890b77957..04b23103a7625 100644 --- a/OnlineDB/EcalCondDB/interface/MonRunDat.h +++ b/OnlineDB/EcalCondDB/interface/MonRunDat.h @@ -13,10 +13,10 @@ class MonRunDat : public IDataItem { public: friend class EcalCondDBInterface; MonRunDat(); - ~MonRunDat(); + ~MonRunDat() override; // User data methods - inline std::string getTable() { return "MON_RUN_DAT"; } + inline std::string getTable() override { return "MON_RUN_DAT"; } inline void setNumEvents(int num) { m_numEvents = num; } inline int getNumEvents() const { return m_numEvents; } @@ -35,7 +35,7 @@ class MonRunDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonRunDat* item, MonRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonRunIOV.h b/OnlineDB/EcalCondDB/interface/MonRunIOV.h index ea99c54562021..c3df2faf265b0 100644 --- a/OnlineDB/EcalCondDB/interface/MonRunIOV.h +++ b/OnlineDB/EcalCondDB/interface/MonRunIOV.h @@ -16,7 +16,7 @@ class MonRunIOV : public IIOV { friend class EcalCondDBInterface; MonRunIOV(); - ~MonRunIOV(); + ~MonRunIOV() override; void setID(int id); int getID(){ return m_ID;} ; @@ -34,8 +34,8 @@ class MonRunIOV : public IIOV { Tm getSubRunEnd() const; // Methods from IUniqueDBObject - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators inline bool operator==(const MonRunIOV &m) const diff --git a/OnlineDB/EcalCondDB/interface/MonRunList.h b/OnlineDB/EcalCondDB/interface/MonRunList.h index b0d24b55c0fd5..8fc2307b6fb61 100644 --- a/OnlineDB/EcalCondDB/interface/MonRunList.h +++ b/OnlineDB/EcalCondDB/interface/MonRunList.h @@ -18,7 +18,7 @@ class MonRunList : public IDBObject { friend class EcalCondDBInterface; MonRunList(); - ~MonRunList(); + ~MonRunList() override; // Methods for user data diff --git a/OnlineDB/EcalCondDB/interface/MonRunOutcomeDef.h b/OnlineDB/EcalCondDB/interface/MonRunOutcomeDef.h index c69449ee3f9bd..f4236998e521d 100644 --- a/OnlineDB/EcalCondDB/interface/MonRunOutcomeDef.h +++ b/OnlineDB/EcalCondDB/interface/MonRunOutcomeDef.h @@ -14,7 +14,7 @@ class MonRunOutcomeDef : public IDef { friend class EcalCondDBInterface; MonRunOutcomeDef(); - virtual ~MonRunOutcomeDef(); + ~MonRunOutcomeDef() override; // Methods for user data std::string getShortDesc() const; @@ -23,8 +23,8 @@ class MonRunOutcomeDef : public IDef { std::string getLongDesc() const; // Methods from IUniqueDBObject - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators inline bool operator==(const MonRunOutcomeDef &d) const { return m_shortDesc == d.m_shortDesc; } diff --git a/OnlineDB/EcalCondDB/interface/MonRunTag.h b/OnlineDB/EcalCondDB/interface/MonRunTag.h index 8a3fd0a399fe2..23744cf084f1d 100644 --- a/OnlineDB/EcalCondDB/interface/MonRunTag.h +++ b/OnlineDB/EcalCondDB/interface/MonRunTag.h @@ -17,7 +17,7 @@ class MonRunTag : public ITag { friend class EcalCondDBInterface; MonRunTag(); - ~MonRunTag(); + ~MonRunTag() override; // Methods for user data std::string getGeneralTag() const; @@ -27,8 +27,8 @@ class MonRunTag : public ITag { void setMonVersionDef(const MonVersionDef& ver); // Methods using ID - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators inline bool operator==(const MonRunTag &t) const diff --git a/OnlineDB/EcalCondDB/interface/MonShapeQualityDat.h b/OnlineDB/EcalCondDB/interface/MonShapeQualityDat.h index 3c74bf40c7007..7b7c498ec282a 100644 --- a/OnlineDB/EcalCondDB/interface/MonShapeQualityDat.h +++ b/OnlineDB/EcalCondDB/interface/MonShapeQualityDat.h @@ -13,17 +13,17 @@ class MonShapeQualityDat : public IDataItem { public: friend class EcalCondDBInterface; MonShapeQualityDat(); - ~MonShapeQualityDat(); + ~MonShapeQualityDat() override; // User data methods - inline std::string getTable() { return "MON_SHAPE_QUALITY_DAT"; } + inline std::string getTable() override { return "MON_SHAPE_QUALITY_DAT"; } inline void setAvgChi2(float chi2) { m_avgChi2 = chi2; } inline float getAvgChi2() const { return m_avgChi2; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonShapeQualityDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonTTConsistencyDat.h b/OnlineDB/EcalCondDB/interface/MonTTConsistencyDat.h index 2da83e089bdb0..0ffa5aebc06b9 100644 --- a/OnlineDB/EcalCondDB/interface/MonTTConsistencyDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTTConsistencyDat.h @@ -13,10 +13,10 @@ class MonTTConsistencyDat : public IDataItem { public: friend class EcalCondDBInterface; MonTTConsistencyDat(); - ~MonTTConsistencyDat(); + ~MonTTConsistencyDat() override; // User data methods - inline std::string getTable() { return "MON_TT_CONSISTENCY_DAT"; } + inline std::string getTable() override { return "MON_TT_CONSISTENCY_DAT"; } inline void setProcessedEvents(int proc) { m_processedEvents = proc; } inline int getProcessedEvents() const { return m_processedEvents; } @@ -41,7 +41,7 @@ class MonTTConsistencyDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonTTConsistencyDat* item, MonRunIOV* iov) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonTestPulseDat.h b/OnlineDB/EcalCondDB/interface/MonTestPulseDat.h index 12802293af0db..1c5e1a33064d1 100644 --- a/OnlineDB/EcalCondDB/interface/MonTestPulseDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTestPulseDat.h @@ -13,10 +13,10 @@ class MonTestPulseDat : public IDataItem { public: friend class EcalCondDBInterface; MonTestPulseDat(); - ~MonTestPulseDat(); + ~MonTestPulseDat() override; // User data methods - inline std::string getTable() { return "MON_TEST_PULSE_DAT"; } + inline std::string getTable() override { return "MON_TEST_PULSE_DAT"; } inline void setADCMeanG1(float mean) { m_adcMeanG1 = mean; } inline float getADCMeanG1() const { return m_adcMeanG1; } @@ -41,7 +41,7 @@ class MonTestPulseDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const MonTestPulseDat* item, MonRunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/MonTimingCrystalDat.h b/OnlineDB/EcalCondDB/interface/MonTimingCrystalDat.h index 62ab7a9a55cab..2960f8dce5b63 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingCrystalDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingCrystalDat.h @@ -6,7 +6,7 @@ class MonTimingCrystalDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_CRYSTAL_DAT";} + inline std::string getTable() override { return "MON_TIMING_CRYSTAL_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLaserBlueCrystalDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLaserBlueCrystalDat.h index 292573c1689f7..c640cfd7f4cb1 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLaserBlueCrystalDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLaserBlueCrystalDat.h @@ -7,7 +7,7 @@ class MonTimingLaserBlueCrystalDat : public ITimingDat { friend class ITimingDat; public: // User data methods - inline std::string getTable() { return "MON_TIMING_XTAL_LB_DAT";} + inline std::string getTable() override { return "MON_TIMING_XTAL_LB_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLaserBlueTTDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLaserBlueTTDat.h index 206332088e2d9..99931cfbf8072 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLaserBlueTTDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLaserBlueTTDat.h @@ -6,7 +6,7 @@ class MonTimingLaserBlueTTDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_TT_LB_DAT";} + inline std::string getTable() override { return "MON_TIMING_TT_LB_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLaserGreenCrystalDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLaserGreenCrystalDat.h index 24811cd6fe4b0..e5dc2c411db7c 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLaserGreenCrystalDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLaserGreenCrystalDat.h @@ -6,7 +6,7 @@ class MonTimingLaserGreenCrystalDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_XTAL_LG_DAT";} + inline std::string getTable() override { return "MON_TIMING_XTAL_LG_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLaserGreenTTDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLaserGreenTTDat.h index e153dad2f6ead..6c3d41f25ca14 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLaserGreenTTDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLaserGreenTTDat.h @@ -6,7 +6,7 @@ class MonTimingLaserGreenTTDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_TT_LG_DAT";} + inline std::string getTable() override { return "MON_TIMING_TT_LG_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLaserIRedCrystalDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLaserIRedCrystalDat.h index 2f480c1718897..d33fd44fe3818 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLaserIRedCrystalDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLaserIRedCrystalDat.h @@ -6,7 +6,7 @@ class MonTimingLaserIRedCrystalDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_XTAL_LI_DAT";} + inline std::string getTable() override { return "MON_TIMING_XTAL_LI_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLaserIRedTTDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLaserIRedTTDat.h index cd32d84363d0d..5745f03f8cdb3 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLaserIRedTTDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLaserIRedTTDat.h @@ -6,7 +6,7 @@ class MonTimingLaserIRedTTDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_TT_LI_DAT";} + inline std::string getTable() override { return "MON_TIMING_TT_LI_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLaserRedCrystalDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLaserRedCrystalDat.h index 3d47a7efb9672..d14588c4fed66 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLaserRedCrystalDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLaserRedCrystalDat.h @@ -6,7 +6,7 @@ class MonTimingLaserRedCrystalDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_XTAL_LR_DAT";} + inline std::string getTable() override { return "MON_TIMING_XTAL_LR_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLaserRedTTDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLaserRedTTDat.h index 129bed24f7b93..90f2b296ee4d9 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLaserRedTTDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLaserRedTTDat.h @@ -6,7 +6,7 @@ class MonTimingLaserRedTTDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_TT_LR_DAT";} + inline std::string getTable() override { return "MON_TIMING_TT_LR_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLed1CrystalDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLed1CrystalDat.h index 8f166902c9724..19bdceee9a822 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLed1CrystalDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLed1CrystalDat.h @@ -6,7 +6,7 @@ class MonTimingLed1CrystalDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_XTAL_L1_DAT";} + inline std::string getTable() override { return "MON_TIMING_XTAL_L1_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLed1TTDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLed1TTDat.h index debcae07418ef..bf4c13193c0ee 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLed1TTDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLed1TTDat.h @@ -6,7 +6,7 @@ class MonTimingLed1TTDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_TT_L1_DAT";} + inline std::string getTable() override { return "MON_TIMING_TT_L1_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLed2CrystalDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLed2CrystalDat.h index 30e0f431245dc..bb117f241604b 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLed2CrystalDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLed2CrystalDat.h @@ -6,7 +6,7 @@ class MonTimingLed2CrystalDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_XTAL_L2_DAT";} + inline std::string getTable() override { return "MON_TIMING_XTAL_L2_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingLed2TTDat.h b/OnlineDB/EcalCondDB/interface/MonTimingLed2TTDat.h index be9fdbc149a70..04a96b2e44fe4 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingLed2TTDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingLed2TTDat.h @@ -6,7 +6,7 @@ class MonTimingLed2TTDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_TT_L2_DAT";} + inline std::string getTable() override { return "MON_TIMING_TT_L2_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonTimingTTDat.h b/OnlineDB/EcalCondDB/interface/MonTimingTTDat.h index 33f203090a5a8..6a6a08ec684d6 100644 --- a/OnlineDB/EcalCondDB/interface/MonTimingTTDat.h +++ b/OnlineDB/EcalCondDB/interface/MonTimingTTDat.h @@ -6,7 +6,7 @@ class MonTimingTTDat : public ITimingDat { public: // User data methods - inline std::string getTable() { return "MON_TIMING_TT_DAT";} + inline std::string getTable() override { return "MON_TIMING_TT_DAT";} }; diff --git a/OnlineDB/EcalCondDB/interface/MonVersionDef.h b/OnlineDB/EcalCondDB/interface/MonVersionDef.h index 8fae22ac963bd..3da87f8722c07 100644 --- a/OnlineDB/EcalCondDB/interface/MonVersionDef.h +++ b/OnlineDB/EcalCondDB/interface/MonVersionDef.h @@ -14,7 +14,7 @@ class MonVersionDef : public IDef { friend class EcalCondDBInterface; MonVersionDef(); - virtual ~MonVersionDef(); + ~MonVersionDef() override; // Methods for user data std::string getMonitoringVersion() const; @@ -23,8 +23,8 @@ class MonVersionDef : public IDef { std::string getDescription() const; // Methods from IUniqueDBObject - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators inline bool operator==(const MonVersionDef &d) const { return m_monVer == d.m_monVer; } diff --git a/OnlineDB/EcalCondDB/interface/ODBadTTDat.h b/OnlineDB/EcalCondDB/interface/ODBadTTDat.h index 9d006a5d5e176..ef1318ecb7f00 100644 --- a/OnlineDB/EcalCondDB/interface/ODBadTTDat.h +++ b/OnlineDB/EcalCondDB/interface/ODBadTTDat.h @@ -11,10 +11,10 @@ class ODBadTTDat : public IODConfig { public: friend class EcalCondDBInterface; ODBadTTDat(); - ~ODBadTTDat(); + ~ODBadTTDat() override; // User data methods - inline std::string getTable() { return "BAD_TT_DAT"; } + inline std::string getTable() override { return "BAD_TT_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -37,7 +37,7 @@ class ODBadTTDat : public IODConfig { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const ODBadTTDat* item, ODBadTTInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODBadTTInfo.h b/OnlineDB/EcalCondDB/interface/ODBadTTInfo.h index 87ac47da70306..eccf70c979fb4 100644 --- a/OnlineDB/EcalCondDB/interface/ODBadTTInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODBadTTInfo.h @@ -10,10 +10,10 @@ class ODBadTTInfo : public IODConfig { public: friend class EcalCondDBInterface; ODBadTTInfo(); - ~ODBadTTInfo(); + ~ODBadTTInfo() override; // User data methods - inline std::string getTable() { return "BAD_TT_INFO"; } + inline std::string getTable() override { return "BAD_TT_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class ODBadTTInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODBadXTDat.h b/OnlineDB/EcalCondDB/interface/ODBadXTDat.h index 110d54f824fd9..f8e1eb2d14928 100644 --- a/OnlineDB/EcalCondDB/interface/ODBadXTDat.h +++ b/OnlineDB/EcalCondDB/interface/ODBadXTDat.h @@ -11,10 +11,10 @@ class ODBadXTDat : public IODConfig { public: friend class EcalCondDBInterface; ODBadXTDat(); - ~ODBadXTDat(); + ~ODBadXTDat() override; // User data methods - inline std::string getTable() { return "BAD_CRYSTALS_DAT"; } + inline std::string getTable() override { return "BAD_CRYSTALS_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -37,7 +37,7 @@ class ODBadXTDat : public IODConfig { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const ODBadXTDat* item, ODBadXTInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODBadXTInfo.h b/OnlineDB/EcalCondDB/interface/ODBadXTInfo.h index edd298ee5b43f..5f79999330059 100644 --- a/OnlineDB/EcalCondDB/interface/ODBadXTInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODBadXTInfo.h @@ -10,10 +10,10 @@ class ODBadXTInfo : public IODConfig { public: friend class EcalCondDBInterface; ODBadXTInfo(); - ~ODBadXTInfo(); + ~ODBadXTInfo() override; // User data methods - inline std::string getTable() { return "BAD_CRYSTALS_INFO"; } + inline std::string getTable() override { return "BAD_CRYSTALS_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class ODBadXTInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODCCSConfig.h b/OnlineDB/EcalCondDB/interface/ODCCSConfig.h index 1b6a8fc0c49e3..0d5b12898ed8f 100644 --- a/OnlineDB/EcalCondDB/interface/ODCCSConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODCCSConfig.h @@ -10,10 +10,10 @@ class ODCCSConfig : public IODConfig { public: friend class EcalCondDBInterface; ODCCSConfig(); - ~ODCCSConfig(); + ~ODCCSConfig() override; // User data methods - inline std::string getTable() { return "ECAL_CCS_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_CCS_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -67,7 +67,7 @@ class ODCCSConfig : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODCCSCycle.h b/OnlineDB/EcalCondDB/interface/ODCCSCycle.h index a3865df49cc92..79748f750bf9f 100644 --- a/OnlineDB/EcalCondDB/interface/ODCCSCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODCCSCycle.h @@ -14,9 +14,9 @@ class ODCCSCycle : public IODConfig { friend class ODEcalCycle; ODCCSCycle(); - ~ODCCSCycle(); + ~ODCCSCycle() override; - inline std::string getTable() { return "ECAL_CCS_CYCLE"; } + inline std::string getTable() override { return "ECAL_CCS_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -36,7 +36,7 @@ class ODCCSCycle : public IODConfig { int m_ID; int m_ccs_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODCCSCycle * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODCond2ConfInfo.h b/OnlineDB/EcalCondDB/interface/ODCond2ConfInfo.h index deef53738a17b..09529c4fe7b0b 100644 --- a/OnlineDB/EcalCondDB/interface/ODCond2ConfInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODCond2ConfInfo.h @@ -13,10 +13,10 @@ class ODCond2ConfInfo : public IODConfig { public: friend class EcalCondDBInterface; ODCond2ConfInfo(); - ~ODCond2ConfInfo(); + ~ODCond2ConfInfo() override; // User data methods - inline std::string getTable() { return "COND_2_CONF_INFO"; } + inline std::string getTable() override { return "COND_2_CONF_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -47,7 +47,7 @@ class ODCond2ConfInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODDCCConfig.h b/OnlineDB/EcalCondDB/interface/ODDCCConfig.h index a1c1938d7b50d..e38af45df7b86 100644 --- a/OnlineDB/EcalCondDB/interface/ODDCCConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODDCCConfig.h @@ -16,10 +16,10 @@ class ODDCCConfig : public IODConfig { public: friend class EcalCondDBInterface; ODDCCConfig(); - ~ODDCCConfig(); + ~ODDCCConfig() override; // User data methods - inline std::string getTable() { return "ECAL_DCC_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_DCC_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -47,7 +47,7 @@ class ODDCCConfig : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODDCCConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODDCCCycle.h b/OnlineDB/EcalCondDB/interface/ODDCCCycle.h index a1737657f00ec..2aef0fa728bd7 100644 --- a/OnlineDB/EcalCondDB/interface/ODDCCCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODDCCCycle.h @@ -14,9 +14,9 @@ class ODDCCCycle : public IODConfig { friend class ODEcalCycle; ODDCCCycle(); - ~ODDCCCycle(); + ~ODDCCCycle() override; - inline std::string getTable() { return "ECAL_DCC_CYCLE"; } + inline std::string getTable() override { return "ECAL_DCC_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODDCCCycle : public IODConfig { int m_ID; int m_dcc_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODDCCCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODDCUConfig.h b/OnlineDB/EcalCondDB/interface/ODDCUConfig.h index 995b08365a55d..ae3cf174ef73e 100644 --- a/OnlineDB/EcalCondDB/interface/ODDCUConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODDCUConfig.h @@ -16,10 +16,10 @@ class ODDCUConfig : public IODConfig { public: friend class EcalCondDBInterface; ODDCUConfig(); - ~ODDCUConfig(); + ~ODDCUConfig() override; // User data methods - inline std::string getTable() { return "ECAL_DCU_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_DCU_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -27,7 +27,7 @@ class ODDCUConfig : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODDCUConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODDCUCycle.h b/OnlineDB/EcalCondDB/interface/ODDCUCycle.h index cfbfd75d296cd..0a909f5d16f19 100644 --- a/OnlineDB/EcalCondDB/interface/ODDCUCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODDCUCycle.h @@ -14,9 +14,9 @@ class ODDCUCycle : public IODConfig { friend class ODEcalCycle; ODDCUCycle(); - ~ODDCUCycle(); + ~ODDCUCycle() override; - inline std::string getTable() { return "ECAL_DCU_CYCLE"; } + inline std::string getTable() override { return "ECAL_DCU_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODDCUCycle : public IODConfig { int m_ID; int m_dcu_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODDCUCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODDelaysDat.h b/OnlineDB/EcalCondDB/interface/ODDelaysDat.h index 15ef6dd49e447..2f34f556a1a74 100644 --- a/OnlineDB/EcalCondDB/interface/ODDelaysDat.h +++ b/OnlineDB/EcalCondDB/interface/ODDelaysDat.h @@ -11,10 +11,10 @@ class ODDelaysDat : public IODConfig { public: friend class EcalCondDBInterface; ODDelaysDat(); - ~ODDelaysDat(); + ~ODDelaysDat() override; // User data methods - inline std::string getTable() { return "DELAYS_DAT"; } + inline std::string getTable() override { return "DELAYS_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -33,7 +33,7 @@ class ODDelaysDat : public IODConfig { inline int getTimeOffset() const { return m_t1; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const ODDelaysDat* item, ODFEDelaysInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODEcalCycle.h b/OnlineDB/EcalCondDB/interface/ODEcalCycle.h index 7a8644e8750d9..be3561c2d723d 100644 --- a/OnlineDB/EcalCondDB/interface/ODEcalCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODEcalCycle.h @@ -11,10 +11,10 @@ class ODEcalCycle : public IODConfig { friend class EcalCondDBInterface ; ODEcalCycle(); - ~ODEcalCycle(); + ~ODEcalCycle() override; // User data methods - inline std::string getTable() { return "ECAL_CYCLE"; } + inline std::string getTable() override { return "ECAL_CYCLE"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -66,7 +66,7 @@ class ODEcalCycle : public IODConfig { void printout(); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); int fetchID() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODFEDAQConfig.h b/OnlineDB/EcalCondDB/interface/ODFEDAQConfig.h index 54fad5bae64aa..cf8880eb864f3 100644 --- a/OnlineDB/EcalCondDB/interface/ODFEDAQConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODFEDAQConfig.h @@ -10,10 +10,10 @@ class ODFEDAQConfig : public IODConfig { public: friend class EcalCondDBInterface; ODFEDAQConfig(); - ~ODFEDAQConfig(); + ~ODFEDAQConfig() override; // User data methods - inline std::string getTable() { return "FE_DAQ_CONFIG"; } + inline std::string getTable() override { return "FE_DAQ_CONFIG"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -46,7 +46,7 @@ class ODFEDAQConfig : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODFEDelaysInfo.h b/OnlineDB/EcalCondDB/interface/ODFEDelaysInfo.h index 8af24ac39c80e..466719566c968 100644 --- a/OnlineDB/EcalCondDB/interface/ODFEDelaysInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODFEDelaysInfo.h @@ -10,10 +10,10 @@ class ODFEDelaysInfo : public IODConfig { public: friend class EcalCondDBInterface; ODFEDelaysInfo(); - ~ODFEDelaysInfo(); + ~ODFEDelaysInfo() override; // User data methods - inline std::string getTable() { return "DELAYS_INFO"; } + inline std::string getTable() override { return "DELAYS_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class ODFEDelaysInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODFEPedestalOffsetInfo.h b/OnlineDB/EcalCondDB/interface/ODFEPedestalOffsetInfo.h index 6d2c66c82202f..684b2987af93d 100644 --- a/OnlineDB/EcalCondDB/interface/ODFEPedestalOffsetInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODFEPedestalOffsetInfo.h @@ -10,10 +10,10 @@ class ODFEPedestalOffsetInfo : public IODConfig { public: friend class EcalCondDBInterface; ODFEPedestalOffsetInfo(); - ~ODFEPedestalOffsetInfo(); + ~ODFEPedestalOffsetInfo() override; // User data methods - inline std::string getTable() { return "PEDESTAL_OFFSETS_INFO"; } + inline std::string getTable() override { return "PEDESTAL_OFFSETS_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class ODFEPedestalOffsetInfo : public IODConfig { int fetchID() noexcept(false); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODFEWeightsInfo.h b/OnlineDB/EcalCondDB/interface/ODFEWeightsInfo.h index 157e67a79497a..dca9385bfd433 100644 --- a/OnlineDB/EcalCondDB/interface/ODFEWeightsInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODFEWeightsInfo.h @@ -10,10 +10,10 @@ class ODFEWeightsInfo : public IODConfig { public: friend class EcalCondDBInterface; ODFEWeightsInfo(); - ~ODFEWeightsInfo(); + ~ODFEWeightsInfo() override; // User data methods - inline std::string getTable() { return "DCC_WEIGHTS_INFO"; } + inline std::string getTable() override { return "DCC_WEIGHTS_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class ODFEWeightsInfo : public IODConfig { int fetchID() noexcept(false); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODGolBiasCurrentDat.h b/OnlineDB/EcalCondDB/interface/ODGolBiasCurrentDat.h index 5015c35041474..1184e3c522276 100644 --- a/OnlineDB/EcalCondDB/interface/ODGolBiasCurrentDat.h +++ b/OnlineDB/EcalCondDB/interface/ODGolBiasCurrentDat.h @@ -12,10 +12,10 @@ class ODGolBiasCurrentDat : public IODConfig { public: friend class EcalCondDBInterface; ODGolBiasCurrentDat(); - ~ODGolBiasCurrentDat(); + ~ODGolBiasCurrentDat() override; // User data methods - inline std::string getTable() { return "GOL_BIAS_CURRENT_DAT"; } + inline std::string getTable() override { return "GOL_BIAS_CURRENT_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -41,7 +41,7 @@ class ODGolBiasCurrentDat : public IODConfig { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const ODGolBiasCurrentDat* item, ODGolBiasCurrentInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODGolBiasCurrentInfo.h b/OnlineDB/EcalCondDB/interface/ODGolBiasCurrentInfo.h index 3bc85d11de200..cf52a4262e35e 100644 --- a/OnlineDB/EcalCondDB/interface/ODGolBiasCurrentInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODGolBiasCurrentInfo.h @@ -10,10 +10,10 @@ class ODGolBiasCurrentInfo : public IODConfig { public: friend class EcalCondDBInterface; ODGolBiasCurrentInfo(); - ~ODGolBiasCurrentInfo(); + ~ODGolBiasCurrentInfo() override; // User data methods - inline std::string getTable() { return "GOL_BIAS_CURRENT_INFO"; } + inline std::string getTable() override { return "GOL_BIAS_CURRENT_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class ODGolBiasCurrentInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODJBH4Config.h b/OnlineDB/EcalCondDB/interface/ODJBH4Config.h index fa66a5f979431..164d19867e024 100644 --- a/OnlineDB/EcalCondDB/interface/ODJBH4Config.h +++ b/OnlineDB/EcalCondDB/interface/ODJBH4Config.h @@ -10,10 +10,10 @@ class ODJBH4Config : public IODConfig { public: friend class EcalCondDBInterface; ODJBH4Config(); - ~ODJBH4Config(); + ~ODJBH4Config() override; // User data methods - inline std::string getTable() { return "ECAL_JBH4_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_JBH4_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -46,7 +46,7 @@ class ODJBH4Config : public IODConfig { private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODJBH4Config * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODJBH4Cycle.h b/OnlineDB/EcalCondDB/interface/ODJBH4Cycle.h index 4dfb24eb8eb35..2a9ee9c867856 100644 --- a/OnlineDB/EcalCondDB/interface/ODJBH4Cycle.h +++ b/OnlineDB/EcalCondDB/interface/ODJBH4Cycle.h @@ -14,9 +14,9 @@ class ODJBH4Cycle : public IODConfig { friend class ODEcalCycle; ODJBH4Cycle(); - ~ODJBH4Cycle(); + ~ODJBH4Cycle() override; - inline std::string getTable() { return "ECAL_JBH4_CYCLE"; } + inline std::string getTable() override { return "ECAL_JBH4_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODJBH4Cycle : public IODConfig { int m_ID; int m_jbh4_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODJBH4Cycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODLTCConfig.h b/OnlineDB/EcalCondDB/interface/ODLTCConfig.h index 6abdb51db51fd..15bf1d421f7fd 100644 --- a/OnlineDB/EcalCondDB/interface/ODLTCConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODLTCConfig.h @@ -16,10 +16,10 @@ class ODLTCConfig : public IODConfig { public: friend class EcalCondDBInterface; ODLTCConfig(); - ~ODLTCConfig(); + ~ODLTCConfig() override; // User data methods - inline std::string getTable() { return "ECAL_LTC_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_LTC_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -36,7 +36,7 @@ class ODLTCConfig : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODLTCConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODLTCCycle.h b/OnlineDB/EcalCondDB/interface/ODLTCCycle.h index 48064aebb354d..05559431ac1c5 100644 --- a/OnlineDB/EcalCondDB/interface/ODLTCCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODLTCCycle.h @@ -15,9 +15,9 @@ class ODLTCCycle : public IODConfig { ODLTCCycle(); - ~ODLTCCycle(); + ~ODLTCCycle() override; - inline std::string getTable() { return "ECAL_LTC_CYCLE"; } + inline std::string getTable() override { return "ECAL_LTC_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -35,7 +35,7 @@ class ODLTCCycle : public IODConfig { int m_ID; int m_ltc_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODLTCCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODLTSConfig.h b/OnlineDB/EcalCondDB/interface/ODLTSConfig.h index 0f35cfa400a7a..def80083f1e6b 100644 --- a/OnlineDB/EcalCondDB/interface/ODLTSConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODLTSConfig.h @@ -10,10 +10,10 @@ class ODLTSConfig : public IODConfig { public: friend class EcalCondDBInterface; ODLTSConfig(); - ~ODLTSConfig(); + ~ODLTSConfig() override; // User data methods - inline std::string getTable() { return "ECAL_LTS_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_LTS_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -33,7 +33,7 @@ class ODLTSConfig : public IODConfig { private: int fetchNextId() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODLTSConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODLTSCycle.h b/OnlineDB/EcalCondDB/interface/ODLTSCycle.h index 32c7afa8d2bd5..b3c5a524e1b37 100644 --- a/OnlineDB/EcalCondDB/interface/ODLTSCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODLTSCycle.h @@ -14,9 +14,9 @@ class ODLTSCycle : public IODConfig { friend class ODEcalCycle; ODLTSCycle(); - ~ODLTSCycle(); + ~ODLTSCycle() override; - inline std::string getTable() { return "ECAL_LTS_CYCLE"; } + inline std::string getTable() override { return "ECAL_LTS_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODLTSCycle : public IODConfig { int m_ID; int m_lts_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODLTSCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODLaserConfig.h b/OnlineDB/EcalCondDB/interface/ODLaserConfig.h index b05fa8a7d1f5f..6385fb99a5711 100644 --- a/OnlineDB/EcalCondDB/interface/ODLaserConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODLaserConfig.h @@ -16,10 +16,10 @@ class ODLaserConfig : public IODConfig { public: friend class EcalCondDBInterface; ODLaserConfig(); - ~ODLaserConfig(); + ~ODLaserConfig() override; // User data methods - inline std::string getTable() { return "ECAL_Laser_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_Laser_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -194,7 +194,7 @@ class ODLaserConfig : public IODConfig { int fetchNextId() noexcept(false); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODLaserConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODLaserCycle.h b/OnlineDB/EcalCondDB/interface/ODLaserCycle.h index faa00dc2b9572..cbb879662bc9f 100644 --- a/OnlineDB/EcalCondDB/interface/ODLaserCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODLaserCycle.h @@ -14,9 +14,9 @@ class ODLaserCycle : public IODConfig { friend class ODEcalCycle; ODLaserCycle(); - ~ODLaserCycle(); + ~ODLaserCycle() override; - inline std::string getTable() { return "ECAL_Laser_CYCLE"; } + inline std::string getTable() override { return "ECAL_Laser_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODLaserCycle : public IODConfig { int m_ID; int m_laser_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODLaserCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODPedestalOffsetsDat.h b/OnlineDB/EcalCondDB/interface/ODPedestalOffsetsDat.h index d3ae59ecc7b3b..b9ffd72e5d652 100644 --- a/OnlineDB/EcalCondDB/interface/ODPedestalOffsetsDat.h +++ b/OnlineDB/EcalCondDB/interface/ODPedestalOffsetsDat.h @@ -12,10 +12,10 @@ class ODPedestalOffsetsDat : public IODConfig { public: friend class EcalCondDBInterface; ODPedestalOffsetsDat(); - ~ODPedestalOffsetsDat(); + ~ODPedestalOffsetsDat() override; // User data methods - inline std::string getTable() { return "PEDESTAL_OFFSETS_DAT"; } + inline std::string getTable() override { return "PEDESTAL_OFFSETS_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -44,7 +44,7 @@ class ODPedestalOffsetsDat : public IODConfig { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const ODPedestalOffsetsDat* item, ODFEPedestalOffsetInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODRunConfigCycleInfo.h b/OnlineDB/EcalCondDB/interface/ODRunConfigCycleInfo.h index 3a9707fa98eac..f060c5a9aebaf 100644 --- a/OnlineDB/EcalCondDB/interface/ODRunConfigCycleInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODRunConfigCycleInfo.h @@ -17,9 +17,9 @@ class ODRunConfigCycleInfo : public IODConfig { friend class ODEcalCycle; ODRunConfigCycleInfo(); - ~ODRunConfigCycleInfo(); + ~ODRunConfigCycleInfo() override; - inline std::string getTable() { return "ECAL_CYCLE_DAT"; } + inline std::string getTable() override { return "ECAL_CYCLE_DAT"; } // Methods for user data inline void setId(int id) { m_ID = id; } @@ -54,7 +54,7 @@ int getCycleNumber()const {return m_cycle_num; } std::string m_tag; std::string m_description; - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODRunConfigCycleInfo * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODRunConfigInfo.h b/OnlineDB/EcalCondDB/interface/ODRunConfigInfo.h index 4de32a7493261..1924683b57dd3 100644 --- a/OnlineDB/EcalCondDB/interface/ODRunConfigInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODRunConfigInfo.h @@ -14,8 +14,8 @@ class ODRunConfigInfo : public IODConfig { friend class EcalCondDBInterface; ODRunConfigInfo(); - ~ODRunConfigInfo(); - inline std::string getTable() { return "ECAL_RUN_CONFIGURATION_DAT"; } + ~ODRunConfigInfo() override; + inline std::string getTable() override { return "ECAL_RUN_CONFIGURATION_DAT"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -82,7 +82,7 @@ std::string getUsageStatus() const{ return m_usage_status;} int fetchIDLast() noexcept(false); void setByID(int id) noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void fetchData(ODRunConfigInfo * result) noexcept(false); int updateDefaultCycle() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODRunConfigSeqInfo.h b/OnlineDB/EcalCondDB/interface/ODRunConfigSeqInfo.h index 188ac4c1604a7..347a3a5c6fb51 100644 --- a/OnlineDB/EcalCondDB/interface/ODRunConfigSeqInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODRunConfigSeqInfo.h @@ -17,9 +17,9 @@ class ODRunConfigSeqInfo : public IODConfig { friend class EcalCondDBInterface; ODRunConfigSeqInfo(); - ~ODRunConfigSeqInfo(); + ~ODRunConfigSeqInfo() override; - inline std::string getTable() { return "ECAL_SEQUENCE_DAT"; } + inline std::string getTable() override { return "ECAL_SEQUENCE_DAT"; } // Methods for user data @@ -61,7 +61,7 @@ class ODRunConfigSeqInfo : public IODConfig { void writeDB()noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void fetchData(ODRunConfigSeqInfo * result) noexcept(false); void clear(); diff --git a/OnlineDB/EcalCondDB/interface/ODSRPConfig.h b/OnlineDB/EcalCondDB/interface/ODSRPConfig.h index cbec23d75885e..a886c2cf86242 100644 --- a/OnlineDB/EcalCondDB/interface/ODSRPConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODSRPConfig.h @@ -18,10 +18,10 @@ class ODSRPConfig : public IODConfig { public: friend class EcalCondDBInterface; ODSRPConfig(); - ~ODSRPConfig(); + ~ODSRPConfig() override; // User data methods - inline std::string getTable() { return "ECAL_SRP_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_SRP_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -54,7 +54,7 @@ class ODSRPConfig : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODSRPConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODSRPCycle.h b/OnlineDB/EcalCondDB/interface/ODSRPCycle.h index 1cbd6888b043a..02faf39628940 100644 --- a/OnlineDB/EcalCondDB/interface/ODSRPCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODSRPCycle.h @@ -14,9 +14,9 @@ class ODSRPCycle : public IODConfig { friend class ODEcalCycle; ODSRPCycle(); - ~ODSRPCycle(); + ~ODSRPCycle() override; - inline std::string getTable() { return "ECAL_SRP_CYCLE"; } + inline std::string getTable() override { return "ECAL_SRP_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODSRPCycle : public IODConfig { int m_ID; int m_srp_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODSRPCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODScanConfig.h b/OnlineDB/EcalCondDB/interface/ODScanConfig.h index d34a56669d63c..59954387a70eb 100644 --- a/OnlineDB/EcalCondDB/interface/ODScanConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODScanConfig.h @@ -10,10 +10,10 @@ class ODScanConfig : public IODConfig { public: friend class EcalCondDBInterface; ODScanConfig(); - ~ODScanConfig(); + ~ODScanConfig() override; // User data methods - inline std::string getTable() { return "ECAL_Scan_DAT"; } + inline std::string getTable() override { return "ECAL_Scan_DAT"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -35,7 +35,7 @@ class ODScanConfig : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODScanConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODScanCycle.h b/OnlineDB/EcalCondDB/interface/ODScanCycle.h index dd3d09b924f12..b909a3593f023 100644 --- a/OnlineDB/EcalCondDB/interface/ODScanCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODScanCycle.h @@ -15,9 +15,9 @@ class ODScanCycle : public IODConfig { ODScanCycle(); - ~ODScanCycle(); + ~ODScanCycle() override; - inline std::string getTable() { return "ECAL_Scan_CYCLE"; } + inline std::string getTable() override { return "ECAL_Scan_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -35,7 +35,7 @@ class ODScanCycle : public IODConfig { int m_ID; int m_scan_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODScanCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTCCConfig.h b/OnlineDB/EcalCondDB/interface/ODTCCConfig.h index bfe43ccd15e70..0d14cef083587 100644 --- a/OnlineDB/EcalCondDB/interface/ODTCCConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODTCCConfig.h @@ -16,10 +16,10 @@ class ODTCCConfig : public IODConfig { public: friend class EcalCondDBInterface; ODTCCConfig(); - ~ODTCCConfig(); + ~ODTCCConfig() override; // User data methods - inline std::string getTable() { return "ECAL_TCC_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_TCC_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -48,7 +48,7 @@ class ODTCCConfig : public IODConfig { private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODTCCConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTCCCycle.h b/OnlineDB/EcalCondDB/interface/ODTCCCycle.h index 4b804fbe64e61..0807d4fea374e 100644 --- a/OnlineDB/EcalCondDB/interface/ODTCCCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODTCCCycle.h @@ -14,9 +14,9 @@ class ODTCCCycle : public IODConfig { friend class ODEcalCycle; ODTCCCycle(); - ~ODTCCCycle(); + ~ODTCCCycle() override; - inline std::string getTable() { return "ECAL_TCC_CYCLE"; } + inline std::string getTable() override { return "ECAL_TCC_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODTCCCycle : public IODConfig { int m_ID; int m_tcc_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODTCCCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTCCEEConfig.h b/OnlineDB/EcalCondDB/interface/ODTCCEEConfig.h index 6aec00ec1ae27..2a8a6071d5f8f 100644 --- a/OnlineDB/EcalCondDB/interface/ODTCCEEConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODTCCEEConfig.h @@ -16,10 +16,10 @@ class ODTCCEEConfig : public IODConfig { public: friend class EcalCondDBInterface; ODTCCEEConfig(); - ~ODTCCEEConfig(); + ~ODTCCEEConfig() override; // User data methods - inline std::string getTable() { return "ECAL_TCC_EE_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_TCC_EE_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -53,7 +53,7 @@ class ODTCCEEConfig : public IODConfig { private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODTCCEEConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTCCEECycle.h b/OnlineDB/EcalCondDB/interface/ODTCCEECycle.h index 0e1fbba6a4098..9fdd9c80bc8d0 100644 --- a/OnlineDB/EcalCondDB/interface/ODTCCEECycle.h +++ b/OnlineDB/EcalCondDB/interface/ODTCCEECycle.h @@ -14,9 +14,9 @@ class ODTCCEECycle : public IODConfig { friend class ODEcalCycle; ODTCCEECycle(); - ~ODTCCEECycle(); + ~ODTCCEECycle() override; - inline std::string getTable() { return "ECAL_TCC_EE_CYCLE"; } + inline std::string getTable() override { return "ECAL_TCC_EE_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODTCCEECycle : public IODConfig { int m_ID; int m_tcc_ee_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODTCCEECycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTTCFConfig.h b/OnlineDB/EcalCondDB/interface/ODTTCFConfig.h index 62ebd73a56f67..7a1c5655cd470 100644 --- a/OnlineDB/EcalCondDB/interface/ODTTCFConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODTTCFConfig.h @@ -16,10 +16,10 @@ class ODTTCFConfig : public IODConfig { public: friend class EcalCondDBInterface; ODTTCFConfig(); - ~ODTTCFConfig(); + ~ODTTCFConfig() override; // User data methods - inline std::string getTable() { return "ECAL_TTCF_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_TTCF_CONFIGURATION"; } inline void setSize(unsigned int id) { m_size = id; } inline unsigned int getSize() const { return m_size; } @@ -40,7 +40,7 @@ class ODTTCFConfig : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTTCFCycle.h b/OnlineDB/EcalCondDB/interface/ODTTCFCycle.h index 484ba8f36aad9..a3500b3d84a14 100644 --- a/OnlineDB/EcalCondDB/interface/ODTTCFCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODTTCFCycle.h @@ -14,9 +14,9 @@ class ODTTCFCycle : public IODConfig { friend class ODEcalCycle; ODTTCFCycle(); - ~ODTTCFCycle(); + ~ODTTCFCycle() override; - inline std::string getTable() { return "ECAL_TTCF_CYCLE"; } + inline std::string getTable() override { return "ECAL_TTCF_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODTTCFCycle : public IODConfig { int m_ID; int m_ttcf_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODTTCFCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTTCciConfig.h b/OnlineDB/EcalCondDB/interface/ODTTCciConfig.h index d109a2daf5282..803479e04e0ae 100644 --- a/OnlineDB/EcalCondDB/interface/ODTTCciConfig.h +++ b/OnlineDB/EcalCondDB/interface/ODTTCciConfig.h @@ -16,10 +16,10 @@ class ODTTCciConfig : public IODConfig { public: friend class EcalCondDBInterface; ODTTCciConfig(); - ~ODTTCciConfig(); + ~ODTTCciConfig() override; // User data methods - inline std::string getTable() { return "ECAL_TTCci_CONFIGURATION"; } + inline std::string getTable() override { return "ECAL_TTCci_CONFIGURATION"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -46,7 +46,7 @@ class ODTTCciConfig : public IODConfig { private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); void clear(); void fetchData(ODTTCciConfig * result) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTTCciCycle.h b/OnlineDB/EcalCondDB/interface/ODTTCciCycle.h index 08a7ffd976890..2d624f99368e1 100644 --- a/OnlineDB/EcalCondDB/interface/ODTTCciCycle.h +++ b/OnlineDB/EcalCondDB/interface/ODTTCciCycle.h @@ -14,9 +14,9 @@ class ODTTCciCycle : public IODConfig { friend class ODEcalCycle; ODTTCciCycle(); - ~ODTTCciCycle(); + ~ODTTCciCycle() override; - inline std::string getTable() { return "ECAL_TTCci_CYCLE"; } + inline std::string getTable() override { return "ECAL_TTCci_CYCLE"; } inline void setId(int id){m_ID=id;} inline int getId()const{ return m_ID;} ; @@ -34,7 +34,7 @@ class ODTTCciCycle : public IODConfig { int m_ID; int m_ttcci_config_id; void writeDB() noexcept(false); - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void clear(); void fetchData(ODTTCciCycle * result) noexcept(false); void insertConfig() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTowersToByPassDat.h b/OnlineDB/EcalCondDB/interface/ODTowersToByPassDat.h index 2b5708aa43cb4..fd0dd792636b9 100644 --- a/OnlineDB/EcalCondDB/interface/ODTowersToByPassDat.h +++ b/OnlineDB/EcalCondDB/interface/ODTowersToByPassDat.h @@ -12,10 +12,10 @@ class ODTowersToByPassDat : public IODConfig { public: friend class EcalCondDBInterface; ODTowersToByPassDat(); - ~ODTowersToByPassDat(); + ~ODTowersToByPassDat() override; // User data methods - inline std::string getTable() { return "TOWERS_TO_BYPASS_DAT"; } + inline std::string getTable() override { return "TOWERS_TO_BYPASS_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -38,7 +38,7 @@ class ODTowersToByPassDat : public IODConfig { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const ODTowersToByPassDat* item, ODTowersToByPassInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODTowersToByPassInfo.h b/OnlineDB/EcalCondDB/interface/ODTowersToByPassInfo.h index 28a23c3106d60..8c7dc99c90dc8 100644 --- a/OnlineDB/EcalCondDB/interface/ODTowersToByPassInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODTowersToByPassInfo.h @@ -10,10 +10,10 @@ class ODTowersToByPassInfo : public IODConfig { public: friend class EcalCondDBInterface; ODTowersToByPassInfo(); - ~ODTowersToByPassInfo(); + ~ODTowersToByPassInfo() override; // User data methods - inline std::string getTable() { return "TOWERS_TO_BYPASS_INFO"; } + inline std::string getTable() override { return "TOWERS_TO_BYPASS_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class ODTowersToByPassInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODVfeToRejectDat.h b/OnlineDB/EcalCondDB/interface/ODVfeToRejectDat.h index d153d7edb3a9d..c333b856bf687 100644 --- a/OnlineDB/EcalCondDB/interface/ODVfeToRejectDat.h +++ b/OnlineDB/EcalCondDB/interface/ODVfeToRejectDat.h @@ -12,10 +12,10 @@ class ODVfeToRejectDat : public IODConfig { public: friend class EcalCondDBInterface; ODVfeToRejectDat(); - ~ODVfeToRejectDat(); + ~ODVfeToRejectDat() override; // User data methods - inline std::string getTable() { return "VFES_TO_REJECT_DAT"; } + inline std::string getTable() override { return "VFES_TO_REJECT_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -38,7 +38,7 @@ class ODVfeToRejectDat : public IODConfig { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const ODVfeToRejectDat* item, ODVfeToRejectInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODVfeToRejectInfo.h b/OnlineDB/EcalCondDB/interface/ODVfeToRejectInfo.h index 8574e2ce02b9c..e4addd2352a6b 100644 --- a/OnlineDB/EcalCondDB/interface/ODVfeToRejectInfo.h +++ b/OnlineDB/EcalCondDB/interface/ODVfeToRejectInfo.h @@ -10,10 +10,10 @@ class ODVfeToRejectInfo : public IODConfig { public: friend class EcalCondDBInterface; ODVfeToRejectInfo(); - ~ODVfeToRejectInfo(); + ~ODVfeToRejectInfo() override; // User data methods - inline std::string getTable() { return "VFES_to_reject_INFO"; } + inline std::string getTable() override { return "VFES_to_reject_INFO"; } inline void setId(int id) { m_ID = id; } inline int getId() const { return m_ID; } @@ -28,7 +28,7 @@ class ODVfeToRejectInfo : public IODConfig { void setParameters(const std::map& my_keys_map); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB() noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODWeightsDat.h b/OnlineDB/EcalCondDB/interface/ODWeightsDat.h index 4f4c5fc890564..d1fa86804354b 100644 --- a/OnlineDB/EcalCondDB/interface/ODWeightsDat.h +++ b/OnlineDB/EcalCondDB/interface/ODWeightsDat.h @@ -13,10 +13,10 @@ class ODWeightsDat : public IODConfig { public: friend class EcalCondDBInterface; ODWeightsDat(); - ~ODWeightsDat(); + ~ODWeightsDat() override; // User data methods - inline std::string getTable() { return "DCC_WEIGHTS_DAT"; } + inline std::string getTable() override { return "DCC_WEIGHTS_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -54,7 +54,7 @@ class ODWeightsDat : public IODConfig { private: void clear(); void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const ODWeightsDat* item, ODFEWeightsInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/ODWeightsSamplesDat.h b/OnlineDB/EcalCondDB/interface/ODWeightsSamplesDat.h index 98bb026110cfc..6aa3cbb4b15fc 100644 --- a/OnlineDB/EcalCondDB/interface/ODWeightsSamplesDat.h +++ b/OnlineDB/EcalCondDB/interface/ODWeightsSamplesDat.h @@ -13,10 +13,10 @@ class ODWeightsSamplesDat : public IODConfig { public: friend class EcalCondDBInterface; ODWeightsSamplesDat(); - ~ODWeightsSamplesDat(); + ~ODWeightsSamplesDat() override; // User data methods - inline std::string getTable() { return "DCC_WEIGHTSAMPLE_DAT"; } + inline std::string getTable() override { return "DCC_WEIGHTSAMPLE_DAT"; } inline void setId(int dac) { m_ID = dac; } inline int getId() const { return m_ID; } @@ -35,7 +35,7 @@ class ODWeightsSamplesDat : public IODConfig { private: void clear(); void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const ODWeightsSamplesDat* item, ODFEWeightsInfo* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunCommentDat.h b/OnlineDB/EcalCondDB/interface/RunCommentDat.h index 977240c28cfcb..c769c96e5b64a 100644 --- a/OnlineDB/EcalCondDB/interface/RunCommentDat.h +++ b/OnlineDB/EcalCondDB/interface/RunCommentDat.h @@ -12,10 +12,10 @@ class RunCommentDat : public IDataItem { public: friend class EcalCondDBInterface; RunCommentDat(); - ~RunCommentDat(); + ~RunCommentDat() override; // User data methods - inline std::string getTable() { return "RUN_COMMENT_DAT"; } + inline std::string getTable() override { return "RUN_COMMENT_DAT"; } inline void setSource(std::string x) { m_source = x; } inline std::string getSource() const { return m_source; } @@ -26,7 +26,7 @@ class RunCommentDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunCommentDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunConfigDat.h b/OnlineDB/EcalCondDB/interface/RunConfigDat.h index cacc6f232cb1e..9fe9e55109c6a 100644 --- a/OnlineDB/EcalCondDB/interface/RunConfigDat.h +++ b/OnlineDB/EcalCondDB/interface/RunConfigDat.h @@ -12,10 +12,10 @@ class RunConfigDat : public IDataItem { public: friend class EcalCondDBInterface; RunConfigDat(); - ~RunConfigDat(); + ~RunConfigDat() override; // User data methods - inline std::string getTable() { return "RUN_CONFIG_DAT"; } + inline std::string getTable() override { return "RUN_CONFIG_DAT"; } inline std::string getConfigTag() const { return m_configTag; } inline void setConfigTag(std::string tag) { m_configTag = tag; } @@ -24,7 +24,7 @@ class RunConfigDat : public IDataItem { inline void setConfigVersion(int ver) { m_configVer = ver; } private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunConfigDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunCrystalErrorsDat.h b/OnlineDB/EcalCondDB/interface/RunCrystalErrorsDat.h index b4f72f6bb4352..3ce782e783354 100644 --- a/OnlineDB/EcalCondDB/interface/RunCrystalErrorsDat.h +++ b/OnlineDB/EcalCondDB/interface/RunCrystalErrorsDat.h @@ -13,17 +13,17 @@ class RunCrystalErrorsDat : public IDataItem { public: friend class EcalCondDBInterface; RunCrystalErrorsDat(); - ~RunCrystalErrorsDat(); + ~RunCrystalErrorsDat() override; // User data methods - inline std::string getTable() { return "RUN_CRYSTAL_ERRORS_DAT"; } + inline std::string getTable() override { return "RUN_CRYSTAL_ERRORS_DAT"; } inline void setErrorBits(uint64_t bits) { m_errorBits = bits; } inline uint64_t getErrorBits() const { return m_errorBits; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunCrystalErrorsDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunDCSHVDat.h b/OnlineDB/EcalCondDB/interface/RunDCSHVDat.h index 99985bb6f573b..7b32f9a430d00 100644 --- a/OnlineDB/EcalCondDB/interface/RunDCSHVDat.h +++ b/OnlineDB/EcalCondDB/interface/RunDCSHVDat.h @@ -26,10 +26,10 @@ class RunDCSHVDat : public IDataItem { friend class EcalCondDBInterface; RunDCSHVDat(); - ~RunDCSHVDat(); + ~RunDCSHVDat() override; // User data methods - inline std::string getTable() { return ""; } + inline std::string getTable() override { return ""; } inline std::string getEBAccount() { return "CMS_ECAL_HV_PVSS_COND"; } inline std::string getEEAccount() { return "CMS_EE_HV_PVSS_COND"; } inline void setHV(float t) { m_hv = t; } @@ -58,7 +58,7 @@ class RunDCSHVDat : public IDataItem { void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunDCSHVDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunDCSLVDat.h b/OnlineDB/EcalCondDB/interface/RunDCSLVDat.h index 434163d191353..4929ac8c5008a 100644 --- a/OnlineDB/EcalCondDB/interface/RunDCSLVDat.h +++ b/OnlineDB/EcalCondDB/interface/RunDCSLVDat.h @@ -25,10 +25,10 @@ class RunDCSLVDat : public IDataItem { friend class EcalCondDBInterface; RunDCSLVDat(); - ~RunDCSLVDat(); + ~RunDCSLVDat() override; // User data methods - inline std::string getTable() { return ""; } + inline std::string getTable() override { return ""; } inline std::string getEBAccount() { return "CMS_ECAL_LV_PVSS_COND"; } inline std::string getEEAccount() { return "CMS_ECAL_LV_PVSS_COND"; } inline void setLV(float t) { m_lv = t; } @@ -48,7 +48,7 @@ class RunDCSLVDat : public IDataItem { int nowMicroseconds(); void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSLVDat >* ); void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunDCSLVDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunDCSMagnetDat.h b/OnlineDB/EcalCondDB/interface/RunDCSMagnetDat.h index 5de20763ab24b..7460e89e4467a 100644 --- a/OnlineDB/EcalCondDB/interface/RunDCSMagnetDat.h +++ b/OnlineDB/EcalCondDB/interface/RunDCSMagnetDat.h @@ -18,10 +18,10 @@ class RunDCSMagnetDat : public IDataItem { friend class EcalCondDBInterface; RunDCSMagnetDat(); - ~RunDCSMagnetDat(); + ~RunDCSMagnetDat() override; // User data methods - inline std::string getTable() { return "CMSFWMAGNET_LV"; } + inline std::string getTable() override { return "CMSFWMAGNET_LV"; } inline std::string getMagnetAccount() { return "CMS_DCS_ENV_PVSS_COND"; } inline void setMagnetCurrent(float t) { m_current = t; } inline float getMagnetCurrent() const { return m_current; } @@ -37,7 +37,7 @@ class RunDCSMagnetDat : public IDataItem { void fillTheMap(ResultSet *, std::map< EcalLogicID, RunDCSMagnetDat >* ); void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunDCSMagnetDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunDat.h b/OnlineDB/EcalCondDB/interface/RunDat.h index f829b639abad1..4062013c6e2d8 100644 --- a/OnlineDB/EcalCondDB/interface/RunDat.h +++ b/OnlineDB/EcalCondDB/interface/RunDat.h @@ -12,17 +12,17 @@ class RunDat : public IDataItem { public: friend class EcalCondDBInterface; RunDat(); - ~RunDat(); + ~RunDat() override; // User data methods - inline std::string getTable() { return "RUN_DAT"; } + inline std::string getTable() override { return "RUN_DAT"; } inline void setNumEvents(int num) { m_numEvents = num; } inline int getNumEvents() const { return m_numEvents; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunFEConfigDat.h b/OnlineDB/EcalCondDB/interface/RunFEConfigDat.h index f3b92f6cf1831..3fe9538acc184 100644 --- a/OnlineDB/EcalCondDB/interface/RunFEConfigDat.h +++ b/OnlineDB/EcalCondDB/interface/RunFEConfigDat.h @@ -13,10 +13,10 @@ class RunFEConfigDat : public IDataItem { public: friend class EcalCondDBInterface; RunFEConfigDat(); - ~RunFEConfigDat(); + ~RunFEConfigDat() override; // User data methods - inline std::string getTable() { return "RUN_FECONFIG_DAT"; } + inline std::string getTable() override { return "RUN_FECONFIG_DAT"; } inline int getConfigId() const { return m_config; } inline void setConfigId(int x) { m_config = x; } @@ -24,7 +24,7 @@ class RunFEConfigDat : public IDataItem { std::list getDelays(); private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunFEConfigDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunH4TablePositionDat.h b/OnlineDB/EcalCondDB/interface/RunH4TablePositionDat.h index 131cd68a944b0..54de3758d6c03 100644 --- a/OnlineDB/EcalCondDB/interface/RunH4TablePositionDat.h +++ b/OnlineDB/EcalCondDB/interface/RunH4TablePositionDat.h @@ -12,10 +12,10 @@ class RunH4TablePositionDat : public IDataItem { public: friend class EcalCondDBInterface; RunH4TablePositionDat(); - ~RunH4TablePositionDat(); + ~RunH4TablePositionDat() override; // User data methods - inline std::string getTable() { return "RUN_H4_TABLE_POSITION_DAT"; } + inline std::string getTable() override { return "RUN_H4_TABLE_POSITION_DAT"; } inline void setTableX(int num) { m_table_x = num; } inline int getTableX() const { return m_table_x; } @@ -31,7 +31,7 @@ class RunH4TablePositionDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunH4TablePositionDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunIOV.h b/OnlineDB/EcalCondDB/interface/RunIOV.h index 91962ef1fae75..7466725cd0e44 100644 --- a/OnlineDB/EcalCondDB/interface/RunIOV.h +++ b/OnlineDB/EcalCondDB/interface/RunIOV.h @@ -15,7 +15,7 @@ class RunIOV : public IIOV { friend class EcalCondDBInterface; RunIOV(); - ~RunIOV(); + ~RunIOV() override; // Methods for user data void setRunNumber(run_t run); @@ -35,9 +35,9 @@ class RunIOV : public IIOV { // Methods from IUniqueDBObject int getID(){ return m_ID;} ; - int fetchID() noexcept(false); + int fetchID() noexcept(false) override; int fetchIDByRunAndTag() noexcept(false); - void setByID(int id) noexcept(false); + void setByID(int id) noexcept(false) override; // operators inline bool operator==(const RunIOV &r) const diff --git a/OnlineDB/EcalCondDB/interface/RunLaserRunDat.h b/OnlineDB/EcalCondDB/interface/RunLaserRunDat.h index a74c4db0c38ff..2031f7f19568b 100644 --- a/OnlineDB/EcalCondDB/interface/RunLaserRunDat.h +++ b/OnlineDB/EcalCondDB/interface/RunLaserRunDat.h @@ -12,10 +12,10 @@ class RunLaserRunDat : public IDataItem { public: friend class EcalCondDBInterface; RunLaserRunDat(); - ~RunLaserRunDat(); + ~RunLaserRunDat() override; // User data methods - inline std::string getTable() { return "RUN_LASERRUN_CONFIG_DAT"; } + inline std::string getTable() override { return "RUN_LASERRUN_CONFIG_DAT"; } inline void setLaserSequenceType(std::string x) { m_laserSeqType = x; } inline std::string getLaserSequenceType() const { return m_laserSeqType; } @@ -25,7 +25,7 @@ class RunLaserRunDat : public IDataItem { private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunLaserRunDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunList.h b/OnlineDB/EcalCondDB/interface/RunList.h index 0f80602cc8ea0..4e7a13d11d1c2 100644 --- a/OnlineDB/EcalCondDB/interface/RunList.h +++ b/OnlineDB/EcalCondDB/interface/RunList.h @@ -18,7 +18,7 @@ class RunList : public IDBObject { friend class EcalCondDBInterface; RunList(); - ~RunList(); + ~RunList() override; // Methods for user data diff --git a/OnlineDB/EcalCondDB/interface/RunMemChErrorsDat.h b/OnlineDB/EcalCondDB/interface/RunMemChErrorsDat.h index 9b745cb70183c..33bbec7fc9f10 100644 --- a/OnlineDB/EcalCondDB/interface/RunMemChErrorsDat.h +++ b/OnlineDB/EcalCondDB/interface/RunMemChErrorsDat.h @@ -13,17 +13,17 @@ class RunMemChErrorsDat : public IDataItem { public: friend class EcalCondDBInterface; RunMemChErrorsDat(); - ~RunMemChErrorsDat(); + ~RunMemChErrorsDat() override; // User data methods - inline std::string getTable() { return "RUN_MEM_CH_ERRORS_DAT"; } + inline std::string getTable() override { return "RUN_MEM_CH_ERRORS_DAT"; } inline void setErrorBits(uint64_t bits) { m_errorBits = bits; } inline uint64_t getErrorBits() const { return m_errorBits; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunMemChErrorsDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunMemTTErrorsDat.h b/OnlineDB/EcalCondDB/interface/RunMemTTErrorsDat.h index 9454df83d4527..0c842d85532e9 100644 --- a/OnlineDB/EcalCondDB/interface/RunMemTTErrorsDat.h +++ b/OnlineDB/EcalCondDB/interface/RunMemTTErrorsDat.h @@ -13,17 +13,17 @@ class RunMemTTErrorsDat : public IDataItem { public: friend class EcalCondDBInterface; RunMemTTErrorsDat(); - ~RunMemTTErrorsDat(); + ~RunMemTTErrorsDat() override; // User data methods - inline std::string getTable() { return "RUN_MEM_TT_ERRORS_DAT"; } + inline std::string getTable() override { return "RUN_MEM_TT_ERRORS_DAT"; } inline void setErrorBits(uint64_t bits) { m_errorBits = bits; } inline uint64_t getErrorBits() const { return m_errorBits; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunMemTTErrorsDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunModeDef.h b/OnlineDB/EcalCondDB/interface/RunModeDef.h index 22a2de445568d..817b92934247d 100644 --- a/OnlineDB/EcalCondDB/interface/RunModeDef.h +++ b/OnlineDB/EcalCondDB/interface/RunModeDef.h @@ -14,7 +14,7 @@ class RunModeDef : public IDef { friend class EcalCondDBInterface; RunModeDef(); - virtual ~RunModeDef(); + ~RunModeDef() override; // Methods for user data std::string getRunMode() const; @@ -23,8 +23,8 @@ class RunModeDef : public IDef { // Methods from IUniqueDBObject - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators. m_desc is not considered, it cannot be written to DB anyhow inline bool operator==(const RunModeDef &t) const { return m_runMode == t.m_runMode; } diff --git a/OnlineDB/EcalCondDB/interface/RunPNErrorsDat.h b/OnlineDB/EcalCondDB/interface/RunPNErrorsDat.h index 736bc8f2034c4..10612b7491535 100644 --- a/OnlineDB/EcalCondDB/interface/RunPNErrorsDat.h +++ b/OnlineDB/EcalCondDB/interface/RunPNErrorsDat.h @@ -13,17 +13,17 @@ class RunPNErrorsDat : public IDataItem { public: friend class EcalCondDBInterface; RunPNErrorsDat(); - ~RunPNErrorsDat(); + ~RunPNErrorsDat() override; // User data methods - inline std::string getTable() { return "RUN_PN_ERRORS_DAT"; } + inline std::string getTable() override { return "RUN_PN_ERRORS_DAT"; } inline void setErrorBits(uint64_t bits) { m_errorBits = bits; } inline uint64_t getErrorBits() const { return m_errorBits; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunPNErrorsDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunPTMTempDat.h b/OnlineDB/EcalCondDB/interface/RunPTMTempDat.h index abd38fe1cad24..08251754d009f 100644 --- a/OnlineDB/EcalCondDB/interface/RunPTMTempDat.h +++ b/OnlineDB/EcalCondDB/interface/RunPTMTempDat.h @@ -12,16 +12,16 @@ class RunPTMTempDat : public IDataItem { public: friend class EcalCondDBInterface; RunPTMTempDat(); - ~RunPTMTempDat(); + ~RunPTMTempDat() override; // User data methods - inline std::string getTable() { return "RUN_PTM_TEMP_DAT"; } + inline std::string getTable() override { return "RUN_PTM_TEMP_DAT"; } inline void setTemperature(float t) { m_temperature = t; } inline float getTemperature() const { return m_temperature; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunPTMTempDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunSeqDef.h b/OnlineDB/EcalCondDB/interface/RunSeqDef.h index c00a871fa6ec3..a8ec335c9b403 100644 --- a/OnlineDB/EcalCondDB/interface/RunSeqDef.h +++ b/OnlineDB/EcalCondDB/interface/RunSeqDef.h @@ -16,7 +16,7 @@ class RunSeqDef : public IDef { friend class EcalCondDBInterface; RunSeqDef(); - virtual ~RunSeqDef(); + ~RunSeqDef() override; // Methods for user data std::string getRunSeq() const; @@ -30,8 +30,8 @@ class RunSeqDef : public IDef { // Methods from IUniqueDBObject - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators. m_desc is not considered, it cannot be written to DB anyhow inline bool operator==(const RunSeqDef &t) const { return m_runSeq == t.m_runSeq; } diff --git a/OnlineDB/EcalCondDB/interface/RunTPGConfigDat.h b/OnlineDB/EcalCondDB/interface/RunTPGConfigDat.h index 78da54756825a..4b03c19ab5a25 100644 --- a/OnlineDB/EcalCondDB/interface/RunTPGConfigDat.h +++ b/OnlineDB/EcalCondDB/interface/RunTPGConfigDat.h @@ -12,10 +12,10 @@ class RunTPGConfigDat : public IDataItem { public: friend class EcalCondDBInterface; RunTPGConfigDat(); - ~RunTPGConfigDat(); + ~RunTPGConfigDat() override; // User data methods - inline std::string getTable() { return "RUN_TPGCONFIG_DAT"; } + inline std::string getTable() override { return "RUN_TPGCONFIG_DAT"; } inline std::string getConfigTag() const { return m_config; } inline void setConfigTag(std::string x) { m_config = x; } @@ -24,7 +24,7 @@ class RunTPGConfigDat : public IDataItem { private: - void prepareWrite() noexcept(false); + void prepareWrite() noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunTPGConfigDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunTTErrorsDat.h b/OnlineDB/EcalCondDB/interface/RunTTErrorsDat.h index aa2c06bb0acba..284697f55dd1f 100644 --- a/OnlineDB/EcalCondDB/interface/RunTTErrorsDat.h +++ b/OnlineDB/EcalCondDB/interface/RunTTErrorsDat.h @@ -13,17 +13,17 @@ class RunTTErrorsDat : public IDataItem { public: friend class EcalCondDBInterface; RunTTErrorsDat(); - ~RunTTErrorsDat(); + ~RunTTErrorsDat() override; // User data methods - inline std::string getTable() { return "RUN_TT_ERRORS_DAT"; } + inline std::string getTable() override { return "RUN_TT_ERRORS_DAT"; } inline void setErrorBits(uint64_t bits) { m_errorBits = bits; } inline uint64_t getErrorBits() const { return m_errorBits; } private: void prepareWrite() - noexcept(false); + noexcept(false) override; void writeDB(const EcalLogicID* ecid, const RunTTErrorsDat* item, RunIOV* iov ) noexcept(false); diff --git a/OnlineDB/EcalCondDB/interface/RunTag.h b/OnlineDB/EcalCondDB/interface/RunTag.h index 3fd9bc2dbe94d..c1097a2580a62 100644 --- a/OnlineDB/EcalCondDB/interface/RunTag.h +++ b/OnlineDB/EcalCondDB/interface/RunTag.h @@ -16,7 +16,7 @@ class RunTag : public ITag { friend class EcalCondDBInterface; RunTag(); - ~RunTag(); + ~RunTag() override; // Methods for user data std::string getGeneralTag() const; @@ -29,8 +29,8 @@ class RunTag : public ITag { void setRunTypeDef(const RunTypeDef& runTypeDef); // Methods using ID - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // operators inline bool operator==(const RunTag& t) const diff --git a/OnlineDB/EcalCondDB/interface/RunTypeDef.h b/OnlineDB/EcalCondDB/interface/RunTypeDef.h index c5ec36021ca37..db3048c007a37 100644 --- a/OnlineDB/EcalCondDB/interface/RunTypeDef.h +++ b/OnlineDB/EcalCondDB/interface/RunTypeDef.h @@ -14,7 +14,7 @@ class RunTypeDef : public IDef { friend class EcalCondDBInterface; RunTypeDef(); - virtual ~RunTypeDef(); + ~RunTypeDef() override; // Methods for user data std::string getRunType() const; @@ -23,8 +23,8 @@ class RunTypeDef : public IDef { std::string getDescription() const; // Methods from IUniqueDBObject - int fetchID() noexcept(false); - void setByID(int id) noexcept(false); + int fetchID() noexcept(false) override; + void setByID(int id) noexcept(false) override; // Operators. m_desc is not considered, it cannot be written to DB anyhow inline bool operator==(const RunTypeDef &t) const { return m_runType == t.m_runType; } diff --git a/OnlineDB/EcalCondDB/interface/Tm.h b/OnlineDB/EcalCondDB/interface/Tm.h index 717fb06aa3520..e0ae0e3f8e1ec 100644 --- a/OnlineDB/EcalCondDB/interface/Tm.h +++ b/OnlineDB/EcalCondDB/interface/Tm.h @@ -5,9 +5,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include // Wrapper class for time.h tm struct class Tm { diff --git a/OnlineDB/EcalCondDB/src/CaliCrystalIntercalDat.cc b/OnlineDB/EcalCondDB/src/CaliCrystalIntercalDat.cc index 015c6e85956d0..9600bb7cd4507 100644 --- a/OnlineDB/EcalCondDB/src/CaliCrystalIntercalDat.cc +++ b/OnlineDB/EcalCondDB/src/CaliCrystalIntercalDat.cc @@ -11,9 +11,9 @@ using namespace oracle::occi; CaliCrystalIntercalDat::CaliCrystalIntercalDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; m_cali = 0; m_caliRMS = 0; diff --git a/OnlineDB/EcalCondDB/src/CaliGainRatioDat.cc b/OnlineDB/EcalCondDB/src/CaliGainRatioDat.cc index 768881cb8cef2..3c24d9f8df3ca 100644 --- a/OnlineDB/EcalCondDB/src/CaliGainRatioDat.cc +++ b/OnlineDB/EcalCondDB/src/CaliGainRatioDat.cc @@ -11,9 +11,9 @@ using namespace oracle::occi; CaliGainRatioDat::CaliGainRatioDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; m_g1_g12 = 0; m_g6_g12 = 0; diff --git a/OnlineDB/EcalCondDB/src/CaliGeneralDat.cc b/OnlineDB/EcalCondDB/src/CaliGeneralDat.cc index e6ef86a0a5d36..9901118e16246 100644 --- a/OnlineDB/EcalCondDB/src/CaliGeneralDat.cc +++ b/OnlineDB/EcalCondDB/src/CaliGeneralDat.cc @@ -11,9 +11,9 @@ using namespace oracle::occi; CaliGeneralDat::CaliGeneralDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; m_numEvents = 0; m_comments = "none"; diff --git a/OnlineDB/EcalCondDB/src/CaliHVScanRatioDat.cc b/OnlineDB/EcalCondDB/src/CaliHVScanRatioDat.cc index 93a44a45cedb1..08bf8aa5dc9ef 100644 --- a/OnlineDB/EcalCondDB/src/CaliHVScanRatioDat.cc +++ b/OnlineDB/EcalCondDB/src/CaliHVScanRatioDat.cc @@ -11,9 +11,9 @@ using namespace oracle::occi; CaliHVScanRatioDat::CaliHVScanRatioDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; m_hvratio = 0; m_hvratioRMS = 0; diff --git a/OnlineDB/EcalCondDB/src/CaliIOV.cc b/OnlineDB/EcalCondDB/src/CaliIOV.cc index da18e2b56a490..779ab15f0ceb7 100644 --- a/OnlineDB/EcalCondDB/src/CaliIOV.cc +++ b/OnlineDB/EcalCondDB/src/CaliIOV.cc @@ -11,7 +11,7 @@ using namespace oracle::occi; CaliIOV::CaliIOV() { - m_conn = NULL; + m_conn = nullptr; m_ID = 0; m_since = Tm(); m_till = Tm(); diff --git a/OnlineDB/EcalCondDB/src/CaliTag.cc b/OnlineDB/EcalCondDB/src/CaliTag.cc index ced2129e43a06..325ef3a61a3b9 100644 --- a/OnlineDB/EcalCondDB/src/CaliTag.cc +++ b/OnlineDB/EcalCondDB/src/CaliTag.cc @@ -8,8 +8,8 @@ using namespace oracle::occi; CaliTag::CaliTag() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_genTag = "default"; m_locDef = LocationDef(); diff --git a/OnlineDB/EcalCondDB/src/CaliTempDat.cc b/OnlineDB/EcalCondDB/src/CaliTempDat.cc index cbce2575ad513..3593482e5935c 100644 --- a/OnlineDB/EcalCondDB/src/CaliTempDat.cc +++ b/OnlineDB/EcalCondDB/src/CaliTempDat.cc @@ -11,9 +11,9 @@ using namespace oracle::occi; CaliTempDat::CaliTempDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; m_beta = 0; m_r25 = 0; diff --git a/OnlineDB/EcalCondDB/src/DCSPTMTemp.cc b/OnlineDB/EcalCondDB/src/DCSPTMTemp.cc index 9a82ccd847e64..b7082e5374347 100644 --- a/OnlineDB/EcalCondDB/src/DCSPTMTemp.cc +++ b/OnlineDB/EcalCondDB/src/DCSPTMTemp.cc @@ -12,7 +12,7 @@ using namespace oracle::occi; DCSPTMTemp::DCSPTMTemp() { - m_conn = NULL; + m_conn = nullptr; m_runStart = Tm(); diff --git a/OnlineDB/EcalCondDB/src/DCSPTMTempList.cc b/OnlineDB/EcalCondDB/src/DCSPTMTempList.cc index c22b7b0d72fd9..94195666009bb 100644 --- a/OnlineDB/EcalCondDB/src/DCSPTMTempList.cc +++ b/OnlineDB/EcalCondDB/src/DCSPTMTempList.cc @@ -14,7 +14,7 @@ using namespace oracle::occi; DCSPTMTempList::DCSPTMTempList() { - m_conn = NULL; + m_conn = nullptr; } DCSPTMTempList::~DCSPTMTempList() diff --git a/OnlineDB/EcalCondDB/src/DCUCCSDat.cc b/OnlineDB/EcalCondDB/src/DCUCCSDat.cc index 3d258d3a923e2..f9061425c1881 100644 --- a/OnlineDB/EcalCondDB/src/DCUCCSDat.cc +++ b/OnlineDB/EcalCondDB/src/DCUCCSDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; DCUCCSDat::DCUCCSDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_m1_vdd1 = 0; m_m2_vdd1 = 0; diff --git a/OnlineDB/EcalCondDB/src/DCUCapsuleTempDat.cc b/OnlineDB/EcalCondDB/src/DCUCapsuleTempDat.cc index 0aaba97f417ee..b7217fba4f103 100644 --- a/OnlineDB/EcalCondDB/src/DCUCapsuleTempDat.cc +++ b/OnlineDB/EcalCondDB/src/DCUCapsuleTempDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; DCUCapsuleTempDat::DCUCapsuleTempDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_capsuleTemp = 0; } diff --git a/OnlineDB/EcalCondDB/src/DCUCapsuleTempRawDat.cc b/OnlineDB/EcalCondDB/src/DCUCapsuleTempRawDat.cc index 7a048c9804d5c..1efa73986cec6 100644 --- a/OnlineDB/EcalCondDB/src/DCUCapsuleTempRawDat.cc +++ b/OnlineDB/EcalCondDB/src/DCUCapsuleTempRawDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; DCUCapsuleTempRawDat::DCUCapsuleTempRawDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_capsuleTempADC = 0; m_capsuleTempRMS = 0; diff --git a/OnlineDB/EcalCondDB/src/DCUIDarkDat.cc b/OnlineDB/EcalCondDB/src/DCUIDarkDat.cc index 152883d793404..e3a8b3a80d30b 100644 --- a/OnlineDB/EcalCondDB/src/DCUIDarkDat.cc +++ b/OnlineDB/EcalCondDB/src/DCUIDarkDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; DCUIDarkDat::DCUIDarkDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_apdIDark = 0; } diff --git a/OnlineDB/EcalCondDB/src/DCUIDarkPedDat.cc b/OnlineDB/EcalCondDB/src/DCUIDarkPedDat.cc index 905d1e831de23..9d2cc176331b2 100644 --- a/OnlineDB/EcalCondDB/src/DCUIDarkPedDat.cc +++ b/OnlineDB/EcalCondDB/src/DCUIDarkPedDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; DCUIDarkPedDat::DCUIDarkPedDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_ped = 0; } diff --git a/OnlineDB/EcalCondDB/src/DCUIOV.cc b/OnlineDB/EcalCondDB/src/DCUIOV.cc index 8e2fb60acc19c..b1bc66d3e41a3 100644 --- a/OnlineDB/EcalCondDB/src/DCUIOV.cc +++ b/OnlineDB/EcalCondDB/src/DCUIOV.cc @@ -11,7 +11,7 @@ using namespace oracle::occi; DCUIOV::DCUIOV() { - m_conn = NULL; + m_conn = nullptr; m_ID = 0; m_since = Tm(); m_till = Tm(); diff --git a/OnlineDB/EcalCondDB/src/DCULVRBTempsDat.cc b/OnlineDB/EcalCondDB/src/DCULVRBTempsDat.cc index d3d71372e28de..968e977b85fae 100644 --- a/OnlineDB/EcalCondDB/src/DCULVRBTempsDat.cc +++ b/OnlineDB/EcalCondDB/src/DCULVRBTempsDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; DCULVRBTempsDat::DCULVRBTempsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_t1 = 0; m_t2 = 0; diff --git a/OnlineDB/EcalCondDB/src/DCULVRTempsDat.cc b/OnlineDB/EcalCondDB/src/DCULVRTempsDat.cc index ff9a643469055..8c596ef832fd7 100644 --- a/OnlineDB/EcalCondDB/src/DCULVRTempsDat.cc +++ b/OnlineDB/EcalCondDB/src/DCULVRTempsDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; DCULVRTempsDat::DCULVRTempsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_t1 = 0; m_t2 = 0; diff --git a/OnlineDB/EcalCondDB/src/DCULVRVoltagesDat.cc b/OnlineDB/EcalCondDB/src/DCULVRVoltagesDat.cc index badd260241dec..83c4c0c064675 100644 --- a/OnlineDB/EcalCondDB/src/DCULVRVoltagesDat.cc +++ b/OnlineDB/EcalCondDB/src/DCULVRVoltagesDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; DCULVRVoltagesDat::DCULVRVoltagesDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_vfe1_A = 0; m_vfe2_A = 0; diff --git a/OnlineDB/EcalCondDB/src/DCUTag.cc b/OnlineDB/EcalCondDB/src/DCUTag.cc index ce5147f698add..6bd2083afbeed 100644 --- a/OnlineDB/EcalCondDB/src/DCUTag.cc +++ b/OnlineDB/EcalCondDB/src/DCUTag.cc @@ -8,8 +8,8 @@ using namespace oracle::occi; DCUTag::DCUTag() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_genTag = "default"; m_locDef = LocationDef(); diff --git a/OnlineDB/EcalCondDB/src/DCUVFETempDat.cc b/OnlineDB/EcalCondDB/src/DCUVFETempDat.cc index 28651c76d11e9..ad6bfc47ab7ea 100644 --- a/OnlineDB/EcalCondDB/src/DCUVFETempDat.cc +++ b/OnlineDB/EcalCondDB/src/DCUVFETempDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; DCUVFETempDat::DCUVFETempDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_vfeTemp = 0; } diff --git a/OnlineDB/EcalCondDB/src/EcalCommon.cc b/OnlineDB/EcalCondDB/src/EcalCommon.cc index ef1cf2136f475..3cc63dc50def2 100644 --- a/OnlineDB/EcalCondDB/src/EcalCommon.cc +++ b/OnlineDB/EcalCondDB/src/EcalCommon.cc @@ -1,4 +1,4 @@ -#include +#include #include #include "OnlineDB/EcalCondDB/interface/EcalCommon.h" diff --git a/OnlineDB/EcalCondDB/src/EcalCondDBInterface.cc b/OnlineDB/EcalCondDB/src/EcalCondDBInterface.cc index 56d1ad9e78dee..56c6fe8c91f66 100644 --- a/OnlineDB/EcalCondDB/src/EcalCondDBInterface.cc +++ b/OnlineDB/EcalCondDB/src/EcalCondDBInterface.cc @@ -3,9 +3,9 @@ #include #include #include -#include #include -#include +#include +#include #include #include "OnlineDB/Oracle/interface/Oracle.h" @@ -350,7 +350,7 @@ std::vector EcalCondDBInterface::getEcalLogicIDMappedTo(int lmr_log } std::vector ret; try { - stmt->setSQL(sql.c_str()); + stmt->setSQL(sql); stmt->setInt(1, lmr_logic_id); stmt->setString(2, maps_to); stmt->setPrefetchRowCount(IDBObject::ECALDB_NROWS); diff --git a/OnlineDB/EcalCondDB/src/EcalDBConnection.cc b/OnlineDB/EcalCondDB/src/EcalDBConnection.cc index 3113af30cbc30..a6adc3d15806a 100644 --- a/OnlineDB/EcalCondDB/src/EcalDBConnection.cc +++ b/OnlineDB/EcalCondDB/src/EcalDBConnection.cc @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include "OnlineDB/Oracle/interface/Oracle.h" diff --git a/OnlineDB/EcalCondDB/src/EcalLogicID.cc b/OnlineDB/EcalCondDB/src/EcalLogicID.cc index 2a5d6eec0125f..84b0e6025c329 100644 --- a/OnlineDB/EcalCondDB/src/EcalLogicID.cc +++ b/OnlineDB/EcalCondDB/src/EcalLogicID.cc @@ -20,7 +20,7 @@ EcalLogicID::EcalLogicID( std::string name, this->id1 = id1; this->id2 = id2; this->id3 = id3; - if (mapsTo.size() == 0) { + if (mapsTo.empty()) { this->mapsTo = name; } else { this->mapsTo = mapsTo; diff --git a/OnlineDB/EcalCondDB/src/FEConfigBadStripDat.cc b/OnlineDB/EcalCondDB/src/FEConfigBadStripDat.cc index 9522ade8ac394..628469e761d01 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigBadStripDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigBadStripDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; FEConfigBadStripDat::FEConfigBadStripDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_tcc = 0; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigBadStripInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigBadStripInfo.cc index c9c77b053ccd1..282cc8a373272 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigBadStripInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigBadStripInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigBadStripInfo.h" @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigBadStripInfo::FEConfigBadStripInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigBadTTDat.cc b/OnlineDB/EcalCondDB/src/FEConfigBadTTDat.cc index 181a87b4dca7e..bab94ff9829fe 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigBadTTDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigBadTTDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; FEConfigBadTTDat::FEConfigBadTTDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_tcc = 0; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigBadTTInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigBadTTInfo.cc index 402cd300a8f86..0c3f6a8d8bde7 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigBadTTInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigBadTTInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigBadTTInfo.h" @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigBadTTInfo::FEConfigBadTTInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigBadXTDat.cc b/OnlineDB/EcalCondDB/src/FEConfigBadXTDat.cc index cdb204031cf9a..d048398109b00 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigBadXTDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigBadXTDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; FEConfigBadXTDat::FEConfigBadXTDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_tcc = 0; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigBadXTInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigBadXTInfo.cc index 5df6c235eb1d9..b11557abc546a 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigBadXTInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigBadXTInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigBadXTInfo.h" @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigBadXTInfo::FEConfigBadXTInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigFgrDat.cc b/OnlineDB/EcalCondDB/src/FEConfigFgrDat.cc index d72ed4b9cb550..1cf989a702907 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigFgrDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigFgrDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigFgrDat::FEConfigFgrDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_group_id = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigFgrEEStripDat.cc b/OnlineDB/EcalCondDB/src/FEConfigFgrEEStripDat.cc index d2c21c64a8267..51f9f8827cc43 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigFgrEEStripDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigFgrEEStripDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigFgrEEStripDat::FEConfigFgrEEStripDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_thresh = 0; m_lut_fg = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigFgrEETowerDat.cc b/OnlineDB/EcalCondDB/src/FEConfigFgrEETowerDat.cc index c5b4f2810fd06..703e9cf7d4382 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigFgrEETowerDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigFgrEETowerDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigFgrEETowerDat::FEConfigFgrEETowerDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_lut = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigFgrGroupDat.cc b/OnlineDB/EcalCondDB/src/FEConfigFgrGroupDat.cc index 885f54c888df9..fff5d8c4e2cde 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigFgrGroupDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigFgrGroupDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigFgrGroupDat::FEConfigFgrGroupDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_group_id=0; m_thresh_low = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigFgrInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigFgrInfo.cc index 71aa92fecde56..739723332f4be 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigFgrInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigFgrInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigFgrInfo.h" @@ -12,10 +12,10 @@ using namespace oracle::occi; FEConfigFgrInfo::FEConfigFgrInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_version=0; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigFgrParamDat.cc b/OnlineDB/EcalCondDB/src/FEConfigFgrParamDat.cc index 86b87d32603e2..7a96aa2fb8426 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigFgrParamDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigFgrParamDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigFgrParamDat::FEConfigFgrParamDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_fglowthresh = 0; m_fghighthresh = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigLUTDat.cc b/OnlineDB/EcalCondDB/src/FEConfigLUTDat.cc index d7fe006c3e102..cc3fe39ca2141 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigLUTDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigLUTDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigLUTDat::FEConfigLUTDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_group_id = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigLUTGroupDat.cc b/OnlineDB/EcalCondDB/src/FEConfigLUTGroupDat.cc index ca76bd9a1e98b..42f886bf6c104 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigLUTGroupDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigLUTGroupDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigLUTGroupDat::FEConfigLUTGroupDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_group_id=0; for(int i=0; i<1024; i++){ @@ -142,7 +142,7 @@ void FEConfigLUTGroupDat::fetchData(map< EcalLogicID, FEConfigLUTGroupDat >* fil m_readStmt->setInt(1, iconfID); ResultSet* rset = m_readStmt->executeQuery(); - FEConfigLUTGroupDat* dat(0); + FEConfigLUTGroupDat* dat(nullptr); std::pair< EcalLogicID, FEConfigLUTGroupDat > p; diff --git a/OnlineDB/EcalCondDB/src/FEConfigLUTInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigLUTInfo.cc index 91e085a087f79..2f69b80d3899b 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigLUTInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigLUTInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigLUTInfo.h" @@ -12,10 +12,10 @@ using namespace oracle::occi; FEConfigLUTInfo::FEConfigLUTInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_version=0; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigLUTParamDat.cc b/OnlineDB/EcalCondDB/src/FEConfigLUTParamDat.cc index b89d8118a1bb5..d9def6e7c240e 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigLUTParamDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigLUTParamDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigLUTParamDat::FEConfigLUTParamDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_etsat = 0; m_tthreshlow = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigLinDat.cc b/OnlineDB/EcalCondDB/src/FEConfigLinDat.cc index f812de20e51d0..1a538e54492d8 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigLinDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigLinDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigLinDat::FEConfigLinDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_multx12 = 0; m_multx6 = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigLinInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigLinInfo.cc index 17a0da709081a..97fe30d3d7215 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigLinInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigLinInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigLinInfo.h" @@ -12,10 +12,10 @@ using namespace oracle::occi; FEConfigLinInfo::FEConfigLinInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_version=0; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigLinParamDat.cc b/OnlineDB/EcalCondDB/src/FEConfigLinParamDat.cc index 0d406741cb28c..0456fd98b5e5d 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigLinParamDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigLinParamDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigLinParamDat::FEConfigLinParamDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_etsat = 0; } diff --git a/OnlineDB/EcalCondDB/src/FEConfigMainInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigMainInfo.cc index ff6b9acb418bd..4d07cf3afbd38 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigMainInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigMainInfo.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; FEConfigMainInfo::FEConfigMainInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigParamDat.cc b/OnlineDB/EcalCondDB/src/FEConfigParamDat.cc index ce3b38df95a28..b03ff4c50f50b 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigParamDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigParamDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigParamDat::FEConfigParamDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_etsat = 0; m_tthreshlow = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigPedDat.cc b/OnlineDB/EcalCondDB/src/FEConfigPedDat.cc index 10e12aca62975..5b0569d608b20 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigPedDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigPedDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigPedDat::FEConfigPedDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_ID=0; m_pedMeanG1 = 0; m_pedMeanG6 = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigPedInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigPedInfo.cc index 8c8d48463be14..c67857f5f6ce5 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigPedInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigPedInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigPedInfo.h" @@ -12,10 +12,10 @@ using namespace oracle::occi; FEConfigPedInfo::FEConfigPedInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_version=0; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigSlidingDat.cc b/OnlineDB/EcalCondDB/src/FEConfigSlidingDat.cc index c024d7a15ba1e..f4bfd2be93283 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigSlidingDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigSlidingDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigSlidingDat::FEConfigSlidingDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_sliding = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigSlidingInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigSlidingInfo.cc index 8e883e54f3d2a..29ff8d1a833db 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigSlidingInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigSlidingInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigSlidingInfo.h" @@ -12,10 +12,10 @@ using namespace oracle::occi; FEConfigSlidingInfo::FEConfigSlidingInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_version=0; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigSpikeDat.cc b/OnlineDB/EcalCondDB/src/FEConfigSpikeDat.cc index 043d8fc25d090..59ab6f59bd51a 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigSpikeDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigSpikeDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigSpikeDat::FEConfigSpikeDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_thr = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigSpikeInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigSpikeInfo.cc index d62c5934e8309..0c34103bb0d83 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigSpikeInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigSpikeInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigSpikeInfo.h" @@ -12,10 +12,10 @@ using namespace oracle::occi; FEConfigSpikeInfo::FEConfigSpikeInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_version=0; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigTimingDat.cc b/OnlineDB/EcalCondDB/src/FEConfigTimingDat.cc index 111a43f317c16..93fb9c8ec7338 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigTimingDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigTimingDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigTimingDat::FEConfigTimingDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_par1 = 0; m_par2 = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigTimingInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigTimingInfo.cc index 6615d4c3f3fb9..7404740d75748 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigTimingInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigTimingInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigTimingInfo.h" @@ -12,10 +12,10 @@ using namespace oracle::occi; FEConfigTimingInfo::FEConfigTimingInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_version=0; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigWeightDat.cc b/OnlineDB/EcalCondDB/src/FEConfigWeightDat.cc index 26315e81c5854..84b677ec87d42 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigWeightDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigWeightDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigWeightDat::FEConfigWeightDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_group_id = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigWeightGroupDat.cc b/OnlineDB/EcalCondDB/src/FEConfigWeightGroupDat.cc index ca05ecb865db6..d2ad8e72dabc5 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigWeightGroupDat.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigWeightGroupDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; FEConfigWeightGroupDat::FEConfigWeightGroupDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_group_id=0; m_w0 = 0; diff --git a/OnlineDB/EcalCondDB/src/FEConfigWeightInfo.cc b/OnlineDB/EcalCondDB/src/FEConfigWeightInfo.cc index 6167be7b8d754..b0cc3f6eba130 100644 --- a/OnlineDB/EcalCondDB/src/FEConfigWeightInfo.cc +++ b/OnlineDB/EcalCondDB/src/FEConfigWeightInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/FEConfigWeightInfo.h" @@ -12,10 +12,10 @@ using namespace oracle::occi; FEConfigWeightInfo::FEConfigWeightInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_version=0; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/LMFCorrCoefDat.cc b/OnlineDB/EcalCondDB/src/LMFCorrCoefDat.cc index 5c31393541ef6..626084880ba10 100644 --- a/OnlineDB/EcalCondDB/src/LMFCorrCoefDat.cc +++ b/OnlineDB/EcalCondDB/src/LMFCorrCoefDat.cc @@ -38,8 +38,8 @@ LMFCorrCoefDat::~LMFCorrCoefDat() { void LMFCorrCoefDat::init() { m_data.clear(); m_subiov.clear(); - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; nodebug(); } @@ -101,7 +101,7 @@ LMFCorrCoefDatComponent* LMFCorrCoefDat::find(const LMFLmrSubIOV &iov) { } else { LMFCorrCoefDatComponent *c = new LMFCorrCoefDatComponent(); LMFLmrSubIOV *subiov = new LMFLmrSubIOV(); - if (m_conn != NULL) { + if (m_conn != nullptr) { c->setConnection(m_env, m_conn); subiov->setConnection(m_env, m_conn); } @@ -154,7 +154,7 @@ void LMFCorrCoefDat::nodebug() { RunIOV LMFCorrCoefDat::fetchLastInsertedRun() { RunIOV iov; - if (m_conn == NULL) { + if (m_conn == nullptr) { throw std::runtime_error("[LMFCorrCoefDat::fetchLastInsertedRun] ERROR: " "Connection not set"); } @@ -367,7 +367,7 @@ LMFCorrCoefDat::getCorrections(const Tm &t, const Tm &t2, int max) { // // For fixed-time IOV's sequence ID's are always 0. In that case // use the LMR_SUB_IOV_ID as a key - if (m_conn == NULL) { + if (m_conn == nullptr) { throw std::runtime_error("[LMFCorrCoefDat::getCorrections] ERROR: " "Connection not set"); } @@ -471,7 +471,7 @@ LMFCorrCoefDat::getCorrections(const Tm &t, const Tm &t2, int max) { } theMap[logic_id] = s; // verify that the sequence of time is correct - if (ret.size() > 0) { + if (!ret.empty()) { checkTriplets(logic_id, s, ret[previousSeqId]); } c++; diff --git a/OnlineDB/EcalCondDB/src/LMFCorrCoefDatComponent.cc b/OnlineDB/EcalCondDB/src/LMFCorrCoefDatComponent.cc index a4d6cff09fe45..9f6dc7bb39dd3 100644 --- a/OnlineDB/EcalCondDB/src/LMFCorrCoefDatComponent.cc +++ b/OnlineDB/EcalCondDB/src/LMFCorrCoefDatComponent.cc @@ -1,5 +1,5 @@ #include "OnlineDB/EcalCondDB/interface/LMFCorrCoefDatComponent.h" -#include +#include LMFCorrCoefDatComponent::LMFCorrCoefDatComponent() : LMFDat() { init(); diff --git a/OnlineDB/EcalCondDB/src/LMFDat.cc b/OnlineDB/EcalCondDB/src/LMFDat.cc index 416bdc279eb9f..6d77e33894c66 100644 --- a/OnlineDB/EcalCondDB/src/LMFDat.cc +++ b/OnlineDB/EcalCondDB/src/LMFDat.cc @@ -1,7 +1,7 @@ #include "OnlineDB/EcalCondDB/interface/LMFDat.h" #include -#include +#include using std::cout; using std::endl; @@ -40,7 +40,7 @@ int LMFDat::getLMFRunIOVID() { m_foreignKeys.find(foreignKeyName()); if (i != m_foreignKeys.end()) { LMFRunIOV *iov = (LMFRunIOV*)(i->second); - if (iov != NULL) { + if (iov != nullptr) { id = iov->fetchID(); setInt(foreignKeyName(), id); } @@ -243,7 +243,7 @@ void LMFDat::fetch() void LMFDat::fetch(int logic_id) noexcept(false) { - fetch(logic_id, NULL, 0); + fetch(logic_id, nullptr, 0); } void LMFDat::fetch(int logic_id, const Tm &tm) @@ -282,7 +282,7 @@ void LMFDat::fetch(int logic_id, const Tm *timestamp, int direction) noexcept(false) { bool ok = check(); - if ((timestamp == NULL) && (getLMFRunIOVID() == 0)) { + if ((timestamp == nullptr) && (getLMFRunIOVID() == 0)) { throw(std::runtime_error(m_className + "::fetch: Cannot fetch data with " "timestamp = 0 and LMFRunIOV = 0")); } @@ -304,7 +304,7 @@ void LMFDat::fetch(int logic_id, const Tm *timestamp, int direction) stmt->setSQL(sql); int count = 1; if (logic_id > 0) { - if (timestamp != NULL) { + if (timestamp != nullptr) { stmt->setString(count, timestamp->str()); count++; } @@ -320,7 +320,7 @@ void LMFDat::fetch(int logic_id, const Tm *timestamp, int direction) x.push_back(rset->getFloat(i + 3)); } int id = rset->getInt(2); - if (timestamp != NULL) { + if (timestamp != nullptr) { setInt(foreignKeyName(), rset->getInt(1)); } this->setData(id, x); @@ -409,7 +409,7 @@ int LMFDat::writeDB() // write data on the database int ret = 0; std::map > data2write = fetchData(); - if (data2write.size() > 0) { + if (!data2write.empty()) { this->checkConnection(); bool ok = check(); // write diff --git a/OnlineDB/EcalCondDB/src/LMFDefFabric.cc b/OnlineDB/EcalCondDB/src/LMFDefFabric.cc index a27bd91c3bc9d..3c7ab24be8aff 100644 --- a/OnlineDB/EcalCondDB/src/LMFDefFabric.cc +++ b/OnlineDB/EcalCondDB/src/LMFDefFabric.cc @@ -174,7 +174,7 @@ void LMFDefFabric::initialize() _lmfPrimVersions.clear(); _lmfSeqVersions.clear(); _lmfCorrVersions.clear(); - if ((m_env != NULL) && (m_conn != NULL)) { + if ((m_env != nullptr) && (m_conn != nullptr)) { boost::ptr_list listOfObjects; boost::ptr_list::const_iterator i; boost::ptr_list::const_iterator e; diff --git a/OnlineDB/EcalCondDB/src/LMFIOV.cc b/OnlineDB/EcalCondDB/src/LMFIOV.cc index eeffdf3eacf4c..fcb990ddaf4f6 100644 --- a/OnlineDB/EcalCondDB/src/LMFIOV.cc +++ b/OnlineDB/EcalCondDB/src/LMFIOV.cc @@ -6,8 +6,8 @@ using namespace oracle::occi; LMFIOV::LMFIOV() { //standard - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_className = "LMFIOV"; m_ID = 0; // custom diff --git a/OnlineDB/EcalCondDB/src/LMFLmrSubIOV.cc b/OnlineDB/EcalCondDB/src/LMFLmrSubIOV.cc index f1182350cd5c2..65fef57eff22f 100644 --- a/OnlineDB/EcalCondDB/src/LMFLmrSubIOV.cc +++ b/OnlineDB/EcalCondDB/src/LMFLmrSubIOV.cc @@ -186,7 +186,7 @@ std::list LMFLmrSubIOV::getIOVIDsLaterThan(const Tm &tmin, const Tm &tmax, std::cout << "Executing query: " << std::endl << sql << std::endl; } std::list ret; - if (m_conn != NULL) { + if (m_conn != nullptr) { try { DateHandler dh(m_env, m_conn); Statement *stmt = m_conn->createStatement(); diff --git a/OnlineDB/EcalCondDB/src/LMFRunIOV.cc b/OnlineDB/EcalCondDB/src/LMFRunIOV.cc index e2e0458eeeb02..838830fa7d261 100644 --- a/OnlineDB/EcalCondDB/src/LMFRunIOV.cc +++ b/OnlineDB/EcalCondDB/src/LMFRunIOV.cc @@ -22,7 +22,7 @@ void LMFRunIOV::initialize() { m_stringFields["subrun_type"] = "none"; m_className = "LMFRunIOV"; - _fabric = NULL; + _fabric = nullptr; } LMFRunIOV::LMFRunIOV() : LMFUnique() @@ -48,7 +48,7 @@ LMFRunIOV::LMFRunIOV(const LMFRunIOV &r) { LMFRunIOV::~LMFRunIOV() { - if (_fabric != NULL) { + if (_fabric != nullptr) { delete _fabric; } } @@ -85,7 +85,7 @@ LMFRunIOV& LMFRunIOV::setColor(int color_id) } void LMFRunIOV::checkFabric() { - if (_fabric == NULL) { + if (_fabric == nullptr) { _fabric = new LMFDefFabric(m_env, m_conn); } } @@ -430,7 +430,7 @@ std::list LMFRunIOV::fetchLastBeforeSequence(const LMFSeqDat &s, LMFRunIOV& LMFRunIOV::operator=(const LMFRunIOV &r) { if (this != &r) { LMFUnique::operator=(r); - if (r._fabric != NULL) { + if (r._fabric != nullptr) { checkFabric();// _fabric = new LMFDefFabric; if (m_debug) { _fabric->debug(); diff --git a/OnlineDB/EcalCondDB/src/LMFSeqDat.cc b/OnlineDB/EcalCondDB/src/LMFSeqDat.cc index ff59f5fcce39e..f63d3994c41cd 100644 --- a/OnlineDB/EcalCondDB/src/LMFSeqDat.cc +++ b/OnlineDB/EcalCondDB/src/LMFSeqDat.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/EcalCondDB/interface/LMFSeqDat.h" #include "OnlineDB/EcalCondDB/interface/DateHandler.h" @@ -255,7 +255,7 @@ LMFSeqDat LMFSeqDat::fetchLast() { "WHERE SEQ_ID = " "(SELECT MAX(SEQ_ID) FROM CMS_ECAL_LASER_COND.LMF_SEQ_DAT)", "fetchLast"); - if (m.size() > 0) { + if (!m.empty()) { ret = m.begin()->second; } return ret; diff --git a/OnlineDB/EcalCondDB/src/LMFUnique.cc b/OnlineDB/EcalCondDB/src/LMFUnique.cc index abf9cafcf685b..e514e03cd5f02 100644 --- a/OnlineDB/EcalCondDB/src/LMFUnique.cc +++ b/OnlineDB/EcalCondDB/src/LMFUnique.cc @@ -83,7 +83,7 @@ boost::ptr_list LMFUnique::fetchAll() const if (m_debug) { o->debug(); } - if (o != NULL) { + if (o != nullptr) { o->setByID(rset->getInt(1)); if (m_debug) { o->dump(); @@ -188,7 +188,7 @@ std::string LMFUnique::fetchAllSql(Statement *stmt) const { LMFUnique* LMFUnique::createObject() const { /* this method should return a pointer to a newly created object */ - return NULL; + return nullptr; } std::string LMFUnique::getString(std::string s) const { diff --git a/OnlineDB/EcalCondDB/src/LocationDef.cc b/OnlineDB/EcalCondDB/src/LocationDef.cc index fee45ddb46316..1baa1c816da76 100644 --- a/OnlineDB/EcalCondDB/src/LocationDef.cc +++ b/OnlineDB/EcalCondDB/src/LocationDef.cc @@ -9,8 +9,8 @@ using namespace oracle::occi; LocationDef::LocationDef() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_loc = ""; } diff --git a/OnlineDB/EcalCondDB/src/MODCCSFEDat.cc b/OnlineDB/EcalCondDB/src/MODCCSFEDat.cc index 8fd7459a273ac..83cd097804c50 100644 --- a/OnlineDB/EcalCondDB/src/MODCCSFEDat.cc +++ b/OnlineDB/EcalCondDB/src/MODCCSFEDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; MODCCSFEDat::MODCCSFEDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_word = 0; } diff --git a/OnlineDB/EcalCondDB/src/MODCCSHFDat.cc b/OnlineDB/EcalCondDB/src/MODCCSHFDat.cc index 9c8dc1e725bd8..3379a2c5b6744 100644 --- a/OnlineDB/EcalCondDB/src/MODCCSHFDat.cc +++ b/OnlineDB/EcalCondDB/src/MODCCSHFDat.cc @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include "OnlineDB/Oracle/interface/Oracle.h" @@ -16,10 +16,10 @@ using namespace oracle::occi; MODCCSHFDat::MODCCSHFDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_clob = 0; m_size=0; diff --git a/OnlineDB/EcalCondDB/src/MODCCSTRDat.cc b/OnlineDB/EcalCondDB/src/MODCCSTRDat.cc index 2c9b5376d0055..e2d73819a455e 100644 --- a/OnlineDB/EcalCondDB/src/MODCCSTRDat.cc +++ b/OnlineDB/EcalCondDB/src/MODCCSTRDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; MODCCSTRDat::MODCCSTRDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_word = 0; } diff --git a/OnlineDB/EcalCondDB/src/MODDCCDetailsDat.cc b/OnlineDB/EcalCondDB/src/MODDCCDetailsDat.cc index 6b6e9f206d21a..5e999f7c8b919 100644 --- a/OnlineDB/EcalCondDB/src/MODDCCDetailsDat.cc +++ b/OnlineDB/EcalCondDB/src/MODDCCDetailsDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; MODDCCDetailsDat::MODDCCDetailsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_qpll=0; m_opto=0; diff --git a/OnlineDB/EcalCondDB/src/MODDCCOperationDat.cc b/OnlineDB/EcalCondDB/src/MODDCCOperationDat.cc index 71767a0267c39..285b5c5ebdd25 100644 --- a/OnlineDB/EcalCondDB/src/MODDCCOperationDat.cc +++ b/OnlineDB/EcalCondDB/src/MODDCCOperationDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; MODDCCOperationDat::MODDCCOperationDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_word = ""; } diff --git a/OnlineDB/EcalCondDB/src/MODRunIOV.cc b/OnlineDB/EcalCondDB/src/MODRunIOV.cc index 5c1e5b4099d86..6c9bdc8612cd5 100644 --- a/OnlineDB/EcalCondDB/src/MODRunIOV.cc +++ b/OnlineDB/EcalCondDB/src/MODRunIOV.cc @@ -11,7 +11,7 @@ using namespace oracle::occi; MODRunIOV::MODRunIOV() { - m_conn = NULL; + m_conn = nullptr; m_ID = 0; m_runIOV = RunIOV(); m_subRunNum = 0; diff --git a/OnlineDB/EcalCondDB/src/MonCrystalConsistencyDat.cc b/OnlineDB/EcalCondDB/src/MonCrystalConsistencyDat.cc index b7972aa594881..60586ccfaed06 100644 --- a/OnlineDB/EcalCondDB/src/MonCrystalConsistencyDat.cc +++ b/OnlineDB/EcalCondDB/src/MonCrystalConsistencyDat.cc @@ -9,17 +9,17 @@ using namespace oracle::occi; MonCrystalConsistencyDat::MonCrystalConsistencyDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_processedEvents = 0; m_problematicEvents = 0; m_problemsID = 0; m_problemsGainZero = 0; m_problemsGainSwitch = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonDelaysTTDat.cc b/OnlineDB/EcalCondDB/src/MonDelaysTTDat.cc index 320fb4c44c098..b95a9b0dad5c9 100644 --- a/OnlineDB/EcalCondDB/src/MonDelaysTTDat.cc +++ b/OnlineDB/EcalCondDB/src/MonDelaysTTDat.cc @@ -11,14 +11,14 @@ using namespace oracle::occi; MonDelaysTTDat::MonDelaysTTDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_delayMean = 0; m_delayRMS = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonH4TablePositionDat.cc b/OnlineDB/EcalCondDB/src/MonH4TablePositionDat.cc index 98a092e6838f2..1bd07b5b80c5c 100644 --- a/OnlineDB/EcalCondDB/src/MonH4TablePositionDat.cc +++ b/OnlineDB/EcalCondDB/src/MonH4TablePositionDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; MonH4TablePositionDat::MonH4TablePositionDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_tableX = 0; m_tableY = 0; diff --git a/OnlineDB/EcalCondDB/src/MonLaserBlueDat.cc b/OnlineDB/EcalCondDB/src/MonLaserBlueDat.cc index ab973556215ac..f7f089f7453ca 100644 --- a/OnlineDB/EcalCondDB/src/MonLaserBlueDat.cc +++ b/OnlineDB/EcalCondDB/src/MonLaserBlueDat.cc @@ -9,16 +9,16 @@ using namespace oracle::occi; MonLaserBlueDat::MonLaserBlueDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_apdMean = 0; m_apdRMS = 0; m_apdOverPNMean = 0; m_apdOverPNRMS = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonLaserGreenDat.cc b/OnlineDB/EcalCondDB/src/MonLaserGreenDat.cc index 912722b3905df..1c547a64c35de 100644 --- a/OnlineDB/EcalCondDB/src/MonLaserGreenDat.cc +++ b/OnlineDB/EcalCondDB/src/MonLaserGreenDat.cc @@ -9,16 +9,16 @@ using namespace oracle::occi; MonLaserGreenDat::MonLaserGreenDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_apdMean = 0; m_apdRMS = 0; m_apdOverPNMean = 0; m_apdOverPNRMS = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonLaserIRedDat.cc b/OnlineDB/EcalCondDB/src/MonLaserIRedDat.cc index 39919ec598353..63a9ed21842b6 100644 --- a/OnlineDB/EcalCondDB/src/MonLaserIRedDat.cc +++ b/OnlineDB/EcalCondDB/src/MonLaserIRedDat.cc @@ -9,16 +9,16 @@ using namespace oracle::occi; MonLaserIRedDat::MonLaserIRedDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_apdMean = 0; m_apdRMS = 0; m_apdOverPNMean = 0; m_apdOverPNRMS = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonLaserPulseDat.cc b/OnlineDB/EcalCondDB/src/MonLaserPulseDat.cc index f93b7ebcf1685..a223a16b5550f 100644 --- a/OnlineDB/EcalCondDB/src/MonLaserPulseDat.cc +++ b/OnlineDB/EcalCondDB/src/MonLaserPulseDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; MonLaserPulseDat::MonLaserPulseDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_pulseHeightMean = 0; m_pulseHeightRMS = 0; diff --git a/OnlineDB/EcalCondDB/src/MonLaserRedDat.cc b/OnlineDB/EcalCondDB/src/MonLaserRedDat.cc index 216e10f38751f..98b1c3caa693e 100644 --- a/OnlineDB/EcalCondDB/src/MonLaserRedDat.cc +++ b/OnlineDB/EcalCondDB/src/MonLaserRedDat.cc @@ -9,16 +9,16 @@ using namespace oracle::occi; MonLaserRedDat::MonLaserRedDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_apdMean = 0; m_apdRMS = 0; m_apdOverPNMean = 0; m_apdOverPNRMS = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonLaserStatusDat.cc b/OnlineDB/EcalCondDB/src/MonLaserStatusDat.cc index b052be90b0cb9..93bdbbb64bb93 100644 --- a/OnlineDB/EcalCondDB/src/MonLaserStatusDat.cc +++ b/OnlineDB/EcalCondDB/src/MonLaserStatusDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; MonLaserStatusDat::MonLaserStatusDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_laserPower = 0; m_laserFilter = 0; diff --git a/OnlineDB/EcalCondDB/src/MonLed1Dat.cc b/OnlineDB/EcalCondDB/src/MonLed1Dat.cc index af8da7be8ef26..5bfa762b61918 100644 --- a/OnlineDB/EcalCondDB/src/MonLed1Dat.cc +++ b/OnlineDB/EcalCondDB/src/MonLed1Dat.cc @@ -9,16 +9,16 @@ using namespace oracle::occi; MonLed1Dat::MonLed1Dat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_vptMean = 0; m_vptRMS = 0; m_vptOverPNMean = 0; m_vptOverPNRMS = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonLed2Dat.cc b/OnlineDB/EcalCondDB/src/MonLed2Dat.cc index e9fbacfd3aaec..26d84ddb44ca4 100644 --- a/OnlineDB/EcalCondDB/src/MonLed2Dat.cc +++ b/OnlineDB/EcalCondDB/src/MonLed2Dat.cc @@ -9,16 +9,16 @@ using namespace oracle::occi; MonLed2Dat::MonLed2Dat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_vptMean = 0; m_vptRMS = 0; m_vptOverPNMean = 0; m_vptOverPNRMS = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonMemChConsistencyDat.cc b/OnlineDB/EcalCondDB/src/MonMemChConsistencyDat.cc index 2af8aee626fc5..a8d3ed13afbd4 100644 --- a/OnlineDB/EcalCondDB/src/MonMemChConsistencyDat.cc +++ b/OnlineDB/EcalCondDB/src/MonMemChConsistencyDat.cc @@ -9,17 +9,17 @@ using namespace oracle::occi; MonMemChConsistencyDat::MonMemChConsistencyDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_processedEvents = 0; m_problematicEvents = 0; m_problemsID = 0; m_problemsGainZero = 0; m_problemsGainSwitch = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonMemTTConsistencyDat.cc b/OnlineDB/EcalCondDB/src/MonMemTTConsistencyDat.cc index ddb747c1e671c..c29190ea322c1 100644 --- a/OnlineDB/EcalCondDB/src/MonMemTTConsistencyDat.cc +++ b/OnlineDB/EcalCondDB/src/MonMemTTConsistencyDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; MonMemTTConsistencyDat::MonMemTTConsistencyDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_processedEvents = 0; m_problematicEvents = 0; @@ -20,7 +20,7 @@ MonMemTTConsistencyDat::MonMemTTConsistencyDat() m_problemsSize = 0; m_problemsLV1 = 0; m_problemsBunchX = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonOccupancyDat.cc b/OnlineDB/EcalCondDB/src/MonOccupancyDat.cc index b4dc7331886aa..69093784f2539 100644 --- a/OnlineDB/EcalCondDB/src/MonOccupancyDat.cc +++ b/OnlineDB/EcalCondDB/src/MonOccupancyDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; MonOccupancyDat::MonOccupancyDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_eventsOverLowThreshold = 0; m_eventsOverHighThreshold = 0; diff --git a/OnlineDB/EcalCondDB/src/MonPNBlueDat.cc b/OnlineDB/EcalCondDB/src/MonPNBlueDat.cc index fe239af35e40a..f3ebaea744312 100644 --- a/OnlineDB/EcalCondDB/src/MonPNBlueDat.cc +++ b/OnlineDB/EcalCondDB/src/MonPNBlueDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonPNBlueDat::MonPNBlueDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_adcMeanG1 =0; m_adcRMSG1 = 0; @@ -24,7 +24,7 @@ MonPNBlueDat::MonPNBlueDat() m_pedRMSG1 = 0; m_pedMeanG16 = 0; m_pedRMSG16 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPNGreenDat.cc b/OnlineDB/EcalCondDB/src/MonPNGreenDat.cc index e6991f73c7623..c6d184d6d0845 100644 --- a/OnlineDB/EcalCondDB/src/MonPNGreenDat.cc +++ b/OnlineDB/EcalCondDB/src/MonPNGreenDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonPNGreenDat::MonPNGreenDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_adcMeanG1 =0; m_adcRMSG1 = 0; @@ -24,7 +24,7 @@ MonPNGreenDat::MonPNGreenDat() m_pedRMSG1 = 0; m_pedMeanG16 = 0; m_pedRMSG16 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPNIRedDat.cc b/OnlineDB/EcalCondDB/src/MonPNIRedDat.cc index 389b936774634..5b873866c7dd7 100644 --- a/OnlineDB/EcalCondDB/src/MonPNIRedDat.cc +++ b/OnlineDB/EcalCondDB/src/MonPNIRedDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonPNIRedDat::MonPNIRedDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_adcMeanG1 =0; m_adcRMSG1 = 0; @@ -24,7 +24,7 @@ MonPNIRedDat::MonPNIRedDat() m_pedRMSG1 = 0; m_pedMeanG16 = 0; m_pedRMSG16 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPNLed1Dat.cc b/OnlineDB/EcalCondDB/src/MonPNLed1Dat.cc index 174b9466ef5a7..8f04220286cca 100644 --- a/OnlineDB/EcalCondDB/src/MonPNLed1Dat.cc +++ b/OnlineDB/EcalCondDB/src/MonPNLed1Dat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonPNLed1Dat::MonPNLed1Dat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_adcMeanG1 =0; m_adcRMSG1 = 0; @@ -24,7 +24,7 @@ MonPNLed1Dat::MonPNLed1Dat() m_pedRMSG1 = 0; m_pedMeanG16 = 0; m_pedRMSG16 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPNLed2Dat.cc b/OnlineDB/EcalCondDB/src/MonPNLed2Dat.cc index 5d6da6762c258..9bf8b56eb47a0 100644 --- a/OnlineDB/EcalCondDB/src/MonPNLed2Dat.cc +++ b/OnlineDB/EcalCondDB/src/MonPNLed2Dat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonPNLed2Dat::MonPNLed2Dat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_adcMeanG1 =0; m_adcRMSG1 = 0; @@ -24,7 +24,7 @@ MonPNLed2Dat::MonPNLed2Dat() m_pedRMSG1 = 0; m_pedMeanG16 = 0; m_pedRMSG16 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPNMGPADat.cc b/OnlineDB/EcalCondDB/src/MonPNMGPADat.cc index 518dc147898aa..0b23156e6a91c 100644 --- a/OnlineDB/EcalCondDB/src/MonPNMGPADat.cc +++ b/OnlineDB/EcalCondDB/src/MonPNMGPADat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonPNMGPADat::MonPNMGPADat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_adcMeanG1 =0; m_adcRMSG1 = 0; @@ -24,7 +24,7 @@ MonPNMGPADat::MonPNMGPADat() m_pedRMSG1 = 0; m_pedMeanG16 = 0; m_pedRMSG16 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPNPedDat.cc b/OnlineDB/EcalCondDB/src/MonPNPedDat.cc index 9399b70ac08fe..6cee4bf08d70c 100644 --- a/OnlineDB/EcalCondDB/src/MonPNPedDat.cc +++ b/OnlineDB/EcalCondDB/src/MonPNPedDat.cc @@ -11,16 +11,16 @@ using namespace oracle::occi; MonPNPedDat::MonPNPedDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_pedMeanG1 = 0; m_pedRMSG1 = 0; m_pedMeanG16 = 0; m_pedRMSG16 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPNRedDat.cc b/OnlineDB/EcalCondDB/src/MonPNRedDat.cc index b22b434462ff2..b5e6501550162 100644 --- a/OnlineDB/EcalCondDB/src/MonPNRedDat.cc +++ b/OnlineDB/EcalCondDB/src/MonPNRedDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonPNRedDat::MonPNRedDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_adcMeanG1 =0; m_adcRMSG1 = 0; @@ -24,7 +24,7 @@ MonPNRedDat::MonPNRedDat() m_pedRMSG1 = 0; m_pedMeanG16 = 0; m_pedRMSG16 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPedestalOffsetsDat.cc b/OnlineDB/EcalCondDB/src/MonPedestalOffsetsDat.cc index 1b46451197791..812d24a8abe04 100644 --- a/OnlineDB/EcalCondDB/src/MonPedestalOffsetsDat.cc +++ b/OnlineDB/EcalCondDB/src/MonPedestalOffsetsDat.cc @@ -11,15 +11,15 @@ using namespace oracle::occi; MonPedestalOffsetsDat::MonPedestalOffsetsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_dacG1 = 0; m_dacG6 = 0; m_dacG12 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPedestalsDat.cc b/OnlineDB/EcalCondDB/src/MonPedestalsDat.cc index 54ef22ca7d733..1260c1e8c1a36 100644 --- a/OnlineDB/EcalCondDB/src/MonPedestalsDat.cc +++ b/OnlineDB/EcalCondDB/src/MonPedestalsDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; MonPedestalsDat::MonPedestalsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_pedMeanG1 = 0; m_pedMeanG6 = 0; @@ -21,7 +21,7 @@ MonPedestalsDat::MonPedestalsDat() m_pedRMSG1 = 0; m_pedRMSG6 = 0; m_pedRMSG12 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPedestalsOnlineDat.cc b/OnlineDB/EcalCondDB/src/MonPedestalsOnlineDat.cc index ec1fc4b353030..4d35be207f1bd 100644 --- a/OnlineDB/EcalCondDB/src/MonPedestalsOnlineDat.cc +++ b/OnlineDB/EcalCondDB/src/MonPedestalsOnlineDat.cc @@ -11,14 +11,14 @@ using namespace oracle::occi; MonPedestalsOnlineDat::MonPedestalsOnlineDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_adcMeanG12 = 0; m_adcRMSG12 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonPulseShapeDat.cc b/OnlineDB/EcalCondDB/src/MonPulseShapeDat.cc index ee0d21e76ca38..5a93b6dac5101 100644 --- a/OnlineDB/EcalCondDB/src/MonPulseShapeDat.cc +++ b/OnlineDB/EcalCondDB/src/MonPulseShapeDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonPulseShapeDat::MonPulseShapeDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_samplesG1.assign(10, 0); m_samplesG6.assign(10, 0); diff --git a/OnlineDB/EcalCondDB/src/MonRunDat.cc b/OnlineDB/EcalCondDB/src/MonRunDat.cc index 8402a91391ff1..bc15d05be7a67 100644 --- a/OnlineDB/EcalCondDB/src/MonRunDat.cc +++ b/OnlineDB/EcalCondDB/src/MonRunDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonRunDat::MonRunDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_numEvents = 0; m_outcomeDef = MonRunOutcomeDef(); diff --git a/OnlineDB/EcalCondDB/src/MonRunIOV.cc b/OnlineDB/EcalCondDB/src/MonRunIOV.cc index c015616a119fc..84b70da618041 100644 --- a/OnlineDB/EcalCondDB/src/MonRunIOV.cc +++ b/OnlineDB/EcalCondDB/src/MonRunIOV.cc @@ -12,7 +12,7 @@ using namespace oracle::occi; MonRunIOV::MonRunIOV() { - m_conn = NULL; + m_conn = nullptr; m_ID = 0; m_monRunTag = MonRunTag(); m_runIOV = RunIOV(); diff --git a/OnlineDB/EcalCondDB/src/MonRunList.cc b/OnlineDB/EcalCondDB/src/MonRunList.cc index 48664df796b7c..4f8e5b9e13e9d 100644 --- a/OnlineDB/EcalCondDB/src/MonRunList.cc +++ b/OnlineDB/EcalCondDB/src/MonRunList.cc @@ -13,7 +13,7 @@ using namespace oracle::occi; MonRunList::MonRunList() { - m_conn = NULL; + m_conn = nullptr; } MonRunList::~MonRunList() diff --git a/OnlineDB/EcalCondDB/src/MonRunOutcomeDef.cc b/OnlineDB/EcalCondDB/src/MonRunOutcomeDef.cc index 02bdd5dd0812d..98d585f7d5b3b 100644 --- a/OnlineDB/EcalCondDB/src/MonRunOutcomeDef.cc +++ b/OnlineDB/EcalCondDB/src/MonRunOutcomeDef.cc @@ -9,8 +9,8 @@ using namespace oracle::occi; MonRunOutcomeDef::MonRunOutcomeDef() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_shortDesc = ""; m_longDesc = ""; diff --git a/OnlineDB/EcalCondDB/src/MonRunTag.cc b/OnlineDB/EcalCondDB/src/MonRunTag.cc index 02c8cb860d0e6..a1961651fa495 100644 --- a/OnlineDB/EcalCondDB/src/MonRunTag.cc +++ b/OnlineDB/EcalCondDB/src/MonRunTag.cc @@ -8,8 +8,8 @@ using namespace oracle::occi; MonRunTag::MonRunTag() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_genTag = "default"; m_monVersionDef = MonVersionDef(); diff --git a/OnlineDB/EcalCondDB/src/MonShapeQualityDat.cc b/OnlineDB/EcalCondDB/src/MonShapeQualityDat.cc index e60c409ec4fba..81db2b1e4a76e 100644 --- a/OnlineDB/EcalCondDB/src/MonShapeQualityDat.cc +++ b/OnlineDB/EcalCondDB/src/MonShapeQualityDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonShapeQualityDat::MonShapeQualityDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_avgChi2 = 0; } diff --git a/OnlineDB/EcalCondDB/src/MonTTConsistencyDat.cc b/OnlineDB/EcalCondDB/src/MonTTConsistencyDat.cc index 06bb63d132185..1fc81688e7551 100644 --- a/OnlineDB/EcalCondDB/src/MonTTConsistencyDat.cc +++ b/OnlineDB/EcalCondDB/src/MonTTConsistencyDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; MonTTConsistencyDat::MonTTConsistencyDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_processedEvents = 0; m_problematicEvents = 0; @@ -20,7 +20,7 @@ MonTTConsistencyDat::MonTTConsistencyDat() m_problemsSize = 0; m_problemsLV1 = 0; m_problemsBunchX = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonTestPulseDat.cc b/OnlineDB/EcalCondDB/src/MonTestPulseDat.cc index d67740daae7e8..aa2fc64cf6594 100644 --- a/OnlineDB/EcalCondDB/src/MonTestPulseDat.cc +++ b/OnlineDB/EcalCondDB/src/MonTestPulseDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; MonTestPulseDat::MonTestPulseDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_adcMeanG1 = 0; m_adcRMSG1 = 0; @@ -22,7 +22,7 @@ MonTestPulseDat::MonTestPulseDat() m_adcRMSG6 = 0; m_adcMeanG12 = 0; m_adcRMSG12 = 0; - m_taskStatus = 0; + m_taskStatus = false; } diff --git a/OnlineDB/EcalCondDB/src/MonVersionDef.cc b/OnlineDB/EcalCondDB/src/MonVersionDef.cc index 704d2f0fa47b9..c51e6608d1448 100644 --- a/OnlineDB/EcalCondDB/src/MonVersionDef.cc +++ b/OnlineDB/EcalCondDB/src/MonVersionDef.cc @@ -8,8 +8,8 @@ using namespace oracle::occi; MonVersionDef::MonVersionDef() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_monVer = ""; m_desc = ""; diff --git a/OnlineDB/EcalCondDB/src/ODBadTTDat.cc b/OnlineDB/EcalCondDB/src/ODBadTTDat.cc index e844a09c04173..5d72eb9a7a87d 100644 --- a/OnlineDB/EcalCondDB/src/ODBadTTDat.cc +++ b/OnlineDB/EcalCondDB/src/ODBadTTDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODBadTTDat::ODBadTTDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_sm = 0; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/ODBadTTInfo.cc b/OnlineDB/EcalCondDB/src/ODBadTTInfo.cc index 4ba6ad0b2a982..9e6b3504808f1 100644 --- a/OnlineDB/EcalCondDB/src/ODBadTTInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODBadTTInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/ODBadTTInfo.h" @@ -10,10 +10,10 @@ using namespace oracle::occi; ODBadTTInfo::ODBadTTInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/ODBadXTDat.cc b/OnlineDB/EcalCondDB/src/ODBadXTDat.cc index 22ee9901376b9..00625bf604319 100644 --- a/OnlineDB/EcalCondDB/src/ODBadXTDat.cc +++ b/OnlineDB/EcalCondDB/src/ODBadXTDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODBadXTDat::ODBadXTDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_sm = 0; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/ODBadXTInfo.cc b/OnlineDB/EcalCondDB/src/ODBadXTInfo.cc index 6fe458505ddac..1f021bee0ea4e 100644 --- a/OnlineDB/EcalCondDB/src/ODBadXTInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODBadXTInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/ODBadXTInfo.h" @@ -10,10 +10,10 @@ using namespace oracle::occi; ODBadXTInfo::ODBadXTInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/ODCCSConfig.cc b/OnlineDB/EcalCondDB/src/ODCCSConfig.cc index 389f044f8e00f..6c3c7c50c2758 100644 --- a/OnlineDB/EcalCondDB/src/ODCCSConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODCCSConfig.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include "OnlineDB/Oracle/interface/Oracle.h" @@ -18,10 +18,10 @@ using namespace oracle::occi; ODCCSConfig::ODCCSConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; clear(); diff --git a/OnlineDB/EcalCondDB/src/ODCCSCycle.cc b/OnlineDB/EcalCondDB/src/ODCCSCycle.cc index cbdccc90bcf7d..80c6c022f6ab4 100644 --- a/OnlineDB/EcalCondDB/src/ODCCSCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODCCSCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODCCSCycle::ODCCSCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_ccs_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODCond2ConfInfo.cc b/OnlineDB/EcalCondDB/src/ODCond2ConfInfo.cc index 658ee867e0337..4f18db1b8b343 100644 --- a/OnlineDB/EcalCondDB/src/ODCond2ConfInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODCond2ConfInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include "OnlineDB/EcalCondDB/interface/DateHandler.h" @@ -11,10 +11,10 @@ using namespace oracle::occi; ODCond2ConfInfo::ODCond2ConfInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; clear(); diff --git a/OnlineDB/EcalCondDB/src/ODDCCConfig.cc b/OnlineDB/EcalCondDB/src/ODDCCConfig.cc index c899caa510aa6..0b5662f35c58e 100644 --- a/OnlineDB/EcalCondDB/src/ODDCCConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODDCCConfig.cc @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include "OnlineDB/Oracle/interface/Oracle.h" @@ -14,10 +14,10 @@ using namespace oracle::occi; ODDCCConfig::ODDCCConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_size=0; m_config_tag=""; m_ID=0; @@ -119,7 +119,7 @@ void ODDCCConfig::setParameters(const std::map& my_keys_map){ if(ci->first== "TESTPATTERN_FILE_URL") setTestPatternFileUrl(ci->second ); if(ci->first== "N_TESTPATTERNS_TO_LOAD") setNTestPatternsToLoad(atoi(ci->second.c_str() )); if(ci->first== "SM_HALF") setSMHalf(atoi(ci->second.c_str() )); - if(ci->first== "WEIGHTSMODE") setDCCWeightsMode(ci->second.c_str() ); + if(ci->first== "WEIGHTSMODE") setDCCWeightsMode(ci->second ); if(ci->first== "DCC_CONFIGURATION_URL") { std::string fname=ci->second ; setDCCConfigurationUrl(fname ); diff --git a/OnlineDB/EcalCondDB/src/ODDCCCycle.cc b/OnlineDB/EcalCondDB/src/ODDCCCycle.cc index a711ee28ea66e..29d7cc29210b7 100644 --- a/OnlineDB/EcalCondDB/src/ODDCCCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODDCCCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODDCCCycle::ODDCCCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_dcc_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODDCUConfig.cc b/OnlineDB/EcalCondDB/src/ODDCUConfig.cc index 9914488e4ba07..58f4101cb4688 100644 --- a/OnlineDB/EcalCondDB/src/ODDCUConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODDCUConfig.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODDCUConfig::ODDCUConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; clear(); diff --git a/OnlineDB/EcalCondDB/src/ODDCUCycle.cc b/OnlineDB/EcalCondDB/src/ODDCUCycle.cc index 0a63172fc8322..bcc8adbee501d 100644 --- a/OnlineDB/EcalCondDB/src/ODDCUCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODDCUCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODDCUCycle::ODDCUCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_dcu_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODDelaysDat.cc b/OnlineDB/EcalCondDB/src/ODDelaysDat.cc index bb37ec594c5bd..b1ffb6dcc795e 100644 --- a/OnlineDB/EcalCondDB/src/ODDelaysDat.cc +++ b/OnlineDB/EcalCondDB/src/ODDelaysDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODDelaysDat::ODDelaysDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_sm = 0; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/ODEcalCycle.cc b/OnlineDB/EcalCondDB/src/ODEcalCycle.cc index 34c19cbd1587a..e586e875a8a19 100644 --- a/OnlineDB/EcalCondDB/src/ODEcalCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODEcalCycle.cc @@ -24,10 +24,10 @@ using namespace oracle::occi; ODEcalCycle::ODEcalCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_ID=0; clear(); diff --git a/OnlineDB/EcalCondDB/src/ODFEDAQConfig.cc b/OnlineDB/EcalCondDB/src/ODFEDAQConfig.cc index 845a5c64f882b..cdd4a4cc8ab00 100644 --- a/OnlineDB/EcalCondDB/src/ODFEDAQConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODFEDAQConfig.cc @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include "OnlineDB/EcalCondDB/interface/ODFEDAQConfig.h" @@ -20,10 +20,10 @@ int getInt(ResultSet * rset, int ipar ) ODFEDAQConfig::ODFEDAQConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; clear(); diff --git a/OnlineDB/EcalCondDB/src/ODFEDelaysInfo.cc b/OnlineDB/EcalCondDB/src/ODFEDelaysInfo.cc index f3d8ac6d32f18..b630966583828 100644 --- a/OnlineDB/EcalCondDB/src/ODFEDelaysInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODFEDelaysInfo.cc @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include "OnlineDB/EcalCondDB/interface/ODFEDelaysInfo.h" @@ -11,10 +11,10 @@ using namespace oracle::occi; ODFEDelaysInfo::ODFEDelaysInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_version=0; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/ODFEPedestalOffsetInfo.cc b/OnlineDB/EcalCondDB/src/ODFEPedestalOffsetInfo.cc index e712b39cdf73a..f18bfd76679eb 100644 --- a/OnlineDB/EcalCondDB/src/ODFEPedestalOffsetInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODFEPedestalOffsetInfo.cc @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include "OnlineDB/EcalCondDB/interface/ODFEPedestalOffsetInfo.h" @@ -11,10 +11,10 @@ using namespace oracle::occi; ODFEPedestalOffsetInfo::ODFEPedestalOffsetInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/ODFEWeightsInfo.cc b/OnlineDB/EcalCondDB/src/ODFEWeightsInfo.cc index b376c75dcf0ab..118cfbc1ed130 100644 --- a/OnlineDB/EcalCondDB/src/ODFEWeightsInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODFEWeightsInfo.cc @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include "OnlineDB/EcalCondDB/interface/ODFEWeightsInfo.h" @@ -11,10 +11,10 @@ using namespace oracle::occi; ODFEWeightsInfo::ODFEWeightsInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/ODGolBiasCurrentDat.cc b/OnlineDB/EcalCondDB/src/ODGolBiasCurrentDat.cc index d6694946e3012..f15c55fd69996 100644 --- a/OnlineDB/EcalCondDB/src/ODGolBiasCurrentDat.cc +++ b/OnlineDB/EcalCondDB/src/ODGolBiasCurrentDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODGolBiasCurrentDat::ODGolBiasCurrentDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_gol = 0; diff --git a/OnlineDB/EcalCondDB/src/ODGolBiasCurrentInfo.cc b/OnlineDB/EcalCondDB/src/ODGolBiasCurrentInfo.cc index caa25ceee68c2..bf1724eaad02a 100644 --- a/OnlineDB/EcalCondDB/src/ODGolBiasCurrentInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODGolBiasCurrentInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/ODGolBiasCurrentInfo.h" @@ -10,10 +10,10 @@ using namespace oracle::occi; ODGolBiasCurrentInfo::ODGolBiasCurrentInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/ODJBH4Config.cc b/OnlineDB/EcalCondDB/src/ODJBH4Config.cc index 2cb4de2d4496b..a0a0c1dac3bf6 100644 --- a/OnlineDB/EcalCondDB/src/ODJBH4Config.cc +++ b/OnlineDB/EcalCondDB/src/ODJBH4Config.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODJBH4Config::ODJBH4Config() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; clear(); diff --git a/OnlineDB/EcalCondDB/src/ODJBH4Cycle.cc b/OnlineDB/EcalCondDB/src/ODJBH4Cycle.cc index f02b4a7e769ec..fc46bf93cb7ae 100644 --- a/OnlineDB/EcalCondDB/src/ODJBH4Cycle.cc +++ b/OnlineDB/EcalCondDB/src/ODJBH4Cycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODJBH4Cycle::ODJBH4Cycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_jbh4_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODLTCConfig.cc b/OnlineDB/EcalCondDB/src/ODLTCConfig.cc index b1d8e78a66c0c..a4c067362acef 100644 --- a/OnlineDB/EcalCondDB/src/ODLTCConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODLTCConfig.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include "OnlineDB/Oracle/interface/Oracle.h" @@ -12,10 +12,10 @@ using namespace oracle::occi; ODLTCConfig::ODLTCConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_size=0; diff --git a/OnlineDB/EcalCondDB/src/ODLTCCycle.cc b/OnlineDB/EcalCondDB/src/ODLTCCycle.cc index 5329bcb734a98..10d62b41f9e48 100644 --- a/OnlineDB/EcalCondDB/src/ODLTCCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODLTCCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODLTCCycle::ODLTCCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_ltc_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODLTSConfig.cc b/OnlineDB/EcalCondDB/src/ODLTSConfig.cc index eb4d4f35b05c1..b282a24e11f02 100644 --- a/OnlineDB/EcalCondDB/src/ODLTSConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODLTSConfig.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; ODLTSConfig::ODLTSConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; clear(); diff --git a/OnlineDB/EcalCondDB/src/ODLTSCycle.cc b/OnlineDB/EcalCondDB/src/ODLTSCycle.cc index 486db495c8a78..bb8c7446cf238 100644 --- a/OnlineDB/EcalCondDB/src/ODLTSCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODLTSCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODLTSCycle::ODLTSCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_lts_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODLaserConfig.cc b/OnlineDB/EcalCondDB/src/ODLaserConfig.cc index 9c01900566dc4..59b3102e3576e 100644 --- a/OnlineDB/EcalCondDB/src/ODLaserConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODLaserConfig.cc @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include "OnlineDB/Oracle/interface/Oracle.h" @@ -14,10 +14,10 @@ using namespace oracle::occi; ODLaserConfig::ODLaserConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_size=0; m_config_tag=""; m_ID=0; @@ -151,9 +151,9 @@ void ODLaserConfig::setParameters(const std::map& my_keys_map){ if(ci->first== "VINJ") setVinj(atoi(ci->second.c_str()) ); if(ci->first== "ORANGE_LED_MON_AMPL") setOrangeLedMonAmpl(atoi(ci->second.c_str()) ); if(ci->first== "BLUE_LED_MON_AMPL") setBlueLedMonAmpl(atoi(ci->second.c_str()) ); - if(ci->first== "TRIG_LOG_FILE") setTrigLogFile(ci->second.c_str() ); + if(ci->first== "TRIG_LOG_FILE") setTrigLogFile(ci->second ); if(ci->first== "LED_CONTROL_ON") setLedControlON(atoi(ci->second.c_str()) ); - if(ci->first== "LED_CONTROL_HOST") setLedControlHost( ci->second.c_str() ); + if(ci->first== "LED_CONTROL_HOST") setLedControlHost( ci->second ); if(ci->first== "LED_CONTROL_PORT") setLedControlPort(atoi(ci->second.c_str()) ); if(ci->first== "IR_LASER_POWER") setIRLaserPower(atoi(ci->second.c_str()) ); if(ci->first== "GREEN_LASER_POWER") setGreenLaserPower(atoi(ci->second.c_str()) ); diff --git a/OnlineDB/EcalCondDB/src/ODLaserCycle.cc b/OnlineDB/EcalCondDB/src/ODLaserCycle.cc index 30c11c5171953..7c199fe23869c 100644 --- a/OnlineDB/EcalCondDB/src/ODLaserCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODLaserCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODLaserCycle::ODLaserCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_laser_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODPedestalOffsetsDat.cc b/OnlineDB/EcalCondDB/src/ODPedestalOffsetsDat.cc index ce2c79378561f..aabec0f77926f 100644 --- a/OnlineDB/EcalCondDB/src/ODPedestalOffsetsDat.cc +++ b/OnlineDB/EcalCondDB/src/ODPedestalOffsetsDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODPedestalOffsetsDat::ODPedestalOffsetsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_sm = 0; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/ODRunConfigCycleInfo.cc b/OnlineDB/EcalCondDB/src/ODRunConfigCycleInfo.cc index 35e0ee2cd9e77..81b696704ab14 100644 --- a/OnlineDB/EcalCondDB/src/ODRunConfigCycleInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODRunConfigCycleInfo.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; ODRunConfigCycleInfo::ODRunConfigCycleInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/ODRunConfigInfo.cc b/OnlineDB/EcalCondDB/src/ODRunConfigInfo.cc index 91aea3e31621b..12628fe22cf98 100644 --- a/OnlineDB/EcalCondDB/src/ODRunConfigInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODRunConfigInfo.cc @@ -11,8 +11,8 @@ using namespace oracle::occi; ODRunConfigInfo::ODRunConfigInfo() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; // m_tag =""; diff --git a/OnlineDB/EcalCondDB/src/ODRunConfigSeqInfo.cc b/OnlineDB/EcalCondDB/src/ODRunConfigSeqInfo.cc index e8a0b37172da5..9d2024ff0d894 100644 --- a/OnlineDB/EcalCondDB/src/ODRunConfigSeqInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODRunConfigSeqInfo.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; ODRunConfigSeqInfo::ODRunConfigSeqInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_ID = 0; // diff --git a/OnlineDB/EcalCondDB/src/ODSRPConfig.cc b/OnlineDB/EcalCondDB/src/ODSRPConfig.cc index 645b03840c5ca..8d53a34f2fb96 100644 --- a/OnlineDB/EcalCondDB/src/ODSRPConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODSRPConfig.cc @@ -12,10 +12,10 @@ using namespace oracle::occi; ODSRPConfig::ODSRPConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/ODSRPCycle.cc b/OnlineDB/EcalCondDB/src/ODSRPCycle.cc index bdf08814d4b60..6f620e7aaac4c 100644 --- a/OnlineDB/EcalCondDB/src/ODSRPCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODSRPCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODSRPCycle::ODSRPCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_srp_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODScanConfig.cc b/OnlineDB/EcalCondDB/src/ODScanConfig.cc index 73597565fd86f..a987ee2fe5d8f 100644 --- a/OnlineDB/EcalCondDB/src/ODScanConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODScanConfig.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; ODScanConfig::ODScanConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; clear(); @@ -67,7 +67,7 @@ void ODScanConfig::setParameters(const std::map& my_keys_map){ if(ci->first== "SCAN_ID") setConfigTag(ci->second); if(ci->first== "TYPE_ID") setTypeId(atoi(ci->second.c_str()) ); - if(ci->first== "TYPE" || ci->first== "SCAN_TYPE") setScanType(ci->second.c_str() ); + if(ci->first== "TYPE" || ci->first== "SCAN_TYPE") setScanType(ci->second ); if(ci->first== "FROM" ||ci->first== "FROM_VAL" ) setFromVal(atoi(ci->second.c_str() )); if(ci->first== "TO" ||ci->first== "TO_VAL" ) setToVal(atoi(ci->second.c_str() )); if(ci->first== "STEP") setStep(atoi(ci->second.c_str() )); diff --git a/OnlineDB/EcalCondDB/src/ODScanCycle.cc b/OnlineDB/EcalCondDB/src/ODScanCycle.cc index 7f864a1dc7eb9..badd6f1254b6f 100644 --- a/OnlineDB/EcalCondDB/src/ODScanCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODScanCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODScanCycle::ODScanCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_scan_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODTCCConfig.cc b/OnlineDB/EcalCondDB/src/ODTCCConfig.cc index e7da5f11d9a0b..b55391d53c136 100644 --- a/OnlineDB/EcalCondDB/src/ODTCCConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODTCCConfig.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; ODTCCConfig::ODTCCConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/ODTCCCycle.cc b/OnlineDB/EcalCondDB/src/ODTCCCycle.cc index d38e9e2a54a39..5aaee801db4ce 100644 --- a/OnlineDB/EcalCondDB/src/ODTCCCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODTCCCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODTCCCycle::ODTCCCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_tcc_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODTCCEEConfig.cc b/OnlineDB/EcalCondDB/src/ODTCCEEConfig.cc index c33fcc05e2b97..bdcfb654f0b7d 100644 --- a/OnlineDB/EcalCondDB/src/ODTCCEEConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODTCCEEConfig.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; ODTCCEEConfig::ODTCCEEConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; diff --git a/OnlineDB/EcalCondDB/src/ODTCCEECycle.cc b/OnlineDB/EcalCondDB/src/ODTCCEECycle.cc index 88815cf81a645..13c159a014bc7 100644 --- a/OnlineDB/EcalCondDB/src/ODTCCEECycle.cc +++ b/OnlineDB/EcalCondDB/src/ODTCCEECycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODTCCEECycle::ODTCCEECycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_tcc_ee_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODTTCFConfig.cc b/OnlineDB/EcalCondDB/src/ODTTCFConfig.cc index 5debcff6f97ca..3f5ef8ce6bca7 100644 --- a/OnlineDB/EcalCondDB/src/ODTTCFConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODTTCFConfig.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; ODTTCFConfig::ODTTCFConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; clear(); diff --git a/OnlineDB/EcalCondDB/src/ODTTCFCycle.cc b/OnlineDB/EcalCondDB/src/ODTTCFCycle.cc index 20d3bc1dc7652..7e13968faf28b 100644 --- a/OnlineDB/EcalCondDB/src/ODTTCFCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODTTCFCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODTTCFCycle::ODTTCFCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_ttcf_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODTTCciConfig.cc b/OnlineDB/EcalCondDB/src/ODTTCciConfig.cc index 1fdcf36e18057..da52c7910f08e 100644 --- a/OnlineDB/EcalCondDB/src/ODTTCciConfig.cc +++ b/OnlineDB/EcalCondDB/src/ODTTCciConfig.cc @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include @@ -14,10 +14,10 @@ using namespace oracle::occi; ODTTCciConfig::ODTTCciConfig() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_configuration_script=""; m_configuration_script_params=""; diff --git a/OnlineDB/EcalCondDB/src/ODTTCciCycle.cc b/OnlineDB/EcalCondDB/src/ODTTCciCycle.cc index a55143ded91a8..e8ffad02429bd 100644 --- a/OnlineDB/EcalCondDB/src/ODTTCciCycle.cc +++ b/OnlineDB/EcalCondDB/src/ODTTCciCycle.cc @@ -8,10 +8,10 @@ using namespace oracle::occi; ODTTCciCycle::ODTTCciCycle() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; // m_ID = 0; m_ttcci_config_id = 0; diff --git a/OnlineDB/EcalCondDB/src/ODTowersToByPassDat.cc b/OnlineDB/EcalCondDB/src/ODTowersToByPassDat.cc index 9f705e02eb3b9..e815c5e57889d 100644 --- a/OnlineDB/EcalCondDB/src/ODTowersToByPassDat.cc +++ b/OnlineDB/EcalCondDB/src/ODTowersToByPassDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODTowersToByPassDat::ODTowersToByPassDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/ODTowersToByPassInfo.cc b/OnlineDB/EcalCondDB/src/ODTowersToByPassInfo.cc index 41ebcf9c744df..1063821607a15 100644 --- a/OnlineDB/EcalCondDB/src/ODTowersToByPassInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODTowersToByPassInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/ODTowersToByPassInfo.h" @@ -10,10 +10,10 @@ using namespace oracle::occi; ODTowersToByPassInfo::ODTowersToByPassInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/ODVfeToRejectDat.cc b/OnlineDB/EcalCondDB/src/ODVfeToRejectDat.cc index bc1d54de90580..2de627675d8f8 100644 --- a/OnlineDB/EcalCondDB/src/ODVfeToRejectDat.cc +++ b/OnlineDB/EcalCondDB/src/ODVfeToRejectDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODVfeToRejectDat::ODVfeToRejectDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/ODVfeToRejectInfo.cc b/OnlineDB/EcalCondDB/src/ODVfeToRejectInfo.cc index 1d7377d2c6f16..a40c4398d3b57 100644 --- a/OnlineDB/EcalCondDB/src/ODVfeToRejectInfo.cc +++ b/OnlineDB/EcalCondDB/src/ODVfeToRejectInfo.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/Oracle/interface/Oracle.h" #include #include "OnlineDB/EcalCondDB/interface/ODVfeToRejectInfo.h" @@ -10,10 +10,10 @@ using namespace oracle::occi; ODVfeToRejectInfo::ODVfeToRejectInfo() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config_tag=""; m_ID=0; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/ODWeightsDat.cc b/OnlineDB/EcalCondDB/src/ODWeightsDat.cc index c2b178c105713..4a70b2e607791 100644 --- a/OnlineDB/EcalCondDB/src/ODWeightsDat.cc +++ b/OnlineDB/EcalCondDB/src/ODWeightsDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODWeightsDat::ODWeightsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_sm = 0; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/ODWeightsSamplesDat.cc b/OnlineDB/EcalCondDB/src/ODWeightsSamplesDat.cc index 1377ca8b76e31..20abb3f33ad52 100644 --- a/OnlineDB/EcalCondDB/src/ODWeightsSamplesDat.cc +++ b/OnlineDB/EcalCondDB/src/ODWeightsSamplesDat.cc @@ -9,10 +9,10 @@ using namespace oracle::occi; ODWeightsSamplesDat::ODWeightsSamplesDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_fed = 0; diff --git a/OnlineDB/EcalCondDB/src/RunCommentDat.cc b/OnlineDB/EcalCondDB/src/RunCommentDat.cc index 6a8cbd5985e29..32688884a9784 100644 --- a/OnlineDB/EcalCondDB/src/RunCommentDat.cc +++ b/OnlineDB/EcalCondDB/src/RunCommentDat.cc @@ -15,9 +15,9 @@ using namespace oracle::occi; RunCommentDat::RunCommentDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; m_source = ""; m_comment = ""; m_time = Tm(); diff --git a/OnlineDB/EcalCondDB/src/RunConfigDat.cc b/OnlineDB/EcalCondDB/src/RunConfigDat.cc index 1122e60b18b59..2e3be90d37816 100644 --- a/OnlineDB/EcalCondDB/src/RunConfigDat.cc +++ b/OnlineDB/EcalCondDB/src/RunConfigDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; RunConfigDat::RunConfigDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_configTag = "none"; m_configVer = 0; diff --git a/OnlineDB/EcalCondDB/src/RunCrystalErrorsDat.cc b/OnlineDB/EcalCondDB/src/RunCrystalErrorsDat.cc index a7b5f0611c88f..c8f8c6a92c97e 100644 --- a/OnlineDB/EcalCondDB/src/RunCrystalErrorsDat.cc +++ b/OnlineDB/EcalCondDB/src/RunCrystalErrorsDat.cc @@ -11,9 +11,9 @@ using namespace oracle::occi; RunCrystalErrorsDat::RunCrystalErrorsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; m_errorBits = 0; } @@ -59,7 +59,7 @@ void RunCrystalErrorsDat::writeDB(const EcalLogicID* ecid, const RunCrystalError try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); - m_writeStmt->setString(3, ( std::to_string(item->getErrorBits()) ).c_str()); + m_writeStmt->setString(3, std::to_string(item->getErrorBits())); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunCrystalErrorsDat::writeDB(): "+e.getMessage())); diff --git a/OnlineDB/EcalCondDB/src/RunDCSHVDat.cc b/OnlineDB/EcalCondDB/src/RunDCSHVDat.cc index 0549f33feb700..1963549382156 100644 --- a/OnlineDB/EcalCondDB/src/RunDCSHVDat.cc +++ b/OnlineDB/EcalCondDB/src/RunDCSHVDat.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include @@ -15,10 +15,10 @@ using namespace oracle::occi; RunDCSHVDat::RunDCSHVDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_hv = 0; m_hvnom = 0; @@ -63,7 +63,7 @@ ResultSet *RunDCSHVDat::getBarrelRset(const Tm& timeStart) { DateHandler dh(m_env, m_conn); - ResultSet* rset = NULL; + ResultSet* rset = nullptr; string query="SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " " d.actual_vmon, h.nominal_value , d.change_date " " FROM "+ getEBAccount()+".FWCAENCHANNEL d " @@ -91,7 +91,7 @@ ResultSet *RunDCSHVDat::getEndcapAnodeRset(const Tm& timeStart) { DateHandler dh(m_env, m_conn); - ResultSet* rset = NULL; + ResultSet* rset = nullptr; string query="SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " " d.actual_vmon, '800' nominal_value , d.change_date " " FROM "+ getEEAccount()+".FWCAENCHANNEL d " @@ -119,7 +119,7 @@ ResultSet *RunDCSHVDat::getEndcapDynodeRset(const Tm& timeStart) { DateHandler dh(m_env, m_conn); - ResultSet* rset = NULL; + ResultSet* rset = nullptr; string query="SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " " d.actual_vmon, '600' nominal_value , d.change_date " " FROM "+ getEEAccount()+".FWCAENCHANNEL d " @@ -164,7 +164,7 @@ ResultSet *RunDCSHVDat::getBarrelRset() { */ ResultSet *RunDCSHVDat::getBarrelRset() { - ResultSet* rset = NULL; + ResultSet* rset = nullptr; string query = "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " " d.VALUE_NUMBER, h.nominal_value , d.CHANGE_DATE " "FROM "+ getEBAccount()+".FWCAENCHANNEL_LV d " @@ -185,7 +185,7 @@ ResultSet *RunDCSHVDat::getBarrelRset() { } ResultSet *RunDCSHVDat::getEndcapAnodeRset() { - ResultSet* rset = NULL; + ResultSet* rset = nullptr; string query = "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " " d.value_number, '800' NOMINAL_VALUE , d.CHANGE_DATE " "FROM "+ getEEAccount()+".FWCAENCHANNEL_LV d " @@ -206,7 +206,7 @@ ResultSet *RunDCSHVDat::getEndcapAnodeRset() { } ResultSet *RunDCSHVDat::getEndcapDynodeRset() { - ResultSet* rset = NULL; + ResultSet* rset = nullptr; string query = "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " " d.value_number, '600' NOMINAL_VALUE , d.CHANGE_DATE " "FROM "+ getEEAccount()+".FWCAENCHANNEL_LV d " diff --git a/OnlineDB/EcalCondDB/src/RunDCSLVDat.cc b/OnlineDB/EcalCondDB/src/RunDCSLVDat.cc index 07de39d6d8c83..01042f6e36207 100644 --- a/OnlineDB/EcalCondDB/src/RunDCSLVDat.cc +++ b/OnlineDB/EcalCondDB/src/RunDCSLVDat.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include "OnlineDB/EcalCondDB/interface/RunDCSLVDat.h" #include "OnlineDB/EcalCondDB/interface/RunIOV.h" @@ -10,10 +10,10 @@ using namespace oracle::occi; RunDCSLVDat::RunDCSLVDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_lv = 0; m_lvnom = 0; @@ -53,7 +53,7 @@ void RunDCSLVDat::fetchData(map< EcalLogicID, RunDCSLVDat >* fillMap, RunIOV* io } ResultSet *RunDCSLVDat::getBarrelRset() { - ResultSet* rset = NULL; + ResultSet* rset = nullptr; string query = "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " " d.value_number , '5' NOMINAL_VALUE , d.VALUE_TIMESTAMP " "FROM "+ getEBAccount()+".FWWIENERMARATHONCHANNEL_LV d " @@ -74,7 +74,7 @@ ResultSet *RunDCSLVDat::getBarrelRset() { } ResultSet *RunDCSLVDat::getEndcapRset() { - ResultSet* rset = NULL; + ResultSet* rset = nullptr; string query = "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, " " d.VALUE_NUMBER, '5' NOMINAL_VALUE , d.VALUE_TIMESTAMP " "FROM "+ getEEAccount()+".FWWIENERMARATHONCHANNEL_LV d " diff --git a/OnlineDB/EcalCondDB/src/RunDCSMagnetDat.cc b/OnlineDB/EcalCondDB/src/RunDCSMagnetDat.cc index 48d1303e1b0c7..71e1b7dfa6553 100644 --- a/OnlineDB/EcalCondDB/src/RunDCSMagnetDat.cc +++ b/OnlineDB/EcalCondDB/src/RunDCSMagnetDat.cc @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include @@ -14,10 +14,10 @@ using namespace oracle::occi; RunDCSMagnetDat::RunDCSMagnetDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_current = 0; m_time=Tm(); @@ -74,7 +74,7 @@ ResultSet *RunDCSMagnetDat::getMagnetRset() { DateHandler dh(m_env, m_conn); - ResultSet* rset = NULL; + ResultSet* rset = nullptr; string query="SELECT c.name, c.logic_id, c.id1, c.id2, c.id3, c.maps_to , v.value_number, v.change_date from "+ getMagnetAccount()+ ".CMSFWMAGNET_LV v, channelview c where v.dpe_name= 'CURRENT' and c.name=maps_to and c.name='EB' " ; try { diff --git a/OnlineDB/EcalCondDB/src/RunDat.cc b/OnlineDB/EcalCondDB/src/RunDat.cc index 8808cd867bb4b..37369c9531151 100644 --- a/OnlineDB/EcalCondDB/src/RunDat.cc +++ b/OnlineDB/EcalCondDB/src/RunDat.cc @@ -10,9 +10,9 @@ using namespace oracle::occi; RunDat::RunDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; m_numEvents = 0; } diff --git a/OnlineDB/EcalCondDB/src/RunFEConfigDat.cc b/OnlineDB/EcalCondDB/src/RunFEConfigDat.cc index cfce4419c9390..3e5628502941c 100644 --- a/OnlineDB/EcalCondDB/src/RunFEConfigDat.cc +++ b/OnlineDB/EcalCondDB/src/RunFEConfigDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; RunFEConfigDat::RunFEConfigDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config = 0; diff --git a/OnlineDB/EcalCondDB/src/RunH4TablePositionDat.cc b/OnlineDB/EcalCondDB/src/RunH4TablePositionDat.cc index 335504cd5ac9c..ac50844411fd6 100644 --- a/OnlineDB/EcalCondDB/src/RunH4TablePositionDat.cc +++ b/OnlineDB/EcalCondDB/src/RunH4TablePositionDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; RunH4TablePositionDat::RunH4TablePositionDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_table_x = 0; m_table_y = 0; diff --git a/OnlineDB/EcalCondDB/src/RunIOV.cc b/OnlineDB/EcalCondDB/src/RunIOV.cc index 7a5dc4a22f721..d65c7e0aaff3e 100644 --- a/OnlineDB/EcalCondDB/src/RunIOV.cc +++ b/OnlineDB/EcalCondDB/src/RunIOV.cc @@ -11,7 +11,7 @@ using namespace oracle::occi; RunIOV::RunIOV() { - m_conn = NULL; + m_conn = nullptr; m_ID = 0; m_runNum = 0; m_runStart = Tm(); diff --git a/OnlineDB/EcalCondDB/src/RunLaserRunDat.cc b/OnlineDB/EcalCondDB/src/RunLaserRunDat.cc index a6b572ec03b85..6d3fd7b9d20f3 100644 --- a/OnlineDB/EcalCondDB/src/RunLaserRunDat.cc +++ b/OnlineDB/EcalCondDB/src/RunLaserRunDat.cc @@ -10,9 +10,9 @@ using namespace oracle::occi; RunLaserRunDat::RunLaserRunDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; m_laserSeqType = ""; m_laserSeqCond = ""; } diff --git a/OnlineDB/EcalCondDB/src/RunList.cc b/OnlineDB/EcalCondDB/src/RunList.cc index c9ad36cde4420..153e2b07c8749 100644 --- a/OnlineDB/EcalCondDB/src/RunList.cc +++ b/OnlineDB/EcalCondDB/src/RunList.cc @@ -12,7 +12,7 @@ using namespace oracle::occi; RunList::RunList() { - m_conn = NULL; + m_conn = nullptr; } RunList::~RunList() diff --git a/OnlineDB/EcalCondDB/src/RunMemChErrorsDat.cc b/OnlineDB/EcalCondDB/src/RunMemChErrorsDat.cc index 9e2173b208006..bd1aa572e4479 100644 --- a/OnlineDB/EcalCondDB/src/RunMemChErrorsDat.cc +++ b/OnlineDB/EcalCondDB/src/RunMemChErrorsDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; RunMemChErrorsDat::RunMemChErrorsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_errorBits = 0; } @@ -60,7 +60,7 @@ void RunMemChErrorsDat::writeDB(const EcalLogicID* ecid, const RunMemChErrorsDat try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); - m_writeStmt->setString(3, ( std::to_string(item->getErrorBits()) ).c_str()); + m_writeStmt->setString(3, std::to_string(item->getErrorBits())); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunMemChErrorsDat::writeDB(): "+e.getMessage())); diff --git a/OnlineDB/EcalCondDB/src/RunMemTTErrorsDat.cc b/OnlineDB/EcalCondDB/src/RunMemTTErrorsDat.cc index 8b8adf3cc3351..c0c7fd64243b4 100644 --- a/OnlineDB/EcalCondDB/src/RunMemTTErrorsDat.cc +++ b/OnlineDB/EcalCondDB/src/RunMemTTErrorsDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; RunMemTTErrorsDat::RunMemTTErrorsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_errorBits = 0; } @@ -61,7 +61,7 @@ void RunMemTTErrorsDat::writeDB(const EcalLogicID* ecid, const RunMemTTErrorsDat try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); - m_writeStmt->setString(3, ( std::to_string(item->getErrorBits()) ).c_str()); + m_writeStmt->setString(3, std::to_string(item->getErrorBits())); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunMemTTErrorsDat::writeDB(): "+e.getMessage())); diff --git a/OnlineDB/EcalCondDB/src/RunModeDef.cc b/OnlineDB/EcalCondDB/src/RunModeDef.cc index 6b1af87cd79e4..9d86b6218b7c2 100644 --- a/OnlineDB/EcalCondDB/src/RunModeDef.cc +++ b/OnlineDB/EcalCondDB/src/RunModeDef.cc @@ -8,8 +8,8 @@ using namespace oracle::occi; RunModeDef::RunModeDef() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_runMode = ""; diff --git a/OnlineDB/EcalCondDB/src/RunPNErrorsDat.cc b/OnlineDB/EcalCondDB/src/RunPNErrorsDat.cc index 0715b77b6247f..7215151be97cc 100644 --- a/OnlineDB/EcalCondDB/src/RunPNErrorsDat.cc +++ b/OnlineDB/EcalCondDB/src/RunPNErrorsDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; RunPNErrorsDat::RunPNErrorsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_errorBits = 0; } @@ -61,7 +61,7 @@ void RunPNErrorsDat::writeDB(const EcalLogicID* ecid, const RunPNErrorsDat* item try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); - m_writeStmt->setString(3, ( std::to_string(item->getErrorBits()) ).c_str()); + m_writeStmt->setString(3, std::to_string(item->getErrorBits())); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunPNErrorsDat::writeDB(): "+e.getMessage())); diff --git a/OnlineDB/EcalCondDB/src/RunPTMTempDat.cc b/OnlineDB/EcalCondDB/src/RunPTMTempDat.cc index e48fe27f5fe3f..a1db605a1b7b9 100644 --- a/OnlineDB/EcalCondDB/src/RunPTMTempDat.cc +++ b/OnlineDB/EcalCondDB/src/RunPTMTempDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; RunPTMTempDat::RunPTMTempDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_temperature = 0; } diff --git a/OnlineDB/EcalCondDB/src/RunSeqDef.cc b/OnlineDB/EcalCondDB/src/RunSeqDef.cc index a82fd87ba9a11..75227e8acd047 100644 --- a/OnlineDB/EcalCondDB/src/RunSeqDef.cc +++ b/OnlineDB/EcalCondDB/src/RunSeqDef.cc @@ -8,8 +8,8 @@ using namespace oracle::occi; RunSeqDef::RunSeqDef() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_runSeq = ""; m_runType = RunTypeDef(); diff --git a/OnlineDB/EcalCondDB/src/RunTPGConfigDat.cc b/OnlineDB/EcalCondDB/src/RunTPGConfigDat.cc index e8cdbea0c3585..8ebbd7c289a74 100644 --- a/OnlineDB/EcalCondDB/src/RunTPGConfigDat.cc +++ b/OnlineDB/EcalCondDB/src/RunTPGConfigDat.cc @@ -10,10 +10,10 @@ using namespace oracle::occi; RunTPGConfigDat::RunTPGConfigDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_config = ""; m_version=0; diff --git a/OnlineDB/EcalCondDB/src/RunTTErrorsDat.cc b/OnlineDB/EcalCondDB/src/RunTTErrorsDat.cc index de2279e60d073..14180ccf97d72 100644 --- a/OnlineDB/EcalCondDB/src/RunTTErrorsDat.cc +++ b/OnlineDB/EcalCondDB/src/RunTTErrorsDat.cc @@ -11,10 +11,10 @@ using namespace oracle::occi; RunTTErrorsDat::RunTTErrorsDat() { - m_env = NULL; - m_conn = NULL; - m_writeStmt = NULL; - m_readStmt = NULL; + m_env = nullptr; + m_conn = nullptr; + m_writeStmt = nullptr; + m_readStmt = nullptr; m_errorBits = 0; } @@ -61,7 +61,7 @@ void RunTTErrorsDat::writeDB(const EcalLogicID* ecid, const RunTTErrorsDat* item try { m_writeStmt->setInt(1, iovID); m_writeStmt->setInt(2, logicID); - m_writeStmt->setString(3, ( std::to_string(item->getErrorBits()) ).c_str()); + m_writeStmt->setString(3, std::to_string(item->getErrorBits())); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("RunTTErrorsDat::writeDB(): "+e.getMessage())); diff --git a/OnlineDB/EcalCondDB/src/RunTag.cc b/OnlineDB/EcalCondDB/src/RunTag.cc index 98c487fe6f3a0..85a2981a9e170 100644 --- a/OnlineDB/EcalCondDB/src/RunTag.cc +++ b/OnlineDB/EcalCondDB/src/RunTag.cc @@ -8,8 +8,8 @@ using namespace oracle::occi; RunTag::RunTag() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_genTag = "default"; m_locDef = LocationDef(); diff --git a/OnlineDB/EcalCondDB/src/RunTypeDef.cc b/OnlineDB/EcalCondDB/src/RunTypeDef.cc index 47653435d83e2..a4ff0956c649c 100644 --- a/OnlineDB/EcalCondDB/src/RunTypeDef.cc +++ b/OnlineDB/EcalCondDB/src/RunTypeDef.cc @@ -8,8 +8,8 @@ using namespace oracle::occi; RunTypeDef::RunTypeDef() { - m_env = NULL; - m_conn = NULL; + m_env = nullptr; + m_conn = nullptr; m_ID = 0; m_runType = ""; m_desc = ""; diff --git a/OnlineDB/EcalCondDB/src/Tm.cc b/OnlineDB/EcalCondDB/src/Tm.cc index aa1a560a2842c..216a4439a64ee 100644 --- a/OnlineDB/EcalCondDB/src/Tm.cc +++ b/OnlineDB/EcalCondDB/src/Tm.cc @@ -1,8 +1,8 @@ -#include +#include #include #include #include -#include +#include #include #include "OnlineDB/EcalCondDB/interface/Tm.h" @@ -170,13 +170,13 @@ void Tm::setToMicrosTime(uint64_t micros) void Tm::setToCurrentLocalTime() { - time_t t = time(NULL); + time_t t = time(nullptr); m_tm = *localtime( &t ); } void Tm::setToCurrentGMTime() { - time_t t = time(NULL); + time_t t = time(nullptr); m_tm = *gmtime( &t ); } diff --git a/OnlineDB/SiStripConfigDb/src/SiStripConfigDb.cc b/OnlineDB/SiStripConfigDb/src/SiStripConfigDb.cc index 48c14189dc6df..ce78cc62e6adb 100644 --- a/OnlineDB/SiStripConfigDb/src/SiStripConfigDb.cc +++ b/OnlineDB/SiStripConfigDb/src/SiStripConfigDb.cc @@ -20,8 +20,8 @@ std::atomic SiStripConfigDb::allowCalibUpload_{ false }; // SiStripConfigDb::SiStripConfigDb( const edm::ParameterSet& pset, const edm::ActivityRegistry& activity ) : - factory_(0), - dbCache_(0), + factory_(nullptr), + dbCache_(nullptr), dbParams_(), // Local cache connections_(), @@ -158,12 +158,12 @@ void SiStripConfigDb::closeDbConnection() { try { if ( factory_ ) { delete factory_; } } catch (...) { handleException( __func__, "Attempting to delete DeviceFactory object..." ); } - factory_ = 0; + factory_ = nullptr; try { if ( dbCache_ ) { delete dbCache_; } } catch (...) { handleException( __func__, "Attempting to delete DbClient object..." ); } - dbCache_ = 0; + dbCache_ = nullptr; LogTrace(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]" @@ -202,7 +202,7 @@ DeviceFactory* const SiStripConfigDb::deviceFactory( std::string method_name ) c << " method SiStripConfigDb::" << method_name << "()!"; edm::LogWarning(mlConfigDb_) << ss.str(); } - return 0; + return nullptr; } } @@ -218,7 +218,7 @@ DbClient* const SiStripConfigDb::databaseCache( std::string method_name ) const << " method SiStripConfigDb::" << method_name << "()!"; edm::LogWarning(mlConfigDb_) << ss.str(); } - return 0; + return nullptr; } } @@ -279,7 +279,7 @@ void SiStripConfigDb::usingDatabase() { // Check TNS_ADMIN environmental variable std::string pattern = "TNS_ADMIN"; std::string tns_admin = "/afs/cern.ch/project/oracle/admin"; - if ( getenv( pattern.c_str() ) != NULL ) { + if ( getenv( pattern.c_str() ) != nullptr ) { tns_admin = getenv( pattern.c_str() ); edm::LogVerbatim(mlConfigDb_) << "[SiStripConfigDb::" << __func__ << "]" @@ -399,7 +399,7 @@ void SiStripConfigDb::usingDatabase() { // Retrieve partition name from ENV_CMS_TK_PARTITION env. var. and override .cfg value std::string partition = "ENV_CMS_TK_PARTITION"; - if ( getenv(partition.c_str()) != NULL ) { + if ( getenv(partition.c_str()) != nullptr ) { std::stringstream ss; ss << "[SiStripConfigDb::" << __func__ << "]" diff --git a/OnlineDB/SiStripConfigDb/src/SiStripPartition.cc b/OnlineDB/SiStripConfigDb/src/SiStripPartition.cc index 9feb34f9532f1..43ac013035d05 100644 --- a/OnlineDB/SiStripConfigDb/src/SiStripPartition.cc +++ b/OnlineDB/SiStripConfigDb/src/SiStripPartition.cc @@ -481,7 +481,7 @@ void SiStripPartition::update( const SiStripConfigDb* const db ) { } else { // ---------- USE RUN NUMBER ---------- // Retrieve TkRun object for given run (0 means "latest run") - TkRun* run = 0; + TkRun* run = nullptr; if ( !runNumber_ ) { run = df->getLastRun( partitionName_ ); } else { run = df->getRun( partitionName_, runNumber_ ); } diff --git a/OnlineDB/SiStripESSources/interface/SiStripFedCablingBuilderFromDb.h b/OnlineDB/SiStripESSources/interface/SiStripFedCablingBuilderFromDb.h index d9f2ca0371f42..88ce96cfb5d65 100644 --- a/OnlineDB/SiStripESSources/interface/SiStripFedCablingBuilderFromDb.h +++ b/OnlineDB/SiStripESSources/interface/SiStripFedCablingBuilderFromDb.h @@ -22,12 +22,12 @@ class SiStripFedCablingBuilderFromDb : public SiStripFedCablingESProducer, publi // -------------------- Constructors, destructors -------------------- SiStripFedCablingBuilderFromDb( const edm::ParameterSet& ); - virtual ~SiStripFedCablingBuilderFromDb(); + ~SiStripFedCablingBuilderFromDb() override; // -------------------- Methods to build FED cabling -------------------- /** Builds FED cabling using info from configuration database. */ - virtual SiStripFedCabling* make( const SiStripFedCablingRcd& ); + SiStripFedCabling* make( const SiStripFedCablingRcd& ) override; // -------------------- Convert b/w FED and FEC cabling -------------------- @@ -77,9 +77,9 @@ class SiStripFedCablingBuilderFromDb : public SiStripFedCablingESProducer, publi protected: /** */ - virtual void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, + void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue&, - edm::ValidityInterval& ); + edm::ValidityInterval& ) override; /** */ static void assignDcuAndDetIds( SiStripFecCabling&, diff --git a/OnlineDB/SiStripESSources/interface/SiStripGainBuilderFromDb.h b/OnlineDB/SiStripESSources/interface/SiStripGainBuilderFromDb.h index f8c9b0f468849..1154ad258eaa4 100644 --- a/OnlineDB/SiStripESSources/interface/SiStripGainBuilderFromDb.h +++ b/OnlineDB/SiStripESSources/interface/SiStripGainBuilderFromDb.h @@ -10,10 +10,10 @@ class SiStripGainBuilderFromDb : public SiStripGainESSource { SiStripGainBuilderFromDb( const edm::ParameterSet& ); - virtual ~SiStripGainBuilderFromDb(); + ~SiStripGainBuilderFromDb() override; /** Builds pedestals using info from configuration database. */ - virtual SiStripApvGain* makeGain(); + SiStripApvGain* makeGain() override; protected: diff --git a/OnlineDB/SiStripESSources/interface/SiStripNoiseBuilderFromDb.h b/OnlineDB/SiStripESSources/interface/SiStripNoiseBuilderFromDb.h index 3a599d9968e43..63e2961e77f3d 100644 --- a/OnlineDB/SiStripESSources/interface/SiStripNoiseBuilderFromDb.h +++ b/OnlineDB/SiStripESSources/interface/SiStripNoiseBuilderFromDb.h @@ -16,10 +16,10 @@ class SiStripNoiseBuilderFromDb : public SiStripNoiseESSource { public: SiStripNoiseBuilderFromDb( const edm::ParameterSet& ); - virtual ~SiStripNoiseBuilderFromDb(); + ~SiStripNoiseBuilderFromDb() override; /** Builds pedestals using info from configuration database. */ - virtual SiStripNoises* makeNoise(); + SiStripNoises* makeNoise() override; protected: diff --git a/OnlineDB/SiStripESSources/interface/SiStripPedestalsBuilderFromDb.h b/OnlineDB/SiStripESSources/interface/SiStripPedestalsBuilderFromDb.h index 9728d0509efa7..7d506f11ee8fb 100644 --- a/OnlineDB/SiStripESSources/interface/SiStripPedestalsBuilderFromDb.h +++ b/OnlineDB/SiStripESSources/interface/SiStripPedestalsBuilderFromDb.h @@ -18,10 +18,10 @@ class SiStripPedestalsBuilderFromDb : public SiStripPedestalsESSource { public: SiStripPedestalsBuilderFromDb( const edm::ParameterSet& ); - virtual ~SiStripPedestalsBuilderFromDb(); + ~SiStripPedestalsBuilderFromDb() override; /** Builds pedestals using info from configuration database. */ - virtual SiStripPedestals* makePedestals(); + SiStripPedestals* makePedestals() override; protected: diff --git a/OnlineDB/SiStripESSources/src/SiStripFedCablingBuilderFromDb.cc b/OnlineDB/SiStripESSources/src/SiStripFedCablingBuilderFromDb.cc index 62373b6a0f79b..79e4757b179a8 100644 --- a/OnlineDB/SiStripESSources/src/SiStripFedCablingBuilderFromDb.cc +++ b/OnlineDB/SiStripESSources/src/SiStripFedCablingBuilderFromDb.cc @@ -20,7 +20,7 @@ using namespace sistrip; /** */ SiStripFedCablingBuilderFromDb::SiStripFedCablingBuilderFromDb( const edm::ParameterSet& pset ) : SiStripFedCablingESProducer( pset ), - db_(0), + db_(nullptr), source_(sistrip::UNDEFINED_CABLING_SOURCE) { findingRecord(); diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPayloadHandler.cc b/OnlineDB/SiStripO2O/plugins/SiStripPayloadHandler.cc index bb5c2e5daec90..c48d020b21361 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPayloadHandler.cc +++ b/OnlineDB/SiStripO2O/plugins/SiStripPayloadHandler.cc @@ -29,9 +29,9 @@ template class SiStripPayloadHandler : public edm::EDAnalyzer { public: explicit SiStripPayloadHandler(const edm::ParameterSet& iConfig ); - virtual ~SiStripPayloadHandler(); - virtual void analyze( const edm::Event& evt, const edm::EventSetup& evtSetup); - virtual void endJob(); + ~SiStripPayloadHandler() override; + void analyze( const edm::Event& evt, const edm::EventSetup& evtSetup) override; + void endJob() override; private: std::string makeConfigHash(); diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPayloadMapTableCreator.cc b/OnlineDB/SiStripO2O/plugins/SiStripPayloadMapTableCreator.cc index b301b2eb58134..62ea94b1ebb1e 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPayloadMapTableCreator.cc +++ b/OnlineDB/SiStripO2O/plugins/SiStripPayloadMapTableCreator.cc @@ -21,9 +21,9 @@ class SiStripPayloadMapTableCreator : public edm::EDAnalyzer { public: explicit SiStripPayloadMapTableCreator(const edm::ParameterSet& iConfig ); - virtual ~SiStripPayloadMapTableCreator(); - virtual void analyze( const edm::Event& evt, const edm::EventSetup& evtSetup); - virtual void endJob(); + ~SiStripPayloadMapTableCreator() override; + void analyze( const edm::Event& evt, const edm::EventSetup& evtSetup) override; + void endJob() override; private: cond::persistency::ConnectionPool m_connectionPool; diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h index 57ee0e06b309c..9eebfb3f86e55 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h @@ -35,11 +35,11 @@ namespace popcon{ //--------------------------------------- // - ~SiStripPopConConfigDbObjHandler(){}; + ~SiStripPopConConfigDbObjHandler() override{}; //--------------------------------------- // - void getNewObjects(){ + void getNewObjects() override{ edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") << "[getNewObjects] for PopCon application " << m_name; if (m_debugMode){ @@ -80,7 +80,7 @@ namespace popcon{ //--------------------------------------- // - std::string id() const { return m_name;} + std::string id() const override { return m_name;} //--------------------------------------- // @@ -130,7 +130,7 @@ namespace popcon{ void setForTransfer(){ edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") << "[setForTransfer] " << m_name << " getting data to be transferred " << std::endl; - T *obj=0; + T *obj=nullptr; condObjBuilder->getValue(obj); edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") << "[setForTransfer] " << m_name << " got data to be transferred from condObjBuilder " << std::endl; @@ -142,7 +142,7 @@ namespace popcon{ m_since=this->tagInfo().lastInterval.first+1; edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") <<"[setForTransfer] setting since = "<< m_since <m_to_transfer.push_back(std::make_pair(obj,m_since)); diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h index df9ac56898e9c..7386f5706d632 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "CLHEP/Random/RandFlat.h" #include "CLHEP/Random/RandGauss.h" @@ -46,11 +46,11 @@ namespace popcon{ //--------------------------------------- // - ~SiStripPopConHandlerUnitTestGain(){}; + ~SiStripPopConHandlerUnitTestGain() override{}; //--------------------------------------- // - void getNewObjects(){ + void getNewObjects() override{ edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") << "[getNewObjects] for PopCon application " << m_name; if (m_debugMode){ @@ -91,7 +91,7 @@ namespace popcon{ //--------------------------------------- // - std::string id() const { return m_name;} + std::string id() const override { return m_name;} private: //methods @@ -147,7 +147,7 @@ namespace popcon{ void setForTransfer(){ edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") << "[setForTransfer] " << m_name << " getting data to be transferred " << std::endl; - T *obj=0; + T *obj=nullptr; fillObject(obj); @@ -157,7 +157,7 @@ namespace popcon{ if (m_debugMode) m_since=this->tagInfo().lastInterval.first+1; - if (obj!=0){ + if (obj!=nullptr){ edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") <<"setting since = "<< m_since <m_to_transfer.push_back(std::make_pair(obj,m_since)); @@ -185,7 +185,7 @@ namespace popcon{ edm::FileInPath fp_("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); SiStripDetInfoFileReader reader(fp_.fullPath()); - const std::map DetInfos = reader.getAllData(); + const std::map& DetInfos = reader.getAllData(); int count=-1; for(std::map::const_iterator it = DetInfos.begin(); it != DetInfos.end(); it++){ diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h index 2078b45941810..896d45d338294 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "CLHEP/Random/RandFlat.h" #include "CLHEP/Random/RandGauss.h" @@ -46,11 +46,11 @@ namespace popcon{ //--------------------------------------- // - ~SiStripPopConHandlerUnitTestNoise(){}; + ~SiStripPopConHandlerUnitTestNoise() override{}; //--------------------------------------- // - void getNewObjects(){ + void getNewObjects() override{ edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") << "[getNewObjects] for PopCon application " << m_name; if (m_debugMode){ @@ -91,7 +91,7 @@ namespace popcon{ //--------------------------------------- // - std::string id() const { return m_name;} + std::string id() const override { return m_name;} private: //methods @@ -147,7 +147,7 @@ namespace popcon{ void setForTransfer(){ edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") << "[setForTransfer] " << m_name << " getting data to be transferred " << std::endl; - T *obj=0; + T *obj=nullptr; fillObject(obj); @@ -157,7 +157,7 @@ namespace popcon{ if (m_debugMode) m_since=this->tagInfo().lastInterval.first+1; - if (obj!=0){ + if (obj!=nullptr){ edm::LogInfo ("SiStripPopPopConConfigDbObjHandler") <<"setting since = "<< m_since <m_to_transfer.push_back(std::make_pair(obj,m_since)); @@ -185,7 +185,7 @@ namespace popcon{ edm::FileInPath fp_("CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"); SiStripDetInfoFileReader reader(fp_.fullPath()); - const std::map DetInfos = reader.getAllData(); + const std::map& DetInfos = reader.getAllData(); int count=-1; for(std::map::const_iterator it = DetInfos.begin(); it != DetInfos.end(); it++){ diff --git a/PerfTools/Callgrind/plugins/CallgrindAnalyzer.cc b/PerfTools/Callgrind/plugins/CallgrindAnalyzer.cc index ad49187af33dc..69b04db898b27 100644 --- a/PerfTools/Callgrind/plugins/CallgrindAnalyzer.cc +++ b/PerfTools/Callgrind/plugins/CallgrindAnalyzer.cc @@ -39,13 +39,13 @@ using namespace std; class Profiler : public edm::EDAnalyzer { public: explicit Profiler(const edm::ParameterSet&); - ~Profiler(); + ~Profiler() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- int m_firstEvent; diff --git a/PerfTools/Callgrind/plugins/ProfilerAnalyzer.cc b/PerfTools/Callgrind/plugins/ProfilerAnalyzer.cc index 3598e56b13fa4..06c90a5be5154 100644 --- a/PerfTools/Callgrind/plugins/ProfilerAnalyzer.cc +++ b/PerfTools/Callgrind/plugins/ProfilerAnalyzer.cc @@ -39,13 +39,13 @@ class ProfilerAnalyzer : public edm::EDAnalyzer { public: explicit ProfilerAnalyzer(const edm::ParameterSet&); - ~ProfilerAnalyzer(); + ~ProfilerAnalyzer() override; private: - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&)=0; - virtual void endJob() override ; + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override =0; + void endJob() override ; }; @@ -53,11 +53,11 @@ class StartProfilerAnalyzer : public ProfilerAnalyzer { public: explicit StartProfilerAnalyzer(const edm::ParameterSet & pset) : ProfilerAnalyzer(pset) {} - ~StartProfilerAnalyzer(){} + ~StartProfilerAnalyzer() override{} private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; }; @@ -65,10 +65,10 @@ class StopProfilerAnalyzer : public ProfilerAnalyzer { public: explicit StopProfilerAnalyzer(const edm::ParameterSet & pset) : ProfilerAnalyzer(pset) {} - ~StopProfilerAnalyzer(){} + ~StopProfilerAnalyzer() override{} private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; }; diff --git a/PerfTools/EdmEvent/src/EdmEventSize.cc b/PerfTools/EdmEvent/src/EdmEventSize.cc index 50f5df2abc19b..9ba228a4db63b 100644 --- a/PerfTools/EdmEvent/src/EdmEventSize.cc +++ b/PerfTools/EdmEvent/src/EdmEventSize.cc @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include "Rtypes.h" #include "TROOT.h" @@ -37,7 +37,7 @@ namespace { size_t n = branches->GetEntries(); for( size_t i = 0; i < n; ++ i ) { TBranch * b = dynamic_cast( branches->At( i ) ); - assert( b != 0 ); + assert( b != nullptr ); result += getBasketSize(b); } return result; @@ -45,7 +45,7 @@ namespace { size_type getBasketSize( TBranch * b) { size_type result(static_cast(0),2); - if ( b != 0 ) { + if ( b != nullptr ) { if ( b->GetZipBytes() > 0 ) { result[kUncompressed] = b->GetTotBytes(); result[kCompressed] = b->GetZipBytes(); } else { @@ -82,15 +82,15 @@ namespace perftools { m_branches.clear(); TFile * file = TFile::Open( fileName.c_str() ); - if( file==0 || ( !(*file).IsOpen() ) ) + if( file==nullptr || ( !(*file).IsOpen() ) ) throw Error( "unable to open data file " + fileName, 7002); TObject * o = file->Get(treeName.c_str() ); - if ( o == 0 ) + if ( o == nullptr ) throw Error("no object \"" + treeName + "\" found in file: " + fileName, 7003); TTree * events = dynamic_cast (o); - if ( events == 0 ) + if ( events == nullptr ) throw Error("object \"" + treeName + "\" is not a TTree in file: " + fileName, 7004); m_nEvents = events->GetEntries(); @@ -99,14 +99,14 @@ namespace perftools { TObjArray * branches = events->GetListOfBranches(); - if ( branches == 0 ) + if ( branches == nullptr ) throw Error("tree \"" + treeName+ "\" in file " + fileName + " contains no branches", 7006); const size_t n = branches->GetEntries(); m_branches.reserve(n); for( size_t i = 0; i < n; ++i ) { TBranch * b = dynamic_cast( branches->At( i ) ); - if (b==0) continue; + if (b==nullptr) continue; std::string const name( b->GetName() ); if ( name == "EventAux" ) continue; size_type s = getTotalSize(b); diff --git a/PhysicsTools/CandAlgos/plugins/EventShapeVarsProducer.h b/PhysicsTools/CandAlgos/plugins/EventShapeVarsProducer.h index f1ff215357142..8b87cbe76a851 100644 --- a/PhysicsTools/CandAlgos/plugins/EventShapeVarsProducer.h +++ b/PhysicsTools/CandAlgos/plugins/EventShapeVarsProducer.h @@ -41,16 +41,16 @@ class EventShapeVarsProducer : public edm::EDProducer public: explicit EventShapeVarsProducer(const edm::ParameterSet&); - ~EventShapeVarsProducer() {} + ~EventShapeVarsProducer() override {} private: edm::EDGetTokenT > srcToken_; double r_; - void beginJob() {} - void produce(edm::Event&, const edm::EventSetup&); - void endJob() {} + void beginJob() override {} + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override {} }; diff --git a/PhysicsTools/CandUtils/interface/CandMatcherNew.h b/PhysicsTools/CandUtils/interface/CandMatcherNew.h index 31d5affa807a3..e168cdf9d7147 100755 --- a/PhysicsTools/CandUtils/interface/CandMatcherNew.h +++ b/PhysicsTools/CandUtils/interface/CandMatcherNew.h @@ -59,7 +59,7 @@ namespace reco { template typename CandMatcher::reference_type CandMatcher::operator[](const reco::Candidate & c) const { if (c.hasMasterClone()) { - CandidateBaseRef master = c.masterClone(); + const CandidateBaseRef& master = c.masterClone(); return master->numberOfDaughters() == 0 ? map_[master] : (*this)[*master]; } size_t nDau = c.numberOfDaughters(); @@ -74,8 +74,8 @@ namespace reco { m = m->motherRef(); momIdx.insert(m.key()); } - if(momIdx.size() == 0) return reference_type(); - if (common.size() == 0) common = momIdx; + if(momIdx.empty()) return reference_type(); + if (common.empty()) common = momIdx; else { tmp.clear(); set_intersection(common.begin(), common.end(), @@ -83,7 +83,7 @@ namespace reco { inserter(tmp, tmp.begin())); swap(common, tmp); } - if (common.size() == 0) return reference_type(); + if (common.empty()) return reference_type(); } size_t idx = * max_element(common.begin(), common.end()); return reference_type(map_.ref(), idx); diff --git a/PhysicsTools/CondLiteIO/interface/RecordWriter.h b/PhysicsTools/CondLiteIO/interface/RecordWriter.h index 4b891202b2f34..745781a214104 100644 --- a/PhysicsTools/CondLiteIO/interface/RecordWriter.h +++ b/PhysicsTools/CondLiteIO/interface/RecordWriter.h @@ -55,9 +55,9 @@ class RecordWriter void write(); private: - RecordWriter(const RecordWriter&); // stop default + RecordWriter(const RecordWriter&) = delete; // stop default - const RecordWriter& operator=(const RecordWriter&); // stop default + const RecordWriter& operator=(const RecordWriter&) = delete; // stop default // ---------- member data -------------------------------- TTree* tree_; diff --git a/PhysicsTools/CondLiteIO/plugins/FWLiteESRecordWriterAnalyzer.cc b/PhysicsTools/CondLiteIO/plugins/FWLiteESRecordWriterAnalyzer.cc index f4f3986d97e7a..fc66ffa5e3aef 100644 --- a/PhysicsTools/CondLiteIO/plugins/FWLiteESRecordWriterAnalyzer.cc +++ b/PhysicsTools/CondLiteIO/plugins/FWLiteESRecordWriterAnalyzer.cc @@ -57,7 +57,7 @@ namespace fwliteeswriter { mutable const void* m_data; }; struct Handle { - Handle(const DataInfo* iInfo): m_data(0), m_info(iInfo) {} + Handle(const DataInfo* iInfo): m_data(nullptr), m_info(iInfo) {} const void* m_data; const DataInfo* m_info; const edm::eventsetup::ComponentDescription* m_desc; @@ -79,7 +79,7 @@ namespace edm { DataKey::kDoNotCopyMemory); const void* pValue = this->getFromProxy(dataKey,iDesc,iTransientAccessOnly); - if(0==pValue) { + if(nullptr==pValue) { throw cms::Exception("NoProxyException")<<"No data of type \""<m_tag->name()<<"\" with label \""<< iName<<"\" in record \""<key().name()<<"\""; } @@ -91,7 +91,7 @@ namespace edm { fwliteeswriter::DummyType t; t.m_tag = &(iHolder.m_info->m_tag); const fwliteeswriter::DummyType* value = &t; - const ComponentDescription* desc = 0; + const ComponentDescription* desc = nullptr; std::shared_ptr dummy; this->getImplementation(value, iName.c_str(),desc,true, dummy); iHolder.m_data = t.m_data; @@ -110,16 +110,16 @@ namespace { TFile* iFile, std::vector& ioInfo): m_key(iRec), - m_record(0), + m_record(nullptr), m_writer(m_key.name(),iFile), m_cacheID(0) { m_dataInfos.swap(ioInfo); } void update(const edm::EventSetup& iSetup) { - if(0==m_record) { + if(nullptr==m_record) { m_record = iSetup.find(m_key); - assert(0!=m_record); + assert(nullptr!=m_record); } if(m_cacheID != m_record->cacheIdentifier()) { m_cacheID = m_record->cacheIdentifier(); @@ -150,15 +150,15 @@ namespace { class FWLiteESRecordWriterAnalyzer : public edm::EDAnalyzer { public: explicit FWLiteESRecordWriterAnalyzer(const edm::ParameterSet&); - ~FWLiteESRecordWriterAnalyzer(); + ~FWLiteESRecordWriterAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; - virtual void beginRun(edm::Run const&, edm::EventSetup const&) override; - virtual void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; + void beginRun(edm::Run const&, edm::EventSetup const&) override; + void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override; void update(const edm::EventSetup&); @@ -183,7 +183,7 @@ class FWLiteESRecordWriterAnalyzer : public edm::EDAnalyzer { FWLiteESRecordWriterAnalyzer::FWLiteESRecordWriterAnalyzer(const edm::ParameterSet& iConfig) { std::vector names = iConfig.getParameterNamesForType >(false); - if (0 == names.size()) { + if (names.empty()) { throw edm::Exception(edm::errors::Configuration)<<"No VPSets were given in configuration"; } for (std::vector::const_iterator it = names.begin(), itEnd=names.end(); it != itEnd; ++it) { @@ -233,7 +233,7 @@ FWLiteESRecordWriterAnalyzer::update(const edm::EventSetup& iSetup) edm::eventsetup::EventSetupRecordKey rKey(tt); const edm::eventsetup::EventSetupRecord* rec = iSetup.find(tt); - if(0==rec) { + if(nullptr==rec) { throw cms::Exception("UnknownESRecordType")<<"The name '"<first<<"' is not associated with a type which is not an EventSetupRecord.\n" "Please check your spelling."; } diff --git a/PhysicsTools/CondLiteIO/plugins/FWLiteESSource.cc b/PhysicsTools/CondLiteIO/plugins/FWLiteESSource.cc index 6694ec1a3db8d..6536538c6deec 100644 --- a/PhysicsTools/CondLiteIO/plugins/FWLiteESSource.cc +++ b/PhysicsTools/CondLiteIO/plugins/FWLiteESSource.cc @@ -47,17 +47,17 @@ namespace { struct FWLiteESGenericHandle { FWLiteESGenericHandle(const TypeID& iType): m_type(iType), - m_data(0), - m_exception(0){} + m_data(nullptr), + m_exception(nullptr){} FWLiteESGenericHandle(const void* iData): m_type(), m_data(iData), - m_exception(0) {} + m_exception(nullptr) {} FWLiteESGenericHandle(cms::Exception* iException): m_type(), - m_data(0), + m_data(nullptr), m_exception(iException){} const std::type_info& typeInfo() const { @@ -75,19 +75,19 @@ namespace { m_type(iTypeID), m_record(iRecord){} - virtual const void* getImpl(const edm::eventsetup::EventSetupRecord&, const edm::eventsetup::DataKey& iKey) override { + const void* getImpl(const edm::eventsetup::EventSetupRecord&, const edm::eventsetup::DataKey& iKey) override { assert(iKey.type() == m_type); FWLiteESGenericHandle h(m_type); m_record->get(h,iKey.name().value()); - if(0!=h.m_exception) { + if(nullptr!=h.m_exception) { throw *(h.m_exception); } return h.m_data; } - virtual void invalidateCache() override { + void invalidateCache() override { } private: @@ -100,31 +100,31 @@ class FWLiteESSource : public edm::eventsetup::DataProxyProvider, public edm::Ev public: FWLiteESSource(edm::ParameterSet const& iPS); - virtual ~FWLiteESSource(); + ~FWLiteESSource() override; // ---------- const member functions --------------------- // ---------- static member functions -------------------- // ---------- member functions --------------------------- - virtual void newInterval(const edm::eventsetup::EventSetupRecordKey& iRecordType, + void newInterval(const edm::eventsetup::EventSetupRecordKey& iRecordType, const edm::ValidityInterval& iInterval) override; private: - FWLiteESSource(const FWLiteESSource&); // stop default + FWLiteESSource(const FWLiteESSource&) = delete; // stop default - const FWLiteESSource& operator=(const FWLiteESSource&); // stop default + const FWLiteESSource& operator=(const FWLiteESSource&) = delete; // stop default - virtual void registerProxies(const edm::eventsetup::EventSetupRecordKey& iRecordKey , + void registerProxies(const edm::eventsetup::EventSetupRecordKey& iRecordKey , KeyedProxies& aProxyList) override; - virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&, + void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& , edm::ValidityInterval&) override; - virtual void delaySettingRecords() override; + void delaySettingRecords() override; // ---------- member data -------------------------------- std::auto_ptr m_file; diff --git a/PhysicsTools/CondLiteIO/src/RecordWriter.cc b/PhysicsTools/CondLiteIO/src/RecordWriter.cc index db3afbb17c605..42fcc0730e884 100644 --- a/PhysicsTools/CondLiteIO/src/RecordWriter.cc +++ b/PhysicsTools/CondLiteIO/src/RecordWriter.cc @@ -72,7 +72,7 @@ void RecordWriter::update(const void* iData, const std::type_info& iType, const char* iLabel) { const char* label = iLabel; - if(0==iLabel) { + if(nullptr==iLabel) { label = ""; } std::map, DataBuffer>::iterator itFound = idToBuffer_.find(std::make_pair(edm::TypeIDBase(iType), @@ -113,7 +113,7 @@ RecordWriter::fill(const edm::ESRecordAuxiliary& iValue) { for(std::map, DataBuffer>::iterator it=idToBuffer_.begin(),itEnd=idToBuffer_.end(); it!=itEnd;++it) { - if(0==it->second.pBuffer_) { + if(nullptr==it->second.pBuffer_) { throw cms::Exception("MissingESData")<<"The EventSetup data "<first.first.name()<<" '"<first.second<<"' was not supplied"; } } @@ -122,7 +122,7 @@ RecordWriter::fill(const edm::ESRecordAuxiliary& iValue) tree_->Fill(); for(std::map, DataBuffer>::iterator it=idToBuffer_.begin(),itEnd=idToBuffer_.end(); it!=itEnd;++it) { - it->second.pBuffer_=0; + it->second.pBuffer_=nullptr; } } diff --git a/PhysicsTools/FWLite/bin/FWLiteHistograms.cc b/PhysicsTools/FWLite/bin/FWLiteHistograms.cc index e1d2d560fd279..6d8fa2f337278 100644 --- a/PhysicsTools/FWLite/bin/FWLiteHistograms.cc +++ b/PhysicsTools/FWLite/bin/FWLiteHistograms.cc @@ -54,7 +54,7 @@ int main(int argc, char* argv[]) std::vector inputFiles_ = parser.stringVector("inputFiles"); // book a set of histograms - fwlite::TFileService fs = fwlite::TFileService(outputFile_.c_str()); + fwlite::TFileService fs = fwlite::TFileService(outputFile_); TFileDirectory dir = fs.mkdir("analyzeBasicPat"); TH1F* muonPt_ = dir.make("muonPt" , "pt" , 100, 0., 300.); TH1F* muonEta_ = dir.make("muonEta" , "eta" , 100, -3., 3.); diff --git a/PhysicsTools/FWLite/bin/FWLiteWithPythonConfig.cc b/PhysicsTools/FWLite/bin/FWLiteWithPythonConfig.cc index 834c8b75d8683..17363481ae9ee 100644 --- a/PhysicsTools/FWLite/bin/FWLiteWithPythonConfig.cc +++ b/PhysicsTools/FWLite/bin/FWLiteWithPythonConfig.cc @@ -54,7 +54,7 @@ int main(int argc, char* argv[]) edm::InputTag muons_( ana.getParameter("muons") ); // book a set of histograms - fwlite::TFileService fs = fwlite::TFileService(outputHandler_.file().c_str()); + fwlite::TFileService fs = fwlite::TFileService(outputHandler_.file()); TFileDirectory dir = fs.mkdir("analyzeBasicPat"); TH1F* muonPt_ = dir.make("muonPt" , "pt" , 100, 0., 300.); TH1F* muonEta_ = dir.make("muonEta" , "eta" , 100, -3., 3.); diff --git a/PhysicsTools/FWLite/bin/FWLiteWithSelectorUtils.cc b/PhysicsTools/FWLite/bin/FWLiteWithSelectorUtils.cc index d1754a5a80ac6..efba20b52f426 100644 --- a/PhysicsTools/FWLite/bin/FWLiteWithSelectorUtils.cc +++ b/PhysicsTools/FWLite/bin/FWLiteWithSelectorUtils.cc @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) WSelector wSelector( selection ); pat::strbitset wSelectorReturns = wSelector.getBitTemplate(); // book a set of histograms - fwlite::TFileService fs = fwlite::TFileService(outputHandler_.file().c_str()); + fwlite::TFileService fs = fwlite::TFileService(outputHandler_.file()); TFileDirectory theDir = fs.mkdir("analyzeBasicPat"); TH1F* muonPt_ = theDir.make("muonPt", "pt", 100, 0.,300.); TH1F* muonEta_ = theDir.make("muonEta","eta", 100, -3., 3.); diff --git a/PhysicsTools/FWLite/interface/EventContainer.h b/PhysicsTools/FWLite/interface/EventContainer.h index ad8bf3489912e..6aaa5a46b7bd2 100644 --- a/PhysicsTools/FWLite/interface/EventContainer.h +++ b/PhysicsTools/FWLite/interface/EventContainer.h @@ -48,8 +48,8 @@ namespace fwlite // Constructors and Destructor // ///////////////////////////////// EventContainer (optutl::CommandLineParser &parser, - FuncPtr funcPtr = 0); - ~EventContainer(); + FuncPtr funcPtr = nullptr); + ~EventContainer() override; //////////////// // One Liners // @@ -83,32 +83,32 @@ namespace fwlite const char* iModuleLabel, const char* iProductInstanceLabel, const char* iProcessLabel, - void* oData) const; + void* oData) const override; const std::string getBranchNameFor (const std::type_info& iInfo, const char* iModuleLabel, const char* iProductInstanceLabel, - const char* iProcessLabel) const; + const char* iProcessLabel) const override; - const EventContainer& operator++(); + const EventContainer& operator++() override; - const EventContainer& toBegin(); + const EventContainer& toBegin() override; - bool atEnd() const; + bool atEnd() const override; - edm::TriggerNames const& triggerNames(edm::TriggerResults const& triggerResults) const + edm::TriggerNames const& triggerNames(edm::TriggerResults const& triggerResults) const override { return m_eventBasePtr->triggerNames(triggerResults); } - edm::TriggerResultsByName triggerResultsByName(edm::TriggerResults const& triggerResults) const + edm::TriggerResultsByName triggerResultsByName(edm::TriggerResults const& triggerResults) const override { return m_eventBasePtr->triggerResultsByName(triggerResults); } - Long64_t fileIndex() const + Long64_t fileIndex() const override { return m_eventBasePtr->fileIndex(); } - Long64_t secondaryFileIndex() const + Long64_t secondaryFileIndex() const override { return m_eventBasePtr->secondaryFileIndex(); } - edm::EventAuxiliary const& eventAuxiliary() const + edm::EventAuxiliary const& eventAuxiliary() const override { return m_eventBasePtr->eventAuxiliary(); } template diff --git a/PhysicsTools/FWLite/interface/TFileService.h b/PhysicsTools/FWLite/interface/TFileService.h index 3304b8c7e626c..9eab7d051965b 100644 --- a/PhysicsTools/FWLite/interface/TFileService.h +++ b/PhysicsTools/FWLite/interface/TFileService.h @@ -18,7 +18,7 @@ class TFileService : public TFileDirectory { TFileService(TFile * aFile); /// destructor - ~TFileService(); + ~TFileService() override; /// return opened TFile TFile & file() const { return * file_; } diff --git a/PhysicsTools/FWLite/interface/WSelector.h b/PhysicsTools/FWLite/interface/WSelector.h index 4938b28ec598a..3983c16ca1162 100644 --- a/PhysicsTools/FWLite/interface/WSelector.h +++ b/PhysicsTools/FWLite/interface/WSelector.h @@ -25,21 +25,21 @@ class WSelector : public EventSelector { push_back("Muon Pt", muonPtMin ); push_back("MET" , metMin ); set("Muon Pt"); set("MET"); - wMuon_ = 0; met_ = 0; + wMuon_ = nullptr; met_ = nullptr; if ( params.exists("cutsToIgnore") ){ setIgnoredCuts( params.getParameter >("cutsToIgnore") ); } retInternal_ = getBitTemplate(); } /// destructor - virtual ~WSelector() {} + ~WSelector() override {} /// return muon candidate of W boson pat::Muon const& wMuon() const { return *wMuon_;} /// return MET of W boson pat::MET const& met() const { return *met_; } /// here is where the selection occurs - virtual bool operator()( edm::EventBase const & event, pat::strbitset & ret){ + bool operator()( edm::EventBase const & event, pat::strbitset & ret) override{ ret.set(false); // Handle to the muon collection edm::Handle > muons; @@ -57,7 +57,7 @@ class WSelector : public EventSelector { // get the highest pt muon, require to have pt > minimum if( gotMuons ){ if( !ignoreCut("Muon Pt") ){ - if( muons->size() > 0 ){ + if( !muons->empty() ){ wMuon_ = &muons->at(0); if( wMuon_->pt() > cut("Muon Pt", double()) || ignoreCut("Muon Pt") ) passCut(ret, "Muon Pt"); diff --git a/PhysicsTools/FWLite/src/CommandLineParser.cc b/PhysicsTools/FWLite/src/CommandLineParser.cc index 913fd2db92acf..ef01366432115 100644 --- a/PhysicsTools/FWLite/src/CommandLineParser.cc +++ b/PhysicsTools/FWLite/src/CommandLineParser.cc @@ -273,7 +273,7 @@ CommandLineParser::printOptionValues() cout << "------------------------------------------------------------------" << left << endl; // Print the integers next - if (m_integerMap.size()) + if (!m_integerMap.empty()) { cout << endl << "Integer options:" << endl; } @@ -292,7 +292,7 @@ CommandLineParser::printOptionValues() } // for iter // Print the doubles next - if (m_doubleMap.size()) + if (!m_doubleMap.empty()) { cout << endl << "Double options:" << endl; } @@ -311,7 +311,7 @@ CommandLineParser::printOptionValues() } // for iter // Print the bools first - if (m_boolMap.size()) + if (!m_boolMap.empty()) { cout << endl << "Bool options:" << endl; } @@ -335,7 +335,7 @@ CommandLineParser::printOptionValues() } // for iter // Print the strings next - if (m_stringMap.size()) + if (!m_stringMap.empty()) { cout << endl << "String options:" << endl; } @@ -355,7 +355,7 @@ CommandLineParser::printOptionValues() } // for iter // Integer Vec - if (m_integerVecMap.size()) + if (!m_integerVecMap.empty()) { cout << endl << "Integer Vector options:" << endl; } @@ -375,7 +375,7 @@ CommandLineParser::printOptionValues() } // for iter // Double Vec - if (m_doubleVecMap.size()) + if (!m_doubleVecMap.empty()) { cout << endl << "Double Vector options:" << endl; } @@ -395,7 +395,7 @@ CommandLineParser::printOptionValues() } // for iter // String Vec - if (m_stringVecMap.size()) + if (!m_stringVecMap.empty()) { cout << endl << "String Vector options:" << endl; } else { diff --git a/PhysicsTools/FWLite/src/EventContainer.cc b/PhysicsTools/FWLite/src/EventContainer.cc index 860b75d4c1df4..866cf8a761f0e 100644 --- a/PhysicsTools/FWLite/src/EventContainer.cc +++ b/PhysicsTools/FWLite/src/EventContainer.cc @@ -23,7 +23,7 @@ bool EventContainer::sm_autoloaderCalled = false; EventContainer::EventContainer (optutl::CommandLineParser &parser, FuncPtr funcPtr) : - m_eventsSeen (0), m_maxWanted (0), m_parserPtr (0) + m_eventsSeen (0), m_maxWanted (0), m_parserPtr (nullptr) { // get the user-defined tag string tag; @@ -44,7 +44,7 @@ EventContainer::EventContainer (optutl::CommandLineParser &parser, const optutl::CommandLineParser::SVec &secondaryInputFiles = parser.stringVector ("secondaryInputFiles"); - if (secondaryInputFiles.size()) + if (!secondaryInputFiles.empty()) { m_eventBasePtr = new fwlite::MultiChainEvent( parser.stringVector ("inputFiles"), diff --git a/PhysicsTools/FWLite/src/ScannerHelpers.cc b/PhysicsTools/FWLite/src/ScannerHelpers.cc index 5f7abb7b2689f..2cd6c3c97825c 100644 --- a/PhysicsTools/FWLite/src/ScannerHelpers.cc +++ b/PhysicsTools/FWLite/src/ScannerHelpers.cc @@ -49,14 +49,14 @@ helper::Parser::elementType(const edm::TypeWithDict &wrapperType) { bool helper::Parser::test(const reco::parser::SelectorPtr &sel, const edm::TypeWithDict type, const void * ptr) { - if (sel.get() == 0) return false; + if (sel.get() == nullptr) return false; edm::ObjectWithDict obj(type, const_cast(ptr)); return (*sel)(obj); } double helper::Parser::eval(const reco::parser::ExpressionPtr &expr, const edm::TypeWithDict type, const void * ptr) { - if (expr.get() == 0) return 0; + if (expr.get() == nullptr) return 0; edm::ObjectWithDict obj(type, const_cast(ptr)); return expr->value(obj); } @@ -65,7 +65,7 @@ bool helper::ScannerBase::addExpression(const char *expr) { bool ok = true; exprs_.push_back(helper::Parser::makeExpression(expr,objType_)); - if (exprs_.back().get() == 0) { + if (exprs_.back().get() == nullptr) { std::cerr << "Failed to parse expression " << expr << std::endl; exprs_.pop_back(); ok = false; @@ -111,7 +111,7 @@ helper::ScannerBase::addExtraCut(const char *cut) { bool helper::ScannerBase::test(const void *ptr, size_t icut) const { if (icut >= cuts_.size()) return false; - if (cuts_[icut].get() == 0) return true; + if (cuts_[icut].get() == nullptr) return true; try { edm::ObjectWithDict obj(objType_, const_cast(ptr)); return (*cuts_[icut])(obj); @@ -135,9 +135,9 @@ helper::ScannerBase::eval(const void *ptr, size_t iexpr) const { void helper::ScannerBase::print(const void *ptr) const { edm::ObjectWithDict obj(objType_, const_cast(ptr)); - if ((cuts_[0].get() == 0) || (*cuts_[0])(obj)) { + if ((cuts_[0].get() == nullptr) || (*cuts_[0])(obj)) { for (std::vector::const_iterator it = exprs_.begin(), ed = exprs_.end(); it != ed; ++it) { - if (ptr == 0 || it->get() == 0) { + if (ptr == nullptr || it->get() == nullptr) { printf(" : %8s", "#ERR"); } else { try { @@ -162,7 +162,7 @@ helper::ScannerBase::print(const void *ptr) const { } } for (std::vector::const_iterator it = cuts_.begin()+1, ed = cuts_.end(); it != ed; ++it) { - if (ptr == 0 || it->get() == 0) { + if (ptr == nullptr || it->get() == nullptr) { printf(" : %8s", "#ERR"); } else { try { @@ -182,7 +182,7 @@ helper::ScannerBase::print(const void *ptr) const { void helper::ScannerBase::fill1D(const void *ptr, TH1 *hist) const { edm::ObjectWithDict obj(objType_, const_cast(ptr)); - if ((cuts_[0].get() == 0) || (*cuts_[0])(obj)) { + if ((cuts_[0].get() == nullptr) || (*cuts_[0])(obj)) { try { if (!exprs_.empty()) hist->Fill(exprs_[0]->value(obj)); } catch (std::exception &ex) { @@ -194,7 +194,7 @@ helper::ScannerBase::fill1D(const void *ptr, TH1 *hist) const { void helper::ScannerBase::fill2D(const void *ptr, TH2 *hist) const { edm::ObjectWithDict obj(objType_, const_cast(ptr)); - if ((cuts_[0].get() == 0) || (*cuts_[0])(obj)) { + if ((cuts_[0].get() == nullptr) || (*cuts_[0])(obj)) { try { if (exprs_.size() >= 2) hist->Fill(exprs_[0]->value(obj), exprs_[1]->value(obj)); } catch (std::exception &ex) { @@ -206,7 +206,7 @@ helper::ScannerBase::fill2D(const void *ptr, TH2 *hist) const { void helper::ScannerBase::fillGraph(const void *ptr, TGraph *graph) const { edm::ObjectWithDict obj(objType_, const_cast(ptr)); - if ((cuts_[0].get() == 0) || (*cuts_[0])(obj)) { + if ((cuts_[0].get() == nullptr) || (*cuts_[0])(obj)) { try { if (exprs_.size() >= 2) graph->SetPoint(graph->GetN(), exprs_[0]->value(obj), exprs_[1]->value(obj)); } catch (std::exception &ex) { @@ -219,7 +219,7 @@ helper::ScannerBase::fillGraph(const void *ptr, TGraph *graph) const { void helper::ScannerBase::fillProf(const void *ptr, TProfile *hist) const { edm::ObjectWithDict obj(objType_, const_cast(ptr)); - if ((cuts_[0].get() == 0) || (*cuts_[0])(obj)) { + if ((cuts_[0].get() == nullptr) || (*cuts_[0])(obj)) { try { if (exprs_.size() >= 2) hist->Fill(exprs_[0]->value(obj), exprs_[1]->value(obj)); } catch (std::exception &ex) { diff --git a/PhysicsTools/FWLite/src/TH1Store.cc b/PhysicsTools/FWLite/src/TH1Store.cc index 4e31e364e68cb..484a811f669bb 100644 --- a/PhysicsTools/FWLite/src/TH1Store.cc +++ b/PhysicsTools/FWLite/src/TH1Store.cc @@ -52,7 +52,7 @@ TH1Store::add (TH1 *histPtr, const std::string &directory) cout << "THStore::add() : Adding " << name << endl; } m_ptrMap[name] = histPtr; - histPtr->SetDirectory(0); + histPtr->SetDirectory(nullptr); if (directory.length()) { m_nameDirMap[name] = directory; @@ -115,11 +115,11 @@ TH1Store::write (TFile *filePtr, // Write out command line arguments. Save information in directory // called provenance. TDirectory *dir = _createDir ("args", filePtr); - if (argsVec.size()) + if (!argsVec.empty()) { dir->WriteObject (&argsVec, "argsVec"); } - if (inputFilesVec.size()) + if (!inputFilesVec.empty()) { dir->WriteObject (&inputFilesVec, "inputFiles"); } @@ -141,7 +141,7 @@ TH1Store::_createDir (const string &dirName, TFile *filePtr) const // directory a subdirectory? const boost::regex subdirRE ("(.+?)/([^/]+)"); boost::smatch matches; - TDirectory *parentDir = 0; + TDirectory *parentDir = nullptr; string useName = dirName; if( boost::regex_match (dirName, matches, subdirRE) ) { diff --git a/PhysicsTools/HepMCCandAlgos/interface/FlavorHistoryFilter.h b/PhysicsTools/HepMCCandAlgos/interface/FlavorHistoryFilter.h index 6654ae31281e3..6098eb5ba0cb5 100644 --- a/PhysicsTools/HepMCCandAlgos/interface/FlavorHistoryFilter.h +++ b/PhysicsTools/HepMCCandAlgos/interface/FlavorHistoryFilter.h @@ -79,11 +79,11 @@ class FlavorHistoryFilter : public edm::EDFilter { typedef std::vector flavor_vector; explicit FlavorHistoryFilter(const edm::ParameterSet&); - ~FlavorHistoryFilter(); + ~FlavorHistoryFilter() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- edm::EDGetTokenT bsrcToken_; // Input b flavor history collection name diff --git a/PhysicsTools/HepMCCandAlgos/interface/FlavorHistoryProducer.h b/PhysicsTools/HepMCCandAlgos/interface/FlavorHistoryProducer.h index bdb620dbf6ec7..78aa93bc6f3ba 100644 --- a/PhysicsTools/HepMCCandAlgos/interface/FlavorHistoryProducer.h +++ b/PhysicsTools/HepMCCandAlgos/interface/FlavorHistoryProducer.h @@ -59,7 +59,7 @@ class FlavorHistoryProducer : public edm::EDProducer { /// constructor FlavorHistoryProducer( const edm::ParameterSet & ); /// destructor - ~FlavorHistoryProducer(); + ~FlavorHistoryProducer() override; private: /// process one event diff --git a/PhysicsTools/HepMCCandAlgos/interface/HFFilter.h b/PhysicsTools/HepMCCandAlgos/interface/HFFilter.h index 6bad32e5a1171..bbcf3757daa7c 100644 --- a/PhysicsTools/HepMCCandAlgos/interface/HFFilter.h +++ b/PhysicsTools/HepMCCandAlgos/interface/HFFilter.h @@ -45,10 +45,10 @@ class HFFilter : public edm::EDFilter { public: explicit HFFilter(const edm::ParameterSet&); - ~HFFilter(); + ~HFFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; private: // ----------member data --------------------------- diff --git a/PhysicsTools/HepMCCandAlgos/interface/MCTruthHelper.h b/PhysicsTools/HepMCCandAlgos/interface/MCTruthHelper.h index 68bfcaa306fdd..eba3d84dab8ea 100644 --- a/PhysicsTools/HepMCCandAlgos/interface/MCTruthHelper.h +++ b/PhysicsTools/HepMCCandAlgos/interface/MCTruthHelper.h @@ -192,7 +192,7 @@ bool MCTruthHelper

::isPrompt(const P &p) const { //particle from hadron/muon/tau decay -> not prompt //checking all the way up the chain treats properly the radiated photon //case as well - return findDecayedMother(p) == 0; + return findDecayedMother(p) == nullptr; } ///////////////////////////////////////////////////////////////////////////// @@ -214,7 +214,7 @@ bool MCTruthHelper

::isPromptDecayed(const P &p) const { ///////////////////////////////////////////////////////////////////////////// template bool MCTruthHelper

::isTauDecayProduct(const P &p) const { - return findDecayedMother(p,15) != 0; + return findDecayedMother(p,15) != nullptr; } ///////////////////////////////////////////////////////////////////////////// @@ -301,7 +301,7 @@ bool MCTruthHelper

::isHardProcess(const P &p) const { ///////////////////////////////////////////////////////////////////////////// template bool MCTruthHelper

::fromHardProcess(const P &p) const { - return hardProcessMotherCopy(p) != 0; + return hardProcessMotherCopy(p) != nullptr; } ///////////////////////////////////////////////////////////////////////////// @@ -384,7 +384,7 @@ const P *MCTruthHelper

::uniqueMother(const P &p) const { while (mo && pdgId(*mo)==pdgId(p)) { dupCheck.insert(mo); mo = mother(*mo); - if (dupCheck.count(mo)) return 0; + if (dupCheck.count(mo)) return nullptr; } return mo; } @@ -397,7 +397,7 @@ const P *MCTruthHelper

::firstCopy(const P &p) const { while (previousCopy(*pcopy)) { dupCheck.insert(pcopy); pcopy = previousCopy(*pcopy); - if (dupCheck.count(pcopy)) return 0; + if (dupCheck.count(pcopy)) return nullptr; } return pcopy; } @@ -410,7 +410,7 @@ const P *MCTruthHelper

::lastCopy(const P &p) const { while (nextCopy(*pcopy)) { dupCheck.insert(pcopy); pcopy = nextCopy(*pcopy); - if (dupCheck.count(pcopy)) return 0; + if (dupCheck.count(pcopy)) return nullptr; } return pcopy; } @@ -420,7 +420,7 @@ template const P *MCTruthHelper

::lastCopyBeforeFSR(const P &p) const { //start with first copy and then walk down until there is FSR const P *pcopy = firstCopy(p); - if (!pcopy) return 0; + if (!pcopy) return nullptr; bool hasDaughterCopy = true; std::unordered_set dupCheck; while (hasDaughterCopy) { @@ -444,7 +444,7 @@ const P *MCTruthHelper

::lastCopyBeforeFSR(const P &p) const { break; } } - if (dupCheck.count(pcopy)) return 0; + if (dupCheck.count(pcopy)) return nullptr; } return pcopy; } @@ -477,7 +477,7 @@ const P *MCTruthHelper

::lastDaughterCopyBeforeFSR(const P &p) const { break; } } - if (dupCheck.count(pcopy)) return 0; + if (dupCheck.count(pcopy)) return nullptr; } return pcopy; } @@ -497,7 +497,7 @@ const P *MCTruthHelper

::hardProcessMotherCopy(const P &p) const { if (isHardProcess(*pcopy)) return pcopy; if (dupCheck.count(pcopy)) break; } - return 0; + return nullptr; } ///////////////////////////////////////////////////////////////////////////// @@ -512,7 +512,7 @@ const P *MCTruthHelper

::previousCopy(const P &p) const { } } - return 0; + return nullptr; } ///////////////////////////////////////////////////////////////////////////// @@ -527,7 +527,7 @@ const P *MCTruthHelper

::nextCopy(const P &p) const { } } - return 0; + return nullptr; } ///////////////////////////////////////////////////////////////////////////// @@ -538,7 +538,7 @@ const P *MCTruthHelper

::findDecayedMother(const P &p) const { while (mo && !isDecayedLeptonHadron(*mo)) { dupCheck.insert(mo); mo = mother(*mo); - if (dupCheck.count(mo)) return 0; + if (dupCheck.count(mo)) return nullptr; } return mo; } @@ -551,7 +551,7 @@ const P *MCTruthHelper

::findDecayedMother(const P &p, int abspdgid) const { while (mo && (absPdgId(*mo)!=abspdgid || !isDecayedLeptonHadron(*mo)) ) { dupCheck.insert(mo); mo = mother(*mo); - if (dupCheck.count(mo)) return 0; + if (dupCheck.count(mo)) return nullptr; } return mo; } @@ -601,7 +601,7 @@ const reco::GenParticle *MCTruthHelper

::mother(const reco::GenParticle &p, un ///////////////////////////////////////////////////////////////////////////// template const HepMC::GenParticle *MCTruthHelper

::mother(const HepMC::GenParticle &p, unsigned int imoth) const { - return p.production_vertex() && p.production_vertex()->particles_in_size() ? *(p.production_vertex()->particles_in_const_begin() + imoth) : 0; + return p.production_vertex() && p.production_vertex()->particles_in_size() ? *(p.production_vertex()->particles_in_const_begin() + imoth) : nullptr; } ///////////////////////////////////////////////////////////////////////////// diff --git a/PhysicsTools/HepMCCandAlgos/interface/MCTruthPairSelector.h b/PhysicsTools/HepMCCandAlgos/interface/MCTruthPairSelector.h index 01317bdabcb2b..e8e0de1d5dd64 100755 --- a/PhysicsTools/HepMCCandAlgos/interface/MCTruthPairSelector.h +++ b/PhysicsTools/HepMCCandAlgos/interface/MCTruthPairSelector.h @@ -23,7 +23,7 @@ namespace helpers { bool operator()( const T & c, const reco::Candidate & mc ) const { if ( mc.status() != 1 ) return false; if ( checkCharge_ && c.charge() != mc.charge() ) return false; - if ( matchIds_.size() == 0 ) return true; + if ( matchIds_.empty() ) return true; return matchIds_.find( std::abs( mc.pdgId() ) ) != matchIds_.end(); } private: diff --git a/PhysicsTools/HepMCCandAlgos/interface/ModelFilter.h b/PhysicsTools/HepMCCandAlgos/interface/ModelFilter.h index fd79ab1846a6f..a4b9748dd7aa7 100644 --- a/PhysicsTools/HepMCCandAlgos/interface/ModelFilter.h +++ b/PhysicsTools/HepMCCandAlgos/interface/ModelFilter.h @@ -23,16 +23,16 @@ namespace edm { { public: explicit ModelFilter(const edm::ParameterSet&); - ~ModelFilter(); + ~ModelFilter() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); std::vector split(std::string fstring, std::string splitter); typedef std::vector::const_iterator comments_const_iterator; private: - virtual void beginJob() override ; - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; edm::EDGetTokenT tokenSource_; std::string modelTag_; diff --git a/PhysicsTools/HepMCCandAlgos/plugins/FlavorHistoryProducer.cc b/PhysicsTools/HepMCCandAlgos/plugins/FlavorHistoryProducer.cc index 76335f0de5f33..245f658b7ece6 100644 --- a/PhysicsTools/HepMCCandAlgos/plugins/FlavorHistoryProducer.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/FlavorHistoryProducer.cc @@ -231,7 +231,7 @@ void FlavorHistoryProducer::produce( Event& evt, const EventSetup& ) if ( verbose_ ) cout << "Making sisters" << endl; // First make sure nothing went terribly wrong: - if ( partonIndices.size() == progenitorIndices.size() && partonIndices.size() > 0 ) { + if ( partonIndices.size() == progenitorIndices.size() && !partonIndices.empty() ) { // Now loop over the candidates for ( unsigned int ii = 0; ii < partonIndices.size(); ++ii ) { // Get the iith particle diff --git a/PhysicsTools/HepMCCandAlgos/plugins/GenParticleProducer.cc b/PhysicsTools/HepMCCandAlgos/plugins/GenParticleProducer.cc index 0cc81844bc21d..11692758d9029 100755 --- a/PhysicsTools/HepMCCandAlgos/plugins/GenParticleProducer.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/GenParticleProducer.cc @@ -81,12 +81,12 @@ class GenParticleProducer : public edm::global::EDProducer globalBeginRun(const edm::Run&, const edm::EventSetup&) const override; - virtual void globalEndRun(edm::Run const&, edm::EventSetup const&) const override {}; + void produce( edm::StreamID, edm::Event& e, const edm::EventSetup&) const override; + std::shared_ptr globalBeginRun(const edm::Run&, const edm::EventSetup&) const override; + void globalEndRun(edm::Run const&, edm::EventSetup const&) const override {}; bool convertParticle(reco::GenParticle& cand, const HepMC::GenParticle * part, const IDto3Charge& id2Charge) const; bool fillDaughters(reco::GenParticleCollection& cand, const HepMC::GenParticle * part, reco::GenParticleRefProd const& ref, size_t index, std::unordered_map& barcodes) const; @@ -167,8 +167,8 @@ void GenParticleProducer::produce( StreamID, Event& evt, const EventSetup& es ) std::unordered_map barcodes; size_t totalSize = 0; - const GenEvent * mc = 0; - MixCollection* cfhepmcprod = 0; + const GenEvent * mc = nullptr; + MixCollection* cfhepmcprod = nullptr; size_t npiles = 1; if(useCF_){ @@ -186,7 +186,7 @@ void GenParticleProducer::produce( StreamID, Event& evt, const EventSetup& es ) Handle mcp; evt.getByToken( srcToken_, mcp ); mc = mcp->GetEvent(); - if( mc == 0 ) + if( mc == nullptr ) throw edm::Exception( edm::errors::InvalidReference ) << "HepMC has null pointer to GenEvent" << endl; totalSize = mc->particles_size(); @@ -237,14 +237,14 @@ void GenParticleProducer::produce( StreamID, Event& evt, const EventSetup& es ) const HepMC::GenParticle * part = particles[ d ]; const GenVertex * productionVertex = part->production_vertex(); int sub_id = 0; - if ( productionVertex != 0 ) { + if ( productionVertex != nullptr ) { sub_id = productionVertex->id(); if(!isHI) sub_id = 0; // search barcode map and attach daughters fillDaughters(cands,part,ref,d,barcodes); }else{ const GenVertex * endVertex = part->end_vertex(); - if(endVertex != 0) sub_id = endVertex->id(); + if(endVertex != nullptr) sub_id = endVertex->id(); else throw cms::Exception( "SubEventID" )<<"SubEvent not determined. Particle has no production and no end vertex!"<production_vertex(); // search barcode map and attach daughters - if ( productionVertex != 0 ) fillDaughters(cands,part,ref,d,barcodes); + if ( productionVertex != nullptr ) fillDaughters(cands,part,ref,d,barcodes); cands[d].setCollisionId(0); } } @@ -303,7 +303,7 @@ bool GenParticleProducer::convertParticle(reco::GenParticle& cand, const HepMC:: cand.setP4( p4 ); cand.setCollisionId(0); const GenVertex * v = part->production_vertex(); - if ( v != 0 ) { + if ( v != nullptr ) { ThreeVector vtx = v->point3d(); Candidate::Point vertex( vtx.x() * mmToCm, vtx.y() * mmToCm, vtx.z() * mmToCm ); cand.setVertex( vertex ); diff --git a/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc b/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc index dfe793ad215da..d815f4a8aaa04 100644 --- a/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/GenParticlePruner.cc @@ -102,13 +102,13 @@ GenParticlePruner::GenParticlePruner(const ParameterSet& cfg) : } void GenParticlePruner::flagDaughters(const reco::GenParticle & gen, int keepOrDrop) { - GenParticleRefVector daughters = gen.daughterRefVector(); + const GenParticleRefVector& daughters = gen.daughterRefVector(); for(GenParticleRefVector::const_iterator i = daughters.begin(); i != daughters.end(); ++i) flags_[i->key()] = keepOrDrop; } void GenParticlePruner::flagMothers(const reco::GenParticle & gen, int keepOrDrop) { - GenParticleRefVector mothers = gen.motherRefVector(); + const GenParticleRefVector& mothers = gen.motherRefVector(); for(GenParticleRefVector::const_iterator i = mothers.begin(); i != mothers.end(); ++i) flags_[i->key()] = keepOrDrop; } @@ -284,7 +284,7 @@ void GenParticlePruner::getDaughterKeys(vector & daIndxs, vector daNewIndxs.push_back( idx ); } else { const GenParticleRefVector & daus = dau->daughterRefVector(); - if(daus.size()>0) + if(!daus.empty()) getDaughterKeys(daIndxs, daNewIndxs, daus); } } @@ -305,7 +305,7 @@ void GenParticlePruner::getMotherKeys(vector & moIndxs, vector & moNewIndxs.push_back( idx ); } else { const GenParticleRefVector & moms = mom->motherRefVector(); - if(moms.size()>0) + if(!moms.empty()) getMotherKeys(moIndxs, moNewIndxs, moms); } } diff --git a/PhysicsTools/HepMCCandAlgos/plugins/GenPlusSimParticleProducer.cc b/PhysicsTools/HepMCCandAlgos/plugins/GenPlusSimParticleProducer.cc index 84251f880204f..b4ea0cc541b1a 100644 --- a/PhysicsTools/HepMCCandAlgos/plugins/GenPlusSimParticleProducer.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/GenPlusSimParticleProducer.cc @@ -39,11 +39,11 @@ namespace pat { class GenPlusSimParticleProducer : public edm::EDProducer { public: explicit GenPlusSimParticleProducer(const edm::ParameterSet&); - ~GenPlusSimParticleProducer() {} + ~GenPlusSimParticleProducer() override {} private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override {} + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override {} bool firstEvent_; edm::EDGetTokenT simtracksToken_; @@ -133,13 +133,13 @@ void GenPlusSimParticleProducer::addGenParticle( const SimTrack &stMom, // Make the genParticle for stDau and add it to the new collection and update the parent-child relationship // Make up a GenParticleCandidate from the GEANT track info. int charge = static_cast(stDau.charge()); - Particle::LorentzVector p4 = stDau.momentum(); + const Particle::LorentzVector& p4 = stDau.momentum(); Particle::Point vtx; // = (0,0,0) by default if (!stDau.noVertex()) vtx = simvertices[stDau.vertIndex()].position(); GenParticle genp(charge, p4, vtx, stDau.type(), setStatus_, true); // Maybe apply filter on the particle - if (filter_.get() != 0) { + if (filter_.get() != nullptr) { if (!(*filter_)(genp)) return; } diff --git a/PhysicsTools/HepMCCandAlgos/plugins/MCTruthCompositeMatcherNew.cc b/PhysicsTools/HepMCCandAlgos/plugins/MCTruthCompositeMatcherNew.cc index f813086ffd8f5..e73fb8c91060d 100755 --- a/PhysicsTools/HepMCCandAlgos/plugins/MCTruthCompositeMatcherNew.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/MCTruthCompositeMatcherNew.cc @@ -21,7 +21,7 @@ namespace reco { class MCTruthCompositeMatcher : public edm::EDProducer { public: explicit MCTruthCompositeMatcher( const edm::ParameterSet & ); - ~MCTruthCompositeMatcher(); + ~MCTruthCompositeMatcher() override; private: edm::EDGetTokenT srcToken_; std::vector > matchMapTokens_; diff --git a/PhysicsTools/HepMCCandAlgos/plugins/ModelFilter.cc b/PhysicsTools/HepMCCandAlgos/plugins/ModelFilter.cc index fe92690c02f25..3a92ee0c53d0a 100644 --- a/PhysicsTools/HepMCCandAlgos/plugins/ModelFilter.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/ModelFilter.cc @@ -4,7 +4,7 @@ #include #include #include -#include +#include using namespace std; using namespace edm; diff --git a/PhysicsTools/HepMCCandAlgos/plugins/ParticleDecayDrawer.cc b/PhysicsTools/HepMCCandAlgos/plugins/ParticleDecayDrawer.cc index eb1167b8ae8c8..07468e8ad68ea 100755 --- a/PhysicsTools/HepMCCandAlgos/plugins/ParticleDecayDrawer.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/ParticleDecayDrawer.cc @@ -80,7 +80,7 @@ void ParticleDecayDrawer::analyze( const Event & event, const EventSetup & es ) for( size_t j = 0; j < p->numberOfMothers(); ++ j ) { const Candidate * mom = p->mother( j ); const Candidate * grandMom; - while ( ( grandMom = mom->mother() ) != 0 ) + while ( ( grandMom = mom->mother() ) != nullptr ) mom = grandMom; if ( select( * mom ) ) { moms.push_back( mom ); @@ -90,7 +90,7 @@ void ParticleDecayDrawer::analyze( const Event & event, const EventSetup & es ) } } cout << "-- decay: --" << endl; - if( moms.size() > 0 ) { + if( !moms.empty() ) { if ( moms.size() > 1 ) for( size_t m = 0; m < moms.size(); ++ m ) { string dec = decay( * moms[ m ], skip ); @@ -100,7 +100,7 @@ void ParticleDecayDrawer::analyze( const Event & event, const EventSetup & es ) else cout << decay( * moms[ 0 ], skip ); } - if ( nodes.size() > 0 ) { + if ( !nodes.empty() ) { cout << "-> "; if ( nodes.size() > 1 ) { for( size_t n = 0; n < nodes.size(); ++ n ) { @@ -139,7 +139,7 @@ string ParticleDecayDrawer::decay( const Candidate & c, int id = c.pdgId(); const ParticleData * pd = pdt_->particle( id ); - assert( pd != 0 ); + assert( pd != nullptr ); out += ( pd->name() + printP4( c ) ); size_t validDau = 0, ndau = c.numberOfDaughters(); diff --git a/PhysicsTools/HepMCCandAlgos/plugins/ParticleListDrawer.cc b/PhysicsTools/HepMCCandAlgos/plugins/ParticleListDrawer.cc index 12e589b2a24b8..bbadc50bf6047 100644 --- a/PhysicsTools/HepMCCandAlgos/plugins/ParticleListDrawer.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/ParticleListDrawer.cc @@ -42,7 +42,7 @@ using namespace edm; class ParticleListDrawer : public edm::EDAnalyzer { public: explicit ParticleListDrawer(const edm::ParameterSet & ); - ~ParticleListDrawer() {}; + ~ParticleListDrawer() override {}; void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; private: diff --git a/PhysicsTools/HepMCCandAlgos/plugins/ParticleTreeDrawer.cc b/PhysicsTools/HepMCCandAlgos/plugins/ParticleTreeDrawer.cc index db22bbefb2eb0..9592b8c299e7e 100755 --- a/PhysicsTools/HepMCCandAlgos/plugins/ParticleTreeDrawer.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/ParticleTreeDrawer.cc @@ -57,7 +57,7 @@ ParticleTreeDrawer::ParticleTreeDrawer( const ParameterSet & cfg ) : } bool ParticleTreeDrawer::accept( const reco::Candidate & c ) const { - if ( status_.size() == 0 ) return true; + if ( status_.empty() ) return true; return find( status_.begin(), status_.end(), c.status() ) != status_.end(); } @@ -92,7 +92,7 @@ void ParticleTreeDrawer::analyze( const Event & event, const EventSetup & es ) { for( View::const_iterator p = particles->begin(); p != particles->end(); ++ p ) { if ( accept( * p ) ) { - if ( p->mother() == 0 ) { + if ( p->mother() == nullptr ) { cout << "-- decay tree: --" << endl; printDecay( * p, "" ); } @@ -153,7 +153,7 @@ void ParticleTreeDrawer::printDecay( const Candidate & c, const string & pre ) c for( size_t i = 0; i < ndau; ++i ) { const Candidate * d = c.daughter( i ); - assert( d != 0 ); + assert( d != nullptr ); if ( accept( * d ) ) { cout << pre << "+-> "; string prepre( pre ); diff --git a/PhysicsTools/Heppy/interface/Davismt2.h b/PhysicsTools/Heppy/interface/Davismt2.h index 1ed6b1a855070..49f8c24c51292 100644 --- a/PhysicsTools/Heppy/interface/Davismt2.h +++ b/PhysicsTools/Heppy/interface/Davismt2.h @@ -2,7 +2,7 @@ #define PhysicsTools_Heppy_Davismt2_h #include -#include +#include #include "TObject.h" // using namespace std; diff --git a/PhysicsTools/Heppy/src/Apc.cc b/PhysicsTools/Heppy/src/Apc.cc index 5709dd32702e0..c733fe5c78550 100644 --- a/PhysicsTools/Heppy/src/Apc.cc +++ b/PhysicsTools/Heppy/src/Apc.cc @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace heppy { @@ -16,7 +16,7 @@ namespace heppy { const std::vector& py, const double metx, const double mety) { - if(et.size()==0) return -1.; + if(et.empty()) return -1.; // Momentum sums in transverse plane const double ht = accumulate( et.begin(), et.end(), 0. ); @@ -56,7 +56,7 @@ namespace heppy { apcjetmetvector.back() += et[i] * cos(dphi_jet/2.0) * sin(dphimet/2.0); } } - if (apcjetvector.size() > 0 && apcjetmetvector.size() > 0) { + if (!apcjetvector.empty() && !apcjetmetvector.empty()) { apcjetmetmin = *min_element(apcjetmetvector.begin(), apcjetmetvector.end()); } diff --git a/PhysicsTools/Heppy/src/EGammaMvaEleEstimatorFWLite.cc b/PhysicsTools/Heppy/src/EGammaMvaEleEstimatorFWLite.cc index e464f60b8162e..d6354b1876f4d 100644 --- a/PhysicsTools/Heppy/src/EGammaMvaEleEstimatorFWLite.cc +++ b/PhysicsTools/Heppy/src/EGammaMvaEleEstimatorFWLite.cc @@ -7,8 +7,8 @@ namespace heppy { EGammaMvaEleEstimatorFWLite::EGammaMvaEleEstimatorFWLite() : - estimator_(0), - estimatorCSA14_(0) + estimator_(nullptr), + estimatorCSA14_(nullptr) { } @@ -23,8 +23,8 @@ void EGammaMvaEleEstimatorFWLite::initialize( std::string methodName, bool useBinnedVersion, std::vector weightsfiles ) { - delete estimator_; estimator_ = 0; - delete estimatorCSA14_; estimatorCSA14_ = 0; + delete estimator_; estimator_ = nullptr; + delete estimatorCSA14_; estimatorCSA14_ = nullptr; std::vector weightspaths; for (const std::string &s : weightsfiles) { weightspaths.push_back( edm::FileInPath(s).fullPath() ); diff --git a/PhysicsTools/Heppy/src/JetUtils.cc b/PhysicsTools/Heppy/src/JetUtils.cc index d448284cd3552..9545611350226 100644 --- a/PhysicsTools/Heppy/src/JetUtils.cc +++ b/PhysicsTools/Heppy/src/JetUtils.cc @@ -5,7 +5,7 @@ namespace heppy{ const pat::Jet JetUtils::copyJet(const pat::Jet& ijet) { - edm::Ptr ptrJet(edm::ProductID(), &ijet, 0,0); + edm::Ptr ptrJet(edm::ProductID(), &ijet, 0,false); pat::Jet jet(ptrJet); return jet; diff --git a/PhysicsTools/Heppy/src/Megajet.cc b/PhysicsTools/Heppy/src/Megajet.cc index c4bac1d920f03..ef976536e1f94 100644 --- a/PhysicsTools/Heppy/src/Megajet.cc +++ b/PhysicsTools/Heppy/src/Megajet.cc @@ -1,7 +1,7 @@ #include "PhysicsTools/Heppy/interface/Megajet.h" #include -#include +#include #include using namespace std; diff --git a/PhysicsTools/Heppy/src/TriggerBitChecker.cc b/PhysicsTools/Heppy/src/TriggerBitChecker.cc index 32638d9a21228..b4046cda2dfe0 100644 --- a/PhysicsTools/Heppy/src/TriggerBitChecker.cc +++ b/PhysicsTools/Heppy/src/TriggerBitChecker.cc @@ -1,7 +1,7 @@ #include "PhysicsTools/Heppy/interface/TriggerBitChecker.h" #include "FWCore/Common/interface/TriggerNames.h" -#include +#include #include namespace heppy { @@ -42,7 +42,7 @@ bool TriggerBitChecker::check_unprescaled(const edm::EventBase &event, const edm int TriggerBitChecker::getprescale(const edm::EventBase &event, const edm::TriggerResults &result_tr, const pat::PackedTriggerPrescales &result) const { if (result_tr.parameterSetID() != lastID_) { syncIndices(event, result_tr); lastID_ = result_tr.parameterSetID(); } - if (indices_.size() == 0 ){ + if (indices_.empty() ){ // std::cout << " trying to check an inexistent trigger" << std::endl; return -999; } diff --git a/PhysicsTools/Heppy/src/mt2w_bisect.cc b/PhysicsTools/Heppy/src/mt2w_bisect.cc index 118a4dbbf3887..765346856fb8e 100644 --- a/PhysicsTools/Heppy/src/mt2w_bisect.cc +++ b/PhysicsTools/Heppy/src/mt2w_bisect.cc @@ -34,7 +34,7 @@ *******************************************************************************/ #include -#include +#include #include "PhysicsTools/Heppy/interface/mt2w_bisect.h" using namespace std; diff --git a/PhysicsTools/IsolationAlgos/interface/EventDependentAbsVeto.h b/PhysicsTools/IsolationAlgos/interface/EventDependentAbsVeto.h index b28d41e7a31a2..78c98f0c87266 100644 --- a/PhysicsTools/IsolationAlgos/interface/EventDependentAbsVeto.h +++ b/PhysicsTools/IsolationAlgos/interface/EventDependentAbsVeto.h @@ -9,7 +9,7 @@ namespace reco { namespace isodeposit { class EventDependentAbsVeto : public AbsVeto { public: - virtual ~EventDependentAbsVeto() {} + ~EventDependentAbsVeto() override {} virtual void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) = 0; }; typedef std::vector EventDependentAbsVetos; diff --git a/PhysicsTools/IsolationAlgos/interface/EventDependentAbsVetos.h b/PhysicsTools/IsolationAlgos/interface/EventDependentAbsVetos.h index be495ef757e81..66f84cdcccff6 100644 --- a/PhysicsTools/IsolationAlgos/interface/EventDependentAbsVetos.h +++ b/PhysicsTools/IsolationAlgos/interface/EventDependentAbsVetos.h @@ -18,17 +18,17 @@ namespace reco { src_(iC.consumes >(candidates)), deltaR2_(deltaR*deltaR) { } // Virtual destructor (should always be there) - virtual ~OtherCandidatesDeltaRVeto() {} + ~OtherCandidatesDeltaRVeto() override {} //! Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum //! This is true if the deposit is within the configured deltaR from any item of the source collection - virtual bool veto(double eta, double phi, float value) const ; + bool veto(double eta, double phi, float value) const override ; //! Nothing to do for this - virtual void centerOn(double eta, double phi) { } + void centerOn(double eta, double phi) override { } //! Picks up the directions of the given candidates - virtual void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) ; + void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) override ; private: edm::EDGetTokenT > src_; @@ -43,17 +43,17 @@ namespace reco { src_(iC.consumes >(candidates)), veto_(veto) { } // Virtual destructor (should always be there) - virtual ~OtherCandVeto() {} + ~OtherCandVeto() override {} //! Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum //! This is true if the deposit is within the stored AbsVeto of any item of the source collection - virtual bool veto(double eta, double phi, float value) const ; + bool veto(double eta, double phi, float value) const override ; //! Nothing to do for this - virtual void centerOn(double eta, double phi) { } + void centerOn(double eta, double phi) override { } //! Picks up the directions of the given candidates - virtual void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) ; + void setEvent(const edm::Event &iEvent, const edm::EventSetup &iSetup) override ; private: edm::EDGetTokenT > src_; @@ -65,7 +65,7 @@ namespace reco { public: //! Create a veto specifying the input collection of the jets, the candidates, and the deltaR OtherJetConstituentsDeltaRVeto(Direction dir, const edm::InputTag& jets, double dRjet, const edm::InputTag& pfCandAssocMap, double dRconstituent, edm::ConsumesCollector& iC) - : evt_(0), + : evt_(nullptr), vetoDir_(dir), srcJets_(iC.consumes(jets)), dR2jet_(dRjet*dRjet), @@ -81,17 +81,17 @@ namespace reco { } // Virtual destructor (should always be there) - virtual ~OtherJetConstituentsDeltaRVeto() {} + ~OtherJetConstituentsDeltaRVeto() override {} //! Return "true" if a deposit at specific (eta,phi) with that value must be vetoed in the sum //! This is true if the deposit is within the stored AbsVeto of any item of the source collection - virtual bool veto(double eta, double phi, float value) const; + bool veto(double eta, double phi, float value) const override; //! Set axis for matching jets - virtual void centerOn(double eta, double phi); + void centerOn(double eta, double phi) override; //! Picks up the directions of the given candidates - virtual void setEvent(const edm::Event& evt, const edm::EventSetup& es); + void setEvent(const edm::Event& evt, const edm::EventSetup& es) override; private: typedef edm::AssociationMap, std::vector, unsigned int> > JetToPFCandidateAssociation; diff --git a/PhysicsTools/IsolationAlgos/interface/IsolationProducer.h b/PhysicsTools/IsolationAlgos/interface/IsolationProducer.h index 3573d6da52fb1..b84db370683c4 100755 --- a/PhysicsTools/IsolationAlgos/interface/IsolationProducer.h +++ b/PhysicsTools/IsolationAlgos/interface/IsolationProducer.h @@ -37,10 +37,10 @@ template srcToken_; edm::EDGetTokenT elementsToken_; Alg alg_; diff --git a/PhysicsTools/IsolationAlgos/interface/IsolationProducerNew.h b/PhysicsTools/IsolationAlgos/interface/IsolationProducerNew.h index c6732c90aedeb..7e7db47a0b4de 100755 --- a/PhysicsTools/IsolationAlgos/interface/IsolationProducerNew.h +++ b/PhysicsTools/IsolationAlgos/interface/IsolationProducerNew.h @@ -40,10 +40,10 @@ namespace reco { class IsolationProducer : public edm::EDProducer { public: IsolationProducer( const edm::ParameterSet & ); - ~IsolationProducer(); + ~IsolationProducer() override; private: - void produce( edm::Event&, const edm::EventSetup& ); + void produce( edm::Event&, const edm::EventSetup& ) override; edm::EDGetTokenT srcToken_; edm::EDGetTokenT elementsToken_; Alg alg_; @@ -74,7 +74,7 @@ namespace reco { ::helper::MasterCollection master(src, evt); auto isolations = std::make_unique(); - if(src->size()!= 0) { + if(!src->empty()) { typename OutputCollection::Filler filler(*isolations); vector iso(master.size(),-1); size_t i = 0; diff --git a/PhysicsTools/IsolationAlgos/plugins/CITKPFIsolationSumProducer.cc b/PhysicsTools/IsolationAlgos/plugins/CITKPFIsolationSumProducer.cc index aa4fdc87841e5..b4c178ebe7036 100644 --- a/PhysicsTools/IsolationAlgos/plugins/CITKPFIsolationSumProducer.cc +++ b/PhysicsTools/IsolationAlgos/plugins/CITKPFIsolationSumProducer.cc @@ -34,12 +34,12 @@ namespace citk { public: PFIsolationSumProducer(const edm::ParameterSet&); - virtual ~PFIsolationSumProducer() {} + ~PFIsolationSumProducer() override {} void beginLuminosityBlock(const edm::LuminosityBlock&, - const edm::EventSetup&) override final; + const edm::EventSetup&) final; - void produce(edm::Event&, const edm::EventSetup&) override final; + void produce(edm::Event&, const edm::EventSetup&) final; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); diff --git a/PhysicsTools/IsolationAlgos/plugins/CITKPFIsolationSumProducerForPUPPI.cc b/PhysicsTools/IsolationAlgos/plugins/CITKPFIsolationSumProducerForPUPPI.cc index b860175a50c37..8055b7f04bd03 100644 --- a/PhysicsTools/IsolationAlgos/plugins/CITKPFIsolationSumProducerForPUPPI.cc +++ b/PhysicsTools/IsolationAlgos/plugins/CITKPFIsolationSumProducerForPUPPI.cc @@ -28,12 +28,12 @@ namespace citk { public: PFIsolationSumProducerForPUPPI(const edm::ParameterSet&); - virtual ~PFIsolationSumProducerForPUPPI() {} + ~PFIsolationSumProducerForPUPPI() override {} - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, - const edm::EventSetup&) override final; + void beginLuminosityBlock(const edm::LuminosityBlock&, + const edm::EventSetup&) final; - virtual void produce(edm::Event&, const edm::EventSetup&) override final; + void produce(edm::Event&, const edm::EventSetup&) final; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); @@ -72,7 +72,7 @@ namespace citk { consumes(c.getParameter("srcToIsolate")); _isolate_with = consumes(c.getParameter("srcForIsolationCone")); - if (c.getParameter("puppiValueMap").label().size() != 0) { + if (!c.getParameter("puppiValueMap").label().empty()) { puppiValueMapToken_ = mayConsume>(c.getParameter("puppiValueMap")); //getting token for puppiValueMap useValueMapForPUPPI = true; } diff --git a/PhysicsTools/IsolationAlgos/plugins/CandIsoDepositProducer.cc b/PhysicsTools/IsolationAlgos/plugins/CandIsoDepositProducer.cc index 831b8f71e287c..62d1f1fee64db 100755 --- a/PhysicsTools/IsolationAlgos/plugins/CandIsoDepositProducer.cc +++ b/PhysicsTools/IsolationAlgos/plugins/CandIsoDepositProducer.cc @@ -35,7 +35,7 @@ CandIsoDepositProducer::CandIsoDepositProducer(const ParameterSet& par) : theCandCollectionToken(consumes< edm::View >(par.getParameter("src"))), theDepositNames(std::vector(1,"")), theMultipleDepositsFlag(par.getParameter("MultipleDepositsFlag")), - theExtractor(0) + theExtractor(nullptr) { LogDebug("PhysicsTools|MuonIsolation")<<" CandIsoDepositProducer CTOR"; @@ -72,13 +72,13 @@ CandIsoDepositProducer::~CandIsoDepositProducer(){ inline const reco::Track * CandIsoDepositProducer::extractTrack(const reco::Candidate &c, reco::Track *dummy) const { if (theTrackType == CandidateT) { - return 0; + return nullptr; } else if (theTrackType == FakeT) { *dummy = Track(10,10,c.vertex(),c.momentum(),c.charge(), reco::Track::CovarianceMatrix()); return dummy; } else { const RecoCandidate *rc = dynamic_cast(&c); - if (rc == 0) throw cms::Exception("Error") << " Candidate is not RecoCandidate: can't get a real track from it!"; + if (rc == nullptr) throw cms::Exception("Error") << " Candidate is not RecoCandidate: can't get a real track from it!"; switch (theTrackType) { case FakeT: break; // to avoid warning case CandidateT: break; // to avoid warning @@ -88,7 +88,7 @@ inline const reco::Track * CandIsoDepositProducer::extractTrack(const reco::Cand case TrackT: return &*rc->track(); break; case GsfT: return static_cast(rc->gsfTrack().get()); break; } - return 0; + return nullptr; } } diff --git a/PhysicsTools/IsolationAlgos/plugins/CandIsoDepositProducer.h b/PhysicsTools/IsolationAlgos/plugins/CandIsoDepositProducer.h index ffd1a830f5736..509a38129a15b 100644 --- a/PhysicsTools/IsolationAlgos/plugins/CandIsoDepositProducer.h +++ b/PhysicsTools/IsolationAlgos/plugins/CandIsoDepositProducer.h @@ -22,9 +22,9 @@ class CandIsoDepositProducer : public edm::stream::EDProducer<> { public: CandIsoDepositProducer(const edm::ParameterSet&); - virtual ~CandIsoDepositProducer(); + ~CandIsoDepositProducer() override; - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: inline const reco::Track *extractTrack(const reco::Candidate &cand, reco::Track *dummyStorage) const; diff --git a/PhysicsTools/IsolationAlgos/plugins/CandIsolatorFromDeposits.cc b/PhysicsTools/IsolationAlgos/plugins/CandIsolatorFromDeposits.cc index 9e20096eb2c82..301735d924ade 100755 --- a/PhysicsTools/IsolationAlgos/plugins/CandIsolatorFromDeposits.cc +++ b/PhysicsTools/IsolationAlgos/plugins/CandIsolatorFromDeposits.cc @@ -121,7 +121,7 @@ CandIsolatorFromDeposits::CandIsolatorFromDeposits(const ParameterSet& par) { for (VPSet::const_iterator it = depPSets.begin(), ed = depPSets.end(); it != ed; ++it) { sources_.push_back(SingleDeposit(*it, consumesCollector())); } - if (sources_.size() == 0) throw cms::Exception("Configuration Error") << "Please specify at least one deposit!"; + if (sources_.empty()) throw cms::Exception("Configuration Error") << "Please specify at least one deposit!"; produces(); } @@ -139,7 +139,7 @@ void CandIsolatorFromDeposits::produce(Event& event, const EventSetup& eventSetu const IsoDepositMap & map = begin->map(); - if (map.size()==0) { // !!??? + if (map.empty()) { // !!??? event.put(std::make_unique()); return; } diff --git a/PhysicsTools/IsolationAlgos/plugins/CandIsolatorFromDeposits.h b/PhysicsTools/IsolationAlgos/plugins/CandIsolatorFromDeposits.h index 7c0d48110b9ef..2b71ff06b75d2 100644 --- a/PhysicsTools/IsolationAlgos/plugins/CandIsolatorFromDeposits.h +++ b/PhysicsTools/IsolationAlgos/plugins/CandIsolatorFromDeposits.h @@ -28,9 +28,9 @@ class CandIsolatorFromDeposits : public edm::stream::EDProducer<> { enum Mode { Sum, SumRelative, Sum2, Sum2Relative, Max, MaxRelative, Count, NearestDR,MeanDR,SumDR }; CandIsolatorFromDeposits(const edm::ParameterSet&); - virtual ~CandIsolatorFromDeposits(); + ~CandIsolatorFromDeposits() override; - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: class SingleDeposit { diff --git a/PhysicsTools/IsolationAlgos/plugins/CandViewExtractor.h b/PhysicsTools/IsolationAlgos/plugins/CandViewExtractor.h index 2263d20c6aeb0..181b842b960e6 100644 --- a/PhysicsTools/IsolationAlgos/plugins/CandViewExtractor.h +++ b/PhysicsTools/IsolationAlgos/plugins/CandViewExtractor.h @@ -23,10 +23,10 @@ class CandViewExtractor : public reco::isodeposit::IsoDepositExtractor { CandViewExtractor(){}; CandViewExtractor(const edm::ParameterSet& par, edm::ConsumesCollector && iC); - virtual ~CandViewExtractor(){} + ~CandViewExtractor() override{} - virtual void fillVetos (const edm::Event & ev, - const edm::EventSetup & evSetup, const reco::TrackCollection & cand) { } + void fillVetos (const edm::Event & ev, + const edm::EventSetup & evSetup, const reco::TrackCollection & cand) override { } /* virtual reco::IsoDeposit::Vetos vetos(const edm::Event & ev, const edm::EventSetup & evSetup, const reco::Candidate & cand) const; @@ -35,15 +35,15 @@ class CandViewExtractor : public reco::isodeposit::IsoDepositExtractor { const edm::EventSetup & evSetup, const reco::Track & cand) const; */ - virtual void initEvent(const edm::Event & ev, const edm::EventSetup & evSetup); + void initEvent(const edm::Event & ev, const edm::EventSetup & evSetup) override; - virtual reco::IsoDeposit deposit (const edm::Event & ev, - const edm::EventSetup & evSetup, const reco::Track & muon) const { + reco::IsoDeposit deposit (const edm::Event & ev, + const edm::EventSetup & evSetup, const reco::Track & muon) const override { return depositFromObject(ev, evSetup, muon); } - virtual reco::IsoDeposit deposit (const edm::Event & ev, - const edm::EventSetup & evSetup, const reco::Candidate & muon) const { + reco::IsoDeposit deposit (const edm::Event & ev, + const edm::EventSetup & evSetup, const reco::Candidate & muon) const override { return depositFromObject(ev, evSetup, muon); } diff --git a/PhysicsTools/IsolationAlgos/plugins/PFTauExtractor.cc b/PhysicsTools/IsolationAlgos/plugins/PFTauExtractor.cc index e44ae06cb19eb..0bedd9fe57286 100644 --- a/PhysicsTools/IsolationAlgos/plugins/PFTauExtractor.cc +++ b/PhysicsTools/IsolationAlgos/plugins/PFTauExtractor.cc @@ -35,18 +35,18 @@ reco::IsoDeposit PFTauExtractor::depositFromObject(const edm::Event& evt, const evt.getByToken(tauSourceToken_, pfTaus); double dR_min = -1.; - const reco::PFTau* pfTau_matched = 0; + const reco::PFTau* pfTau_matched = nullptr; for ( reco::PFTauCollection::const_iterator pfTau = pfTaus->begin(); pfTau != pfTaus->end(); ++pfTau ) { double dR = deltaR(pfTau->eta(), pfTau->phi(), tauCandidate.eta(), tauCandidate.phi()); - if ( pfTau_matched == 0 || dR < dR_min ) { + if ( pfTau_matched == nullptr || dR < dR_min ) { dR_min = dR; pfTau_matched = &(*pfTau); } } //--- compute IsoDeposit for matched PFTau - if ( pfTau_matched != 0 && dR_min < dRmatchPFTau_ ) { + if ( pfTau_matched != nullptr && dR_min < dRmatchPFTau_ ) { edm::Handle > candidates; evt.getByToken(candidateSourceToken_, candidates); diff --git a/PhysicsTools/IsolationAlgos/plugins/PFTauExtractor.h b/PhysicsTools/IsolationAlgos/plugins/PFTauExtractor.h index c2011394a0583..db80e4967b8fa 100644 --- a/PhysicsTools/IsolationAlgos/plugins/PFTauExtractor.h +++ b/PhysicsTools/IsolationAlgos/plugins/PFTauExtractor.h @@ -22,14 +22,14 @@ class PFTauExtractor : public reco::isodeposit::IsoDepositExtractor public: explicit PFTauExtractor(const edm::ParameterSet&, edm::ConsumesCollector && iC); - virtual ~PFTauExtractor(){} + ~PFTauExtractor() override{} /// definition of pure virtual functions inherited from IsoDepositExtractor base-class - virtual void fillVetos(const edm::Event&, const edm::EventSetup&, const reco::TrackCollection&) { } - virtual reco::IsoDeposit deposit(const edm::Event& evt, const edm::EventSetup& es, const reco::Track& track) const { + void fillVetos(const edm::Event&, const edm::EventSetup&, const reco::TrackCollection&) override { } + reco::IsoDeposit deposit(const edm::Event& evt, const edm::EventSetup& es, const reco::Track& track) const override { return depositFromObject(evt, es, track); } - virtual reco::IsoDeposit deposit(const edm::Event& evt, const edm::EventSetup& es, const reco::Candidate& candidate) const { + reco::IsoDeposit deposit(const edm::Event& evt, const edm::EventSetup& es, const reco::Candidate& candidate) const override { return depositFromObject(evt, es, candidate); } diff --git a/PhysicsTools/IsolationAlgos/src/IsoDepositVetoFactory.cc b/PhysicsTools/IsolationAlgos/src/IsoDepositVetoFactory.cc index 5c2d2fca5958f..9ea461df2b69d 100644 --- a/PhysicsTools/IsolationAlgos/src/IsoDepositVetoFactory.cc +++ b/PhysicsTools/IsolationAlgos/src/IsoDepositVetoFactory.cc @@ -12,10 +12,10 @@ namespace reco { namespace isodeposit { // creates SwitchingEcalVeto from another AbsVeto (which becomes owned by this veto) SwitchingEcalVeto(AbsVeto *veto, bool isBarrel) : veto_(veto), barrel_(isBarrel) {} - virtual bool veto(double eta, double phi, float value) const override { + bool veto(double eta, double phi, float value) const override { return (fabs(eta) < 1.479) == (barrel_) ? veto_->veto(eta,phi,value) : false; } - virtual void centerOn(double eta, double phi) override { + void centerOn(double eta, double phi) override { veto_->centerOn(eta,phi); } private: @@ -26,14 +26,14 @@ namespace reco { namespace isodeposit { class NumCrystalVeto : public AbsVeto { public: NumCrystalVeto(Direction dir, double iR) : vetoDir_(dir), iR_(iR) {} - virtual bool veto(double eta, double phi, float value) const override { + bool veto(double eta, double phi, float value) const override { if( fabs(vetoDir_.eta()) < 1.479) { return ( vetoDir_.deltaR(Direction(eta,phi)) < 0.0174*iR_ ); } else { return ( vetoDir_.deltaR(Direction(eta,phi)) < 0.00864*fabs(sinh(eta))*iR_ ); } } - virtual void centerOn(double eta, double phi) override { vetoDir_ = Direction(eta,phi); } + void centerOn(double eta, double phi) override { vetoDir_ = Direction(eta,phi); } private: Direction vetoDir_; float iR_; }; @@ -48,7 +48,7 @@ namespace reco { namespace isodeposit { vetoDir_(dir.eta(),dir.phi()), iEta_(iEta), iPhi_(iPhi) {} - virtual bool veto(double eta, double phi, float value) const override { + bool veto(double eta, double phi, float value) const override { double dPhi = phi - vetoDir_.phi(); double dEta = eta - vetoDir_.eta(); while( dPhi < -M_PI ) dPhi += 2*M_PI; @@ -60,7 +60,7 @@ namespace reco { namespace isodeposit { (fabs(dPhi) < 0.00864*fabs(sinh(eta))*iPhi_) ); } } - virtual void centerOn(double eta, double phi) override { vetoDir_ = Direction(eta,phi); } + void centerOn(double eta, double phi) override { vetoDir_ = Direction(eta,phi); } private: Direction vetoDir_; double iEta_, iPhi_; @@ -71,9 +71,9 @@ namespace reco { namespace isodeposit { // ---------- THEN THE ACTUAL FACTORY CODE ------------ reco::isodeposit::AbsVeto * IsoDepositVetoFactory::make(const char *string, edm::ConsumesCollector& iC) { - reco::isodeposit::EventDependentAbsVeto * evdep = 0; + reco::isodeposit::EventDependentAbsVeto * evdep = nullptr; std::unique_ptr ret(make(string,evdep, iC)); - if (evdep != 0) { + if (evdep != nullptr) { throw cms::Exception("Configuration") << "The resulting AbsVeto depends on the edm::Event.\n" << "Please use the two-arguments IsoDepositVetoFactory::make.\n"; } @@ -104,7 +104,7 @@ IsoDepositVetoFactory::make(const char *string, reco::isodeposit::EventDependent //std::cout << ":" << std::endl; //std::cout << " string = " << string << std::endl; - evdep = 0; // by default it does not depend on this + evdep = nullptr; // by default it does not depend on this if (regex_match(string, match, ecalSwitch)) { return new SwitchingEcalVeto(make(match[2].first, iC), (match[1] == "Barrel") ); } else if (regex_match(string, match, threshold)) { diff --git a/PhysicsTools/IsolationUtils/interface/ConeAreaFunction.h b/PhysicsTools/IsolationUtils/interface/ConeAreaFunction.h index 1894a48409140..d14886d0b8505 100644 --- a/PhysicsTools/IsolationUtils/interface/ConeAreaFunction.h +++ b/PhysicsTools/IsolationUtils/interface/ConeAreaFunction.h @@ -35,7 +35,7 @@ class ConeAreaFunction : public ROOT::Math::ParamFunction { typedef reco::JetFloatAssociation::Container JetChargeCollection; explicit JetChargeProducer(const edm::ParameterSet &cfg) ; - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; private: const edm::EDGetTokenT srcToken_; const JetCharge algo_; diff --git a/PhysicsTools/JetMCAlgos/interface/Herwig6PartonSelector.h b/PhysicsTools/JetMCAlgos/interface/Herwig6PartonSelector.h index 0dc641ac5daee..fa530ff9e6c29 100644 --- a/PhysicsTools/JetMCAlgos/interface/Herwig6PartonSelector.h +++ b/PhysicsTools/JetMCAlgos/interface/Herwig6PartonSelector.h @@ -12,10 +12,10 @@ class Herwig6PartonSelector : public BasePartonSelector { public: Herwig6PartonSelector(); - virtual ~Herwig6PartonSelector(); + ~Herwig6PartonSelector() override; void run(const edm::Handle & particles, - std::unique_ptr & partons); + std::unique_ptr & partons) override; }; #endif diff --git a/PhysicsTools/JetMCAlgos/interface/HerwigppPartonSelector.h b/PhysicsTools/JetMCAlgos/interface/HerwigppPartonSelector.h index a722cef3e0a33..9d0f95597813f 100644 --- a/PhysicsTools/JetMCAlgos/interface/HerwigppPartonSelector.h +++ b/PhysicsTools/JetMCAlgos/interface/HerwigppPartonSelector.h @@ -12,10 +12,10 @@ class HerwigppPartonSelector : public BasePartonSelector { public: HerwigppPartonSelector(); - virtual ~HerwigppPartonSelector(); + ~HerwigppPartonSelector() override; void run(const edm::Handle & particles, - std::unique_ptr & partons); + std::unique_ptr & partons) override; }; #endif diff --git a/PhysicsTools/JetMCAlgos/interface/Pythia6PartonSelector.h b/PhysicsTools/JetMCAlgos/interface/Pythia6PartonSelector.h index 7150108cd5c98..27e9cc267a285 100644 --- a/PhysicsTools/JetMCAlgos/interface/Pythia6PartonSelector.h +++ b/PhysicsTools/JetMCAlgos/interface/Pythia6PartonSelector.h @@ -12,10 +12,10 @@ class Pythia6PartonSelector : public BasePartonSelector { public: Pythia6PartonSelector(); - virtual ~Pythia6PartonSelector(); + ~Pythia6PartonSelector() override; void run(const edm::Handle & particles, - std::unique_ptr & partons); + std::unique_ptr & partons) override; }; #endif diff --git a/PhysicsTools/JetMCAlgos/interface/Pythia8PartonSelector.h b/PhysicsTools/JetMCAlgos/interface/Pythia8PartonSelector.h index 5fccc69b9923f..f982898f55975 100644 --- a/PhysicsTools/JetMCAlgos/interface/Pythia8PartonSelector.h +++ b/PhysicsTools/JetMCAlgos/interface/Pythia8PartonSelector.h @@ -12,10 +12,10 @@ class Pythia8PartonSelector : public BasePartonSelector { public: Pythia8PartonSelector(); - virtual ~Pythia8PartonSelector(); + ~Pythia8PartonSelector() override; void run(const edm::Handle & particles, - std::unique_ptr & partons); + std::unique_ptr & partons) override; }; #endif diff --git a/PhysicsTools/JetMCAlgos/interface/SherpaPartonSelector.h b/PhysicsTools/JetMCAlgos/interface/SherpaPartonSelector.h index 2317b336a4f96..98aeb5a7f3166 100644 --- a/PhysicsTools/JetMCAlgos/interface/SherpaPartonSelector.h +++ b/PhysicsTools/JetMCAlgos/interface/SherpaPartonSelector.h @@ -12,10 +12,10 @@ class SherpaPartonSelector : public BasePartonSelector { public: SherpaPartonSelector(); - virtual ~SherpaPartonSelector(); + ~SherpaPartonSelector() override; void run(const edm::Handle & particles, - std::unique_ptr & partons); + std::unique_ptr & partons) override; }; #endif diff --git a/PhysicsTools/JetMCAlgos/plugins/CandOneToManyDeltaRMatcher.cc b/PhysicsTools/JetMCAlgos/plugins/CandOneToManyDeltaRMatcher.cc index 3410ab0594d53..2a9d530438f40 100644 --- a/PhysicsTools/JetMCAlgos/plugins/CandOneToManyDeltaRMatcher.cc +++ b/PhysicsTools/JetMCAlgos/plugins/CandOneToManyDeltaRMatcher.cc @@ -19,7 +19,7 @@ class CandOneToManyDeltaRMatcher : public edm::global::EDProducer<> { public: CandOneToManyDeltaRMatcher( const edm::ParameterSet & ); - ~CandOneToManyDeltaRMatcher(); + ~CandOneToManyDeltaRMatcher() override; private: void produce( edm::StreamID, edm::Event&, const edm::EventSetup& ) const override; @@ -104,7 +104,7 @@ void CandOneToManyDeltaRMatcher::produce( edm::StreamID, Event& evt, const Event double dist = DeltaR( src.p4() , match.p4() ); v.push_back( make_pair( m, dist ) ); } - if ( v.size() > 0 ) { + if ( !v.empty() ) { sort( v.begin(), v.end(), reco::helper::SortBySecond() ); for( size_t m = 0; m != v.size(); ++ m ) { if (printdebug_) cout << "[CandOneToManyDeltaRMatcher] match (Et,Eta,Phi) =(" << ( * matched )[ v[m].first ].et() << "," << diff --git a/PhysicsTools/JetMCAlgos/plugins/CandOneToOneDeltaRMatcher.cc b/PhysicsTools/JetMCAlgos/plugins/CandOneToOneDeltaRMatcher.cc index 282978ce0887b..06d7570aa8145 100644 --- a/PhysicsTools/JetMCAlgos/plugins/CandOneToOneDeltaRMatcher.cc +++ b/PhysicsTools/JetMCAlgos/plugins/CandOneToOneDeltaRMatcher.cc @@ -18,7 +18,7 @@ class CandOneToOneDeltaRMatcher : public edm::EDProducer { public: CandOneToOneDeltaRMatcher( const edm::ParameterSet & ); - ~CandOneToOneDeltaRMatcher(); + ~CandOneToOneDeltaRMatcher() override; private: void produce( edm::Event&, const edm::EventSetup& ) override; double lenght( const std::vector& ); diff --git a/PhysicsTools/JetMCAlgos/plugins/GenHFHadronMatcher.cc b/PhysicsTools/JetMCAlgos/plugins/GenHFHadronMatcher.cc index 349f7f130a7c4..d9760defec01a 100644 --- a/PhysicsTools/JetMCAlgos/plugins/GenHFHadronMatcher.cc +++ b/PhysicsTools/JetMCAlgos/plugins/GenHFHadronMatcher.cc @@ -59,12 +59,12 @@ class GenHFHadronMatcher : public edm::EDProducer { public: explicit GenHFHadronMatcher ( const edm::ParameterSet& ); - ~GenHFHadronMatcher(); + ~GenHFHadronMatcher() override; static void fillDescriptions ( edm::ConfigurationDescriptions& descriptions ); private: - virtual void produce( edm::Event&, const edm::EventSetup& ); + void produce( edm::Event&, const edm::EventSetup& ) override; std::vector findHadronJets( const reco::GenParticleCollection* genParticles, const reco::JetFlavourInfoMatchingCollection* jetFlavourInfos, std::vector &hadIndex, std::vector &hadMothersGenPart, @@ -274,7 +274,7 @@ std::vector GenHFHadronMatcher::findHadronJets ( const reco::GenParticleCol if(!isHadron ( flavour_, (&**hadron) )) continue; if(hasHadronDaughter ( flavour_, (reco::Candidate*)(&**hadron) )) continue; // Scanning the chain starting from the hadron - int hadronIndex = analyzeMothers ( (reco::Candidate*)(&**hadron), topDaughterQId, topBarDaughterQId, hadMothersCand, hadMothersIndices, 0, -1 ); + int hadronIndex = analyzeMothers ( (reco::Candidate*)(&**hadron), topDaughterQId, topBarDaughterQId, hadMothersCand, hadMothersIndices, nullptr, -1 ); // Storing the index of the hadron to the list hadIndex.push_back ( hadronIndex ); hadJetIndex.push_back ( jetIndex ); // Putting jet index to the result list @@ -290,7 +290,7 @@ std::vector GenHFHadronMatcher::findHadronJets ( const reco::GenParticleCol if(std::find(hadMothersCand.begin(), hadMothersCand.end(), thisParticle) != hadMothersCand.end()) continue; // Scanning the chain starting from the hadron - int hadronIndex = analyzeMothers ( thisParticle, topDaughterQId, topBarDaughterQId, hadMothersCand, hadMothersIndices, 0, -1 ); + int hadronIndex = analyzeMothers ( thisParticle, topDaughterQId, topBarDaughterQId, hadMothersCand, hadMothersIndices, nullptr, -1 ); // Storing the index of the hadron to the list hadIndex.push_back ( hadronIndex ); hadJetIndex.push_back ( -1 ); // Jet index undefined @@ -314,7 +314,7 @@ std::vector GenHFHadronMatcher::findHadronJets ( const reco::GenParticleCol if(!leptonMother) continue; // Taking next mother if direct mother is a tau if(std::abs(leptonMother->pdgId()) == 15) { - leptonViaTau = 1; + leptonViaTau = true; leptonMother = leptonMother->mother(); } // Skipping this lepton if its mother is not a proper hadron @@ -405,7 +405,7 @@ std::vector GenHFHadronMatcher::findHadronJets ( const reco::GenParticleCol LastQuarkMotherIds.push_back ( LastQuarkMotherId ); - if(LastQuarkMotherId.size()<1) { + if(LastQuarkMotherId.empty()) { hadronFlavour = 0; } else { int qIdx = LastQuarkId.at( lastQuarkIndices.at(hadNum) ); @@ -432,7 +432,7 @@ std::vector GenHFHadronMatcher::findHadronJets ( const reco::GenParticleCol hadBHadronId.push_back(bHadronMotherId); - if(LastQuarkMotherId.size()>0) { + if(!LastQuarkMotherId.empty()) { std::set checkedHadronIds; fixExtraSameFlavours(hadNum, hadIndex, hadMothers, hadMothersIndices, hadFromTopWeakDecay, LastQuarkIds, LastQuarkMotherIds, lastQuarkIndices, hadFlavour, checkedHadronIds, 0); } diff --git a/PhysicsTools/JetMCAlgos/plugins/GenJetBCEnergyRatio.cc b/PhysicsTools/JetMCAlgos/plugins/GenJetBCEnergyRatio.cc index 77a8a560fc0f0..dd80740bb6e9f 100644 --- a/PhysicsTools/JetMCAlgos/plugins/GenJetBCEnergyRatio.cc +++ b/PhysicsTools/JetMCAlgos/plugins/GenJetBCEnergyRatio.cc @@ -52,12 +52,12 @@ class GenJetBCEnergyRatio : public edm::global::EDProducer<> { public: GenJetBCEnergyRatio( const edm::ParameterSet & ); - ~GenJetBCEnergyRatio(); + ~GenJetBCEnergyRatio() override; typedef reco::JetFloatAssociation::Container JetBCEnergyRatioCollection; private: - virtual void produce(StreamID, edm::Event&, const edm::EventSetup& ) const override; + void produce(StreamID, edm::Event&, const edm::EventSetup& ) const override; edm::EDGetTokenT< View > m_genjetsSrcToken; }; @@ -89,7 +89,7 @@ void GenJetBCEnergyRatio::produce( StreamID, Event& iEvent, const EventSetup& iE JetBCEnergyRatioCollection * jtc1; JetBCEnergyRatioCollection * jtc2; - if (genjets.product()->size() > 0) { + if (!genjets.product()->empty()) { const JetRef jj = genjets->refAt(0); jtc1 = new JetBCEnergyRatioCollection(edm::makeRefToBaseProdFrom(jj, iEvent)); jtc2 = new JetBCEnergyRatioCollection(edm::makeRefToBaseProdFrom(jj, iEvent)); diff --git a/PhysicsTools/JetMCAlgos/plugins/HadronAndPartonSelector.cc b/PhysicsTools/JetMCAlgos/plugins/HadronAndPartonSelector.cc index a4e853e67e3ad..2a5e082b16c6d 100644 --- a/PhysicsTools/JetMCAlgos/plugins/HadronAndPartonSelector.cc +++ b/PhysicsTools/JetMCAlgos/plugins/HadronAndPartonSelector.cc @@ -79,12 +79,12 @@ typedef boost::shared_ptr PartonSelectorPtr; class HadronAndPartonSelector : public edm::stream::EDProducer<> { public: explicit HadronAndPartonSelector(const edm::ParameterSet&); - ~HadronAndPartonSelector(); + ~HadronAndPartonSelector() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- const edm::EDGetTokenT srcToken_; // To get handronizer module type diff --git a/PhysicsTools/JetMCAlgos/plugins/JetFlavourClustering.cc b/PhysicsTools/JetMCAlgos/plugins/JetFlavourClustering.cc index 4c29427798630..9fa707813efbc 100644 --- a/PhysicsTools/JetMCAlgos/plugins/JetFlavourClustering.cc +++ b/PhysicsTools/JetMCAlgos/plugins/JetFlavourClustering.cc @@ -141,12 +141,12 @@ class GhostInfo : public fastjet::PseudoJet::UserInfoBase{ class JetFlavourClustering : public edm::stream::EDProducer<> { public: explicit JetFlavourClustering(const edm::ParameterSet&); - ~JetFlavourClustering(); + ~JetFlavourClustering() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; void insertGhosts(const edm::Handle& particles, const double ghostRescaling, @@ -375,7 +375,7 @@ JetFlavourClustering::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) (*jetFlavourInfos)[jets->refAt(i)] = reco::JetFlavourInfo(clusteredbHadrons, clusteredcHadrons, clusteredPartons, clusteredLeptons, 0, 0); // if subjets are used - if( useSubjets_ && subjetIndices.at(i).size()>0 ) + if( useSubjets_ && !subjetIndices.at(i).empty() ) { // loop over subjets for(size_t sj=0; sj assignedbHadrons(subjetIndices.at(i).size(),reco::GenParticleRefVector()); @@ -622,7 +622,7 @@ JetFlavourClustering::matchSubjets(const std::vector& groomedIndices, } } - if( subjetIndices.size() == 0 ) + if( subjetIndices.empty() ) edm::LogError("SubjetMatchingFailed") << "Matching subjets to original jets failed. Please check that the groomed jet and subjet collections belong to each other."; matchedIndices.push_back(subjetIndices); @@ -670,9 +670,9 @@ JetFlavourClustering::setFlavours(const reco::GenParticleRefVector& clusteredbHa } // set hadron-based flavour - if( clusteredbHadrons.size()>0 ) + if( !clusteredbHadrons.empty() ) hadronFlavour = 5; - else if( clusteredcHadrons.size()>0 && clusteredbHadrons.size()==0 ) + else if( !clusteredcHadrons.empty() && clusteredbHadrons.empty() ) hadronFlavour = 4; // set parton-based flavour if( flavourParton.isNull() ) diff --git a/PhysicsTools/JetMCAlgos/plugins/JetFlavourIdentifier.cc b/PhysicsTools/JetMCAlgos/plugins/JetFlavourIdentifier.cc index bf47980aa020f..0af1c2f8ad3a8 100644 --- a/PhysicsTools/JetMCAlgos/plugins/JetFlavourIdentifier.cc +++ b/PhysicsTools/JetMCAlgos/plugins/JetFlavourIdentifier.cc @@ -91,10 +91,10 @@ class JetFlavourIdentifier : public edm::global::EDProducer<> NULL_DEF}; JetFlavourIdentifier( const edm::ParameterSet & ); - ~JetFlavourIdentifier(); + ~JetFlavourIdentifier() override; private: - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup& ) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup& ) const override; JetFlavour::Leptons findLeptons(const GenParticleRef &) const; std::vector findCandidates(const reco::Candidate*, int, math::XYZTLorentzVector const& thePartonLV) const; @@ -171,7 +171,7 @@ void JetFlavourIdentifier::produce( StreamID, Event& iEvent, const EventSetup& i // get the partons based on which definition to use. switch (definition) { case PHYSICS: { - const GenParticleRef aPartPhy = aMatch.physicsDefinitionParton(); + const GenParticleRef& aPartPhy = aMatch.physicsDefinitionParton(); if (aPartPhy.isNonnull()) { thePartonLorentzVector = aPartPhy.get()->p4(); thePartonVertex = aPartPhy.get()->vertex(); @@ -181,7 +181,7 @@ void JetFlavourIdentifier::produce( StreamID, Event& iEvent, const EventSetup& i break; } case ALGO: { - const GenParticleRef aPartAlg = aMatch.algoDefinitionParton(); + const GenParticleRef& aPartAlg = aMatch.algoDefinitionParton(); if (aPartAlg.isNonnull()) { thePartonLorentzVector = aPartAlg.get()->p4(); thePartonVertex = aPartAlg.get()->vertex(); @@ -191,7 +191,7 @@ void JetFlavourIdentifier::produce( StreamID, Event& iEvent, const EventSetup& i break; } case NEAREST_STATUS2 : { - const GenParticleRef aPartN2 = aMatch.nearest_status2(); + const GenParticleRef& aPartN2 = aMatch.nearest_status2(); if (aPartN2.isNonnull()) { thePartonLorentzVector = aPartN2.get()->p4(); thePartonVertex = aPartN2.get()->vertex(); @@ -201,7 +201,7 @@ void JetFlavourIdentifier::produce( StreamID, Event& iEvent, const EventSetup& i break; } case NEAREST_STATUS3: { - const GenParticleRef aPartN3 = aMatch.nearest_status3(); + const GenParticleRef& aPartN3 = aMatch.nearest_status3(); if (aPartN3.isNonnull()) { thePartonLorentzVector = aPartN3.get()->p4(); thePartonVertex = aPartN3.get()->vertex(); @@ -223,7 +223,7 @@ void JetFlavourIdentifier::produce( StreamID, Event& iEvent, const EventSetup& i // Default case is backwards-compatible default:{ if (physDefinition) { - const GenParticleRef aPartPhy = aMatch.physicsDefinitionParton(); + const GenParticleRef& aPartPhy = aMatch.physicsDefinitionParton(); if (aPartPhy.isNonnull()) { thePartonLorentzVector = aPartPhy.get()->p4(); thePartonVertex = aPartPhy.get()->vertex(); @@ -231,7 +231,7 @@ void JetFlavourIdentifier::produce( StreamID, Event& iEvent, const EventSetup& i if (leptonInfo_) theLeptons = findLeptons(aPartPhy); } } else { - const GenParticleRef aPartAlg = aMatch.algoDefinitionParton(); + const GenParticleRef& aPartAlg = aMatch.algoDefinitionParton(); if (aPartAlg.isNonnull()) { thePartonLorentzVector = aPartAlg.get()->p4(); thePartonVertex = aPartAlg.get()->vertex(); @@ -247,7 +247,7 @@ void JetFlavourIdentifier::produce( StreamID, Event& iEvent, const EventSetup& i if (thePartonFlavour == 0) { if (physDefinition) { - const GenParticleRef aPartPhy = aMatch.physicsDefinitionParton(); + const GenParticleRef& aPartPhy = aMatch.physicsDefinitionParton(); if (aPartPhy.isNonnull()) { thePartonLorentzVector = aPartPhy.get()->p4(); thePartonVertex = aPartPhy.get()->vertex(); @@ -255,7 +255,7 @@ void JetFlavourIdentifier::produce( StreamID, Event& iEvent, const EventSetup& i if (leptonInfo_) theLeptons = findLeptons(aPartPhy); } } else { - const GenParticleRef aPartAlg = aMatch.algoDefinitionParton(); + const GenParticleRef& aPartAlg = aMatch.algoDefinitionParton(); if (aPartAlg.isNonnull()) { thePartonLorentzVector = aPartAlg.get()->p4(); thePartonVertex = aPartAlg.get()->vertex(); diff --git a/PhysicsTools/JetMCAlgos/plugins/PartonSelector.cc b/PhysicsTools/JetMCAlgos/plugins/PartonSelector.cc index 4173292dc9b74..e80bf726b4575 100644 --- a/PhysicsTools/JetMCAlgos/plugins/PartonSelector.cc +++ b/PhysicsTools/JetMCAlgos/plugins/PartonSelector.cc @@ -37,11 +37,11 @@ class PartonSelector : public edm::global::EDProducer<> { public: PartonSelector( const edm::ParameterSet & ); - ~PartonSelector(); + ~PartonSelector() override; private: - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup& ) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup& ) const override; bool withLeptons; // Optionally specify leptons bool withTop; // Optionally include top quarks in the list bool acceptNoDaughters; // Parton with zero daugthers are not considered by default, make it configurable diff --git a/PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.cc b/PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.cc index 44270c6425bf0..2d899a16d0666 100644 --- a/PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.cc +++ b/PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.cc @@ -62,7 +62,7 @@ void TauGenJetProducer::produce(edm::StreamID, Event& iEvent, // --> have a status 2 tau lepton in the list of descendents GenParticleRefVector status2TauDaughters; findDescendents( *iTau, status2TauDaughters, 2, 15 ); - if ( status2TauDaughters.size() > 0 ) continue; + if ( !status2TauDaughters.empty() ) continue; // loop on descendents, and take all except neutrinos math::XYZTLorentzVector sumVisMom; diff --git a/PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.h b/PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.h index 588ce994ce1d8..074fc31963557 100644 --- a/PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.h +++ b/PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.h @@ -27,9 +27,9 @@ class TauGenJetProducer : public edm::global::EDProducer<> { explicit TauGenJetProducer(const edm::ParameterSet&); - ~TauGenJetProducer(); + ~TauGenJetProducer() override; - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; private: diff --git a/PhysicsTools/KinFitter/interface/TAbsFitConstraint.h b/PhysicsTools/KinFitter/interface/TAbsFitConstraint.h index 818b2fe1d3aa3..de2cb04588e86 100644 --- a/PhysicsTools/KinFitter/interface/TAbsFitConstraint.h +++ b/PhysicsTools/KinFitter/interface/TAbsFitConstraint.h @@ -13,7 +13,7 @@ public : TAbsFitConstraint(); TAbsFitConstraint(const TString &name, const TString &title); - virtual ~TAbsFitConstraint(); + ~TAbsFitConstraint() override; // returns derivative df/dP with P=(p,E) and f the constraint f=0. // The matrix contains one row (df/dp, df/dE). @@ -24,7 +24,7 @@ public : // new --- additional parameters Int_t getNPar() { return _nPar; } - virtual TMatrixD* getDerivativeAlpha() { return 0; } + virtual TMatrixD* getDerivativeAlpha() { return nullptr; } virtual const TMatrixD* getCovMatrix() const { return &_covMatrix; } virtual void setCovMatrix(const TMatrixD* theCovMatrix); diff --git a/PhysicsTools/KinFitter/interface/TAbsFitParticle.h b/PhysicsTools/KinFitter/interface/TAbsFitParticle.h index ff7ddb732c5c3..2bafd65c5ac85 100644 --- a/PhysicsTools/KinFitter/interface/TAbsFitParticle.h +++ b/PhysicsTools/KinFitter/interface/TAbsFitParticle.h @@ -12,7 +12,7 @@ public : TAbsFitParticle(); TAbsFitParticle(const TString &name, const TString &title); - virtual ~TAbsFitParticle(); + ~TAbsFitParticle() override; virtual TAbsFitParticle* clone( const TString& newname = "" ) const = 0; // returns derivative dP/dy with P=(p,E) and y=(par1, par2, par3, ...) diff --git a/PhysicsTools/KinFitter/interface/TFitConstraintEp.h b/PhysicsTools/KinFitter/interface/TFitConstraintEp.h index acc69b4e756ea..8b979de5d1948 100644 --- a/PhysicsTools/KinFitter/interface/TFitConstraintEp.h +++ b/PhysicsTools/KinFitter/interface/TFitConstraintEp.h @@ -31,22 +31,22 @@ public : std::vector* particles, TFitConstraintEp::component thecomponent, Double_t constraint = 0.); - virtual ~TFitConstraintEp(); + ~TFitConstraintEp() override; void addParticle( TAbsFitParticle* particle ); - void addParticles( TAbsFitParticle* p1, TAbsFitParticle* p2 = 0, TAbsFitParticle* p3 = 0, TAbsFitParticle* p4 = 0, - TAbsFitParticle* p5 = 0, TAbsFitParticle* p6 = 0, TAbsFitParticle* p7 = 0, TAbsFitParticle* p8 = 0, - TAbsFitParticle* p9 = 0, TAbsFitParticle* p10 = 0); + void addParticles( TAbsFitParticle* p1, TAbsFitParticle* p2 = nullptr, TAbsFitParticle* p3 = nullptr, TAbsFitParticle* p4 = nullptr, + TAbsFitParticle* p5 = nullptr, TAbsFitParticle* p6 = nullptr, TAbsFitParticle* p7 = nullptr, TAbsFitParticle* p8 = nullptr, + TAbsFitParticle* p9 = nullptr, TAbsFitParticle* p10 = nullptr); void setConstraint(Double_t constraint){_constraint = constraint;}; // returns derivative df/dP with P=(p,E) and f the constraint f=0. // The matrix contains one row (df/dp, df/dE). - virtual TMatrixD* getDerivative( TAbsFitParticle* particle ); - virtual Double_t getInitValue(); - virtual Double_t getCurrentValue(); + TMatrixD* getDerivative( TAbsFitParticle* particle ) override; + Double_t getInitValue() override; + Double_t getCurrentValue() override; - virtual TString getInfoString(); - virtual void print(); + TString getInfoString() override; + void print() override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitConstraintM.h b/PhysicsTools/KinFitter/interface/TFitConstraintM.h index ebc13480c2377..778f5e98ac865 100644 --- a/PhysicsTools/KinFitter/interface/TFitConstraintM.h +++ b/PhysicsTools/KinFitter/interface/TFitConstraintM.h @@ -21,29 +21,29 @@ public : std::vector* ParList2, Double_t Mass = 0); - virtual ~TFitConstraintM(); + ~TFitConstraintM() override; void addParticle1( TAbsFitParticle* particle ); void addParticle2( TAbsFitParticle* particle ); - void addParticles1( TAbsFitParticle* p1, TAbsFitParticle* p2 = 0, TAbsFitParticle* p3 = 0, TAbsFitParticle* p4 = 0, - TAbsFitParticle* p5 = 0, TAbsFitParticle* p6 = 0, TAbsFitParticle* p7 = 0, TAbsFitParticle* p8 = 0, - TAbsFitParticle* p9 = 0, TAbsFitParticle* p10 = 0); - void addParticles2( TAbsFitParticle* p1, TAbsFitParticle* p2 = 0, TAbsFitParticle* p3 = 0, TAbsFitParticle* p4 = 0, - TAbsFitParticle* p5 = 0, TAbsFitParticle* p6 = 0, TAbsFitParticle* p7 = 0, TAbsFitParticle* p8 = 0, - TAbsFitParticle* p9 = 0, TAbsFitParticle* p10 = 0); + void addParticles1( TAbsFitParticle* p1, TAbsFitParticle* p2 = nullptr, TAbsFitParticle* p3 = nullptr, TAbsFitParticle* p4 = nullptr, + TAbsFitParticle* p5 = nullptr, TAbsFitParticle* p6 = nullptr, TAbsFitParticle* p7 = nullptr, TAbsFitParticle* p8 = nullptr, + TAbsFitParticle* p9 = nullptr, TAbsFitParticle* p10 = nullptr); + void addParticles2( TAbsFitParticle* p1, TAbsFitParticle* p2 = nullptr, TAbsFitParticle* p3 = nullptr, TAbsFitParticle* p4 = nullptr, + TAbsFitParticle* p5 = nullptr, TAbsFitParticle* p6 = nullptr, TAbsFitParticle* p7 = nullptr, TAbsFitParticle* p8 = nullptr, + TAbsFitParticle* p9 = nullptr, TAbsFitParticle* p10 = nullptr); void setMassConstraint(Double_t Mass) { _TheMassConstraint = Mass; } // returns derivative df/dP with P=(p,E) and f the constraint f=0 for // one particle. The matrix contains one row (df/dp, df/dE). - virtual TMatrixD* getDerivative( TAbsFitParticle* particle ); - virtual Double_t getInitValue(); - virtual Double_t getCurrentValue(); + TMatrixD* getDerivative( TAbsFitParticle* particle ) override; + Double_t getInitValue() override; + Double_t getCurrentValue() override; Bool_t OnList(std::vector* List, TAbsFitParticle* particle); Double_t CalcMass(std::vector* List, Bool_t IniVal); - virtual TString getInfoString(); - virtual void print(); + TString getInfoString() override; + void print() override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitConstraintMGaus.h b/PhysicsTools/KinFitter/interface/TFitConstraintMGaus.h index c441f2af5595d..34ad0c61f27a2 100644 --- a/PhysicsTools/KinFitter/interface/TFitConstraintMGaus.h +++ b/PhysicsTools/KinFitter/interface/TFitConstraintMGaus.h @@ -20,16 +20,16 @@ public : std::vector* ParList2, Double_t Mass = 0, Double_t Width = 0); - virtual ~TFitConstraintMGaus(); + ~TFitConstraintMGaus() override; - virtual Double_t getInitValue(); - virtual Double_t getCurrentValue(); - virtual TMatrixD* getDerivativeAlpha(); + Double_t getInitValue() override; + Double_t getCurrentValue() override; + TMatrixD* getDerivativeAlpha() override; void setMassConstraint(Double_t Mass, Double_t Width); - virtual TString getInfoString(); - virtual void print(); + TString getInfoString() override; + void print() override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleCart.h b/PhysicsTools/KinFitter/interface/TFitParticleCart.h index c961a156801ff..0bf9af349169b 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleCart.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleCart.h @@ -17,16 +17,16 @@ public : TFitParticleCart(const TString &name, const TString &title, TLorentzVector* pini, const TMatrixD* theCovMatrix); - virtual ~TFitParticleCart(); - virtual TAbsFitParticle* clone( const TString& newname = TString("") ) const; + ~TFitParticleCart() override; + TAbsFitParticle* clone( const TString& newname = TString("") ) const override; // returns derivative dP/dy with P=(p,E) and y=(r, theta, phi, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dr, dP/dtheta, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleECart.h b/PhysicsTools/KinFitter/interface/TFitParticleECart.h index 88ca806225b87..b5828a7407983 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleECart.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleECart.h @@ -17,16 +17,16 @@ public : TFitParticleECart(const TString &name, const TString &title, TLorentzVector* pini, const TMatrixD* theCovMatrix); - virtual ~TFitParticleECart(); - virtual TAbsFitParticle* clone( const TString& newname = TString("") ) const; + ~TFitParticleECart() override; + TAbsFitParticle* clone( const TString& newname = TString("") ) const override; // returns derivative dP/dy with P=(p,E) and y=(r, theta, phi, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dr, dP/dtheta, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleEMomDev.h b/PhysicsTools/KinFitter/interface/TFitParticleEMomDev.h index 60e795e133fa1..4a43902a93d03 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleEMomDev.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleEMomDev.h @@ -19,16 +19,16 @@ public : TFitParticleEMomDev(const TString &name, const TString &title, TLorentzVector* pini, const TMatrixD* theCovMatrix); - virtual ~TFitParticleEMomDev(); - virtual TAbsFitParticle* clone( const TString& newname = "" ) const; + ~TFitParticleEMomDev() override; + TAbsFitParticle* clone( const TString& newname = "" ) const override; // returns derivative dP/dy with P=(p,E) and y=(par1, par2, par3, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dpar1, dP/dpar2, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleEScaledMomDev.h b/PhysicsTools/KinFitter/interface/TFitParticleEScaledMomDev.h index cc35eda1d993c..dcea16e8deb46 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleEScaledMomDev.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleEScaledMomDev.h @@ -15,16 +15,16 @@ public : TFitParticleEScaledMomDev(TLorentzVector* pini, const TMatrixD* theCovMatrix); TFitParticleEScaledMomDev(const TString &name, const TString &title, TLorentzVector* pini, const TMatrixD* theCovMatrix); - virtual ~TFitParticleEScaledMomDev(); - virtual TAbsFitParticle* clone( const TString& newname = "" ) const; + ~TFitParticleEScaledMomDev() override; + TAbsFitParticle* clone( const TString& newname = "" ) const override; // returns derivative dP/dy with P=(p,E) and y=(r, theta, phi, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dr, dP/dtheta, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleESpher.h b/PhysicsTools/KinFitter/interface/TFitParticleESpher.h index bcbbc104c199b..f3698f9b664d7 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleESpher.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleESpher.h @@ -17,16 +17,16 @@ public : TFitParticleESpher(const TString &name, const TString &title, TLorentzVector* pini, const TMatrixD* theCovMatrix); - virtual ~TFitParticleESpher(); - virtual TAbsFitParticle* clone( const TString& newname = TString("") ) const; + ~TFitParticleESpher() override; + TAbsFitParticle* clone( const TString& newname = TString("") ) const override; // returns derivative dP/dy with P=(p,E) and y=(r, theta, phi, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dr, dP/dtheta, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleEtEtaPhi.h b/PhysicsTools/KinFitter/interface/TFitParticleEtEtaPhi.h index 8d184c89514eb..a9d0c14f90b46 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleEtEtaPhi.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleEtEtaPhi.h @@ -17,16 +17,16 @@ public : TFitParticleEtEtaPhi(const TString &name, const TString &title, TLorentzVector* pini, const TMatrixD* theCovMatrix); - virtual ~TFitParticleEtEtaPhi(); - virtual TAbsFitParticle* clone( const TString& newname = "" ) const; + ~TFitParticleEtEtaPhi() override; + TAbsFitParticle* clone( const TString& newname = "" ) const override; // returns derivative dP/dy with P=(p,E) and y=(et, eta, phi) // the free parameters of the fit. The columns of the matrix contain // (dP/d(et), dP/d(eta), dP/d(phi)). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleEtThetaPhi.h b/PhysicsTools/KinFitter/interface/TFitParticleEtThetaPhi.h index bda2fe03bb76e..5916d985c81ac 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleEtThetaPhi.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleEtThetaPhi.h @@ -17,16 +17,16 @@ public : TFitParticleEtThetaPhi(const TString &name, const TString &title, TLorentzVector* pini, const TMatrixD* theCovMatrix); - virtual ~TFitParticleEtThetaPhi(); - virtual TAbsFitParticle* clone( const TString& newname = "" ) const; + ~TFitParticleEtThetaPhi() override; + TAbsFitParticle* clone( const TString& newname = "" ) const override; // returns derivative dP/dy with P=(p,E) and y=(et, theta, phi) // the free parameters of the fit. The columns of the matrix contain // (dP/d(et), dP/d(theta), dP/d(phi)). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleMCCart.h b/PhysicsTools/KinFitter/interface/TFitParticleMCCart.h index efcca090e93c8..1a82db060d51a 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleMCCart.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleMCCart.h @@ -15,17 +15,17 @@ public : TFitParticleMCCart(TVector3* p, Double_t M, const TMatrixD* theCovMatrix); TFitParticleMCCart(const TString &name, const TString &title, TVector3* p, Double_t M, const TMatrixD* theCovMatrix); - virtual ~TFitParticleMCCart(); - virtual TAbsFitParticle* clone( const TString& newname = TString("") ) const; + ~TFitParticleMCCart() override; + TAbsFitParticle* clone( const TString& newname = TString("") ) const override; // returns derivative dP/dy with P=(p,E) and y=(r, theta, phi, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dr, dP/dtheta, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; void setIni4Vec(const TVector3* p, Double_t M); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleMCMomDev.h b/PhysicsTools/KinFitter/interface/TFitParticleMCMomDev.h index d60ed2e1888fa..30c5a6682b1e3 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleMCMomDev.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleMCMomDev.h @@ -16,17 +16,17 @@ public : TFitParticleMCMomDev(TVector3* p, Double_t M, const TMatrixD* theCovMatrix); TFitParticleMCMomDev(const TString &name, const TString &title, TVector3* p, Double_t M, const TMatrixD* theCovMatrix); - virtual ~TFitParticleMCMomDev(); - virtual TAbsFitParticle* clone( const TString& newname = TString("") ) const; + ~TFitParticleMCMomDev() override; + TAbsFitParticle* clone( const TString& newname = TString("") ) const override; // returns derivative dP/dy with P=(p,E) and y=(r, theta, phi, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dr, dP/dtheta, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; void setIni4Vec(const TVector3* p, Double_t M); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleMCPInvSpher.h b/PhysicsTools/KinFitter/interface/TFitParticleMCPInvSpher.h index 8ba9c9803db70..d7bba8bfd8586 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleMCPInvSpher.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleMCPInvSpher.h @@ -15,17 +15,17 @@ public : TFitParticleMCPInvSpher(TVector3* p, Double_t M, const TMatrixD* theCovMatrix); TFitParticleMCPInvSpher(const TString &name, const TString &title, TVector3* p, Double_t M, const TMatrixD* theCovMatrix); - virtual ~TFitParticleMCPInvSpher(); - virtual TAbsFitParticle* clone( const TString& newname = TString("") ) const; + ~TFitParticleMCPInvSpher() override; + TAbsFitParticle* clone( const TString& newname = TString("") ) const override; // returns derivative dP/dy with P=(p,E) and y=(r, theta, phi, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dr, dP/dtheta, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; void setIni4Vec(const TVector3* p, Double_t M); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleMCSpher.h b/PhysicsTools/KinFitter/interface/TFitParticleMCSpher.h index 5746a1f47ff93..76edadaf2a99a 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleMCSpher.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleMCSpher.h @@ -15,17 +15,17 @@ public : TFitParticleMCSpher(TVector3* p, Double_t M, const TMatrixD* theCovMatrix); TFitParticleMCSpher(const TString &name, const TString &title, TVector3* p, Double_t M, const TMatrixD* theCovMatrix); - virtual ~TFitParticleMCSpher(); - virtual TAbsFitParticle* clone( const TString& newname = TString("") ) const; + ~TFitParticleMCSpher() override; + TAbsFitParticle* clone( const TString& newname = TString("") ) const override; // returns derivative dP/dy with P=(p,E) and y=(r, theta, phi, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dr, dP/dtheta, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; void setIni4Vec(const TVector3* p, Double_t M); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleMomDev.h b/PhysicsTools/KinFitter/interface/TFitParticleMomDev.h index 3c876c3137ce3..ef43442a64e9d 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleMomDev.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleMomDev.h @@ -19,16 +19,16 @@ public : TFitParticleMomDev(const TString &name, const TString &title, TLorentzVector* pini, const TMatrixD* theCovMatrix); - virtual ~TFitParticleMomDev(); - virtual TAbsFitParticle* clone( const TString& newname = TString("") ) const; + ~TFitParticleMomDev() override; + TAbsFitParticle* clone( const TString& newname = TString("") ) const override; // returns derivative dP/dy with P=(p,E) and y=(par1, par2, par3, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dpar1, dP/dpar2, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TFitParticleSpher.h b/PhysicsTools/KinFitter/interface/TFitParticleSpher.h index d8146a2cd9d8a..2f9b2110ba22e 100644 --- a/PhysicsTools/KinFitter/interface/TFitParticleSpher.h +++ b/PhysicsTools/KinFitter/interface/TFitParticleSpher.h @@ -17,16 +17,16 @@ public : TFitParticleSpher(const TString &name, const TString &title, TLorentzVector* pini, const TMatrixD* theCovMatrix); - virtual ~TFitParticleSpher(); - virtual TAbsFitParticle* clone( const TString& newname = TString("") ) const; + ~TFitParticleSpher() override; + TAbsFitParticle* clone( const TString& newname = TString("") ) const override; // returns derivative dP/dy with P=(p,E) and y=(r, theta, phi, ...) // the free parameters of the fit. The columns of the matrix contain // (dP/dr, dP/dtheta, ...). - virtual TMatrixD* getDerivative(); - virtual TMatrixD* transform(const TLorentzVector& vec); - virtual void setIni4Vec(const TLorentzVector* pini); - virtual TLorentzVector* calc4Vec( const TMatrixD* params ); + TMatrixD* getDerivative() override; + TMatrixD* transform(const TLorentzVector& vec) override; + void setIni4Vec(const TLorentzVector* pini) override; + TLorentzVector* calc4Vec( const TMatrixD* params ) override; protected : diff --git a/PhysicsTools/KinFitter/interface/TKinFitter.h b/PhysicsTools/KinFitter/interface/TKinFitter.h index 5a326170a9054..7d12c74df9f13 100644 --- a/PhysicsTools/KinFitter/interface/TKinFitter.h +++ b/PhysicsTools/KinFitter/interface/TKinFitter.h @@ -16,20 +16,20 @@ public : TKinFitter(); TKinFitter(const TString &name, const TString &title); - ~TKinFitter(); + ~TKinFitter() override; void reset(); void resetStatus(); Int_t fit(); void addMeasParticle( TAbsFitParticle* particle ); - void addMeasParticles( TAbsFitParticle* p1, TAbsFitParticle* p2 = 0, TAbsFitParticle* p3 = 0, - TAbsFitParticle* p4 = 0, TAbsFitParticle* p5 = 0, TAbsFitParticle* p6 = 0, - TAbsFitParticle* p7 = 0, TAbsFitParticle* p8 = 0, TAbsFitParticle* p9 = 0); + void addMeasParticles( TAbsFitParticle* p1, TAbsFitParticle* p2 = nullptr, TAbsFitParticle* p3 = nullptr, + TAbsFitParticle* p4 = nullptr, TAbsFitParticle* p5 = nullptr, TAbsFitParticle* p6 = nullptr, + TAbsFitParticle* p7 = nullptr, TAbsFitParticle* p8 = nullptr, TAbsFitParticle* p9 = nullptr); void addUnmeasParticle( TAbsFitParticle* particle ); - void addUnmeasParticles( TAbsFitParticle* p1, TAbsFitParticle* p2 = 0, TAbsFitParticle* p3 = 0, - TAbsFitParticle* p4 = 0, TAbsFitParticle* p5 = 0, TAbsFitParticle* p6 = 0, - TAbsFitParticle* p7 = 0, TAbsFitParticle* p8 = 0, TAbsFitParticle* p9 = 0); + void addUnmeasParticles( TAbsFitParticle* p1, TAbsFitParticle* p2 = nullptr, TAbsFitParticle* p3 = nullptr, + TAbsFitParticle* p4 = nullptr, TAbsFitParticle* p5 = nullptr, TAbsFitParticle* p6 = nullptr, + TAbsFitParticle* p7 = nullptr, TAbsFitParticle* p8 = nullptr, TAbsFitParticle* p9 = nullptr); void addConstraint( TAbsFitConstraint* constraint ); Int_t getNDF() { return (_constraints.size() - _nParA); } diff --git a/PhysicsTools/KinFitter/interface/TSLToyGen.h b/PhysicsTools/KinFitter/interface/TSLToyGen.h index c59667259194f..f1dbbc582946a 100644 --- a/PhysicsTools/KinFitter/interface/TSLToyGen.h +++ b/PhysicsTools/KinFitter/interface/TSLToyGen.h @@ -14,7 +14,7 @@ class TSLToyGen : public TObject { public : TSLToyGen( const TAbsFitParticle* bReco, const TAbsFitParticle* lepton, const TAbsFitParticle* X, const TAbsFitParticle* neutrino); - virtual ~TSLToyGen(); + ~TSLToyGen() override; Bool_t doToyExperiments( Int_t nbExperiments = 1000 ); TH1D* _histStatus; diff --git a/PhysicsTools/KinFitter/src/TAbsFitConstraint.cc b/PhysicsTools/KinFitter/src/TAbsFitConstraint.cc index 49215e06bb7c9..3d38000d28285 100644 --- a/PhysicsTools/KinFitter/src/TAbsFitConstraint.cc +++ b/PhysicsTools/KinFitter/src/TAbsFitConstraint.cc @@ -49,7 +49,7 @@ void TAbsFitConstraint::reset() { // Reset parameters to initial values _parameters = _iniparameters; - setCovMatrixFit( 0 ); + setCovMatrixFit( nullptr ); } @@ -57,7 +57,7 @@ void TAbsFitConstraint::setCovMatrix(const TMatrixD* theCovMatrix) { // Set measured alpha covariance matrix _covMatrix.ResizeTo(_nPar, _nPar); - if(theCovMatrix==0) { + if(theCovMatrix==nullptr) { _covMatrix.Zero(); } else if (theCovMatrix->GetNcols() ==_nPar && theCovMatrix->GetNrows() ==_nPar) { _covMatrix = (*theCovMatrix); @@ -73,7 +73,7 @@ void TAbsFitConstraint::setCovMatrixFit(const TMatrixD* theCovMatrixFit) { // Set the fitted covariance matrix _covMatrixFit.ResizeTo(_nPar, _nPar); - if(theCovMatrixFit==0) { + if(theCovMatrixFit==nullptr) { _covMatrixFit.Zero(); } else if (theCovMatrixFit->GetNcols() ==_nPar && theCovMatrixFit->GetNrows() ==_nPar) { _covMatrixFit = (*theCovMatrixFit); @@ -110,7 +110,7 @@ void TAbsFitConstraint::applyDeltaAlpha(TMatrixD* corrMatrix) { void TAbsFitConstraint::setParIni(const TMatrixD* parini) { // Set initial parameter values (before the fit) - if (parini == 0) return; + if (parini == nullptr) return; else if( parini->GetNrows() == _iniparameters.GetNrows() && parini->GetNcols() == _iniparameters.GetNcols() ) _iniparameters = (*parini) ; diff --git a/PhysicsTools/KinFitter/src/TAbsFitParticle.cc b/PhysicsTools/KinFitter/src/TAbsFitParticle.cc index b98bee2e6786f..5971ea3bbad10 100644 --- a/PhysicsTools/KinFitter/src/TAbsFitParticle.cc +++ b/PhysicsTools/KinFitter/src/TAbsFitParticle.cc @@ -108,7 +108,7 @@ void TAbsFitParticle::reset() { _parameters = _iniparameters; _pcurr = _pini; - setCovMatrixFit( 0 ); + setCovMatrixFit( nullptr ); _pull.ResizeTo(_nPar, 1); _pull.Zero(); @@ -118,7 +118,7 @@ void TAbsFitParticle::setCovMatrix(const TMatrixD* theCovMatrix) { // Set the measured covariance matrix _covMatrix.ResizeTo(_nPar, _nPar); - if(theCovMatrix==0) { + if(theCovMatrix==nullptr) { _covMatrix.Zero(); } else if (theCovMatrix->GetNcols() ==_nPar && theCovMatrix->GetNrows() ==_nPar) { _covMatrix = (*theCovMatrix); @@ -135,7 +135,7 @@ void TAbsFitParticle::setCovMatrixFit(const TMatrixD* theCovMatrixFit) { // Set the fitted covariance matrix _covMatrixFit.ResizeTo(_nPar, _nPar); - if(theCovMatrixFit==0) { + if(theCovMatrixFit==nullptr) { _covMatrixFit.Zero(); } else if (theCovMatrixFit->GetNcols() ==_nPar && theCovMatrixFit->GetNrows() ==_nPar) { _covMatrixFit = (*theCovMatrixFit); @@ -201,7 +201,7 @@ void TAbsFitParticle::applycorr(TMatrixD* corrMatrix) { } void TAbsFitParticle::setParIni(const TMatrixD* parini) { - if (parini == 0) return; + if (parini == nullptr) return; else if( parini->GetNrows() == _iniparameters.GetNrows() && parini->GetNcols() == _iniparameters.GetNcols() ) _iniparameters = (*parini) ; diff --git a/PhysicsTools/KinFitter/src/TFitConstraintM.cc b/PhysicsTools/KinFitter/src/TFitConstraintM.cc index 364a7b58c529f..3faf52ad305b5 100644 --- a/PhysicsTools/KinFitter/src/TFitConstraintM.cc +++ b/PhysicsTools/KinFitter/src/TFitConstraintM.cc @@ -241,7 +241,7 @@ Double_t TFitConstraintM::CalcMass(std::vector* List, Bool_t I TLorentzVector P(0., 0., 0., 0.); UInt_t Npart = List->size(); for (unsigned int i=0;igetIni4Vec(); else diff --git a/PhysicsTools/KinFitter/src/TFitConstraintMGaus.cc b/PhysicsTools/KinFitter/src/TFitConstraintMGaus.cc index bd7442bb922b3..3f209b5bb0922 100644 --- a/PhysicsTools/KinFitter/src/TFitConstraintMGaus.cc +++ b/PhysicsTools/KinFitter/src/TFitConstraintMGaus.cc @@ -79,7 +79,7 @@ void TFitConstraintMGaus::setMassConstraint(Double_t Mass, Double_t Width) { _TheMassConstraint = Mass; _width = Width; - setCovMatrix( 0 ); + setCovMatrix( nullptr ); if(!Mass) throw cms::Exception("Configuration") << "Error occured!\n" << "Object type : TFitConstraintMGaus\n" diff --git a/PhysicsTools/KinFitter/src/TFitParticleCart.cc b/PhysicsTools/KinFitter/src/TFitParticleCart.cc index 34745478fd5b7..c5ccb6ab8509e 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleCart.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleCart.cc @@ -27,7 +27,7 @@ TFitParticleCart::TFitParticleCart() :TAbsFitParticle() { - init(0, 0); + init(nullptr, nullptr); } TFitParticleCart::TFitParticleCart( const TFitParticleCart& fitParticle ) @@ -93,14 +93,14 @@ TLorentzVector* TFitParticleCart::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t X = (*params)(0,0); @@ -117,7 +117,7 @@ void TFitParticleCart::setIni4Vec(const TLorentzVector* pini) { // Set the initial 4vector. Will also set the // inital parameter values - if (pini == 0) { + if (pini == nullptr) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); diff --git a/PhysicsTools/KinFitter/src/TFitParticleECart.cc b/PhysicsTools/KinFitter/src/TFitParticleECart.cc index b8f2fe26326b1..23c78ef491ba5 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleECart.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleECart.cc @@ -26,7 +26,7 @@ TFitParticleECart::TFitParticleECart() :TAbsFitParticle() { - init(0, 0); + init(nullptr, nullptr); } TFitParticleECart::TFitParticleECart( const TFitParticleECart& fitParticle ) @@ -92,14 +92,14 @@ TLorentzVector* TFitParticleECart::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t X = (*params)(0,0); @@ -116,7 +116,7 @@ void TFitParticleECart::setIni4Vec(const TLorentzVector* pini) { // Set the initial 4vector. Will also set the // inital parameter values - if (pini == 0) { + if (pini == nullptr) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); diff --git a/PhysicsTools/KinFitter/src/TFitParticleEMomDev.cc b/PhysicsTools/KinFitter/src/TFitParticleEMomDev.cc index faecc650da006..dad6a786eca14 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleEMomDev.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleEMomDev.cc @@ -33,7 +33,7 @@ TFitParticleEMomDev::TFitParticleEMomDev() :TAbsFitParticle() { - init(0, 0); + init(nullptr, nullptr); } TFitParticleEMomDev::TFitParticleEMomDev( const TFitParticleEMomDev& fitParticle ) @@ -101,7 +101,7 @@ void TFitParticleEMomDev::setIni4Vec(const TLorentzVector* pini) { _iniparameters.ResizeTo(_nPar,1); _parameters.ResizeTo(_nPar,1); - if (pini == 0) { + if (pini == nullptr) { _iniparameters(0,0)=0.; _iniparameters(1,0)=0.; _iniparameters(2,0)=0.; @@ -143,14 +143,14 @@ TLorentzVector* TFitParticleEMomDev::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t X = _pini.P() * (*params)(0,0) *_u1.X() + diff --git a/PhysicsTools/KinFitter/src/TFitParticleEScaledMomDev.cc b/PhysicsTools/KinFitter/src/TFitParticleEScaledMomDev.cc index a16b8f4310f4a..c25f1e20b44a7 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleEScaledMomDev.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleEScaledMomDev.cc @@ -34,7 +34,7 @@ TFitParticleEScaledMomDev::TFitParticleEScaledMomDev() :TAbsFitParticle() { - init(0, 0); + init(nullptr, nullptr); } TFitParticleEScaledMomDev::TFitParticleEScaledMomDev( const TFitParticleEScaledMomDev& fitParticle ) @@ -106,14 +106,14 @@ TLorentzVector* TFitParticleEScaledMomDev::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t X = _pini.P() * (*params)(0,0) *_u1.X() + @@ -137,7 +137,7 @@ void TFitParticleEScaledMomDev::setIni4Vec(const TLorentzVector* pini) { // Set the initial 4vector. Will also set the // inital parameter values - if (pini == 0) { + if (pini == nullptr) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); diff --git a/PhysicsTools/KinFitter/src/TFitParticleESpher.cc b/PhysicsTools/KinFitter/src/TFitParticleESpher.cc index d55c1a9092bbc..897cf6ad99043 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleESpher.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleESpher.cc @@ -27,7 +27,7 @@ TFitParticleESpher::TFitParticleESpher() :TAbsFitParticle() { - init(0, 0); + init(nullptr, nullptr); } TFitParticleESpher::TFitParticleESpher( const TFitParticleESpher& fitParticle ) @@ -93,14 +93,14 @@ TLorentzVector* TFitParticleESpher::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t r = (*params)(0,0); @@ -122,7 +122,7 @@ void TFitParticleESpher::setIni4Vec(const TLorentzVector* pini) { // Set the initial 4vector. Will also set the // inital parameter values - if (pini == 0) { + if (pini == nullptr) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); diff --git a/PhysicsTools/KinFitter/src/TFitParticleEtEtaPhi.cc b/PhysicsTools/KinFitter/src/TFitParticleEtEtaPhi.cc index 7621eb33e7831..1905ec0f78b72 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleEtEtaPhi.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleEtEtaPhi.cc @@ -28,7 +28,7 @@ TFitParticleEtEtaPhi::TFitParticleEtEtaPhi() :TAbsFitParticle() { - init(0, 0); + init(nullptr, nullptr); } TFitParticleEtEtaPhi::TFitParticleEtEtaPhi( const TFitParticleEtEtaPhi& fitParticle ) @@ -94,14 +94,14 @@ TLorentzVector* TFitParticleEtEtaPhi::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t et = (*params)(0,0); @@ -122,7 +122,7 @@ void TFitParticleEtEtaPhi::setIni4Vec(const TLorentzVector* pini) { // Set the initial 4vector. Will also set the // inital parameter values - if (pini == 0) { + if (pini == nullptr) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); diff --git a/PhysicsTools/KinFitter/src/TFitParticleEtThetaPhi.cc b/PhysicsTools/KinFitter/src/TFitParticleEtThetaPhi.cc index ad186e19316c1..547c0770878a9 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleEtThetaPhi.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleEtThetaPhi.cc @@ -27,7 +27,7 @@ TFitParticleEtThetaPhi::TFitParticleEtThetaPhi() :TAbsFitParticle() { - init(0, 0); + init(nullptr, nullptr); } TFitParticleEtThetaPhi::TFitParticleEtThetaPhi( const TFitParticleEtThetaPhi& fitParticle ) @@ -93,14 +93,14 @@ TLorentzVector* TFitParticleEtThetaPhi::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t et = (*params)(0,0); @@ -121,7 +121,7 @@ void TFitParticleEtThetaPhi::setIni4Vec(const TLorentzVector* pini) { // Set the initial 4vector. Will also set the // inital parameter values - if (pini == 0) { + if (pini == nullptr) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); diff --git a/PhysicsTools/KinFitter/src/TFitParticleMCCart.cc b/PhysicsTools/KinFitter/src/TFitParticleMCCart.cc index 023aff2c99b38..4385f2dfd8073 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleMCCart.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleMCCart.cc @@ -27,7 +27,7 @@ TFitParticleMCCart::TFitParticleMCCart() :TAbsFitParticle() { - init( 0, 0., 0); + init( nullptr, 0., nullptr); } TFitParticleMCCart::TFitParticleMCCart( const TFitParticleMCCart& fitParticle ) @@ -95,14 +95,14 @@ TLorentzVector* TFitParticleMCCart::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t X = (*params)(0,0); @@ -128,7 +128,7 @@ void TFitParticleMCCart::setIni4Vec(const TVector3* p, Double_t M) { // Set the initial 4vector. Will also set the // inital parameter values - if ( p == 0 ) { + if ( p == nullptr ) { _iniparameters.ResizeTo(_nPar,1); _iniparameters(0,0) = 0.; diff --git a/PhysicsTools/KinFitter/src/TFitParticleMCMomDev.cc b/PhysicsTools/KinFitter/src/TFitParticleMCMomDev.cc index 30ae6cf41bc1c..a5fbfba733e60 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleMCMomDev.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleMCMomDev.cc @@ -34,7 +34,7 @@ TFitParticleMCMomDev::TFitParticleMCMomDev() :TAbsFitParticle() { - init( 0, 0., 0); + init( nullptr, 0., nullptr); } TFitParticleMCMomDev::TFitParticleMCMomDev( const TFitParticleMCMomDev& fitParticle ) @@ -107,14 +107,14 @@ TLorentzVector* TFitParticleMCMomDev::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t X = _pini.P() * (*params)(0,0) *_u1.X()+ @@ -146,7 +146,7 @@ void TFitParticleMCMomDev::setIni4Vec(const TVector3* p, Double_t M) { // Set the initial 4vector. Will also set the // inital parameter values - if ( p == 0 ) { + if ( p == nullptr ) { _pini.SetXYZM( 0., 0., 0., M); _pcurr = _pini; diff --git a/PhysicsTools/KinFitter/src/TFitParticleMCPInvSpher.cc b/PhysicsTools/KinFitter/src/TFitParticleMCPInvSpher.cc index bf6e4c8618801..7035ff4bed6d0 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleMCPInvSpher.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleMCPInvSpher.cc @@ -27,7 +27,7 @@ TFitParticleMCPInvSpher::TFitParticleMCPInvSpher() :TAbsFitParticle() { - init( 0, 0., 0); + init( nullptr, 0., nullptr); } TFitParticleMCPInvSpher::TFitParticleMCPInvSpher( const TFitParticleMCPInvSpher& fitParticle ) @@ -94,14 +94,14 @@ TLorentzVector* TFitParticleMCPInvSpher::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t r = (*params)(0,0); @@ -131,7 +131,7 @@ void TFitParticleMCPInvSpher::setIni4Vec(const TVector3* p, Double_t M) { // Set the initial 4vector. Will also set the // inital parameter values - if ( p == 0 ) { + if ( p == nullptr ) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); diff --git a/PhysicsTools/KinFitter/src/TFitParticleMCSpher.cc b/PhysicsTools/KinFitter/src/TFitParticleMCSpher.cc index 9c3fc03c30f8f..36cf7eab1fed0 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleMCSpher.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleMCSpher.cc @@ -27,7 +27,7 @@ TFitParticleMCSpher::TFitParticleMCSpher() :TAbsFitParticle() { - init( 0, 0., 0); + init( nullptr, 0., nullptr); } TFitParticleMCSpher::TFitParticleMCSpher( const TFitParticleMCSpher& fitParticle ) @@ -94,14 +94,14 @@ TLorentzVector* TFitParticleMCSpher::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t r = (*params)(0,0); @@ -131,7 +131,7 @@ void TFitParticleMCSpher::setIni4Vec(const TVector3* p, Double_t M) { // Set the initial 4vector. Will also set the // inital parameter values - if ( p == 0 ) { + if ( p == nullptr ) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); diff --git a/PhysicsTools/KinFitter/src/TFitParticleMomDev.cc b/PhysicsTools/KinFitter/src/TFitParticleMomDev.cc index 027146ec03b18..f4d70c93c35b0 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleMomDev.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleMomDev.cc @@ -34,7 +34,7 @@ TFitParticleMomDev::TFitParticleMomDev() :TAbsFitParticle() { - init(0, 0); + init(nullptr, nullptr); } TFitParticleMomDev::TFitParticleMomDev( const TFitParticleMomDev& fitParticle ) @@ -108,7 +108,7 @@ void TFitParticleMomDev::setIni4Vec(const TLorentzVector* pini) { // Set the initial 4vector. Will also set the // inital parameter values - if (pini == 0) { + if (pini == nullptr) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); @@ -142,14 +142,14 @@ TLorentzVector* TFitParticleMomDev::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t X = _pini.P() * (*params)(0,0) *_u1.X() + diff --git a/PhysicsTools/KinFitter/src/TFitParticleSpher.cc b/PhysicsTools/KinFitter/src/TFitParticleSpher.cc index 3b729a0458778..327b96a356c26 100644 --- a/PhysicsTools/KinFitter/src/TFitParticleSpher.cc +++ b/PhysicsTools/KinFitter/src/TFitParticleSpher.cc @@ -27,7 +27,7 @@ TFitParticleSpher::TFitParticleSpher() :TAbsFitParticle() { - init(0, 0); + init(nullptr, nullptr); } TFitParticleSpher::TFitParticleSpher( const TFitParticleSpher& fitParticle ) @@ -93,14 +93,14 @@ TLorentzVector* TFitParticleSpher::calc4Vec( const TMatrixD* params ) { // Calculates a 4vector corresponding to the given // parameter values - if (params == 0) { - return 0; + if (params == nullptr) { + return nullptr; } if ( params->GetNcols() != 1 || params->GetNrows() !=_nPar ) { edm::LogError ("WrongMatrixSize") << GetName() << "::calc4Vec - Parameter matrix has wrong size."; - return 0; + return nullptr; } Double_t r = (*params)(0,0); @@ -122,7 +122,7 @@ void TFitParticleSpher::setIni4Vec(const TLorentzVector* pini) { // Set the initial 4vector. Will also set the // inital parameter values - if (pini == 0) { + if (pini == nullptr) { _u1.SetXYZ(0., 0., 0.); _u3.SetXYZ(0., 0., 0.); diff --git a/PhysicsTools/KinFitter/src/TKinFitter.cc b/PhysicsTools/KinFitter/src/TKinFitter.cc index 585a7d42f6de6..169893b96a945 100644 --- a/PhysicsTools/KinFitter/src/TKinFitter.cc +++ b/PhysicsTools/KinFitter/src/TKinFitter.cc @@ -211,7 +211,7 @@ void TKinFitter::addMeasParticle( TAbsFitParticle* particle ) { resetStatus(); - if ( particle != 0 ) { + if ( particle != nullptr ) { _measParticles.push_back( particle ); } else { edm::LogError ("NullPointer") << "Measured particle points to NULL. It will not be added to the KinFitter."; @@ -228,15 +228,15 @@ void TKinFitter::addMeasParticles( TAbsFitParticle* p1, TAbsFitParticle* p2, TAb resetStatus(); - if ( p1 != 0 ) _measParticles.push_back( p1 ); - if ( p2 != 0 ) _measParticles.push_back( p2 ); - if ( p3 != 0 ) _measParticles.push_back( p3 ); - if ( p4 != 0 ) _measParticles.push_back( p4 ); - if ( p5 != 0 ) _measParticles.push_back( p5 ); - if ( p6 != 0 ) _measParticles.push_back( p6 ); - if ( p7 != 0 ) _measParticles.push_back( p7 ); - if ( p8 != 0 ) _measParticles.push_back( p8 ); - if ( p9 != 0 ) _measParticles.push_back( p9 ); + if ( p1 != nullptr ) _measParticles.push_back( p1 ); + if ( p2 != nullptr ) _measParticles.push_back( p2 ); + if ( p3 != nullptr ) _measParticles.push_back( p3 ); + if ( p4 != nullptr ) _measParticles.push_back( p4 ); + if ( p5 != nullptr ) _measParticles.push_back( p5 ); + if ( p6 != nullptr ) _measParticles.push_back( p6 ); + if ( p7 != nullptr ) _measParticles.push_back( p7 ); + if ( p8 != nullptr ) _measParticles.push_back( p8 ); + if ( p9 != nullptr ) _measParticles.push_back( p9 ); countMeasParams(); @@ -247,7 +247,7 @@ void TKinFitter::addUnmeasParticle( TAbsFitParticle* particle ) { resetStatus(); - if ( particle != 0 ) { + if ( particle != nullptr ) { _unmeasParticles.push_back( particle ); } else { edm::LogError ("NullPointer") << "Unmeasured particle points to NULL. It will not be added to the KinFitter."; @@ -264,15 +264,15 @@ void TKinFitter::addUnmeasParticles( TAbsFitParticle* p1, TAbsFitParticle* p2, T resetStatus(); - if ( p1 != 0 ) _unmeasParticles.push_back( p1 ); - if ( p2 != 0 ) _unmeasParticles.push_back( p2 ); - if ( p3 != 0 ) _unmeasParticles.push_back( p3 ); - if ( p4 != 0 ) _unmeasParticles.push_back( p4 ); - if ( p5 != 0 ) _unmeasParticles.push_back( p5 ); - if ( p6 != 0 ) _unmeasParticles.push_back( p6 ); - if ( p7 != 0 ) _unmeasParticles.push_back( p7 ); - if ( p8 != 0 ) _unmeasParticles.push_back( p8 ); - if ( p9 != 0 ) _unmeasParticles.push_back( p9 ); + if ( p1 != nullptr ) _unmeasParticles.push_back( p1 ); + if ( p2 != nullptr ) _unmeasParticles.push_back( p2 ); + if ( p3 != nullptr ) _unmeasParticles.push_back( p3 ); + if ( p4 != nullptr ) _unmeasParticles.push_back( p4 ); + if ( p5 != nullptr ) _unmeasParticles.push_back( p5 ); + if ( p6 != nullptr ) _unmeasParticles.push_back( p6 ); + if ( p7 != nullptr ) _unmeasParticles.push_back( p7 ); + if ( p8 != nullptr ) _unmeasParticles.push_back( p8 ); + if ( p9 != nullptr ) _unmeasParticles.push_back( p9 ); countUnmeasParams(); @@ -283,7 +283,7 @@ void TKinFitter::addConstraint( TAbsFitConstraint* constraint ) { resetStatus(); - if ( constraint != 0 ) { + if ( constraint != nullptr ) { _constraints.push_back( constraint ); } @@ -599,7 +599,7 @@ Bool_t TKinFitter::calcB() { TAbsFitConstraint* constraint = _constraints[iC]; TMatrixD* deriv = constraint->getDerivativeAlpha(); - if (deriv != 0) { + if (deriv != nullptr) { if (_verbosity >= 3) { TString matrixName = "B deriv alpha: Constraint -> "; diff --git a/PhysicsTools/KinFitter/src/TSLToyGen.cc b/PhysicsTools/KinFitter/src/TSLToyGen.cc index d74f20ff6e2b0..7254e5270b944 100644 --- a/PhysicsTools/KinFitter/src/TSLToyGen.cc +++ b/PhysicsTools/KinFitter/src/TSLToyGen.cc @@ -94,10 +94,10 @@ Bool_t TSLToyGen::doToyExperiments( Int_t nbExperiments ) { TFitConstraintEp pYCons( "pY", "pY", &ParVec, TFitConstraintEp::pY, _Y4S.y() ); TFitConstraintEp pZCons( "pZ", "pZ", &ParVec, TFitConstraintEp::pZ, _Y4S.z() ); TFitConstraintEp ECons( "E", "E", &ParVec, TFitConstraintEp::E, EY4S ); - TFitConstraintM MCons( "MassConstraint", "Mass-Constraint", 0, 0 ,0); + TFitConstraintM MCons( "MassConstraint", "Mass-Constraint", nullptr, nullptr ,0); MCons.addParticle1( _breco ); MCons.addParticles2( _lepton, _neutrino, _X ); - TFitConstraintM MPDGCons( "MPDGCons", "MPDGCons", 0, 0 , 5.279 ); + TFitConstraintM MPDGCons( "MPDGCons", "MPDGCons", nullptr, nullptr , 5.279 ); MPDGCons.addParticles1( _lepton, _neutrino, _X ); // TFitConstraintE EBCons( "EBXlnuCons", "EBXlnuCons", 0, 0 ); // EBCons.addParticle1( _breco ); diff --git a/PhysicsTools/MVAComputer/interface/AtomicId.h b/PhysicsTools/MVAComputer/interface/AtomicId.h index cb9a09d0f97fc..b6baeddf9236d 100644 --- a/PhysicsTools/MVAComputer/interface/AtomicId.h +++ b/PhysicsTools/MVAComputer/interface/AtomicId.h @@ -30,7 +30,7 @@ namespace PhysicsTools { ************************************************************/ class AtomicId { public: - inline AtomicId() throw() : string(0) {} + inline AtomicId() throw() : string(nullptr) {} inline AtomicId(const AtomicId &orig) throw() : string(orig.string) {} /// constructs an AtomicId from a C string inline AtomicId(const char *arg) throw() : string(lookup(arg)) {} @@ -48,7 +48,7 @@ class AtomicId { /// null value check operator inline operator bool() const throw() - { return string != 0; } + { return string != nullptr; } /// implicit cast to a STL string inline operator std::string() const throw() diff --git a/PhysicsTools/MVAComputer/interface/BitSet.h b/PhysicsTools/MVAComputer/interface/BitSet.h index 1a527399333fe..3afb88eb9bdcb 100644 --- a/PhysicsTools/MVAComputer/interface/BitSet.h +++ b/PhysicsTools/MVAComputer/interface/BitSet.h @@ -11,7 +11,7 @@ // Created: Sat Apr 24 15:18 CEST 2007 // -#include +#include #include #include @@ -123,7 +123,7 @@ class BitSet { unsigned int pos; }; - BitSet() : store(0), bits_(0) {} + BitSet() : store(nullptr), bits_(0) {} BitSet(const BitSet &orig) : bits_(orig.bits_) { @@ -132,7 +132,7 @@ class BitSet { store = new Word_t[words]; std::memcpy(store, orig.store, words * sizeof(Word_t)); } else - store = 0; + store = nullptr; } /// construct BitSet with a fixed size of \a bits bits @@ -143,7 +143,7 @@ class BitSet { store = new Word_t[words]; std::memset(store, 0, sizeof(Word_t) * words); } else - store = 0; + store = nullptr; } inline ~BitSet() { delete[] store; } @@ -157,7 +157,7 @@ class BitSet { store = new Word_t[words]; std::memcpy(store, orig.store, words * sizeof(Word_t)); } else - store = 0; + store = nullptr; return *this; } diff --git a/PhysicsTools/MVAComputer/interface/MVAComputerESSourceBase.h b/PhysicsTools/MVAComputer/interface/MVAComputerESSourceBase.h index efe609eb30c6a..a3e3fe78b1336 100644 --- a/PhysicsTools/MVAComputer/interface/MVAComputerESSourceBase.h +++ b/PhysicsTools/MVAComputer/interface/MVAComputerESSourceBase.h @@ -19,7 +19,7 @@ class MVAComputerESSourceBase : public edm::ESProducer { typedef std::shared_ptr ReturnType; MVAComputerESSourceBase(const edm::ParameterSet ¶ms); - virtual ~MVAComputerESSourceBase(); + ~MVAComputerESSourceBase() override; protected: ReturnType produce() const; diff --git a/PhysicsTools/MVAComputer/interface/MVAComputerESSourceImpl.h b/PhysicsTools/MVAComputer/interface/MVAComputerESSourceImpl.h index 91f2c3130d775..443cb7bdc6698 100644 --- a/PhysicsTools/MVAComputer/interface/MVAComputerESSourceImpl.h +++ b/PhysicsTools/MVAComputer/interface/MVAComputerESSourceImpl.h @@ -20,7 +20,7 @@ class MVAComputerESSourceImpl : public MVAComputerESSourceBase, findingRecord(); } - virtual ~MVAComputerESSourceImpl() {} + ~MVAComputerESSourceImpl() override {} ReturnType produce(const RecordType &record) { return this->produce(); } @@ -31,7 +31,7 @@ class MVAComputerESSourceImpl : public MVAComputerESSourceBase, private: void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &key, const edm::IOVSyncValue &syncValue, - edm::ValidityInterval &oValidity) + edm::ValidityInterval &oValidity) override { oValidity = edm::ValidityInterval( edm::IOVSyncValue::beginOfTime(), diff --git a/PhysicsTools/MVAComputer/interface/ProcessRegistry.h b/PhysicsTools/MVAComputer/interface/ProcessRegistry.h index 60155ffab9cd3..8fa4e18383107 100644 --- a/PhysicsTools/MVAComputer/interface/ProcessRegistry.h +++ b/PhysicsTools/MVAComputer/interface/ProcessRegistry.h @@ -116,7 +116,7 @@ namespace PhysicsTools ProcessRegistryImpl(const char *name) : ProcessRegistry(name){} protected: Base_t *instance(const char *name, const CalibBase_t *calib, - Parent_t *parent) const + Parent_t *parent) const override { return new Instance_t(name, dynamic_cast(calib), diff --git a/PhysicsTools/MVAComputer/interface/TreeReader.h b/PhysicsTools/MVAComputer/interface/TreeReader.h index b3ae33817de27..d5dbba7411740 100644 --- a/PhysicsTools/MVAComputer/interface/TreeReader.h +++ b/PhysicsTools/MVAComputer/interface/TreeReader.h @@ -1,7 +1,7 @@ #ifndef PhysicsTools_MVAComputer_TreeReader_h #define PhysicsTools_MVAComputer_TreeReader_h -#include +#include #include #include #include @@ -57,7 +57,7 @@ class TreeReader { static const double kOptVal; struct Bool { - inline Bool() : value(0) {} + inline Bool() : value(false) {} inline operator Bool_t() const { return value; } Bool_t value; }; @@ -67,7 +67,7 @@ class TreeReader { Value() {} Value(int index, bool multiple, bool optional, char type) : index(index), optional(optional), multiple(multiple), - optVal(TreeReader::kOptVal), type(type), ptr(0) {} + optVal(TreeReader::kOptVal), type(type), ptr(nullptr) {} ~Value() {} void setOpt(bool opt, double optVal) diff --git a/PhysicsTools/MVAComputer/interface/VarProcessor.h b/PhysicsTools/MVAComputer/interface/VarProcessor.h index eabe2795d32d0..3c6b164408454 100644 --- a/PhysicsTools/MVAComputer/interface/VarProcessor.h +++ b/PhysicsTools/MVAComputer/interface/VarProcessor.h @@ -253,7 +253,7 @@ class VarProcessor : values += *conf - prev; if (loop && conf >= loop) { values += offset; - loop = 0; + loop = nullptr; } } return *this; @@ -277,7 +277,7 @@ class VarProcessor : this->values += *this->conf; if (loop && this->conf >= loop) { this->values += offset; - this->loop = 0; + this->loop = nullptr; } } diff --git a/PhysicsTools/MVAComputer/interface/memstream.h b/PhysicsTools/MVAComputer/interface/memstream.h index 9f8831df7de4c..8c7a9778c5510 100644 --- a/PhysicsTools/MVAComputer/interface/memstream.h +++ b/PhysicsTools/MVAComputer/interface/memstream.h @@ -38,14 +38,14 @@ class basic_omemstream : private std::basic_streambuf, bool empty() const { return cur == buffer; } private: - std::streamsize xsputn(char_type const *data, std::streamsize size) { + std::streamsize xsputn(char_type const *data, std::streamsize size) override { size_t n = std::min(last - cur, size); traits_type::copy(cur, data, n); cur += n; return n; } - int_type overflow(int_type c) + int_type overflow(int_type c) override { if (!traits_type::eq_int_type(c, traits_type::eof())) { char_type t = traits_type::to_char_type(c); @@ -56,7 +56,7 @@ class basic_omemstream : private std::basic_streambuf, return c; } - int sync() { return 0; } + int sync() override { return 0; } char_type *buffer, *cur, *last; }; @@ -80,7 +80,7 @@ class basic_imemstream : private std::basic_streambuf, } private: - int_type underflow() + int_type underflow() override { if (this->gptr() && this->gptr() < this->egptr()) return traits_type::to_int_type(*this->gptr()); diff --git a/PhysicsTools/MVAComputer/interface/zstream.h b/PhysicsTools/MVAComputer/interface/zstream.h index 2b45e008bf8a9..0324be4f3594b 100644 --- a/PhysicsTools/MVAComputer/interface/zstream.h +++ b/PhysicsTools/MVAComputer/interface/zstream.h @@ -37,14 +37,14 @@ class basic_ozstreambuf : public std::basic_streambuf { typedef Traits_t traits_type; basic_ozstreambuf(OStream_t *os, int level); - ~basic_ozstreambuf(); + ~basic_ozstreambuf() override; using StreamBuf_t::pbase; using StreamBuf_t::pptr; using StreamBuf_t::epptr; - int sync(); - int_type overflow(int_type c); + int sync() override; + int_type overflow(int_type c) override; std::streamsize flush(); private: @@ -73,13 +73,13 @@ class basic_izstreambuf : public std::basic_streambuf { typedef Traits_t traits_type; basic_izstreambuf(IStream_t *is); - ~basic_izstreambuf(); + ~basic_izstreambuf() override; using StreamBuf_t::gptr; using StreamBuf_t::egptr; using StreamBuf_t::eback; - int_type underflow(); + int_type underflow() override; private: void putbackFromZStream(); @@ -136,7 +136,7 @@ class basic_ozstream : public basic_ozstreambase, int level = 9) : ZOStreamBase_t(os, level), OStream_t(ZOStreamBase_t::rdbuf()) {} - ~basic_ozstream() {} + ~basic_ozstream() override {} }; template, @@ -149,7 +149,7 @@ class basic_izstream : public basic_izstreambase, basic_izstream(IStream_t *is, int open_mode = std::ios::in) : ZIStreamBase_t(is), IStream_t(ZIStreamBase_t::rdbuf()) {} - ~basic_izstream() {} + ~basic_izstream() override {} }; typedef basic_ozstream ozstream; diff --git a/PhysicsTools/MVAComputer/plugins/ProcTMVA.cc b/PhysicsTools/MVAComputer/plugins/ProcTMVA.cc index 7647063058c09..e3872bb24ea97 100644 --- a/PhysicsTools/MVAComputer/plugins/ProcTMVA.cc +++ b/PhysicsTools/MVAComputer/plugins/ProcTMVA.cc @@ -50,10 +50,10 @@ class ProcTMVA : public VarProcessor { ProcTMVA(const char *name, const Calibration::ProcExternal *calib, const MVAComputer *computer); - virtual ~ProcTMVA() {} + ~ProcTMVA() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; private: std::unique_ptr reader; diff --git a/PhysicsTools/MVAComputer/src/AtomicId.cc b/PhysicsTools/MVAComputer/src/AtomicId.cc index a6a345391b23e..08d936847466d 100644 --- a/PhysicsTools/MVAComputer/src/AtomicId.cc +++ b/PhysicsTools/MVAComputer/src/AtomicId.cc @@ -67,7 +67,7 @@ const char *AtomicId::lookup(const char *string) throw() if (string) return getAtomicIdCache().findOrInsert(string); - return 0; + return nullptr; } } // namespace PhysicsTools diff --git a/PhysicsTools/MVAComputer/src/MVAComputer.cc b/PhysicsTools/MVAComputer/src/MVAComputer.cc index 65d3143da7f3b..f34eac5b29527 100644 --- a/PhysicsTools/MVAComputer/src/MVAComputer.cc +++ b/PhysicsTools/MVAComputer/src/MVAComputer.cc @@ -174,7 +174,7 @@ void MVAComputer::evalInternal(T &ctx) const while(iter != varProcessors.end()) { std::vector::const_iterator loop = iter; int *loopOutConf = outConf; - int *loopStart = 0; + int *loopStart = nullptr; double *loopOutput = output; VarProcessor::LoopCtx loopCtx; @@ -217,7 +217,7 @@ void MVAComputer::evalInternal(T &ctx) const if (status == VarProcessor::kReset) { outConf = loopOutConf; output = loopOutput; - loopStart = 0; + loopStart = nullptr; offset = 0; iter = loop; } else { diff --git a/PhysicsTools/MVAComputer/src/ProcCategory.cc b/PhysicsTools/MVAComputer/src/ProcCategory.cc index 8fb2d09744900..d010c65453276 100644 --- a/PhysicsTools/MVAComputer/src/ProcCategory.cc +++ b/PhysicsTools/MVAComputer/src/ProcCategory.cc @@ -30,10 +30,10 @@ class ProcCategory : public VarProcessor { ProcCategory(const char *name, const Calibration::ProcCategory *calib, const MVAComputer *computer); - virtual ~ProcCategory() {} + ~ProcCategory() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; private: typedef Calibration::ProcCategory::BinLimits BinLimits; diff --git a/PhysicsTools/MVAComputer/src/ProcClassed.cc b/PhysicsTools/MVAComputer/src/ProcClassed.cc index 73eebee92c867..a7da6638b5372 100644 --- a/PhysicsTools/MVAComputer/src/ProcClassed.cc +++ b/PhysicsTools/MVAComputer/src/ProcClassed.cc @@ -29,10 +29,10 @@ class ProcClassed : public VarProcessor { ProcClassed(const char *name, const Calibration::ProcClassed *calib, const MVAComputer *computer); - virtual ~ProcClassed() {} + ~ProcClassed() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; private: unsigned int nClasses; diff --git a/PhysicsTools/MVAComputer/src/ProcCount.cc b/PhysicsTools/MVAComputer/src/ProcCount.cc index a19c59be625ab..8c03dfea884ca 100644 --- a/PhysicsTools/MVAComputer/src/ProcCount.cc +++ b/PhysicsTools/MVAComputer/src/ProcCount.cc @@ -28,10 +28,10 @@ class ProcCount : public VarProcessor { ProcCount(const char *name, const Calibration::ProcCount *calib, const MVAComputer *computer); - virtual ~ProcCount() {} + ~ProcCount() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; }; ProcCount::Registry registry("ProcCount"); diff --git a/PhysicsTools/MVAComputer/src/ProcForeach.cc b/PhysicsTools/MVAComputer/src/ProcForeach.cc index ddc540240fae3..5fa8fa766894d 100644 --- a/PhysicsTools/MVAComputer/src/ProcForeach.cc +++ b/PhysicsTools/MVAComputer/src/ProcForeach.cc @@ -32,17 +32,17 @@ class ProcForeach : public VarProcessor { ProcForeach(const char *name, const Calibration::ProcForeach *calib, const MVAComputer *computer); - virtual ~ProcForeach() {} + ~ProcForeach() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual ConfigCtx::Context * + void configure(ConfIterator iter, unsigned int n) override; + ConfigCtx::Context * configureLoop(ConfigCtx::Context *ctx, ConfigCtx::iterator begin, ConfigCtx::iterator cur, ConfigCtx::iterator end) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv( + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv( ValueIterator iter, unsigned int n) const override; - virtual LoopStatus loop(double *output, int *conf, + LoopStatus loop(double *output, int *conf, unsigned int nOutput, LoopCtx& ctx, unsigned int &nOffset) const override; @@ -51,7 +51,7 @@ class ProcForeach : public VarProcessor { struct ConfContext : public VarProcessor::ConfigCtx::Context { ConfContext(unsigned int origin, unsigned int count) : origin(origin), count(count) {} - virtual ~ConfContext() {} + ~ConfContext() override {} unsigned int origin; unsigned int count; @@ -93,7 +93,7 @@ ProcForeach::configureLoop(ConfigCtx::Context *ctx_, ConfigCtx::iterator begin, if (--ctx->count) return ctx; else - return 0; + return nullptr; } void ProcForeach::eval(ValueIterator iter, unsigned int n) const diff --git a/PhysicsTools/MVAComputer/src/ProcLikelihood.cc b/PhysicsTools/MVAComputer/src/ProcLikelihood.cc index 7fc9f86842b6d..fdf75fe3a19a8 100644 --- a/PhysicsTools/MVAComputer/src/ProcLikelihood.cc +++ b/PhysicsTools/MVAComputer/src/ProcLikelihood.cc @@ -36,11 +36,11 @@ class ProcLikelihood : public VarProcessor { ProcLikelihood(const char *name, const Calibration::ProcLikelihood *calib, const MVAComputer *computer); - virtual ~ProcLikelihood() {} + ~ProcLikelihood() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv( + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv( ValueIterator iter, unsigned int n) const override; private: @@ -63,8 +63,8 @@ class ProcLikelihood : public VarProcessor { spline.set(values.size(), &values.front()); } - virtual double eval(double value) const override; - virtual double deriv(double value) const override; + double eval(double value) const override; + double deriv(double value) const override; double min, width; Spline spline; @@ -74,8 +74,8 @@ class ProcLikelihood : public VarProcessor { HistogramPDF(const Calibration::HistogramF *calib) : histo(calib) {} - virtual double eval(double value) const override; - virtual double deriv(double value) const override; + double eval(double value) const override; + double deriv(double value) const override; const Calibration::HistogramF *histo; }; diff --git a/PhysicsTools/MVAComputer/src/ProcLinear.cc b/PhysicsTools/MVAComputer/src/ProcLinear.cc index 91dd3f5cf32d0..01fcf1a62185e 100644 --- a/PhysicsTools/MVAComputer/src/ProcLinear.cc +++ b/PhysicsTools/MVAComputer/src/ProcLinear.cc @@ -29,11 +29,11 @@ class ProcLinear : public VarProcessor { ProcLinear(const char *name, const Calibration::ProcLinear *calib, const MVAComputer *computer); - virtual ~ProcLinear() {} + ~ProcLinear() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv( + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv( ValueIterator iter, unsigned int n) const override; private: diff --git a/PhysicsTools/MVAComputer/src/ProcMLP.cc b/PhysicsTools/MVAComputer/src/ProcMLP.cc index feeab3cb6ea47..d32cb76d2a7ca 100644 --- a/PhysicsTools/MVAComputer/src/ProcMLP.cc +++ b/PhysicsTools/MVAComputer/src/ProcMLP.cc @@ -14,7 +14,7 @@ // Created: Sat Apr 24 15:18 CEST 2007 // -#include +#include #include #include #include @@ -37,11 +37,11 @@ class ProcMLP : public VarProcessor { ProcMLP(const char *name, const Calibration::ProcMLP *calib, const MVAComputer *computer); - virtual ~ProcMLP() {} + ~ProcMLP() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv( + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv( ValueIterator iter, unsigned int n) const override; private: @@ -125,7 +125,7 @@ void ProcMLP::eval(ValueIterator iter, unsigned int n) const for(double *pos = tmp; iter; iter++, pos++) *pos = *iter; - double *output = 0; + double *output = nullptr; for(std::vector::const_iterator layer = layers.begin(); layer != layers.end(); layer++, flip = !flip) { const double *input = &tmp[flip ? maxTmp : 0]; diff --git a/PhysicsTools/MVAComputer/src/ProcMatrix.cc b/PhysicsTools/MVAComputer/src/ProcMatrix.cc index 029abdd57df8d..9a85128bbbcd7 100644 --- a/PhysicsTools/MVAComputer/src/ProcMatrix.cc +++ b/PhysicsTools/MVAComputer/src/ProcMatrix.cc @@ -13,7 +13,7 @@ // Created: Sat Apr 24 15:18 CEST 2007 // -#include +#include #include "PhysicsTools/MVAComputer/interface/VarProcessor.h" #include "PhysicsTools/MVAComputer/interface/Calibration.h" @@ -30,11 +30,11 @@ class ProcMatrix : public VarProcessor { ProcMatrix(const char *name, const Calibration::ProcMatrix *calib, const MVAComputer *computer); - virtual ~ProcMatrix() {} + ~ProcMatrix() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv(ValueIterator iter, + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv(ValueIterator iter, unsigned int n) const override; private: diff --git a/PhysicsTools/MVAComputer/src/ProcMultiply.cc b/PhysicsTools/MVAComputer/src/ProcMultiply.cc index b2667bbe3d7ac..192528ad671c8 100644 --- a/PhysicsTools/MVAComputer/src/ProcMultiply.cc +++ b/PhysicsTools/MVAComputer/src/ProcMultiply.cc @@ -11,7 +11,7 @@ // Created: Sat Apr 24 15:18 CEST 2007 // -#include +#include #include #include #include @@ -33,11 +33,11 @@ class ProcMultiply : public VarProcessor { ProcMultiply(const char *name, const Calibration::ProcMultiply *calib, const MVAComputer *computer); - virtual ~ProcMultiply() {} + ~ProcMultiply() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv( + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv( ValueIterator iter, unsigned int n) const override; private: diff --git a/PhysicsTools/MVAComputer/src/ProcNormalize.cc b/PhysicsTools/MVAComputer/src/ProcNormalize.cc index c63596d3b7da0..3e515fd7b78fe 100644 --- a/PhysicsTools/MVAComputer/src/ProcNormalize.cc +++ b/PhysicsTools/MVAComputer/src/ProcNormalize.cc @@ -33,11 +33,11 @@ class ProcNormalize : public VarProcessor { ProcNormalize(const char *name, const Calibration::ProcNormalize *calib, const MVAComputer *computer); - virtual ~ProcNormalize() {} + ~ProcNormalize() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv( + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv( ValueIterator iter, unsigned int n) const override; private: diff --git a/PhysicsTools/MVAComputer/src/ProcOptional.cc b/PhysicsTools/MVAComputer/src/ProcOptional.cc index 81e351698867a..04e63ab487d82 100644 --- a/PhysicsTools/MVAComputer/src/ProcOptional.cc +++ b/PhysicsTools/MVAComputer/src/ProcOptional.cc @@ -28,11 +28,11 @@ class ProcOptional : public VarProcessor { ProcOptional(const char *name, const Calibration::ProcOptional *calib, const MVAComputer *computer); - virtual ~ProcOptional() {} + ~ProcOptional() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv( + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv( ValueIterator iter, unsigned int n) const override; private: diff --git a/PhysicsTools/MVAComputer/src/ProcSort.cc b/PhysicsTools/MVAComputer/src/ProcSort.cc index 8068034fb9b05..84d37313e9a01 100644 --- a/PhysicsTools/MVAComputer/src/ProcSort.cc +++ b/PhysicsTools/MVAComputer/src/ProcSort.cc @@ -14,7 +14,7 @@ // Created: Sun Sep 16 14:52 CEST 2007 // -#include +#include #include #include #include @@ -37,11 +37,11 @@ class ProcSort : public VarProcessor { ProcSort(const char *name, const Calibration::ProcSort *calib, const MVAComputer *computer); - virtual ~ProcSort() {} + ~ProcSort() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv( + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv( ValueIterator iter, unsigned int n) const override; private: diff --git a/PhysicsTools/MVAComputer/src/ProcSplitter.cc b/PhysicsTools/MVAComputer/src/ProcSplitter.cc index 5c50e1c33d9b5..9ffe844fa97aa 100644 --- a/PhysicsTools/MVAComputer/src/ProcSplitter.cc +++ b/PhysicsTools/MVAComputer/src/ProcSplitter.cc @@ -29,11 +29,11 @@ class ProcSplitter : public VarProcessor { ProcSplitter(const char *name, const Calibration::ProcSplitter *calib, const MVAComputer *computer); - virtual ~ProcSplitter() {} + ~ProcSplitter() override {} - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; - virtual std::vector deriv( + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; + std::vector deriv( ValueIterator iter, unsigned int n) const override; private: diff --git a/PhysicsTools/MVAComputer/src/Spline.cc b/PhysicsTools/MVAComputer/src/Spline.cc index ff09fe411b9f4..e6fe54b92fe4e 100644 --- a/PhysicsTools/MVAComputer/src/Spline.cc +++ b/PhysicsTools/MVAComputer/src/Spline.cc @@ -50,7 +50,7 @@ float Spline::Segment::integral(float x) const return area; } -Spline::Spline() : n(0), segments(0), area(0.0) +Spline::Spline() : n(0), segments(nullptr), area(0.0) {} Spline::Spline(const Spline &orig) : n(orig.n), area(orig.area) @@ -60,7 +60,7 @@ Spline::Spline(const Spline &orig) : n(orig.n), area(orig.area) } Spline::Spline(unsigned int n_, const double *vals) : - n(0), segments(0), area(0.0) + n(0), segments(nullptr), area(0.0) { set(n_, vals); } void Spline::set(unsigned int n_, const double *vals) diff --git a/PhysicsTools/MVAComputer/src/TreeReader.cc b/PhysicsTools/MVAComputer/src/TreeReader.cc index 512bb33bf578d..a6a5c1113dc99 100644 --- a/PhysicsTools/MVAComputer/src/TreeReader.cc +++ b/PhysicsTools/MVAComputer/src/TreeReader.cc @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -23,7 +23,7 @@ namespace PhysicsTools { const double TreeReader::kOptVal = -999.0; TreeReader::TreeReader() : - tree(0), upToDate(false) + tree(nullptr), upToDate(false) { } @@ -132,9 +132,9 @@ void TreeReader::addBranch(TBranch *branch, AtomicId name, bool opt) << std::endl; if (multi) - addTypeMulti(name, 0, typeId); + addTypeMulti(name, nullptr, typeId); else - addTypeSingle(name, 0, typeId, opt); + addTypeSingle(name, nullptr, typeId, opt); valueMap[name].setBranchName(branch->GetName()); } @@ -194,7 +194,7 @@ void TreeReader::addTypeSingle(AtomicId name, const void *value, char type, bool template static std::pair > makeMulti() -{ return std::pair >(0, std::vector()); } +{ return std::pair >(nullptr, std::vector()); } void TreeReader::addTypeMulti(AtomicId name, const void *value, char type) { @@ -354,7 +354,7 @@ void TreeReader::Value::update(TreeReader *reader) const if (ptr) return; - void *value = 0; + void *value = nullptr; if (multiple) { switch(type) { case 'D': diff --git a/PhysicsTools/MVAComputer/src/VarProcessor.cc b/PhysicsTools/MVAComputer/src/VarProcessor.cc index d6373d10862e7..85001ec5b0e97 100644 --- a/PhysicsTools/MVAComputer/src/VarProcessor.cc +++ b/PhysicsTools/MVAComputer/src/VarProcessor.cc @@ -70,13 +70,13 @@ void VarProcessor::configure(ConfigCtx &config) } if (config.loop && !ctx) - config.loop = 0; + config.loop = nullptr; else if (!config.loop && ctx) config.loop = this; } VarProcessor::ConfigCtx::ConfigCtx(const std::vector& flags) : - loop(0), ctx(0) + loop(nullptr), ctx(nullptr) { for(std::vector::const_iterator iter = flags.begin(); iter != flags.end(); ++iter) @@ -87,7 +87,7 @@ VarProcessor::ConfigCtx::Context * VarProcessor::configureLoop(ConfigCtx::Context *ctx, ConfigCtx::iterator begin, ConfigCtx::iterator cur, ConfigCtx::iterator end) { - return 0; + return nullptr; } template<> @@ -190,7 +190,7 @@ void VarProcessor::deriv(double *input, int *conf, double *output, #endif if (loop && curConf >= loop) { pos += offset; - loop = 0; + loop = nullptr; } unsigned int n = loop ? (curConf[1] - curConf[0]) : 1; diff --git a/PhysicsTools/MVATrainer/interface/Interceptor.h b/PhysicsTools/MVATrainer/interface/Interceptor.h index 0dff98dbff889..5a272068235d1 100644 --- a/PhysicsTools/MVATrainer/interface/Interceptor.h +++ b/PhysicsTools/MVATrainer/interface/Interceptor.h @@ -16,7 +16,7 @@ namespace Calibration { class Interceptor : public VarProcessor { public: - virtual std::string getInstanceName() const { return "Interceptor"; } + std::string getInstanceName() const override { return "Interceptor"; } virtual std::vector configure(const PhysicsTools::MVAComputer *computer, unsigned int n, const std::vector< diff --git a/PhysicsTools/MVATrainer/interface/MVATrainer.h b/PhysicsTools/MVATrainer/interface/MVATrainer.h index 0f7fc9a690a2d..622497f9d2e5e 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainer.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainer.h @@ -27,7 +27,7 @@ class TrainProcessor; class MVATrainer { public: MVATrainer(const std::string &fileName, bool useXSLT = false, - const char *styleSheet = 0); + const char *styleSheet = nullptr); ~MVATrainer(); inline void setAutoSave(bool autoSave) { doAutoSave = autoSave; } diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerContainer.h b/PhysicsTools/MVATrainer/interface/MVATrainerContainer.h index ccd395a9410e4..db596e0e34591 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerContainer.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerContainer.h @@ -15,8 +15,8 @@ class MVATrainerContainer : public Calibration::MVAComputerContainer { public: typedef MVATrainerLooper::TrainObject Value_t; - virtual const Calibration::MVAComputer & - find(const std::string &label) const + const Calibration::MVAComputer & + find(const std::string &label) const override { Map_t::const_iterator pos = trainCalibs.find(label); if (pos != trainCalibs.end()) @@ -25,8 +25,8 @@ class MVATrainerContainer : public Calibration::MVAComputerContainer { return Calibration::MVAComputerContainer::find(label); } - virtual bool - contains(const std::string &label) const + bool + contains(const std::string &label) const override { Map_t::const_iterator pos = trainCalibs.find(label); if (pos != trainCalibs.end()) return true; diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerContainerSave.h b/PhysicsTools/MVATrainer/interface/MVATrainerContainerSave.h index 6b3ef7b2b39b3..7b6fabfe48970 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerContainerSave.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerContainerSave.h @@ -18,10 +18,10 @@ class MVATrainerContainerSave : public edm::EDAnalyzer { public: explicit MVATrainerContainerSave(const edm::ParameterSet ¶ms); - virtual void analyze(const edm::Event& iEvent, - const edm::EventSetup& iSetup); + void analyze(const edm::Event& iEvent, + const edm::EventSetup& iSetup) override; - virtual void endJob(); + void endJob() override; protected: virtual const Calibration::MVAComputerContainer * diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerFileSave.h b/PhysicsTools/MVATrainer/interface/MVATrainerFileSave.h index 559dc47dac4a4..d298b320f8915 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerFileSave.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerFileSave.h @@ -18,10 +18,10 @@ class MVATrainerFileSave : public edm::EDAnalyzer { public: explicit MVATrainerFileSave(const edm::ParameterSet ¶ms); - virtual void analyze(const edm::Event& iEvent, - const edm::EventSetup& iSetup); + void analyze(const edm::Event& iEvent, + const edm::EventSetup& iSetup) override; - virtual void endJob(); + void endJob() override; protected: virtual const Calibration::MVAComputerContainer * diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerFileSaveImpl.h b/PhysicsTools/MVATrainer/interface/MVATrainerFileSaveImpl.h index 156ec24660bd5..e548184ac058e 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerFileSaveImpl.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerFileSaveImpl.h @@ -24,8 +24,8 @@ class MVATrainerFileSaveImpl : public MVATrainerFileSave { MVATrainerFileSave(params) {} protected: - virtual const Calibration::MVAComputerContainer * - getToPut(const edm::EventSetup& es) const + const Calibration::MVAComputerContainer * + getToPut(const edm::EventSetup& es) const override { edm::ESHandle handle; if (trained) diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerLooper.h b/PhysicsTools/MVATrainer/interface/MVATrainerLooper.h index ced8caefc4004..60742ec26641a 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerLooper.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerLooper.h @@ -16,13 +16,13 @@ namespace PhysicsTools { class MVATrainerLooper : public edm::ESProducerLooper { public: MVATrainerLooper(const edm::ParameterSet ¶ms); - virtual ~MVATrainerLooper(); + ~MVATrainerLooper() override; - virtual void startingNewLoop(unsigned int iteration); - virtual Status duringLoop(const edm::Event &ev, - const edm::EventSetup &es); - virtual Status endOfLoop(const edm::EventSetup &es, - unsigned int iteration); + void startingNewLoop(unsigned int iteration) override; + Status duringLoop(const edm::Event &ev, + const edm::EventSetup &es) override; + Status endOfLoop(const edm::EventSetup &es, + unsigned int iteration) override; typedef std::shared_ptr TrainObject; typedef std::shared_ptr @@ -82,11 +82,11 @@ class MVATrainerLooper : public edm::ESProducerLooper { template<> inline bool MVATrainerLooper::isUntrained(const Calibration::MVAComputer *ptr) -{ return dynamic_cast(ptr) != 0; } +{ return dynamic_cast(ptr) != nullptr; } template<> inline bool MVATrainerLooper::isUntrained(const Calibration::MVAComputerContainer *ptr) -{ return dynamic_cast(ptr) != 0; } +{ return dynamic_cast(ptr) != nullptr; } } // namespace PhysicsTools diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerLooperImpl.h b/PhysicsTools/MVATrainer/interface/MVATrainerLooperImpl.h index a6ce65b0116b4..ad68c550c85df 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerLooperImpl.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerLooperImpl.h @@ -23,7 +23,7 @@ class MVATrainerLooperImpl : public MVATrainerLooper { addTrainer(new Trainer(params)); } - virtual ~MVATrainerLooperImpl() {} + ~MVATrainerLooperImpl() override {} std::shared_ptr produce(const Record_t &record) @@ -51,7 +51,7 @@ class MVATrainerContainerLooperImpl : public MVATrainerLooper { addTrainer(new Trainer(*iter)); } - virtual ~MVATrainerContainerLooperImpl() {} + ~MVATrainerContainerLooperImpl() override {} edm::ESProducts< edm::es::L, diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerSave.h b/PhysicsTools/MVATrainer/interface/MVATrainerSave.h index d3df341d81c59..d328215f20765 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerSave.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerSave.h @@ -17,10 +17,10 @@ class MVATrainerSave : public edm::EDAnalyzer { public: explicit MVATrainerSave(const edm::ParameterSet ¶ms); - virtual void analyze(const edm::Event& iEvent, - const edm::EventSetup& iSetup); + void analyze(const edm::Event& iEvent, + const edm::EventSetup& iSetup) override; - virtual void endJob(); + void endJob() override; protected: virtual const Calibration::MVAComputer * diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerSaveImpl.h b/PhysicsTools/MVATrainer/interface/MVATrainerSaveImpl.h index 06876a60fe583..23fe915aa560b 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerSaveImpl.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerSaveImpl.h @@ -25,15 +25,15 @@ class MVATrainerSaveImpl : public MVATrainerSave { MVATrainerSave(params) {} protected: - virtual const Calibration::MVAComputer * - getToPut(const edm::EventSetup& es) const + const Calibration::MVAComputer * + getToPut(const edm::EventSetup& es) const override { edm::ESHandle handle; es.get().get("trained", handle); return handle.product(); } - virtual std::string getRecordName() const + std::string getRecordName() const override { return Record_t::keyForClass().type().name(); } }; @@ -44,23 +44,23 @@ class MVATrainerContainerSaveImpl : public MVATrainerContainerSave { MVATrainerContainerSave(params) {} protected: - virtual const Calibration::MVAComputerContainer * - getToPut(const edm::EventSetup& es) const + const Calibration::MVAComputerContainer * + getToPut(const edm::EventSetup& es) const override { edm::ESHandle handle; es.get().get("trained", handle); return handle.product(); } - virtual const Calibration::MVAComputerContainer * - getToCopy(const edm::EventSetup& es) const + const Calibration::MVAComputerContainer * + getToCopy(const edm::EventSetup& es) const override { edm::ESHandle handle; es.get().get(handle); return handle.product(); } - virtual std::string getRecordName() const + std::string getRecordName() const override { return Record_t::keyForClass().type().name(); } }; diff --git a/PhysicsTools/MVATrainer/interface/TrainProcessor.h b/PhysicsTools/MVATrainer/interface/TrainProcessor.h index b0a378dfbba3f..5baae624503fb 100644 --- a/PhysicsTools/MVATrainer/interface/TrainProcessor.h +++ b/PhysicsTools/MVATrainer/interface/TrainProcessor.h @@ -42,7 +42,7 @@ class TrainProcessor : public Source, TrainProcessor(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~TrainProcessor(); + ~TrainProcessor() override; virtual Variable::Flags getDefaultFlags() const { return Variable::FLAG_ALL; } @@ -53,7 +53,7 @@ class TrainProcessor : public Source, virtual void passFlags(const std::vector &flags) {} - virtual Calibration::VarProcessor *getCalibration() const { return 0; } + virtual Calibration::VarProcessor *getCalibration() const { return nullptr; } void doTrainBegin(); void doTrainData(const std::vector *values, @@ -78,7 +78,7 @@ class TrainProcessor : public Source, virtual void trainEnd() { trained = true; } virtual void *requestObject(const std::string &name) const - { return 0; } + { return nullptr; } inline bool exists(const std::string &name) { return boost::filesystem::exists(name.c_str()); } diff --git a/PhysicsTools/MVATrainer/interface/TrainerMonitoring.h b/PhysicsTools/MVATrainer/interface/TrainerMonitoring.h index e1acae76babc7..ed5099568f0db 100644 --- a/PhysicsTools/MVATrainer/interface/TrainerMonitoring.h +++ b/PhysicsTools/MVATrainer/interface/TrainerMonitoring.h @@ -162,9 +162,9 @@ class TrainerMonitoring { public: RootObject(const std::string &name, T *object) : Object(name), object(object) {} - virtual ~RootObject() {} + ~RootObject() override {} - virtual void write(TDirectory *dir) + void write(TDirectory *dir) override { dir->WriteObjectAny(object.get(), TClass::GetClass(typeid(T)), @@ -187,7 +187,7 @@ namespace helper { template void trainerMonitoringRootClear(T *object, const boost::mpl::true_&) - { object->SetDirectory(0); } + { object->SetDirectory(nullptr); } } template diff --git a/PhysicsTools/MVATrainer/interface/XMLDocument.h b/PhysicsTools/MVATrainer/interface/XMLDocument.h index ed2922db4f6a8..bab124d5a9c5a 100644 --- a/PhysicsTools/MVATrainer/interface/XMLDocument.h +++ b/PhysicsTools/MVATrainer/interface/XMLDocument.h @@ -54,8 +54,8 @@ class XMLDocument { private: // do not make any kind of copies - XercesPlatform(const XercesPlatform &orig); - XercesPlatform &operator = (const XercesPlatform &orig); + XercesPlatform(const XercesPlatform &orig) = delete; + XercesPlatform &operator = (const XercesPlatform &orig) = delete; static unsigned int instances; }; diff --git a/PhysicsTools/MVATrainer/plugins/MLP.cc b/PhysicsTools/MVATrainer/plugins/MLP.cc index 85fe5763a00a5..665ef18a987b2 100644 --- a/PhysicsTools/MVATrainer/plugins/MLP.cc +++ b/PhysicsTools/MVATrainer/plugins/MLP.cc @@ -30,7 +30,7 @@ static std::vector split(const std::string line, char delim) if (!q) { tokens.push_back(std::string(p)); - p = 0; + p = nullptr; } else { tokens.push_back(std::string(p, q - p)); p = q + 1; @@ -41,7 +41,7 @@ static std::vector split(const std::string line, char delim) } MLP::MLP(unsigned int nIn, unsigned int nOut, const std::string layout_) : - initialized(false), layers(0), layout(0), epoch(0) + initialized(false), layers(0), layout(nullptr), epoch(0) { if (inUse) throw cms::Exception("MLP") @@ -49,7 +49,7 @@ MLP::MLP(unsigned int nIn, unsigned int nOut, const std::string layout_) : << std::endl; std::vector parsed = split(layout_, ':'); - if (parsed.size() < 1) + if (parsed.empty()) throw cms::Exception("MLP") << "Invalid layout." << std::endl; diff --git a/PhysicsTools/MVATrainer/plugins/ProcMLP.cc b/PhysicsTools/MVATrainer/plugins/ProcMLP.cc index 2523b93f64f70..7c2f29fd212f1 100644 --- a/PhysicsTools/MVATrainer/plugins/ProcMLP.cc +++ b/PhysicsTools/MVATrainer/plugins/ProcMLP.cc @@ -36,18 +36,18 @@ class ProcMLP : public TrainProcessor { ProcMLP(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcMLP(); + ~ProcMLP() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; - virtual void trainBegin() override; - virtual void trainData(const std::vector *values, + void trainBegin() override; + void trainData(const std::vector *values, bool target, double weight) override; - virtual void trainEnd() override; + void trainEnd() override; - virtual bool load() override; - virtual void cleanup() override; + bool load() override; + void cleanup() override; private: void runMLPTrainer(); diff --git a/PhysicsTools/MVATrainer/plugins/ProcTMVA.cc b/PhysicsTools/MVATrainer/plugins/ProcTMVA.cc index 221b666f5f465..4177359634ebd 100644 --- a/PhysicsTools/MVATrainer/plugins/ProcTMVA.cc +++ b/PhysicsTools/MVATrainer/plugins/ProcTMVA.cc @@ -54,18 +54,18 @@ class ProcTMVA : public TrainProcessor { ProcTMVA(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcTMVA(); + ~ProcTMVA() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; - virtual void trainBegin() override; - virtual void trainData(const std::vector *values, + void trainBegin() override; + void trainData(const std::vector *values, bool target, double weight) override; - virtual void trainEnd() override; + void trainEnd() override; - virtual bool load() override; - virtual void cleanup() override; + bool load() override; + void cleanup() override; private: void runTMVATrainer(); @@ -109,7 +109,7 @@ ProcTMVA::Registry registry("ProcTMVA"); ProcTMVA::ProcTMVA(const char *name, const AtomicId *id, MVATrainer *trainer) : TrainProcessor(name, id, trainer), - iteration(ITER_EXPORT), treeSig(0), treeBkg(0), needCleanup(false), + iteration(ITER_EXPORT), treeSig(nullptr), treeBkg(nullptr), needCleanup(false), doUserTreeSetup(false), setupOptions("SplitMode = Block:!V") { } @@ -189,7 +189,7 @@ void ProcTMVA::configure(DOMElement *elem) } } - if (!methods.size()) + if (methods.empty()) throw cms::Exception("ProcTMVA") << "Expected TMVA method in config section." << std::endl; @@ -406,8 +406,8 @@ void ProcTMVA::trainEnd() runTMVATrainer(); file->Close(); - treeSig = 0; - treeBkg = 0; + treeSig = nullptr; + treeBkg = nullptr; file.reset(); } vars.clear(); diff --git a/PhysicsTools/MVATrainer/plugins/mlp_gen.cc b/PhysicsTools/MVATrainer/plugins/mlp_gen.cc index 0b347e51627e2..cd40a6df69b0c 100644 --- a/PhysicsTools/MVATrainer/plugins/mlp_gen.cc +++ b/PhysicsTools/MVATrainer/plugins/mlp_gen.cc @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include "mlp_gen.h" #include "mlp_sigmoide.h" @@ -451,7 +451,7 @@ dbl MLP_Test_MM(int ifile, dbl *tmp) dbl *tmp; tmp = (dbl *) malloc(2 * NET.Nneur[1] * sizeof(dbl)); - if(tmp == 0) /* not enough memory */ + if(tmp == nullptr) /* not enough memory */ { printf("not enough memory in MLP_Test\n"); err = 0; @@ -2242,13 +2242,13 @@ int nout=0; /* nombre de sorties */ int npon=0; int ntot, ierr; //char **ss; -char **ss=0; +char **ss=nullptr; FILE *LVQpat; int nlayer, nneur[NLMAX]; printf("\nLoading file %s\n",filename); LVQpat=fopen(filename,"r"); -if(LVQpat == 0) return -1; +if(LVQpat == nullptr) return -1; line=0; @@ -2529,11 +2529,11 @@ while(fgets(s,CLEN,LVQpat)) nmax = nin; if(nout>nin) nmax=nout; ss = (char**) malloc((nmax+1)*sizeof(char*)); - if(ss == 0) return -111; + if(ss == nullptr) return -111; for(i=0;i<=nmax;i++) { ss[i]=(char*) malloc(40*sizeof(char)); - if(ss[i] == 0) return -111; + if(ss[i] == nullptr) return -111; } } @@ -2591,7 +2591,7 @@ int CountLexemes(char *s) if (strtok(tmp," ")) { i=1; - while (strtok(NULL," ")) i++; + while (strtok(nullptr," ")) i++; } return i; } @@ -2607,7 +2607,7 @@ void getnLexemes(int n, char *s, char **ss) { strcpy(ss[0],strtok(tmp," ")); for (i=1;i NLMAX) return -3; @@ -3611,7 +3611,7 @@ int GetNetStructure(char *s, int *Nlayer, int *Nneur) { sscanf(strtok(tmp,","),"%d",&(Nneur[0])); for (i=1;i<*Nlayer;i++) - sscanf(strtok(NULL,","),"%d",&(Nneur[i])); + sscanf(strtok(nullptr,","),"%d",&(Nneur[i])); } return 0; diff --git a/PhysicsTools/MVATrainer/plugins/mlp_sigmoide.cc b/PhysicsTools/MVATrainer/plugins/mlp_sigmoide.cc index d061344d7239b..49ca655adef34 100644 --- a/PhysicsTools/MVATrainer/plugins/mlp_sigmoide.cc +++ b/PhysicsTools/MVATrainer/plugins/mlp_sigmoide.cc @@ -1,4 +1,4 @@ -#include +#include #include "mlp_gen.h" #ifdef __cplusplus diff --git a/PhysicsTools/MVATrainer/src/Interceptor.cc b/PhysicsTools/MVATrainer/src/Interceptor.cc index 430b6ee7010f6..f74e16eb47693 100644 --- a/PhysicsTools/MVATrainer/src/Interceptor.cc +++ b/PhysicsTools/MVATrainer/src/Interceptor.cc @@ -30,10 +30,10 @@ class Interceptor : public VarProcessor { Interceptor(const char *name, const Calibration::Interceptor *calib, const MVAComputer *computer); - virtual ~Interceptor(); + ~Interceptor() override; - virtual void configure(ConfIterator iter, unsigned int n) override; - virtual void eval(ValueIterator iter, unsigned int n) const override; + void configure(ConfIterator iter, unsigned int n) override; + void eval(ValueIterator iter, unsigned int n) const override; private: Calibration::Interceptor *interceptor; @@ -47,7 +47,7 @@ Interceptor::Interceptor(const char *name, const MVAComputer *computer) : VarProcessor(name, calib, computer), interceptor(const_cast(calib)), - values(0) + values(nullptr) { } diff --git a/PhysicsTools/MVATrainer/src/MVATrainer.cc b/PhysicsTools/MVATrainer/src/MVATrainer.cc index 587f654bf684e..2a3b3de76218c 100644 --- a/PhysicsTools/MVATrainer/src/MVATrainer.cc +++ b/PhysicsTools/MVATrainer/src/MVATrainer.cc @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -44,18 +44,18 @@ namespace { // anonymous class BaseInterceptor : public Calibration::Interceptor { public: - BaseInterceptor() : calib(0) {} - virtual ~BaseInterceptor() {} + BaseInterceptor() : calib(nullptr) {} + ~BaseInterceptor() override {} inline void setCalibration(MVATrainerComputer *calib) { this->calib = calib; } - virtual std::vector + std::vector configure(const MVAComputer *computer, unsigned int n, - const std::vector &flags) = 0; + const std::vector &flags) override = 0; - virtual double - intercept(const std::vector *values) const = 0; + double + intercept(const std::vector *values) const override = 0; virtual void init() {} virtual void finish(bool save) {} @@ -67,32 +67,32 @@ namespace { // anonymous class InitInterceptor : public BaseInterceptor { public: InitInterceptor() {} - virtual ~InitInterceptor() {} + ~InitInterceptor() override {} - virtual std::vector + std::vector configure(const MVAComputer *computer, unsigned int n, const std::vector &flags) override; - virtual double + double intercept(const std::vector *values) const override; }; class TrainInterceptor : public BaseInterceptor { public: TrainInterceptor(TrainProcessor *proc) : proc(proc) {} - virtual ~TrainInterceptor() {} + ~TrainInterceptor() override {} inline TrainProcessor *getProcessor() const { return proc; } - virtual std::vector + std::vector configure(const MVAComputer *computer, unsigned int n, const std::vector &flags) override; - virtual double + double intercept(const std::vector *values) const override; - virtual void init() override; - virtual void finish(bool save) override; + void init() override; + void finish(bool save) override; private: unsigned int targetIdx; @@ -109,11 +109,11 @@ namespace { // anonymous &interceptors, bool autoSave, UInt_t seed, double split); - virtual ~MVATrainerComputer(); + ~MVATrainerComputer() override; - virtual std::vector + std::vector getProcessors() const override; - virtual void initFlags(std::vector + void initFlags(std::vector &flags) const override; void configured(BaseInterceptor *interceptor) const; @@ -264,7 +264,7 @@ double TrainInterceptor::intercept(const std::vector *values) const { if (values[targetIdx].size() != 1) { - if (values[targetIdx].size() == 0) + if (values[targetIdx].empty()) throw cms::Exception("MVATrainer") << "Trainer input lacks target variable." << std::endl; @@ -421,7 +421,7 @@ static std::string escape(const std::string &in) MVATrainer::MVATrainer(const std::string &fileName, bool useXSLT, const char *styleSheet) : - input(0), output(0), name("MVATrainer"), + input(nullptr), output(nullptr), name("MVATrainer"), doAutoSave(true), doCleanup(false), doMonitoring(false), randomSeed(65539), crossValidation(0.0) { @@ -621,10 +621,10 @@ void MVATrainer::saveState() void MVATrainer::makeProcessor(DOMElement *elem, AtomicId id, const char *name) { - DOMElement *xmlInput = 0; - DOMElement *xmlConfig = 0; - DOMElement *xmlOutput = 0; - DOMElement *xmlData = 0; + DOMElement *xmlInput = nullptr; + DOMElement *xmlConfig = nullptr; + DOMElement *xmlOutput = nullptr; + DOMElement *xmlData = nullptr; static struct NameExpect { const char *tag; @@ -635,7 +635,7 @@ void MVATrainer::makeProcessor(DOMElement *elem, AtomicId id, const char *name) { "config", true, &xmlConfig }, { "output", true, &xmlOutput }, { "data", false, &xmlData }, - { 0, } + { nullptr, } }; const NameExpect *cur = expect; @@ -701,7 +701,7 @@ std::string MVATrainer::trainFileName(const TrainProcessor *proc, const std::string &ext, const std::string &arg) const { - std::string arg_ = arg.size() > 0 ? ("_" + arg) : ""; + std::string arg_ = !arg.empty() ? ("_" + arg) : ""; return stdStringPrintf(trainFileMask.c_str(), (const char*)proc->getName(), arg_.c_str(), ext.c_str()); @@ -710,7 +710,7 @@ std::string MVATrainer::trainFileName(const TrainProcessor *proc, TrainerMonitoring::Module *MVATrainer::bookMonitor(const std::string &name) { if (!doMonitoring) - return 0; + return nullptr; if (!monitoring.get()) { std::string fileName = @@ -726,7 +726,7 @@ SourceVariable *MVATrainer::getVariable(AtomicId source, AtomicId name) const { std::map::const_iterator pos = sources.find(source); if (pos == sources.end()) - return 0; + return nullptr; return pos->second->getOutput(name); } @@ -736,7 +736,7 @@ SourceVariable *MVATrainer::createVariable(Source *source, AtomicId name, { SourceVariable *var = getVariable(source->getName(), name); if (var) - return 0; + return nullptr; var = new SourceVariable(source, name, flags); variables.push_back(var); @@ -747,8 +747,8 @@ void MVATrainer::fillInputVars(SourceVariableSet &vars, XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *xml) { std::vector tmp; - SourceVariable *target = 0; - SourceVariable *weight = 0; + SourceVariable *target = nullptr; + SourceVariable *weight = nullptr; for(DOMNode *node = xml->getFirstChild(); node; node = node->getNextSibling()) { @@ -910,7 +910,7 @@ MVATrainer::connectProcessors(Calibration::MVAComputer *calib, for(std::vector::const_iterator iter = procs.begin(); iter != procs.end(); iter++) { bool isInterceptor = dynamic_cast( - iter->calib) != 0; + iter->calib) != nullptr; BitSet inputSet(size); @@ -980,7 +980,7 @@ MVATrainer::makeTrainCalibration(const AtomicId *compute, BaseInterceptor *interceptor = new InitInterceptor; baseInterceptors.push_back(std::make_pair(0, interceptor)); - processors.push_back(CalibratedProcessor(0, interceptor)); + processors.push_back(CalibratedProcessor(nullptr, interceptor)); for(const AtomicId *iter = train; *iter; iter++) { TrainProcessor *source; @@ -1160,7 +1160,7 @@ Calibration::MVAComputer *MVATrainer::getCalibration() const dynamic_cast(pos->second); assert(source); if (!source->isTrained()) - return 0; + return nullptr; Calibration::VarProcessor *proc = source->getCalibration(); if (!proc) @@ -1244,10 +1244,10 @@ Calibration::MVAComputer *MVATrainer::getTrainCalibration() const findUntrainedComputers(compute, train); if (train.empty()) - return 0; + return nullptr; - compute.push_back(0); - train.push_back(0); + compute.push_back(nullptr); + train.push_back(nullptr); return makeTrainCalibration(&compute.front(), &train.front()); } diff --git a/PhysicsTools/MVATrainer/src/MVATrainerContainerSave.cc b/PhysicsTools/MVATrainer/src/MVATrainerContainerSave.cc index 1ce2ba0af7f44..ff9403ef6b1ec 100644 --- a/PhysicsTools/MVATrainer/src/MVATrainerContainerSave.cc +++ b/PhysicsTools/MVATrainer/src/MVATrainerContainerSave.cc @@ -37,14 +37,14 @@ void MVATrainerContainerSave::analyze(const edm::Event& event, if (calib.get() || saved) return; - const Calibration::MVAComputerContainer *toPutCalib = 0; + const Calibration::MVAComputerContainer *toPutCalib = nullptr; if (!toPut.empty()) { toPutCalib = getToPut(es); if (MVATrainerLooper::isUntrained(toPutCalib)) return; } - const Calibration::MVAComputerContainer *toCopyCalib = 0; + const Calibration::MVAComputerContainer *toCopyCalib = nullptr; if (!toCopy.empty()) toCopyCalib = getToCopy(es); @@ -78,7 +78,7 @@ void MVATrainerContainerSave::endJob() dbService->createNewIOV( calib.release(), dbService->beginOfTime(), - dbService->endOfTime(), getRecordName().c_str()); + dbService->endOfTime(), getRecordName()); saved = true; } diff --git a/PhysicsTools/MVATrainer/src/MVATrainerLooper.cc b/PhysicsTools/MVATrainer/src/MVATrainerLooper.cc index 21e0493bcb1b0..0fa91282aee94 100644 --- a/PhysicsTools/MVATrainer/src/MVATrainerLooper.cc +++ b/PhysicsTools/MVATrainer/src/MVATrainerLooper.cc @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/PhysicsTools/MVATrainer/src/MVATrainerSave.cc b/PhysicsTools/MVATrainer/src/MVATrainerSave.cc index fa5c5d3e6b649..2b7c892e30d27 100644 --- a/PhysicsTools/MVATrainer/src/MVATrainerSave.cc +++ b/PhysicsTools/MVATrainer/src/MVATrainerSave.cc @@ -61,7 +61,7 @@ void MVATrainerSave::endJob() dbService->createNewIOV( calib.release(), dbService->beginOfTime(), - dbService->endOfTime(), getRecordName().c_str()); + dbService->endOfTime(), getRecordName()); saved = true; } diff --git a/PhysicsTools/MVATrainer/src/ProcCategory.cc b/PhysicsTools/MVATrainer/src/ProcCategory.cc index 6afc4dd36f9c8..f122078f5b998 100644 --- a/PhysicsTools/MVATrainer/src/ProcCategory.cc +++ b/PhysicsTools/MVATrainer/src/ProcCategory.cc @@ -39,10 +39,10 @@ class ProcCategory : public TrainProcessor { ProcCategory(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcCategory(); + ~ProcCategory() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; private: typedef Calibration::ProcCategory::BinLimits BinLimits; diff --git a/PhysicsTools/MVATrainer/src/ProcClassed.cc b/PhysicsTools/MVATrainer/src/ProcClassed.cc index 376dd6ba5d15d..37a797869ba24 100644 --- a/PhysicsTools/MVATrainer/src/ProcClassed.cc +++ b/PhysicsTools/MVATrainer/src/ProcClassed.cc @@ -28,10 +28,10 @@ class ProcClassed : public TrainProcessor { typedef TrainProcessor::Registry::Type Registry; ProcClassed(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcClassed(); + ~ProcClassed() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; private: unsigned int count; diff --git a/PhysicsTools/MVATrainer/src/ProcCount.cc b/PhysicsTools/MVATrainer/src/ProcCount.cc index 3263e71dbff98..429056eb6ee67 100644 --- a/PhysicsTools/MVATrainer/src/ProcCount.cc +++ b/PhysicsTools/MVATrainer/src/ProcCount.cc @@ -23,10 +23,10 @@ class ProcCount : public TrainProcessor { ProcCount(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcCount(); + ~ProcCount() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; private: std::vector neutrals; diff --git a/PhysicsTools/MVATrainer/src/ProcForeach.cc b/PhysicsTools/MVATrainer/src/ProcForeach.cc index ae5c0c0747121..13530f5f7f54c 100644 --- a/PhysicsTools/MVATrainer/src/ProcForeach.cc +++ b/PhysicsTools/MVATrainer/src/ProcForeach.cc @@ -23,10 +23,10 @@ class ProcForeach : public TrainProcessor { ProcForeach(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcForeach(); + ~ProcForeach() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; private: unsigned int count; diff --git a/PhysicsTools/MVATrainer/src/ProcLikelihood.cc b/PhysicsTools/MVATrainer/src/ProcLikelihood.cc index 709600e953754..cbe16a6b46c06 100644 --- a/PhysicsTools/MVATrainer/src/ProcLikelihood.cc +++ b/PhysicsTools/MVATrainer/src/ProcLikelihood.cc @@ -34,18 +34,18 @@ class ProcLikelihood : public TrainProcessor { ProcLikelihood(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcLikelihood(); + ~ProcLikelihood() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; - virtual void trainBegin() override; - virtual void trainData(const std::vector *values, + void trainBegin() override; + void trainData(const std::vector *values, bool target, double weight) override; - virtual void trainEnd() override; + void trainEnd() override; - virtual bool load() override; - virtual void save() override; + bool load() override; + void save() override; struct PDF { std::vector distr; @@ -678,7 +678,7 @@ bool ProcLikelihood::load() << std::endl; elem = static_cast(node); - SigBkg *pdf = 0; + SigBkg *pdf = nullptr; switch(version) { case 1: if (cur == pdfs.end()) @@ -707,7 +707,7 @@ bool ProcLikelihood::load() node && node->getNodeType() != DOMNode::ELEMENT_NODE; node = node->getNextSibling()); DOMElement *elemSig = - node ? static_cast(node) : 0; + node ? static_cast(node) : nullptr; for(node = node->getNextSibling(); node && node->getNodeType() != DOMNode::ELEMENT_NODE; @@ -715,7 +715,7 @@ bool ProcLikelihood::load() while(node && node->getNodeType() != DOMNode::ELEMENT_NODE) node = node->getNextSibling(); DOMElement *elemBkg = - node ? static_cast(node) : 0; + node ? static_cast(node) : nullptr; for(node = node->getNextSibling(); node && node->getNodeType() != DOMNode::ELEMENT_NODE; diff --git a/PhysicsTools/MVATrainer/src/ProcLinear.cc b/PhysicsTools/MVATrainer/src/ProcLinear.cc index 9df80bebf6f7b..9297f84408e6f 100644 --- a/PhysicsTools/MVATrainer/src/ProcLinear.cc +++ b/PhysicsTools/MVATrainer/src/ProcLinear.cc @@ -25,21 +25,21 @@ class ProcLinear : public TrainProcessor { ProcLinear(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcLinear(); + ~ProcLinear() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; - virtual void trainBegin() override; - virtual void trainData(const std::vector *values, + void trainBegin() override; + void trainData(const std::vector *values, bool target, double weight) override; - virtual void trainEnd() override; + void trainEnd() override; - virtual bool load() override; - virtual void save() override; + bool load() override; + void save() override; protected: - virtual void *requestObject(const std::string &name) const override; + void *requestObject(const std::string &name) const override; private: enum Iteration { @@ -148,7 +148,7 @@ void *ProcLinear::requestObject(const std::string &name) const if (name == "linearAnalyzer") return static_cast(ls.get()); - return 0; + return nullptr; } bool ProcLinear::load() diff --git a/PhysicsTools/MVATrainer/src/ProcMatrix.cc b/PhysicsTools/MVATrainer/src/ProcMatrix.cc index 77fb376ac1da8..e4acc786b6ce6 100644 --- a/PhysicsTools/MVATrainer/src/ProcMatrix.cc +++ b/PhysicsTools/MVATrainer/src/ProcMatrix.cc @@ -29,21 +29,21 @@ class ProcMatrix : public TrainProcessor { ProcMatrix(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcMatrix(); + ~ProcMatrix() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; - virtual void trainBegin() override; - virtual void trainData(const std::vector *values, + void trainBegin() override; + void trainData(const std::vector *values, bool target, double weight) override; - virtual void trainEnd() override; + void trainEnd() override; - virtual bool load() override; - virtual void save() override; + bool load() override; + void save() override; protected: - virtual void *requestObject(const std::string &name) const override; + void *requestObject(const std::string &name) const override; private: enum Iteration { @@ -130,7 +130,7 @@ void ProcMatrix::configure(DOMElement *elem) Calibration::VarProcessor *ProcMatrix::getCalibration() const { if (doRanking) - return 0; + return nullptr; Calibration::ProcMatrix *calib = new Calibration::ProcMatrix; @@ -268,7 +268,7 @@ void *ProcMatrix::requestObject(const std::string &name) const if (name == "linearAnalyzer") return static_cast(ls.get()); - return 0; + return nullptr; } bool ProcMatrix::load() diff --git a/PhysicsTools/MVATrainer/src/ProcMultiply.cc b/PhysicsTools/MVATrainer/src/ProcMultiply.cc index 6761a0abac169..f5cd1c8d3aabc 100644 --- a/PhysicsTools/MVATrainer/src/ProcMultiply.cc +++ b/PhysicsTools/MVATrainer/src/ProcMultiply.cc @@ -30,10 +30,10 @@ class ProcMultiply : public TrainProcessor { ProcMultiply(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcMultiply(); + ~ProcMultiply() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; private: typedef std::vector Config; diff --git a/PhysicsTools/MVATrainer/src/ProcNormalize.cc b/PhysicsTools/MVATrainer/src/ProcNormalize.cc index 7b72728daa385..9ab9b722d4df4 100644 --- a/PhysicsTools/MVATrainer/src/ProcNormalize.cc +++ b/PhysicsTools/MVATrainer/src/ProcNormalize.cc @@ -34,18 +34,18 @@ class ProcNormalize : public TrainProcessor { ProcNormalize(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcNormalize(); + ~ProcNormalize() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; - virtual void trainBegin() override; - virtual void trainData(const std::vector *values, + void trainBegin() override; + void trainData(const std::vector *values, bool target, double weight) override; - virtual void trainEnd() override; + void trainEnd() override; - virtual bool load() override; - virtual void save() override; + bool load() override; + void save() override; private: enum Iteration { @@ -426,7 +426,7 @@ bool ProcNormalize::load() << std::endl; elem = static_cast(node); - PDF *pdf = 0; + PDF *pdf = nullptr; switch(version) { case 1: if (cur == pdfs.end()) diff --git a/PhysicsTools/MVATrainer/src/ProcOptional.cc b/PhysicsTools/MVATrainer/src/ProcOptional.cc index 654b3cc6aecc2..16dba45afe121 100644 --- a/PhysicsTools/MVATrainer/src/ProcOptional.cc +++ b/PhysicsTools/MVATrainer/src/ProcOptional.cc @@ -28,10 +28,10 @@ class ProcOptional : public TrainProcessor { ProcOptional(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcOptional(); + ~ProcOptional() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; private: std::vector neutrals; diff --git a/PhysicsTools/MVATrainer/src/ProcSort.cc b/PhysicsTools/MVATrainer/src/ProcSort.cc index 1ea0aa20c28f0..fcfce1c9e95e6 100644 --- a/PhysicsTools/MVATrainer/src/ProcSort.cc +++ b/PhysicsTools/MVATrainer/src/ProcSort.cc @@ -38,10 +38,10 @@ class ProcSort : public TrainProcessor { typedef TrainProcessor::Registry::Type Registry; ProcSort(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcSort(); + ~ProcSort() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; private: unsigned int sortByIndex; diff --git a/PhysicsTools/MVATrainer/src/ProcSplitter.cc b/PhysicsTools/MVATrainer/src/ProcSplitter.cc index 27accebd99043..3399dad53a9e3 100644 --- a/PhysicsTools/MVATrainer/src/ProcSplitter.cc +++ b/PhysicsTools/MVATrainer/src/ProcSplitter.cc @@ -23,10 +23,10 @@ class ProcSplitter : public TrainProcessor { ProcSplitter(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~ProcSplitter(); + ~ProcSplitter() override; - virtual void configure(DOMElement *elem) override; - virtual Calibration::VarProcessor *getCalibration() const override; + void configure(DOMElement *elem) override; + Calibration::VarProcessor *getCalibration() const override; private: unsigned int count; diff --git a/PhysicsTools/MVATrainer/src/SourceVariableSet.cc b/PhysicsTools/MVATrainer/src/SourceVariableSet.cc index 12f0c353f7d11..2c803ed56f9a1 100644 --- a/PhysicsTools/MVATrainer/src/SourceVariableSet.cc +++ b/PhysicsTools/MVATrainer/src/SourceVariableSet.cc @@ -37,7 +37,7 @@ SourceVariable *SourceVariableSet::find(AtomicId name) const name, PosVar::VarNameLess); if (pos == vars.end() || pos->var->getName() != name) - return 0; + return nullptr; return pos->var; } @@ -49,7 +49,7 @@ SourceVariable *SourceVariableSet::find(Magic magic) const if (pos->magic == magic) return pos->var; - return 0; + return nullptr; } std::vector SourceVariableSet::get(bool withMagic) const diff --git a/PhysicsTools/MVATrainer/src/TrainProcessor.cc b/PhysicsTools/MVATrainer/src/TrainProcessor.cc index cbd1e6d404c2b..e1f2a837fb375 100644 --- a/PhysicsTools/MVATrainer/src/TrainProcessor.cc +++ b/PhysicsTools/MVATrainer/src/TrainProcessor.cc @@ -20,7 +20,7 @@ namespace PhysicsTools { TrainProcessor::TrainProcessor(const char *name, const AtomicId *id, MVATrainer *trainer) : - Source(*id), name(name), trainer(trainer), monitoring(0), monModule(0) + Source(*id), name(name), trainer(trainer), monitoring(nullptr), monModule(nullptr) { } @@ -44,7 +44,7 @@ void TrainProcessor::doTrainBegin() nBins = 400; } - booked = monModule != 0; + booked = monModule != nullptr; } if (booked) { @@ -141,7 +141,7 @@ void TrainProcessor::doTrainEnd() } } - monModule = 0; + monModule = nullptr; } } diff --git a/PhysicsTools/MVATrainer/src/TreeSaver.cc b/PhysicsTools/MVATrainer/src/TreeSaver.cc index 483b8f81ef13d..fd24b681cec89 100644 --- a/PhysicsTools/MVATrainer/src/TreeSaver.cc +++ b/PhysicsTools/MVATrainer/src/TreeSaver.cc @@ -51,15 +51,15 @@ class TreeSaver : public TrainProcessor { TreeSaver(const char *name, const AtomicId *id, MVATrainer *trainer); - virtual ~TreeSaver(); + ~TreeSaver() override; - virtual void configure(DOMElement *elem) override; - virtual void passFlags(const std::vector &flags) override; + void configure(DOMElement *elem) override; + void passFlags(const std::vector &flags) override; - virtual void trainBegin() override; - virtual void trainData(const std::vector *values, + void trainBegin() override; + void trainData(const std::vector *values, bool target, double weight) override; - virtual void trainEnd() override; + void trainEnd() override; private: void init(); @@ -96,7 +96,7 @@ TreeSaver::Registry registry("TreeSaver"); TreeSaver::TreeSaver(const char *name, const AtomicId *id, MVATrainer *trainer) : TrainProcessor(name, id, trainer), - iteration(ITER_EXPORT), tree(0), flagsPassed(false), begun(false) + iteration(ITER_EXPORT), tree(nullptr), flagsPassed(false), begun(false) { } @@ -133,7 +133,7 @@ void TreeSaver::configure(DOMElement *elem) Var var; var.name = name; var.flags = Variable::FLAG_NONE; - var.ptr = 0; + var.ptr = nullptr; vars.push_back(var); } } diff --git a/PhysicsTools/MVATrainer/src/XMLDocument.cc b/PhysicsTools/MVATrainer/src/XMLDocument.cc index 112696adcd885..eee6665964160 100644 --- a/PhysicsTools/MVATrainer/src/XMLDocument.cc +++ b/PhysicsTools/MVATrainer/src/XMLDocument.cc @@ -1,11 +1,11 @@ -#include +#include #include #include #include #include #include #include -#include +#include #include #include "FWCore/Concurrency/interface/Xerces.h" @@ -46,9 +46,9 @@ namespace { // anonymous typedef typename T::Stream_t Stream_t; XMLInputSourceWrapper(std::unique_ptr& obj) : obj(obj) {} - virtual ~XMLInputSourceWrapper() {} + ~XMLInputSourceWrapper() override {} - virtual XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream* + XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream* makeStream() const override { return new T(*obj); } @@ -62,14 +62,14 @@ namespace { // anonymous typedef std::istream Stream_t; STLInputStream(std::istream &in) : in(in) {} - virtual ~STLInputStream() {} + ~STLInputStream() override {} - virtual XMLFilePos curPos() const override { return pos; } + XMLFilePos curPos() const override { return pos; } - virtual XMLSize_t readBytes(XMLByte *const buf, + XMLSize_t readBytes(XMLByte *const buf, const XMLSize_t size) override; - virtual const XMLCh* getContentType() const override { return 0; } + const XMLCh* getContentType() const override { return nullptr; } private: std::istream ∈ @@ -86,7 +86,7 @@ namespace { // anonymous file_(file), filebuf_(file, std::ios_base::in) { this->init(&filebuf_); } - ~stdio_istream() + ~stdio_istream() override { close(file_); } __filebuf_type *rdbuf() const @@ -144,7 +144,7 @@ XMLDocument::XercesPlatform::~XercesPlatform() XMLDocument::XMLDocument(const std::string &fileName, bool write) : platform(new XercesPlatform()), fileName(fileName), - write(write), impl(0), doc(0), rootNode(0) + write(write), impl(nullptr), doc(nullptr), rootNode(nullptr) { if (write) openForWrite(fileName); @@ -163,7 +163,7 @@ XMLDocument::XMLDocument(const std::string &fileName, bool write) : XMLDocument::XMLDocument(const std::string &fileName, const std::string &command) : platform(new XercesPlatform()), fileName(fileName), - write(false), impl(0), doc(0), rootNode(0) + write(false), impl(nullptr), doc(nullptr), rootNode(nullptr) { FILE *file = popen(command.c_str(), "r"); if (!file) @@ -272,7 +272,7 @@ DOMDocument *XMLDocument::createDocument(const std::string &root) << "Document already exists in createDocument." << std::endl; - doc = impl->createDocument(0, XMLUniStr(root.c_str()), 0); + doc = impl->createDocument(nullptr, XMLUniStr(root.c_str()), nullptr); rootNode = doc->getDocumentElement(); return doc; diff --git a/PhysicsTools/ParallelAnalysis/interface/TSelectorAnalyzer.h b/PhysicsTools/ParallelAnalysis/interface/TSelectorAnalyzer.h index 40a8379d9731b..3aeb4af567670 100644 --- a/PhysicsTools/ParallelAnalysis/interface/TSelectorAnalyzer.h +++ b/PhysicsTools/ParallelAnalysis/interface/TSelectorAnalyzer.h @@ -7,7 +7,7 @@ template class TSelectorAnalyzer : public edm::EDAnalyzer { public: TSelectorAnalyzer( const edm::ParameterSet & cfg ) : - list_(), algo_( 0, list_ ) { + list_(), algo_( nullptr, list_ ) { } void analyze( const edm::Event & evt, const edm::EventSetup & ) override { algo_.process( evt ); diff --git a/PhysicsTools/ParallelAnalysis/interface/TrackTSelector.h b/PhysicsTools/ParallelAnalysis/interface/TrackTSelector.h index d0a3d735f3d62..b92468ab9a6ec 100755 --- a/PhysicsTools/ParallelAnalysis/interface/TrackTSelector.h +++ b/PhysicsTools/ParallelAnalysis/interface/TrackTSelector.h @@ -22,9 +22,9 @@ namespace examples { /// default constructor TrackTSelector(); /// begin processing - void begin( TList * & ); + void begin( TList * & ) override; /// terminate processing - void terminate( TList & ); + void terminate( TList & ) override; ClassDef(TrackTSelector,2) private: diff --git a/PhysicsTools/ParallelAnalysis/src/TrackAnalysisAlgorithm.cc b/PhysicsTools/ParallelAnalysis/src/TrackAnalysisAlgorithm.cc index a868220b37faf..4543fecfa2977 100755 --- a/PhysicsTools/ParallelAnalysis/src/TrackAnalysisAlgorithm.cc +++ b/PhysicsTools/ParallelAnalysis/src/TrackAnalysisAlgorithm.cc @@ -48,7 +48,7 @@ void TrackAnalysisAlgorithm::terminate( TList & out ) { void TrackAnalysisAlgorithm::draw( const TList & out, TCanvas & canvas, const char * k ) { TObject * hist = out.FindObject( k ); - if( 0 != hist ) { + if( nullptr != hist ) { hist->Draw(); canvas.SaveAs( ( string( k ) + ".jpg" ).c_str() ); } else { diff --git a/PhysicsTools/PatAlgos/interface/IsoDepositIsolator.h b/PhysicsTools/PatAlgos/interface/IsoDepositIsolator.h index 33bd5cd85ab4f..cac5c862fdc3b 100644 --- a/PhysicsTools/PatAlgos/interface/IsoDepositIsolator.h +++ b/PhysicsTools/PatAlgos/interface/IsoDepositIsolator.h @@ -13,11 +13,11 @@ class IsoDepositIsolator : public BaseIsolator { IsoDepositIsolator() {} IsoDepositIsolator(const edm::ParameterSet &conf, edm::ConsumesCollector & iC, bool withCut) ; - virtual ~IsoDepositIsolator() ; - virtual void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup) ; - virtual void endEvent() ; + ~IsoDepositIsolator() override ; + void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup) override ; + void endEvent() override ; - virtual std::string description() const ; + std::string description() const override ; protected: enum Mode { Sum, Sum2, SumRelative, Sum2Relative, Max, MaxRelative, Count }; edm::Handle handle_; @@ -29,7 +29,7 @@ class IsoDepositIsolator : public BaseIsolator { bool skipDefaultVeto_; edm::EDGetTokenT inputIsoDepositToken_; - virtual float getValue(const edm::ProductID &id, size_t index) const ; + float getValue(const edm::ProductID &id, size_t index) const override ; }; // class IsoDepositIsolator } } // namespaces diff --git a/PhysicsTools/PatAlgos/interface/OverlapTest.h b/PhysicsTools/PatAlgos/interface/OverlapTest.h index 39a9c642932df..e32cf5ce1b810 100644 --- a/PhysicsTools/PatAlgos/interface/OverlapTest.h +++ b/PhysicsTools/PatAlgos/interface/OverlapTest.h @@ -51,9 +51,9 @@ class BasicOverlapTest : public OverlapTest { pairCut_(iConfig.getParameter("pairCut")) {} // implementation of mother methods /// Read input, apply preselection cut - virtual void readInput(const edm::Event & iEvent, const edm::EventSetup &iSetup) ; + void readInput(const edm::Event & iEvent, const edm::EventSetup &iSetup) override ; /// Check for overlaps - virtual bool fillOverlapsForItem(const reco::Candidate &item, reco::CandidatePtrVector &overlapsToFill) const ; + bool fillOverlapsForItem(const reco::Candidate &item, reco::CandidatePtrVector &overlapsToFill) const override ; protected: // ---- configurables ---- /// A generic preselection cut that can work on any Candidate, but has access also to methods of PAT specific objects @@ -76,11 +76,11 @@ class OverlapBySuperClusterSeed : public OverlapTest { // constructor: nothing except initialize the base class OverlapBySuperClusterSeed(const std::string &name, const edm::ParameterSet &iConfig, edm::ConsumesCollector && iC) : OverlapTest(name, iConfig, iC) {} // every event: nothing except read the input list - virtual void readInput(const edm::Event & iEvent, const edm::EventSetup &iSetup) { + void readInput(const edm::Event & iEvent, const edm::EventSetup &iSetup) override { iEvent.getByToken(srcToken_, others_); } /// Check for overlaps - virtual bool fillOverlapsForItem(const reco::Candidate &item, reco::CandidatePtrVector &overlapsToFill) const ; + bool fillOverlapsForItem(const reco::Candidate &item, reco::CandidatePtrVector &overlapsToFill) const override ; protected: // edm::Handle > others_; edm::Handle others_; diff --git a/PhysicsTools/PatAlgos/interface/PATUserDataMerger.h b/PhysicsTools/PatAlgos/interface/PATUserDataMerger.h index a0b1d8c7b5fea..ac58c08d7d199 100644 --- a/PhysicsTools/PatAlgos/interface/PATUserDataMerger.h +++ b/PhysicsTools/PatAlgos/interface/PATUserDataMerger.h @@ -152,7 +152,7 @@ pat::PATUserDataMerger::add(ObjectType & patObject, edm::Handle userData; // Get the objects by label - if ( encoded.size() == 0 ) continue; + if ( encoded.empty() ) continue; iEvent.getByToken( *token_it, userData ); edm::Ptr recoObject = patObject.originalObjectRef(); diff --git a/PhysicsTools/PatAlgos/interface/SimpleIsolator.h b/PhysicsTools/PatAlgos/interface/SimpleIsolator.h index fbe08cab35cc3..24f8eb2349c28 100644 --- a/PhysicsTools/PatAlgos/interface/SimpleIsolator.h +++ b/PhysicsTools/PatAlgos/interface/SimpleIsolator.h @@ -9,15 +9,15 @@ class SimpleIsolator : public BaseIsolator { typedef edm::ValueMap IsoValueMap; SimpleIsolator() {} SimpleIsolator(const edm::ParameterSet &conf, edm::ConsumesCollector & iC, bool withCut) ; - virtual ~SimpleIsolator() {} - virtual void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup) ; - virtual void endEvent() ; + ~SimpleIsolator() override {} + void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup) override ; + void endEvent() override ; - virtual std::string description() const { return input_.encode(); } + std::string description() const override { return input_.encode(); } protected: edm::Handle handle_; edm::EDGetTokenT inputDoubleToken_; - virtual float getValue(const edm::ProductID &id, size_t index) const { + float getValue(const edm::ProductID &id, size_t index) const override { return handle_->get(id, index); } }; // class SimpleIsolator diff --git a/PhysicsTools/PatAlgos/interface/StringResolutionProvider.h b/PhysicsTools/PatAlgos/interface/StringResolutionProvider.h index bd7dfc9a5e4b2..a3c455f0c259e 100644 --- a/PhysicsTools/PatAlgos/interface/StringResolutionProvider.h +++ b/PhysicsTools/PatAlgos/interface/StringResolutionProvider.h @@ -49,9 +49,9 @@ class StringResolutionProvider : public KinematicResolutionProvider { /// default constructor StringResolutionProvider(const edm::ParameterSet& cfg); /// default destructor - virtual ~StringResolutionProvider(); + ~StringResolutionProvider() override; /// get a CandKinResolution object from the service - virtual pat::CandKinResolution getResolution(const reco::Candidate& cand) const; + pat::CandKinResolution getResolution(const reco::Candidate& cand) const override; private: /// a vector of constrtaints for the CanKinResolution diff --git a/PhysicsTools/PatAlgos/plugins/CaloJetSlimmer.cc b/PhysicsTools/PatAlgos/plugins/CaloJetSlimmer.cc index cb19edea07a46..f328d058ad4e8 100644 --- a/PhysicsTools/PatAlgos/plugins/CaloJetSlimmer.cc +++ b/PhysicsTools/PatAlgos/plugins/CaloJetSlimmer.cc @@ -24,9 +24,9 @@ CaloJetSlimmer( edm::ParameterSet const & params ): produces< reco::CaloJetCollection> (); } - virtual ~CaloJetSlimmer() {} + ~CaloJetSlimmer() override {} - virtual void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override { + void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override { auto caloJets = std::make_unique(); diff --git a/PhysicsTools/PatAlgos/plugins/CandidateSummaryTable.cc b/PhysicsTools/PatAlgos/plugins/CandidateSummaryTable.cc index bc21baf02d240..d882bf17ca741 100644 --- a/PhysicsTools/PatAlgos/plugins/CandidateSummaryTable.cc +++ b/PhysicsTools/PatAlgos/plugins/CandidateSummaryTable.cc @@ -76,13 +76,13 @@ namespace pat { class CandidateSummaryTable : public edm::stream::EDAnalyzer > { public: explicit CandidateSummaryTable(const edm::ParameterSet & iConfig, const pathelpers::RecordCache*); - ~CandidateSummaryTable(); + ~CandidateSummaryTable() override; static std::unique_ptr initializeGlobalCache(edm::ParameterSet const& conf) { return std::make_unique(conf); } - virtual void analyze(const edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void analyze(const edm::Event & iEvent, const edm::EventSetup& iSetup) override; static void globalEndJob(const pathelpers::RecordCache*); diff --git a/PhysicsTools/PatAlgos/plugins/DuplicatedElectronCleaner.cc b/PhysicsTools/PatAlgos/plugins/DuplicatedElectronCleaner.cc index 182c5e8847e2c..b73295fc9aa2f 100644 --- a/PhysicsTools/PatAlgos/plugins/DuplicatedElectronCleaner.cc +++ b/PhysicsTools/PatAlgos/plugins/DuplicatedElectronCleaner.cc @@ -33,9 +33,9 @@ namespace pat{ class DuplicatedElectronCleaner : public edm::global::EDProducer<> { public: explicit DuplicatedElectronCleaner(const edm::ParameterSet & iConfig); - ~DuplicatedElectronCleaner(); + ~DuplicatedElectronCleaner() override; - virtual void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override final; + void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const final; private: const edm::EDGetTokenT > electronSrcToken_; diff --git a/PhysicsTools/PatAlgos/plugins/GenMETExtractor.cc b/PhysicsTools/PatAlgos/plugins/GenMETExtractor.cc index 6eb13d9e0174f..4f42c4f6b31b3 100644 --- a/PhysicsTools/PatAlgos/plugins/GenMETExtractor.cc +++ b/PhysicsTools/PatAlgos/plugins/GenMETExtractor.cc @@ -27,7 +27,7 @@ void GenMETExtractor::produce(edm::StreamID streamID, edm::Event & iEvent, edm::Handle > src; iEvent.getByToken(metSrcToken_, src); - if(src->size()==0) edm::LogError("GenMETExtractor::produce") << "input genMET collection is empty" ; + if(src->empty()) edm::LogError("GenMETExtractor::produce") << "input genMET collection is empty" ; const reco::GenMET *genMet = src->front().genMET(); diff --git a/PhysicsTools/PatAlgos/plugins/GenMETExtractor.h b/PhysicsTools/PatAlgos/plugins/GenMETExtractor.h index ee1046507a7a0..0b40212ac1a23 100644 --- a/PhysicsTools/PatAlgos/plugins/GenMETExtractor.h +++ b/PhysicsTools/PatAlgos/plugins/GenMETExtractor.h @@ -30,10 +30,10 @@ namespace pat { public: explicit GenMETExtractor(const edm::ParameterSet& iConfig); - ~GenMETExtractor(); + ~GenMETExtractor() override; - virtual void produce(edm::StreamID streamID, edm::Event & iEvent, - const edm::EventSetup & iSetup) const; + void produce(edm::StreamID streamID, edm::Event & iEvent, + const edm::EventSetup & iSetup) const override; private: diff --git a/PhysicsTools/PatAlgos/plugins/JetCorrFactorsProducer.h b/PhysicsTools/PatAlgos/plugins/JetCorrFactorsProducer.h index f9b40630e4df7..137978672b1d9 100644 --- a/PhysicsTools/PatAlgos/plugins/JetCorrFactorsProducer.h +++ b/PhysicsTools/PatAlgos/plugins/JetCorrFactorsProducer.h @@ -67,9 +67,9 @@ namespace pat { /// default constructor explicit JetCorrFactorsProducer(const edm::ParameterSet& cfg); /// default destructor - ~JetCorrFactorsProducer() {}; + ~JetCorrFactorsProducer() override {}; /// everything that needs to be done per event - virtual void produce(edm::Event& event, const edm::EventSetup& setup) override; + void produce(edm::Event& event, const edm::EventSetup& setup) override; /// description of configuration file parameters static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); diff --git a/PhysicsTools/PatAlgos/plugins/ModifiedObjectProducer.h b/PhysicsTools/PatAlgos/plugins/ModifiedObjectProducer.h index 4316b212907c6..2f33b7f9d0965 100644 --- a/PhysicsTools/PatAlgos/plugins/ModifiedObjectProducer.h +++ b/PhysicsTools/PatAlgos/plugins/ModifiedObjectProducer.h @@ -31,13 +31,13 @@ namespace pat { //declare products produces(); } - ~ModifiedObjectProducer() {} + ~ModifiedObjectProducer() override {} - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup& evs) override final { + void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup& evs) final { modifier_->setEventContent(evs); } - virtual void produce(edm::Event& evt,const edm::EventSetup& evs) override final { + void produce(edm::Event& evt,const edm::EventSetup& evs) final { edm::Handle > input; auto output = std::make_unique(); diff --git a/PhysicsTools/PatAlgos/plugins/PATCleaner.h b/PhysicsTools/PatAlgos/plugins/PATCleaner.h index 8718e57866c7e..5bbc376cfa6d3 100644 --- a/PhysicsTools/PatAlgos/plugins/PATCleaner.h +++ b/PhysicsTools/PatAlgos/plugins/PATCleaner.h @@ -41,9 +41,9 @@ namespace pat { class PATCleaner : public edm::stream::EDProducer<> { public: explicit PATCleaner(const edm::ParameterSet & iConfig); - virtual ~PATCleaner() {} + ~PATCleaner() override {} - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override final; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) final; private: typedef StringCutObjectSelector Selector; diff --git a/PhysicsTools/PatAlgos/plugins/PATCompositeCandidateProducer.h b/PhysicsTools/PatAlgos/plugins/PATCompositeCandidateProducer.h index e0f727855ea5b..b41ec9cb9ebe9 100644 --- a/PhysicsTools/PatAlgos/plugins/PATCompositeCandidateProducer.h +++ b/PhysicsTools/PatAlgos/plugins/PATCompositeCandidateProducer.h @@ -42,9 +42,9 @@ namespace pat { public: explicit PATCompositeCandidateProducer(const edm::ParameterSet & iConfig); - ~PATCompositeCandidateProducer(); + ~PATCompositeCandidateProducer() override; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; private: diff --git a/PhysicsTools/PatAlgos/plugins/PATConversionProducer.h b/PhysicsTools/PatAlgos/plugins/PATConversionProducer.h index 7483a0b509484..f1cf6a84de6b0 100644 --- a/PhysicsTools/PatAlgos/plugins/PATConversionProducer.h +++ b/PhysicsTools/PatAlgos/plugins/PATConversionProducer.h @@ -39,9 +39,9 @@ namespace pat { public: explicit PATConversionProducer(const edm::ParameterSet & iConfig); - ~PATConversionProducer(); + ~PATConversionProducer() override; - virtual void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; + void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; private: diff --git a/PhysicsTools/PatAlgos/plugins/PATElectronSlimmer.cc b/PhysicsTools/PatAlgos/plugins/PATElectronSlimmer.cc index 729f557dd11a9..96ff51e4d0a27 100644 --- a/PhysicsTools/PatAlgos/plugins/PATElectronSlimmer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATElectronSlimmer.cc @@ -26,10 +26,10 @@ namespace pat { class PATElectronSlimmer : public edm::stream::EDProducer<> { public: explicit PATElectronSlimmer(const edm::ParameterSet & iConfig); - virtual ~PATElectronSlimmer() { } + ~PATElectronSlimmer() override { } - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override final; - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override final; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) final; + void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final; private: const edm::EDGetTokenT > src_; diff --git a/PhysicsTools/PatAlgos/plugins/PATGenCandsFromSimTracksProducer.cc b/PhysicsTools/PatAlgos/plugins/PATGenCandsFromSimTracksProducer.cc index 3842fffe488b6..790f7494c5f48 100644 --- a/PhysicsTools/PatAlgos/plugins/PATGenCandsFromSimTracksProducer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATGenCandsFromSimTracksProducer.cc @@ -29,10 +29,10 @@ namespace pat { class PATGenCandsFromSimTracksProducer : public edm::stream::EDProducer<> { public: explicit PATGenCandsFromSimTracksProducer(const edm::ParameterSet&); - ~PATGenCandsFromSimTracksProducer() {} + ~PATGenCandsFromSimTracksProducer() override {} private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; bool firstEvent_; edm::EDGetTokenT simTracksToken_; @@ -153,7 +153,7 @@ PATGenCandsFromSimTracksProducer::findGeantMother(const SimTrack &tk, const Glob } } } - return 0; + return nullptr; } edm::Ref @@ -162,7 +162,7 @@ PATGenCandsFromSimTracksProducer::findRef(const SimTrack &tk, GlobalContext &g) const SimTrack * simMother = findGeantMother(tk, g); edm::Ref motherRef; - if (simMother != 0) motherRef = findRef(*simMother,g); + if (simMother != nullptr) motherRef = findRef(*simMother,g); if (writeAncestors_) { // If writing ancestors, I need to serialize myself, and then to return a ref to me @@ -209,7 +209,7 @@ reco::GenParticle PATGenCandsFromSimTracksProducer::makeGenParticle_(const SimTrack &tk, const edm::Ref & mother, const GlobalContext &g) const { // Make up a GenParticleCandidate from the GEANT track info. int charge = static_cast(tk.charge()); - Particle::LorentzVector p4 = tk.momentum(); + const Particle::LorentzVector& p4 = tk.momentum(); Particle::Point vtx; // = (0,0,0) by default if (!tk.noVertex()) vtx = g.simvtxs[tk.vertIndex()].position(); GenParticle gp(charge, p4, vtx, tk.type(), setStatus_, true); @@ -297,14 +297,14 @@ void PATGenCandsFromSimTracksProducer::produce(Event& event, if (!motherPdgIds_.empty()) { const SimTrack *motherSimTk = findGeantMother(*isimtrk, globals); - if (motherSimTk == 0) continue; + if (motherSimTk == nullptr) continue; if (motherPdgIds_.find(std::abs(motherSimTk->type())) == motherPdgIds_.end()) continue; } if (makeMotherLink_ || writeAncestors_) { Ref motherRef; const SimTrack * mother = findGeantMother(*isimtrk, globals); - if (mother != 0) motherRef = findRef(*mother, globals); + if (mother != nullptr) motherRef = findRef(*mother, globals); if (motherRef.isNonnull()) genp.addMother(motherRef); } diff --git a/PhysicsTools/PatAlgos/plugins/PATGenericParticleProducer.h b/PhysicsTools/PatAlgos/plugins/PATGenericParticleProducer.h index 8852b86a08016..f38c2e164578d 100644 --- a/PhysicsTools/PatAlgos/plugins/PATGenericParticleProducer.h +++ b/PhysicsTools/PatAlgos/plugins/PATGenericParticleProducer.h @@ -44,9 +44,9 @@ namespace pat { public: explicit PATGenericParticleProducer(const edm::ParameterSet & iConfig); - ~PATGenericParticleProducer(); + ~PATGenericParticleProducer() override; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; private: diff --git a/PhysicsTools/PatAlgos/plugins/PATHeavyIonProducer.cc b/PhysicsTools/PatAlgos/plugins/PATHeavyIonProducer.cc index 739c443defeab..69514a47b1fcd 100644 --- a/PhysicsTools/PatAlgos/plugins/PATHeavyIonProducer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATHeavyIonProducer.cc @@ -46,10 +46,10 @@ using namespace std; class PATHeavyIonProducer : public edm::global::EDProducer<> { public: explicit PATHeavyIonProducer(const edm::ParameterSet&); - ~PATHeavyIonProducer(); + ~PATHeavyIonProducer() override; private: - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; // ----------member data --------------------------- const bool doMC_; diff --git a/PhysicsTools/PatAlgos/plugins/PATHemisphereProducer.h b/PhysicsTools/PatAlgos/plugins/PATHemisphereProducer.h index d27ce7faefa36..2283cef374695 100644 --- a/PhysicsTools/PatAlgos/plugins/PATHemisphereProducer.h +++ b/PhysicsTools/PatAlgos/plugins/PATHemisphereProducer.h @@ -40,9 +40,9 @@ class PATHemisphereProducer : public edm::global::EDProducer<> { public: explicit PATHemisphereProducer(const edm::ParameterSet&); - ~PATHemisphereProducer(); + ~PATHemisphereProducer() override; - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; private: // ----------member data --------------------------- diff --git a/PhysicsTools/PatAlgos/plugins/PATJetProducer.h b/PhysicsTools/PatAlgos/plugins/PATJetProducer.h index 37e70f2b8c2f1..acd99cf9f28d0 100644 --- a/PhysicsTools/PatAlgos/plugins/PATJetProducer.h +++ b/PhysicsTools/PatAlgos/plugins/PATJetProducer.h @@ -49,9 +49,9 @@ namespace pat { public: explicit PATJetProducer(const edm::ParameterSet & iConfig); - ~PATJetProducer(); + ~PATJetProducer() override; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); diff --git a/PhysicsTools/PatAlgos/plugins/PATJetSelector.h b/PhysicsTools/PatAlgos/plugins/PATJetSelector.h index 28f21ba335234..fb7edabfabd47 100644 --- a/PhysicsTools/PatAlgos/plugins/PATJetSelector.h +++ b/PhysicsTools/PatAlgos/plugins/PATJetSelector.h @@ -46,7 +46,7 @@ namespace pat { virtual void beginJob() {} virtual void endJob() {} - virtual bool filter(edm::Event& iEvent, const edm::EventSetup& iSetup) override { + bool filter(edm::Event& iEvent, const edm::EventSetup& iSetup) override { auto patJets = std::make_unique>(); @@ -104,7 +104,7 @@ namespace pat { } // Copy the gen jet - if ( ijet->genJet() != 0 ) { + if ( ijet->genJet() != nullptr ) { genJetsOut->push_back( *(ijet->genJet()) ); } @@ -186,7 +186,7 @@ namespace pat { } // Copy the gen jet - if ( ijet->genJet() != 0 ) { + if ( ijet->genJet() != nullptr ) { patJets->back().updateFwdGenJetFwdRef( edm::Ref( oh_genJetsOut, genJetIndex) // ref to "this" genjet in the global list ); ++genJetIndex; @@ -197,7 +197,7 @@ namespace pat { // put genEvt in Event - bool pass = patJets->size() > 0; + bool pass = !patJets->empty(); iEvent.put(std::move(patJets)); if ( filter_ ) diff --git a/PhysicsTools/PatAlgos/plugins/PATJetSlimmer.cc b/PhysicsTools/PatAlgos/plugins/PATJetSlimmer.cc index eef763454f7b4..7b2efc704df94 100644 --- a/PhysicsTools/PatAlgos/plugins/PATJetSlimmer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATJetSlimmer.cc @@ -26,10 +26,10 @@ namespace pat { class PATJetSlimmer : public edm::stream::EDProducer<> { public: explicit PATJetSlimmer(const edm::ParameterSet & iConfig); - virtual ~PATJetSlimmer() { } + ~PATJetSlimmer() override { } - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override final; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; + void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final; private: edm::EDGetTokenT> pf2pc_; diff --git a/PhysicsTools/PatAlgos/plugins/PATJetUpdater.cc b/PhysicsTools/PatAlgos/plugins/PATJetUpdater.cc index 16fcdf201fc37..02534f4d8f8ec 100755 --- a/PhysicsTools/PatAlgos/plugins/PATJetUpdater.cc +++ b/PhysicsTools/PatAlgos/plugins/PATJetUpdater.cc @@ -50,7 +50,7 @@ PATJetUpdater::PATJetUpdater(const edm::ParameterSet& iConfig) : if ((pos != std::string::npos) && (pos != label.length() - 7)) { label.erase(pos+7); // trim a tail after "JetTags" } - if(it->instance().size()) { + if(!it->instance().empty()) { label = (label+std::string(":")+it->instance()); } discriminatorLabels_.push_back(label); @@ -187,7 +187,7 @@ void PATJetUpdater::produce(edm::Event & iEvent, const edm::EventSetup & iSetup) // set the "forward" ptr to the thinned collection edm::Ptr tagInfoForwardPtr ( h_tagInfosOut.id(), &tagInfosOut->back(), tagInfosOut->size() - 1 ); // set the "backward" ptr to the original collection for association - edm::Ptr tagInfoBackPtr ( match ); + const edm::Ptr& tagInfoBackPtr ( match ); // make FwdPtr TagInfoFwdPtrCollection::value_type tagInfoFwdPtr( tagInfoForwardPtr, tagInfoBackPtr ) ; ajet.addTagInfo(tagInfoLabels_[k], tagInfoFwdPtr ); diff --git a/PhysicsTools/PatAlgos/plugins/PATJetUpdater.h b/PhysicsTools/PatAlgos/plugins/PATJetUpdater.h index ffd61c8dff919..ec368bcdf76ec 100644 --- a/PhysicsTools/PatAlgos/plugins/PATJetUpdater.h +++ b/PhysicsTools/PatAlgos/plugins/PATJetUpdater.h @@ -36,9 +36,9 @@ namespace pat { public: explicit PATJetUpdater(const edm::ParameterSet & iConfig); - ~PATJetUpdater(); + ~PATJetUpdater() override; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); diff --git a/PhysicsTools/PatAlgos/plugins/PATLeptonCountFilter.h b/PhysicsTools/PatAlgos/plugins/PATLeptonCountFilter.h index ac7041eef8dfb..1278d8495e7be 100644 --- a/PhysicsTools/PatAlgos/plugins/PATLeptonCountFilter.h +++ b/PhysicsTools/PatAlgos/plugins/PATLeptonCountFilter.h @@ -24,11 +24,11 @@ namespace pat { public: explicit PATLeptonCountFilter(const edm::ParameterSet & iConfig); - virtual ~PATLeptonCountFilter(); + ~PATLeptonCountFilter() override; private: - virtual bool filter(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; + bool filter(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; private: diff --git a/PhysicsTools/PatAlgos/plugins/PATLostTracks.cc b/PhysicsTools/PatAlgos/plugins/PATLostTracks.cc index 7e71abfe2801a..2a1465d88b8d6 100644 --- a/PhysicsTools/PatAlgos/plugins/PATLostTracks.cc +++ b/PhysicsTools/PatAlgos/plugins/PATLostTracks.cc @@ -38,9 +38,9 @@ namespace pat { class PATLostTracks : public edm::global::EDProducer<> { public: explicit PATLostTracks(const edm::ParameterSet&); - ~PATLostTracks(); + ~PATLostTracks() override; - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; private: enum class TrkStatus { diff --git a/PhysicsTools/PatAlgos/plugins/PATMHTProducer.cc b/PhysicsTools/PatAlgos/plugins/PATMHTProducer.cc index 388d61166989e..276d5f2784b64 100755 --- a/PhysicsTools/PatAlgos/plugins/PATMHTProducer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATMHTProducer.cc @@ -59,7 +59,7 @@ void pat::PATMHTProducer::produce(edm::Event & iEvent, const edm::EventSetup & iSetup) { // make sure the SigInputObj container is empty - while(physobjvector_.size()>0){ + while(!physobjvector_.empty()){ physobjvector_.erase(physobjvector_.begin(),physobjvector_.end()); } @@ -87,7 +87,7 @@ pat::PATMHTProducer::produce(edm::Event & iEvent, const edm::EventSetup & iSetup auto themetsigcoll = std::make_unique(); - if(physobjvector_.size() >= 1) { // Only when the vector is not empty + if(!physobjvector_.empty()) { // Only when the vector is not empty // calculate the MHT significance diff --git a/PhysicsTools/PatAlgos/plugins/PATMHTProducer.h b/PhysicsTools/PatAlgos/plugins/PATMHTProducer.h index 9adb1b8aa5db3..a2b410ee0c606 100644 --- a/PhysicsTools/PatAlgos/plugins/PATMHTProducer.h +++ b/PhysicsTools/PatAlgos/plugins/PATMHTProducer.h @@ -64,10 +64,10 @@ namespace pat { class PATMHTProducer : public edm::stream::EDProducer<> { public: explicit PATMHTProducer(const edm::ParameterSet&); - ~PATMHTProducer(); + ~PATMHTProducer() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; double getJets(edm::Event&, const edm::EventSetup&); double getElectrons(edm::Event&, const edm::EventSetup&); diff --git a/PhysicsTools/PatAlgos/plugins/PATMuonSlimmer.cc b/PhysicsTools/PatAlgos/plugins/PATMuonSlimmer.cc index a91286e6ed295..77589f82a936c 100644 --- a/PhysicsTools/PatAlgos/plugins/PATMuonSlimmer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATMuonSlimmer.cc @@ -26,10 +26,10 @@ namespace pat { class PATMuonSlimmer : public edm::stream::EDProducer<> { public: explicit PATMuonSlimmer(const edm::ParameterSet & iConfig); - virtual ~PATMuonSlimmer() { } + ~PATMuonSlimmer() override { } - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override final; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; + void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final; private: const edm::EDGetTokenT src_; diff --git a/PhysicsTools/PatAlgos/plugins/PATPFParticleProducer.h b/PhysicsTools/PatAlgos/plugins/PATPFParticleProducer.h index 2a3ae6ba5123d..cb31fba33aac8 100644 --- a/PhysicsTools/PatAlgos/plugins/PATPFParticleProducer.h +++ b/PhysicsTools/PatAlgos/plugins/PATPFParticleProducer.h @@ -45,9 +45,9 @@ namespace pat { public: explicit PATPFParticleProducer(const edm::ParameterSet & iConfig); - ~PATPFParticleProducer(); + ~PATPFParticleProducer() override; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; private: diff --git a/PhysicsTools/PatAlgos/plugins/PATPhotonSlimmer.cc b/PhysicsTools/PatAlgos/plugins/PATPhotonSlimmer.cc index 4385aac011c84..2e152d9b25230 100644 --- a/PhysicsTools/PatAlgos/plugins/PATPhotonSlimmer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATPhotonSlimmer.cc @@ -28,10 +28,10 @@ namespace pat { class PATPhotonSlimmer : public edm::stream::EDProducer<> { public: explicit PATPhotonSlimmer(const edm::ParameterSet & iConfig); - virtual ~PATPhotonSlimmer() { } + ~PATPhotonSlimmer() override { } - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override final; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; + void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final; private: const edm::EDGetTokenT > src_; diff --git a/PhysicsTools/PatAlgos/plugins/PATSecondaryVertexSlimmer.cc b/PhysicsTools/PatAlgos/plugins/PATSecondaryVertexSlimmer.cc index 3a633c7091ee1..3123504669eef 100644 --- a/PhysicsTools/PatAlgos/plugins/PATSecondaryVertexSlimmer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATSecondaryVertexSlimmer.cc @@ -22,9 +22,9 @@ namespace pat { class PATSecondaryVertexSlimmer : public edm::global::EDProducer<> { public: explicit PATSecondaryVertexSlimmer(const edm::ParameterSet&); - ~PATSecondaryVertexSlimmer(); + ~PATSecondaryVertexSlimmer() override; - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; private: const edm::EDGetTokenT src_; const edm::EDGetTokenT > srcLegacy_; diff --git a/PhysicsTools/PatAlgos/plugins/PATSingleVertexSelector.cc b/PhysicsTools/PatAlgos/plugins/PATSingleVertexSelector.cc index ca55dd178d8ee..e614d2e7ad24d 100644 --- a/PhysicsTools/PatAlgos/plugins/PATSingleVertexSelector.cc +++ b/PhysicsTools/PatAlgos/plugins/PATSingleVertexSelector.cc @@ -102,7 +102,7 @@ PATSingleVertexSelector::filter(edm::Event & iEvent, const edm::EventSetup & iSe for (std::vector::const_iterator itm = modes_.begin(), endm = modes_.end(); itm != endm; ++itm) { result = filter_(*itm, iEvent, iSetup); // Check if we got any vertices. If so, take them. - if (result->size()) { + if (!result->empty()) { passes = true; break; } diff --git a/PhysicsTools/PatAlgos/plugins/PATSingleVertexSelector.h b/PhysicsTools/PatAlgos/plugins/PATSingleVertexSelector.h index 385ef9408c27c..e19cdd9a9f233 100644 --- a/PhysicsTools/PatAlgos/plugins/PATSingleVertexSelector.h +++ b/PhysicsTools/PatAlgos/plugins/PATSingleVertexSelector.h @@ -30,9 +30,9 @@ namespace pat { public: explicit PATSingleVertexSelector(const edm::ParameterSet & iConfig); - ~PATSingleVertexSelector(); + ~PATSingleVertexSelector() override; - virtual bool filter(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + bool filter(edm::Event & iEvent, const edm::EventSetup& iSetup) override; private: enum Mode { First, NearestToCand, FromCand, FromBeamSpot }; diff --git a/PhysicsTools/PatAlgos/plugins/PATTauIDEmbedder.cc b/PhysicsTools/PatAlgos/plugins/PATTauIDEmbedder.cc index fbf2dca37a75e..2393841715475 100644 --- a/PhysicsTools/PatAlgos/plugins/PATTauIDEmbedder.cc +++ b/PhysicsTools/PatAlgos/plugins/PATTauIDEmbedder.cc @@ -12,9 +12,9 @@ class PATTauIDEmbedder : public edm::stream::EDProducer<> public: explicit PATTauIDEmbedder(const edm::ParameterSet&); - ~PATTauIDEmbedder(){}; + ~PATTauIDEmbedder() override{}; - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: diff --git a/PhysicsTools/PatAlgos/plugins/PATTauSlimmer.cc b/PhysicsTools/PatAlgos/plugins/PATTauSlimmer.cc index b28336b98d8d6..b098bead57dd8 100644 --- a/PhysicsTools/PatAlgos/plugins/PATTauSlimmer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATTauSlimmer.cc @@ -20,10 +20,10 @@ namespace pat { class PATTauSlimmer : public edm::stream::EDProducer<> { public: explicit PATTauSlimmer(const edm::ParameterSet & iConfig); - virtual ~PATTauSlimmer() { } + ~PATTauSlimmer() override { } - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override final; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; + void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) final; private: const edm::EDGetTokenT > src_; diff --git a/PhysicsTools/PatAlgos/plugins/PATTriggerEventProducer.h b/PhysicsTools/PatAlgos/plugins/PATTriggerEventProducer.h index cc6f45b0abd13..ceca10eee8971 100644 --- a/PhysicsTools/PatAlgos/plugins/PATTriggerEventProducer.h +++ b/PhysicsTools/PatAlgos/plugins/PATTriggerEventProducer.h @@ -52,13 +52,13 @@ namespace pat { public: explicit PATTriggerEventProducer( const edm::ParameterSet & iConfig ); - ~PATTriggerEventProducer() {}; + ~PATTriggerEventProducer() override {}; private: - virtual void beginRun(const edm::Run & iRun, const edm::EventSetup& iSetup) override; - virtual void beginLuminosityBlock(const edm::LuminosityBlock & iLumi, const edm::EventSetup& iSetup) override; - virtual void produce( edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void beginRun(const edm::Run & iRun, const edm::EventSetup& iSetup) override; + void beginLuminosityBlock(const edm::LuminosityBlock & iLumi, const edm::EventSetup& iSetup) override; + void produce( edm::Event & iEvent, const edm::EventSetup& iSetup) override; std::string nameProcess_; // configuration bool autoProcessName_; diff --git a/PhysicsTools/PatAlgos/plugins/PATTriggerMatchEmbedder.cc b/PhysicsTools/PatAlgos/plugins/PATTriggerMatchEmbedder.cc index 50f80dfcfa99f..fdda1d7ffb2fe 100644 --- a/PhysicsTools/PatAlgos/plugins/PATTriggerMatchEmbedder.cc +++ b/PhysicsTools/PatAlgos/plugins/PATTriggerMatchEmbedder.cc @@ -49,11 +49,11 @@ namespace pat { public: explicit PATTriggerMatchEmbedder( const edm::ParameterSet & iConfig ); - ~PATTriggerMatchEmbedder() {}; + ~PATTriggerMatchEmbedder() override {}; private: - virtual void produce( edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; + void produce( edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; }; diff --git a/PhysicsTools/PatAlgos/plugins/PATTriggerObjectStandAloneSlimmer.cc b/PhysicsTools/PatAlgos/plugins/PATTriggerObjectStandAloneSlimmer.cc index 70bd3488a44b9..bdcff6fd5092b 100644 --- a/PhysicsTools/PatAlgos/plugins/PATTriggerObjectStandAloneSlimmer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATTriggerObjectStandAloneSlimmer.cc @@ -28,11 +28,11 @@ namespace pat { public: explicit PATTriggerObjectStandAloneSlimmer( const edm::ParameterSet & iConfig ); - ~PATTriggerObjectStandAloneSlimmer() {}; + ~PATTriggerObjectStandAloneSlimmer() override {}; private: - virtual void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; + void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; const edm::EDGetTokenT srcToken_; const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_; diff --git a/PhysicsTools/PatAlgos/plugins/PATTriggerObjectStandAloneUnpacker.cc b/PhysicsTools/PatAlgos/plugins/PATTriggerObjectStandAloneUnpacker.cc index 44daa026e79e6..875a4d7a0a597 100644 --- a/PhysicsTools/PatAlgos/plugins/PATTriggerObjectStandAloneUnpacker.cc +++ b/PhysicsTools/PatAlgos/plugins/PATTriggerObjectStandAloneUnpacker.cc @@ -30,11 +30,11 @@ namespace pat { public: explicit PATTriggerObjectStandAloneUnpacker( const edm::ParameterSet & iConfig ); - ~PATTriggerObjectStandAloneUnpacker() {}; + ~PATTriggerObjectStandAloneUnpacker() override {}; private: - virtual void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; + void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; const edm::EDGetTokenT< TriggerObjectStandAloneCollection > patTriggerObjectsStandAloneToken_; const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_; diff --git a/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.cc b/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.cc index 677b04b4ee402..a3cd45942b1ba 100644 --- a/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.cc +++ b/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.cc @@ -213,7 +213,7 @@ void PATTriggerProducer::beginRun(const Run & iRun, const EventSetup & iSetup ) // Initialize firstInRun_ = true; - l1PSet_ = 0; + l1PSet_ = nullptr; hltConfigInit_ = false; // Initialize process name @@ -377,7 +377,7 @@ void PATTriggerProducer::produce( Event& iEvent, const EventSetup& iSetup ) } unsigned set( hltPrescaleTable.set() ); if ( hltPrescaleTable.size() > 0 ) { - if ( hltPrescaleLabel_.size() > 0 ) { + if ( !hltPrescaleLabel_.empty() ) { bool foundPrescaleLabel( false ); for ( unsigned iLabel = 0; iLabel < hltPrescaleTable.labels().size(); ++iLabel ) { if ( hltPrescaleTable.labels().at( iLabel ) == hltPrescaleLabel_ ) { @@ -426,7 +426,7 @@ void PATTriggerProducer::produce( Event& iEvent, const EventSetup& iSetup ) assert( indexLastFilterPathModules < sizeModulesPath ); std::map< unsigned, std::string > indicesModules; for ( size_t iM = 0; iM < sizeModulesPath; ++iM ) { - const std::string nameModule( hltConfig.moduleLabel( indexPath, iM ) ); + const std::string& nameModule( hltConfig.moduleLabel( indexPath, iM ) ); if ( addPathModuleLabels_ ) { triggerPath.addModule( nameModule ); } @@ -438,7 +438,7 @@ void PATTriggerProducer::produce( Event& iEvent, const EventSetup& iSetup ) indicesModules.insert( std::pair< unsigned, std::string >( slotModule, nameModule ) ); } // add L1 seeds - const L1SeedCollection l1Seeds( hltConfig.hltL1GTSeeds( namePath ) ); + const L1SeedCollection& l1Seeds( hltConfig.hltL1GTSeeds( namePath ) ); for ( L1SeedCollection::const_iterator iSeed = l1Seeds.begin(); iSeed != l1Seeds.end(); ++iSeed ) { triggerPath.addL1Seed( *iSeed ); } @@ -844,12 +844,12 @@ void PATTriggerProducer::produce( Event& iEvent, const EventSetup& iSetup ) handleL1GlobalTriggerObjectMaps->consistencyCheck(); if ( firstInRun_ ) { l1PSet_ = ( ParameterSet* )( pset::Registry::instance()->getMapped(handleL1GlobalTriggerObjectMaps->namesParameterSetID()) ); - if (l1PSet_ == 0) { + if (l1PSet_ == nullptr) { LogError( "l1ObjectMap" ) << "ParameterSet registry not available\n" << "Skipping conditions for all L1 physics algorithm names in this run"; } } else { - if (l1PSet_ == 0) { + if (l1PSet_ == nullptr) { LogInfo( "l1ObjectMap" ) << "ParameterSet registry not available\n" << "Skipping conditions for all L1 physics algorithm names in this event"; } @@ -907,7 +907,7 @@ void PATTriggerProducer::produce( Event& iEvent, const EventSetup& iSetup ) triggerAlgo.setGtlResult( algorithmResult ); // conditions in algorithm L1GlobalTriggerObjectMaps::ConditionsInAlgorithm conditions = handleL1GlobalTriggerObjectMaps->getConditionsInAlgorithm(bit); - if (l1PSet_ == 0) { + if (l1PSet_ == nullptr) { triggerAlgos->push_back( triggerAlgo ); continue; } diff --git a/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.h b/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.h index 375843723d351..2b39d036aa722 100644 --- a/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.h +++ b/PhysicsTools/PatAlgos/plugins/PATTriggerProducer.h @@ -60,13 +60,13 @@ namespace pat { public: explicit PATTriggerProducer( const edm::ParameterSet & iConfig ); - ~PATTriggerProducer() {}; + ~PATTriggerProducer() override {}; private: - virtual void beginRun(const edm::Run & iRun, const edm::EventSetup& iSetup) override; - virtual void beginLuminosityBlock(const edm::LuminosityBlock & iLuminosityBlock, const edm::EventSetup& iSetup) override; - virtual void produce( edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void beginRun(const edm::Run & iRun, const edm::EventSetup& iSetup) override; + void beginLuminosityBlock(const edm::LuminosityBlock & iLuminosityBlock, const edm::EventSetup& iSetup) override; + void produce( edm::Event & iEvent, const edm::EventSetup& iSetup) override; std::string nameProcess_; // configuration bool autoProcessName_; diff --git a/PhysicsTools/PatAlgos/plugins/PackedPFCandidateRefMixer.cc b/PhysicsTools/PatAlgos/plugins/PackedPFCandidateRefMixer.cc index 75bc77a32c0dc..834b3e33e13d7 100644 --- a/PhysicsTools/PatAlgos/plugins/PackedPFCandidateRefMixer.cc +++ b/PhysicsTools/PatAlgos/plugins/PackedPFCandidateRefMixer.cc @@ -22,9 +22,9 @@ namespace pat { class PackedPFCandidateRefMixer : public edm::stream::EDProducer<> { public: explicit PackedPFCandidateRefMixer(const edm::ParameterSet & iConfig); - virtual ~PackedPFCandidateRefMixer() { } + ~PackedPFCandidateRefMixer() override { } - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; private: edm::EDGetTokenT> pf_; diff --git a/PhysicsTools/PatAlgos/plugins/PileupSummaryInfoSlimmer.cc b/PhysicsTools/PatAlgos/plugins/PileupSummaryInfoSlimmer.cc index 65db565017612..12801f013c9cb 100644 --- a/PhysicsTools/PatAlgos/plugins/PileupSummaryInfoSlimmer.cc +++ b/PhysicsTools/PatAlgos/plugins/PileupSummaryInfoSlimmer.cc @@ -15,7 +15,7 @@ class PileupSummaryInfoSlimmer : public edm::global::EDProducer<> { produces >(); } - void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const override final; + void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const final; private: const edm::EDGetTokenT > src_; diff --git a/PhysicsTools/PatAlgos/plugins/RecoMETExtractor.cc b/PhysicsTools/PatAlgos/plugins/RecoMETExtractor.cc index 71cfa255d357c..2fd80901d387b 100644 --- a/PhysicsTools/PatAlgos/plugins/RecoMETExtractor.cc +++ b/PhysicsTools/PatAlgos/plugins/RecoMETExtractor.cc @@ -46,7 +46,7 @@ void RecoMETExtractor::produce(edm::StreamID streamID, edm::Event & iEvent, edm::Handle > src; iEvent.getByToken(metSrcToken_, src); - if(src->size()==0) edm::LogError("RecoMETExtractor::produce") << "input reco MET collection is empty" ; + if(src->empty()) edm::LogError("RecoMETExtractor::produce") << "input reco MET collection is empty" ; std::vector *metCol = new std::vector(); diff --git a/PhysicsTools/PatAlgos/plugins/RecoMETExtractor.h b/PhysicsTools/PatAlgos/plugins/RecoMETExtractor.h index 609cc0dab5ca1..0388ce212603f 100644 --- a/PhysicsTools/PatAlgos/plugins/RecoMETExtractor.h +++ b/PhysicsTools/PatAlgos/plugins/RecoMETExtractor.h @@ -29,10 +29,10 @@ namespace pat { public: explicit RecoMETExtractor(const edm::ParameterSet& iConfig); - ~RecoMETExtractor(); + ~RecoMETExtractor() override; - virtual void produce(edm::StreamID streamID, edm::Event & iEvent, - const edm::EventSetup & iSetup) const; + void produce(edm::StreamID streamID, edm::Event & iEvent, + const edm::EventSetup & iSetup) const override; private: diff --git a/PhysicsTools/PatAlgos/plugins/TauJetCorrFactorsProducer.cc b/PhysicsTools/PatAlgos/plugins/TauJetCorrFactorsProducer.cc index 3a9ce123c9e02..b1a333d4dc7a4 100644 --- a/PhysicsTools/PatAlgos/plugins/TauJetCorrFactorsProducer.cc +++ b/PhysicsTools/PatAlgos/plugins/TauJetCorrFactorsProducer.cc @@ -35,7 +35,7 @@ TauJetCorrFactorsProducer::TauJetCorrFactorsProducer(const edm::ParameterSet& cf } } - if ( payloadMapping.decayModes_.size() > 0 ) payloadMappings_.push_back(payloadMapping); + if ( !payloadMapping.decayModes_.empty() ) payloadMappings_.push_back(payloadMapping); } produces(); @@ -84,7 +84,7 @@ TauJetCorrFactorsProducer::produce(edm::Event& evt, const edm::EventSetup& es) std::vector jec; jec.push_back(std::make_pair(std::string("Uncorrected"), 1.0)); - if ( levels_.size() == 0 ) + if ( levels_.empty() ) throw cms::Exception("No JECFactors") << "You request to create a jetCorrFactors object with no JEC Levels indicated. \n" << "This makes no sense, either you should correct this or drop the module from \n" diff --git a/PhysicsTools/PatAlgos/plugins/TauJetCorrFactorsProducer.h b/PhysicsTools/PatAlgos/plugins/TauJetCorrFactorsProducer.h index e0a0097d56584..e705827ae5af3 100644 --- a/PhysicsTools/PatAlgos/plugins/TauJetCorrFactorsProducer.h +++ b/PhysicsTools/PatAlgos/plugins/TauJetCorrFactorsProducer.h @@ -45,10 +45,10 @@ namespace pat { /// default constructor explicit TauJetCorrFactorsProducer(const edm::ParameterSet&); /// default destructor - ~TauJetCorrFactorsProducer() {}; + ~TauJetCorrFactorsProducer() override {}; /// everything that needs to be done per event - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; private: /// return the jec parameters as input to the FactorizedJetCorrector for different flavors diff --git a/PhysicsTools/PatAlgos/plugins/TrackAndVertexUnpacker.cc b/PhysicsTools/PatAlgos/plugins/TrackAndVertexUnpacker.cc index 114956bd1387a..b0ace9f6b0712 100644 --- a/PhysicsTools/PatAlgos/plugins/TrackAndVertexUnpacker.cc +++ b/PhysicsTools/PatAlgos/plugins/TrackAndVertexUnpacker.cc @@ -31,9 +31,9 @@ namespace pat { public: explicit PATTrackAndVertexUnpacker(const edm::ParameterSet & iConfig); - ~PATTrackAndVertexUnpacker(); + ~PATTrackAndVertexUnpacker() override; - virtual void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; + void produce(edm::StreamID, edm::Event & iEvent, const edm::EventSetup& iSetup) const override; private: typedef std::vector VInputTag; diff --git a/PhysicsTools/PatAlgos/plugins/VertexAssociationProducer.cc b/PhysicsTools/PatAlgos/plugins/VertexAssociationProducer.cc index c074d3380dfbe..6ada741589f76 100644 --- a/PhysicsTools/PatAlgos/plugins/VertexAssociationProducer.cc +++ b/PhysicsTools/PatAlgos/plugins/VertexAssociationProducer.cc @@ -33,9 +33,9 @@ namespace pat { public: explicit PATVertexAssociationProducer(const edm::ParameterSet & iConfig); - ~PATVertexAssociationProducer(); + ~PATVertexAssociationProducer() override; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; private: typedef std::vector VInputTag; diff --git a/PhysicsTools/PatAlgos/src/IsoDepositIsolator.cc b/PhysicsTools/PatAlgos/src/IsoDepositIsolator.cc index a0468be228c01..929055bc510e9 100644 --- a/PhysicsTools/PatAlgos/src/IsoDepositIsolator.cc +++ b/PhysicsTools/PatAlgos/src/IsoDepositIsolator.cc @@ -47,10 +47,10 @@ IsoDepositIsolator::IsoDepositIsolator(const edm::ParameterSet &conf, edm::Consu typedef std::vector vstring; vstring vetos = conf.getParameter< vstring >("vetos"); - reco::isodeposit::EventDependentAbsVeto *evdep = 0; + reco::isodeposit::EventDependentAbsVeto *evdep = nullptr; for (vstring::const_iterator it = vetos.begin(), ed = vetos.end(); it != ed; ++it) { vetos_.push_back( IsoDepositVetoFactory::make( it->c_str(), evdep, iC ) ); - if (evdep != 0) evdepVetos_.push_back(evdep); + if (evdep != nullptr) evdepVetos_.push_back(evdep); } } diff --git a/PhysicsTools/PatAlgos/src/MultiIsolator.cc b/PhysicsTools/PatAlgos/src/MultiIsolator.cc index aefafba989a92..e966b98788650 100644 --- a/PhysicsTools/PatAlgos/src/MultiIsolator.cc +++ b/PhysicsTools/PatAlgos/src/MultiIsolator.cc @@ -45,8 +45,8 @@ MultiIsolator::addIsolator(BaseIsolator *iso, uint32_t mask, pat::IsolationKeys BaseIsolator * MultiIsolator::make(const edm::ParameterSet &conf, edm::ConsumesCollector & iC, bool withCut) { - if (conf.empty()) return 0; - if (conf.exists("placeholder") && conf.getParameter("placeholder")) return 0; + if (conf.empty()) return nullptr; + if (conf.exists("placeholder") && conf.getParameter("placeholder")) return nullptr; if (conf.exists("deltaR")) { return new IsoDepositIsolator(conf, iC, withCut); } else { diff --git a/PhysicsTools/PatAlgos/src/OverlapTest.cc b/PhysicsTools/PatAlgos/src/OverlapTest.cc index 8daf28dc7a15f..8c777ba8eeb3f 100644 --- a/PhysicsTools/PatAlgos/src/OverlapTest.cc +++ b/PhysicsTools/PatAlgos/src/OverlapTest.cc @@ -52,7 +52,7 @@ bool OverlapBySuperClusterSeed::fillOverlapsForItem(const reco::Candidate &item, reco::CandidatePtrVector &overlapsToFill) const { const reco::RecoCandidate * input = dynamic_cast(&item); - if (input == 0) throw cms::Exception("Type Error") << "Input to OverlapBySuperClusterSeed is not a RecoCandidate. " + if (input == nullptr) throw cms::Exception("Type Error") << "Input to OverlapBySuperClusterSeed is not a RecoCandidate. " << "It's a " << typeid(item).name() << "\n"; reco::SuperClusterRef mySC = input->superCluster(); if (mySC.isNull() || !mySC.isAvailable()) { diff --git a/PhysicsTools/PatAlgos/src/VertexingHelper.cc b/PhysicsTools/PatAlgos/src/VertexingHelper.cc index a40a1e51d9e7b..f0a6c04069552 100644 --- a/PhysicsTools/PatAlgos/src/VertexingHelper.cc +++ b/PhysicsTools/PatAlgos/src/VertexingHelper.cc @@ -84,9 +84,9 @@ pat::helper::VertexingHelper::associate(const reco::Candidate &c) const { reco::TrackBaseRef pat::helper::VertexingHelper::getTrack_(const reco::Candidate &c) const { const reco::RecoCandidate *rc = dynamic_cast(&c); - if (rc != 0) { return rc->bestTrackRef(); } + if (rc != nullptr) { return rc->bestTrackRef(); } const reco::PFCandidate *pfc = dynamic_cast(&c); - if (pfc != 0) { return reco::TrackBaseRef(pfc->trackRef()); } + if (pfc != nullptr) { return reco::TrackBaseRef(pfc->trackRef()); } return reco::TrackBaseRef(); } diff --git a/PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.cc b/PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.cc index f989db5980ce2..948a6b3f1253a 100644 --- a/PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.cc +++ b/PhysicsTools/PatExamples/bin/PatBasicFWLiteAnalyzer.cc @@ -56,7 +56,7 @@ int main(int argc, char* argv[]) edm::InputTag muons_( ana.getParameter("muons") ); // book a set of histograms - fwlite::TFileService fs = fwlite::TFileService(outputHandler_.file().c_str()); + fwlite::TFileService fs = fwlite::TFileService(outputHandler_.file()); TFileDirectory dir = fs.mkdir("analyzeBasicPat"); TH1F* muonPt_ = dir.make("muonPt", "pt", 100, 0.,300.); TH1F* muonEta_ = dir.make("muonEta","eta", 100, -3., 3.); diff --git a/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer.cc b/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer.cc index 3181b7d40bbe3..9695ad224709e 100644 --- a/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer.cc +++ b/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer.cc @@ -50,7 +50,7 @@ int main(int argc, char* argv[]) edm::InputTag jets_ ( fwliteParameters.getParameter("jets") ); // book a set of histograms - fwlite::TFileService fs = fwlite::TFileService(output_.c_str()); + fwlite::TFileService fs = fwlite::TFileService(output_); TFileDirectory theDir = fs.mkdir("analyzeBasicPat"); TH1F* jetPt_ = theDir.make("jetPt", "pt", 100, 0.,300.); TH1F* jetEta_ = theDir.make("jetEta","eta", 100, -3., 3.); @@ -98,7 +98,7 @@ int main(int argc, char* argv[]) jetPhi_->Fill( (*jets)[i].phi() ); // access tag infos reco::SecondaryVertexTagInfo const *svTagInfos = (*jets)[i].tagInfoSecondaryVertex("secondaryVertex"); - if( svTagInfos != 0 ) { + if( svTagInfos != nullptr ) { if( svTagInfos->nVertices() > 0 ){ disc_->Fill( svTagInfos->flightDistance(0).value() ); } diff --git a/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer_Selector.cc b/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer_Selector.cc index 14678ef7a4da6..1b6333e50b6d0 100644 --- a/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer_Selector.cc +++ b/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetAnalyzer_Selector.cc @@ -97,9 +97,9 @@ class JetIDStudiesSelector : public EventSelector { } - virtual ~JetIDStudiesSelector() {} + ~JetIDStudiesSelector() override {} - virtual bool operator()( edm::EventBase const & event, pat::strbitset & ret) override{ + bool operator()( edm::EventBase const & event, pat::strbitset & ret) override{ pat::strbitset retCaloJet = jetSel_->getBitTemplate(); pat::strbitset retPFJet = pfJetSel_->getBitTemplate(); @@ -423,7 +423,7 @@ int main (int argc, char* argv[]) hists["hist_fHPD"]->Fill( jet.jetID().fHPD ); hists["hist_nConstituents"]->Fill( jet.nConstituents() ); - if ( useMC && jet.genJet() != 0 ) { + if ( useMC && jet.genJet() != nullptr ) { hists["hist_jetGenEmE"]->Fill( jet.genJet()->emEnergy() ); hists["hist_jetGenHadE"]->Fill( jet.genJet()->hadEnergy() ); hists["hist_jetEoverGenE"]->Fill( jet.energy() / jet.genJet()->energy() ); @@ -511,7 +511,7 @@ int main (int argc, char* argv[]) hists["hist_pf_jetNHF"]->Fill( jet.neutralHadronEnergyFraction() ); - if ( useMC && jet.genJet() != 0 ) { + if ( useMC && jet.genJet() != nullptr ) { hists["hist_pf_jetGenEmE"]->Fill( jet.genJet()->emEnergy() ); hists["hist_pf_jetGenHadE"]->Fill( jet.genJet()->hadEnergy() ); hists["hist_pf_jetEoverGenE"]->Fill( jet.energy() / jet.genJet()->energy() ); diff --git a/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetUnitTest.cc b/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetUnitTest.cc index 9305aa4fb84af..51b8bd687a74f 100644 --- a/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetUnitTest.cc +++ b/PhysicsTools/PatExamples/bin/PatBasicFWLiteJetUnitTest.cc @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) jetEta_->Fill( (*jets)[i].eta() ); jetPhi_->Fill( (*jets)[i].phi() ); reco::SecondaryVertexTagInfo const * svTagInfos = (*jets)[i].tagInfoSecondaryVertex("secondaryVertex"); - if ( svTagInfos != 0 ) { + if ( svTagInfos != nullptr ) { if ( svTagInfos->nVertices() > 0 ) disc_->Fill( svTagInfos->flightDistance(0).value() ); } diff --git a/PhysicsTools/PatExamples/bin/PatCleaningExercise.cc b/PhysicsTools/PatExamples/bin/PatCleaningExercise.cc index dfd67a11dd13a..a77d43aeb85fb 100644 --- a/PhysicsTools/PatExamples/bin/PatCleaningExercise.cc +++ b/PhysicsTools/PatExamples/bin/PatCleaningExercise.cc @@ -51,7 +51,7 @@ int main(int argc, char *argv[]){ edm::InputTag jets_ ( fwliteParameters.getParameter("jets" ) ); // book a set of histograms - fwlite::TFileService fs = fwlite::TFileService(output_.c_str()); + fwlite::TFileService fs = fwlite::TFileService(output_); TFileDirectory theDir = fs.mkdir("analyzePatCleaning"); TH1F* emfAllJets_ = theDir.make("emfAllJets" , "f_{emf}(All Jets)" , 20, 0., 1.); TH1F* emfCleanJets_ = theDir.make("emfCleanJets" , "f_{emf}(Clean Jets)" , 20, 0., 1.); diff --git a/PhysicsTools/PatExamples/bin/PatMuonEDMAnalyzer.cc b/PhysicsTools/PatExamples/bin/PatMuonEDMAnalyzer.cc index 65cf0a7a2e59f..d790291d18aec 100644 --- a/PhysicsTools/PatExamples/bin/PatMuonEDMAnalyzer.cc +++ b/PhysicsTools/PatExamples/bin/PatMuonEDMAnalyzer.cc @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) std::vector inputFiles_ = parser.stringVector("inputFiles"); // book a set of histograms - fwlite::TFileService fs = fwlite::TFileService(outputFile_.c_str()); + fwlite::TFileService fs = fwlite::TFileService(outputFile_); TFileDirectory dir = fs.mkdir("analyzePatMuon"); TH1F* muonPt_ = dir.make("muonPt" , "pt" , 100, 0., 300.); TH1F* muonEta_ = dir.make("muonEta" , "eta" , 100, -3., 3.); diff --git a/PhysicsTools/PatExamples/interface/AnalysisTasksAnalyzerBTag.h b/PhysicsTools/PatExamples/interface/AnalysisTasksAnalyzerBTag.h index 1689fde4e4871..eab6b71d0acf0 100644 --- a/PhysicsTools/PatExamples/interface/AnalysisTasksAnalyzerBTag.h +++ b/PhysicsTools/PatExamples/interface/AnalysisTasksAnalyzerBTag.h @@ -24,13 +24,13 @@ class AnalysisTasksAnalyzerBTag : public edm::BasicAnalyzer { AnalysisTasksAnalyzerBTag(const edm::ParameterSet& cfg, TFileDirectory& fs); AnalysisTasksAnalyzerBTag(const edm::ParameterSet& cfg, TFileDirectory& fs, edm::ConsumesCollector&& iC); /// default destructor - virtual ~AnalysisTasksAnalyzerBTag(); + ~AnalysisTasksAnalyzerBTag() override; /// everything that needs to be done before the event loop - void beginJob(){}; + void beginJob() override{}; /// everything that needs to be done after the event loop - void endJob(){}; + void endJob() override{}; /// everything that needs to be done during the event loop - void analyze(const edm::EventBase& event); + void analyze(const edm::EventBase& event) override; private: /// input tag for mouns diff --git a/PhysicsTools/PatExamples/interface/AnalysisTasksAnalyzerJEC.h b/PhysicsTools/PatExamples/interface/AnalysisTasksAnalyzerJEC.h index b599be4ba2971..d0b4afcb08238 100644 --- a/PhysicsTools/PatExamples/interface/AnalysisTasksAnalyzerJEC.h +++ b/PhysicsTools/PatExamples/interface/AnalysisTasksAnalyzerJEC.h @@ -23,13 +23,13 @@ class AnalysisTasksAnalyzerJEC : public edm::BasicAnalyzer { AnalysisTasksAnalyzerJEC(const edm::ParameterSet& cfg, TFileDirectory& fs); AnalysisTasksAnalyzerJEC(const edm::ParameterSet& cfg, TFileDirectory& fs, edm::ConsumesCollector&& iC); /// default destructor - virtual ~AnalysisTasksAnalyzerJEC(); + ~AnalysisTasksAnalyzerJEC() override; /// everything that needs to be done before the event loop - void beginJob(){}; + void beginJob() override{}; /// everything that needs to be done after the event loop - void endJob(){}; + void endJob() override{}; /// everything that needs to be done during the event loop - void analyze(const edm::EventBase& event); + void analyze(const edm::EventBase& event) override; private: /// input tag for mouns diff --git a/PhysicsTools/PatExamples/interface/PatMuonAnalyzer.h b/PhysicsTools/PatExamples/interface/PatMuonAnalyzer.h index 5e9308fab9768..9fca4d3df503e 100644 --- a/PhysicsTools/PatExamples/interface/PatMuonAnalyzer.h +++ b/PhysicsTools/PatExamples/interface/PatMuonAnalyzer.h @@ -22,13 +22,13 @@ class PatMuonAnalyzer : public edm::BasicAnalyzer { PatMuonAnalyzer(const edm::ParameterSet& cfg, TFileDirectory& fs); PatMuonAnalyzer(const edm::ParameterSet& cfg, TFileDirectory& fs, edm::ConsumesCollector&& iC); /// default destructor - virtual ~PatMuonAnalyzer(){}; + ~PatMuonAnalyzer() override{}; /// everything that needs to be done before the event loop - void beginJob(){}; + void beginJob() override{}; /// everything that needs to be done after the event loop - void endJob(){}; + void endJob() override{}; /// everything that needs to be done during the event loop - void analyze(const edm::EventBase& event); + void analyze(const edm::EventBase& event) override; private: /// input tag for mouns diff --git a/PhysicsTools/PatExamples/plugins/JetEnergyShift.cc b/PhysicsTools/PatExamples/plugins/JetEnergyShift.cc index ea115535e2369..bdebd7c8b824c 100644 --- a/PhysicsTools/PatExamples/plugins/JetEnergyShift.cc +++ b/PhysicsTools/PatExamples/plugins/JetEnergyShift.cc @@ -37,11 +37,11 @@ class JetEnergyShift : public edm::EDProducer { /// default constructor explicit JetEnergyShift(const edm::ParameterSet&); /// default destructor - ~JetEnergyShift(){}; + ~JetEnergyShift() override{}; private: /// rescale jet energy and recalculated MET - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; private: /// jet input collection diff --git a/PhysicsTools/PatExamples/plugins/MuonAnalyzer.cc b/PhysicsTools/PatExamples/plugins/MuonAnalyzer.cc index b3934666b98c7..4053c30aef429 100755 --- a/PhysicsTools/PatExamples/plugins/MuonAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/MuonAnalyzer.cc @@ -85,7 +85,7 @@ void ExampleMuonAnalyzer::analyze(const Event & event, const EventSetup& eventSe // what is the resolution in pt? Easy! We have the association with generated information // cout<pt()<<" "<genParticle()->pt()<genLepton()!=0){ + if( muon->genLepton()!=nullptr){ double reso = (muon->pt() - muon->genLepton()->pt())/muon->genLepton()->pt(); hPtReso->Fill(muon->genLepton()->pt(),reso); } diff --git a/PhysicsTools/PatExamples/plugins/MuonAnalyzer.h b/PhysicsTools/PatExamples/plugins/MuonAnalyzer.h index 7d354509eb7de..2db474869b26a 100755 --- a/PhysicsTools/PatExamples/plugins/MuonAnalyzer.h +++ b/PhysicsTools/PatExamples/plugins/MuonAnalyzer.h @@ -28,14 +28,14 @@ class ExampleMuonAnalyzer: public edm::EDAnalyzer { ExampleMuonAnalyzer(const edm::ParameterSet& pset); /// Destructor - virtual ~ExampleMuonAnalyzer(); + ~ExampleMuonAnalyzer() override; // Operations - void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); + void analyze(const edm::Event & event, const edm::EventSetup& eventSetup) override; - virtual void beginJob() ; - virtual void endJob() ; + void beginJob() override ; + void endJob() override ; protected: private: diff --git a/PhysicsTools/PatExamples/plugins/PatBJetTagAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatBJetTagAnalyzer.cc index 85b2a5fafd1e8..189368a962615 100644 --- a/PhysicsTools/PatExamples/plugins/PatBJetTagAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatBJetTagAnalyzer.cc @@ -21,11 +21,11 @@ class PatBJetTagAnalyzer : public edm::EDAnalyzer { public: /// constructor and destructor PatBJetTagAnalyzer(const edm::ParameterSet ¶ms); - ~PatBJetTagAnalyzer(); + ~PatBJetTagAnalyzer() override; // virtual methods called from base class EDAnalyzer - virtual void beginJob() override; - virtual void analyze(const edm::Event &event, const edm::EventSetup &es) override; + void beginJob() override; + void analyze(const edm::Event &event, const edm::EventSetup &es) override; private: // configuration parameters diff --git a/PhysicsTools/PatExamples/plugins/PatBJetTrackAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatBJetTrackAnalyzer.cc index c86baeb68fc18..a15ac2f5a51bf 100644 --- a/PhysicsTools/PatExamples/plugins/PatBJetTrackAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatBJetTrackAnalyzer.cc @@ -31,11 +31,11 @@ class PatBJetTrackAnalyzer : public edm::EDAnalyzer { public: /// constructor and destructor PatBJetTrackAnalyzer(const edm::ParameterSet ¶ms); - ~PatBJetTrackAnalyzer(); + ~PatBJetTrackAnalyzer() override; // virtual methods called from base class EDAnalyzer - virtual void beginJob() override; - virtual void analyze(const edm::Event &event, const edm::EventSetup &es) override; + void beginJob() override; + void analyze(const edm::Event &event, const edm::EventSetup &es) override; private: // configuration parameters diff --git a/PhysicsTools/PatExamples/plugins/PatBJetVertexAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatBJetVertexAnalyzer.cc index 877efa7234738..181860bf3bccb 100644 --- a/PhysicsTools/PatExamples/plugins/PatBJetVertexAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatBJetVertexAnalyzer.cc @@ -34,11 +34,11 @@ class PatBJetVertexAnalyzer : public edm::EDAnalyzer { public: /// constructor and destructor PatBJetVertexAnalyzer(const edm::ParameterSet ¶ms); - ~PatBJetVertexAnalyzer(); + ~PatBJetVertexAnalyzer() override; // virtual methods called from base class EDAnalyzer - virtual void beginJob() override; - virtual void analyze(const edm::Event &event, const edm::EventSetup &es) override; + void beginJob() override; + void analyze(const edm::Event &event, const edm::EventSetup &es) override; private: // configuration parameters @@ -221,7 +221,7 @@ void PatBJetVertexAnalyzer::analyze(const edm::Event &event, const edm::EventSet // the precomputed direction with respect to the primary vertex - GlobalVector dir = svTagInfo.flightDirection(0); + const GlobalVector& dir = svTagInfo.flightDirection(0); // unfortunately CMSSW hsa all kinds of vectors, // and sometimes we need to convert them *sigh* diff --git a/PhysicsTools/PatExamples/plugins/PatBTagAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatBTagAnalyzer.cc index 0926ce775fb63..0cffcf37bed1d 100644 --- a/PhysicsTools/PatExamples/plugins/PatBTagAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatBTagAnalyzer.cc @@ -24,13 +24,13 @@ class PatBTagAnalyzer : public edm::EDAnalyzer { public: explicit PatBTagAnalyzer(const edm::ParameterSet&); - ~PatBTagAnalyzer(); + ~PatBTagAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; edm::EDGetTokenT > jetToken_; diff --git a/PhysicsTools/PatExamples/plugins/PatBasicAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatBasicAnalyzer.cc index b29c7febdca90..ba58436719e9e 100644 --- a/PhysicsTools/PatExamples/plugins/PatBasicAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatBasicAnalyzer.cc @@ -23,15 +23,15 @@ class PatBasicAnalyzer : public edm::EDAnalyzer { /// default constructor explicit PatBasicAnalyzer(const edm::ParameterSet&); /// default destructor - ~PatBasicAnalyzer(); + ~PatBasicAnalyzer() override; private: /// everything that needs to be done before the event loop - virtual void beginJob() override ; + void beginJob() override ; /// everything that needs to be done during the event loop - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; /// everything that needs to be done after the event loop - virtual void endJob() override ; + void endJob() override ; // simple map to contain all histograms; // histograms are booked in the beginJob() diff --git a/PhysicsTools/PatExamples/plugins/PatElectronAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatElectronAnalyzer.cc index 217041590bd48..77bd422ba241a 100644 --- a/PhysicsTools/PatExamples/plugins/PatElectronAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatElectronAnalyzer.cc @@ -17,13 +17,13 @@ class PatElectronAnalyzer : public edm::EDAnalyzer { public: explicit PatElectronAnalyzer(const edm::ParameterSet&); - ~PatElectronAnalyzer(); + ~PatElectronAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // restrictions for the electron to be // considered diff --git a/PhysicsTools/PatExamples/plugins/PatJPsiProducer.cc b/PhysicsTools/PatExamples/plugins/PatJPsiProducer.cc index f497b8ecf5ace..118e3d5962da3 100644 --- a/PhysicsTools/PatExamples/plugins/PatJPsiProducer.cc +++ b/PhysicsTools/PatExamples/plugins/PatJPsiProducer.cc @@ -50,12 +50,12 @@ class PatJPsiProducer : public edm::EDProducer { public: explicit PatJPsiProducer(const edm::ParameterSet&); - ~PatJPsiProducer(); + ~PatJPsiProducer() override; private: - virtual void beginJob() override ; - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- diff --git a/PhysicsTools/PatExamples/plugins/PatJetAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatJetAnalyzer.cc index ba54d1cc338d6..3bf58cc8697cd 100644 --- a/PhysicsTools/PatExamples/plugins/PatJetAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatJetAnalyzer.cc @@ -46,16 +46,16 @@ class PatJetAnalyzer : public edm::EDAnalyzer { /// default contructor explicit PatJetAnalyzer(const edm::ParameterSet& cfg); /// default destructor - ~PatJetAnalyzer(){}; + ~PatJetAnalyzer() override{}; private: /// everything that needs to be done during the even loop - virtual void analyze(const edm::Event& event, const edm::EventSetup& setup) override; + void analyze(const edm::Event& event, const edm::EventSetup& setup) override; /// check if histogram was booked - bool booked(const std::string histName) const { return hists_.find(histName.c_str())!=hists_.end(); }; + bool booked(const std::string histName) const { return hists_.find(histName)!=hists_.end(); }; /// fill histogram if it had been booked before - void fill(const std::string histName, double value) const { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(value); }; + void fill(const std::string histName, double value) const { if(booked(histName)) hists_.find(histName)->second->Fill(value); }; // print jet pt for each level of energy corrections void print(edm::View::const_iterator& jet, unsigned int idx); diff --git a/PhysicsTools/PatExamples/plugins/PatMCMatching.cc b/PhysicsTools/PatExamples/plugins/PatMCMatching.cc index fd101ab0e8074..71823fab50934 100644 --- a/PhysicsTools/PatExamples/plugins/PatMCMatching.cc +++ b/PhysicsTools/PatExamples/plugins/PatMCMatching.cc @@ -20,13 +20,13 @@ class PatMCMatching : public edm::EDAnalyzer { /// default constructor explicit PatMCMatching(const edm::ParameterSet&); /// default destructor - ~PatMCMatching(); + ~PatMCMatching() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // simple map to contain all histograms; // histograms are booked in the beginJob() diff --git a/PhysicsTools/PatExamples/plugins/PatMCMatchingExtended.cc b/PhysicsTools/PatExamples/plugins/PatMCMatchingExtended.cc index a2a9257ca183e..e02ec4ce8a9ba 100644 --- a/PhysicsTools/PatExamples/plugins/PatMCMatchingExtended.cc +++ b/PhysicsTools/PatExamples/plugins/PatMCMatchingExtended.cc @@ -20,13 +20,13 @@ class PatMCMatchingExtended : public edm::EDAnalyzer { /// default constructor explicit PatMCMatchingExtended(const edm::ParameterSet&); /// default destructor - ~PatMCMatchingExtended(); + ~PatMCMatchingExtended() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // simple map to contain all histograms; // histograms are booked in the beginJob() diff --git a/PhysicsTools/PatExamples/plugins/PatTauAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatTauAnalyzer.cc index 44b06fc3d99d3..773bef635f530 100644 --- a/PhysicsTools/PatExamples/plugins/PatTauAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatTauAnalyzer.cc @@ -18,7 +18,7 @@ const reco::GenParticle* getGenTau(const pat::Tau& patTau) } } - return 0; + return nullptr; } PatTauAnalyzer::PatTauAnalyzer(const edm::ParameterSet& cfg) diff --git a/PhysicsTools/PatExamples/plugins/PatTauAnalyzer.h b/PhysicsTools/PatExamples/plugins/PatTauAnalyzer.h index 608de2e4d5677..b548486565611 100644 --- a/PhysicsTools/PatExamples/plugins/PatTauAnalyzer.h +++ b/PhysicsTools/PatExamples/plugins/PatTauAnalyzer.h @@ -17,12 +17,12 @@ class PatTauAnalyzer : public edm::EDAnalyzer { public: explicit PatTauAnalyzer(const edm::ParameterSet&); - ~PatTauAnalyzer(); + ~PatTauAnalyzer() override; //--- methods inherited from EDAnalyzer base-class - void beginJob(); - void analyze(const edm::Event&, const edm::EventSetup&); - void endJob(); + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; private: //--- configuration parameters diff --git a/PhysicsTools/PatExamples/plugins/PatTopSelectionAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatTopSelectionAnalyzer.cc index c06e5eb7f2854..78e305db7b410 100644 --- a/PhysicsTools/PatExamples/plugins/PatTopSelectionAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatTopSelectionAnalyzer.cc @@ -21,20 +21,20 @@ class PatTopSelectionAnalyzer : public edm::EDAnalyzer { /// default constructor explicit PatTopSelectionAnalyzer(const edm::ParameterSet&); /// default destructor - ~PatTopSelectionAnalyzer(); + ~PatTopSelectionAnalyzer() override; private: /// everything that needs to be done before the event loop - virtual void beginJob() override ; + void beginJob() override ; /// everything that needs to be done during the event loop - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; /// everything that needs to be done after the event loop - virtual void endJob() override ; + void endJob() override ; /// check if histogram was booked - bool booked(const std::string histName) const { return hists_.find(histName.c_str())!=hists_.end(); }; + bool booked(const std::string histName) const { return hists_.find(histName)!=hists_.end(); }; /// fill histogram if it had been booked before - void fill(const std::string histName, double value) const { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(value); }; + void fill(const std::string histName, double value) const { if(booked(histName)) hists_.find(histName)->second->Fill(value); }; // simple map to contain all histograms; // histograms are booked in the beginJob() @@ -100,7 +100,7 @@ PatTopSelectionAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup // fill quantities for leading jets and jet multiplicity // jet pt is corrected up to L3Absolute fill("jetMult", jets->size()); - if( jets->size()>0 ) fill("jet0Pt", (*jets)[0].pt()); + if( !jets->empty() ) fill("jet0Pt", (*jets)[0].pt()); if( jets->size()>1 ) fill("jet1Pt", (*jets)[1].pt()); if( jets->size()>2 ) fill("jet2Pt", (*jets)[2].pt()); if( jets->size()>3 ) fill("jet3Pt", (*jets)[3].pt()); diff --git a/PhysicsTools/PatExamples/plugins/PatTrackAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatTrackAnalyzer.cc index ed3fdc43bbdaa..e073658d503d5 100644 --- a/PhysicsTools/PatExamples/plugins/PatTrackAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatTrackAnalyzer.cc @@ -26,11 +26,11 @@ class PatTrackAnalyzer : public edm::EDAnalyzer { public: /// constructor and destructor PatTrackAnalyzer(const edm::ParameterSet ¶ms); - ~PatTrackAnalyzer(); + ~PatTrackAnalyzer() override; // virtual methods called from base class EDAnalyzer - virtual void beginJob() override; - virtual void analyze(const edm::Event &event, const edm::EventSetup &es) override; + void beginJob() override; + void analyze(const edm::Event &event, const edm::EventSetup &es) override; private: // configuration parameters diff --git a/PhysicsTools/PatExamples/plugins/PatTriggerAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatTriggerAnalyzer.cc index 094907d34b69f..56f096caf5f76 100644 --- a/PhysicsTools/PatExamples/plugins/PatTriggerAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatTriggerAnalyzer.cc @@ -19,15 +19,15 @@ class PatTriggerAnalyzer : public edm::EDAnalyzer { /// default constructor explicit PatTriggerAnalyzer( const edm::ParameterSet & iConfig ); /// default destructor - ~PatTriggerAnalyzer(); + ~PatTriggerAnalyzer() override; private: /// everythin that needs to be done before the event loop - virtual void beginJob(); + void beginJob() override; /// everythin that needs to be done during the event loop - virtual void analyze( const edm::Event & iEvent, const edm::EventSetup & iSetup ); + void analyze( const edm::Event & iEvent, const edm::EventSetup & iSetup ) override; /// everythin that needs to be done after the event loop - virtual void endJob(); + void endJob() override; /// input for patTrigger edm::InputTag trigger_; diff --git a/PhysicsTools/PatExamples/plugins/PatTriggerTagAndProbe.cc b/PhysicsTools/PatExamples/plugins/PatTriggerTagAndProbe.cc index 2b7f28a7d14e5..25e7d1fa28ec3 100644 --- a/PhysicsTools/PatExamples/plugins/PatTriggerTagAndProbe.cc +++ b/PhysicsTools/PatExamples/plugins/PatTriggerTagAndProbe.cc @@ -19,15 +19,15 @@ class PatTriggerTagAndProbe : public edm::EDAnalyzer { /// default constructor explicit PatTriggerTagAndProbe( const edm::ParameterSet & iConfig ); /// default destructor - ~PatTriggerTagAndProbe(); + ~PatTriggerTagAndProbe() override; private: /// everythin that needs to be done before the event loop - virtual void beginJob() ; + void beginJob() override ; /// everythin that needs to be done during the event loop - virtual void analyze( const edm::Event & iEvent, const edm::EventSetup & iSetup ); + void analyze( const edm::Event & iEvent, const edm::EventSetup & iSetup ) override; /// everythin that needs to be done after the event loop - virtual void endJob(); + void endJob() override; /// helper function to set proper bin errors void setErrors(TH1D& h, const TH1D& ref); diff --git a/PhysicsTools/PatExamples/plugins/PatVertexAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatVertexAnalyzer.cc index ebbbaa7ff44eb..f345901782645 100644 --- a/PhysicsTools/PatExamples/plugins/PatVertexAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatVertexAnalyzer.cc @@ -27,11 +27,11 @@ class PatVertexAnalyzer : public edm::EDAnalyzer { public: /// constructor and destructor PatVertexAnalyzer(const edm::ParameterSet ¶ms); - ~PatVertexAnalyzer(); + ~PatVertexAnalyzer() override; // virtual methods called from base class EDAnalyzer - virtual void beginJob() override; - virtual void analyze(const edm::Event &event, const edm::EventSetup &es) override; + void beginJob() override; + void analyze(const edm::Event &event, const edm::EventSetup &es) override; private: // configuration parameters diff --git a/PhysicsTools/PatExamples/plugins/PatZToMuMuAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatZToMuMuAnalyzer.cc index 8e6eaf9017601..bbbaabb243995 100644 --- a/PhysicsTools/PatExamples/plugins/PatZToMuMuAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatZToMuMuAnalyzer.cc @@ -40,18 +40,18 @@ class PatZToMuMuAnalyzer : public edm::EDAnalyzer { /// default constructor explicit PatZToMuMuAnalyzer(const edm::ParameterSet& cfg); /// default destructor - ~PatZToMuMuAnalyzer(){}; + ~PatZToMuMuAnalyzer() override{}; private: /// everything that needs to be done during the event loop - virtual void analyze(const edm::Event& event, const edm::EventSetup& setup) override; + void analyze(const edm::Event& event, const edm::EventSetup& setup) override; /// calculate the mass of the Z boson from the tracker momenta by hand double mass(const math::XYZVector& t1, const math::XYZVector& t2) const; /// check if histogram was booked - bool booked(const std::string histName) const { return hists_.find(histName.c_str())!=hists_.end(); }; + bool booked(const std::string histName) const { return hists_.find(histName)!=hists_.end(); }; /// fill histogram if it had been booked before - void fill(const std::string histName, double value) const { if(booked(histName.c_str())) hists_.find(histName.c_str())->second->Fill(value); }; + void fill(const std::string histName, double value) const { if(booked(histName)) hists_.find(histName)->second->Fill(value); }; /// fill a predefined set of histograms from inner outer or global tracks for first and second mu candidate void fill(std::string hists, const reco::TrackRef& t1, const reco::TrackRef& t2) const; diff --git a/PhysicsTools/PatExamples/plugins/PatZjetsElectronAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatZjetsElectronAnalyzer.cc index 16e02a079c3b0..0142aa1b110c0 100644 --- a/PhysicsTools/PatExamples/plugins/PatZjetsElectronAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatZjetsElectronAnalyzer.cc @@ -16,13 +16,13 @@ class PatZjetsElectronAnalyzer : public edm::EDAnalyzer { public: explicit PatZjetsElectronAnalyzer(const edm::ParameterSet&); - ~PatZjetsElectronAnalyzer(); + ~PatZjetsElectronAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // simple map to contain all histograms; // histograms are booked in the beginJob() diff --git a/PhysicsTools/PatExamples/plugins/PatZjetsJetAnalyzer.cc b/PhysicsTools/PatExamples/plugins/PatZjetsJetAnalyzer.cc index 28c726af81b53..32a885e6e6485 100644 --- a/PhysicsTools/PatExamples/plugins/PatZjetsJetAnalyzer.cc +++ b/PhysicsTools/PatExamples/plugins/PatZjetsJetAnalyzer.cc @@ -16,13 +16,13 @@ class PatZjetsJetAnalyzer : public edm::EDAnalyzer { public: explicit PatZjetsJetAnalyzer(const edm::ParameterSet&); - ~PatZjetsJetAnalyzer(); + ~PatZjetsJetAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // simple map to contain all histograms; // histograms are booked in the beginJob() diff --git a/PhysicsTools/PatUtils/interface/BoostedJetMerger.h b/PhysicsTools/PatUtils/interface/BoostedJetMerger.h index 5aabb9ad54e30..8b28e303f74ee 100644 --- a/PhysicsTools/PatUtils/interface/BoostedJetMerger.h +++ b/PhysicsTools/PatUtils/interface/BoostedJetMerger.h @@ -44,7 +44,7 @@ struct FindCorrectedSubjet { // Predicate operator to compare an input pat::Jet to. bool operator()( pat::Jet const & subjet ) const { - edm::Ptr subjetOrigRef = subjet.originalObjectRef(); + const edm::Ptr& subjetOrigRef = subjet.originalObjectRef(); if ( da_ == subjetOrigRef ) { return true; } @@ -57,10 +57,10 @@ struct FindCorrectedSubjet { class BoostedJetMerger : public edm::stream::EDProducer<> { public: explicit BoostedJetMerger(const edm::ParameterSet&); - ~BoostedJetMerger(); + ~BoostedJetMerger() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- diff --git a/PhysicsTools/PatUtils/interface/EventHypothesisTools.h b/PhysicsTools/PatUtils/interface/EventHypothesisTools.h index 227c313deb992..f880f6fcf3d53 100644 --- a/PhysicsTools/PatUtils/interface/EventHypothesisTools.h +++ b/PhysicsTools/PatUtils/interface/EventHypothesisTools.h @@ -12,9 +12,9 @@ namespace pat { namespace eventhypothesis { public: AndFilter() : filters_(2) {} AndFilter(ParticleFilter *f1, ParticleFilter *f2) ; - virtual ~AndFilter() {} + ~AndFilter() override {} AndFilter & operator&=(ParticleFilter *filter) { filters_.push_back(filter); return *this; } - virtual bool operator()(const CandRefType &cand, const std::string &role) const ; + bool operator()(const CandRefType &cand, const std::string &role) const override ; private: boost::ptr_vector filters_; }; @@ -24,9 +24,9 @@ namespace pat { namespace eventhypothesis { public: OrFilter() : filters_(2) {} OrFilter(ParticleFilter *f1, ParticleFilter *f2) ; - virtual ~OrFilter() {} + ~OrFilter() override {} OrFilter & operator&=(ParticleFilter *filter) { filters_.push_back(filter); return *this; } - virtual bool operator()(const CandRefType &cand, const std::string &role) const ; + bool operator()(const CandRefType &cand, const std::string &role) const override ; private: boost::ptr_vector filters_; }; @@ -34,8 +34,8 @@ namespace pat { namespace eventhypothesis { class ByPdgId : public ParticleFilter { public: explicit ByPdgId(int32_t pdgCode, bool alsoAntiparticle=true) ; - virtual ~ByPdgId() {} - virtual bool operator()(const CandRefType &cand, const std::string &role) const ; + ~ByPdgId() override {} + bool operator()(const CandRefType &cand, const std::string &role) const override ; private: int32_t pdgCode_; bool antiparticle_; @@ -44,8 +44,8 @@ namespace pat { namespace eventhypothesis { class ByString : public ParticleFilter { public: ByString(const std::string &cut) ; // not putting the explicit on purpose, I want to see what happens - virtual ~ByString() {} - virtual bool operator()(const CandRefType &cand, const std::string &role) const ; + ~ByString() override {} + bool operator()(const CandRefType &cand, const std::string &role) const override ; private: StringCutObjectSelector sel_; diff --git a/PhysicsTools/PatUtils/interface/PATDiObjectProxy.h b/PhysicsTools/PatUtils/interface/PATDiObjectProxy.h index d17e7519a153d..7b45a270f427c 100644 --- a/PhysicsTools/PatUtils/interface/PATDiObjectProxy.h +++ b/PhysicsTools/PatUtils/interface/PATDiObjectProxy.h @@ -20,7 +20,7 @@ class DiObjectProxy { public: /// Default constructor, requested by ROOT. NEVER use a default constructed item! - DiObjectProxy() : cand1_(0), cand2_(0), type1_(0), type2_(0), totalP4ok_(false), totalP4_() {} + DiObjectProxy() : cand1_(nullptr), cand2_(nullptr), type1_(nullptr), type2_(nullptr), totalP4ok_(false), totalP4_() {} /// Constructor of the pair from two Candidates /// Note: the Proxy MUST NOT outlive the Candidates, otherwise you get dangling pointers DiObjectProxy(const reco::Candidate &c1, const reco::Candidate &c2) : diff --git a/PhysicsTools/PatUtils/interface/RazorComputer.h b/PhysicsTools/PatUtils/interface/RazorComputer.h index 80b5aa011c306..fbd79c81119b8 100644 --- a/PhysicsTools/PatUtils/interface/RazorComputer.h +++ b/PhysicsTools/PatUtils/interface/RazorComputer.h @@ -8,7 +8,7 @@ class RazorBox : public CachingVariable { public: RazorBox(const CachingVariable::CachingVariableFactoryArg& arg, edm::ConsumesCollector& iC) ; - ~RazorBox(){} + ~RazorBox() override{} void compute(const edm::Event & iEvent) const; private: @@ -18,9 +18,9 @@ class RazorBox : public CachingVariable { class RazorComputer : public VariableComputer { public: RazorComputer(const CachingVariable::CachingVariableFactoryArg& arg, edm::ConsumesCollector& iC) ; - ~RazorComputer(){}; + ~RazorComputer() override{}; - void compute(const edm::Event & iEvent) const; + void compute(const edm::Event & iEvent) const override; private: edm::InputTag jet_; edm::InputTag met_; diff --git a/PhysicsTools/PatUtils/interface/ShiftedJetProducerT.h b/PhysicsTools/PatUtils/interface/ShiftedJetProducerT.h index f4c00e7836ae9..1946e9e9afddc 100644 --- a/PhysicsTools/PatUtils/interface/ShiftedJetProducerT.h +++ b/PhysicsTools/PatUtils/interface/ShiftedJetProducerT.h @@ -45,8 +45,8 @@ template src_(cfg.getParameter("src")), srcToken_(consumes(src_)), jetCorrPayloadName_(""), - jetCorrParameters_(0), - jecUncertainty_(0), + jetCorrParameters_(nullptr), + jecUncertainty_(nullptr), jecUncertaintyValue_(-1.) { if ( cfg.exists("jecUncertaintyValue") ) { @@ -57,7 +57,7 @@ template jetCorrInputFileName_ = cfg.getParameter("jetCorrInputFileName"); if ( jetCorrInputFileName_.location() == edm::FileInPath::Unknown) throw cms::Exception("ShiftedJetProducerT") << " Failed to find JEC parameter file = " << jetCorrInputFileName_ << " !!\n"; - jetCorrParameters_ = new JetCorrectorParameters(jetCorrInputFileName_.fullPath().data(), jetCorrUncertaintyTag_); + jetCorrParameters_ = new JetCorrectorParameters(jetCorrInputFileName_.fullPath(), jetCorrUncertaintyTag_); jecUncertainty_ = new JetCorrectionUncertainty(*jetCorrParameters_); } else { jetCorrPayloadName_ = cfg.getParameter("jetCorrPayloadName"); @@ -83,7 +83,7 @@ template produces(); } - ~ShiftedJetProducerT() + ~ShiftedJetProducerT() override { delete jetCorrParameters_; delete jecUncertainty_; @@ -91,7 +91,7 @@ template private: - void produce(edm::Event& evt, const edm::EventSetup& es) + void produce(edm::Event& evt, const edm::EventSetup& es) override { if ( verbosity_ ) { std::cout << ":" << std::endl; diff --git a/PhysicsTools/PatUtils/interface/ShiftedParticleProducerT.h b/PhysicsTools/PatUtils/interface/ShiftedParticleProducerT.h index 85c22b62693fb..b6f7fe487ff3d 100644 --- a/PhysicsTools/PatUtils/interface/ShiftedParticleProducerT.h +++ b/PhysicsTools/PatUtils/interface/ShiftedParticleProducerT.h @@ -55,7 +55,7 @@ class ShiftedParticleProducerT : public edm::stream::EDProducer<> produces(); } - ~ShiftedParticleProducerT() + ~ShiftedParticleProducerT() override { for ( typename std::vector::const_iterator it = binning_.begin(); it != binning_.end(); ++it ) { @@ -65,7 +65,7 @@ class ShiftedParticleProducerT : public edm::stream::EDProducer<> private: - void produce(edm::Event& evt, const edm::EventSetup& es) + void produce(edm::Event& evt, const edm::EventSetup& es) override { edm::Handle originalParticles; evt.getByToken(srcToken_, originalParticles); @@ -106,7 +106,7 @@ class ShiftedParticleProducerT : public edm::stream::EDProducer<> struct binningEntryType { binningEntryType(double uncertainty) - : binSelection_(0), + : binSelection_(nullptr), binUncertainty_(uncertainty) {} binningEntryType(const edm::ParameterSet& cfg) diff --git a/PhysicsTools/PatUtils/interface/SmearedJetProducerT.h b/PhysicsTools/PatUtils/interface/SmearedJetProducerT.h index cd55ad3b72270..dd4e950850d81 100644 --- a/PhysicsTools/PatUtils/interface/SmearedJetProducerT.h +++ b/PhysicsTools/PatUtils/interface/SmearedJetProducerT.h @@ -176,7 +176,7 @@ class SmearedJetProducerT : public edm::stream::EDProducer<> { descriptions.addDefault(desc); } - virtual void produce(edm::Event& event, const edm::EventSetup& setup) override { + void produce(edm::Event& event, const edm::EventSetup& setup) override { edm::Handle jets_collection; event.getByToken(m_jets_token, jets_collection); diff --git a/PhysicsTools/PatUtils/plugins/CorrMETDataExtractor.cc b/PhysicsTools/PatUtils/plugins/CorrMETDataExtractor.cc index 744d1927c26ee..6d4b35a9d0a19 100644 --- a/PhysicsTools/PatUtils/plugins/CorrMETDataExtractor.cc +++ b/PhysicsTools/PatUtils/plugins/CorrMETDataExtractor.cc @@ -32,7 +32,7 @@ class CorrMETDataExtractor : public edm::stream::EDProducer<> { } - ~CorrMETDataExtractor() { } + ~CorrMETDataExtractor() override { } private: diff --git a/PhysicsTools/PatUtils/plugins/CorrectedPATMETProducer.cc b/PhysicsTools/PatUtils/plugins/CorrectedPATMETProducer.cc index 426cac99065d0..33acfd6c00fd1 100644 --- a/PhysicsTools/PatUtils/plugins/CorrectedPATMETProducer.cc +++ b/PhysicsTools/PatUtils/plugins/CorrectedPATMETProducer.cc @@ -40,7 +40,7 @@ class CorrectedPATMETProducer : public edm::stream::EDProducer<> produces(""); } - ~CorrectedPATMETProducer() { } + ~CorrectedPATMETProducer() override { } private: diff --git a/PhysicsTools/PatUtils/plugins/JetCollectionReducer.cc b/PhysicsTools/PatUtils/plugins/JetCollectionReducer.cc index d72ca90c19500..fc672c5f41415 100644 --- a/PhysicsTools/PatUtils/plugins/JetCollectionReducer.cc +++ b/PhysicsTools/PatUtils/plugins/JetCollectionReducer.cc @@ -15,9 +15,9 @@ class JetCollectionReducerT : public edm::global::EDProducer<> { public: explicit JetCollectionReducerT(const edm::ParameterSet & iConfig); - virtual ~JetCollectionReducerT() {} + ~JetCollectionReducerT() override {} - virtual void produce(edm::StreamID id, edm::Event & iEvent, const edm::EventSetup & iSetup) const override; + void produce(edm::StreamID id, edm::Event & iEvent, const edm::EventSetup & iSetup) const override; private: @@ -57,7 +57,7 @@ JetCollectionReducerT::produce(edm::StreamID id, edm::Event& iEvent, const ed for(std::vector > >::const_iterator filter=collections_.begin(); filter!=collections_.end();filter++) { iEvent.getByToken(*filter,tmpCol); - if(tmpCol->size()!=0) { + if(!tmpCol->empty()) { filterDecision=true; break; } diff --git a/PhysicsTools/PatUtils/plugins/PFMatchedCandidateRefExtractor.cc b/PhysicsTools/PatUtils/plugins/PFMatchedCandidateRefExtractor.cc index e6b48d8e772f7..2e34750b120d2 100644 --- a/PhysicsTools/PatUtils/plugins/PFMatchedCandidateRefExtractor.cc +++ b/PhysicsTools/PatUtils/plugins/PFMatchedCandidateRefExtractor.cc @@ -16,9 +16,9 @@ class PFMatchedCandidateRefExtractor : public edm::global::EDProducer<> { public: explicit PFMatchedCandidateRefExtractor(const edm::ParameterSet & iConfig); - virtual ~PFMatchedCandidateRefExtractor(); + ~PFMatchedCandidateRefExtractor() override; - virtual void produce(edm::StreamID iID, edm::Event & iEvent, const edm::EventSetup & iSetup) const override; + void produce(edm::StreamID iID, edm::Event & iEvent, const edm::EventSetup & iSetup) const override; private: diff --git a/PhysicsTools/PatUtils/plugins/ShiftedJetProducerByMatchedObject.h b/PhysicsTools/PatUtils/plugins/ShiftedJetProducerByMatchedObject.h index 317416c42a97f..7fbeba65a8768 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedJetProducerByMatchedObject.h +++ b/PhysicsTools/PatUtils/plugins/ShiftedJetProducerByMatchedObject.h @@ -30,11 +30,11 @@ class ShiftedJetProducerByMatchedObjectT : public edm::stream::EDProducer<> public: explicit ShiftedJetProducerByMatchedObjectT(const edm::ParameterSet&); - ~ShiftedJetProducerByMatchedObjectT(); + ~ShiftedJetProducerByMatchedObjectT() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; std::string moduleLabel_; diff --git a/PhysicsTools/PatUtils/plugins/ShiftedMETcorrInputProducer.h b/PhysicsTools/PatUtils/plugins/ShiftedMETcorrInputProducer.h index 006713634a589..654c22e432b21 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedMETcorrInputProducer.h +++ b/PhysicsTools/PatUtils/plugins/ShiftedMETcorrInputProducer.h @@ -27,11 +27,11 @@ class ShiftedMETcorrInputProducer : public edm::stream::EDProducer<> public: explicit ShiftedMETcorrInputProducer(const edm::ParameterSet&); - ~ShiftedMETcorrInputProducer(); + ~ShiftedMETcorrInputProducer() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; typedef std::vector vInputTag; vInputTag src_; diff --git a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerByMatchedObject.h b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerByMatchedObject.h index 75ba53ab0f89f..4d968d2efe2dd 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerByMatchedObject.h +++ b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerByMatchedObject.h @@ -33,11 +33,11 @@ class ShiftedPFCandidateProducerByMatchedObject : public edm::stream::EDProducer public: explicit ShiftedPFCandidateProducerByMatchedObject(const edm::ParameterSet&); - ~ShiftedPFCandidateProducerByMatchedObject(); + ~ShiftedPFCandidateProducerByMatchedObject() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; edm::EDGetTokenT srcPFCandidates_; edm::EDGetTokenT > srcUnshiftedObjects_; diff --git a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForNoPileUpPFMEt.cc b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForNoPileUpPFMEt.cc index fdad5ecef01f0..4e71135920e81 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForNoPileUpPFMEt.cc +++ b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForNoPileUpPFMEt.cc @@ -15,7 +15,7 @@ ShiftedPFCandidateProducerForNoPileUpPFMEt::ShiftedPFCandidateProducerForNoPileU jetCorrInputFileName_ = cfg.getParameter("jetCorrInputFileName"); if ( jetCorrInputFileName_.location() == edm::FileInPath::Unknown) throw cms::Exception("ShiftedJetProducerT") << " Failed to find JEC parameter file = " << jetCorrInputFileName_ << " !!\n"; - jetCorrParameters_ = new JetCorrectorParameters(jetCorrInputFileName_.fullPath().data(), jetCorrUncertaintyTag_); + jetCorrParameters_ = new JetCorrectorParameters(jetCorrInputFileName_.fullPath(), jetCorrUncertaintyTag_); jecUncertainty_ = new JetCorrectionUncertainty(*jetCorrParameters_); } else { jetCorrPayloadName_ = cfg.getParameter("jetCorrPayloadName"); @@ -61,7 +61,7 @@ void ShiftedPFCandidateProducerForNoPileUpPFMEt::produce(edm::Event& evt, const for ( reco::PFCandidateCollection::const_iterator originalPFCandidate = originalPFCandidates->begin(); originalPFCandidate != originalPFCandidates->end(); ++originalPFCandidate ) { - const reco::PFJet* jet_matched = 0; + const reco::PFJet* jet_matched = nullptr; for ( std::vector::iterator jet = selectedJets.begin(); jet != selectedJets.end(); ++jet ) { std::vector jetConstituents = (*jet)->getPFConstituents(); diff --git a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForNoPileUpPFMEt.h b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForNoPileUpPFMEt.h index 80e702e7e1c91..16a61e83305d0 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForNoPileUpPFMEt.h +++ b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForNoPileUpPFMEt.h @@ -44,11 +44,11 @@ class ShiftedPFCandidateProducerForNoPileUpPFMEt : public edm::stream::EDProduce public: explicit ShiftedPFCandidateProducerForNoPileUpPFMEt(const edm::ParameterSet&); - ~ShiftedPFCandidateProducerForNoPileUpPFMEt(); + ~ShiftedPFCandidateProducerForNoPileUpPFMEt() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; edm::EDGetTokenT srcPFCandidatesToken_; edm::EDGetTokenT srcJetsToken_; diff --git a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFMVAMEt.h b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFMVAMEt.h index 229a971ec9bb8..9849ec97800ac 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFMVAMEt.h +++ b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFMVAMEt.h @@ -35,12 +35,12 @@ class ShiftedPFCandidateProducerForPFMVAMEt : public edm::stream::EDProducer<> public: explicit ShiftedPFCandidateProducerForPFMVAMEt(const edm::ParameterSet&); - ~ShiftedPFCandidateProducerForPFMVAMEt(); + ~ShiftedPFCandidateProducerForPFMVAMEt() override; private: typedef edm::View CandidateView; - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; std::string moduleLabel_; diff --git a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFNoPUMEt.cc b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFNoPUMEt.cc index 01d4525337900..5ba4a9c1e5e24 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFNoPUMEt.cc +++ b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFNoPUMEt.cc @@ -22,7 +22,7 @@ ShiftedPFCandidateProducerForPFNoPUMEt::ShiftedPFCandidateProducerForPFNoPUMEt(c edm::LogInfo("ShiftedPFCandidateProducerForPFNoPUMEt") << "Reading JEC parameters = " << jetCorrUncertaintyTag_ << " from file = " << jetCorrInputFileName_.fullPath() << "." << std::endl; - jetCorrParameters_ = new JetCorrectorParameters(jetCorrInputFileName_.fullPath().data(), jetCorrUncertaintyTag_); + jetCorrParameters_ = new JetCorrectorParameters(jetCorrInputFileName_.fullPath(), jetCorrUncertaintyTag_); jecUncertainty_ = new JetCorrectionUncertainty(*jetCorrParameters_); } else { edm::LogInfo("ShiftedPFCandidateProducerForPFNoPUMEt") diff --git a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFNoPUMEt.h b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFNoPUMEt.h index 15fd248eda1ed..ca62060745bc2 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFNoPUMEt.h +++ b/PhysicsTools/PatUtils/plugins/ShiftedPFCandidateProducerForPFNoPUMEt.h @@ -44,11 +44,11 @@ class ShiftedPFCandidateProducerForPFNoPUMEt : public edm::EDProducer public: explicit ShiftedPFCandidateProducerForPFNoPUMEt(const edm::ParameterSet&); - ~ShiftedPFCandidateProducerForPFNoPUMEt(); + ~ShiftedPFCandidateProducerForPFNoPUMEt() override; private: - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; std::string moduleLabel_; diff --git a/PhysicsTools/PatUtils/plugins/ShiftedParticleMETcorrInputProducer.h b/PhysicsTools/PatUtils/plugins/ShiftedParticleMETcorrInputProducer.h index 324543cc36681..a6d16b7fb3c3d 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedParticleMETcorrInputProducer.h +++ b/PhysicsTools/PatUtils/plugins/ShiftedParticleMETcorrInputProducer.h @@ -29,12 +29,12 @@ class ShiftedParticleMETcorrInputProducer : public edm::global::EDProducer<> public: explicit ShiftedParticleMETcorrInputProducer(const edm::ParameterSet&); - ~ShiftedParticleMETcorrInputProducer(); + ~ShiftedParticleMETcorrInputProducer() override; private: typedef edm::View CandidateView; - void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; const edm::EDGetTokenT srcOriginalToken_; const edm::EDGetTokenT srcShiftedToken_; diff --git a/PhysicsTools/PatUtils/plugins/ShiftedParticleProducer.h b/PhysicsTools/PatUtils/plugins/ShiftedParticleProducer.h index 5ccb96f693e9a..f44b5c7cfe178 100644 --- a/PhysicsTools/PatUtils/plugins/ShiftedParticleProducer.h +++ b/PhysicsTools/PatUtils/plugins/ShiftedParticleProducer.h @@ -36,11 +36,11 @@ class ShiftedParticleProducer : public edm::stream::EDProducer<> public: explicit ShiftedParticleProducer(const edm::ParameterSet& cfg); - ~ShiftedParticleProducer(); + ~ShiftedParticleProducer() override; private: - void produce(edm::Event& evt, const edm::EventSetup& es); + void produce(edm::Event& evt, const edm::EventSetup& es) override; double getUncShift(const CandidateView::const_iterator& originalParticle); diff --git a/PhysicsTools/PatUtils/src/LeptonVertexSignificance.cc b/PhysicsTools/PatUtils/src/LeptonVertexSignificance.cc index 3b911d67dfe0d..db3ec89a858dd 100644 --- a/PhysicsTools/PatUtils/src/LeptonVertexSignificance.cc +++ b/PhysicsTools/PatUtils/src/LeptonVertexSignificance.cc @@ -45,7 +45,7 @@ float LeptonVertexSignificance::calculate(const reco::Track & theTrack, const ed // lepton LR calculation should have nothing to do with event selection edm::Handle vertexHandle; iEvent.getByToken(vertexToken_, vertexHandle); - if (vertexHandle.product()->size() == 0) return 0; + if (vertexHandle.product()->empty()) return 0; reco::Vertex theVertex = vertexHandle.product()->front(); // calculate the track-vertex association significance reco::TransientTrack theTrTrack = theTrackBuilder_->build(&theTrack); diff --git a/PhysicsTools/PatUtils/src/ObjectResolutionCalc.cc b/PhysicsTools/PatUtils/src/ObjectResolutionCalc.cc index b8de482a4a68b..e94a411c6243e 100644 --- a/PhysicsTools/PatUtils/src/ObjectResolutionCalc.cc +++ b/PhysicsTools/PatUtils/src/ObjectResolutionCalc.cc @@ -16,7 +16,7 @@ ObjectResolutionCalc::ObjectResolutionCalc(const TString& resopath, bool useNN = TList* keys = resoFile_->GetListOfKeys(); TIter nextitem(keys); - TKey* key = NULL; + TKey* key = nullptr; while((key = (TKey*)nextitem())) { TString name = key->GetName(); if(useNN_) { diff --git a/PhysicsTools/PatUtils/src/TrackerIsolationPt.cc b/PhysicsTools/PatUtils/src/TrackerIsolationPt.cc index a1677439cdccd..e6b9cddbaf61b 100644 --- a/PhysicsTools/PatUtils/src/TrackerIsolationPt.cc +++ b/PhysicsTools/PatUtils/src/TrackerIsolationPt.cc @@ -38,7 +38,7 @@ float TrackerIsolationPt::calculate(const Muon & theMuon, const edm::View & theTracks, float isoCone) const { // initialize some variables float isoPtLepton = 0; - const reco::Track * closestTrackDRPt = 0, * closestTrackDR = 0; + const reco::Track * closestTrackDRPt = nullptr, * closestTrackDR = nullptr; float closestDRPt = 10000, closestDR = 10000; // use all these pointless vector conversions because the momenta from tracks // are completely unusable; bah, these math-vectors are worthless! diff --git a/PhysicsTools/RecoAlgos/interface/MassKinFitterCandProducer.h b/PhysicsTools/RecoAlgos/interface/MassKinFitterCandProducer.h index 2fe711c43a679..ece930de1561d 100755 --- a/PhysicsTools/RecoAlgos/interface/MassKinFitterCandProducer.h +++ b/PhysicsTools/RecoAlgos/interface/MassKinFitterCandProducer.h @@ -13,11 +13,11 @@ class MassKinFitterCandProducer : public edm::EDProducer { public: - explicit MassKinFitterCandProducer(const edm::ParameterSet&, CandMassKinFitter * = 0); + explicit MassKinFitterCandProducer(const edm::ParameterSet&, CandMassKinFitter * = nullptr); private: edm::EDGetTokenT srcToken_; std::unique_ptr fitter_; - void produce( edm::Event &, const edm::EventSetup & ); + void produce( edm::Event &, const edm::EventSetup & ) override; }; #endif diff --git a/PhysicsTools/RecoAlgos/plugins/ConstrainedFitCandProducer.h b/PhysicsTools/RecoAlgos/plugins/ConstrainedFitCandProducer.h index b7b28aa6a2fee..0332917c14d5c 100755 --- a/PhysicsTools/RecoAlgos/plugins/ConstrainedFitCandProducer.h +++ b/PhysicsTools/RecoAlgos/plugins/ConstrainedFitCandProducer.h @@ -28,7 +28,7 @@ class ConstrainedFitCandProducer : public edm::EDProducer { bool setPdgId_; int pdgId_; Fitter fitter_; - void produce(edm::Event &, const edm::EventSetup &); + void produce(edm::Event &, const edm::EventSetup &) override; }; #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/PhysicsTools/RecoAlgos/src/MassKinFitterCandProducer.cc b/PhysicsTools/RecoAlgos/src/MassKinFitterCandProducer.cc index d0b9dd5b88591..8009fd5cd1e23 100755 --- a/PhysicsTools/RecoAlgos/src/MassKinFitterCandProducer.cc +++ b/PhysicsTools/RecoAlgos/src/MassKinFitterCandProducer.cc @@ -7,7 +7,7 @@ MassKinFitterCandProducer::MassKinFitterCandProducer(const edm::ParameterSet & cfg, CandMassKinFitter * f) : srcToken_(consumes(cfg.getParameter("src"))), fitter_(f) { - if(f == 0) fitter_.reset(new CandMassKinFitter(cfg.getParameter("mass"))); + if(f == nullptr) fitter_.reset(new CandMassKinFitter(cfg.getParameter("mass"))); produces(); } diff --git a/PhysicsTools/RecoUtils/interface/CandCommonVertexFitter.h b/PhysicsTools/RecoUtils/interface/CandCommonVertexFitter.h index 33ca3cf3a2f6b..99a989a91431a 100755 --- a/PhysicsTools/RecoUtils/interface/CandCommonVertexFitter.h +++ b/PhysicsTools/RecoUtils/interface/CandCommonVertexFitter.h @@ -17,7 +17,7 @@ namespace reco { class VertexCompositeCandidate; } class CandCommonVertexFitterBase { public: typedef reco::Vertex::CovarianceMatrix CovarianceMatrix; - CandCommonVertexFitterBase(const edm::ParameterSet &) : bField_(0) { } + CandCommonVertexFitterBase(const edm::ParameterSet &) : bField_(nullptr) { } virtual ~CandCommonVertexFitterBase() { } void set(const MagneticField * bField) { bField_ = bField; } void set(reco::VertexCompositeCandidate &) const; @@ -48,7 +48,7 @@ class CandCommonVertexFitter : public CandCommonVertexFitterBase { fitter_(reco::modules::make(cfg)) { } bool fit(TransientVertex & vertex, - const std::vector & tracks) const { + const std::vector & tracks) const override { try { vertex = fitter_.vertex(tracks); } catch (std::exception & err) { diff --git a/PhysicsTools/RecoUtils/interface/CandKinematicVertexFitter.h b/PhysicsTools/RecoUtils/interface/CandKinematicVertexFitter.h index 3a6f516c57e96..c7fbda896477f 100755 --- a/PhysicsTools/RecoUtils/interface/CandKinematicVertexFitter.h +++ b/PhysicsTools/RecoUtils/interface/CandKinematicVertexFitter.h @@ -24,7 +24,7 @@ class CandKinematicVertexFitter { public: typedef reco::Vertex::CovarianceMatrix CovarianceMatrix; CandKinematicVertexFitter(const edm::ParameterSet & cfg) : - bField_(0), pdt_(0), fitter_(), fitters_(new std::vector) { + bField_(nullptr), pdt_(nullptr), fitter_(), fitters_(new std::vector) { } CandKinematicVertexFitter(const CandKinematicVertexFitter& o) : bField_(o.bField_), pdt_(o.pdt_), fitter_(), fitters_(new std::vector) { diff --git a/PhysicsTools/RecoUtils/plugins/HLTEventSelector.h b/PhysicsTools/RecoUtils/plugins/HLTEventSelector.h index 8cfc2e900f247..e6599d474df6b 100644 --- a/PhysicsTools/RecoUtils/plugins/HLTEventSelector.h +++ b/PhysicsTools/RecoUtils/plugins/HLTEventSelector.h @@ -27,8 +27,8 @@ class HLTEventSelector : public EventSelector { HLTEventSelector (const edm::ParameterSet& pset, edm::ConsumesCollector && iC) : HLTEventSelector(pset, iC) {} HLTEventSelector (const edm::ParameterSet& pset, edm::ConsumesCollector & iC); - virtual bool select (const edm::Event&) const; - virtual ~HLTEventSelector () {} + bool select (const edm::Event&) const override; + ~HLTEventSelector () override {} private: edm::InputTag triggerResults_; ///< tag for input collection edm::EDGetTokenT triggerResultsToken_; diff --git a/PhysicsTools/RecoUtils/plugins/TriggerVariables.h b/PhysicsTools/RecoUtils/plugins/TriggerVariables.h index 7efc4b31abf21..718f6dd30943e 100644 --- a/PhysicsTools/RecoUtils/plugins/TriggerVariables.h +++ b/PhysicsTools/RecoUtils/plugins/TriggerVariables.h @@ -21,9 +21,9 @@ class L1BitComputer : public VariableComputer { } - ~L1BitComputer(){}; + ~L1BitComputer() override{}; - void compute(const edm::Event & iEvent) const{ + void compute(const edm::Event & iEvent) const override{ edm::Handle l1Handle; iEvent.getByToken(src_, l1Handle); if (l1Handle.failedToGet()) doesNotCompute(); @@ -69,8 +69,8 @@ class HLTBitComputer : public VariableComputer { declare(std::string(static_cast(tname)), iC); } } - ~HLTBitComputer(){} - void compute(const edm::Event & iEvent) const{ + ~HLTBitComputer() override{} + void compute(const edm::Event & iEvent) const override{ edm::Handle trh; iEvent.getByToken(src_,trh); if (!trh.isValid()) doesNotCompute(); @@ -95,7 +95,7 @@ class HLTBitVariable : public CachingVariable { CachingVariable("HLTBitVariable",arg.n,arg.iConfig,iC), src_(iC.consumes(edm::Service()->retrieve("src",arg.iConfig))), bitName_(arg.n){ arg.m[arg.n]=this;} - CachingVariable::evalType eval(const edm::Event & iEvent) const{ + CachingVariable::evalType eval(const edm::Event & iEvent) const override{ edm::Handle hltHandle; iEvent.getByToken(src_, hltHandle); if (hltHandle.failedToGet()) return std::make_pair(false,0); diff --git a/PhysicsTools/RecoUtils/src/CandCommonVertexFitter.cc b/PhysicsTools/RecoUtils/src/CandCommonVertexFitter.cc index 8af77ed2c4da4..c8dae0a1e31ca 100755 --- a/PhysicsTools/RecoUtils/src/CandCommonVertexFitter.cc +++ b/PhysicsTools/RecoUtils/src/CandCommonVertexFitter.cc @@ -7,7 +7,7 @@ using namespace reco; using namespace std; void CandCommonVertexFitterBase::set(VertexCompositeCandidate & c) const { - if(bField_ == 0) + if(bField_ == nullptr) throw edm::Exception(edm::errors::InvalidReference) << "B-Field was not set up CandCommonVertexFitter.\n" << "the following method must be called before fitting a candidate:\n" @@ -62,12 +62,12 @@ void CandCommonVertexFitterBase::fill(vector & tracks, size_t nDau = c.numberOfDaughters(); for(unsigned int j = 0; j < nDau ; ++j) { Candidate * d = c.daughter(j); - if(d == 0) { + if(d == nullptr) { ostringstream message; message << "Can't access in write mode candidate daughters. " << "pdgId = " << c.pdgId() << ".\n"; const Candidate * d1 = c.daughter(j); - if(d1 == 0) + if(d1 == nullptr) message << "Null daughter also found in read-only mode\n"; else message << "Daughter found in read-only mode with id: " << d1->pdgId() << "\n"; @@ -78,7 +78,7 @@ void CandCommonVertexFitterBase::fill(vector & tracks, else { const Track * trk = d->get(); RecoCandidate::TrackType type = d->get(); - if(trk != 0) { + if(trk != nullptr) { tracks.push_back(TransientTrack(* trk, bField_)); daughters.push_back(d); trackTypes.push_back(type); diff --git a/PhysicsTools/RecoUtils/src/CandKinematicVertexFitter.cc b/PhysicsTools/RecoUtils/src/CandKinematicVertexFitter.cc index 2e9342b685b62..028770174255e 100755 --- a/PhysicsTools/RecoUtils/src/CandKinematicVertexFitter.cc +++ b/PhysicsTools/RecoUtils/src/CandKinematicVertexFitter.cc @@ -29,7 +29,7 @@ bool CandKinematicVertexFitter::fit(const vector & // main method called by CandProducer sets the VertexCompositeCandidate void CandKinematicVertexFitter::set(VertexCompositeCandidate & c) const { - if(bField_ == 0) + if(bField_ == nullptr) throw edm::Exception(edm::errors::InvalidReference) << "B-Field was not set up CandKinematicVertexFitter.\n" << "the following method must be called before fitting a candidate:\n" @@ -103,12 +103,12 @@ void CandKinematicVertexFitter::fill(vector & parti // loop through CompositeCandidate daughters for(unsigned int j = 0; j < nDau ; ++j) { Candidate * d = c.daughter(j); - if(d == 0) { + if(d == nullptr) { ostringstream message; message << "Can't access in write mode candidate daughters. " << "pdgId = " << c.pdgId() << ".\n"; const Candidate * d1 = c.daughter(j); - if(d1 == 0) + if(d1 == nullptr) message << "Null daughter also found in read-only mode\n"; else message << "Daughter found in read-only mode with id: " << d1->pdgId() << "\n"; @@ -118,7 +118,7 @@ void CandKinematicVertexFitter::fill(vector & parti if(d->numberOfDaughters() > 0) { //try to cast to VertexCompositeCandiate VertexCompositeCandidate * vtxDau = dynamic_cast(d); - if( vtxDau!=0 && vtxDau->vertexChi2()>0 ) { + if( vtxDau!=nullptr && vtxDau->vertexChi2()>0 ) { // if VertexCompositeCandidate refit vtxDau via the set method (*this).set(*vtxDau); // if mass constraint is desired, do it here diff --git a/PhysicsTools/RecoUtils/src/CandMassKinFitter.cc b/PhysicsTools/RecoUtils/src/CandMassKinFitter.cc index ba168fe96bc2e..3ecca8cc343ad 100755 --- a/PhysicsTools/RecoUtils/src/CandMassKinFitter.cc +++ b/PhysicsTools/RecoUtils/src/CandMassKinFitter.cc @@ -14,12 +14,12 @@ FitQuality CandMassKinFitter::set( Candidate & c ) const { size_t daus = c.numberOfDaughters(); vector errors(daus, TMatrix(3,3)); vector momenta(daus); - vector particles(daus, 0); + vector particles(daus, nullptr); TFitConstraintM constraint( "MassConstraint", - "MassConstraint", 0, 0 , mass_); + "MassConstraint", nullptr, nullptr , mass_); for ( size_t i = 0; i < daus; ++ i ) { const Candidate & dau = * c.daughter( i ); - Particle::LorentzVector p4 = dau.p4(); + const Particle::LorentzVector& p4 = dau.p4(); TMatrixD & err = errors[i]; TVector3 & mom = momenta[i]; mom = TVector3( p4.px(), p4.py(), p4.pz() ); diff --git a/PhysicsTools/RooStatsCms/interface/BinomialNoncentralInterval.h b/PhysicsTools/RooStatsCms/interface/BinomialNoncentralInterval.h index d3840a79f8a20..474a8fa567275 100644 --- a/PhysicsTools/RooStatsCms/interface/BinomialNoncentralInterval.h +++ b/PhysicsTools/RooStatsCms/interface/BinomialNoncentralInterval.h @@ -62,7 +62,7 @@ class BinomialNoncentralInterval : public BinomialInterval { // Construct nrho acceptance sets in rho = [0,1] given ntot trials // and put the results in already-allocated x_l and x_r. - bool neyman(const int ntot, const int nrho, double* rho, double* x_l, double* x_r) { + bool neyman(const int ntot, const int nrho, double* rho, double* x_l, double* x_r) override { int xL, xR; for (int i = 0; i < nrho; ++i) { rho[i] = double(i)/nrho; @@ -75,7 +75,7 @@ class BinomialNoncentralInterval : public BinomialInterval { // Given X successes and n trials, calculate the interval using the // rho acceptance sets implemented above. - void calculate(const double X, const double n) { + void calculate(const double X, const double n) override { set(0, 1); const double tol = 1e-9; diff --git a/PhysicsTools/RooStatsCms/interface/ClopperPearsonBinomialInterval.h b/PhysicsTools/RooStatsCms/interface/ClopperPearsonBinomialInterval.h index 2ba90740e7c83..f2619845484a0 100644 --- a/PhysicsTools/RooStatsCms/interface/ClopperPearsonBinomialInterval.h +++ b/PhysicsTools/RooStatsCms/interface/ClopperPearsonBinomialInterval.h @@ -20,8 +20,8 @@ class ClopperPearsonBinomialInterval : public BinomialInterval { public: - void calculate(const double successes, const double trials); - const char* name() const { return "Clopper-Pearson"; } + void calculate(const double successes, const double trials) override; + const char* name() const override { return "Clopper-Pearson"; } #if (defined (STANDALONE) or defined (__CINT__) ) ClassDef(ClopperPearsonBinomialInterval,1) #endif diff --git a/PhysicsTools/RooStatsCms/interface/ExclusionBandPlot.h b/PhysicsTools/RooStatsCms/interface/ExclusionBandPlot.h index f6528bdf2e0dc..31f81712bd17a 100644 --- a/PhysicsTools/RooStatsCms/interface/ExclusionBandPlot.h +++ b/PhysicsTools/RooStatsCms/interface/ExclusionBandPlot.h @@ -51,16 +51,16 @@ class ExclusionBandPlot : public StatisticalPlot { void setTitle(const char* title); /// Destructor - ~ExclusionBandPlot(); + ~ExclusionBandPlot() override; /// Draw on canvas - void draw (const char* options=""); + void draw (const char* options="") override; /// Print the relevant information - void print (const char* options=""); + void print (const char* options="") override; /// All the objects are written to rootfile - void dumpToFile (const char* RootFileName, const char* options); + void dumpToFile (const char* RootFileName, const char* options) override; private: diff --git a/PhysicsTools/RooStatsCms/interface/FeldmanCousinsBinomialInterval.h b/PhysicsTools/RooStatsCms/interface/FeldmanCousinsBinomialInterval.h index 0bcca1537e642..8988aa6063171 100644 --- a/PhysicsTools/RooStatsCms/interface/FeldmanCousinsBinomialInterval.h +++ b/PhysicsTools/RooStatsCms/interface/FeldmanCousinsBinomialInterval.h @@ -14,7 +14,7 @@ struct FeldmanCousinsSorter { }; class FeldmanCousinsBinomialInterval : public BinomialNoncentralInterval { - const char* name() const { return "Feldman-Cousins"; } + const char* name() const override { return "Feldman-Cousins"; } #if (defined (STANDALONE) or defined (__CINT__) ) ClassDef(FeldmanCousinsBinomialInterval,1) diff --git a/PhysicsTools/RooStatsCms/interface/LEPBandPlot.h b/PhysicsTools/RooStatsCms/interface/LEPBandPlot.h index 760cf3e709f89..ef9d741e06317 100644 --- a/PhysicsTools/RooStatsCms/interface/LEPBandPlot.h +++ b/PhysicsTools/RooStatsCms/interface/LEPBandPlot.h @@ -50,7 +50,7 @@ class LEPBandPlot : public StatisticalPlot { double* sb_vals, double* b_vals, double* b_rms, - double* exp_vals=0); + double* exp_vals=nullptr); /// Constructor LEPBandPlot(const char* name, const char* title, @@ -62,7 +62,7 @@ class LEPBandPlot : public StatisticalPlot { double* b_down_bars1, double* b_up_bars2, double* b_down_bars2, - double* exp_vals=0); + double* exp_vals=nullptr); /// Set the title of the x axis void setXaxisTitle(const char* title); @@ -71,16 +71,16 @@ class LEPBandPlot : public StatisticalPlot { void setTitle(const char* title); /// Destructor - ~LEPBandPlot(); + ~LEPBandPlot() override; /// Draw on canvas - void draw (const char* options=""); + void draw (const char* options="") override; /// Print the relevant information - void print (const char* options=""); + void print (const char* options="") override; /// All the objects are written to rootfile - void dumpToFile (const char* RootFileName, const char* options); + void dumpToFile (const char* RootFileName, const char* options) override; private: diff --git a/PhysicsTools/RooStatsCms/interface/StatisticalPlot.h b/PhysicsTools/RooStatsCms/interface/StatisticalPlot.h index c5feae3186e5d..571c2b2b80966 100644 --- a/PhysicsTools/RooStatsCms/interface/StatisticalPlot.h +++ b/PhysicsTools/RooStatsCms/interface/StatisticalPlot.h @@ -26,7 +26,7 @@ class StatisticalPlot : public TNamed { StatisticalPlot(const char* name,const char* title,bool verbosity=true); /// Destructor - ~StatisticalPlot(); + ~StatisticalPlot() override; /// Set the verbosity void setVerbosity(bool verbosity); diff --git a/PhysicsTools/RooStatsCms/interface/SterneBinomialInterval.h b/PhysicsTools/RooStatsCms/interface/SterneBinomialInterval.h index 35dfe0f04dabc..c2448bdc8d006 100644 --- a/PhysicsTools/RooStatsCms/interface/SterneBinomialInterval.h +++ b/PhysicsTools/RooStatsCms/interface/SterneBinomialInterval.h @@ -14,7 +14,7 @@ struct SterneSorter { }; class SterneBinomialInterval : public BinomialNoncentralInterval { - const char* name() const { return "Feldman-Cousins"; } + const char* name() const override { return "Feldman-Cousins"; } #if (defined (STANDALONE) or defined (__CINT__) ) ClassDef(SterneBinomialInterval,1) diff --git a/PhysicsTools/RooStatsCms/src/ExclusionBandPlot.cc b/PhysicsTools/RooStatsCms/src/ExclusionBandPlot.cc index 6c1d573d0a96a..65e0b809ad201 100644 --- a/PhysicsTools/RooStatsCms/src/ExclusionBandPlot.cc +++ b/PhysicsTools/RooStatsCms/src/ExclusionBandPlot.cc @@ -54,8 +54,8 @@ ExclusionBandPlot::ExclusionBandPlot(const char* name, m_y_band_graph_1sigma = new TGraphAsymmErrors(n_points, x_vals, y_vals, - 0, - 0, + nullptr, + nullptr, y_down_bars1, y_up_bars1); m_y_band_graph_1sigma->SetFillColor(kGreen); @@ -66,8 +66,8 @@ ExclusionBandPlot::ExclusionBandPlot(const char* name, m_y_band_graph_2sigma = new TGraphAsymmErrors(n_points, x_vals, y_vals, - 0, - 0, + nullptr, + nullptr, y_down_bars2, y_up_bars2); m_y_band_graph_2sigma->SetFillColor(kYellow); diff --git a/PhysicsTools/RooStatsCms/src/LEPBandPlot.cc b/PhysicsTools/RooStatsCms/src/LEPBandPlot.cc index a7abd3514058c..e211a189fd9ba 100644 --- a/PhysicsTools/RooStatsCms/src/LEPBandPlot.cc +++ b/PhysicsTools/RooStatsCms/src/LEPBandPlot.cc @@ -38,7 +38,7 @@ LEPBandPlot::LEPBandPlot(const char* name, // bkg hypothesis band 1 sigma - m_b_band_graph_1sigma = new TGraphErrors(n_points, x_vals, b_vals ,0, b_rms); + m_b_band_graph_1sigma = new TGraphErrors(n_points, x_vals, b_vals ,nullptr, b_rms); m_b_band_graph_1sigma->SetFillColor(kGreen); m_b_band_graph_1sigma->SetLineColor(kGreen); m_b_band_graph_1sigma->SetMarkerColor(kGreen); @@ -49,7 +49,7 @@ LEPBandPlot::LEPBandPlot(const char* name, b_2rms[i]=2*b_rms[i]; // bkg hypothesis band 2 sigma - m_b_band_graph_2sigma = new TGraphErrors(n_points, x_vals, b_vals ,0, b_2rms); + m_b_band_graph_2sigma = new TGraphErrors(n_points, x_vals, b_vals ,nullptr, b_2rms); m_b_band_graph_2sigma->SetFillColor(kYellow); m_b_band_graph_2sigma->SetFillColor(kYellow); m_b_band_graph_2sigma->SetLineColor(kYellow); @@ -64,13 +64,13 @@ LEPBandPlot::LEPBandPlot(const char* name, m_sb_line_graph->SetFillColor(kWhite); // The points of the data - if (exp_vals!=0){ + if (exp_vals!=nullptr){ m_data_line_graph = new TGraph(n_points, x_vals, exp_vals); m_data_line_graph->SetLineWidth(2); m_data_line_graph->SetFillColor(kWhite); } else - m_data_line_graph =NULL; + m_data_line_graph =nullptr; // Line for 0 @@ -85,7 +85,7 @@ LEPBandPlot::LEPBandPlot(const char* name, m_legend->AddEntry(m_b_band_graph_2sigma,"-2lnQ #pm 2#sigma"); m_legend->AddEntry(m_b_line_graph,"-2lnQ_{B}"); m_legend->AddEntry(m_sb_line_graph,"-2lnQ_{SB}"); - if (m_data_line_graph!=NULL) + if (m_data_line_graph!=nullptr) m_legend->AddEntry(m_data_line_graph,"-2lnQ_{Obs}"); m_legend->SetFillColor(0); @@ -120,8 +120,8 @@ LEPBandPlot::LEPBandPlot(const char* name, m_b_band_graph_1sigma = new TGraphAsymmErrors(n_points, x_vals, b_vals, - 0, - 0, + nullptr, + nullptr, b_down_bars1, b_up_bars1); m_b_band_graph_1sigma->SetFillColor(kGreen); @@ -132,8 +132,8 @@ LEPBandPlot::LEPBandPlot(const char* name, m_b_band_graph_2sigma = new TGraphAsymmErrors(n_points, x_vals, b_vals, - 0, - 0, + nullptr, + nullptr, b_down_bars2, b_up_bars2); m_b_band_graph_2sigma->SetFillColor(kYellow); @@ -150,13 +150,13 @@ LEPBandPlot::LEPBandPlot(const char* name, m_sb_line_graph->SetFillColor(kWhite); // The points of the data - if (exp_vals!=0){ + if (exp_vals!=nullptr){ m_data_line_graph = new TGraph(n_points, x_vals, exp_vals); m_data_line_graph->SetLineWidth(2); m_data_line_graph->SetFillColor(kWhite); } else - m_data_line_graph =0; + m_data_line_graph =nullptr; // Line for 0 m_zero_line = new TLine(m_b_line_graph->GetXaxis()->GetXmin(),0, @@ -170,7 +170,7 @@ LEPBandPlot::LEPBandPlot(const char* name, m_legend->AddEntry(m_b_band_graph_2sigma,"-2lnQ #pm 2#sigma"); m_legend->AddEntry(m_b_line_graph,"-2lnQ_{B}"); m_legend->AddEntry(m_sb_line_graph,"-2lnQ_{SB}"); - if (m_data_line_graph!=NULL) + if (m_data_line_graph!=nullptr) m_legend->AddEntry(m_data_line_graph,"-2lnQ_{Obs}"); m_legend->SetFillColor(0); @@ -186,7 +186,7 @@ LEPBandPlot::~LEPBandPlot(){ delete m_b_band_graph_1sigma; delete m_b_band_graph_2sigma; - if (m_data_line_graph!=NULL) + if (m_data_line_graph!=nullptr) delete m_data_line_graph; delete m_zero_line; @@ -246,7 +246,7 @@ void LEPBandPlot::draw (const char* options){ m_sb_line_graph->Draw("C"); } - if (m_data_line_graph!=NULL) + if (m_data_line_graph!=nullptr) m_data_line_graph->Draw("L"); m_zero_line->Draw("Same"); diff --git a/PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h b/PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h index b46b77d4fb5ba..b6a6f5ba63a98 100644 --- a/PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h +++ b/PhysicsTools/SelectorUtils/interface/CutApplicatorBase.h @@ -59,7 +59,7 @@ class CutApplicatorBase : public candf::CandidateCut { #endif - virtual result_type operator()(const argument_type&) const + result_type operator()(const argument_type&) const #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__) final #endif @@ -86,10 +86,10 @@ class CutApplicatorBase : public candf::CandidateCut { virtual CandidateType candidateType() const { return NONE; } - virtual const std::string& name() const { return _name; } + const std::string& name() const override { return _name; } //! Destructor - virtual ~CutApplicatorBase(){}; + ~CutApplicatorBase() override{}; private: const std::string _name; diff --git a/PhysicsTools/SelectorUtils/interface/CutApplicatorWithEventContentBase.h b/PhysicsTools/SelectorUtils/interface/CutApplicatorWithEventContentBase.h index 1421b76e8fceb..a4b4cf1b9e3c3 100644 --- a/PhysicsTools/SelectorUtils/interface/CutApplicatorWithEventContentBase.h +++ b/PhysicsTools/SelectorUtils/interface/CutApplicatorWithEventContentBase.h @@ -36,7 +36,7 @@ class CutApplicatorWithEventContentBase : public CutApplicatorBase { virtual void getEventContent(const edm::EventBase&) = 0; //! Destructor - virtual ~CutApplicatorWithEventContentBase(){}; + ~CutApplicatorWithEventContentBase() override{}; protected: #if !defined(__CINT__) && !defined(__MAKECINT__) && !defined(__REFLEX__) diff --git a/PhysicsTools/SelectorUtils/interface/ElectronVPlusJetsIDSelectionFunctor.h b/PhysicsTools/SelectorUtils/interface/ElectronVPlusJetsIDSelectionFunctor.h index b60644d62aab3..cb4e7d2bedc9c 100644 --- a/PhysicsTools/SelectorUtils/interface/ElectronVPlusJetsIDSelectionFunctor.h +++ b/PhysicsTools/SelectorUtils/interface/ElectronVPlusJetsIDSelectionFunctor.h @@ -85,7 +85,7 @@ class ElectronVPlusJetsIDSelectionFunctor : public Selector { } // Allow for multiple definitions of the cuts. - bool operator()( const pat::Electron & electron, pat::strbitset & ret ) + bool operator()( const pat::Electron & electron, pat::strbitset & ret ) override { if ( version_ == FIRSTDATA ) return firstDataCuts( electron, ret ); else { diff --git a/PhysicsTools/SelectorUtils/interface/JetIDSelectionFunctor.h b/PhysicsTools/SelectorUtils/interface/JetIDSelectionFunctor.h index 0edf8cd367303..c50704846cab1 100644 --- a/PhysicsTools/SelectorUtils/interface/JetIDSelectionFunctor.h +++ b/PhysicsTools/SelectorUtils/interface/JetIDSelectionFunctor.h @@ -240,7 +240,7 @@ class JetIDSelectionFunctor : public Selector { // // Accessor from PAT jets // - bool operator()( const pat::Jet & jet, pat::strbitset & ret ) + bool operator()( const pat::Jet & jet, pat::strbitset & ret ) override { if ( ! jet.isCaloJet() && !jet.isJPTJet() ) { edm::LogWarning( "NYI" )<<"Criteria for pat::Jet-s other than CaloJets and JPTJets are not yet implemented"; diff --git a/PhysicsTools/SelectorUtils/interface/MuonVPlusJetsIDSelectionFunctor.h b/PhysicsTools/SelectorUtils/interface/MuonVPlusJetsIDSelectionFunctor.h index e0bad6aa348e0..add4583fd3ab4 100644 --- a/PhysicsTools/SelectorUtils/interface/MuonVPlusJetsIDSelectionFunctor.h +++ b/PhysicsTools/SelectorUtils/interface/MuonVPlusJetsIDSelectionFunctor.h @@ -196,7 +196,7 @@ class MuonVPlusJetsIDSelectionFunctor : public Selector { } // Allow for multiple definitions of the cuts. - bool operator()( const pat::Muon & muon, edm::EventBase const & event, pat::strbitset & ret ) + bool operator()( const pat::Muon & muon, edm::EventBase const & event, pat::strbitset & ret ) override { if (version_ == FALL10 ) return fall10Cuts(muon, event, ret); @@ -213,7 +213,7 @@ class MuonVPlusJetsIDSelectionFunctor : public Selector { } // For compatibility with older versions. - bool operator()( const pat::Muon & muon, pat::strbitset & ret ) + bool operator()( const pat::Muon & muon, pat::strbitset & ret ) override { if (version_ == SPRING10 || version_ == FALL10 ) throw cms::Exception("LogicError") @@ -390,7 +390,7 @@ class MuonVPlusJetsIDSelectionFunctor : public Selector { event.getByLabel( pvSrc_, pvtxHandle_ ); double zvtx = -999; - if ( pvtxHandle_->size() > 0 ) { + if ( !pvtxHandle_->empty() ) { zvtx = pvtxHandle_->at(0).z(); } else { throw cms::Exception("InvalidInput") << " There needs to be at least one primary vertex in the event." << std::endl; @@ -486,7 +486,7 @@ class MuonVPlusJetsIDSelectionFunctor : public Selector { event.getByLabel( pvSrc_, pvtxHandle_ ); double zvtx = -999; - if ( pvtxHandle_->size() > 0 ) { + if ( !pvtxHandle_->empty() ) { zvtx = pvtxHandle_->at(0).z(); } else { throw cms::Exception("InvalidInput") << " There needs to be at least one primary vertex in the event." << std::endl; diff --git a/PhysicsTools/SelectorUtils/interface/PFElectronSelector.h b/PhysicsTools/SelectorUtils/interface/PFElectronSelector.h index a1be88e92435e..477c65aa81a33 100644 --- a/PhysicsTools/SelectorUtils/interface/PFElectronSelector.h +++ b/PhysicsTools/SelectorUtils/interface/PFElectronSelector.h @@ -98,7 +98,7 @@ class PFElectronSelector : public Selector { } // Allow for multiple definitions of the cuts. - bool operator()( const pat::Electron & electron, pat::strbitset & ret ) + bool operator()( const pat::Electron & electron, pat::strbitset & ret ) override { if (version_ == SPRING11 ) return spring11Cuts(electron, ret); else { diff --git a/PhysicsTools/SelectorUtils/interface/PFJetIDSelectionFunctor.h b/PhysicsTools/SelectorUtils/interface/PFJetIDSelectionFunctor.h index e0bb54c62ff91..f47248b164cfd 100644 --- a/PhysicsTools/SelectorUtils/interface/PFJetIDSelectionFunctor.h +++ b/PhysicsTools/SelectorUtils/interface/PFJetIDSelectionFunctor.h @@ -257,7 +257,7 @@ class PFJetIDSelectionFunctor : public Selector { // // Accessor from PAT jets // - bool operator()( const pat::Jet & jet, pat::strbitset & ret ) + bool operator()( const pat::Jet & jet, pat::strbitset & ret ) override { if ( version_ == FIRSTDATA || version_ == RUNIISTARTUP || version_ == WINTER16) { if ( jet.currentJECLevel() == "Uncorrected" || !jet.jecSetsAvailable() ) @@ -314,7 +314,7 @@ class PFJetIDSelectionFunctor : public Selector { pat::Jet const * patJet = dynamic_cast(&jet); reco::BasicJet const * basicJet = dynamic_cast(&jet); - if ( patJet != 0 ) { + if ( patJet != nullptr ) { if ( patJet->isPFJet() ) { chf = patJet->chargedHadronEnergyFraction(); nhf = patJet->neutralHadronEnergyFraction(); @@ -358,7 +358,7 @@ class PFJetIDSelectionFunctor : public Selector { } } } // end if pat jet - else if ( pfJet != 0 ) { + else if ( pfJet != nullptr ) { // CV: need to compute energy fractions in a way that works for corrected as well as for uncorrected PFJets double jetEnergyUncorrected = pfJet->chargedHadronEnergy() @@ -379,7 +379,7 @@ class PFJetIDSelectionFunctor : public Selector { } // end if PF jet // Handle the special case where this is a composed jet for // subjet analyses - else if ( basicJet != 0 ) { + else if ( basicJet != nullptr ) { double e_chf = 0.0; double e_nhf = 0.0; double e_cef = 0.0; diff --git a/PhysicsTools/SelectorUtils/interface/PFMuonSelector.h b/PhysicsTools/SelectorUtils/interface/PFMuonSelector.h index bb225639917a6..6cd399fafa6ac 100644 --- a/PhysicsTools/SelectorUtils/interface/PFMuonSelector.h +++ b/PhysicsTools/SelectorUtils/interface/PFMuonSelector.h @@ -108,7 +108,7 @@ class PFMuonSelector : public Selector { } // Allow for multiple definitions of the cuts. - bool operator()( const pat::Muon & muon, pat::strbitset & ret ) + bool operator()( const pat::Muon & muon, pat::strbitset & ret ) override { if (version_ == TOPPAG12_LJETS ) return TopPag12LjetsCuts(muon, ret); else { diff --git a/PhysicsTools/SelectorUtils/interface/PVObjectSelector.h b/PhysicsTools/SelectorUtils/interface/PVObjectSelector.h index 05b8613962cf9..3b01d7adaa236 100644 --- a/PhysicsTools/SelectorUtils/interface/PVObjectSelector.h +++ b/PhysicsTools/SelectorUtils/interface/PVObjectSelector.h @@ -43,7 +43,7 @@ class PVObjectSelector : public Selector { retInternal_ = getBitTemplate(); } - bool operator() ( reco::Vertex const & pv, pat::strbitset & ret ) { + bool operator() ( reco::Vertex const & pv, pat::strbitset & ret ) override { if ( pv.isFake() ) return false; if ( pv.ndof() >= cut(indexNDOF_, double() ) diff --git a/PhysicsTools/SelectorUtils/interface/PVSelector.h b/PhysicsTools/SelectorUtils/interface/PVSelector.h index bc88421c9c675..2b6bb6f9e45e4 100644 --- a/PhysicsTools/SelectorUtils/interface/PVSelector.h +++ b/PhysicsTools/SelectorUtils/interface/PVSelector.h @@ -35,13 +35,13 @@ class PVSelector : public Selector { } #endif - bool operator() ( edm::EventBase const & event, pat::strbitset & ret ) { + bool operator() ( edm::EventBase const & event, pat::strbitset & ret ) override { ret.set(false); event.getByLabel(pvSrc_, h_primVtx); // check if there is a good primary vertex - if ( h_primVtx->size() < 1 ) return false; + if ( h_primVtx->empty() ) return false; // Loop over PV's and count those that pass int npv = 0; diff --git a/PhysicsTools/SelectorUtils/interface/RunLumiSelector.h b/PhysicsTools/SelectorUtils/interface/RunLumiSelector.h index 9a3bad92d216c..a5e7c12979e8f 100644 --- a/PhysicsTools/SelectorUtils/interface/RunLumiSelector.h +++ b/PhysicsTools/SelectorUtils/interface/RunLumiSelector.h @@ -40,7 +40,7 @@ class RunLumiSelector : public EventSelector { retInternal_ = getBitTemplate(); } - bool operator() ( edm::EventBase const & ev, pat::strbitset & ret ) { + bool operator() ( edm::EventBase const & ev, pat::strbitset & ret ) override { if ( !ignoreCut("RunLumi") ) { bool goodLumi = false; diff --git a/PhysicsTools/SelectorUtils/interface/SimpleCutBasedElectronIDSelectionFunctor.h b/PhysicsTools/SelectorUtils/interface/SimpleCutBasedElectronIDSelectionFunctor.h index 01e6053f5a34a..e7aa219e3e4ae 100644 --- a/PhysicsTools/SelectorUtils/interface/SimpleCutBasedElectronIDSelectionFunctor.h +++ b/PhysicsTools/SelectorUtils/interface/SimpleCutBasedElectronIDSelectionFunctor.h @@ -455,7 +455,7 @@ class SimpleCutBasedElectronIDSelectionFunctor : public Selector } - bool operator()( const pat::Electron & electron, pat::strbitset & ret ) + bool operator()( const pat::Electron & electron, pat::strbitset & ret ) override { // for the time being only Spring10 variable definition return spring10Variables(electron, ret); diff --git a/PhysicsTools/SelectorUtils/interface/VersionedIdProducer.h b/PhysicsTools/SelectorUtils/interface/VersionedIdProducer.h index 192f350901285..ad66dbacbf539 100644 --- a/PhysicsTools/SelectorUtils/interface/VersionedIdProducer.h +++ b/PhysicsTools/SelectorUtils/interface/VersionedIdProducer.h @@ -32,9 +32,9 @@ class VersionedIdProducer : public edm::stream::EDProducer<> { using TokenType = edm::EDGetTokenT; explicit VersionedIdProducer(const edm::ParameterSet&); - ~VersionedIdProducer() {} + ~VersionedIdProducer() override {} - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/PhysicsTools/SelectorUtils/interface/VersionedSelector.h b/PhysicsTools/SelectorUtils/interface/VersionedSelector.h index e944827bca940..2b56da36fbeca 100644 --- a/PhysicsTools/SelectorUtils/interface/VersionedSelector.h +++ b/PhysicsTools/SelectorUtils/interface/VersionedSelector.h @@ -69,7 +69,7 @@ class VersionedSelector : public Selector { this->retInternal_ = this->getBitTemplate(); } - virtual bool operator()( const T& ref, pat::strbitset& ret ) CINT_GUARD(override final) { + bool operator()( const T& ref, pat::strbitset& ret ) CINT_GUARD(final) { howfar_ = 0; bitmap_ = 0; values_.clear(); @@ -94,7 +94,7 @@ class VersionedSelector : public Selector { return (bool)ret; } - virtual bool operator()(const T& ref, edm::EventBase const& e, pat::strbitset& ret) CINT_GUARD(override final) { + bool operator()(const T& ref, edm::EventBase const& e, pat::strbitset& ret) CINT_GUARD(final) { // setup isolation needs for( size_t i = 0, cutssize = cuts_.size(); i < cutssize; ++i ) { if( needs_event_content_[i] ) { @@ -120,14 +120,14 @@ class VersionedSelector : public Selector { return this->operator()(temp,e); } - virtual bool operator()( T const & t ) CINT_GUARD(override final) { + bool operator()( T const & t ) CINT_GUARD(final) { this->retInternal_.set(false); this->operator()(t, this->retInternal_); this->setIgnored(this->retInternal_); return (bool)this->retInternal_; } - virtual bool operator()( T const & t, edm::EventBase const & e) CINT_GUARD(override final) { + bool operator()( T const & t, edm::EventBase const & e) CINT_GUARD(final) { this->retInternal_.set(false); this->operator()(t, e, this->retInternal_); this->setIgnored(this->retInternal_); @@ -202,7 +202,7 @@ initialize( const edm::ParameterSet& conf ) { } const std::vector& cutflow = conf.getParameterSetVector("cutFlow"); - if( cutflow.size() == 0 ) { + if( cutflow.empty() ) { throw cms::Exception("InvalidCutFlow") << "You have supplied a null/empty cutflow to VersionedIDSelector," << " please add content to the cuflow and try again."; diff --git a/PhysicsTools/SelectorUtils/interface/WPlusJetsEventSelector.h b/PhysicsTools/SelectorUtils/interface/WPlusJetsEventSelector.h index 51bc86a112a8f..5613ead612b35 100644 --- a/PhysicsTools/SelectorUtils/interface/WPlusJetsEventSelector.h +++ b/PhysicsTools/SelectorUtils/interface/WPlusJetsEventSelector.h @@ -43,7 +43,7 @@ class WPlusJetsEventSelector : public EventSelector { virtual void scaleJets(double scale) {jetScale_ = scale;} - virtual bool operator()( edm::EventBase const & t, pat::strbitset & ret); + bool operator()( edm::EventBase const & t, pat::strbitset & ret) override; using EventSelector::operator(); std::vector const & selectedJets () const { return selectedJets_; } diff --git a/PhysicsTools/SelectorUtils/interface/strbitset.h b/PhysicsTools/SelectorUtils/interface/strbitset.h index 7dfc7dcc13df1..0d675d00ca9e7 100644 --- a/PhysicsTools/SelectorUtils/interface/strbitset.h +++ b/PhysicsTools/SelectorUtils/interface/strbitset.h @@ -31,7 +31,7 @@ class strbitset { friend class strbitset; - index_type() :bitset_(0), i_(0) {} + index_type() :bitset_(nullptr), i_(0) {} index_type( strbitset const * b, std::string const & s) : bitset_(b) diff --git a/PhysicsTools/SelectorUtils/plugins/EtaMultiRangeCut.cc b/PhysicsTools/SelectorUtils/plugins/EtaMultiRangeCut.cc index eb5f221f20ccf..c79c7c90b0378 100644 --- a/PhysicsTools/SelectorUtils/plugins/EtaMultiRangeCut.cc +++ b/PhysicsTools/SelectorUtils/plugins/EtaMultiRangeCut.cc @@ -14,11 +14,11 @@ class EtaMultiRangeCut : public CutApplicatorBase { } } - double value(const reco::CandidatePtr& cand) const override final { + double value(const reco::CandidatePtr& cand) const final { return ( _absEta ? std::abs(cand->eta()) : cand->eta() ); } - result_type asCandidate(const argument_type&) const override final; + result_type asCandidate(const argument_type&) const final; private: const bool _absEta; diff --git a/PhysicsTools/SelectorUtils/plugins/ExpressionEvaluatorCut.cc b/PhysicsTools/SelectorUtils/plugins/ExpressionEvaluatorCut.cc index 662203dc3a537..8b57949d372e4 100644 --- a/PhysicsTools/SelectorUtils/plugins/ExpressionEvaluatorCut.cc +++ b/PhysicsTools/SelectorUtils/plugins/ExpressionEvaluatorCut.cc @@ -6,17 +6,17 @@ class ExpressionEvaluatorCut : public CutApplicatorBase { public: ExpressionEvaluatorCut(const edm::ParameterSet& c); - virtual ~ExpressionEvaluatorCut(){}; + ~ExpressionEvaluatorCut() override{}; - result_type asCandidate(const argument_type& cand) const override final { + result_type asCandidate(const argument_type& cand) const final { return (*cut_)(cand); } - double value(const reco::CandidatePtr& cand) const override final { + double value(const reco::CandidatePtr& cand) const final { return cut_->value(cand); } - const std::string& name() const override final { return realname_; } + const std::string& name() const final { return realname_; } private: const std::string realname_; @@ -48,7 +48,7 @@ ExpressionEvaluatorCut(const edm::ParameterSet& c) : valExpr ); reco::ExpressionEvaluator eval("PhysicsTools/SelectorUtils", "CutApplicatorBase", - total_expr.c_str()); + total_expr); cut_ = eval.expr(); } diff --git a/PhysicsTools/SelectorUtils/plugins/ExpressionEvaluatorCutWithEventContent.cc b/PhysicsTools/SelectorUtils/plugins/ExpressionEvaluatorCutWithEventContent.cc index 995ece99d286e..887646e20eac4 100644 --- a/PhysicsTools/SelectorUtils/plugins/ExpressionEvaluatorCutWithEventContent.cc +++ b/PhysicsTools/SelectorUtils/plugins/ExpressionEvaluatorCutWithEventContent.cc @@ -6,25 +6,25 @@ class ExpressionEvaluatorCutWithEventContent : public CutApplicatorWithEventContentBase { public: ExpressionEvaluatorCutWithEventContent(const edm::ParameterSet& c); - virtual ~ExpressionEvaluatorCutWithEventContent() {}; + ~ExpressionEvaluatorCutWithEventContent() override {}; - result_type asCandidate(const argument_type& cand) const override final { + result_type asCandidate(const argument_type& cand) const final { return (*cut_)(cand); } - void setConsumes(edm::ConsumesCollector& sumes) override final { + void setConsumes(edm::ConsumesCollector& sumes) final { cut_->setConsumes(sumes); } - void getEventContent(const edm::EventBase& event) override final { + void getEventContent(const edm::EventBase& event) final { cut_->getEventContent(event); } - double value(const reco::CandidatePtr& cand) const override final { + double value(const reco::CandidatePtr& cand) const final { return cut_->value(cand); } - const std::string& name() const override final { return realname_; } + const std::string& name() const final { return realname_; } private: const std::string realname_; @@ -67,7 +67,7 @@ ExpressionEvaluatorCutWithEventContent(const edm::ParameterSet& c) : getEventContentExpr ); reco::ExpressionEvaluator eval("PhysicsTools/SelectorUtils", "CutApplicatorWithEventContentBase", - total_expr.c_str()); + total_expr); cut_ = eval.expr(); } diff --git a/PhysicsTools/SelectorUtils/plugins/MaxAbsEtaCut.cc b/PhysicsTools/SelectorUtils/plugins/MaxAbsEtaCut.cc index 2a7d97d3fcd64..7ba4f7f6bcd54 100644 --- a/PhysicsTools/SelectorUtils/plugins/MaxAbsEtaCut.cc +++ b/PhysicsTools/SelectorUtils/plugins/MaxAbsEtaCut.cc @@ -6,11 +6,11 @@ class MaxAbsEtaCut : public CutApplicatorBase { CutApplicatorBase(c), _maxEta(c.getParameter("maxEta")) { } - double value(const reco::CandidatePtr& cand) const override final { + double value(const reco::CandidatePtr& cand) const final { return std::abs(cand->eta()); } - result_type asCandidate(const argument_type& cand) const override final { + result_type asCandidate(const argument_type& cand) const final { return std::abs(cand->eta()) < _maxEta; } diff --git a/PhysicsTools/SelectorUtils/plugins/MinPtCut.cc b/PhysicsTools/SelectorUtils/plugins/MinPtCut.cc index 36850bf8bb767..1b79770104d37 100644 --- a/PhysicsTools/SelectorUtils/plugins/MinPtCut.cc +++ b/PhysicsTools/SelectorUtils/plugins/MinPtCut.cc @@ -6,11 +6,11 @@ class MinPtCut : public CutApplicatorBase { CutApplicatorBase(c), _minPt(c.getParameter("minPt")) { } - double value(const reco::CandidatePtr& cand) const override final { + double value(const reco::CandidatePtr& cand) const final { return cand->pt(); } - result_type asCandidate(const argument_type& cand) const override final { + result_type asCandidate(const argument_type& cand) const final { return cand->pt() > _minPt; } diff --git a/PhysicsTools/SelectorUtils/plugins/MinPtCutInEtaRanges.cc b/PhysicsTools/SelectorUtils/plugins/MinPtCutInEtaRanges.cc index 9a31cede6a770..66c9ffe713675 100644 --- a/PhysicsTools/SelectorUtils/plugins/MinPtCutInEtaRanges.cc +++ b/PhysicsTools/SelectorUtils/plugins/MinPtCutInEtaRanges.cc @@ -16,11 +16,11 @@ class MinPtCutInEtaRanges : public CutApplicatorBase { } } - double value(const reco::CandidatePtr& cand) const override final { + double value(const reco::CandidatePtr& cand) const final { return cand->pt(); } - result_type asCandidate(const argument_type&) const override final; + result_type asCandidate(const argument_type&) const final; private: const bool _absEta; diff --git a/PhysicsTools/SelectorUtils/src/WPlusJetsEventSelector.cc b/PhysicsTools/SelectorUtils/src/WPlusJetsEventSelector.cc index e6e2e1f27313d..c3a576b7a2683 100644 --- a/PhysicsTools/SelectorUtils/src/WPlusJetsEventSelector.cc +++ b/PhysicsTools/SelectorUtils/src/WPlusJetsEventSelector.cc @@ -134,11 +134,11 @@ bool WPlusJetsEventSelector::operator() ( edm::EventBase const & event, pat::str pat::TriggerPath const * elePath = trig->path(eleTrig_); - if ( muPlusJets_ && muPath != 0 && muPath->wasAccept() ) { + if ( muPlusJets_ && muPath != nullptr && muPath->wasAccept() ) { passTrig = true; } - if ( ePlusJets_ && elePath != 0 && elePath->wasAccept() ) { + if ( ePlusJets_ && elePath != nullptr && elePath->wasAccept() ) { passTrig = true; } } @@ -286,12 +286,12 @@ bool WPlusJetsEventSelector::operator() ( edm::EventBase const & event, pat::str ); bool oneElectron = ( selectedElectrons_.size() == 1 && - selectedMuons_.size() == 0 + selectedMuons_.empty() ); bool oneMuonMuVeto = ( selectedMuons_.size() == 1 && - looseMuons_.size() == 0 + looseMuons_.empty() ); diff --git a/PhysicsTools/TagAndProbe/interface/BaseTreeFiller.h b/PhysicsTools/TagAndProbe/interface/BaseTreeFiller.h index 583898d24da6b..7787e749a6a9f 100644 --- a/PhysicsTools/TagAndProbe/interface/BaseTreeFiller.h +++ b/PhysicsTools/TagAndProbe/interface/BaseTreeFiller.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/Common/interface/ValueMap.h" diff --git a/PhysicsTools/TagAndProbe/interface/ElectronMatchedCandidateProducer.h b/PhysicsTools/TagAndProbe/interface/ElectronMatchedCandidateProducer.h index dd43c695fb238..745e37638b34c 100644 --- a/PhysicsTools/TagAndProbe/interface/ElectronMatchedCandidateProducer.h +++ b/PhysicsTools/TagAndProbe/interface/ElectronMatchedCandidateProducer.h @@ -19,12 +19,12 @@ class ElectronMatchedCandidateProducer : public edm::EDProducer { public: explicit ElectronMatchedCandidateProducer(const edm::ParameterSet&); - ~ElectronMatchedCandidateProducer(); + ~ElectronMatchedCandidateProducer() override; private: - virtual void beginJob() override ; - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginJob() override ; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override; // ----------member data --------------------------- diff --git a/PhysicsTools/TagAndProbe/interface/RooCBExGaussShape.h b/PhysicsTools/TagAndProbe/interface/RooCBExGaussShape.h index 5c3a4425db3bf..aa05ec607a586 100644 --- a/PhysicsTools/TagAndProbe/interface/RooCBExGaussShape.h +++ b/PhysicsTools/TagAndProbe/interface/RooCBExGaussShape.h @@ -26,9 +26,9 @@ class RooCBExGaussShape : public RooAbsPdf { ); RooCBExGaussShape(const RooCBExGaussShape& other, const char* name); - inline virtual TObject* clone(const char* newname) const { return new RooCBExGaussShape(*this,newname);} - inline ~RooCBExGaussShape(){} - Double_t evaluate() const ; + inline TObject* clone(const char* newname) const override { return new RooCBExGaussShape(*this,newname);} + inline ~RooCBExGaussShape() override{} + Double_t evaluate() const override ; ClassDef(RooCBExGaussShape,1) diff --git a/PhysicsTools/TagAndProbe/interface/RooCMSShape.h b/PhysicsTools/TagAndProbe/interface/RooCMSShape.h index ba587c223b435..ecbfe2cf5916b 100644 --- a/PhysicsTools/TagAndProbe/interface/RooCMSShape.h +++ b/PhysicsTools/TagAndProbe/interface/RooCMSShape.h @@ -40,9 +40,9 @@ class RooCMSShape : public RooAbsPdf { RooAbsReal& _peak); RooCMSShape(const RooCMSShape& other, const char* name); - inline virtual TObject* clone(const char* newname) const { return new RooCMSShape(*this,newname); } - inline ~RooCMSShape() {} - Double_t evaluate() const ; + inline TObject* clone(const char* newname) const override { return new RooCMSShape(*this,newname); } + inline ~RooCMSShape() override {} + Double_t evaluate() const override ; ClassDef(RooCMSShape,1); diff --git a/PhysicsTools/TagAndProbe/interface/TagProbeFitter.h b/PhysicsTools/TagAndProbe/interface/TagProbeFitter.h index 2ec2b5982afb5..d148add7f3986 100644 --- a/PhysicsTools/TagAndProbe/interface/TagProbeFitter.h +++ b/PhysicsTools/TagAndProbe/interface/TagProbeFitter.h @@ -148,10 +148,10 @@ class TagProbeFitter { void saveEfficiencyPlots(RooDataSet& eff, const TString& effName, RooArgSet& binnedVariables, RooArgSet& mappedCategories); ///makes the 1D plot - void makeEfficiencyPlot1D(RooDataSet& eff, RooRealVar& v, const TString& plotName, const TString& plotTitle, const TString& effName, const char *catName = 0, int catIndex = -1); + void makeEfficiencyPlot1D(RooDataSet& eff, RooRealVar& v, const TString& plotName, const TString& plotTitle, const TString& effName, const char *catName = nullptr, int catIndex = -1); ///makes the 2D plot - void makeEfficiencyPlot2D(RooDataSet& eff, RooRealVar& v1, RooRealVar& v2, const TString& plotName, const TString& plotTitle, const TString& effName, const char *catName = 0, int catIndex = -1); + void makeEfficiencyPlot2D(RooDataSet& eff, RooRealVar& v1, RooRealVar& v2, const TString& plotName, const TString& plotTitle, const TString& effName, const char *catName = nullptr, int catIndex = -1); }; diff --git a/PhysicsTools/TagAndProbe/interface/TriggerCandProducer.h b/PhysicsTools/TagAndProbe/interface/TriggerCandProducer.h index d2780a544f3ea..09876df573606 100644 --- a/PhysicsTools/TagAndProbe/interface/TriggerCandProducer.h +++ b/PhysicsTools/TagAndProbe/interface/TriggerCandProducer.h @@ -25,13 +25,13 @@ class TriggerCandProducer : public edm::EDProducer { public: explicit TriggerCandProducer(const edm::ParameterSet&); - ~TriggerCandProducer(); + ~TriggerCandProducer() override; private: - virtual void beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) override; - virtual void beginJob() override; - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + void beginRun(edm::Run const& iRun, edm::EventSetup const& iSetup) override; + void beginJob() override; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override; // ----------member data -------------------------- diff --git a/PhysicsTools/TagAndProbe/interface/ZGeneratorLineShape.h b/PhysicsTools/TagAndProbe/interface/ZGeneratorLineShape.h index 2bca9344a3177..acffe4abf11ce 100644 --- a/PhysicsTools/TagAndProbe/interface/ZGeneratorLineShape.h +++ b/PhysicsTools/TagAndProbe/interface/ZGeneratorLineShape.h @@ -18,10 +18,10 @@ class ZGeneratorLineShape : public RooAbsPdf { ); ZGeneratorLineShape(const ZGeneratorLineShape& other, const char* name); - inline virtual TObject* clone(const char* newname) const { return new ZGeneratorLineShape(*this,newname);} - inline ~ZGeneratorLineShape(){}; + inline TObject* clone(const char* newname) const override { return new ZGeneratorLineShape(*this,newname);} + inline ~ZGeneratorLineShape() override{}; ClassDef(ZGeneratorLineShape,1) - Double_t evaluate() const; + Double_t evaluate() const override; protected: RooRealProxy m ; RooDataHist* dataHist; diff --git a/PhysicsTools/TagAndProbe/plugins/AnythingToValueMap.h b/PhysicsTools/TagAndProbe/plugins/AnythingToValueMap.h index dea4b4ef593a4..3b2b17c4ee38a 100644 --- a/PhysicsTools/TagAndProbe/plugins/AnythingToValueMap.h +++ b/PhysicsTools/TagAndProbe/plugins/AnythingToValueMap.h @@ -23,9 +23,9 @@ namespace pat { namespace helper { adaptor_(iConfig,consumesCollector()) { produces< Map >(adaptor_.label()); } - ~AnythingToValueMap() { } + ~AnythingToValueMap() override { } - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) ; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override ; private: bool failSilently_; @@ -69,9 +69,9 @@ void AnythingToValueMap::produce(edm::Event & iEv produces< Map >(adaptors_.back().label()); } } - ~ManyThingsToValueMaps() { } + ~ManyThingsToValueMaps() override { } - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) ; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override ; private: bool failSilently_; diff --git a/PhysicsTools/TagAndProbe/plugins/ColinsSoperVariablesComputer.cc b/PhysicsTools/TagAndProbe/plugins/ColinsSoperVariablesComputer.cc index eea8d1b6e1df7..bde6844a9b858 100644 --- a/PhysicsTools/TagAndProbe/plugins/ColinsSoperVariablesComputer.cc +++ b/PhysicsTools/TagAndProbe/plugins/ColinsSoperVariablesComputer.cc @@ -27,9 +27,9 @@ class ColinsSoperVariablesComputer : public edm::EDProducer { public: explicit ColinsSoperVariablesComputer(const edm::ParameterSet & iConfig); - virtual ~ColinsSoperVariablesComputer() ; + ~ColinsSoperVariablesComputer() override ; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; private: edm::EDGetTokenT > parentBosonToken_; @@ -67,8 +67,8 @@ ColinsSoperVariablesComputer::produce(edm::Event & iEvent, const edm::EventSetup double sin2theta = -10.0; double tanphi = -10.0; - const reco::Candidate* daughter1=NULL; - const reco::Candidate* daughter2=NULL; + const reco::Candidate* daughter1=nullptr; + const reco::Candidate* daughter2=nullptr; TLorentzVector mu (0., 0., 0., 0.); TLorentzVector mubar (0., 0., 0., 0.); bool isOS = false; @@ -82,7 +82,7 @@ ColinsSoperVariablesComputer::produce(edm::Event & iEvent, const edm::EventSetup daughter1 = boson->daughter(0); daughter2 = boson->daughter(1); - if( !(0==daughter1 || 0==daughter2) ) { + if( !(nullptr==daughter1 || nullptr==daughter2) ) { isOS = false; charge1 = daughter1->charge(); charge2 = daughter2->charge(); diff --git a/PhysicsTools/TagAndProbe/plugins/DeltaRNearestObjectComputer.cc b/PhysicsTools/TagAndProbe/plugins/DeltaRNearestObjectComputer.cc index fb4d3e1a7d8a5..9c2c07db7409e 100644 --- a/PhysicsTools/TagAndProbe/plugins/DeltaRNearestObjectComputer.cc +++ b/PhysicsTools/TagAndProbe/plugins/DeltaRNearestObjectComputer.cc @@ -44,9 +44,9 @@ template class DeltaRNearestObjectComputer : public edm::EDProducer { public: explicit DeltaRNearestObjectComputer(const edm::ParameterSet & iConfig); - virtual ~DeltaRNearestObjectComputer() ; + ~DeltaRNearestObjectComputer() override ; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; private: edm::EDGetTokenT > probesToken_; diff --git a/PhysicsTools/TagAndProbe/plugins/ElectronConversionRejectionVars.cc b/PhysicsTools/TagAndProbe/plugins/ElectronConversionRejectionVars.cc index 8a2d3dab4f1a7..e40e453ba4925 100644 --- a/PhysicsTools/TagAndProbe/plugins/ElectronConversionRejectionVars.cc +++ b/PhysicsTools/TagAndProbe/plugins/ElectronConversionRejectionVars.cc @@ -33,9 +33,9 @@ class ElectronConversionRejectionVars : public edm::EDProducer { public: explicit ElectronConversionRejectionVars(const edm::ParameterSet & iConfig); - virtual ~ElectronConversionRejectionVars() ; + ~ElectronConversionRejectionVars() override ; - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; private: edm::EDGetTokenT > probesToken_; diff --git a/PhysicsTools/TagAndProbe/plugins/NearbyCandCountComputer.cc b/PhysicsTools/TagAndProbe/plugins/NearbyCandCountComputer.cc index 8a999259774ac..d23dda83f0b1a 100644 --- a/PhysicsTools/TagAndProbe/plugins/NearbyCandCountComputer.cc +++ b/PhysicsTools/TagAndProbe/plugins/NearbyCandCountComputer.cc @@ -30,9 +30,9 @@ class NearbyCandCountComputer : public edm::EDProducer { public: explicit NearbyCandCountComputer(const edm::ParameterSet & iConfig); - virtual ~NearbyCandCountComputer() ; + ~NearbyCandCountComputer() override ; - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; private: edm::EDGetTokenT > probesToken_; diff --git a/PhysicsTools/TagAndProbe/plugins/ObjectMultiplicityCounter.cc b/PhysicsTools/TagAndProbe/plugins/ObjectMultiplicityCounter.cc index 934a54e94b65c..1ea8b5b055f0b 100644 --- a/PhysicsTools/TagAndProbe/plugins/ObjectMultiplicityCounter.cc +++ b/PhysicsTools/TagAndProbe/plugins/ObjectMultiplicityCounter.cc @@ -27,9 +27,9 @@ template class ObjectMultiplicityCounter : public edm::EDProducer { public: explicit ObjectMultiplicityCounter(const edm::ParameterSet & iConfig); - virtual ~ObjectMultiplicityCounter() ; + ~ObjectMultiplicityCounter() override ; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; private: edm::EDGetTokenT > probesToken_; diff --git a/PhysicsTools/TagAndProbe/plugins/ObjectViewCleaner.cc b/PhysicsTools/TagAndProbe/plugins/ObjectViewCleaner.cc index 9a5f18e55e1d6..5ddf61c4d7639 100644 --- a/PhysicsTools/TagAndProbe/plugins/ObjectViewCleaner.cc +++ b/PhysicsTools/TagAndProbe/plugins/ObjectViewCleaner.cc @@ -56,7 +56,7 @@ class ObjectViewCleaner : public edm::EDProducer public: // construction/destruction ObjectViewCleaner(const edm::ParameterSet& iConfig); - virtual ~ObjectViewCleaner(); + ~ObjectViewCleaner() override; // member functions void produce(edm::Event& iEvent,const edm::EventSetup& iSetup) override; diff --git a/PhysicsTools/TagAndProbe/plugins/ObjectViewMatcher.cc b/PhysicsTools/TagAndProbe/plugins/ObjectViewMatcher.cc index d8fbd4c1046fd..70a02cb2ec03b 100644 --- a/PhysicsTools/TagAndProbe/plugins/ObjectViewMatcher.cc +++ b/PhysicsTools/TagAndProbe/plugins/ObjectViewMatcher.cc @@ -53,7 +53,7 @@ class ObjectViewMatcher : public edm::EDProducer public: // construction/destruction ObjectViewMatcher(const edm::ParameterSet& iConfig); - virtual ~ObjectViewMatcher(); + ~ObjectViewMatcher() override; // member functions void produce(edm::Event& iEvent,const edm::EventSetup& iSetup) override; @@ -123,7 +123,7 @@ void ObjectViewMatcher::produce(edm::Event& iEvent,const edm::EventSetup edm::Handle > objects; iEvent.getByToken(srcObjectsTokens_[iSrc],objects); - if(objects->size()==0) continue; + if(objects->empty()) continue; for (unsigned int iObject=0;iObjectsize();iObject++) { const T1& candidate = candidates->at(iObject); diff --git a/PhysicsTools/TagAndProbe/plugins/OtherObjectVariableComputer.cc b/PhysicsTools/TagAndProbe/plugins/OtherObjectVariableComputer.cc index cebafb3fdd861..0912507a89cee 100644 --- a/PhysicsTools/TagAndProbe/plugins/OtherObjectVariableComputer.cc +++ b/PhysicsTools/TagAndProbe/plugins/OtherObjectVariableComputer.cc @@ -28,9 +28,9 @@ template class OtherObjectVariableComputer : public edm::EDProducer { public: explicit OtherObjectVariableComputer(const edm::ParameterSet & iConfig); - virtual ~OtherObjectVariableComputer() ; + ~OtherObjectVariableComputer() override ; - virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; + void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override; private: edm::EDGetTokenT > probesToken_; diff --git a/PhysicsTools/TagAndProbe/plugins/ProbeMulteplicityProducer.cc b/PhysicsTools/TagAndProbe/plugins/ProbeMulteplicityProducer.cc index c42d38c72712c..555d54dbfb050 100644 --- a/PhysicsTools/TagAndProbe/plugins/ProbeMulteplicityProducer.cc +++ b/PhysicsTools/TagAndProbe/plugins/ProbeMulteplicityProducer.cc @@ -25,9 +25,9 @@ class ProbeMulteplicityProducer : public edm::EDProducer { public: explicit ProbeMulteplicityProducer(const edm::ParameterSet & iConfig); - virtual ~ProbeMulteplicityProducer() ; + ~ProbeMulteplicityProducer() override ; - virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup); + void produce(edm::Event & iEvent, const edm::EventSetup & iSetup) override; private: edm::EDGetTokenT pairs_; diff --git a/PhysicsTools/TagAndProbe/plugins/ProbeTreeProducer.cc b/PhysicsTools/TagAndProbe/plugins/ProbeTreeProducer.cc index 5375895c6725c..76b199e1baab0 100644 --- a/PhysicsTools/TagAndProbe/plugins/ProbeTreeProducer.cc +++ b/PhysicsTools/TagAndProbe/plugins/ProbeTreeProducer.cc @@ -12,7 +12,7 @@ */ #include -#include +#include #include "boost/bind.hpp" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/EDFilter.h" @@ -28,11 +28,11 @@ class ProbeTreeProducer : public edm::EDFilter { public: explicit ProbeTreeProducer(const edm::ParameterSet&); - ~ProbeTreeProducer(); + ~ProbeTreeProducer() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override; /// InputTag to the collection of all probes edm::EDGetTokenT probesToken_; @@ -61,7 +61,7 @@ ProbeTreeProducer::ProbeTreeProducer(const edm::ParameterSet& iConfig) : cut_(iConfig.existsAs("cut") ? iConfig.getParameter("cut") : ""), filter_(iConfig.existsAs("filter") ? iConfig.getParameter("filter") : false), sortDescendingBy_(iConfig.existsAs("sortDescendingBy") ? iConfig.getParameter("sortDescendingBy") : ""), - sortFunction_(sortDescendingBy_.size()>0 ? sortDescendingBy_ : "pt"), //need to pass a valid default + sortFunction_(!sortDescendingBy_.empty() ? sortDescendingBy_ : "pt"), //need to pass a valid default maxProbes_(iConfig.existsAs("maxProbes") ? iConfig.getParameter("maxProbes") : -1), probeFiller_(new tnp::BaseTreeFiller("probe_tree", iConfig, consumesCollector())) { @@ -86,7 +86,7 @@ bool ProbeTreeProducer::filter(edm::Event& iEvent, const edm::EventSetup& iSetup } } // sort only if a function was provided - if(sortDescendingBy_.size()>0) sort(selectedProbes.begin(), selectedProbes.end(), boost::bind(&Pair::second, _1) > boost::bind(&Pair::second, _2)); + if(!sortDescendingBy_.empty()) sort(selectedProbes.begin(), selectedProbes.end(), boost::bind(&Pair::second, _1) > boost::bind(&Pair::second, _2)); // fill the first maxProbes_ into the tree for (size_t i = 0; i < (maxProbes_<0 ? selectedProbes.size() : std::min((size_t)maxProbes_, selectedProbes.size())); ++i){ probeFiller_->fill(selectedProbes[i].first); diff --git a/PhysicsTools/TagAndProbe/plugins/TagProbeFitTreeAnalyzer.cc b/PhysicsTools/TagAndProbe/plugins/TagProbeFitTreeAnalyzer.cc index d008e1a3ce326..80faeb6259f7b 100644 --- a/PhysicsTools/TagAndProbe/plugins/TagProbeFitTreeAnalyzer.cc +++ b/PhysicsTools/TagAndProbe/plugins/TagProbeFitTreeAnalyzer.cc @@ -14,9 +14,9 @@ using namespace edm; class TagProbeFitTreeAnalyzer : public edm::EDAnalyzer{ public: TagProbeFitTreeAnalyzer(const edm::ParameterSet& pset); - virtual ~TagProbeFitTreeAnalyzer(){}; - virtual void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override {}; - virtual void endRun(const edm::Run &run, const edm::EventSetup &setup) override{}; + ~TagProbeFitTreeAnalyzer() override{}; + void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override {}; + void endRun(const edm::Run &run, const edm::EventSetup &setup) override{}; void calculateEfficiency(string name, const edm::ParameterSet& pset); private: TagProbeFitter fitter; @@ -153,7 +153,7 @@ void TagProbeFitTreeAnalyzer::calculateEfficiency(string name, const edm::Parame if(pset.existsAs >("BinToPDFmap")){ binToPDFmap = pset.getParameter >("BinToPDFmap"); } - if((binToPDFmap.size() > 0) && (binToPDFmap.size()%2 == 0)){ + if((!binToPDFmap.empty()) && (binToPDFmap.size()%2 == 0)){ cout<<"BinToPDFmap must have odd size, first string is the default, followed by binRegExp - PDFname pairs!"< -#include +#include // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" @@ -48,12 +48,12 @@ class TagProbeFitTreeProducer : public edm::EDAnalyzer { public: explicit TagProbeFitTreeProducer(const edm::ParameterSet&); - ~TagProbeFitTreeProducer(); + ~TagProbeFitTreeProducer() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; //---- MC truth information /// Is this sample MC? @@ -94,7 +94,7 @@ TagProbeFitTreeProducer::TagProbeFitTreeProducer(const edm::ParameterSet& iConfi checkMotherInUnbiasEff_(makeMCUnbiasTree_ ? iConfig.getParameter("checkMotherInUnbiasEff") : false), tagProbePairMaker_(iConfig, consumesCollector()), treeFiller_(new tnp::TPTreeFiller(iConfig, consumesCollector())), - oldTagFiller_((iConfig.existsAs("fillTagTree") && iConfig.getParameter("fillTagTree")) ? new tnp::BaseTreeFiller("tag_tree",iConfig, consumesCollector()) : 0) + oldTagFiller_((iConfig.existsAs("fillTagTree") && iConfig.getParameter("fillTagTree")) ? new tnp::BaseTreeFiller("tag_tree",iConfig, consumesCollector()) : nullptr) { if (isMC_) { // For mc efficiency we need the MC matches for tags & probes diff --git a/PhysicsTools/TagAndProbe/src/BaseTreeFiller.cc b/PhysicsTools/TagAndProbe/src/BaseTreeFiller.cc index e06576c51c512..27b7a14069b10 100644 --- a/PhysicsTools/TagAndProbe/src/BaseTreeFiller.cc +++ b/PhysicsTools/TagAndProbe/src/BaseTreeFiller.cc @@ -123,7 +123,7 @@ tnp::BaseTreeFiller::BaseTreeFiller(const char *name, const edm::ParameterSet& i tnp::BaseTreeFiller::BaseTreeFiller(BaseTreeFiller &main, const edm::ParameterSet &iConfig, edm::ConsumesCollector && iC, const std::string &branchNamePrefix) : addRunLumiInfo_(false), addEventVariablesInfo_(false), - tree_(0) + tree_(nullptr) { addRunLumiInfo_ = main.addRunLumiInfo_; storePUweight_ = main.storePUweight_; @@ -242,7 +242,7 @@ void tnp::BaseTreeFiller::init(const edm::Event &iEvent) const { ////////////// CaloMET ////// edm::Handle met; iEvent.getByToken(metToken_,met); - if (met->size() == 0) { + if (met->empty()) { mMET_ = -1; mSumET_ = -1; mMETSign_ = -1; @@ -256,7 +256,7 @@ void tnp::BaseTreeFiller::init(const edm::Event &iEvent) const { /////// TcMET information ///// edm::Handle tcmet; iEvent.getByToken(tcmetToken_, tcmet); - if (tcmet->size() == 0) { + if (tcmet->empty()) { mtcMET_ = -1; mtcSumET_ = -1; mtcMETSign_ = -1; @@ -272,7 +272,7 @@ void tnp::BaseTreeFiller::init(const edm::Event &iEvent) const { edm::Handle pfmet; iEvent.getByToken(pfmetToken_, pfmet); if( pfmet.isValid() ) { - if (pfmet->size() == 0) { + if (pfmet->empty()) { mpfMET_ = -1; mpfSumET_ = -1; mpfMETSign_ = -1; diff --git a/PhysicsTools/TagAndProbe/src/TagProbeFitter.cc b/PhysicsTools/TagAndProbe/src/TagProbeFitter.cc index 0bbf6bee9797f..3f3fd5ff4913f 100644 --- a/PhysicsTools/TagAndProbe/src/TagProbeFitter.cc +++ b/PhysicsTools/TagAndProbe/src/TagProbeFitter.cc @@ -157,7 +157,7 @@ string TagProbeFitter::calculateEfficiency(string dirName,const std::vector >::iterator v=binnedReals.begin(); v!=binnedReals.end(); v++){ TString name = v->first; - if (variables.find(name) == 0) { cerr << "Binned variable '"<second.size()-1, &v->second[0]) ); binCategories.addClone( RooBinningCategory(name+"_bins", name+"_bins", (RooRealVar&)binnedVariables[name]) ); @@ -169,7 +169,7 @@ string TagProbeFitter::calculateEfficiency(string dirName,const std::vector >::iterator v=binnedCategories.begin(); v!=binnedCategories.end(); v++){ TString name = v->first; - if (variables.find(name) == 0) { cerr << "Binned category '"<second.size(); i++){ @@ -180,7 +180,7 @@ string TagProbeFitter::calculateEfficiency(string dirName,const std::vector::const_iterator effCat = effCats.begin(); effCat != effCats.end(); ++effCat) { - if (variables.find(effCat->c_str()) != 0) { + if (variables.find(effCat->c_str()) != nullptr) { dataVars.addClone(variables[effCat->c_str()], true); } } @@ -201,7 +201,7 @@ string TagProbeFitter::calculateEfficiency(string dirName,const std::vector, pair > > >::const_iterator ev = expressionVars.begin(), eve = expressionVars.end(); ev != eve; ++ev){ @@ -249,7 +249,7 @@ string TagProbeFitter::calculateEfficiency(string dirName,const std::vector0)?binToPDFmap[0].c_str():"all"); + RooMappedCategory pdfCategory("_pdfCategory_", "_pdfCategory_", allCats, (!binToPDFmap.empty())?binToPDFmap[0].c_str():"all"); for(unsigned int i = 1; iNext(); t!=0; t = (RooCatType*)it->Next() ){ + for(RooCatType* t = (RooCatType*)it->Next(); t!=nullptr; t = (RooCatType*)it->Next() ){ //name of the multicategory TString catName = t->GetName(); //skip unmapped states @@ -316,7 +316,7 @@ string TagProbeFitter::calculateEfficiency(string dirName,const std::vectordata("data")->mean(*v); RooBinning binning((RooBinning&)v->getBinning()); @@ -553,11 +553,11 @@ void TagProbeFitter::createPdf(RooWorkspace* w, vector& pdfCommands){ w->factory("expr::nBkgPass('effBkg*(1-fSigAll)*numTot', effBkg[.9,0,1],fSigAll,numTot)"); w->factory("expr::nBkgFail('(1-effBkg)*(1-fSigAll)*numTot', effBkg,fSigAll,numTot)"); TString sPass = "signal", sFail = "signal"; - if (w->pdf("signalPass") != 0 && w->pdf("signalFail") != 0) { - if (w->pdf("signal") != 0) throw std::logic_error("You must either define one 'signal' PDF or two PDFs ('signalPass', 'signalFail'), not both!"); + if (w->pdf("signalPass") != nullptr && w->pdf("signalFail") != nullptr) { + if (w->pdf("signal") != nullptr) throw std::logic_error("You must either define one 'signal' PDF or two PDFs ('signalPass', 'signalFail'), not both!"); sPass = "signalPass"; sFail = "signalFail"; - } else if (w->pdf("signal") != 0) { - if (w->pdf("signalPass") != 0 || w->pdf("signalFail") != 0) { + } else if (w->pdf("signal") != nullptr) { + if (w->pdf("signalPass") != nullptr || w->pdf("signalFail") != nullptr) { throw std::logic_error("You must either define one 'signal' PDF or two PDFs ('signalPass', 'signalFail'), not both!"); } } else { @@ -568,8 +568,8 @@ void TagProbeFitter::createPdf(RooWorkspace* w, vector& pdfCommands){ w->factory("SIMUL::simPdf(_efficiencyCategory_, Passed=pdfPass, Failed=pdfFail)"); // signalFractionInPassing is not used in the fit just to set the initial values - if (w->pdf("simPdf") == 0) throw std::runtime_error("Could not create simultaneous fit pdf."); - if(w->var("signalFractionInPassing") == 0) + if (w->pdf("simPdf") == nullptr) throw std::runtime_error("Could not create simultaneous fit pdf."); + if(w->var("signalFractionInPassing") == nullptr) w->factory("signalFractionInPassing[0.9]"); } @@ -618,9 +618,9 @@ void TagProbeFitter::saveFitPlot(RooWorkspace* w){ RooAbsData* dataFail = dataAll->reduce(Cut("_efficiencyCategory_==_efficiencyCategory_::Failed")); RooAbsPdf& pdf = *w->pdf("simPdf"); std::unique_ptr obs(pdf.getObservables(*dataAll)); - RooRealVar* mass = 0; + RooRealVar* mass = nullptr; RooLinkedListIter it = obs->iterator(); - for(RooAbsArg* v = (RooAbsArg*)it.Next(); v!=0; v = (RooAbsArg*)it.Next() ){ + for(RooAbsArg* v = (RooAbsArg*)it.Next(); v!=nullptr; v = (RooAbsArg*)it.Next() ){ if(!v->InheritsFrom("RooRealVar")) continue; mass = (RooRealVar*)v; break; @@ -682,7 +682,7 @@ void TagProbeFitter::saveDistributionsPlot(RooWorkspace* w){ const RooArgSet* vars = dataAll->get(); vector reals; RooLinkedListIter it = vars->iterator(); - for(RooAbsArg* v = (RooAbsArg*)it.Next(); v!=0; v = (RooAbsArg*)it.Next() ){ + for(RooAbsArg* v = (RooAbsArg*)it.Next(); v!=nullptr; v = (RooAbsArg*)it.Next() ){ if(!v->InheritsFrom("RooRealVar")) continue; reals.push_back((RooRealVar*)v); } @@ -721,18 +721,18 @@ void TagProbeFitter::saveDistributionsPlot(RooWorkspace* w){ void TagProbeFitter::saveEfficiencyPlots(RooDataSet& eff, const TString& effName, RooArgSet& binnedVariables,RooArgSet& mappedCategories){ RooLinkedListIter v1it = binnedVariables.iterator(); bool isOnePoint = (eff.numEntries() == 1); // for datasets with > 1 entry, we don't make plots for variables with just one bin - for(RooRealVar* v1 = (RooRealVar*)v1it.Next(); v1!=0; v1 = (RooRealVar*)v1it.Next() ){ + for(RooRealVar* v1 = (RooRealVar*)v1it.Next(); v1!=nullptr; v1 = (RooRealVar*)v1it.Next() ){ RooArgSet binCategories1D; if (v1->numBins() == 1 && !isOnePoint) continue; RooLinkedListIter v2it = binnedVariables.iterator(); - for(RooRealVar* v2 = (RooRealVar*)v2it.Next(); v2!=0; v2 = (RooRealVar*)v2it.Next() ){ + for(RooRealVar* v2 = (RooRealVar*)v2it.Next(); v2!=nullptr; v2 = (RooRealVar*)v2it.Next() ){ if(v2 == v1) continue; if (v2->numBins() == 1 && !isOnePoint) continue; binCategories1D.addClone( RooBinningCategory(TString(v2->GetName())+"_bins", TString(v2->GetName())+"_bins", *v2) ); RooArgSet binCategories2D; RooLinkedListIter v3it = binnedVariables.iterator(); - for(RooRealVar* v3 = (RooRealVar*)v3it.Next(); v3!=0; v3 = (RooRealVar*)v3it.Next() ){ + for(RooRealVar* v3 = (RooRealVar*)v3it.Next(); v3!=nullptr; v3 = (RooRealVar*)v3it.Next() ){ if(v3 == v1 || v3 == v2) continue; binCategories2D.addClone( RooBinningCategory(TString(v3->GetName())+"_bins", TString(v3->GetName())+"_bins", *v3) ); } @@ -743,7 +743,7 @@ void TagProbeFitter::saveEfficiencyPlots(RooDataSet& eff, const TString& effName RooDataSet myEff(eff); myEff.addColumn(allCats2D); std::unique_ptr catIt(allCats2D.typeIterator()); - for(RooCatType* t = (RooCatType*)catIt->Next(); t!=0; t = (RooCatType*)catIt->Next() ){ + for(RooCatType* t = (RooCatType*)catIt->Next(); t!=nullptr; t = (RooCatType*)catIt->Next() ){ TString catName = t->GetName(); if(catName.Contains("NotMapped")) continue; catName.ReplaceAll("{","").ReplaceAll("}","").ReplaceAll(";","_&_"); @@ -758,7 +758,7 @@ void TagProbeFitter::saveEfficiencyPlots(RooDataSet& eff, const TString& effName RooDataSet myEff(eff); myEff.addColumn(allCats1D); std::unique_ptr catIt(allCats1D.typeIterator()); - for(RooCatType* t = (RooCatType*)catIt->Next(); t!=0; t = (RooCatType*)catIt->Next() ){ + for(RooCatType* t = (RooCatType*)catIt->Next(); t!=nullptr; t = (RooCatType*)catIt->Next() ){ TString catName = t->GetName(); if(catName.Contains("NotMapped")) continue; catName.ReplaceAll("{","").ReplaceAll("}","").ReplaceAll(";","_&_"); @@ -775,13 +775,13 @@ void TagProbeFitter::makeEfficiencyPlot1D(RooDataSet& eff, RooRealVar& v, const const RooRealVar &ei = dynamic_cast(*entry->find("efficiency")); for (unsigned int i = 0, n = eff.numEntries(); i < n; ++i) { entry = eff.get(i); - if (catName != 0 && entry->getCatIndex(catName) != catIndex) continue; + if (catName != nullptr && entry->getCatIndex(catName) != catIndex) continue; int j = p->GetN(); p->Set(j+1); p->SetPoint(j, vi.getVal(), ei.getVal() ); p->SetPointError(j, -vi.getAsymErrorLo(), vi.getAsymErrorHi(), -ei.getAsymErrorLo(), ei.getAsymErrorHi() ); } TCanvas canvas(plotName); - TH1F *frame = new TH1F("frame", "Efficiency of "+effName, 1, v.getMin(), v.getMax()); frame->SetDirectory(0); + TH1F *frame = new TH1F("frame", "Efficiency of "+effName, 1, v.getMin(), v.getMax()); frame->SetDirectory(nullptr); p->SetNameTitle(Form("hxy_%s", eff.GetName()), "Efficiency of "+effName); p->GetXaxis()->SetTitle(strlen(v.getUnit()) ? Form("%s (%s)", v.GetName(), v.getUnit()) : v.GetName()); p->GetYaxis()->SetTitle("Efficiency of "+effName); @@ -812,7 +812,7 @@ void TagProbeFitter::makeEfficiencyPlot2D(RooDataSet& eff, RooRealVar& v1, RooRe h->SetStats(kFALSE); for(int i=0; igetCatIndex(catName) != catIndex) continue; + if (catName != nullptr && entry->getCatIndex(catName) != catIndex) continue; h->SetBinContent(h->FindBin(v1_->getVal(), v2_->getVal()), e->getVal()); h->SetBinError(h->FindBin(v1_->getVal(), v2_->getVal()), (e->getErrorHi()-e->getErrorLo())/2.); } diff --git a/PhysicsTools/TagAndProbe/src/TagProbePairMaker.cc b/PhysicsTools/TagAndProbe/src/TagProbePairMaker.cc index c717a12d817c6..5cd5aeb2f4001 100644 --- a/PhysicsTools/TagAndProbe/src/TagProbePairMaker.cc +++ b/PhysicsTools/TagAndProbe/src/TagProbePairMaker.cc @@ -3,7 +3,7 @@ tnp::TagProbePairMaker::TagProbePairMaker(const edm::ParameterSet &iConfig, edm::ConsumesCollector && iC) : srcToken_(iC.consumes(iConfig.getParameter("tagProbePairs"))), - randGen_(0) + randGen_(nullptr) { std::string arbitration = iConfig.getParameter("arbitration"); if (arbitration == "None") { @@ -59,7 +59,7 @@ tnp::TagProbePairMaker::run(const edm::Event &iEvent) const arbitrate(pairs); } - if (phiCutForTwoLeg_ && pairs.size() > 0) { + if (phiCutForTwoLeg_ && !pairs.empty()) { int eventNum = iEvent.id().event(); std::cout << "Calling phiCutByEventNumber on eventNum=" << eventNum << std::endl; phiCutByEventNumber(pairs,eventNum); diff --git a/PhysicsTools/TagAndProbe/src/ZGeneratorLineShape.cc b/PhysicsTools/TagAndProbe/src/ZGeneratorLineShape.cc index c7453cde1faed..72f741490b536 100644 --- a/PhysicsTools/TagAndProbe/src/ZGeneratorLineShape.cc +++ b/PhysicsTools/TagAndProbe/src/ZGeneratorLineShape.cc @@ -8,7 +8,7 @@ ZGeneratorLineShape::ZGeneratorLineShape(const char *name, const char *title, ): RooAbsPdf(name,title), m("m","m", this,_m), - dataHist(0) + dataHist(nullptr) { TFile *f_gen= TFile::Open(genfile); TH1F* mass_th1f = (TH1F*) f_gen->Get(histoName); diff --git a/PhysicsTools/UtilAlgos/interface/BasicMuonAnalyzer.h b/PhysicsTools/UtilAlgos/interface/BasicMuonAnalyzer.h index 77a5efd481759..758e6b33be6cb 100644 --- a/PhysicsTools/UtilAlgos/interface/BasicMuonAnalyzer.h +++ b/PhysicsTools/UtilAlgos/interface/BasicMuonAnalyzer.h @@ -24,13 +24,13 @@ class BasicMuonAnalyzer : public edm::BasicAnalyzer { BasicMuonAnalyzer(const edm::ParameterSet& cfg, TFileDirectory& fs); BasicMuonAnalyzer(const edm::ParameterSet& cfg, TFileDirectory& fs, edm::ConsumesCollector&& iC); /// default destructor - virtual ~BasicMuonAnalyzer(){}; + ~BasicMuonAnalyzer() override{}; /// everything that needs to be done before the event loop - void beginJob(){}; + void beginJob() override{}; /// everything that needs to be done after the event loop - void endJob(){}; + void endJob() override{}; /// everything that needs to be done during the event loop - void analyze(const edm::EventBase& event); + void analyze(const edm::EventBase& event) override; private: /// input tag for mouns diff --git a/PhysicsTools/UtilAlgos/interface/CachingVariable.h b/PhysicsTools/UtilAlgos/interface/CachingVariable.h index daa6ef4bfeb15..408b7c15e394f 100644 --- a/PhysicsTools/UtilAlgos/interface/CachingVariable.h +++ b/PhysicsTools/UtilAlgos/interface/CachingVariable.h @@ -155,9 +155,9 @@ class ComputedVariable : public CachingVariable { ComputedVariable(const CachingVariableFactoryArg& arg, edm::ConsumesCollector& iC ); ComputedVariable(const std::string & M, std::string & N, edm::ParameterSet & P, const VariableComputer * c, edm::ConsumesCollector& iC) : CachingVariable(M,N,P,iC), myComputer(c){} - virtual ~ComputedVariable(){}; + ~ComputedVariable() override{}; - virtual evalType eval(const edm::Event & iEvent) const { + evalType eval(const edm::Event & iEvent) const override { if (myComputer->notSeenThisEventAlready(iEvent)) myComputer->compute(iEvent); return cache_; @@ -169,9 +169,9 @@ class ComputedVariable : public CachingVariable { class VariableComputerTest : public VariableComputer { public: VariableComputerTest(const CachingVariable::CachingVariableFactoryArg& arg, edm::ConsumesCollector& iC) ; - ~VariableComputerTest(){}; + ~VariableComputerTest() override{}; - void compute(const edm::Event & iEvent) const; + void compute(const edm::Event & iEvent) const override; }; class Splitter : public CachingVariable { @@ -180,7 +180,7 @@ class Splitter : public CachingVariable { CachingVariable(method,n,iConfig,iC) {} //purely virtual here - virtual CachingVariable::evalType eval(const edm::Event & iEvent) const =0; + CachingVariable::evalType eval(const edm::Event & iEvent) const override =0; unsigned int maxIndex() const { return maxSlots()-1;} @@ -244,10 +244,10 @@ class VarSplitter : public Splitter{ arg.m[arg.n]=this; } - CachingVariable::evalType eval(const edm::Event & iEvent) const; + CachingVariable::evalType eval(const edm::Event & iEvent) const override; //redefine the maximum number of slots - unsigned int maxSlots() const{ + unsigned int maxSlots() const override{ unsigned int s=slots_.size()-1; if (useUnderFlow_) s++; if (useOverFlow_) s++; @@ -264,7 +264,7 @@ template class ExpressionVariable : public CachingVariable { public: ExpressionVariable(const CachingVariableFactoryArg& arg, edm::ConsumesCollector& iC) : - CachingVariable(std::string(label)+"ExpressionVariable",arg.n,arg.iConfig,iC) , f_(0), forder_(0) { + CachingVariable(std::string(label)+"ExpressionVariable",arg.n,arg.iConfig,iC) , f_(nullptr), forder_(nullptr) { srcTag_=edm::Service()->retrieve("src",arg.iConfig); src_=iC.consumes >(srcTag_); //old style constructor @@ -280,13 +280,13 @@ class ExpressionVariable : public CachingVariable { std::string order=arg.iConfig.getParameter("order"); forder_ = new StringObjectFunction(order); ss<<" after sorting according to: "<("selection"); selector_ = new StringCutObjectSelector(selection); ss<<" and selecting only: "<(edm::Service()->retrieve("src",arg.iConfig))) { arg.m[arg.n]=this;} - CachingVariable::evalType eval(const edm::Event & iEvent) const{ + CachingVariable::evalType eval(const edm::Event & iEvent) const override{ edm::Handle value; try{ iEvent.getByToken(src_,value); } catch(...){ return std::make_pair(false,0); } @@ -539,7 +539,7 @@ class SimpleValueVectorVariable : public CachingVariable { CachingVariable("SimpleValueVectorVariable",arg.n,arg.iConfig,iC), src_(iC.consumes(edm::Service()->retrieve("src",arg.iConfig))), index_(arg.iConfig.getParameter("index")) { arg.m[arg.n]=this;} - CachingVariable::evalType eval(const edm::Event & iEvent) const{ + CachingVariable::evalType eval(const edm::Event & iEvent) const override{ edm::Handle > values; try { iEvent.getByToken(src_,values);} catch(...){ return std::make_pair(false,0); } diff --git a/PhysicsTools/UtilAlgos/interface/CompleteNTupler.h b/PhysicsTools/UtilAlgos/interface/CompleteNTupler.h index 37081d9af74c7..78f5489fee2df 100644 --- a/PhysicsTools/UtilAlgos/interface/CompleteNTupler.h +++ b/PhysicsTools/UtilAlgos/interface/CompleteNTupler.h @@ -11,9 +11,9 @@ class CompleteNTupler : public NTupler { if (iConfig.exists("variablesPSet")) if (!iConfig.getParameter("variablesPSet").empty()) vN = new VariableNTupler(iConfig); - else vN=0; + else vN=nullptr; else - vN=0; + vN=nullptr; /* if (iConfig.exists("AdHocNPSet")) if (!iConfig.getParameter("AdHocNPSet").empty()) @@ -24,7 +24,7 @@ class CompleteNTupler : public NTupler { */ } - uint registerleaves(edm::ProducerBase * producer){ + uint registerleaves(edm::ProducerBase * producer) override{ uint nLeaves=0; nLeaves+=sN->registerleaves(producer); if (vN) @@ -33,7 +33,7 @@ class CompleteNTupler : public NTupler { // nLeaves+=aN->registerleaves(producer); return nLeaves; } - void fill(edm::Event& iEvent){ + void fill(edm::Event& iEvent) override{ sN->fill(iEvent); if (vN) vN->fill(iEvent); diff --git a/PhysicsTools/UtilAlgos/interface/ConfigurableHisto.h b/PhysicsTools/UtilAlgos/interface/ConfigurableHisto.h index fd1ae4c188526..74edf0dda824e 100644 --- a/PhysicsTools/UtilAlgos/interface/ConfigurableHisto.h +++ b/PhysicsTools/UtilAlgos/interface/ConfigurableHisto.h @@ -34,12 +34,12 @@ class ConfigurableAxis { } } } - bool variableSize(){return vBins_.size()!=0;} + bool variableSize(){return !vBins_.empty();} unsigned int nBin(){if (variableSize()) return vBins_.size()-1;else return nBin_;} double Min(){if (variableSize()) return vBins_.front(); else return Min_;} double Max(){if (variableSize()) return vBins_.back(); else return Max_;} const std::string & Label(){ return Label_;} - const double * xBins(){ if (vBins_.size()!=0) return &(vBins_.front()); else return 0;} + const double * xBins(){ if (!vBins_.empty()) return &(vBins_.front()); else return nullptr;} private: std::vector vBins_; @@ -54,7 +54,7 @@ class ConfigurableHisto { public: enum HType { h1 ,h2, prof }; ConfigurableHisto(HType t, std::string name, edm::ParameterSet & iConfig) : - type_(t),h_(0),name_(name), conf_(iConfig),x_(0),y_(0),z_(0),w_(0){} + type_(t),h_(nullptr),name_(name), conf_(iConfig),x_(nullptr),y_(nullptr),z_(nullptr),w_(nullptr){} virtual ~ConfigurableHisto(){} @@ -164,8 +164,8 @@ class ConfigurableHisto { } } - TProfile * pcast(0); - TH2 * h2cast(0); + TProfile * pcast(nullptr); + TH2 * h2cast(nullptr); switch(type_){ case h1: if (!h_) throw; @@ -203,7 +203,7 @@ class ConfigurableHisto { protected: ConfigurableHisto(const ConfigurableHisto & master){ type_=master.type_; - h_=0; //no histogram attached in copy constructor + h_=nullptr; //no histogram attached in copy constructor name_=master.name_; conf_=master.conf_; x_=master.x_; @@ -225,7 +225,7 @@ class ConfigurableHisto { class SplittingConfigurableHisto : public ConfigurableHisto { public: SplittingConfigurableHisto(HType t, std::string name, edm::ParameterSet & pset) : - ConfigurableHisto(t,name,pset) , splitter_(0) { + ConfigurableHisto(t,name,pset) , splitter_(nullptr) { std::string title=pset.getParameter("title"); //allow for many splitters ... @@ -279,11 +279,11 @@ class SplittingConfigurableHisto : public ConfigurableHisto { } }//end of ctor - void book(TFileDirectory* dir){ + void book(TFileDirectory* dir) override{ //book the base histogram ConfigurableHisto::book(dir); - if (subHistoMap_.size()!=0){ + if (!subHistoMap_.empty()){ SubHistoMap::iterator i=subHistoMap_.begin(); SubHistoMap::iterator i_end=subHistoMap_.end(); for (;i!=i_end;++i){for (unsigned int h=0;h!=i->second.size();++h){ @@ -303,13 +303,13 @@ class SplittingConfigurableHisto : public ConfigurableHisto { } - ConfigurableHisto * clone() const { return new SplittingConfigurableHisto(*this); } + ConfigurableHisto * clone() const override { return new SplittingConfigurableHisto(*this); } - void fill(const edm::Event & e) { + void fill(const edm::Event & e) override { //fill the base histogram ConfigurableHisto::fill(e); - if (subHistoMap_.size()!=0){ + if (!subHistoMap_.empty()){ SubHistoMap::iterator i=subHistoMap_.begin(); SubHistoMap::iterator i_end=subHistoMap_.end(); for (;i!=i_end;++i){ @@ -338,7 +338,7 @@ class SplittingConfigurableHisto : public ConfigurableHisto { } void complete(){ - if (subHistoMap_.size()!=0){ + if (!subHistoMap_.empty()){ //fill up the stacks SubHistoMap::iterator i=subHistoMap_.begin(); SubHistoMap::iterator i_end=subHistoMap_.end(); @@ -359,7 +359,7 @@ class SplittingConfigurableHisto : public ConfigurableHisto { private: SplittingConfigurableHisto(const SplittingConfigurableHisto & master) : ConfigurableHisto(master){ splitter_ = master.splitter_; - if (master.subHistoMap_.size()!=0){ + if (!master.subHistoMap_.empty()){ SubHistoMap::const_iterator i=master.subHistoMap_.begin(); SubHistoMap::const_iterator i_end=master.subHistoMap_.end(); for (;i!=i_end;++i){ diff --git a/PhysicsTools/UtilAlgos/interface/EDAnalyzerWrapper.h b/PhysicsTools/UtilAlgos/interface/EDAnalyzerWrapper.h index 0aba0c0768634..8e76d9bef2070 100644 --- a/PhysicsTools/UtilAlgos/interface/EDAnalyzerWrapper.h +++ b/PhysicsTools/UtilAlgos/interface/EDAnalyzerWrapper.h @@ -51,13 +51,13 @@ namespace edm { /// default contructor AnalyzerWrapper(const edm::ParameterSet& cfg); /// default destructor - virtual ~AnalyzerWrapper(){}; + ~AnalyzerWrapper() override{}; /// everything which has to be done before the event loop - virtual void beginJob() { analyzer_->beginJob(); } + void beginJob() override { analyzer_->beginJob(); } /// everything which has to be done during the event loop. NOTE: We can't use the eventSetup in FWLite so ignore it - virtual void analyze(edm::Event const & event, const edm::EventSetup& eventSetup){ analyzer_->analyze(event); } + void analyze(edm::Event const & event, const edm::EventSetup& eventSetup) override{ analyzer_->analyze(event); } /// everything which has to be done after the event loop - virtual void endJob() { analyzer_->endJob(); } + void endJob() override { analyzer_->endJob(); } protected: /// shared pointer to analysis class of type BasicAnalyzer diff --git a/PhysicsTools/UtilAlgos/interface/EDFilterObjectWrapper.h b/PhysicsTools/UtilAlgos/interface/EDFilterObjectWrapper.h index 6a6353d6e08a4..ab0c6131e0b9d 100644 --- a/PhysicsTools/UtilAlgos/interface/EDFilterObjectWrapper.h +++ b/PhysicsTools/UtilAlgos/interface/EDFilterObjectWrapper.h @@ -65,9 +65,9 @@ namespace edm { produces(); } /// default destructor - virtual ~FilterObjectWrapper(){} + ~FilterObjectWrapper() override{} /// everything which has to be done during the event loop. NOTE: We can't use the eventSetup in FWLite so ignore it - virtual bool filter(edm::Event& event, const edm::EventSetup& eventSetup) override { + bool filter(edm::Event& event, const edm::EventSetup& eventSetup) override { // create a collection of the objects to put into the event auto objsToPut = std::make_unique(); // get the handle to the objects in the event. @@ -80,7 +80,7 @@ namespace edm { } } // put objs in the event - bool pass = objsToPut->size() > 0; + bool pass = !objsToPut->empty(); event.put(std::move(objsToPut)); if ( doFilter_ ) return pass; diff --git a/PhysicsTools/UtilAlgos/interface/EDFilterWrapper.h b/PhysicsTools/UtilAlgos/interface/EDFilterWrapper.h index de21b2a31976d..1d3211d46d6ce 100644 --- a/PhysicsTools/UtilAlgos/interface/EDFilterWrapper.h +++ b/PhysicsTools/UtilAlgos/interface/EDFilterWrapper.h @@ -49,9 +49,9 @@ namespace edm { /// default contructor FilterWrapper(const edm::ParameterSet& cfg){ filter_ = boost::shared_ptr( new T(cfg, consumesCollector()) ); } /// default destructor - virtual ~FilterWrapper(){} + ~FilterWrapper() override{} /// everything which has to be done during the event loop. NOTE: We can't use the eventSetup in FWLite so ignore it - virtual bool filter(edm::StreamID, edm::Event& event, const edm::EventSetup& eventSetup) const override { + bool filter(edm::StreamID, edm::Event& event, const edm::EventSetup& eventSetup) const override { edm::EventBase & eventBase = dynamic_cast(event); edm::EventBase const & eventBaseConst = const_cast(eventBase); return (*filter_)(eventBaseConst); diff --git a/PhysicsTools/UtilAlgos/interface/FWLiteAnalyzerWrapper.h b/PhysicsTools/UtilAlgos/interface/FWLiteAnalyzerWrapper.h index d55308e520ede..6c229dbff7824 100644 --- a/PhysicsTools/UtilAlgos/interface/FWLiteAnalyzerWrapper.h +++ b/PhysicsTools/UtilAlgos/interface/FWLiteAnalyzerWrapper.h @@ -144,7 +144,7 @@ namespace fwlite { } else{ // create a directory in the file if directory string is non empty - TFileDirectory dir = fileService_.mkdir(directory.c_str()); + TFileDirectory dir = fileService_.mkdir(directory); analyzer_ = boost::shared_ptr( new T( ana, dir ) ); } } diff --git a/PhysicsTools/UtilAlgos/interface/InputTagDistributor.h b/PhysicsTools/UtilAlgos/interface/InputTagDistributor.h index c0e7bfdb67b05..fe026f4f5f9ad 100644 --- a/PhysicsTools/UtilAlgos/interface/InputTagDistributor.h +++ b/PhysicsTools/UtilAlgos/interface/InputTagDistributor.h @@ -62,7 +62,7 @@ class InputTagDistributorService{ if (f != multipleInstance_.end()) SetInputTagDistributorUniqueInstance_ = f->second; else{ //do not say anything but set it to zero to get a safe crash in get() if ever called - SetInputTagDistributorUniqueInstance_=0;} + SetInputTagDistributorUniqueInstance_=nullptr;} } /* InputTagDistributor & set(std::string & user){ std::map::iterator f=multipleInstance_.find(user); @@ -85,7 +85,7 @@ class InputTagDistributorService{ edm::InputTag retrieve(std::string src,const edm::ParameterSet & pset){ //if used without setting any InputTag mapping - if (multipleInstance_.size()==0) + if (multipleInstance_.empty()) return pset.getParameter(src); // some mapping was setup diff --git a/PhysicsTools/UtilAlgos/interface/Plotter.h b/PhysicsTools/UtilAlgos/interface/Plotter.h index b955b245e7c63..6cf0dff3bd77d 100644 --- a/PhysicsTools/UtilAlgos/interface/Plotter.h +++ b/PhysicsTools/UtilAlgos/interface/Plotter.h @@ -79,7 +79,7 @@ class VariablePlotter : public Plotter { } } - void setDir(std::string dir){ + void setDir(std::string dir) override{ //insert a new one Directory & insertedDirectory = directories_[dir]; @@ -93,7 +93,7 @@ class VariablePlotter : public Plotter { currentDir_=dir; } - void fill(std::string subDir,const edm::Event& iEvent){ + void fill(std::string subDir,const edm::Event& iEvent) override{ //what is the current directory Directory & currentDirectory= directories_[currentDir_]; @@ -101,7 +101,7 @@ class VariablePlotter : public Plotter { SubDirectories & currentSetOfSubDirectories=currentDirectory.subDir; //find the subDirectory requested: - SubDirectory * subDirectoryToUse=0; + SubDirectory * subDirectoryToUse=nullptr; SubDirectories::iterator subDirectoryFindIterator=currentSetOfSubDirectories.find(subDir); //not found? insert a new directory with this name @@ -142,7 +142,7 @@ class VariablePlotter : public Plotter { { histogramIterator->second->fill(iEvent); } } - ~VariablePlotter(){ + ~VariablePlotter() override{ // CANNOT DO THAT because of TFileService holding the histograms /* //loop over all subdirectories and delete all ConfigurableHistograms Directories::iterator dir_It = directories_.begin(); @@ -166,7 +166,7 @@ class VariablePlotter : public Plotter { } */ } - void complete(){ + void complete() override{ //loop over all subdirectories and call complete() on all ConfigurableHistograms @@ -195,7 +195,7 @@ class VariablePlotter : public Plotter { class SubDirectory { public: - SubDirectory() : dirName(""),dir(0){} + SubDirectory() : dirName(""),dir(nullptr){} std::string dirName; DirectoryHistos histos; TFileDirectory * dir; @@ -204,7 +204,7 @@ class VariablePlotter : public Plotter { class Directory { public: - Directory() : dirName(""),dir(0){} + Directory() : dirName(""),dir(nullptr){} std::string dirName; SubDirectories subDir; TFileDirectory * dir; diff --git a/PhysicsTools/UtilAlgos/interface/Selections.h b/PhysicsTools/UtilAlgos/interface/Selections.h index a74330fb2d460..2c1d979ebab85 100644 --- a/PhysicsTools/UtilAlgos/interface/Selections.h +++ b/PhysicsTools/UtilAlgos/interface/Selections.h @@ -11,10 +11,10 @@ class Filter { public: - Filter() : selector_(0){} + Filter() : selector_(nullptr){} Filter(const edm::ParameterSet& iConfig, edm::ConsumesCollector & iC); Filter(std::string name, edm::ParameterSet& iConfig, edm::ConsumesCollector & iC) : - name_(name), selector_(0),cached_decision_(false),eventCacheID_(0) + name_(name), selector_(nullptr),cached_decision_(false),eventCacheID_(0) { dump_=iConfig.dump(); if (!iConfig.empty()){ @@ -84,7 +84,7 @@ class SFilter { class FilterOR : public Filter{ public: - ~FilterOR(){} + ~FilterOR() override{} FilterOR(const std::string & filterORlist, const std::map & filters){ std::string filterORlistCopy=filterORlist; @@ -96,7 +96,7 @@ class FilterOR : public Filter{ bool OK=true; while( OK ){ size_t orPos = filterORlistCopy.find("_OR_"); - if (orPos == std::string::npos && filterORlistCopy.size()!=0){ + if (orPos == std::string::npos && !filterORlistCopy.empty()){ size=filterORlistCopy.size(); OK=false; } @@ -119,7 +119,7 @@ class FilterOR : public Filter{ } description_.push_back(ss.str()); } - bool accept(edm::Event& iEvent) { + bool accept(edm::Event& iEvent) override { for (unsigned int i=0 ; i!=filters_.size();++i) if (filters_[i].second->accept(iEvent)) return true; @@ -164,7 +164,7 @@ class FilterSelection : public Filter { iterator begin() { return filters_.begin();} iterator end() { return filters_.end();} - virtual bool accept(edm::Event& iEvent){ + bool accept(edm::Event& iEvent) override{ if (std::numeric_limits::max() != eventCacheID_ and eventCacheID_ != iEvent.cacheIdentifier()){ this->acceptMap(iEvent); } diff --git a/PhysicsTools/UtilAlgos/interface/StringBasedNTupler.h b/PhysicsTools/UtilAlgos/interface/StringBasedNTupler.h index 24c5d3564e981..4677066076863 100644 --- a/PhysicsTools/UtilAlgos/interface/StringBasedNTupler.h +++ b/PhysicsTools/UtilAlgos/interface/StringBasedNTupler.h @@ -65,7 +65,7 @@ class TreeBranch { const std::string branchName()const{ std::string name(branchAlias_); std::replace(name.begin(), name.end(), '_','0'); - return std::string(name.c_str());} + return std::string(name);} const std::string & branchAlias()const{ return branchAlias_;} const std::string & branchTitle()const{ return branchTitle_;} typedef std::unique_ptr > value; @@ -151,7 +151,7 @@ class StringBranchHelper { value_.reset(new std::vector()); value_->reserve(oH->size()); - StringCutObjectSelector * selection=0; + StringCutObjectSelector * selection=nullptr; if (B.selection()!=""){ //std::cout<<"trying to get to a selection"<(B.selection()); @@ -291,7 +291,7 @@ class StringBasedNTupler : public NTupler { - uint registerleaves(edm::ProducerBase * producer){ + uint registerleaves(edm::ProducerBase * producer) override{ uint nLeaves=0; if (useTFileService_){ @@ -368,7 +368,7 @@ class StringBasedNTupler : public NTupler { return nLeaves; } - void fill(edm::Event& iEvent){ + void fill(edm::Event& iEvent) override{ // if (!edm::Service()->checkOnce("StringBasedNTupler::fill")) return; //well if you do that, you cannot have two ntupler of the same type in the same job... @@ -468,7 +468,7 @@ class StringBasedNTupler : public NTupler { } } - ~StringBasedNTupler(){ + ~StringBasedNTupler() override{ delete indexDataHolder_; delete ev_; delete run_; diff --git a/PhysicsTools/UtilAlgos/interface/VariableHelper.h b/PhysicsTools/UtilAlgos/interface/VariableHelper.h index afbe7d1a00cff..33499158d74d0 100644 --- a/PhysicsTools/UtilAlgos/interface/VariableHelper.h +++ b/PhysicsTools/UtilAlgos/interface/VariableHelper.h @@ -41,7 +41,7 @@ class VariableHelperService { bool printValuesForEachEvent_; std::string printValuesForEachEventCategory_; public: - VariableHelperService(const edm::ParameterSet & iConfig,edm::ActivityRegistry & r ) : SetVariableHelperUniqueInstance_(0){ + VariableHelperService(const edm::ParameterSet & iConfig,edm::ActivityRegistry & r ) : SetVariableHelperUniqueInstance_(nullptr){ //r.watchPreModule(this, &VariableHelperService::preModule ); r.watchPreModuleEvent(this, &VariableHelperService::preModule ); //r.watchPostProcessEvent(this, &VariableHelperService::postProcess ); @@ -85,7 +85,7 @@ class VariableHelperService { SetVariableHelperUniqueInstance_ = (f->second); return ; } - SetVariableHelperUniqueInstance_ =0; + SetVariableHelperUniqueInstance_ =nullptr; } void postProcess(edm::StreamContext const & sc){ diff --git a/PhysicsTools/UtilAlgos/interface/VariableNTupler.h b/PhysicsTools/UtilAlgos/interface/VariableNTupler.h index 2bb16bce98735..95b76a985147f 100644 --- a/PhysicsTools/UtilAlgos/interface/VariableNTupler.h +++ b/PhysicsTools/UtilAlgos/interface/VariableNTupler.h @@ -52,7 +52,7 @@ class VariableNTupler : public NTupler{ } } - uint registerleaves(edm::ProducerBase * producer){ + uint registerleaves(edm::ProducerBase * producer) override{ uint nLeaves=0; if (useTFileService_){ //loop the leaves registered @@ -92,13 +92,13 @@ class VariableNTupler : public NTupler{ nLeaves++; std::string lName(i->first); std::replace(lName.begin(), lName.end(), '_','0'); - producer->produces(lName.c_str()).setBranchAlias(i->first); + producer->produces(lName).setBranchAlias(i->first); } } return nLeaves; } - void fill(edm::Event& iEvent){ + void fill(edm::Event& iEvent) override{ if (useTFileService_){ //fill the data holder iterator i=leaves_.begin(); @@ -119,7 +119,7 @@ class VariableNTupler : public NTupler{ auto leafValue = std::make_unique((*i->second)(iEvent)); std::string lName(i->first); std::replace(lName.begin(), lName.end(),'_','0'); - iEvent.put(std::move(leafValue), lName.c_str()); + iEvent.put(std::move(leafValue), lName); } } } diff --git a/PhysicsTools/UtilAlgos/plugins/ConfigurableAnalysis.cc b/PhysicsTools/UtilAlgos/plugins/ConfigurableAnalysis.cc index 7c5993b4c342f..338f8b226ac44 100644 --- a/PhysicsTools/UtilAlgos/plugins/ConfigurableAnalysis.cc +++ b/PhysicsTools/UtilAlgos/plugins/ConfigurableAnalysis.cc @@ -45,12 +45,12 @@ class ConfigurableAnalysis : public edm::EDFilter { public: explicit ConfigurableAnalysis(const edm::ParameterSet&); - ~ConfigurableAnalysis(); + ~ConfigurableAnalysis() override; private: - virtual void beginJob() override; - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; FilterSelections * selections_; Plotter * plotter_; @@ -72,7 +72,7 @@ class ConfigurableAnalysis : public edm::EDFilter { // constructors and destructor // ConfigurableAnalysis::ConfigurableAnalysis(const edm::ParameterSet& iConfig) : - selections_(0), plotter_(0), ntupler_(0) + selections_(nullptr), plotter_(nullptr), ntupler_(nullptr) { std::string moduleLabel = iConfig.getParameter("@module_label"); @@ -94,7 +94,7 @@ ConfigurableAnalysis::ConfigurableAnalysis(const edm::ParameterSet& iConfig) : plotter_ = PlotterFactory::get()->create(plotterName, plotPset); } else - plotter_ = 0; + plotter_ = nullptr; //ntupling device edm::ParameterSet ntPset = iConfig.getParameter("Ntupler"); @@ -102,7 +102,7 @@ ConfigurableAnalysis::ConfigurableAnalysis(const edm::ParameterSet& iConfig) : std::string ntuplerName=ntPset.getParameter("ComponentName"); ntupler_ = NTuplerFactory::get()->create(ntuplerName, ntPset); } - else ntupler_=0; + else ntupler_=nullptr; flows_ = iConfig.getParameter >("flows"); workAsASelector_ = iConfig.getParameter("workAsASelector"); diff --git a/PhysicsTools/UtilAlgos/plugins/ErrorSummaryFilter.cc b/PhysicsTools/UtilAlgos/plugins/ErrorSummaryFilter.cc index c0ad2c2e24979..da31ff049c0fe 100644 --- a/PhysicsTools/UtilAlgos/plugins/ErrorSummaryFilter.cc +++ b/PhysicsTools/UtilAlgos/plugins/ErrorSummaryFilter.cc @@ -38,10 +38,10 @@ class ErrorSummaryFilter : public edm::EDFilter { public: explicit ErrorSummaryFilter(edm::ParameterSet const&); - ~ErrorSummaryFilter(); + ~ErrorSummaryFilter() override; private: - virtual bool filter(edm::Event&, edm::EventSetup const&) override; + bool filter(edm::Event&, edm::EventSetup const&) override; // ----------member data --------------------------- edm::EDGetTokenT > srcToken_; diff --git a/PhysicsTools/UtilAlgos/plugins/NTuplingDevice.cc b/PhysicsTools/UtilAlgos/plugins/NTuplingDevice.cc index 837f8c904f78b..3881f0ec01e48 100644 --- a/PhysicsTools/UtilAlgos/plugins/NTuplingDevice.cc +++ b/PhysicsTools/UtilAlgos/plugins/NTuplingDevice.cc @@ -38,12 +38,12 @@ class NTuplingDevice : public edm::EDProducer { public: explicit NTuplingDevice(const edm::ParameterSet&); - ~NTuplingDevice(); + ~NTuplingDevice() override; private: - virtual void beginJob() override ; - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- NTupler * ntupler_; diff --git a/PhysicsTools/UtilAlgos/plugins/PlottingDevice.cc b/PhysicsTools/UtilAlgos/plugins/PlottingDevice.cc index 2f0b9de7a08bf..4a295c8244c16 100644 --- a/PhysicsTools/UtilAlgos/plugins/PlottingDevice.cc +++ b/PhysicsTools/UtilAlgos/plugins/PlottingDevice.cc @@ -38,13 +38,13 @@ class PlottingDevice : public edm::EDAnalyzer { public: explicit PlottingDevice(const edm::ParameterSet&); - ~PlottingDevice(); + ~PlottingDevice() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- std::string vHelperInstance_; diff --git a/PhysicsTools/UtilAlgos/plugins/VariableEventSelector.h b/PhysicsTools/UtilAlgos/plugins/VariableEventSelector.h index 2ecb408f8e76e..d2185cee23254 100644 --- a/PhysicsTools/UtilAlgos/plugins/VariableEventSelector.h +++ b/PhysicsTools/UtilAlgos/plugins/VariableEventSelector.h @@ -42,7 +42,7 @@ class VariableFormulaEventSelector : public EventSelector { threshold_= pset.getParameter("threshold"); } - bool select(const edm::Event& e) const{ + bool select(const edm::Event& e) const override{ unsigned int v_i; std::set::iterator v_it; @@ -88,7 +88,7 @@ class VariableEventSelector : public EventSelector { ss<<"with maximum boundary: "<()->get().variable(var_); if (!var->compute(e)) return false; diff --git a/PhysicsTools/UtilAlgos/src/VariableHelper.cc b/PhysicsTools/UtilAlgos/src/VariableHelper.cc index dd99e1e0d09cc..8e2d46864cfb3 100644 --- a/PhysicsTools/UtilAlgos/src/VariableHelper.cc +++ b/PhysicsTools/UtilAlgos/src/VariableHelper.cc @@ -54,6 +54,6 @@ const CachingVariable* VariableHelper::variable(std::string name) const{ edm::LogError("VariableHelper")<<"I don't know anything named: "<& Regions, RooAbsPdf *PDF) { - if(PDF==NULL || SeparationVariable==NULL) + if(PDF==nullptr || SeparationVariable==nullptr) return 0.0; Double_t yield=0; @@ -80,7 +80,7 @@ static void setHistOptions(TH1F* histo, string name, string title, string axis_l } int SideBandSubtract::doSubtraction(RooRealVar* variable, Double_t stsratio,Int_t index) //stsratio -> signal to sideband ratio { - if(Data==NULL || SeparationVariable==NULL) + if(Data==nullptr || SeparationVariable==nullptr) { cerr << "ERROR: Data or SeparationVariable is NULL returning now!\n"; return -1; @@ -96,8 +96,8 @@ int SideBandSubtract::doSubtraction(RooRealVar* variable, Double_t stsratio,Int_ //O(N_vars*N_events)... TIterator* iter = (TIterator*) Data->get()->createIterator(); - RooAbsArg *var=NULL; - RooRealVar *sep_var=NULL; + RooAbsArg *var=nullptr; + RooRealVar *sep_var=nullptr; while((var = (RooAbsArg*)iter->Next())) { if((string)var->GetName()==(string)SeparationVariable->GetName()) @@ -152,7 +152,7 @@ void SideBandSubtract::printResults(string prefix) {//handles *all* printing //spool over vectors of histograms and print them, then print //separation variable plots and the results text file. - if(SeparationVariable==NULL) + if(SeparationVariable==nullptr) { cerr << "ERROR: printResults, SeparationVariable is NULL!\n"; return; @@ -178,7 +178,7 @@ void SideBandSubtract::printResults(string prefix) } string outname = prefix + (string)SeparationVariable->GetName() + "_fitted.eps"; - if(Data!=NULL && ModelPDF!=NULL) + if(Data!=nullptr && ModelPDF!=nullptr) { RooPlot *SepVarFrame = SeparationVariable->frame(); Data->plotOn(SepVarFrame); @@ -200,7 +200,7 @@ void SideBandSubtract::printResults(string prefix) return; } - if(fit_result!=NULL) + if(fit_result!=nullptr) { #if ROOT_VERSION_CODE <= ROOT_VERSION(5,19,0) fit_result->printToStream(output,Verbose); @@ -226,11 +226,11 @@ void SideBandSubtract::saveResults(string outname) TString dirname; TIter nextkey(output.GetListOfKeys()); TKey *key; - TDirectory* curDir=NULL; + TDirectory* curDir=nullptr; while((key=(TKey*)nextkey.Next())) { - if(key==NULL) + if(key==nullptr) break; TObject *obj = key->ReadObj(); if(obj->IsA()->InheritsFrom("TDirectory")) @@ -254,7 +254,7 @@ void SideBandSubtract::saveResults(string outname) curDir = output.mkdir(dirname.Data(),("Run "+stringify(run_num)).c_str()); output.cd(dirname.Data()); } - if(curDir==NULL) + if(curDir==nullptr) curDir = output.GetDirectory("",kTRUE,""); //these should all be the same size, but to be pedantic we'll loop @@ -278,7 +278,7 @@ void SideBandSubtract::saveResults(string outname) SBSHistos[i].SetDirectory(curDir); SBSHistos[i].Write(); } - if(Data!=NULL && ModelPDF!=NULL && BackgroundPDF!=NULL && SeparationVariable!=NULL) + if(Data!=nullptr && ModelPDF!=nullptr && BackgroundPDF!=nullptr && SeparationVariable!=nullptr) { RooPlot *sep_varFrame = SeparationVariable->frame(); Data->plotOn(sep_varFrame); @@ -293,12 +293,12 @@ void SideBandSubtract::saveResults(string outname) } void SideBandSubtract::setDataSet(RooDataSet* newData) { - if(newData!=NULL) + if(newData!=nullptr) Data=newData; } void SideBandSubtract::print_plot(RooRealVar* printVar,string outname) { - if(Data==NULL || ModelPDF==NULL) + if(Data==nullptr || ModelPDF==nullptr) { cerr << "ERROR: print_plot, Data or ModelPDF are NULL\n"; return; @@ -315,18 +315,18 @@ void SideBandSubtract::print_plot(RooRealVar* printVar,string outname) genericCanvas.SaveAs(outname.c_str()); } SideBandSubtract::SideBandSubtract() - : BackgroundPDF(0), - ModelPDF(0), - Data(0), - SeparationVariable(0), - verbose(0), + : BackgroundPDF(nullptr), + ModelPDF(nullptr), + Data(nullptr), + SeparationVariable(nullptr), + verbose(false), SignalRegions(), SideBandRegions(), SideBandHistos(0), RawHistos(0), SBSHistos(0), BaseHistos(0), - fit_result(0), + fit_result(nullptr), SignalSidebandRatio(0) { // Default constructor so we can do fast subtraction @@ -349,8 +349,8 @@ SideBandSubtract::SideBandSubtract(RooAbsPdf *model_shape, RawHistos(), SBSHistos(), BaseHistos(base), - base_histo(0), - fit_result(0), + base_histo(nullptr), + fit_result(nullptr), SignalSidebandRatio(0) { } /* @@ -424,7 +424,7 @@ void SideBandSubtract::addSignalRegion(Double_t min, Double_t max) signal.min=min; signal.max=max; signal.RegionName="Signal" + stringify(SignalRegions.size()); - if(SeparationVariable!=NULL) + if(SeparationVariable!=nullptr) SeparationVariable->setRange(signal.RegionName.c_str(),signal.min,signal.max); SignalRegions.push_back(signal); return; @@ -435,7 +435,7 @@ void SideBandSubtract::addSideBandRegion(Double_t min, Double_t max) sideband.min=min; sideband.max=max; sideband.RegionName="SideBand" + stringify(SideBandRegions.size()); - if(SeparationVariable!=NULL) + if(SeparationVariable!=nullptr) SeparationVariable->setRange(sideband.RegionName.c_str(),sideband.min,sideband.max); SideBandRegions.push_back(sideband); return; @@ -445,7 +445,7 @@ int SideBandSubtract::doGlobalFit() if(verbose) cout <<"Beginning SideBand Subtraction\n"; - if(ModelPDF!=NULL && Data!=NULL && SeparationVariable!=NULL) + if(ModelPDF!=nullptr && Data!=nullptr && SeparationVariable!=nullptr) { fit_result = ModelPDF->fitTo(*Data,"r"); } diff --git a/RecoBTag/BTagTools/src/SignedImpactParameter3D.cc b/RecoBTag/BTagTools/src/SignedImpactParameter3D.cc index 8694a668112b5..fd5dee5041c75 100755 --- a/RecoBTag/BTagTools/src/SignedImpactParameter3D.cc +++ b/RecoBTag/BTagTools/src/SignedImpactParameter3D.cc @@ -31,7 +31,7 @@ pair SignedImpactParameter3D::apply(const TransientTrack & t const FreeTrajectoryState * FTS = TSOS.freeTrajectoryState(); - GlobalVector JetDirection(direction); + const GlobalVector& JetDirection(direction); TrajectoryStateOnSurface theTSOS = closestApproachToJet(*FTS, vertex, JetDirection,transientTrack.field()); theIsValid= theTSOS.isValid(); @@ -122,7 +122,7 @@ pair SignedImpactParameter3D::distanceWithJetAxis(const Tr const FreeTrajectoryState * FTS = TSOS.freeTrajectoryState(); - GlobalVector jetDirection(direction); + const GlobalVector& jetDirection(direction); // // Check whether the track has been used in the vertex diff --git a/RecoBTag/BTagTools/src/SignedTransverseImpactParameter.cc b/RecoBTag/BTagTools/src/SignedTransverseImpactParameter.cc index a1824f08ddd25..cceca0aa3b1da 100755 --- a/RecoBTag/BTagTools/src/SignedTransverseImpactParameter.cc +++ b/RecoBTag/BTagTools/src/SignedTransverseImpactParameter.cc @@ -41,7 +41,7 @@ pair SignedTransverseImpactParameter::apply(const TransientT GlobalPoint D0(TSOS.globalPosition()); GlobalVector DD0(D0.x()-vertex.x(),D0.y()-vertex.y(),0.); - GlobalVector JetDir(direction); + const GlobalVector& JetDir(direction); double ps = DD0.dot(JetDir); theValue = DD0.mag()*(ps/abs(ps)); @@ -102,7 +102,7 @@ pair SignedTransverseImpactParameter::zImpactParameter ( con // sign as in rphi GlobalVector PVPCA ( PCA.x()-PV.x() , PCA.y()-PV.y() , 0. ); - GlobalVector JetDir(direction); + const GlobalVector& JetDir(direction); double sign = PVPCA.dot(JetDir); sign /= fabs(sign) ; diff --git a/RecoBTag/CTagging/interface/CharmTagger.h b/RecoBTag/CTagging/interface/CharmTagger.h index 124f5890c0b12..81de0fe229def 100755 --- a/RecoBTag/CTagging/interface/CharmTagger.h +++ b/RecoBTag/CTagging/interface/CharmTagger.h @@ -21,9 +21,9 @@ class CharmTagger : public JetTagComputer { public: /// explicit ctor CharmTagger(const edm::ParameterSet & ); - ~CharmTagger();//{} - virtual float discriminator(const TagInfoHelper & tagInfo) const override; - virtual void initialize(const JetTagComputerRecord & record) override; + ~CharmTagger() override;//{} + float discriminator(const TagInfoHelper & tagInfo) const override; + void initialize(const JetTagComputerRecord & record) override; typedef std::vector vpset; diff --git a/RecoBTag/CTagging/src/CharmTagger.cc b/RecoBTag/CTagging/src/CharmTagger.cc index f352a5320779a..fec64ecfee693 100644 --- a/RecoBTag/CTagging/src/CharmTagger.cc +++ b/RecoBTag/CTagging/src/CharmTagger.cc @@ -67,7 +67,7 @@ void CharmTagger::initialize(const JetTagComputerRecord & record) } else { mvaID_->initialize( - "Color:Silent:Error", mva_name_.c_str(), + "Color:Silent:Error", mva_name_, weight_file_.fullPath(), variable_names, spectators, use_GBRForest_, use_adaBoost_ ); diff --git a/RecoBTag/Combined/interface/CandidateChargeBTagComputer.h b/RecoBTag/Combined/interface/CandidateChargeBTagComputer.h index a096d3114bf2c..4a4ba3d4105c3 100644 --- a/RecoBTag/Combined/interface/CandidateChargeBTagComputer.h +++ b/RecoBTag/Combined/interface/CandidateChargeBTagComputer.h @@ -16,7 +16,7 @@ class CandidateChargeBTagComputer : public JetTagComputer { public: CandidateChargeBTagComputer(const edm::ParameterSet ¶meters); - virtual ~CandidateChargeBTagComputer(); + ~CandidateChargeBTagComputer() override; void initialize(const JetTagComputerRecord & record) override; float discriminator(const TagInfoHelper & tagInfo) const override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); diff --git a/RecoBTag/Combined/interface/CombinedMVAV2JetTagComputer.h b/RecoBTag/Combined/interface/CombinedMVAV2JetTagComputer.h index d06538a0b1135..6f868b36edae5 100644 --- a/RecoBTag/Combined/interface/CombinedMVAV2JetTagComputer.h +++ b/RecoBTag/Combined/interface/CombinedMVAV2JetTagComputer.h @@ -14,9 +14,9 @@ class CombinedMVAV2JetTagComputer : public JetTagComputer { public: CombinedMVAV2JetTagComputer(const edm::ParameterSet ¶meters); - virtual ~CombinedMVAV2JetTagComputer(); + ~CombinedMVAV2JetTagComputer() override; - virtual void initialize(const JetTagComputerRecord & record) override; + void initialize(const JetTagComputerRecord & record) override; float discriminator(const TagInfoHelper &info) const override; diff --git a/RecoBTag/Combined/plugins/DeepCMVATagInfoProducer.cc b/RecoBTag/Combined/plugins/DeepCMVATagInfoProducer.cc index 899f75212eb81..062482b53a668 100644 --- a/RecoBTag/Combined/plugins/DeepCMVATagInfoProducer.cc +++ b/RecoBTag/Combined/plugins/DeepCMVATagInfoProducer.cc @@ -60,14 +60,14 @@ inline bool equals(const edm::RefToBase &j1, const edm::RefToBase &j2) class DeepCMVATagInfoProducer : public edm::stream::EDProducer<> { public: explicit DeepCMVATagInfoProducer(const edm::ParameterSet&); - ~DeepCMVATagInfoProducer(); + ~DeepCMVATagInfoProducer() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void beginStream(edm::StreamID) override {} - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endStream() override {} + void beginStream(edm::StreamID) override {} + void produce(edm::Event&, const edm::EventSetup&) override; + void endStream() override {} // ----------member data --------------------------- const edm::EDGetTokenT< std::vector > deepNNSrc_; diff --git a/RecoBTag/Combined/plugins/DeepFlavourJetTagsProducer.cc b/RecoBTag/Combined/plugins/DeepFlavourJetTagsProducer.cc index d3a1fa9be9b36..b89afb6e3d7bf 100644 --- a/RecoBTag/Combined/plugins/DeepFlavourJetTagsProducer.cc +++ b/RecoBTag/Combined/plugins/DeepFlavourJetTagsProducer.cc @@ -57,7 +57,7 @@ using namespace reco; class DeepFlavourJetTagsProducer : public edm::stream::EDProducer<> { public: explicit DeepFlavourJetTagsProducer(const edm::ParameterSet&); - ~DeepFlavourJetTagsProducer(); + ~DeepFlavourJetTagsProducer() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); @@ -70,9 +70,9 @@ class DeepFlavourJetTagsProducer : public edm::stream::EDProducer<> { private: typedef std::vector INFOS; - virtual void beginStream(edm::StreamID) override {} - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endStream() override {} + void beginStream(edm::StreamID) override {} + void produce(edm::Event&, const edm::EventSetup&) override; + void endStream() override {} // ----------member data --------------------------- const edm::EDGetTokenT< INFOS > src_; @@ -103,7 +103,7 @@ DeepFlavourJetTagsProducer::DeepFlavourJetTagsProducer(const edm::ParameterSet& nnconfig_(iConfig.getParameter("NNConfig")), check_sv_for_defaults_(iConfig.getParameter("checkSVForDefaults")), mean_padding_(iConfig.getParameter("meanPadding")), - neural_network_(NULL), + neural_network_(nullptr), inputs_(), outputs_(), variables_() @@ -144,7 +144,7 @@ DeepFlavourJetTagsProducer::DeepFlavourJetTagsProducer(const edm::ParameterSet& vector tokens; if (var.name != "Jet_JP" && var.name != "Jet_JBP" && var.name != "Jet_SoftMu" && var.name != "Jet_SoftEl"){boost::split(tokens,var.name,boost::is_any_of("_"));} else {tokens.push_back(var.name);} - if(!tokens.size()) { + if(tokens.empty()) { throw cms::Exception("RuntimeError") << "I could not parse properly " << input.name << " as input feature" << std::endl; } var.id = reco::getTaggingVariableName(tokens.at(0)); @@ -186,7 +186,7 @@ DeepFlavourJetTagsProducer::produce(edm::Event& iEvent, const edm::EventSetup& i vector< std::unique_ptr > output_tags; output_tags.reserve(outputs_.size()); for(size_t i=0; isize() > 0) { + if(!taginfos->empty()) { edm::RefToBase jj = taginfos->begin()->jet(); output_tags.push_back( std::make_unique( diff --git a/RecoBTag/Combined/plugins/DeepNNTagInfoProducer.cc b/RecoBTag/Combined/plugins/DeepNNTagInfoProducer.cc index 777806336dfa1..f3918a794dc4a 100644 --- a/RecoBTag/Combined/plugins/DeepNNTagInfoProducer.cc +++ b/RecoBTag/Combined/plugins/DeepNNTagInfoProducer.cc @@ -51,14 +51,14 @@ template class TemplatedDeepNNTagInfoProducer : public edm::stream::EDProducer<> { public: explicit TemplatedDeepNNTagInfoProducer(const edm::ParameterSet&); - ~TemplatedDeepNNTagInfoProducer(); + ~TemplatedDeepNNTagInfoProducer() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void beginStream(edm::StreamID) override {} - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endStream() override {} + void beginStream(edm::StreamID) override {} + void produce(edm::Event&, const edm::EventSetup&) override; + void endStream() override {} // ----------member data --------------------------- const edm::EDGetTokenT > svSrc_; diff --git a/RecoBTag/Combined/src/CombinedMVAV2JetTagComputer.cc b/RecoBTag/Combined/src/CombinedMVAV2JetTagComputer.cc index bf6963a6a2678..0d4f5d8cba136 100644 --- a/RecoBTag/Combined/src/CombinedMVAV2JetTagComputer.cc +++ b/RecoBTag/Combined/src/CombinedMVAV2JetTagComputer.cc @@ -60,7 +60,7 @@ void CombinedMVAV2JetTagComputer::initialize(const JetTagComputerRecord & record } else { mvaID->initialize( - "Color:Silent:Error", mvaName.c_str(), + "Color:Silent:Error", mvaName, weightFile.fullPath(), variables, spectators, useGBRForest, useAdaBoost ); } diff --git a/RecoBTag/ImpactParameter/interface/PromptTrackCountingComputer.h b/RecoBTag/ImpactParameter/interface/PromptTrackCountingComputer.h index 1247d234a840f..11a60def0f54d 100644 --- a/RecoBTag/ImpactParameter/interface/PromptTrackCountingComputer.h +++ b/RecoBTag/ImpactParameter/interface/PromptTrackCountingComputer.h @@ -40,7 +40,7 @@ class PromptTrackCountingComputer : public JetTagComputer uses("ipTagInfos"); } - float discriminator(const TagInfoHelper & ti) const + float discriminator(const TagInfoHelper & ti) const override { const reco::TrackIPTagInfo & tkip = ti.get(); std::multiset significances = orderedSignificances(tkip); diff --git a/RecoBTag/ImpactParameter/interface/TemplatedJetBProbabilityComputer.h b/RecoBTag/ImpactParameter/interface/TemplatedJetBProbabilityComputer.h index 68ccaf606fd94..e6db73d80b75c 100644 --- a/RecoBTag/ImpactParameter/interface/TemplatedJetBProbabilityComputer.h +++ b/RecoBTag/ImpactParameter/interface/TemplatedJetBProbabilityComputer.h @@ -52,7 +52,7 @@ class TemplatedJetBProbabilityComputer : public JetTagComputer uses("ipTagInfos"); } - float discriminator(const TagInfoHelper & ti) const + float discriminator(const TagInfoHelper & ti) const override { const TagInfo & tkip = ti.get(); const Container & tracks(tkip.selectedTracks()); diff --git a/RecoBTag/ImpactParameter/interface/TemplatedJetProbabilityComputer.h b/RecoBTag/ImpactParameter/interface/TemplatedJetProbabilityComputer.h index d786182151469..3772f004edc92 100644 --- a/RecoBTag/ImpactParameter/interface/TemplatedJetProbabilityComputer.h +++ b/RecoBTag/ImpactParameter/interface/TemplatedJetProbabilityComputer.h @@ -51,7 +51,7 @@ class TemplatedJetProbabilityComputer : public JetTagComputer uses("ipTagInfos"); } - float discriminator(const TagInfoHelper & ti) const + float discriminator(const TagInfoHelper & ti) const override { const TagInfo & tkip = ti.get(); const Container & tracks(tkip.selectedTracks()); diff --git a/RecoBTag/ImpactParameter/interface/TemplatedNegativeTrackCountingComputer.h b/RecoBTag/ImpactParameter/interface/TemplatedNegativeTrackCountingComputer.h index 298949061143d..5c12fac52d67c 100644 --- a/RecoBTag/ImpactParameter/interface/TemplatedNegativeTrackCountingComputer.h +++ b/RecoBTag/ImpactParameter/interface/TemplatedNegativeTrackCountingComputer.h @@ -11,7 +11,7 @@ class TemplatedNegativeTrackCountingComputer : public TemplatedTrackCountingComp { } - float discriminator(const JetTagComputer::TagInfoHelper & ti) const + float discriminator(const JetTagComputer::TagInfoHelper & ti) const override { const typename TemplatedTrackCountingComputer::TagInfo & tkip = ti.get::TagInfo>(); std::multiset significances = this->orderedSignificances(tkip); diff --git a/RecoBTag/ImpactParameter/interface/TemplatedTrackCountingComputer.h b/RecoBTag/ImpactParameter/interface/TemplatedTrackCountingComputer.h index e4044e7a67b2f..0bca77cf7d273 100644 --- a/RecoBTag/ImpactParameter/interface/TemplatedTrackCountingComputer.h +++ b/RecoBTag/ImpactParameter/interface/TemplatedTrackCountingComputer.h @@ -52,7 +52,7 @@ class TemplatedTrackCountingComputer : public JetTagComputer } - float discriminator(const TagInfoHelper & ti) const + float discriminator(const TagInfoHelper & ti) const override { const TagInfo & tkip = ti.get(); std::multiset significances = orderedSignificances(tkip); diff --git a/RecoBTag/ImpactParameter/plugins/IPProducer.h b/RecoBTag/ImpactParameter/plugins/IPProducer.h index dfd7e75c46d24..62befa94eec6f 100644 --- a/RecoBTag/ImpactParameter/plugins/IPProducer.h +++ b/RecoBTag/ImpactParameter/plugins/IPProducer.h @@ -108,7 +108,7 @@ namespace IPProducerHelpers { if( explicitJTA ) { for(size_t j=0;jnumberOfDaughters();++j) { - if( it->daughterPtr(j)->bestTrack()!=0 && it->daughterPtr(j)->charge() !=0 ){ + if( it->daughterPtr(j)->bestTrack()!=nullptr && it->daughterPtr(j)->charge() !=0 ){ m_map[i].push_back(it->daughterPtr(j)); } } @@ -116,7 +116,7 @@ namespace IPProducerHelpers { else { for(size_t j=0;jsize();++j) { - if( (*cands)[j].bestTrack()!=0 && (*cands)[j].charge() !=0 && (*cands)[j].pt() > 0 && Geom::deltaR2((*cands)[j],(*jets)[i]) < maxDeltaR2 ){ + if( (*cands)[j].bestTrack()!=nullptr && (*cands)[j].charge() !=0 && (*cands)[j].pt() > 0 && Geom::deltaR2((*cands)[j],(*jets)[i]) < maxDeltaR2 ){ m_map[i].push_back(cands->ptrAt(j)); } } @@ -138,10 +138,10 @@ class IPProducer : public edm::stream::EDProducer<> { explicit IPProducer(const edm::ParameterSet&); - ~IPProducer(); + ~IPProducer() override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: void checkEventSetup(const edm::EventSetup & iSetup); @@ -256,7 +256,7 @@ IPProducer::produce(edm::Event& iEvent, const edm::EventS reco::Vertex dummy; const reco::Vertex *pv = &dummy; edm::Ref pvRef; - if (primaryVertex->size() != 0) { + if (!primaryVertex->empty()) { pv = &*primaryVertex->begin(); // we always use the first vertex (at the moment) pvRef = edm::Ref(primaryVertex, 0); diff --git a/RecoBTag/PerformanceDB/plugins/BTagPerformaceRootProducerFromSQLITE.cc b/RecoBTag/PerformanceDB/plugins/BTagPerformaceRootProducerFromSQLITE.cc index 4ac2cb8fd2da3..75bd9445455ae 100644 --- a/RecoBTag/PerformanceDB/plugins/BTagPerformaceRootProducerFromSQLITE.cc +++ b/RecoBTag/PerformanceDB/plugins/BTagPerformaceRootProducerFromSQLITE.cc @@ -53,13 +53,13 @@ class BTagPerformaceRootProducerFromSQLITE : public edm::EDAnalyzer { public: explicit BTagPerformaceRootProducerFromSQLITE(const edm::ParameterSet&); - ~BTagPerformaceRootProducerFromSQLITE(); + ~BTagPerformaceRootProducerFromSQLITE() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- std::vector names_; diff --git a/RecoBTag/PerformanceDB/plugins/BtagPerformanceESProducer.h b/RecoBTag/PerformanceDB/plugins/BtagPerformanceESProducer.h index 716f355f6becf..5965774e85cd5 100644 --- a/RecoBTag/PerformanceDB/plugins/BtagPerformanceESProducer.h +++ b/RecoBTag/PerformanceDB/plugins/BtagPerformanceESProducer.h @@ -12,7 +12,7 @@ class BtagPerformanceESProducer : public edm::ESProducer{ public: BtagPerformanceESProducer(const edm::ParameterSet & p); - virtual ~BtagPerformanceESProducer(); + ~BtagPerformanceESProducer() override; std::shared_ptr produce(const BTagPerformanceRecord &); private: std::shared_ptr _perf; diff --git a/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterFromFile_WPandPayload.cc b/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterFromFile_WPandPayload.cc index 2b206597d134c..c436bf372406b 100644 --- a/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterFromFile_WPandPayload.cc +++ b/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterFromFile_WPandPayload.cc @@ -18,10 +18,10 @@ class PhysicsPerformanceDBWriterFromFile_WPandPayload : public edm::EDAnalyzer { public: PhysicsPerformanceDBWriterFromFile_WPandPayload(const edm::ParameterSet&); - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override {} - virtual void endJob() override {} - ~PhysicsPerformanceDBWriterFromFile_WPandPayload() {} + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override {} + void endJob() override {} + ~PhysicsPerformanceDBWriterFromFile_WPandPayload() override {} private: std::string inputTxtFile; @@ -149,7 +149,7 @@ void PhysicsPerformanceDBWriterFromFile_WPandPayload::beginJob() PerformanceWorkingPoint * wp = new PerformanceWorkingPoint(cut, tagger); - PerformancePayloadFromTable * btagpl = 0; + PerformancePayloadFromTable * btagpl = nullptr; if (concreteType == "PerformancePayloadFromTable"){ btagpl = new PerformancePayloadFromTable(res, bin, stride, pl); diff --git a/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV.cc b/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV.cc index b51cb50499448..38bc320fd0953 100644 --- a/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV.cc +++ b/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV.cc @@ -18,10 +18,10 @@ class PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV : public edm::EDAnalyz { public: PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV(const edm::ParameterSet&); - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override {} - virtual void endJob() override {} - ~PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV() {} + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override {} + void endJob() override {} + ~PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV() override {} private: std::string inputTxtFile; @@ -145,7 +145,7 @@ void PhysicsPerformanceDBWriterFromFile_WPandPayload_IOV::beginJob() PerformanceWorkingPoint * wp = new PerformanceWorkingPoint(cut, tagger); - PerformancePayloadFromTable * btagpl = 0; + PerformancePayloadFromTable * btagpl = nullptr; if (concreteType == "PerformancePayloadFromTable"){ btagpl = new PerformancePayloadFromTable(res, bin, stride, pl); diff --git a/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL.cc b/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL.cc index b92c843355216..b5a637348c752 100644 --- a/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL.cc +++ b/RecoBTag/PerformanceDB/plugins/PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL.cc @@ -16,10 +16,10 @@ class PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL : public edm::EDAnalyz { public: PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL(const edm::ParameterSet&); - virtual void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override {} - virtual void endJob() override {} - ~PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL() {} + void beginJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override {} + void endJob() override {} + ~PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL() override {} private: std::string inputTxtFile; @@ -110,7 +110,7 @@ void PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL::beginJob() PerformanceWorkingPoint * wp = new PerformanceWorkingPoint(cut, tagger); - PerformancePayloadFromBinnedTFormula * btagpl = 0; + PerformancePayloadFromBinnedTFormula * btagpl = nullptr; std::vector v_ppl; diff --git a/RecoBTag/SecondaryVertex/interface/CombinedSVComputer.h b/RecoBTag/SecondaryVertex/interface/CombinedSVComputer.h index f4095e6b7e6cd..072c0d17491e8 100644 --- a/RecoBTag/SecondaryVertex/interface/CombinedSVComputer.h +++ b/RecoBTag/SecondaryVertex/interface/CombinedSVComputer.h @@ -266,7 +266,7 @@ void CombinedSVComputer::fillCommonVariables(reco::TaggingVariableList & vars, r double vertexMass = vertexSum.M(); if (vtxType == btag::Vertices::RecoVertex && vertexMassCorrection) { - GlobalVector dir = svInfo.flightDirection(vtx); + const GlobalVector& dir = svInfo.flightDirection(vtx); double vertexPt2 = math::XYZVector(dir.x(), dir.y(), dir.z()).Cross(vertexSum).Mag2() / dir.mag2(); vertexMass = std::sqrt(vertexMass * vertexMass + vertexPt2) + std::sqrt(vertexPt2); } @@ -287,7 +287,7 @@ void CombinedSVComputer::fillCommonVariables(reco::TaggingVariableList & vars, r reco::PFJet const * pfJet = dynamic_cast( &* jet ) ; pat::Jet const * patJet = dynamic_cast( &* jet ) ; - if ( pfJet != 0 ) + if ( pfJet != nullptr ) { vars.insert(btau::chargedHadronEnergyFraction,pfJet->chargedHadronEnergyFraction(), true); vars.insert(btau::neutralHadronEnergyFraction,pfJet->neutralHadronEnergyFraction(), true); @@ -304,7 +304,7 @@ void CombinedSVComputer::fillCommonVariables(reco::TaggingVariableList & vars, r vars.insert(btau::totalMultiplicity,pfJet->chargedHadronMultiplicity()+pfJet->neutralHadronMultiplicity()+pfJet->photonMultiplicity()+pfJet->electronMultiplicity()+pfJet->muonMultiplicity(), true); } - else if( patJet != 0 && patJet->isPFJet() ) + else if( patJet != nullptr && patJet->isPFJet() ) { vars.insert(btau::chargedHadronEnergyFraction,patJet->chargedHadronEnergyFraction(), true); vars.insert(btau::neutralHadronEnergyFraction,patJet->neutralHadronEnergyFraction(), true); diff --git a/RecoBTag/SecondaryVertex/interface/CombinedSVSoftLeptonComputer.h b/RecoBTag/SecondaryVertex/interface/CombinedSVSoftLeptonComputer.h index 0df7f7a4a60b4..df15e91143edb 100644 --- a/RecoBTag/SecondaryVertex/interface/CombinedSVSoftLeptonComputer.h +++ b/RecoBTag/SecondaryVertex/interface/CombinedSVSoftLeptonComputer.h @@ -14,7 +14,7 @@ class CombinedSVSoftLeptonComputer : public CombinedSVComputer { public: explicit CombinedSVSoftLeptonComputer(const edm::ParameterSet ¶ms); - virtual ~CombinedSVSoftLeptonComputer() = default; + ~CombinedSVSoftLeptonComputer() override = default; double flipSoftLeptonValue(double value) const; template diff --git a/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h b/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h index 07737522c417d..ada765f0394a0 100644 --- a/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h +++ b/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h @@ -17,7 +17,7 @@ class TemplatedSecondaryVertex : public SV { bool withPVError = false) : SV(sv),dist1d_(computeDist1d(pv, sv, direction, withPVError)),dist2d_(computeDist2d(pv, sv, direction, withPVError)),dist3d_(computeDist3d(pv, sv, direction, withPVError)) {} - ~TemplatedSecondaryVertex() {} + ~TemplatedSecondaryVertex() override {} inline Measurement1D dist1d() const { return dist1d_; } inline Measurement1D dist2d() const { return dist2d_; } inline Measurement1D dist3d() const { return dist3d_; } diff --git a/RecoBTag/SecondaryVertex/interface/TemplatedSimpleSecondaryVertexComputer.h b/RecoBTag/SecondaryVertex/interface/TemplatedSimpleSecondaryVertexComputer.h index 9a2be9c82990a..6503791bcbed2 100644 --- a/RecoBTag/SecondaryVertex/interface/TemplatedSimpleSecondaryVertexComputer.h +++ b/RecoBTag/SecondaryVertex/interface/TemplatedSimpleSecondaryVertexComputer.h @@ -29,7 +29,7 @@ class TemplatedSimpleSecondaryVertexComputer : public JetTagComputer { minVertices_ = parameters.existsAs("minVertices") ? parameters.getParameter("minVertices") : 1 ; } - float discriminator(const TagInfoHelper &tagInfos) const + float discriminator(const TagInfoHelper &tagInfos) const override { const TagInfo &info = tagInfos.get(); diff --git a/RecoBTag/SecondaryVertex/interface/VertexSorting.h b/RecoBTag/SecondaryVertex/interface/VertexSorting.h index ed8867210079d..e5ada71293b51 100644 --- a/RecoBTag/SecondaryVertex/interface/VertexSorting.h +++ b/RecoBTag/SecondaryVertex/interface/VertexSorting.h @@ -69,7 +69,7 @@ template std::vector VertexSorting::operator () ( const std::vector &svCandidates) const { - Measurement1D (SecondaryVertex::*measurementFn)() const = 0; + Measurement1D (SecondaryVertex::*measurementFn)() const = nullptr; switch(sortCriterium) { case sortDist3dErr: case sortDist3dVal: @@ -83,7 +83,7 @@ std::vector VertexSorting::operator () ( break; } - double (Measurement1D::*valueFn)() const = 0; + double (Measurement1D::*valueFn)() const = nullptr; switch(sortCriterium) { case sortDist3dErr: case sortDist2dErr: diff --git a/RecoBTag/SecondaryVertex/plugins/BVertexFilter.cc b/RecoBTag/SecondaryVertex/plugins/BVertexFilter.cc index 66b5342c7dacb..df0b1194a1954 100644 --- a/RecoBTag/SecondaryVertex/plugins/BVertexFilter.cc +++ b/RecoBTag/SecondaryVertex/plugins/BVertexFilter.cc @@ -43,10 +43,10 @@ template class BVertexFilterT : public edm::stream::EDFilter<> { public: explicit BVertexFilterT(const edm::ParameterSet&); - ~BVertexFilterT(); + ~BVertexFilterT() override; private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; + bool filter(edm::Event&, const edm::EventSetup&) override; edm::EDGetTokenT token_primaryVertex; edm::EDGetTokenT > token_secondaryVertex; reco::VertexFilter svFilter; @@ -84,7 +84,7 @@ BVertexFilterT::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) auto recoVertices = std::make_unique>(); - if(pvHandle->size()!=0) { + if(!pvHandle->empty()) { const reco::Vertex & primary = (*pvHandle.product())[0]; const edm::View & vertices = *svHandle.product(); diff --git a/RecoBTag/SecondaryVertex/plugins/BoostedDoubleSVProducer.cc b/RecoBTag/SecondaryVertex/plugins/BoostedDoubleSVProducer.cc index 789e3c25b616f..bca23f9459dae 100644 --- a/RecoBTag/SecondaryVertex/plugins/BoostedDoubleSVProducer.cc +++ b/RecoBTag/SecondaryVertex/plugins/BoostedDoubleSVProducer.cc @@ -61,14 +61,14 @@ class BoostedDoubleSVProducer : public edm::stream::EDProducer<> { public: explicit BoostedDoubleSVProducer(const edm::ParameterSet&); - ~BoostedDoubleSVProducer(); + ~BoostedDoubleSVProducer() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void beginStream(edm::StreamID) override; - virtual void produce(edm::Event&, const edm::EventSetup&) override; - virtual void endStream() override; + void beginStream(edm::StreamID) override; + void produce(edm::Event&, const edm::EventSetup&) override; + void endStream() override; void calcNsubjettiness(const reco::JetBaseRef & jet, float & tau1, float & tau2, std::vector & currentAxes) const; void setTracksPVBase(const reco::TrackRef & trackRef, const reco::VertexRef & vertexRef, float & PVweight) const; @@ -407,7 +407,7 @@ BoostedDoubleSVProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSet std::map VTXmap; for (size_t vtx = 0; vtx < svTagInfo.nVertices(); ++vtx) { - const reco::VertexCompositePtrCandidate vertex = svTagInfo.secondaryVertex(vtx); + const reco::VertexCompositePtrCandidate& vertex = svTagInfo.secondaryVertex(vtx); // get the vertex kinematics reco::TrackKinematics vertexKinematic(vertex); @@ -437,7 +437,7 @@ BoostedDoubleSVProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSet } } - else if (currentAxes.size() > 0) + else if (!currentAxes.empty()) { tau1Kinematics = tau1Kinematics + vertexKinematic; if( tau1_flightDistance2dSig < 0 ) @@ -449,7 +449,7 @@ BoostedDoubleSVProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSet tau1_nSecondaryVertices += 1.; } - GlobalVector flightDir = svTagInfo.flightDirection(vtx); + const GlobalVector& flightDir = svTagInfo.flightDirection(vtx); if (reco::deltaR2(flightDir, jetDir)<(maxSVDeltaRToJet_*maxSVDeltaRToJet_)) VTXmap[svTagInfo.flightDistance(vtx).error()]=vtx; } @@ -459,7 +459,7 @@ BoostedDoubleSVProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSet math::XYZTLorentzVector allSum = allKinematics.weightedVectorSum() ; if ( tau1_nSecondaryVertices > 0. ) { - math::XYZTLorentzVector tau1_vertexSum = tau1Kinematics.weightedVectorSum(); + const math::XYZTLorentzVector& tau1_vertexSum = tau1Kinematics.weightedVectorSum(); if ( allSum.E() > 0. ) tau1_vertexEnergyRatio = tau1_vertexSum.E() / allSum.E(); if ( tau1_vertexEnergyRatio > 50. ) tau1_vertexEnergyRatio = 50.; @@ -468,7 +468,7 @@ BoostedDoubleSVProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSet if ( tau2_nSecondaryVertices > 0. ) { - math::XYZTLorentzVector tau2_vertexSum = tau2Kinematics.weightedVectorSum(); + const math::XYZTLorentzVector& tau2_vertexSum = tau2Kinematics.weightedVectorSum(); if ( allSum.E() > 0. ) tau2_vertexEnergyRatio = tau2_vertexSum.E() / allSum.E(); if ( tau2_vertexEnergyRatio > 50. ) tau2_vertexEnergyRatio = 50.; diff --git a/RecoBTag/SecondaryVertex/plugins/BtoCharmDecayVertexMerger.cc b/RecoBTag/SecondaryVertex/plugins/BtoCharmDecayVertexMerger.cc index 34ce2e768a277..a55eed32f92a7 100644 --- a/RecoBTag/SecondaryVertex/plugins/BtoCharmDecayVertexMerger.cc +++ b/RecoBTag/SecondaryVertex/plugins/BtoCharmDecayVertexMerger.cc @@ -42,7 +42,7 @@ class BtoCharmDecayVertexMergerT : public edm::stream::EDProducer<> { public: BtoCharmDecayVertexMergerT(const edm::ParameterSet ¶ms); - virtual void produce(edm::Event &event, const edm::EventSetup &es); + void produce(edm::Event &event, const edm::EventSetup &es) override; typedef reco::TemplatedSecondaryVertex SecondaryVertex; @@ -100,7 +100,7 @@ void BtoCharmDecayVertexMergerT::produce(edm::Event &iEvent, const edm::Eve edm::Handle PVcoll; iEvent.getByToken(token_primaryVertex, PVcoll); - if(PVcoll->size()!=0) { + if(!PVcoll->empty()) { const reco::VertexCollection pvc = *( PVcoll.product()); pv = pvc[0]; diff --git a/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc b/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc index 4437584fbecb5..c4b838dca5ad3 100644 --- a/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc +++ b/RecoBTag/SecondaryVertex/plugins/TemplatedSecondaryVertexProducer.cc @@ -106,14 +106,14 @@ template class TemplatedSecondaryVertexProducer : public edm::stream::EDProducer<> { public: explicit TemplatedSecondaryVertexProducer(const edm::ParameterSet ¶ms); - ~TemplatedSecondaryVertexProducer(); + ~TemplatedSecondaryVertexProducer() override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); typedef std::vector > Product; typedef TemplatedSecondaryVertex SecondaryVertex; typedef typename IPTI::input_container input_container; typedef typename IPTI::input_container::value_type input_item; typedef typename std::vector TrackDataVector; - virtual void produce(edm::Event &event, const edm::EventSetup &es) override; + void produce(edm::Event &event, const edm::EventSetup &es) override; private: template @@ -389,7 +389,7 @@ void TemplatedSecondaryVertexProducer::produce(edm::Event &event, // ------------------------------------ SV clustering START -------------------------------------------- std::vector > clusteredSVs(trackIPTagInfos->size(),std::vector()); - if( useExternalSV && useSVClustering && trackIPTagInfos->size()>0 ) + if( useExternalSV && useSVClustering && !trackIPTagInfos->empty() ) { // vector of constituents for reclustering jets and "ghost" SVs std::vector fjInputs; @@ -481,7 +481,7 @@ void TemplatedSecondaryVertexProducer::produce(edm::Event &event, continue; } - if( subjetIndices.at(i).size()==0 ) continue; // continue if the original jet does not have subjets assigned + if( subjetIndices.at(i).empty() ) continue; // continue if the original jet does not have subjets assigned // since the "ghosts" are extremely soft, the configuration and ordering of the reclustered and original fat jets should in principle stay the same if( ( std::abs( inclusiveJets.at(reclusteredIndices.at(i)).pt() - fatJetsHandle->at(i).pt() ) / fatJetsHandle->at(i).pt() ) > relPtTolerance ) @@ -580,7 +580,7 @@ void TemplatedSecondaryVertexProducer::produce(edm::Event &event, } } // case where fat jets are used to associate SVs to subjets but no SV clustering is performed - else if( useExternalSV && !useSVClustering && trackIPTagInfos->size()>0 && useFatJets ) + else if( useExternalSV && !useSVClustering && !trackIPTagInfos->empty() && useFatJets ) { // match groomed and original fat jets std::vector groomedIndices; @@ -603,7 +603,7 @@ void TemplatedSecondaryVertexProducer::produce(edm::Event &event, continue; } - if( subjetIndices.at(i).size()==0 ) continue; // continue if the original jet does not have subjets assigned + if( subjetIndices.at(i).empty() ) continue; // continue if the original jet does not have subjets assigned // loop over SVs, associate them to fat jets based on dR cone and // then assign them to the closets subjet in dR @@ -960,7 +960,7 @@ template <> typename TemplatedSecondaryVertexProducer::SecondaryVertex TemplatedSecondaryVertexProducer::SVBuilder::operator () (const TransientVertex &sv) const { - if(sv.originalTracks().size()>0 && sv.originalTracks()[0].trackBaseRef().isNonnull()) + if(!sv.originalTracks().empty() && sv.originalTracks()[0].trackBaseRef().isNonnull()) return SecondaryVertex(pv, sv, direction, withPVError); else { @@ -973,7 +973,7 @@ template <> typename TemplatedSecondaryVertexProducer::SecondaryVertex TemplatedSecondaryVertexProducer::SVBuilder::operator () (const TransientVertex &sv) const { - if(sv.originalTracks().size()>0 && sv.originalTracks()[0].trackBaseRef().isNonnull()) + if(!sv.originalTracks().empty() && sv.originalTracks()[0].trackBaseRef().isNonnull()) { edm::LogError("UnexpectedInputs") << "Building from Tracks, should not happen!"; VertexCompositePtrCandidate vtxCompPtrCand; @@ -999,7 +999,7 @@ TemplatedSecondaryVertexProducer(tt->basicTransientTrack()); - if ( cptt==0 ) + if ( cptt==nullptr ) edm::LogError("DynamicCastingFailed") << "Casting of TransientTrack to CandidatePtrTransientTrack failed!"; else { @@ -1138,7 +1138,7 @@ void TemplatedSecondaryVertexProducer::matchSubjets(const std::vector< } } - if( subjetIndices.size() == 0 ) + if( subjetIndices.empty() ) edm::LogError("SubjetMatchingFailed") << "Matching subjets to original fat jets failed. Please check that the groomed fat jet and subjet collections belong to each other."; matchedIndices.push_back(subjetIndices); @@ -1205,7 +1205,7 @@ void TemplatedSecondaryVertexProducer::matchSubjets(const edm::Handle< } } - if( subjetIndices.size() == 0 && nSubjets > 0) + if( subjetIndices.empty() && nSubjets > 0) edm::LogError("SubjetMatchingFailed") << "Matching subjets to fat jets failed. Please check that the fat jet and subjet collections belong to each other."; matchedIndices.push_back(subjetIndices); diff --git a/RecoBTag/SecondaryVertex/src/GhostTrackComputer.cc b/RecoBTag/SecondaryVertex/src/GhostTrackComputer.cc index 1ca6e308a70d9..8033836363a0e 100644 --- a/RecoBTag/SecondaryVertex/src/GhostTrackComputer.cc +++ b/RecoBTag/SecondaryVertex/src/GhostTrackComputer.cc @@ -300,7 +300,7 @@ GhostTrackComputer::operator () (const TrackIPTagInfo &ipInfo, // add track variables - math::XYZVector trackMom = track.momentum(); + const math::XYZVector& trackMom = track.momentum(); double trackMag = std::sqrt(trackMom.Mag2()); vars.insert(btau::trackSip3dVal, data.ip3d.value(), true); @@ -338,8 +338,8 @@ GhostTrackComputer::operator () (const TrackIPTagInfo &ipInfo, true); if (vtxType != btag::Vertices::NoVertex) { - math::XYZTLorentzVector allSum = allKinematics.vectorSum(); - math::XYZTLorentzVector vertexSum = vertexKinematics.vectorSum(); + const math::XYZTLorentzVector& allSum = allKinematics.vectorSum(); + const math::XYZTLorentzVector& vertexSum = vertexKinematics.vectorSum(); vars.insert(btau::vertexMass, vertexSum.M(), true); if (allKinematics.numberOfTracks()) @@ -502,7 +502,7 @@ GhostTrackComputer::operator () (const CandIPTagInfo &ipInfo, // add track variables - math::XYZVector trackMom = track.momentum(); + const math::XYZVector& trackMom = track.momentum(); double trackMag = std::sqrt(trackMom.Mag2()); vars.insert(btau::trackSip3dVal, data.ip3d.value(), true); @@ -532,8 +532,8 @@ GhostTrackComputer::operator () (const CandIPTagInfo &ipInfo, vars.insert(btau::trackSip2dSigAboveCharm, threshTrack(ipInfo, reco::btag::IP2DSig, *jet, pv).ip2d.significance(), true); if (vtxType != btag::Vertices::NoVertex) { - math::XYZTLorentzVector allSum = allKinematics.vectorSum(); - math::XYZTLorentzVector vertexSum = vertexKinematics.vectorSum(); + const math::XYZTLorentzVector& allSum = allKinematics.vectorSum(); + const math::XYZTLorentzVector& vertexSum = vertexKinematics.vectorSum(); vars.insert(btau::vertexMass, vertexSum.M(), true); if (allKinematics.numberOfTracks()) diff --git a/RecoBTag/Skimming/interface/BTagSkimLeptonJet.h b/RecoBTag/Skimming/interface/BTagSkimLeptonJet.h index f99ef63c484a4..cd05b48e99ceb 100644 --- a/RecoBTag/Skimming/interface/BTagSkimLeptonJet.h +++ b/RecoBTag/Skimming/interface/BTagSkimLeptonJet.h @@ -21,9 +21,9 @@ class BTagSkimLeptonJet : public edm::EDFilter { public: explicit BTagSkimLeptonJet( const edm::ParameterSet& ); - ~BTagSkimLeptonJet(); - virtual bool filter( edm::Event&, const edm::EventSetup& ); - virtual void endJob(); + ~BTagSkimLeptonJet() override; + bool filter( edm::Event&, const edm::EventSetup& ) override; + void endJob() override; private: edm::InputTag CaloJetInput_; diff --git a/RecoBTag/Skimming/interface/BTagSkimMC.h b/RecoBTag/Skimming/interface/BTagSkimMC.h index 7776f23075e17..0044a6a9721f8 100644 --- a/RecoBTag/Skimming/interface/BTagSkimMC.h +++ b/RecoBTag/Skimming/interface/BTagSkimMC.h @@ -6,8 +6,8 @@ class BTagSkimMC : public edm::EDFilter { public: /// constructor BTagSkimMC( const edm::ParameterSet & ); - bool filter( edm::Event& evt, const edm::EventSetup& es ); - void endJob(); + bool filter( edm::Event& evt, const edm::EventSetup& es ) override; + void endJob() override; private: bool verbose; diff --git a/RecoBTag/SoftLepton/interface/ElectronTagger.h b/RecoBTag/SoftLepton/interface/ElectronTagger.h index 8eec54b44ff7f..362c120036b84 100755 --- a/RecoBTag/SoftLepton/interface/ElectronTagger.h +++ b/RecoBTag/SoftLepton/interface/ElectronTagger.h @@ -19,7 +19,7 @@ class ElectronTagger : public JetTagComputer { /// explicit ctor ElectronTagger(const edm::ParameterSet & ); void initialize(const JetTagComputerRecord &) override; - virtual float discriminator(const TagInfoHelper & tagInfo) const override; + float discriminator(const TagInfoHelper & tagInfo) const override; private: const btag::LeptonSelector m_selector; diff --git a/RecoBTag/SoftLepton/interface/GenericSelectorByValueMap.h b/RecoBTag/SoftLepton/interface/GenericSelectorByValueMap.h index 3a50a1c9825f2..e218718bbb471 100644 --- a/RecoBTag/SoftLepton/interface/GenericSelectorByValueMap.h +++ b/RecoBTag/SoftLepton/interface/GenericSelectorByValueMap.h @@ -44,7 +44,7 @@ class GenericSelectorByValueMap : public edm::EDProducer { typedef C selection_type; typedef typename details::template CompatibleConfigurationType::type cut_type; - void produce(edm::Event & event, edm::EventSetup const & setup); + void produce(edm::Event & event, edm::EventSetup const & setup) override; edm::EDGetTokenT > token_electrons; edm::EDGetTokenT > token_selection; diff --git a/RecoBTag/SoftLepton/interface/LeptonTaggerByIP.h b/RecoBTag/SoftLepton/interface/LeptonTaggerByIP.h index afba3f9fda669..248a996624222 100644 --- a/RecoBTag/SoftLepton/interface/LeptonTaggerByIP.h +++ b/RecoBTag/SoftLepton/interface/LeptonTaggerByIP.h @@ -25,10 +25,10 @@ class LeptonTaggerByIP : public JetTagComputer { } /// dtor - virtual ~LeptonTaggerByIP() { } + ~LeptonTaggerByIP() override { } /// b-tag a jet based on track-to-jet parameters in the extened info collection - virtual float discriminator(const TagInfoHelper & tagInfo) const; + float discriminator(const TagInfoHelper & tagInfo) const override; private: diff --git a/RecoBTag/SoftLepton/interface/LeptonTaggerByPt.h b/RecoBTag/SoftLepton/interface/LeptonTaggerByPt.h index 943941d09837f..134e210bc1581 100644 --- a/RecoBTag/SoftLepton/interface/LeptonTaggerByPt.h +++ b/RecoBTag/SoftLepton/interface/LeptonTaggerByPt.h @@ -24,10 +24,10 @@ class LeptonTaggerByPt : public JetTagComputer { } /// dtor - virtual ~LeptonTaggerByPt() { } + ~LeptonTaggerByPt() override { } /// b-tag a jet based on track-to-jet parameters in the extened info collection - virtual float discriminator(const TagInfoHelper & tagInfo) const; + float discriminator(const TagInfoHelper & tagInfo) const override; private: diff --git a/RecoBTag/SoftLepton/interface/LeptonTaggerDistance.h b/RecoBTag/SoftLepton/interface/LeptonTaggerDistance.h index f3efb17781cf2..4be7f5dc2f8d9 100644 --- a/RecoBTag/SoftLepton/interface/LeptonTaggerDistance.h +++ b/RecoBTag/SoftLepton/interface/LeptonTaggerDistance.h @@ -24,10 +24,10 @@ class LeptonTaggerDistance : public JetTagComputer { } /// dtor - virtual ~LeptonTaggerDistance() { } + ~LeptonTaggerDistance() override { } /// b-tag a jet based on track-to-jet pseudo-angular distance - virtual float discriminator(const TagInfoHelper & tagInfo) const; + float discriminator(const TagInfoHelper & tagInfo) const override; private: diff --git a/RecoBTag/SoftLepton/interface/MuonTagger.h b/RecoBTag/SoftLepton/interface/MuonTagger.h index 45a1ed8377571..f06395706684c 100644 --- a/RecoBTag/SoftLepton/interface/MuonTagger.h +++ b/RecoBTag/SoftLepton/interface/MuonTagger.h @@ -17,7 +17,7 @@ class MuonTagger : public JetTagComputer { MuonTagger(const edm::ParameterSet&); void initialize(const JetTagComputerRecord &) override; - virtual float discriminator(const TagInfoHelper& tagInfo) const override; + float discriminator(const TagInfoHelper& tagInfo) const override; private: btag::LeptonSelector m_selector; diff --git a/RecoBTag/SoftLepton/interface/MuonTaggerNoIP.h b/RecoBTag/SoftLepton/interface/MuonTaggerNoIP.h index 5d0a6fa656821..44475096886b2 100644 --- a/RecoBTag/SoftLepton/interface/MuonTaggerNoIP.h +++ b/RecoBTag/SoftLepton/interface/MuonTaggerNoIP.h @@ -25,10 +25,10 @@ class MuonTaggerNoIP : public JetTagComputer { } /// dtor - virtual ~MuonTaggerNoIP() { } + ~MuonTaggerNoIP() override { } /// b-tag a jet based on track-to-jet parameters in the extened info collection - virtual float discriminator(const TagInfoHelper & tagInfo) const; + float discriminator(const TagInfoHelper & tagInfo) const override; private: diff --git a/RecoBTag/SoftLepton/plugins/SoftLepton.cc b/RecoBTag/SoftLepton/plugins/SoftLepton.cc index 9e63710cbb1fd..27ef1d43881e8 100644 --- a/RecoBTag/SoftLepton/plugins/SoftLepton.cc +++ b/RecoBTag/SoftLepton/plugins/SoftLepton.cc @@ -78,7 +78,7 @@ SoftLepton::SoftLepton(const edm::ParameterSet & iConfig) : token_leptonCands( mayConsume >( iConfig.exists("leptonCands") ? iConfig.getParameter( "leptonCands" ) : edm::InputTag() ) ), m_leptonId( iConfig.exists("leptonId") ? iConfig.getParameter( "leptonId" ) : edm::InputTag() ), token_leptonId( mayConsume >( iConfig.exists("leptonId") ? iConfig.getParameter( "leptonId" ) : edm::InputTag() ) ), - m_transientTrackBuilder( 0 ), + m_transientTrackBuilder( nullptr ), m_refineJetAxis( iConfig.getParameter( "refineJetAxis" ) ), m_deltaRCut( iConfig.getParameter( "leptonDeltaRCut" ) ), m_chi2Cut( iConfig.getParameter( "leptonChi2Cut" ) ), diff --git a/RecoBTag/SoftLepton/plugins/SoftLepton.h b/RecoBTag/SoftLepton/plugins/SoftLepton.h index db5c78f4b8621..43f01b383418c 100644 --- a/RecoBTag/SoftLepton/plugins/SoftLepton.h +++ b/RecoBTag/SoftLepton/plugins/SoftLepton.h @@ -51,7 +51,7 @@ class TransientTrackBuilder; class SoftLepton : public edm::stream::EDProducer<> { public: explicit SoftLepton(const edm::ParameterSet& iConfig); - ~SoftLepton(); + ~SoftLepton() override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); struct TrackCompare : @@ -93,7 +93,7 @@ class SoftLepton : public edm::stream::EDProducer<> { ); private: - virtual void produce(edm::Event & event, const edm::EventSetup & setup); + void produce(edm::Event & event, const edm::EventSetup & setup) override; // configuration const edm::InputTag m_jets; diff --git a/RecoBTag/SoftLepton/plugins/SoftPFElectronTagInfoProducer.cc b/RecoBTag/SoftLepton/plugins/SoftPFElectronTagInfoProducer.cc index 9c2e87972d254..9093ca1ead4b0 100644 --- a/RecoBTag/SoftLepton/plugins/SoftPFElectronTagInfoProducer.cc +++ b/RecoBTag/SoftLepton/plugins/SoftPFElectronTagInfoProducer.cc @@ -90,7 +90,7 @@ void SoftPFElectronTagInfoProducer::produce(edm::Event& iEvent, const edm::Event //Make sure that the electron is inside the jet if(reco::deltaR2((*recoelectron),(*jetRef))>DeltaRElectronJet*DeltaRElectronJet) continue; // Need a gsfTrack - if(recoelectron->gsfTrack().get()==NULL) continue; + if(recoelectron->gsfTrack().get()==nullptr) continue; reco::SoftLeptonProperties properties; // reject if it has issues with the track if(!isElecClean(iEvent,recoelectron) ) continue; diff --git a/RecoBTag/SoftLepton/plugins/SoftPFElectronTagInfoProducer.h b/RecoBTag/SoftLepton/plugins/SoftPFElectronTagInfoProducer.h index 8976b831df050..44b05a3bf2021 100644 --- a/RecoBTag/SoftLepton/plugins/SoftPFElectronTagInfoProducer.h +++ b/RecoBTag/SoftLepton/plugins/SoftPFElectronTagInfoProducer.h @@ -33,10 +33,10 @@ class SoftPFElectronTagInfoProducer : public edm::stream::EDProducer<> public: SoftPFElectronTagInfoProducer (const edm::ParameterSet& conf); - ~SoftPFElectronTagInfoProducer(); + ~SoftPFElectronTagInfoProducer() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; bool isElecClean(edm::Event&,const reco::GsfElectron*); float boostedPPar(const math::XYZVector&, const math::XYZVector&); diff --git a/RecoBTag/SoftLepton/plugins/SoftPFMuonTagInfoProducer.cc b/RecoBTag/SoftLepton/plugins/SoftPFMuonTagInfoProducer.cc index 522887b7db35a..19e2eb900390f 100644 --- a/RecoBTag/SoftLepton/plugins/SoftPFMuonTagInfoProducer.cc +++ b/RecoBTag/SoftLepton/plugins/SoftPFMuonTagInfoProducer.cc @@ -82,7 +82,7 @@ void SoftPFMuonTagInfoProducer::produce(edm::Event& iEvent, const edm::EventSetu edm::Ptr lepPtr = jetRef->daughterPtr(id); if(std::abs(lepPtr->pdgId())!=13) continue; - const reco::Muon* muon(NULL); + const reco::Muon* muon(nullptr); // Step 1: try to access the muon from reco::PFCandidate const reco::PFCandidate* pfcand=dynamic_cast(lepPtr.get()); if(pfcand) { diff --git a/RecoBTag/SoftLepton/plugins/SoftPFMuonTagInfoProducer.h b/RecoBTag/SoftLepton/plugins/SoftPFMuonTagInfoProducer.h index 743d08c6abf02..3d2a92d7251e8 100644 --- a/RecoBTag/SoftLepton/plugins/SoftPFMuonTagInfoProducer.h +++ b/RecoBTag/SoftLepton/plugins/SoftPFMuonTagInfoProducer.h @@ -31,11 +31,11 @@ class SoftPFMuonTagInfoProducer : public edm::stream::EDProducer<> { public: SoftPFMuonTagInfoProducer(const edm::ParameterSet& conf); - ~SoftPFMuonTagInfoProducer(); + ~SoftPFMuonTagInfoProducer() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; virtual float boostedPPar(const math::XYZVector&, const math::XYZVector&); edm::EDGetTokenT > jetToken; diff --git a/RecoBTag/TrackProbability/src/HistogramProbabilityEstimator.cc b/RecoBTag/TrackProbability/src/HistogramProbabilityEstimator.cc index a8ebc8efb3c24..b5ac75216218e 100644 --- a/RecoBTag/TrackProbability/src/HistogramProbabilityEstimator.cc +++ b/RecoBTag/TrackProbability/src/HistogramProbabilityEstimator.cc @@ -18,7 +18,7 @@ pair HistogramProbabilityEstimator::probability(bool quality, int i double absSignificance= fabs(significance); - const CalibratedHistogram * probabilityHistogram = 0; + const CalibratedHistogram * probabilityHistogram = nullptr; vector::const_iterator found; vector::const_iterator it; vector::const_iterator it_end; diff --git a/RecoBTag/XMLCalibration/interface/CalibratedHistogramXML.h b/RecoBTag/XMLCalibration/interface/CalibratedHistogramXML.h index cbdfde936b555..5728ed35dd429 100644 --- a/RecoBTag/XMLCalibration/interface/CalibratedHistogramXML.h +++ b/RecoBTag/XMLCalibration/interface/CalibratedHistogramXML.h @@ -25,14 +25,14 @@ class CalibratedHistogramXML:public CalibratedHistogram, CalibratedObject CalibratedHistogramXML(const CalibratedHistogram &h):CalibratedHistogram(h) {} CalibratedHistogramXML( const std::vector < float > & ulimits ) : CalibratedHistogram ( ulimits) {} - virtual ~CalibratedHistogramXML() {} + ~CalibratedHistogramXML() override {} - void read (DOMElement * dom); + void read (DOMElement * dom) override; - void write (DOMElement * dom) const; + void write (DOMElement * dom) const override; - std::string name () const + std::string name () const override { return "CalibratedHistogramXML"; } diff --git a/RecoBTag/XMLCalibration/interface/CalibrationXML.h b/RecoBTag/XMLCalibration/interface/CalibrationXML.h index e5be1370309ce..777824cb13234 100644 --- a/RecoBTag/XMLCalibration/interface/CalibrationXML.h +++ b/RecoBTag/XMLCalibration/interface/CalibrationXML.h @@ -39,8 +39,8 @@ class CalibrationXML { delete errHandler; delete parser; cms::concurrency::xercesTerminate(); - errHandler=0; - parser=0; + errHandler=nullptr; + parser=nullptr; } /** * Return the root DOM Element of the opened XML calibration file diff --git a/RecoBTag/XMLCalibration/src/CalibratedHistogramXML.cc b/RecoBTag/XMLCalibration/src/CalibratedHistogramXML.cc index 0684728a8cf28..3c1928de4fe01 100644 --- a/RecoBTag/XMLCalibration/src/CalibratedHistogramXML.cc +++ b/RecoBTag/XMLCalibration/src/CalibratedHistogramXML.cc @@ -13,7 +13,7 @@ void CalibratedHistogramXML::read (XERCES_CPP_NAMESPACE::DOMElement * dom) int bin; for(bin=0; bin < size; bin ++) { - while( ( n1->getNodeType() != DOMNode::ELEMENT_NODE ) && ( n1 != 0 ) ) n1 = n1->getNextSibling(); + while( ( n1->getNodeType() != DOMNode::ELEMENT_NODE ) && ( n1 != nullptr ) ) n1 = n1->getNextSibling(); if (n1) { DOMElement * binElement = (DOMElement *) n1; diff --git a/RecoBTag/XMLCalibration/src/CalibrationXML.cc b/RecoBTag/XMLCalibration/src/CalibrationXML.cc index 3ef8bed3f5555..2915ec8c49620 100644 --- a/RecoBTag/XMLCalibration/src/CalibrationXML.cc +++ b/RecoBTag/XMLCalibration/src/CalibrationXML.cc @@ -18,7 +18,7 @@ using namespace std; XERCES_CPP_NAMESPACE_USE -CalibrationXML::CalibrationXML() : errHandler(0), parser(0) +CalibrationXML::CalibrationXML() : errHandler(nullptr), parser(nullptr) { } @@ -131,7 +131,7 @@ DOMElement * CalibrationXML::addChild(DOMNode *dom,const std::string & name) n1 = n1->getParentNode(); } assert(dom); - if(dom->getFirstChild()==0) + if(dom->getFirstChild()==nullptr) dom->appendChild(dom->getOwnerDocument()->createTextNode(XMLString::transcode(indent.c_str()))); DOMElement * child = (DOMElement *)dom->appendChild(dom->getOwnerDocument()->createElement(XMLString::transcode(name.c_str()))); diff --git a/RecoBTau/JetTagComputer/interface/GenericMVAJetTagComputerWrapper.h b/RecoBTau/JetTagComputer/interface/GenericMVAJetTagComputerWrapper.h index 4fca03a155752..359c355eec7cc 100644 --- a/RecoBTau/JetTagComputer/interface/GenericMVAJetTagComputerWrapper.h +++ b/RecoBTau/JetTagComputer/interface/GenericMVAJetTagComputerWrapper.h @@ -50,8 +50,8 @@ class GenericMVAJetTagComputerWrapper : { uses(0, ti1); uses(1, ti2); uses(2, ti3); uses(3, ti4); } protected: - virtual reco::TaggingVariableList - taggingVariables(const TagInfoHelper &info) const + reco::TaggingVariableList + taggingVariables(const TagInfoHelper &info) const override { return (static_cast(*this))(info.get(0), info.get(1), info.get(2), info.get(3)); @@ -73,8 +73,8 @@ class GenericMVAJetTagComputerWrapper(*this))(info.get(0), info.get(1), info.get(2)); @@ -96,8 +96,8 @@ class GenericMVAJetTagComputerWrapper(*this))(info.get(0), info.get(1)); @@ -119,8 +119,8 @@ class GenericMVAJetTagComputerWrapper(*this))(info.get(0)); } }; @@ -139,8 +139,8 @@ class GenericMVAJetTagComputerWrapper(*this))(info.get(0)); } }; diff --git a/RecoCaloTools/Selectors/interface/CaloConeSelector.h b/RecoCaloTools/Selectors/interface/CaloConeSelector.h index 670f52c868381..59e249f2ad01a 100644 --- a/RecoCaloTools/Selectors/interface/CaloConeSelector.h +++ b/RecoCaloTools/Selectors/interface/CaloConeSelector.h @@ -30,7 +30,7 @@ class CaloConeSelector { // TODO: heuristics of when it is better to loop over inputCollection instead (small # hits) for (int subdet=subdet_; subdet<=7 && (subdet_==0 || subdet_==subdet); subdet++) { const CaloSubdetectorGeometry* sdg=geom_->getSubdetectorGeometry(detector_,subdet); - if (sdg!=0) { + if (sdg!=nullptr) { // get the list of detids within range (from geometry) CaloSubdetectorGeometry::DetIdSet dis=sdg->getCells(p,deltaR_); // loop over detids... diff --git a/RecoCaloTools/Selectors/interface/CaloDualConeSelector.h b/RecoCaloTools/Selectors/interface/CaloDualConeSelector.h index 8861d4c6c2609..bd3aca00ba565 100644 --- a/RecoCaloTools/Selectors/interface/CaloDualConeSelector.h +++ b/RecoCaloTools/Selectors/interface/CaloDualConeSelector.h @@ -29,7 +29,7 @@ class CaloDualConeSelector { // TODO: heuristics of when it is better to loop over inputCollection instead (small # hits) for (int subdet=subdet_; subdet<=7 && (subdet_==0 || subdet_==subdet); subdet++) { const CaloSubdetectorGeometry* sdg=geom_->getSubdetectorGeometry(detector_,subdet); - if (sdg!=0) { + if (sdg!=nullptr) { // get the list of detids within range (from geometry) CaloSubdetectorGeometry::DetIdSet dis_excl=sdg->getCells(p,deltaRmin_); CaloSubdetectorGeometry::DetIdSet dis_all=sdg->getCells(p,deltaRmax_); diff --git a/RecoHI/HiJetAlgos/interface/ParticleTowerProducer.h b/RecoHI/HiJetAlgos/interface/ParticleTowerProducer.h index b661f71f0889d..d74517afe3623 100644 --- a/RecoHI/HiJetAlgos/interface/ParticleTowerProducer.h +++ b/RecoHI/HiJetAlgos/interface/ParticleTowerProducer.h @@ -27,12 +27,12 @@ class ParticleTowerProducer : public edm::EDProducer { public: explicit ParticleTowerProducer(const edm::ParameterSet&); - ~ParticleTowerProducer(); + ~ParticleTowerProducer() override; private: - virtual void beginJob() ; - virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void produce(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; void resetTowers(edm::Event& iEvent,const edm::EventSetup& iSetup); DetId getNearestTower(const reco::PFCandidate & in) const; DetId getNearestTower(double eta, double phi) const; diff --git a/RecoHI/HiJetAlgos/src/ParticleTowerProducer.cc b/RecoHI/HiJetAlgos/src/ParticleTowerProducer.cc index c5bae6983dfa1..615baab16f3fa 100644 --- a/RecoHI/HiJetAlgos/src/ParticleTowerProducer.cc +++ b/RecoHI/HiJetAlgos/src/ParticleTowerProducer.cc @@ -63,7 +63,7 @@ // constructors and destructor // ParticleTowerProducer::ParticleTowerProducer(const edm::ParameterSet& iConfig): - geo_(0) + geo_(nullptr) { //register your products src_ = consumes(iConfig.getParameter("src")); diff --git a/RecoTracker/TkSeedGenerator/interface/FastCircleFit.h b/RecoTracker/TkSeedGenerator/interface/FastCircleFit.h index 9d90d8ca27fea..f60743cb549cf 100644 --- a/RecoTracker/TkSeedGenerator/interface/FastCircleFit.h +++ b/RecoTracker/TkSeedGenerator/interface/FastCircleFit.h @@ -85,7 +85,7 @@ void FastCircleFit::calculate(const P& points, const E& errors, C& x, C& y, C& z // transform for(size_t i=0; i(tt.basicTransientTrack()); - if ( cptt==0 ) + if ( cptt==nullptr ) edm::LogError("DynamicCastingFailed") << "Casting of TransientTrack to CandidatePtrTransientTrack failed!"; else { diff --git a/RecoVertex/KinematicFit/interface/ColinearityKinematicConstraintT.h b/RecoVertex/KinematicFit/interface/ColinearityKinematicConstraintT.h index 4f0bb2be5ab2e..8a72579d0ee08 100644 --- a/RecoVertex/KinematicFit/interface/ColinearityKinematicConstraintT.h +++ b/RecoVertex/KinematicFit/interface/ColinearityKinematicConstraintT.h @@ -41,7 +41,7 @@ class ColinearityKinematicConstraintT : public MultiTrackKinematicConstraintT<2, // initialize the constraint so it can precompute common qualtities to the three next call void init(const std::vector& states, - const GlobalPoint& ipoint, const GlobalVector& fieldValue) { + const GlobalPoint& ipoint, const GlobalVector& fieldValue) override { if(states.size()!=2) throw VertexException("ColinearityKinematicConstraint::<2 states passed"); point = ipoint; @@ -56,9 +56,9 @@ class ColinearityKinematicConstraintT : public MultiTrackKinematicConstraintT<2, /** * Number of equations per track used for the fit */ - virtual int numberOfEquations() const {return Dim == colinearityKinematic::Phi ? 1 :2;} + int numberOfEquations() const override {return Dim == colinearityKinematic::Phi ? 1 :2;} - virtual ColinearityKinematicConstraintT * clone()const + ColinearityKinematicConstraintT * clone()const override {return new ColinearityKinematicConstraintT(*this);} @@ -68,7 +68,7 @@ class ColinearityKinematicConstraintT : public MultiTrackKinematicConstraintT<2, * equations at the point where the input * particles are defined. */ - virtual void fillValue() const; + void fillValue() const override; /** @@ -76,14 +76,14 @@ class ColinearityKinematicConstraintT : public MultiTrackKinematicConstraintT<2, * constraint equations w.r.t. * particle parameters */ - virtual void fillParametersDerivative() const; + void fillParametersDerivative() const override; /** * Returns a matrix of derivatives of * constraint equations w.r.t. * vertex position */ - virtual void fillPositionDerivative() const; + void fillPositionDerivative() const override; }; diff --git a/RecoVertex/KinematicFit/interface/KinematicConstrainedVertexFitterT.h b/RecoVertex/KinematicFit/interface/KinematicConstrainedVertexFitterT.h index c19db77afe3ae..8d57475034f23 100644 --- a/RecoVertex/KinematicFit/interface/KinematicConstrainedVertexFitterT.h +++ b/RecoVertex/KinematicFit/interface/KinematicConstrainedVertexFitterT.h @@ -57,7 +57,7 @@ template < int nTrk, int nConstraint> class KinematicConstrainedVertexFitterT{ */ RefCountedKinematicTree fit(const std::vector &part, MultiTrackKinematicConstraintT< nTrk, nConstraint> * cs) { - return fit(part, cs, 0); + return fit(part, cs, nullptr); }; /** @@ -160,7 +160,7 @@ KinematicConstrainedVertexFitterT< nTrk, nConstraint>::fit(const std::vector * cs, GlobalPoint * pt) { - assert( nConstraint==0 || cs!=0); + assert( nConstraint==0 || cs!=nullptr); if(part.size()!=nTrk) throw VertexException("KinematicConstrainedVertexFitterT::input states are not nTrk"); //sorting out the input particles @@ -170,7 +170,7 @@ KinematicConstrainedVertexFitterT< nTrk, nConstraint>::fit(const std::vector & fStates = input.second; // linearization point: - GlobalPoint linPoint = (pt!=0) ? *pt : finder->getLinearizationPoint(fStates); + GlobalPoint linPoint = (pt!=nullptr) ? *pt : finder->getLinearizationPoint(fStates); //initial parameters: ROOT::Math::SVector inPar; //3+ 7*ntracks @@ -227,7 +227,7 @@ KinematicConstrainedVertexFitterT< nTrk, nConstraint>::fit(const std::vector oldStates = lStates; GlobalVector mf = field->inInverseGeV(lPoint); rVtx = updator->update(inPar,refCCov,lStates,lPoint,mf,cs); - if (particles.size() != lStates.size() || rVtx == 0) { + if (particles.size() != lStates.size() || rVtx == nullptr) { LogDebug("KinematicConstrainedVertexFitter") << "updator failure\n"; return ReferenceCountingPointer(new KinematicTree()); diff --git a/RecoVertex/KinematicFit/interface/KinematicConstrainedVertexUpdatorT.h b/RecoVertex/KinematicFit/interface/KinematicConstrainedVertexUpdatorT.h index ac28f6d24bfb4..d791df98d0fce 100644 --- a/RecoVertex/KinematicFit/interface/KinematicConstrainedVertexUpdatorT.h +++ b/RecoVertex/KinematicFit/interface/KinematicConstrainedVertexUpdatorT.h @@ -91,7 +91,7 @@ KinematicConstrainedVertexUpdatorT< nTrk, nConstraint >::update(const ROOT::Math int vSize = lStates.size(); - assert( nConstraint==0 || cs!=0); + assert( nConstraint==0 || cs!=nullptr); assert(vSize == nConstraint); const MagneticField* field=lStates.front().magneticField(); diff --git a/TrackPropagation/RungeKutta/interface/defaultRKPropagator.h b/TrackPropagation/RungeKutta/interface/defaultRKPropagator.h index 5189ffb14efe1..77d8ea1eeb0b8 100644 --- a/TrackPropagation/RungeKutta/interface/defaultRKPropagator.h +++ b/TrackPropagation/RungeKutta/interface/defaultRKPropagator.h @@ -33,10 +33,10 @@ namespace defaultRKPropagator { DDSolidShape shape, const MagneticFieldProvider * mfp) : MagVolume( pos, rot, shape, mfp) {} - virtual bool inside( const GlobalPoint& gp, double tolerance=0.) const {return true;} + bool inside( const GlobalPoint& gp, double tolerance=0.) const override {return true;} /// Access to volume faces - dummy implementation - virtual const std::vector& faces() const {return theFaces;} + const std::vector& faces() const override {return theFaces;} private: std::vector theFaces; diff --git a/TrackingTools/DetLayers/interface/DetLayerException.h b/TrackingTools/DetLayers/interface/DetLayerException.h index 5064b36814443..c3464c41ea54d 100644 --- a/TrackingTools/DetLayers/interface/DetLayerException.h +++ b/TrackingTools/DetLayers/interface/DetLayerException.h @@ -15,7 +15,7 @@ class DetLayerException : public cms::Exception { public: DetLayerException( const std::string& message) throw() : cms::Exception(message) {} - virtual ~DetLayerException() throw() {} + ~DetLayerException() throw() override {} private: }; diff --git a/TrackingTools/DetLayers/interface/GeneralBinFinderInZforGeometricSearchDet.h b/TrackingTools/DetLayers/interface/GeneralBinFinderInZforGeometricSearchDet.h index cd1a4510f76cb..354fb2a6d30af 100644 --- a/TrackingTools/DetLayers/interface/GeneralBinFinderInZforGeometricSearchDet.h +++ b/TrackingTools/DetLayers/interface/GeneralBinFinderInZforGeometricSearchDet.h @@ -37,7 +37,7 @@ class GeneralBinFinderInZforGeometricSearchDet final : public BaseBinFinder { } /// returns an index in the valid range for the bin closest to Z - virtual int binIndex( T z) const { + int binIndex( T z) const override { int bin = int((z-theZOffset)*theInvZStep)+1; if (bin<=0) return 0; if (bin>=theNbins) return theNbins; @@ -64,12 +64,12 @@ class GeneralBinFinderInZforGeometricSearchDet final : public BaseBinFinder { } /// returns an index in the valid range - virtual int binIndex( int i) const { + int binIndex( int i) const override { return std::min( std::max( i, 0), theNbins); } /// the middle of the bin. - virtual T binPosition( int ind) const { + T binPosition( int ind) const override { return theBins[binIndex(ind)]; } diff --git a/TrackingTools/DetLayers/interface/PeriodicBinFinderInZ.h b/TrackingTools/DetLayers/interface/PeriodicBinFinderInZ.h index e3bac659e57e5..dfa451e658bc0 100644 --- a/TrackingTools/DetLayers/interface/PeriodicBinFinderInZ.h +++ b/TrackingTools/DetLayers/interface/PeriodicBinFinderInZ.h @@ -25,17 +25,17 @@ class PeriodicBinFinderInZ : public BaseBinFinder { } /// returns an index in the valid range for the bin that contains Z - virtual int binIndex( T z) const { + int binIndex( T z) const override { return binIndex( int((z-theZOffset)/theZStep)); } /// returns an index in the valid range - virtual int binIndex( int i) const { + int binIndex( int i) const override { return std::min( std::max( i, 0), theNbins-1); } /// the middle of the bin - virtual T binPosition( int ind) const { + T binPosition( int ind) const override { return theZOffset + theZStep * ( ind + 0.5); } diff --git a/Utilities/BinningTools/interface/GenericBinFinderInZ.h b/Utilities/BinningTools/interface/GenericBinFinderInZ.h index 3d417b4cebc7f..99501b44c3b28 100755 --- a/Utilities/BinningTools/interface/GenericBinFinderInZ.h +++ b/Utilities/BinningTools/interface/GenericBinFinderInZ.h @@ -35,7 +35,7 @@ class GenericBinFinderInZ : public BaseBinFinder { } /// returns an index in the valid range for the bin closest to Z - virtual int binIndex( T z) const { + int binIndex( T z) const override { int bin = binIndex( int((z-theZOffset)/theZStep)+1); // check left border @@ -67,12 +67,12 @@ class GenericBinFinderInZ : public BaseBinFinder { } /// returns an index in the valid range - virtual int binIndex( int i) const { + int binIndex( int i) const override { return std::min( std::max( i, 0), theNbins-1); } /// the middle of the bin. - virtual T binPosition( int ind) const { + T binPosition( int ind) const override { return theBins[binIndex(ind)]; } diff --git a/Utilities/BinningTools/interface/PeriodicBinFinderInPhi.h b/Utilities/BinningTools/interface/PeriodicBinFinderInPhi.h index abb9f546ba269..77f636c309ab4 100644 --- a/Utilities/BinningTools/interface/PeriodicBinFinderInPhi.h +++ b/Utilities/BinningTools/interface/PeriodicBinFinderInPhi.h @@ -20,20 +20,20 @@ class PeriodicBinFinderInPhi final : public BaseBinFinder { thePhiOffset( firstPhi - T(0.5)*thePhiStep) {} /// returns an index in the valid range for the bin that contains phi - virtual int binIndex( T phi) const { + int binIndex( T phi) const override { T tmp = std::fmod((phi - thePhiOffset), twoPiC)*theInvPhiStep; if ( tmp < 0) tmp += theNbins; return std::min( int(tmp), theNbins-1); } /// returns an index in the valid range, modulo Nbins - virtual int binIndex( int i) const { + int binIndex( int i) const override { int ind = i % theNbins; return ind < 0 ? ind+theNbins : ind; } /// the middle of the bin in radians - virtual T binPosition( int ind) const { + T binPosition( int ind) const override { return thePhiOffset + thePhiStep * ( T(ind) + T(0.5)); } diff --git a/Validation/CSCRecHits/src/CSCRecHit2DValidation.cc b/Validation/CSCRecHits/src/CSCRecHit2DValidation.cc index ab3c60c1e744c..9902b7813d0ef 100644 --- a/Validation/CSCRecHits/src/CSCRecHit2DValidation.cc +++ b/Validation/CSCRecHits/src/CSCRecHit2DValidation.cc @@ -8,7 +8,7 @@ CSCRecHit2DValidation::CSCRecHit2DValidation( const edm::InputTag & inputTag, edm::ConsumesCollector && iC) : CSCBaseValidation(inputTag), - theNPerEventPlot(0) + theNPerEventPlot(nullptr) { rechits_Token_ = iC.consumes(inputTag); } diff --git a/Validation/CSCRecHits/src/CSCRecHit2DValidation.h b/Validation/CSCRecHits/src/CSCRecHit2DValidation.h index fad6ac7533a3c..c52b2e37da382 100644 --- a/Validation/CSCRecHits/src/CSCRecHit2DValidation.h +++ b/Validation/CSCRecHits/src/CSCRecHit2DValidation.h @@ -14,9 +14,9 @@ class CSCRecHit2DValidation : public CSCBaseValidation public: CSCRecHit2DValidation(const edm::InputTag & inputTag, edm::ConsumesCollector && iC); - virtual ~CSCRecHit2DValidation(); + ~CSCRecHit2DValidation() override; void bookHistograms(DQMStore::IBooker &); - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: diff --git a/Validation/CSCRecHits/src/CSCRecHitValidation.cc b/Validation/CSCRecHits/src/CSCRecHitValidation.cc index 28dbe320da4fb..c00e4ac9c0a9d 100644 --- a/Validation/CSCRecHits/src/CSCRecHitValidation.cc +++ b/Validation/CSCRecHits/src/CSCRecHitValidation.cc @@ -9,9 +9,9 @@ CSCRecHitValidation::CSCRecHitValidation(const edm::ParameterSet & ps) : theSimHitMap(ps.getParameter("simHitsTag"), consumesCollector() ), - theCSCGeometry(0), - the2DValidation(0), - theSegmentValidation(0) + theCSCGeometry(nullptr), + the2DValidation(nullptr), + theSegmentValidation(nullptr) { the2DValidation = new CSCRecHit2DValidation( ps.getParameter("recHitLabel"), diff --git a/Validation/CSCRecHits/src/CSCRecHitValidation.h b/Validation/CSCRecHits/src/CSCRecHitValidation.h index 14094a722ab8c..122f7f7dc4451 100644 --- a/Validation/CSCRecHits/src/CSCRecHitValidation.h +++ b/Validation/CSCRecHits/src/CSCRecHitValidation.h @@ -21,9 +21,9 @@ class CSCRecHitValidation : public DQMEDAnalyzer { public: explicit CSCRecHitValidation(const edm::ParameterSet&); - ~CSCRecHitValidation(); + ~CSCRecHitValidation() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: PSimHitMap theSimHitMap; diff --git a/Validation/CSCRecHits/src/CSCSegmentValidation.cc b/Validation/CSCRecHits/src/CSCSegmentValidation.cc index bb0191d7c6806..c1c605b26f0e2 100644 --- a/Validation/CSCRecHits/src/CSCSegmentValidation.cc +++ b/Validation/CSCRecHits/src/CSCSegmentValidation.cc @@ -79,7 +79,7 @@ void CSCSegmentValidation::analyze(const edm::Event&e, const edm::EventSetup& ev // do the resolution plots const PSimHit * hit = keyHit(detId); - if(hit != 0) + if(hit != nullptr) { const CSCLayer * layer = findLayer(hit->detUnitId()); plotResolution(*hit, *segmentItr, layer, chamberType); @@ -230,7 +230,7 @@ namespace CSCSegmentValidationUtils { const PSimHit * CSCSegmentValidation::keyHit(int chamberId) const { - const PSimHit * result = 0; + const PSimHit * result = nullptr; int layerId = chamberId + 3; const edm::PSimHitContainer & layerHits = theSimHitMap->hits(layerId); diff --git a/Validation/CSCRecHits/src/CSCSegmentValidation.h b/Validation/CSCRecHits/src/CSCSegmentValidation.h index 3f9f873259a99..e1bfaf062ef75 100644 --- a/Validation/CSCRecHits/src/CSCSegmentValidation.h +++ b/Validation/CSCRecHits/src/CSCSegmentValidation.h @@ -14,9 +14,9 @@ class CSCSegmentValidation : public CSCBaseValidation public: CSCSegmentValidation(const edm::InputTag & inputTag, edm::ConsumesCollector && iC); - virtual ~CSCSegmentValidation(); + ~CSCSegmentValidation() override; void bookHistograms(DQMStore::IBooker &); - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: void plotResolution(const PSimHit & simHit, const CSCSegment & recHit, diff --git a/Validation/CaloTowers/interface/CaloTowersClient.h b/Validation/CaloTowers/interface/CaloTowersClient.h index 05dd5a39dc4c3..8cb0b4a84019b 100644 --- a/Validation/CaloTowers/interface/CaloTowersClient.h +++ b/Validation/CaloTowers/interface/CaloTowersClient.h @@ -50,10 +50,10 @@ class CaloTowersClient : public DQMEDHarvester { public: explicit CaloTowersClient(const edm::ParameterSet& ); - virtual ~CaloTowersClient(); + ~CaloTowersClient() override; - virtual void beginJob(void) override; - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob + void beginJob(void) override; + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob int CaloTowersEndjob(const std::vector &hcalMEs); diff --git a/Validation/CaloTowers/interface/CaloTowersValidation.h b/Validation/CaloTowers/interface/CaloTowersValidation.h index 99c1bf048e9c6..dec168844ec72 100644 --- a/Validation/CaloTowers/interface/CaloTowersValidation.h +++ b/Validation/CaloTowers/interface/CaloTowersValidation.h @@ -33,9 +33,9 @@ class CaloTowersValidation : public DQMEDAnalyzer { public: CaloTowersValidation(edm::ParameterSet const& conf); - ~CaloTowersValidation(); - virtual void analyze(edm::Event const& e, edm::EventSetup const& c) override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + ~CaloTowersValidation() override; + void analyze(edm::Event const& e, edm::EventSetup const& c) override; + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; private: double dR(double eta1, double phi1, double eta2, double phi2); diff --git a/Validation/CaloTowers/src/CaloTowersClient.cc b/Validation/CaloTowers/src/CaloTowersClient.cc index 2a147859ad047..e341da9801811 100644 --- a/Validation/CaloTowers/src/CaloTowersClient.cc +++ b/Validation/CaloTowers/src/CaloTowersClient.cc @@ -69,9 +69,9 @@ void CaloTowersClient::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter int CaloTowersClient::CaloTowersEndjob(const std::vector &hcalMEs){ int useAllHistos = 0; - MonitorElement* Ntowers_vs_ieta =0; - MonitorElement* mapEnergy_N =0, *mapEnergy_E =0, *mapEnergy_H =0, *mapEnergy_EH =0; - MonitorElement* occupancy_map =0, *occupancy_vs_ieta =0; + MonitorElement* Ntowers_vs_ieta =nullptr; + MonitorElement* mapEnergy_N =nullptr, *mapEnergy_E =nullptr, *mapEnergy_H =nullptr, *mapEnergy_EH =nullptr; + MonitorElement* occupancy_map =nullptr, *occupancy_vs_ieta =nullptr; for(unsigned int ih=0; ihgetName().c_str(), "Ntowers_per_event_vs_ieta") ==0 ){ Ntowers_vs_ieta = hcalMEs[ih]; diff --git a/Validation/CaloTowers/src/CaloTowersValidation.cc b/Validation/CaloTowers/src/CaloTowersValidation.cc index 4ed5339b1ac04..ee47f098fc6da 100644 --- a/Validation/CaloTowers/src/CaloTowersValidation.cc +++ b/Validation/CaloTowers/src/CaloTowersValidation.cc @@ -32,7 +32,7 @@ CaloTowersValidation::CaloTowersValidation(edm::ParameterSet const& conf) imc = 1; if(mc_ == "no") imc = 0; - if ( outputFile_.size() != 0 ) { + if ( !outputFile_.empty() ) { edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will be saved to '" << outputFile_.c_str() << "'"; } else { edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will NOT be saved"; diff --git a/Validation/CheckOverlap/interface/CheckOverlap.h b/Validation/CheckOverlap/interface/CheckOverlap.h index 425f0dec27328..ceff33dca6daf 100644 --- a/Validation/CheckOverlap/interface/CheckOverlap.h +++ b/Validation/CheckOverlap/interface/CheckOverlap.h @@ -21,11 +21,11 @@ class CheckOverlap : public SimWatcher, public: CheckOverlap(edm::ParameterSet const & p); - ~CheckOverlap(); + ~CheckOverlap() override; private: - void update(const BeginOfRun * run); + void update(const BeginOfRun * run) override; void checkHierarchyLeafPVLV(G4LogicalVolume * lv, unsigned int leafDepth); void checkPV(G4VPhysicalVolume * pv, unsigned int leafDepth); G4VPhysicalVolume * getTopPV(); diff --git a/Validation/CheckOverlap/src/CheckOverlap.cc b/Validation/CheckOverlap/src/CheckOverlap.cc index f90744f5aea22..a85abc3aafb54 100644 --- a/Validation/CheckOverlap/src/CheckOverlap.cc +++ b/Validation/CheckOverlap/src/CheckOverlap.cc @@ -32,7 +32,7 @@ CheckOverlap::~CheckOverlap() {} void CheckOverlap::update(const BeginOfRun * run) { - if (nodeNames.size() > 0) { + if (!nodeNames.empty()) { const G4LogicalVolumeStore * lvs = G4LogicalVolumeStore::GetInstance(); G4cout << "CheckOverlap::update nLV= " << lvs->size() << G4endl; std::vector::const_iterator lvcite; @@ -53,7 +53,7 @@ void CheckOverlap::update(const BeginOfRun * run) { topLV.push_back(theTopPV->GetLogicalVolume()); } - if (topLV.size() == 0) { + if (topLV.empty()) { G4cout << "No Top LV Found" << G4endl; } else { for (unsigned int ii=0; iiGetRotation() == 0) { + if(pv->GetRotation() == nullptr) { G4cout << "Translation " << pv->GetTranslation() << " and with no rotation" << G4endl; } else { @@ -119,7 +119,7 @@ void CheckOverlap::checkPV(G4VPhysicalVolume * pv, unsigned int leafDepth) { } } } else { - if (pv->GetParameterisation() != 0) { + if (pv->GetParameterisation() != nullptr) { G4PVParameterised* pvparam = dynamic_cast(pv); G4bool ok = pvparam->CheckOverlaps(nPoints); G4cout << "Parametrized PV " << pvparam->GetName() diff --git a/Validation/DTRecHits/plugins/DT2DSegmentClients.h b/Validation/DTRecHits/plugins/DT2DSegmentClients.h index 0fc73948c29b5..5fb02ede7767d 100644 --- a/Validation/DTRecHits/plugins/DT2DSegmentClients.h +++ b/Validation/DTRecHits/plugins/DT2DSegmentClients.h @@ -28,11 +28,11 @@ class DT2DSegmentClients: public edm::EDAnalyzer{ DT2DSegmentClients(const edm::ParameterSet& ps); /// Destructor - virtual ~DT2DSegmentClients(); - void analyze(const edm::Event& e, const edm::EventSetup& c); - void endJob(); + ~DT2DSegmentClients() override; + void analyze(const edm::Event& e, const edm::EventSetup& c) override; + void endJob() override; void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, - edm::EventSetup const& c); + edm::EventSetup const& c) override; protected: diff --git a/Validation/DTRecHits/plugins/DT4DSegmentClients.h b/Validation/DTRecHits/plugins/DT4DSegmentClients.h index c37324575d38e..1a9bc01be75da 100644 --- a/Validation/DTRecHits/plugins/DT4DSegmentClients.h +++ b/Validation/DTRecHits/plugins/DT4DSegmentClients.h @@ -28,13 +28,13 @@ class DT4DSegmentClients: public edm::EDAnalyzer{ DT4DSegmentClients(const edm::ParameterSet& ps); /// Destructor - ~DT4DSegmentClients(); - void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c); + ~DT4DSegmentClients() override; + void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c) override; protected: /// Analyze - void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; private: diff --git a/Validation/DTRecHits/plugins/DTRecHitClients.h b/Validation/DTRecHits/plugins/DTRecHitClients.h index 30bc26a4ca275..2b1d8d7940a21 100644 --- a/Validation/DTRecHits/plugins/DTRecHitClients.h +++ b/Validation/DTRecHits/plugins/DTRecHitClients.h @@ -28,13 +28,13 @@ class DTRecHitClients: public edm::EDAnalyzer{ DTRecHitClients(const edm::ParameterSet& ps); /// Destructor - virtual ~DTRecHitClients(); + ~DTRecHitClients() override; /// Analyze - void analyze(const edm::Event& e, const edm::EventSetup& c); - void endJob(); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; + void endJob() override; void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, - edm::EventSetup const& c); + edm::EventSetup const& c) override; protected: diff --git a/Validation/DTRecHits/plugins/DTRecHitQuality.cc b/Validation/DTRecHits/plugins/DTRecHitQuality.cc index 87dde5d618e24..b39375d484039 100644 --- a/Validation/DTRecHits/plugins/DTRecHitQuality.cc +++ b/Validation/DTRecHits/plugins/DTRecHitQuality.cc @@ -68,7 +68,7 @@ void DTRecHitQuality::beginRun(const edm::Run& iRun, const edm::EventSetup &setu // ---------------------- // get hold of back-end interface - dbe_ = 0; + dbe_ = nullptr; dbe_ = Service().operator->(); /*if ( dbe_ ) { if (debug) { @@ -390,7 +390,7 @@ DTRecHitQuality::findBestRecHit(const DTLayer* layer, const vector& recHits, const float simHitDist) { float res = 99999; - const type* theBestRecHit = 0; + const type* theBestRecHit = nullptr; // Loop over RecHits within the cell for(typename vector::const_iterator recHit = recHits.begin(); recHit != recHits.end(); @@ -443,7 +443,7 @@ void DTRecHitQuality::compute(const DTGeometry *dtGeom, // Look for a mu hit in the cell const PSimHit* muSimHit = DTHitQualityUtils::findMuSimHit(simHitsInCell); - if (muSimHit==0) { + if (muSimHit==nullptr) { if (debug) cout << " No mu SimHit in channel: " << wireId << ", skipping! " << endl; continue; // Skip this cell @@ -475,7 +475,7 @@ void DTRecHitQuality::compute(const DTGeometry *dtGeom, } else { recHitReconstructed = true; // vector recHits = (*wireAndRecHits).second; - vector recHits = recHitsPerWire.at(wireId); + const vector& recHits = recHitsPerWire.at(wireId); if(debug) cout << " " << recHits.size() << " RecHits, Step " << step << " in channel: " << wireId << endl; @@ -490,8 +490,8 @@ void DTRecHitQuality::compute(const DTGeometry *dtGeom, << " SimHit angle in layer RF: " << simHitTheta << endl << " RecHit distance from wire: " << recHitWireDist << endl; float recHitErr = recHitPositionError(*theBestRecHit); - HRes1DHit *hRes = 0; - HRes1DHit *hResTot = 0; + HRes1DHit *hRes = nullptr; + HRes1DHit *hResTot = nullptr; // Mirror angle in phi so that + and - wheels can be plotted together if (mirrorMinusWheels && wheel<0 && sl!=2){ @@ -568,15 +568,15 @@ void DTRecHitQuality::compute(const DTGeometry *dtGeom, // Fill hRes->Fill(simHitWireDist, simHitTheta, simHitFEDist, recHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(),recHitErr,wireId.station()); - if(hResTot != 0) + if(hResTot != nullptr) hResTot->Fill(simHitWireDist, simHitTheta, simHitFEDist, recHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(),recHitErr,wireId.station()); } // Fill Efficiencies if(doall){ - HEff1DHit *hEff = 0; - HEff1DHit *hEffTot = 0; + HEff1DHit *hEff = nullptr; + HEff1DHit *hEffTot = nullptr; if(step == 1) { // Step 1 if(sl != 2) { @@ -626,7 +626,7 @@ void DTRecHitQuality::compute(const DTGeometry *dtGeom, } // Fill hEff->Fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed); - if(hEffTot != 0) + if(hEffTot != nullptr) hEffTot->Fill(simHitWireDist, simHitGlobalPos.eta(), simHitGlobalPos.phi(), recHitReconstructed); } } diff --git a/Validation/DTRecHits/plugins/DTRecHitQuality.h b/Validation/DTRecHits/plugins/DTRecHitQuality.h index ec2a48dcb53dc..abad5d02f7a75 100644 --- a/Validation/DTRecHits/plugins/DTRecHitQuality.h +++ b/Validation/DTRecHits/plugins/DTRecHitQuality.h @@ -53,19 +53,19 @@ class DTRecHitQuality : public edm::EDAnalyzer { DTRecHitQuality(const edm::ParameterSet& pset); /// Destructor - virtual ~DTRecHitQuality(); + ~DTRecHitQuality() override; // Operations /// Perform the real analysis - void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); + void analyze(const edm::Event & event, const edm::EventSetup& eventSetup) override; // Write the histos to file - virtual void beginRun(const edm::Run& iRun, const edm::EventSetup &setup); + void beginRun(const edm::Run& iRun, const edm::EventSetup &setup) override; - void endJob(); + void endJob() override; void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, - edm::EventSetup const& c); + edm::EventSetup const& c) override; protected: diff --git a/Validation/DTRecHits/plugins/DTSegment2DQuality.cc b/Validation/DTRecHits/plugins/DTSegment2DQuality.cc index c008d7becab64..9fed26bea5e1f 100644 --- a/Validation/DTRecHits/plugins/DTSegment2DQuality.cc +++ b/Validation/DTRecHits/plugins/DTSegment2DQuality.cc @@ -58,7 +58,7 @@ void DTSegment2DQuality::beginRun(const edm::Run& iRun, const edm::EventSetup &s // ---------------------- // get hold of back-end interface - dbe_ = 0; + dbe_ = nullptr; dbe_ = Service().operator->(); if ( dbe_ ) { if (debug) { @@ -214,7 +214,7 @@ void DTSegment2DQuality::analyze(const Event & event, const EventSetup& eventSet // RecHits must have delta alpha and delta position within 5 sigma of // the residual distribution (we are looking for residuals of segments // usefull to the track fit) for efficency purpose - const DTRecSegment2D* bestRecHit = 0; + const DTRecSegment2D* bestRecHit = nullptr; bool bestRecHitFound = false; double deltaAlpha = 99999; @@ -260,7 +260,7 @@ void DTSegment2DQuality::analyze(const Event & event, const EventSetup& eventSet } // Fill Residual histos - HRes2DHit *hRes = 0; + HRes2DHit *hRes = nullptr; if((*slId).superlayer() == 1 || (*slId).superlayer() == 3) { //RPhi SL hRes = h2DHitRPhi; } else if((*slId).superlayer() == 2) { //RZ SL @@ -293,7 +293,7 @@ void DTSegment2DQuality::analyze(const Event & event, const EventSetup& eventSet } //end of if(nsegm!=0) // Fill Efficiency plot - HEff2DHit *hEff = 0; + HEff2DHit *hEff = nullptr; if((*slId).superlayer() == 1 || (*slId).superlayer() == 3) { //RPhi SL hEff = h2DHitEff_RPhi; } else if((*slId).superlayer() == 2) { //RZ SL diff --git a/Validation/DTRecHits/plugins/DTSegment2DQuality.h b/Validation/DTRecHits/plugins/DTSegment2DQuality.h index 048793827bbf6..e24eacc7d683c 100644 --- a/Validation/DTRecHits/plugins/DTSegment2DQuality.h +++ b/Validation/DTRecHits/plugins/DTSegment2DQuality.h @@ -35,17 +35,17 @@ class DTSegment2DQuality : public edm::EDAnalyzer { DTSegment2DQuality(const edm::ParameterSet& pset); /// Destructor - virtual ~DTSegment2DQuality(); + ~DTSegment2DQuality() override; // Operations /// Perform the real analysis - void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); + void analyze(const edm::Event & event, const edm::EventSetup& eventSetup) override; - virtual void beginRun(const edm::Run& iRun, const edm::EventSetup &setup); + void beginRun(const edm::Run& iRun, const edm::EventSetup &setup) override; // Write the histos to file - void endJob(); + void endJob() override; protected: diff --git a/Validation/DTRecHits/plugins/DTSegment2DSLPhiQuality.cc b/Validation/DTRecHits/plugins/DTSegment2DSLPhiQuality.cc index 3a1c2a564c847..3cb7e4925744a 100644 --- a/Validation/DTRecHits/plugins/DTSegment2DSLPhiQuality.cc +++ b/Validation/DTRecHits/plugins/DTSegment2DSLPhiQuality.cc @@ -61,7 +61,7 @@ DTSegment2DSLPhiQuality::DTSegment2DSLPhiQuality(const ParameterSet& pset) { void DTSegment2DSLPhiQuality::beginRun(const edm::Run& iRun, const edm::EventSetup &setup) { // get hold of back-end interface - dbe_ = 0; + dbe_ = nullptr; dbe_ = Service().operator->(); if ( dbe_ ) { if (debug) { @@ -195,7 +195,7 @@ void DTSegment2DSLPhiQuality::analyze(const Event & event, const EventSetup& eve // RecHits must have delta alpha and delta position within 5 sigma of // the residual distribution (we are looking for residuals of segments // usefull to the track fit) for efficency purpose - const DTRecSegment2D* bestRecHit = 0; + const DTRecSegment2D* bestRecHit = nullptr; bool bestRecHitFound = false; double deltaAlpha = 99999; diff --git a/Validation/DTRecHits/plugins/DTSegment2DSLPhiQuality.h b/Validation/DTRecHits/plugins/DTSegment2DSLPhiQuality.h index c622113030e6c..f490adda3a7ae 100644 --- a/Validation/DTRecHits/plugins/DTSegment2DSLPhiQuality.h +++ b/Validation/DTRecHits/plugins/DTSegment2DSLPhiQuality.h @@ -36,19 +36,19 @@ class DTSegment2DSLPhiQuality : public edm::EDAnalyzer { DTSegment2DSLPhiQuality(const edm::ParameterSet& pset); /// Destructor - virtual ~DTSegment2DSLPhiQuality(); + ~DTSegment2DSLPhiQuality() override; // Operations /// Perform the real analysis - void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); + void analyze(const edm::Event & event, const edm::EventSetup& eventSetup) override; - virtual void beginRun(const edm::Run& iRun, const edm::EventSetup &setup); + void beginRun(const edm::Run& iRun, const edm::EventSetup &setup) override; // Write the histos to file - void endJob(); + void endJob() override; void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, - edm::EventSetup const& c); + edm::EventSetup const& c) override; protected: diff --git a/Validation/DTRecHits/plugins/DTSegment4DQuality.cc b/Validation/DTRecHits/plugins/DTSegment4DQuality.cc index 1dcb4b701f6cf..9f71dc093d3a3 100644 --- a/Validation/DTRecHits/plugins/DTSegment4DQuality.cc +++ b/Validation/DTRecHits/plugins/DTSegment4DQuality.cc @@ -71,7 +71,7 @@ DTSegment4DQuality::DTSegment4DQuality(const ParameterSet& pset) { void DTSegment4DQuality::beginRun(const edm::Run& iRun, const edm::EventSetup &setup) { // get hold of back-end interface - dbe_ = 0; + dbe_ = nullptr; dbe_ = Service().operator->(); if ( dbe_ ) { if (debug) { @@ -252,7 +252,7 @@ void DTSegment4DQuality::endJob() { // RecHits must have delta alpha and delta position within 5 sigma of // the residual distribution (we are looking for residuals of segments // usefull to the track fit) for efficency purpose - const DTRecSegment4D* bestRecHit = 0; + const DTRecSegment4D* bestRecHit = nullptr; double deltaAlpha = 99999; double deltaBeta = 99999; @@ -279,7 +279,7 @@ void DTSegment4DQuality::endJob() { << " position : " << (*segment4D).localPosition() << endl << " alpha : " << recSegAlpha << endl << " beta : " << recSegBeta << endl - << " nhits : " << (*segment4D).phiSegment()->recHits().size() << " " << (((*segment4D).zSegment()!=0)?(*segment4D).zSegment()->recHits().size():0) + << " nhits : " << (*segment4D).phiSegment()->recHits().size() << " " << (((*segment4D).zSegment()!=nullptr)?(*segment4D).zSegment()->recHits().size():0) << endl; @@ -396,7 +396,7 @@ void DTSegment4DQuality::endJob() { } // Fill Residual histos - HRes4DHit *histo=0; + HRes4DHit *histo=nullptr; if(wheel == 0) histo = h4DHit_W0; @@ -484,7 +484,7 @@ void DTSegment4DQuality::endJob() { // Fill Efficiency plot if(doall){ - HEff4DHit *heff = 0; + HEff4DHit *heff = nullptr; if(wheel == 0) heff = hEff_W0; diff --git a/Validation/DTRecHits/plugins/DTSegment4DQuality.h b/Validation/DTRecHits/plugins/DTSegment4DQuality.h index 02ad9f28af3a1..979ecae943d71 100644 --- a/Validation/DTRecHits/plugins/DTSegment4DQuality.h +++ b/Validation/DTRecHits/plugins/DTSegment4DQuality.h @@ -46,19 +46,19 @@ class DTSegment4DQuality : public edm::EDAnalyzer { DTSegment4DQuality(const edm::ParameterSet& pset); /// Destructor - virtual ~DTSegment4DQuality(); + ~DTSegment4DQuality() override; // Operations /// Perform the real analysis - void analyze(const edm::Event & event, const edm::EventSetup& eventSetup); + void analyze(const edm::Event & event, const edm::EventSetup& eventSetup) override; - virtual void beginRun(const edm::Run& iRun, const edm::EventSetup &setup); + void beginRun(const edm::Run& iRun, const edm::EventSetup &setup) override; // Write the histos to file - void endJob(); + void endJob() override; void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, - edm::EventSetup const& c); + edm::EventSetup const& c) override; protected: diff --git a/Validation/DTRecHits/plugins/Histograms.h b/Validation/DTRecHits/plugins/Histograms.h index 17a8117ce0787..703034e17fe0b 100644 --- a/Validation/DTRecHits/plugins/Histograms.h +++ b/Validation/DTRecHits/plugins/Histograms.h @@ -19,7 +19,7 @@ #include #include -#include +#include //--------------------------------------------------------------------------------------- /// A set of histograms of residuals and pulls for 1D RecHits @@ -35,35 +35,35 @@ class HRes1DHit{ dbe_->setCurrentFolder("DT/1DRecHits/Res/"); if(doall){ - hDist=0; hDist = dbe_->book1D(pre + "_hDist" ,"1D RHit distance from wire", 100, 0,2.5); + hDist=nullptr; hDist = dbe_->book1D(pre + "_hDist" ,"1D RHit distance from wire", 100, 0,2.5); //hDist = new TH1F ("1D_"+N+"_hDist", "1D RHit distance from wire", 100, 0,2.5); - hResVsAngle = 0; hResVsAngle = dbe_->book2D(pre+"_hResVsAngle", "1D RHit residual vs impact angle",100, -1.2,1.2, 100, -0.2,0.2); - hResVsDistFE = 0; hResVsDistFE = dbe_->book2D(pre+"_hResVsDistFE", "1D RHit residual vs FE distance", 100, 0.,400., 150, -0.5,0.5); + hResVsAngle = nullptr; hResVsAngle = dbe_->book2D(pre+"_hResVsAngle", "1D RHit residual vs impact angle",100, -1.2,1.2, 100, -0.2,0.2); + hResVsDistFE = nullptr; hResVsDistFE = dbe_->book2D(pre+"_hResVsDistFE", "1D RHit residual vs FE distance", 100, 0.,400., 150, -0.5,0.5); dbe_->setCurrentFolder("DT/1DRecHits/Pull/"); - hPullVsPos= 0; hPullVsPos = dbe_->book2D (pre+"_hPullVsPos", "1D RHit pull vs position", 100, 0,2.5, 100, -5,5); - hPullVsAngle = 0; hPullVsAngle = dbe_->book2D (pre+"_hPullVsAngle", "1D RHit pull vs impact angle",100, -1.2,1.2, 100, -5,5); - hPullVsDistFE = 0; hPullVsDistFE = dbe_->book2D (pre+"_hPullVsDistFE", "1D RHit pull vs FE distance", 100, 0., 400., 100, -5,5); + hPullVsPos= nullptr; hPullVsPos = dbe_->book2D (pre+"_hPullVsPos", "1D RHit pull vs position", 100, 0,2.5, 100, -5,5); + hPullVsAngle = nullptr; hPullVsAngle = dbe_->book2D (pre+"_hPullVsAngle", "1D RHit pull vs impact angle",100, -1.2,1.2, 100, -5,5); + hPullVsDistFE = nullptr; hPullVsDistFE = dbe_->book2D (pre+"_hPullVsDistFE", "1D RHit pull vs FE distance", 100, 0., 400., 100, -5,5); } dbe_->setCurrentFolder("DT/1DRecHits/Res/"); - hRes=0; hRes = dbe_->book1D(pre + "_hRes","1D RHit residual", 300, -0.5,0.5); - hResSt[0] = 0; hResSt[0] = dbe_->book1D(pre + "_hResMB1","1D RHit residual", 300, -0.5,0.5); - hResSt[1] = 0; hResSt[1] = dbe_->book1D(pre + "_hResMB2","1D RHit residual", 300, -0.5,0.5); - hResSt[2] = 0; hResSt[2] = dbe_->book1D(pre + "_hResMB3","1D RHit residual", 300, -0.5,0.5); - hResSt[3] = 0; hResSt[3] = dbe_->book1D(pre + "_hResMB4","1D RHit residual", 300, -0.5,0.5); + hRes=nullptr; hRes = dbe_->book1D(pre + "_hRes","1D RHit residual", 300, -0.5,0.5); + hResSt[0] = nullptr; hResSt[0] = dbe_->book1D(pre + "_hResMB1","1D RHit residual", 300, -0.5,0.5); + hResSt[1] = nullptr; hResSt[1] = dbe_->book1D(pre + "_hResMB2","1D RHit residual", 300, -0.5,0.5); + hResSt[2] = nullptr; hResSt[2] = dbe_->book1D(pre + "_hResMB3","1D RHit residual", 300, -0.5,0.5); + hResSt[3] = nullptr; hResSt[3] = dbe_->book1D(pre + "_hResMB4","1D RHit residual", 300, -0.5,0.5); //hRes = new TH1F ("1D_"+N+"_hRes", "1D RHit residual", 300, -1.5,1.5); - hResVsEta=0; hResVsEta = dbe_->book2D(pre +"_hResVsEta" , "1D RHit residual vs eta", 50, -1.25,1.25,150,-0.5,0.5); + hResVsEta=nullptr; hResVsEta = dbe_->book2D(pre +"_hResVsEta" , "1D RHit residual vs eta", 50, -1.25,1.25,150,-0.5,0.5); //hResVsEta = new TH2F("1D_"+N+"_hResVsEta", "1D RHit residual vs eta",50, -1.25,1.25, 150, -1.5,1.5); - hResVsPhi = 0; hResVsPhi = dbe_->book2D(pre+"_hResVsPhi" , "1D RHit residual vs phi",100, -3.2, 3.2, 150, -0.5,0.5); + hResVsPhi = nullptr; hResVsPhi = dbe_->book2D(pre+"_hResVsPhi" , "1D RHit residual vs phi",100, -3.2, 3.2, 150, -0.5,0.5); //hResVsPhi = new TH2F("1D_"+N+"_hResVsPhi", "1D RHit residual vs phi", 100, -3.2, 3.2, 150, -1.5,1.5); - hResVsPos = 0; hResVsPos = dbe_->book2D(pre+"_hResVsPos", "1D RHit residual vs position",100, 0, 2.5, 150, -0.5,0.5); + hResVsPos = nullptr; hResVsPos = dbe_->book2D(pre+"_hResVsPos", "1D RHit residual vs position",100, 0, 2.5, 150, -0.5,0.5); //hResVsPos = new TH2F("1D_"+N+"_hResVsPos", "1D RHit residual vs position",100, 0, 2.5, 150, -1.5,1.5); dbe_->setCurrentFolder("DT/1DRecHits/Pull/"); - hPull =0; hPull = dbe_->book1D (pre+"_hPull", "1D RHit pull", 100, -5,5); - hPullSt[0] = 0; hPullSt[0] = dbe_->book1D(pre + "_hPullMB1","1D RHit residual", 100, -5,5); - hPullSt[1] = 0; hPullSt[1] = dbe_->book1D(pre + "_hPullMB2","1D RHit residual", 100, -5,5); - hPullSt[2] = 0; hPullSt[2] = dbe_->book1D(pre + "_hPullMB3","1D RHit residual", 100, -5,5); - hPullSt[3] = 0; hPullSt[3] = dbe_->book1D(pre + "_hPullMB4","1D RHit residual", 100, -5,5); + hPull =nullptr; hPull = dbe_->book1D (pre+"_hPull", "1D RHit pull", 100, -5,5); + hPullSt[0] = nullptr; hPullSt[0] = dbe_->book1D(pre + "_hPullMB1","1D RHit residual", 100, -5,5); + hPullSt[1] = nullptr; hPullSt[1] = dbe_->book1D(pre + "_hPullMB2","1D RHit residual", 100, -5,5); + hPullSt[2] = nullptr; hPullSt[2] = dbe_->book1D(pre + "_hPullMB3","1D RHit residual", 100, -5,5); + hPullSt[3] = nullptr; hPullSt[3] = dbe_->book1D(pre + "_hPullMB4","1D RHit residual", 100, -5,5); } // HRes1DHit(TString name_, TFile* file){ @@ -167,15 +167,15 @@ class HEff1DHit{ pre += name_; name = pre; dbe_->setCurrentFolder("DT/1DRecHits/"); - hEtaMuSimHit=0; hEtaMuSimHit = dbe_->book1D(pre+"_hEtaMuSimHit", "SimHit Eta distribution",100, -1.5, 1.5); - hEtaRecHit=0; hEtaRecHit = dbe_->book1D(pre+"_hEtaRecHit", "SimHit Eta distribution with 1D RecHit",100, -1.5, 1.5); - hEffVsEta = 0; - hPhiMuSimHit=0; hPhiMuSimHit = dbe_->book1D(pre+"_hPhiMuSimHit", "SimHit Phi distribution",100, -TMath::Pi(),TMath::Pi()); - hPhiRecHit=0; hPhiRecHit = dbe_->book1D(pre+"_hPhiRecHit", "SimHit Phi distribution with 1D RecHit",100, -TMath::Pi(),TMath::Pi()); - hEffVsPhi = 0; - hDistMuSimHit=0;hDistMuSimHit = dbe_->book1D(pre+"_hDistMuSimHit", "SimHit Distance from wire distribution",100, 0, 2.5); - hDistRecHit=0; hDistRecHit = dbe_->book1D(pre+"_hDistRecHit", "SimHit Distance from wire distribution with 1D RecHit",100, 0, 2.5); - hEffVsDist = 0; + hEtaMuSimHit=nullptr; hEtaMuSimHit = dbe_->book1D(pre+"_hEtaMuSimHit", "SimHit Eta distribution",100, -1.5, 1.5); + hEtaRecHit=nullptr; hEtaRecHit = dbe_->book1D(pre+"_hEtaRecHit", "SimHit Eta distribution with 1D RecHit",100, -1.5, 1.5); + hEffVsEta = nullptr; + hPhiMuSimHit=nullptr; hPhiMuSimHit = dbe_->book1D(pre+"_hPhiMuSimHit", "SimHit Phi distribution",100, -TMath::Pi(),TMath::Pi()); + hPhiRecHit=nullptr; hPhiRecHit = dbe_->book1D(pre+"_hPhiRecHit", "SimHit Phi distribution with 1D RecHit",100, -TMath::Pi(),TMath::Pi()); + hEffVsPhi = nullptr; + hDistMuSimHit=nullptr;hDistMuSimHit = dbe_->book1D(pre+"_hDistMuSimHit", "SimHit Distance from wire distribution",100, 0, 2.5); + hDistRecHit=nullptr; hDistRecHit = dbe_->book1D(pre+"_hDistRecHit", "SimHit Distance from wire distribution with 1D RecHit",100, 0, 2.5); + hEffVsDist = nullptr; } /* @@ -335,31 +335,31 @@ class HRes2DHit{ pre += name_; dbe_->setCurrentFolder("DT/2DSegments/Res/"); if(doall){ - hRecAngle=0;hRecAngle = dbe_->book1D (pre+"_hRecAngle", "Distribution of Rec segment angles;angle (rad)",100, -1.5, 1.5); - hSimAngle=0;hSimAngle = dbe_->book1D (pre+"_hSimAngle", "Distribution of segment angles from SimHits;angle (rad)",100, -1.5, 1.5); - hRecVsSimAngle=0;hRecVsSimAngle = dbe_->book2D (pre+"_hRecVsSimAngle", "Rec angle vs sim angle;angle (rad)",100, -1.5, 1.5, 100, -1.5, 1.5); - hResAngleVsEta=0;hResAngleVsEta = dbe_->book2D (pre+"_hResAngleVsEta", "Residual on 2D segment angle vs Eta; #eta; res (rad)",100, -2.5, 2.5, 200, -0.2, 0.2); - hResAngleVsPhi=0;hResAngleVsPhi = dbe_->book2D (pre+"_hResAngleVsPhi", "Residual on 2D segment angle vs Phi; #phi (rad);res (rad)", + hRecAngle=nullptr;hRecAngle = dbe_->book1D (pre+"_hRecAngle", "Distribution of Rec segment angles;angle (rad)",100, -1.5, 1.5); + hSimAngle=nullptr;hSimAngle = dbe_->book1D (pre+"_hSimAngle", "Distribution of segment angles from SimHits;angle (rad)",100, -1.5, 1.5); + hRecVsSimAngle=nullptr;hRecVsSimAngle = dbe_->book2D (pre+"_hRecVsSimAngle", "Rec angle vs sim angle;angle (rad)",100, -1.5, 1.5, 100, -1.5, 1.5); + hResAngleVsEta=nullptr;hResAngleVsEta = dbe_->book2D (pre+"_hResAngleVsEta", "Residual on 2D segment angle vs Eta; #eta; res (rad)",100, -2.5, 2.5, 200, -0.2, 0.2); + hResAngleVsPhi=nullptr;hResAngleVsPhi = dbe_->book2D (pre+"_hResAngleVsPhi", "Residual on 2D segment angle vs Phi; #phi (rad);res (rad)", 100, -3.2, 3.2, 150, -0.2, 0.2); - hResPosVsEta=0;hResPosVsEta = dbe_->book2D (pre+"_hResPosVsEta", "Residual on 2D segment position vs Eta;#eta;res (cm)", + hResPosVsEta=nullptr;hResPosVsEta = dbe_->book2D (pre+"_hResPosVsEta", "Residual on 2D segment position vs Eta;#eta;res (cm)", 100, -2.5, 2.5, 150, -0.2, 0.2); - hResPosVsPhi=0;hResPosVsPhi = dbe_->book2D (pre+"_hResPosVsPhi", "Residual on 2D segment position vs Phi;#phi (rad);res (cm)", + hResPosVsPhi=nullptr;hResPosVsPhi = dbe_->book2D (pre+"_hResPosVsPhi", "Residual on 2D segment position vs Phi;#phi (rad);res (cm)", 100, -3.2, 3.2, 150, -0.2, 0.2); - hResPosVsResAngle=0;hResPosVsResAngle = dbe_->book2D(pre+"_hResPosVsResAngle", + hResPosVsResAngle=nullptr;hResPosVsResAngle = dbe_->book2D(pre+"_hResPosVsResAngle", "Residual on 2D segment position vs Residual on 2D segment angle;angle (rad);res (cm)", 100, -0.3, 0.3, 150, -0.2, 0.2); } - hResAngle=0; hResAngle = dbe_->book1D (pre+"_hResAngle", "Residual on 2D segment angle;angle_{rec}-angle_{sim} (rad)", 50, -0.01, 0.01); + hResAngle=nullptr; hResAngle = dbe_->book1D (pre+"_hResAngle", "Residual on 2D segment angle;angle_{rec}-angle_{sim} (rad)", 50, -0.01, 0.01); - hResPos=0;hResPos = dbe_->book1D (pre+"_hResPos", "Residual on 2D segment position (x at SL center);x_{rec}-x_{sim} (cm)", + hResPos=nullptr;hResPos = dbe_->book1D (pre+"_hResPos", "Residual on 2D segment position (x at SL center);x_{rec}-x_{sim} (cm)", 150, -0.2, 0.2); dbe_->setCurrentFolder("DT/2DSegments/Pull/"); - hPullAngle=0;hPullAngle = dbe_->book1D (pre+"_hPullAngle", "Pull on 2D segment angle;(angle_{rec}-angle_{sim})/#sigma (rad)", 150, -5, 5); - hPullPos=0;hPullPos = dbe_->book1D (pre+"_hPullPos", "Pull on 2D segment position (x at SL center);(x_{rec}-x_{sim} (cm))/#sigma", + hPullAngle=nullptr;hPullAngle = dbe_->book1D (pre+"_hPullAngle", "Pull on 2D segment angle;(angle_{rec}-angle_{sim})/#sigma (rad)", 150, -5, 5); + hPullPos=nullptr;hPullPos = dbe_->book1D (pre+"_hPullPos", "Pull on 2D segment position (x at SL center);(x_{rec}-x_{sim} (cm))/#sigma", 150, -5, 5); } @@ -457,30 +457,30 @@ class HEff2DHit{ pre += name_; name = pre; dbe_->setCurrentFolder("DT/2DSegments/"); - hEtaSimSegm=0;hEtaSimSegm = dbe_->book1D(pre+"_hEtaSimSegm", "Eta of SimHit segment", 100, -1.5, 1.5); - hEtaRecHit=0;hEtaRecHit = dbe_->book1D(pre+"_hEtaRecHit", "Eta distribution of SimHit segment with 2D RecHit", + hEtaSimSegm=nullptr;hEtaSimSegm = dbe_->book1D(pre+"_hEtaSimSegm", "Eta of SimHit segment", 100, -1.5, 1.5); + hEtaRecHit=nullptr;hEtaRecHit = dbe_->book1D(pre+"_hEtaRecHit", "Eta distribution of SimHit segment with 2D RecHit", 100, -1.5, 1.5); //hEffVsEta = 0; - hPhiSimSegm=0;hPhiSimSegm = dbe_->book1D(pre+"_hPhiSimSegm", "Phi of SimHit segment", + hPhiSimSegm=nullptr;hPhiSimSegm = dbe_->book1D(pre+"_hPhiSimSegm", "Phi of SimHit segment", 100, -TMath::Pi(),TMath::Pi()); - hPhiRecHit=0;hPhiRecHit = dbe_->book1D(pre+"_hPhiRecHit", "Phi distribution of SimHit segment with 2D RecHit", + hPhiRecHit=nullptr;hPhiRecHit = dbe_->book1D(pre+"_hPhiRecHit", "Phi distribution of SimHit segment with 2D RecHit", 100, -TMath::Pi(),TMath::Pi()); //hEffVsPhi = 0; - hPosSimSegm=0;hPosSimSegm = dbe_->book1D(pre+"_hPosSimSegm", "Position in SL of SimHit segment (cm)", + hPosSimSegm=nullptr;hPosSimSegm = dbe_->book1D(pre+"_hPosSimSegm", "Position in SL of SimHit segment (cm)", 100, -250, 250); - hPosRecHit=0;hPosRecHit = dbe_->book1D(pre+"_hPosRecHit", "Position in SL of SimHit segment with 2D RecHit (cm)", + hPosRecHit=nullptr;hPosRecHit = dbe_->book1D(pre+"_hPosRecHit", "Position in SL of SimHit segment with 2D RecHit (cm)", 100, -250, 250); //hEffVsPos = 0; - hAngleSimSegm=0;hAngleSimSegm = dbe_->book1D(pre+"_hAngleSimSegm", "Angle of SimHit segment (rad)", + hAngleSimSegm=nullptr;hAngleSimSegm = dbe_->book1D(pre+"_hAngleSimSegm", "Angle of SimHit segment (rad)", 100, -2, 2); - hAngleRecHit=0;hAngleRecHit = dbe_->book1D(pre+"_hAngleRecHit", "Angle of SimHit segment with 2D RecHit (rad)", + hAngleRecHit=nullptr;hAngleRecHit = dbe_->book1D(pre+"_hAngleRecHit", "Angle of SimHit segment with 2D RecHit (rad)", 100, -2, 2); - hEffVsAngle=0;hEffVsAngle = 0; + hEffVsAngle=nullptr;hEffVsAngle = nullptr; } /* @@ -672,153 +672,153 @@ class HRes4DHit{ dbe_->setCurrentFolder("DT/4DSegments/Res/"); if(doall){ - hRecAlpha=0;hRecAlpha = dbe_->book1D (pre+"_hRecAlpha", "4D RecHit alpha (RPhi) distribution;#alpha^{x} (rad)", 100, -1.5, 1.5); - hRecBeta=0;hRecBeta = dbe_->book1D (pre+"_hRecBeta", "4D RecHit beta distribution:#alpha^{y} (rad)", 100, -1.5, 1.5); + hRecAlpha=nullptr;hRecAlpha = dbe_->book1D (pre+"_hRecAlpha", "4D RecHit alpha (RPhi) distribution;#alpha^{x} (rad)", 100, -1.5, 1.5); + hRecBeta=nullptr;hRecBeta = dbe_->book1D (pre+"_hRecBeta", "4D RecHit beta distribution:#alpha^{y} (rad)", 100, -1.5, 1.5); - hSimAlpha=0;hSimAlpha = dbe_->book1D(pre+"_hSimAlpha", "4D segment from SimHit alpha (RPhi) distribution;i#alpha^{x} (rad)", + hSimAlpha=nullptr;hSimAlpha = dbe_->book1D(pre+"_hSimAlpha", "4D segment from SimHit alpha (RPhi) distribution;i#alpha^{x} (rad)", 100, -1.5, 1.5); - hSimBeta=0;hSimBeta = dbe_->book1D(pre+"_hSimBeta", "4D segment from SimHit beta distribution;#alpha^{y} (rad)", + hSimBeta=nullptr;hSimBeta = dbe_->book1D(pre+"_hSimBeta", "4D segment from SimHit beta distribution;#alpha^{y} (rad)", 100, -1.5, 1.5); - hRecVsSimAlpha=0;hRecVsSimAlpha = dbe_->book2D(pre+"_hRecVsSimAlpha", "4D segment rec alpha {v}s sim alpha (RPhi);#alpha^{x} (rad)", + hRecVsSimAlpha=nullptr;hRecVsSimAlpha = dbe_->book2D(pre+"_hRecVsSimAlpha", "4D segment rec alpha {v}s sim alpha (RPhi);#alpha^{x} (rad)", 100, -1.5, 1.5, 100, -1.5, 1.5); - hRecVsSimBeta=0;hRecVsSimBeta = dbe_->book2D(pre+"_hRecVsSimBeta", "4D segment rec beta vs sim beta (RZ);#alpha^{y} (rad)", + hRecVsSimBeta=nullptr;hRecVsSimBeta = dbe_->book2D(pre+"_hRecVsSimBeta", "4D segment rec beta vs sim beta (RZ);#alpha^{y} (rad)", 100, -1.5, 1.5, 100, -1.5, 1.5); - hResAlphaVsEta=0;hResAlphaVsEta = dbe_->book2D (pre+"_hResAlphaVsEta", + hResAlphaVsEta=nullptr;hResAlphaVsEta = dbe_->book2D (pre+"_hResAlphaVsEta", "4D RecHit residual on #alpha_x direction vs eta;#eta;#alpha^{x}_{rec}-#alpha^{x}_{sim} (rad)", 100, -2.5, 2.5, 100, -0.025, 0.025); - hResAlphaVsPhi=0;hResAlphaVsPhi = dbe_->book2D (pre+"_hResAlphaVsPhi", + hResAlphaVsPhi=nullptr;hResAlphaVsPhi = dbe_->book2D (pre+"_hResAlphaVsPhi", "4D RecHit residual on #alpha_x direction vs phi (rad);#phi (rad);#alpha^{x}_{rec}-#alpha^{x}_{sim} (rad)", 100, -3.2, 3.2, 100, -0.025, 0.025); - hResBetaVsEta=0;hResBetaVsEta = dbe_->book2D (pre+"_hResBetaVsEta", + hResBetaVsEta=nullptr;hResBetaVsEta = dbe_->book2D (pre+"_hResBetaVsEta", "4D RecHit residual on beta direction vs eta;#eta;#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)", 100, -2.5, 2.5, 200, -0.2, 0.2); - hResBetaVsPhi=0;hResBetaVsPhi = dbe_->book2D (pre+"_hResBetaVsPhi", + hResBetaVsPhi=nullptr;hResBetaVsPhi = dbe_->book2D (pre+"_hResBetaVsPhi", "4D RecHit residual on beta direction vs phi;#phi (rad);#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)", 100, -3.2, 3.2, 200, -0.2, 0.2); - hResXVsEta=0;hResXVsEta = dbe_->book2D (pre+"_hResXVsEta", "4D RecHit residual on position (x) in chamber vs eta;#eta;x_{rec}-x_{sim} (cm)", + hResXVsEta=nullptr;hResXVsEta = dbe_->book2D (pre+"_hResXVsEta", "4D RecHit residual on position (x) in chamber vs eta;#eta;x_{rec}-x_{sim} (cm)", 100, -2.5, 2.5, 150, -0.3, 0.3); - hResXVsPhi=0;hResXVsPhi= dbe_->book2D (pre+"_hResXVsPhi", "4D RecHit residual on position (x) in chamber vs phi;#phi (rad);x_{rec}-x_{sim} (cm)", + hResXVsPhi=nullptr;hResXVsPhi= dbe_->book2D (pre+"_hResXVsPhi", "4D RecHit residual on position (x) in chamber vs phi;#phi (rad);x_{rec}-x_{sim} (cm)", 100, -3.2, 3.2, 150, -0.3, 0.3); - hResYVsEta=0;hResYVsEta = dbe_->book2D (pre+"_hResYVsEta", "4D RecHit residual on position (y) in chamber vs eta;#eta;y_{rec}-y_{sim} (cm)", + hResYVsEta=nullptr;hResYVsEta = dbe_->book2D (pre+"_hResYVsEta", "4D RecHit residual on position (y) in chamber vs eta;#eta;y_{rec}-y_{sim} (cm)", 100, -2.5, 2.5, 150, -0.6, 0.6); - hResYVsPhi=0;hResYVsPhi = dbe_->book2D (pre+"_hResYVsPhi", "4D RecHit residual on position (y) in chamber vs phi;#phi (rad);y_{rec}-y_{sim} (cm)", + hResYVsPhi=nullptr;hResYVsPhi = dbe_->book2D (pre+"_hResYVsPhi", "4D RecHit residual on position (y) in chamber vs phi;#phi (rad);y_{rec}-y_{sim} (cm)", 100, -3.2, 3.2, 150, -0.6, 0.6); - hResAlphaVsResBeta=0;hResAlphaVsResBeta = dbe_->book2D(pre+"_hResAlphaVsResBeta", "4D RecHit residual on alpha vs residual on beta", + hResAlphaVsResBeta=nullptr;hResAlphaVsResBeta = dbe_->book2D(pre+"_hResAlphaVsResBeta", "4D RecHit residual on alpha vs residual on beta", 200, -0.3, 0.3, 500, -0.15, 0.15); - hResXVsResY=0;hResXVsResY= dbe_->book2D(pre+"_hResXVsResY", "4D RecHit residual on X vs residual on Y", + hResXVsResY=nullptr;hResXVsResY= dbe_->book2D(pre+"_hResXVsResY", "4D RecHit residual on X vs residual on Y", 150, -0.6, 0.6, 50, -0.3, 0.3); - hResAlphaVsResX=0;hResAlphaVsResX = dbe_->book2D(pre+"_hResAlphaVsResX", "4D RecHit residual on alpha vs residual on x", + hResAlphaVsResX=nullptr;hResAlphaVsResX = dbe_->book2D(pre+"_hResAlphaVsResX", "4D RecHit residual on alpha vs residual on x", 150, -0.3, 0.3, 500, -0.15, 0.15); - hResAlphaVsResY=0;hResAlphaVsResY = dbe_->book2D(pre+"_hResAlphaVsResY", "4D RecHit residual on alpha vs residual on y", + hResAlphaVsResY=nullptr;hResAlphaVsResY = dbe_->book2D(pre+"_hResAlphaVsResY", "4D RecHit residual on alpha vs residual on y", 150, -0.6, 0.6, 500, -0.15, 0.15); - hRecBetaRZ=0;hRecBetaRZ = dbe_->book1D (pre+"_hRecBetaRZ", "4D RecHit beta distribution:#alpha^{y} (rad)", 100, -1.5, 1.5); + hRecBetaRZ=nullptr;hRecBetaRZ = dbe_->book1D (pre+"_hRecBetaRZ", "4D RecHit beta distribution:#alpha^{y} (rad)", 100, -1.5, 1.5); - hSimBetaRZ=0;hSimBetaRZ = dbe_->book1D(pre+"_hSimBetaRZ", "4D segment from SimHit beta distribution in RZ SL;#alpha^{y} (rad)", + hSimBetaRZ=nullptr;hSimBetaRZ = dbe_->book1D(pre+"_hSimBetaRZ", "4D segment from SimHit beta distribution in RZ SL;#alpha^{y} (rad)", 100, -1.5, 1.5); - hRecVsSimBetaRZ=0;hRecVsSimBetaRZ = dbe_->book2D(pre+"_hRecVsSimBetaRZ", "4D segment rec beta vs sim beta (RZ) in RZ SL;#alpha^{y} (rad)", + hRecVsSimBetaRZ=nullptr;hRecVsSimBetaRZ = dbe_->book2D(pre+"_hRecVsSimBetaRZ", "4D segment rec beta vs sim beta (RZ) in RZ SL;#alpha^{y} (rad)", 100, -1.5, 1.5, 100, -1.5, 1.5); - hResBetaVsEtaRZ=0;hResBetaVsEtaRZ = dbe_->book2D (pre+"_hResBetaVsEtaRZ", + hResBetaVsEtaRZ=nullptr;hResBetaVsEtaRZ = dbe_->book2D (pre+"_hResBetaVsEtaRZ", "4D RecHit residual on beta direction vs eta;#eta in RZ SL;#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)", 100, -2.5, 2.5, 200, -0.2, 0.2); - hResBetaVsPhiRZ=0;hResBetaVsPhiRZ = dbe_->book2D (pre+"_hResBetaVsPhiRZ", + hResBetaVsPhiRZ=nullptr;hResBetaVsPhiRZ = dbe_->book2D (pre+"_hResBetaVsPhiRZ", "4D RecHit residual on beta direction vs phi in RZ SL;#phi (rad);#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)", 100, -3.2, 3.2, 200, -0.2, 0.2); - hResYVsEtaRZ=0;hResYVsEtaRZ = dbe_->book2D (pre+"_hResYVsEtaRZ", + hResYVsEtaRZ=nullptr;hResYVsEtaRZ = dbe_->book2D (pre+"_hResYVsEtaRZ", "4D RecHit residual on position (y) in chamber vs eta in RZ SL;#eta;y_{rec}-y_{sim} (cm)", 100, -2.5, 2.5, 150, -0.6, 0.6); - hResYVsPhiRZ=0;hResYVsPhiRZ = dbe_->book2D (pre+"_hResYVsPhiRZ", + hResYVsPhiRZ=nullptr;hResYVsPhiRZ = dbe_->book2D (pre+"_hResYVsPhiRZ", "4D RecHit residual on position (y) in chamber vs phi in RZ SL;#phi (rad);y_{rec}-y_{sim} (cm)", 100, -3.2, 3.2, 150, -0.6, 0.6); dbe_->setCurrentFolder("DT/4DSegments/Pull/"); - hPullAlphaVsEta=0;hPullAlphaVsEta = dbe_->book2D (pre+"_hPullAlphaVsEta", + hPullAlphaVsEta=nullptr;hPullAlphaVsEta = dbe_->book2D (pre+"_hPullAlphaVsEta", "4D RecHit pull on #alpha_x direction vs eta;#eta;(#alpha^{x}_{rec}-#alpha^{x}_{sim})/#sigma", 100, -2.5, 2.5, 100, -5, 5); - hPullAlphaVsPhi=0;hPullAlphaVsPhi = dbe_->book2D (pre+"_hPullAlphaVsPhi", + hPullAlphaVsPhi=nullptr;hPullAlphaVsPhi = dbe_->book2D (pre+"_hPullAlphaVsPhi", "4D RecHit pull on #alpha_x direction vs phi (rad);#phi (rad);(#alpha^{x}_{rec}-#alpha^{x}_{sim})/#sigma", 100, -3.2, 3.2, 100, -5, 5); - hPullBetaVsEta=0;hPullBetaVsEta = dbe_->book2D (pre+"_hPullBetaVsEta", + hPullBetaVsEta=nullptr;hPullBetaVsEta = dbe_->book2D (pre+"_hPullBetaVsEta", "4D RecHit pull on beta direction vs eta;#eta;(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma", 100, -2.5, 2.5, 200, -5, 5); - hPullBetaVsPhi=0;hPullBetaVsPhi = dbe_->book2D (pre+"_hPullBetaVsPhi", + hPullBetaVsPhi=nullptr;hPullBetaVsPhi = dbe_->book2D (pre+"_hPullBetaVsPhi", "4D RecHit pull on beta direction vs phi;#phi (rad);(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma", 100, -3.2, 3.2, 200, -5, 5); - hPullXVsEta=0;hPullXVsEta = dbe_->book2D (pre+"_hPullXVsEta", + hPullXVsEta=nullptr;hPullXVsEta = dbe_->book2D (pre+"_hPullXVsEta", "4D RecHit pull on position (x) in chamber vs eta;#eta;(x_{rec}-x_{sim})#sigma", 100, -2.5, 2.5, 150, -5, 5); - hPullXVsPhi=0;hPullXVsPhi = dbe_->book2D (pre+"_hPullXVsPhi", + hPullXVsPhi=nullptr;hPullXVsPhi = dbe_->book2D (pre+"_hPullXVsPhi", "4D RecHit pull on position (x) in chamber vs phi;#phi (rad);(x_{rec}-x_{sim})/#sigma", 100, -3.2, 3.2, 150, -5, 5); - hPullYVsEta=0;hPullYVsEta = dbe_->book2D (pre+"_hPullYVsEta", + hPullYVsEta=nullptr;hPullYVsEta = dbe_->book2D (pre+"_hPullYVsEta", "4D RecHit pull on position (y) in chamber vs eta;#eta;(y_{rec}-y_{sim})/#sigma", 100, -2.5, 2.5, 150, -5, 5); - hPullYVsPhi=0;hPullYVsPhi = dbe_->book2D (pre+"_hPullYVsPhi", + hPullYVsPhi=nullptr;hPullYVsPhi = dbe_->book2D (pre+"_hPullYVsPhi", "4D RecHit pull on position (y) in chamber vs phi;#phi (rad);(y_{rec}-y_{sim})/#sigma", 100, -3.2, 3.2, 150, -5, 5); - hPullBetaVsEtaRZ=0;hPullBetaVsEtaRZ = dbe_->book2D (pre+"_hPullBetaVsEtaRZ", + hPullBetaVsEtaRZ=nullptr;hPullBetaVsEtaRZ = dbe_->book2D (pre+"_hPullBetaVsEtaRZ", "4D RecHit pull on beta direction vs eta;#eta in RZ SL;(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma", 100, -2.5, 2.5, 200, -5, 5); - hPullBetaVsPhiRZ=0;hPullBetaVsPhiRZ = dbe_->book2D (pre+"_hPullBetaVsPhiRZ", + hPullBetaVsPhiRZ=nullptr;hPullBetaVsPhiRZ = dbe_->book2D (pre+"_hPullBetaVsPhiRZ", "4D RecHit pull on beta direction vs phi in RZ SL;#phi (rad);(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma", 100, -3.2, 3.2, 200, -5, 5); - hPullYVsEtaRZ=0;hPullYVsEtaRZ = dbe_->book2D (pre+"_hPullYVsEtaRZ", + hPullYVsEtaRZ=nullptr;hPullYVsEtaRZ = dbe_->book2D (pre+"_hPullYVsEtaRZ", "4D RecHit pull on position (y) in chamber vs eta in RZ SL;#eta;(y_{rec}-y_{sim})/#sigma", 100, -2.5, 2.5, 150, -5, 5); - hPullYVsPhiRZ=0;hPullYVsPhiRZ = dbe_->book2D (pre+"_hPullYVsPhiRZ", + hPullYVsPhiRZ=nullptr;hPullYVsPhiRZ = dbe_->book2D (pre+"_hPullYVsPhiRZ", "4D RecHit pull on position (y) in chamber vs phi in RZ SL;#phi (rad);(y_{rec}-y_{sim})/#sigma", 100, -3.2, 3.2, 150, -5, 5); } dbe_->setCurrentFolder("DT/4DSegments/Res/"); - hResAlpha=0;hResAlpha = dbe_->book1D (pre+"_hResAlpha", + hResAlpha=nullptr;hResAlpha = dbe_->book1D (pre+"_hResAlpha", "4D RecHit residual on #alpha_x direction;#alpha^{x}_{rec}-#alpha^{x}_{sim} (rad)", 200, -0.015, 0.015); - hResBeta=0;hResBeta = dbe_->book1D (pre+"_hResBeta", + hResBeta=nullptr;hResBeta = dbe_->book1D (pre+"_hResBeta", "4D RecHit residual on beta direction;#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)", 200, -0.1, 0.1); - hResX=0;hResX = dbe_->book1D (pre+"_hResX", "4D RecHit residual on position (x) in chamber;x_{rec}-x_{sim} (cm)", + hResX=nullptr;hResX = dbe_->book1D (pre+"_hResX", "4D RecHit residual on position (x) in chamber;x_{rec}-x_{sim} (cm)", 150, -0.15, 0.15); - hResY=0;hResY = dbe_->book1D (pre+"_hResY", "4D RecHit residual on position (y) in chamber;y_{rec}-y_{sim} (cm)", 150, -0.6, 0.6); + hResY=nullptr;hResY = dbe_->book1D (pre+"_hResY", "4D RecHit residual on position (y) in chamber;y_{rec}-y_{sim} (cm)", 150, -0.6, 0.6); // histo in rz SL reference frame. - hResBetaRZ=0;hResBetaRZ = dbe_->book1D (pre+"_hResBetaRZ", + hResBetaRZ=nullptr;hResBetaRZ = dbe_->book1D (pre+"_hResBetaRZ", "4D RecHit residual on beta direction in RZ SL;#alpha^{y}_{rec}-#alpha^{y}_{sim} (rad)", 200, -0.1, 0.1); - hResYRZ=0;hResYRZ = dbe_->book1D (pre+"_hResYRZ", + hResYRZ=nullptr;hResYRZ = dbe_->book1D (pre+"_hResYRZ", "4D RecHit residual on position (y) in chamber in RZ SL;y_{rec}-y_{sim} (cm)", 150, -0.15, 0.15); // Pulls dbe_->setCurrentFolder("DT/4DSegments/Pull/"); - hPullAlpha=0;hPullAlpha = dbe_->book1D (pre+"_hPullAlpha", + hPullAlpha=nullptr;hPullAlpha = dbe_->book1D (pre+"_hPullAlpha", "4D RecHit pull on #alpha_x direction;(#alpha^{x}_{rec}-#alpha^{x}_{sim})/#sigma", 200, -5, 5); - hPullBeta=0;hPullBeta = dbe_->book1D (pre+"_hPullBeta", + hPullBeta=nullptr;hPullBeta = dbe_->book1D (pre+"_hPullBeta", "4D RecHit pull on beta direction;(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma", 200, -5, 5); - hPullX=0;hPullX = dbe_->book1D (pre+"_hPullX", + hPullX=nullptr;hPullX = dbe_->book1D (pre+"_hPullX", "4D RecHit pull on position (x) in chamber;(x_{rec}-x_{sim})#sigma", 150, -5, 5); - hPullY=0;hPullY = dbe_->book1D (pre+"_hPullY", + hPullY=nullptr;hPullY = dbe_->book1D (pre+"_hPullY", "4D RecHit pull on position (y) in chamber;(y_{rec}-y_{sim})/#sigma", 150, -5, 5); - hPullBetaRZ=0;hPullBetaRZ = dbe_->book1D (pre+"_hPullBetaRZ", + hPullBetaRZ=nullptr;hPullBetaRZ = dbe_->book1D (pre+"_hPullBetaRZ", "4D RecHit pull on beta direction in RZ SL;(#alpha^{y}_{rec}-#alpha^{y}_{sim})/#sigma", 200, -5, 5); - hPullYRZ=0;hPullYRZ = dbe_->book1D (pre+"_hPullYRZ", + hPullYRZ=nullptr;hPullYRZ = dbe_->book1D (pre+"_hPullYRZ", "4D RecHit pull on position (y) in chamber in RZ SL;(y_{rec}-y_{sim})/#sigma", 150, -5, 5); @@ -1010,43 +1010,43 @@ class HEff4DHit{ pre += name_; name = pre; dbe_->setCurrentFolder("DT/4DSegments/"); - hEtaSimSegm=0;hEtaSimSegm = dbe_->book1D(pre+"_hEtaSimSegm", "Eta of SimHit segment", 100, -1.5, 1.5); - hEtaRecHit=0;hEtaRecHit = dbe_->book1D(pre+"_hEtaRecHit", "Eta distribution of SimHit segment with 4D RecHit", + hEtaSimSegm=nullptr;hEtaSimSegm = dbe_->book1D(pre+"_hEtaSimSegm", "Eta of SimHit segment", 100, -1.5, 1.5); + hEtaRecHit=nullptr;hEtaRecHit = dbe_->book1D(pre+"_hEtaRecHit", "Eta distribution of SimHit segment with 4D RecHit", 100, -1.5, 1.5); - hEffVsEta = 0; + hEffVsEta = nullptr; - hPhiSimSegm=0;hPhiSimSegm = dbe_->book1D(pre+"_hPhiSimSegm", "Phi of SimHit segment", + hPhiSimSegm=nullptr;hPhiSimSegm = dbe_->book1D(pre+"_hPhiSimSegm", "Phi of SimHit segment", 100, -TMath::Pi(),TMath::Pi()); - hPhiRecHit=0;hPhiRecHit = dbe_->book1D(pre+"_hPhiRecHit", "Phi distribution of SimHit segment with 4D RecHit", + hPhiRecHit=nullptr;hPhiRecHit = dbe_->book1D(pre+"_hPhiRecHit", "Phi distribution of SimHit segment with 4D RecHit", 100, -TMath::Pi(),TMath::Pi()); - hEffVsPhi = 0; + hEffVsPhi = nullptr; - hXSimSegm=0;hXSimSegm = dbe_->book1D(pre+"_hXSimSegm", "X position in Chamber of SimHit segment (cm)", + hXSimSegm=nullptr;hXSimSegm = dbe_->book1D(pre+"_hXSimSegm", "X position in Chamber of SimHit segment (cm)", 100, -200, 200); - hXRecHit=0;hXRecHit = dbe_->book1D(pre+"_hXRecHit", "X position in Chamber of SimHit segment with 4D RecHit (cm)", + hXRecHit=nullptr;hXRecHit = dbe_->book1D(pre+"_hXRecHit", "X position in Chamber of SimHit segment with 4D RecHit (cm)", 100, -200, 200); - hEffVsX = 0; + hEffVsX = nullptr; - hYSimSegm=0;hYSimSegm = dbe_->book1D(pre+"_hYSimSegm", "Y position in Chamber of SimHit segment (cm)", + hYSimSegm=nullptr;hYSimSegm = dbe_->book1D(pre+"_hYSimSegm", "Y position in Chamber of SimHit segment (cm)", 100, -200, 200); - hYRecHit=0;hYRecHit = dbe_->book1D(pre+"_hYRecHit", "Y position in Chamber of SimHit segment with 4D RecHit (cm)", + hYRecHit=nullptr;hYRecHit = dbe_->book1D(pre+"_hYRecHit", "Y position in Chamber of SimHit segment with 4D RecHit (cm)", 100, -200, 200); - hEffVsY = 0; + hEffVsY = nullptr; - hAlphaSimSegm=0;hAlphaSimSegm = dbe_->book1D(pre+"_hAlphaSimSegm", "Alpha of SimHit segment (rad)", + hAlphaSimSegm=nullptr;hAlphaSimSegm = dbe_->book1D(pre+"_hAlphaSimSegm", "Alpha of SimHit segment (rad)", 100, -1.5, 1.5); - hAlphaRecHit=0;hAlphaRecHit = dbe_->book1D(pre+"_hAlphaRecHit", "Alpha of SimHit segment with 4D RecHit (rad)", + hAlphaRecHit=nullptr;hAlphaRecHit = dbe_->book1D(pre+"_hAlphaRecHit", "Alpha of SimHit segment with 4D RecHit (rad)", 100, -1.5, 1.5); - hEffVsAlpha = 0; + hEffVsAlpha = nullptr; - hBetaSimSegm=0;hBetaSimSegm = dbe_->book1D(pre+"_hBetaSimSegm", "Beta of SimHit segment (rad)", + hBetaSimSegm=nullptr;hBetaSimSegm = dbe_->book1D(pre+"_hBetaSimSegm", "Beta of SimHit segment (rad)", 100, -2, 2); - hBetaRecHit=0;hBetaRecHit = dbe_->book1D(pre+"_hBetaRecHit", "Beta of SimHit segment with 4D RecHit (rad)", + hBetaRecHit=nullptr;hBetaRecHit = dbe_->book1D(pre+"_hBetaRecHit", "Beta of SimHit segment with 4D RecHit (rad)", 100, -2, 2); - hEffVsBeta = 0; + hEffVsBeta = nullptr; - hNSeg =0; hNSeg = dbe_->book1D(pre+"_hNSeg", "Number of rec segment per sim seg", + hNSeg =nullptr; hNSeg = dbe_->book1D(pre+"_hNSeg", "Number of rec segment per sim seg", 20, 0, 20); } diff --git a/Validation/DTRecHits/src/DTHitQualityUtils.cc b/Validation/DTRecHits/src/DTHitQualityUtils.cc index 32bcee4afd85d..99d7dc67a9805 100644 --- a/Validation/DTRecHits/src/DTHitQualityUtils.cc +++ b/Validation/DTRecHits/src/DTHitQualityUtils.cc @@ -54,7 +54,7 @@ DTHitQualityUtils::mapMuSimHitsPerWire(const map& si wireAndSimHit++) { const PSimHit* muHit = findMuSimHit((*wireAndSimHit).second); - if(muHit != 0) { + if(muHit != nullptr) { ret[(*wireAndSimHit).first]=(muHit); } } @@ -74,8 +74,8 @@ const PSimHit* DTHitQualityUtils::findMuSimHit(const PSimHitContainer& hits) { if (abs((*hit).particleType())==13) muHits.push_back(&(*hit)); } - if (muHits.size()==0) - return 0; //FIXME: Throw of exception??? + if (muHits.empty()) + return nullptr; //FIXME: Throw of exception??? else if (muHits.size()>1) if(debug) cout << "[DTHitQualityUtils]***WARNING: # muSimHits in a wire = " << muHits.size() << endl; @@ -92,8 +92,8 @@ DTHitQualityUtils::findMuSimSegment(const map& mapWire int inSL = 4; int outLayer = 0; int inLayer = 5; - const PSimHit *inSimHit = 0; - const PSimHit *outSimHit = 0; + const PSimHit *inSimHit = nullptr; + const PSimHit *outSimHit = nullptr; for(map::const_iterator wireAndMuSimHit = mapWireAndMuSimHit.begin(); wireAndMuSimHit != mapWireAndMuSimHit.end(); @@ -129,7 +129,7 @@ DTHitQualityUtils::findMuSimSegment(const map& mapWire } } - if(inSimHit != 0) { + if(inSimHit != nullptr) { if(debug) cout << "Innermost SimHit on SL: " << inSL << " layer: " << inLayer << endl; } else { @@ -137,7 +137,7 @@ DTHitQualityUtils::findMuSimSegment(const map& mapWire abort(); } - if(outSimHit != 0) { + if(outSimHit != nullptr) { if(debug) cout << "Outermost SimHit on SL: " << outSL << " layer: " << outLayer << endl; } else { diff --git a/Validation/EcalClusters/interface/ContainmentCorrectionAnalyzer.h b/Validation/EcalClusters/interface/ContainmentCorrectionAnalyzer.h index 284f4e31d983a..ef28114534c85 100644 --- a/Validation/EcalClusters/interface/ContainmentCorrectionAnalyzer.h +++ b/Validation/EcalClusters/interface/ContainmentCorrectionAnalyzer.h @@ -48,11 +48,11 @@ class EcalSimPhotonMCTruth; class ContainmentCorrectionAnalyzer : public edm::EDAnalyzer { public: explicit ContainmentCorrectionAnalyzer( const edm::ParameterSet& ); - ~ContainmentCorrectionAnalyzer(); + ~ContainmentCorrectionAnalyzer() override; - virtual void analyze( const edm::Event&, const edm::EventSetup& ); - virtual void beginJob(); - virtual void endJob(); + void analyze( const edm::Event&, const edm::EventSetup& ) override; + void beginJob() override; + void endJob() override; private: diff --git a/Validation/EcalClusters/interface/EgammaBasicClusters.h b/Validation/EcalClusters/interface/EgammaBasicClusters.h index 02d833d465e5f..eb27091c759d4 100644 --- a/Validation/EcalClusters/interface/EgammaBasicClusters.h +++ b/Validation/EcalClusters/interface/EgammaBasicClusters.h @@ -25,7 +25,7 @@ class EgammaBasicClusters : public DQMEDAnalyzer { public: explicit EgammaBasicClusters( const edm::ParameterSet& ); - ~EgammaBasicClusters(); + ~EgammaBasicClusters() override; void analyze( const edm::Event&, const edm::EventSetup& ) override; void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override; diff --git a/Validation/EcalClusters/interface/EgammaSuperClusters.h b/Validation/EcalClusters/interface/EgammaSuperClusters.h index d15bde4ded7f4..6295aa41079ec 100644 --- a/Validation/EcalClusters/interface/EgammaSuperClusters.h +++ b/Validation/EcalClusters/interface/EgammaSuperClusters.h @@ -27,7 +27,7 @@ class EgammaSuperClusters : public DQMEDAnalyzer { public: explicit EgammaSuperClusters( const edm::ParameterSet& ); - ~EgammaSuperClusters(); + ~EgammaSuperClusters() override; void analyze( const edm::Event&, const edm::EventSetup& ) override; void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override; diff --git a/Validation/EcalClusters/interface/EnergyScaleAnalyzer.h b/Validation/EcalClusters/interface/EnergyScaleAnalyzer.h index bb3346fa078e7..b519595f04302 100644 --- a/Validation/EcalClusters/interface/EnergyScaleAnalyzer.h +++ b/Validation/EcalClusters/interface/EnergyScaleAnalyzer.h @@ -48,12 +48,12 @@ class TFile; class EnergyScaleAnalyzer : public edm::EDAnalyzer { public: explicit EnergyScaleAnalyzer( const edm::ParameterSet& ); - ~EnergyScaleAnalyzer(); + ~EnergyScaleAnalyzer() override; - virtual void analyze( const edm::Event&, const edm::EventSetup& ); - virtual void beginJob(); - virtual void endJob(); + void analyze( const edm::Event&, const edm::EventSetup& ) override; + void beginJob() override; + void endJob() override; private: diff --git a/Validation/EcalClusters/src/ContainmentCorrectionAnalyzer.cc b/Validation/EcalClusters/src/ContainmentCorrectionAnalyzer.cc index fb5b9f0e69576..2c6e36c7cc151 100644 --- a/Validation/EcalClusters/src/ContainmentCorrectionAnalyzer.cc +++ b/Validation/EcalClusters/src/ContainmentCorrectionAnalyzer.cc @@ -60,7 +60,7 @@ void ContainmentCorrectionAnalyzer::analyze( const Event& evt, const EventSetup& if (SimVtx.isValid()) theSimVertexes.insert(theSimVertexes.end(),SimVtx->begin(),SimVtx->end()); else {LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module; } - const reco::SuperClusterCollection* BarrelSuperClusters = 0; + const reco::SuperClusterCollection* BarrelSuperClusters = nullptr; Handle pHybridBarrelSuperClusters; evt.getByToken(BarrelSuperClusterCollection_, pHybridBarrelSuperClusters); labelsForToken(BarrelSuperClusterCollection_, l); @@ -68,7 +68,7 @@ void ContainmentCorrectionAnalyzer::analyze( const Event& evt, const EventSetup& if (pHybridBarrelSuperClusters.isValid()) { BarrelSuperClusters = pHybridBarrelSuperClusters.product(); } else {LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module; } - const reco::SuperClusterCollection* EndcapSuperClusters = 0; + const reco::SuperClusterCollection* EndcapSuperClusters = nullptr; Handle pMulti5x5EndcapSuperClusters; evt.getByToken(EndcapSuperClusterCollection_, pMulti5x5EndcapSuperClusters); labelsForToken(EndcapSuperClusterCollection_, l); @@ -76,7 +76,7 @@ void ContainmentCorrectionAnalyzer::analyze( const Event& evt, const EventSetup& if (pMulti5x5EndcapSuperClusters.isValid()) EndcapSuperClusters = pMulti5x5EndcapSuperClusters.product(); else {LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module; } - const EcalRecHitCollection *ebRecHits = 0; + const EcalRecHitCollection *ebRecHits = nullptr; Handle< EcalRecHitCollection > pEBRecHits; evt.getByToken( reducedBarrelRecHitCollection_, pEBRecHits ); labelsForToken(reducedBarrelRecHitCollection_, l); @@ -84,7 +84,7 @@ void ContainmentCorrectionAnalyzer::analyze( const Event& evt, const EventSetup& if (pEBRecHits.isValid()) ebRecHits = pEBRecHits.product(); else {LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module; } - const EcalRecHitCollection *eeRecHits = 0; + const EcalRecHitCollection *eeRecHits = nullptr; Handle< EcalRecHitCollection > pEERecHits; evt.getByToken( reducedEndcapRecHitCollection_, pEERecHits ); labelsForToken(reducedEndcapRecHitCollection_, l); @@ -92,7 +92,7 @@ void ContainmentCorrectionAnalyzer::analyze( const Event& evt, const EventSetup& if (pEERecHits.isValid()) eeRecHits = pEERecHits.product(); else {LogError("ContainmentCorrectionAnalyzer") << "Error! can't get collection with label " << l.module; } - const CaloTopology *topology = 0; + const CaloTopology *topology = nullptr; ESHandle pTopology; es.get().get(pTopology); if(pTopology.isValid()) topology = pTopology.product(); @@ -156,7 +156,7 @@ void ContainmentCorrectionAnalyzer::analyze( const Event& evt, const EventSetup& double etaCurrent; // , etaFound = 0; // UNUSED double phiCurrent; // double etCurrent, etFound = 0; // UNUSED - const reco::SuperCluster* nearSC = 0; + const reco::SuperCluster* nearSC = nullptr; double closestParticleDistance = 999; for(reco::SuperClusterCollection::const_iterator aClus = BarrelSuperClusters->begin(); @@ -182,7 +182,7 @@ void ContainmentCorrectionAnalyzer::analyze( const Event& evt, const EventSetup& superClusterEt[nRECOphotons-1]=nearSC->rawEnergy()/std::cosh(nearSC->position().eta()); iMC[nRECOphotons-1]=nMCphotons-1; - reco::CaloClusterPtr theSeed = nearSC->seed(); + const reco::CaloClusterPtr& theSeed = nearSC->seed(); seedXtal[nRECOphotons-1] = EcalClusterTools::getMaximum(*theSeed, ebRecHits).first; e1[nRECOphotons-1] = EcalClusterTools::eMax(*theSeed, ebRecHits); e9[nRECOphotons-1] = EcalClusterTools::e3x3(*theSeed, ebRecHits, topology ); @@ -195,7 +195,7 @@ void ContainmentCorrectionAnalyzer::analyze( const Event& evt, const EventSetup& double etaCurrent; // , etaFound = 0; // UNUSED double phiCurrent; // double etCurrent, etFound = 0; // UNUSED - const reco::SuperCluster* nearSC = 0; + const reco::SuperCluster* nearSC = nullptr; double closestParticleDistance = 999; for(reco::SuperClusterCollection::const_iterator aClus = EndcapSuperClusters->begin(); @@ -222,7 +222,7 @@ void ContainmentCorrectionAnalyzer::analyze( const Event& evt, const EventSetup& superClusterEt[nRECOphotons-1]=(nearSC->rawEnergy() + psEnergy)/std::cosh(nearSC->position().eta()); iMC[nRECOphotons-1]=nMCphotons-1; - reco::CaloClusterPtr theSeed = nearSC->seed(); + const reco::CaloClusterPtr& theSeed = nearSC->seed(); seedXtal[nRECOphotons-1] = EcalClusterTools::getMaximum(*theSeed, eeRecHits).first; e1[nRECOphotons-1] = EcalClusterTools::eMax(*theSeed, eeRecHits) + psEnergy; e9[nRECOphotons-1] = EcalClusterTools::e3x3(*theSeed, eeRecHits, topology ) + psEnergy; @@ -403,13 +403,13 @@ std::vector ContainmentCorrectionAnalyzer::findMcTruth(std } } // loop over the SimTracks - if ( trkFromConversion.size() > 0 ) { + if ( !trkFromConversion.empty() ) { isAconversion=1; nConv++; convInd[iPho]=nConv; int convVtxId = trkFromConversion[0]->vertIndex(); SimVertex convVtx = theSimVertices[convVtxId]; - math::XYZTLorentzVectorD vtxPosition = convVtx.position(); + const math::XYZTLorentzVectorD& vtxPosition = convVtx.position(); // math::XYZTLorentzVectorD momentum = (*iPhoTk)->momentum(); // UNUSED if ( nConv <= 10) { if ( trkFromConversion.size() > 1) { diff --git a/Validation/EcalClusters/src/EgammaBasicClusters.cc b/Validation/EcalClusters/src/EgammaBasicClusters.cc index 52cddf5e5d294..f80b6cf1985c7 100644 --- a/Validation/EcalClusters/src/EgammaBasicClusters.cc +++ b/Validation/EcalClusters/src/EgammaBasicClusters.cc @@ -19,21 +19,21 @@ EgammaBasicClusters::EgammaBasicClusters( const edm::ParameterSet& ps ) : hsEta_(ps, "Eta"), hsPhi_(ps, "Phi"), hsR_(ps, "R"), - hist_EB_BC_Size_(0), - hist_EE_BC_Size_(0), - hist_EB_BC_NumRecHits_(0), - hist_EE_BC_NumRecHits_(0), - hist_EB_BC_ET_(0), - hist_EE_BC_ET_(0), - hist_EB_BC_Eta_(0), - hist_EE_BC_Eta_(0), - hist_EB_BC_Phi_(0), - hist_EE_BC_Phi_(0), - hist_EB_BC_ET_vs_Eta_(0), - hist_EB_BC_ET_vs_Phi_(0), - hist_EE_BC_ET_vs_Eta_(0), - hist_EE_BC_ET_vs_Phi_(0), - hist_EE_BC_ET_vs_R_(0) + hist_EB_BC_Size_(nullptr), + hist_EE_BC_Size_(nullptr), + hist_EB_BC_NumRecHits_(nullptr), + hist_EE_BC_NumRecHits_(nullptr), + hist_EB_BC_ET_(nullptr), + hist_EE_BC_ET_(nullptr), + hist_EB_BC_Eta_(nullptr), + hist_EE_BC_Eta_(nullptr), + hist_EB_BC_Phi_(nullptr), + hist_EE_BC_Phi_(nullptr), + hist_EB_BC_ET_vs_Eta_(nullptr), + hist_EB_BC_ET_vs_Phi_(nullptr), + hist_EE_BC_ET_vs_Eta_(nullptr), + hist_EE_BC_ET_vs_Phi_(nullptr), + hist_EE_BC_ET_vs_R_(nullptr) { } diff --git a/Validation/EcalClusters/src/EgammaSuperClusters.cc b/Validation/EcalClusters/src/EgammaSuperClusters.cc index 8bbc9c58c13db..d2543b66e36e4 100644 --- a/Validation/EcalClusters/src/EgammaSuperClusters.cc +++ b/Validation/EcalClusters/src/EgammaSuperClusters.cc @@ -37,62 +37,62 @@ EgammaSuperClusters::EgammaSuperClusters( const edm::ParameterSet& ps ) : hsetaWidth_(ps, "etaWidth"), hspreshowerE_(ps, "preshowerE"), hsR_(ps, "R"), - hist_EB_RawSC_Size_(0), - hist_EE_RawSC_Size_(0), - hist_EB_CorSC_Size_(0), - hist_EE_CorSC_Size_(0), - hist_EE_PreSC_Size_(0), - hist_EB_RawSC_NumBC_(0), - hist_EE_RawSC_NumBC_(0), - hist_EB_CorSC_NumBC_(0), - hist_EE_CorSC_NumBC_(0), - hist_EE_PreSC_NumBC_(0), - hist_EB_RawSC_ET_(0), - hist_EE_RawSC_ET_(0), - hist_EB_CorSC_ET_(0), - hist_EE_CorSC_ET_(0), - hist_EE_PreSC_ET_(0), - hist_EB_RawSC_Eta_(0), - hist_EE_RawSC_Eta_(0), - hist_EB_CorSC_Eta_(0), - hist_EE_CorSC_Eta_(0), - hist_EE_PreSC_Eta_(0), - hist_EB_RawSC_Phi_(0), - hist_EE_RawSC_Phi_(0), - hist_EB_CorSC_Phi_(0), - hist_EE_CorSC_Phi_(0), - hist_EE_PreSC_Phi_(0), - hist_EB_RawSC_S1toS9_(0), - hist_EE_RawSC_S1toS9_(0), - hist_EB_CorSC_S1toS9_(0), - hist_EE_CorSC_S1toS9_(0), - hist_EE_PreSC_S1toS9_(0), - hist_EB_RawSC_S25toE_(0), - hist_EE_RawSC_S25toE_(0), - hist_EB_CorSC_S25toE_(0), - hist_EE_CorSC_S25toE_(0), - hist_EE_PreSC_S25toE_(0), - hist_EB_RawSC_EoverTruth_(0), - hist_EE_RawSC_EoverTruth_(0), - hist_EB_CorSC_EoverTruth_(0), - hist_EE_CorSC_EoverTruth_(0), - hist_EE_PreSC_EoverTruth_(0), - hist_EB_RawSC_deltaR_(0), - hist_EE_RawSC_deltaR_(0), - hist_EB_CorSC_deltaR_(0), - hist_EE_CorSC_deltaR_(0), - hist_EE_PreSC_deltaR_(0), - hist_EE_PreSC_preshowerE_(0), - hist_EE_CorSC_preshowerE_(0), - hist_EE_CorSC_phiWidth_(0), - hist_EB_CorSC_phiWidth_(0), - hist_EE_CorSC_etaWidth_(0), - hist_EB_CorSC_etaWidth_(0), - hist_EB_CorSC_ET_vs_Eta_(0), - hist_EB_CorSC_ET_vs_Phi_(0), - hist_EE_CorSC_ET_vs_Eta_(0), - hist_EE_CorSC_ET_vs_Phi_(0), - hist_EE_CorSC_ET_vs_R_(0) + hist_EB_RawSC_Size_(nullptr), + hist_EE_RawSC_Size_(nullptr), + hist_EB_CorSC_Size_(nullptr), + hist_EE_CorSC_Size_(nullptr), + hist_EE_PreSC_Size_(nullptr), + hist_EB_RawSC_NumBC_(nullptr), + hist_EE_RawSC_NumBC_(nullptr), + hist_EB_CorSC_NumBC_(nullptr), + hist_EE_CorSC_NumBC_(nullptr), + hist_EE_PreSC_NumBC_(nullptr), + hist_EB_RawSC_ET_(nullptr), + hist_EE_RawSC_ET_(nullptr), + hist_EB_CorSC_ET_(nullptr), + hist_EE_CorSC_ET_(nullptr), + hist_EE_PreSC_ET_(nullptr), + hist_EB_RawSC_Eta_(nullptr), + hist_EE_RawSC_Eta_(nullptr), + hist_EB_CorSC_Eta_(nullptr), + hist_EE_CorSC_Eta_(nullptr), + hist_EE_PreSC_Eta_(nullptr), + hist_EB_RawSC_Phi_(nullptr), + hist_EE_RawSC_Phi_(nullptr), + hist_EB_CorSC_Phi_(nullptr), + hist_EE_CorSC_Phi_(nullptr), + hist_EE_PreSC_Phi_(nullptr), + hist_EB_RawSC_S1toS9_(nullptr), + hist_EE_RawSC_S1toS9_(nullptr), + hist_EB_CorSC_S1toS9_(nullptr), + hist_EE_CorSC_S1toS9_(nullptr), + hist_EE_PreSC_S1toS9_(nullptr), + hist_EB_RawSC_S25toE_(nullptr), + hist_EE_RawSC_S25toE_(nullptr), + hist_EB_CorSC_S25toE_(nullptr), + hist_EE_CorSC_S25toE_(nullptr), + hist_EE_PreSC_S25toE_(nullptr), + hist_EB_RawSC_EoverTruth_(nullptr), + hist_EE_RawSC_EoverTruth_(nullptr), + hist_EB_CorSC_EoverTruth_(nullptr), + hist_EE_CorSC_EoverTruth_(nullptr), + hist_EE_PreSC_EoverTruth_(nullptr), + hist_EB_RawSC_deltaR_(nullptr), + hist_EE_RawSC_deltaR_(nullptr), + hist_EB_CorSC_deltaR_(nullptr), + hist_EE_CorSC_deltaR_(nullptr), + hist_EE_PreSC_deltaR_(nullptr), + hist_EE_PreSC_preshowerE_(nullptr), + hist_EE_CorSC_preshowerE_(nullptr), + hist_EE_CorSC_phiWidth_(nullptr), + hist_EB_CorSC_phiWidth_(nullptr), + hist_EE_CorSC_etaWidth_(nullptr), + hist_EB_CorSC_etaWidth_(nullptr), + hist_EB_CorSC_ET_vs_Eta_(nullptr), + hist_EB_CorSC_ET_vs_Phi_(nullptr), + hist_EE_CorSC_ET_vs_Eta_(nullptr), + hist_EE_CorSC_ET_vs_Phi_(nullptr), + hist_EE_CorSC_ET_vs_R_(nullptr) { } diff --git a/Validation/EcalDigis/interface/EcalBarrelDigisValidation.h b/Validation/EcalDigis/interface/EcalBarrelDigisValidation.h index eccd3f91d88bf..113a7b698f5c1 100644 --- a/Validation/EcalDigis/interface/EcalBarrelDigisValidation.h +++ b/Validation/EcalDigis/interface/EcalBarrelDigisValidation.h @@ -43,7 +43,7 @@ class EcalBarrelDigisValidation: public DQMEDAnalyzer{ EcalBarrelDigisValidation(const edm::ParameterSet& ps); /// Destructor -~EcalBarrelDigisValidation(); +~EcalBarrelDigisValidation() override; void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; diff --git a/Validation/EcalDigis/interface/EcalDigisValidation.h b/Validation/EcalDigis/interface/EcalDigisValidation.h index 3bd87b4f98210..22b92ca533931 100644 --- a/Validation/EcalDigis/interface/EcalDigisValidation.h +++ b/Validation/EcalDigis/interface/EcalDigisValidation.h @@ -55,7 +55,7 @@ class EcalDigisValidation: public DQMEDAnalyzer{ EcalDigisValidation(const edm::ParameterSet& ps); /// Destructor -~EcalDigisValidation(); +~EcalDigisValidation() override; void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; diff --git a/Validation/EcalDigis/interface/EcalEndcapDigisValidation.h b/Validation/EcalDigis/interface/EcalEndcapDigisValidation.h index 2f490f8179d97..8c5b9b1b50750 100644 --- a/Validation/EcalDigis/interface/EcalEndcapDigisValidation.h +++ b/Validation/EcalDigis/interface/EcalEndcapDigisValidation.h @@ -42,10 +42,10 @@ class EcalEndcapDigisValidation: public DQMEDAnalyzer{ EcalEndcapDigisValidation(const edm::ParameterSet& ps); /// Destructor -~EcalEndcapDigisValidation(); +~EcalEndcapDigisValidation() override; -virtual void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override; -virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; +void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override; +void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; protected: diff --git a/Validation/EcalDigis/interface/EcalMixingModuleValidation.h b/Validation/EcalDigis/interface/EcalMixingModuleValidation.h index ff7d444052c7c..2b64a6c41bf07 100644 --- a/Validation/EcalDigis/interface/EcalMixingModuleValidation.h +++ b/Validation/EcalDigis/interface/EcalMixingModuleValidation.h @@ -82,7 +82,7 @@ class EcalMixingModuleValidation: public DQMEDAnalyzer{ EcalMixingModuleValidation(const edm::ParameterSet& ps); /// Destructor -~EcalMixingModuleValidation(); +~EcalMixingModuleValidation() override; void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; diff --git a/Validation/EcalDigis/interface/EcalSelectiveReadoutValidation.h b/Validation/EcalDigis/interface/EcalSelectiveReadoutValidation.h index b123eeb3e1af8..1817a570afa1d 100644 --- a/Validation/EcalDigis/interface/EcalSelectiveReadoutValidation.h +++ b/Validation/EcalDigis/interface/EcalSelectiveReadoutValidation.h @@ -42,7 +42,7 @@ class EcalSelectiveReadoutValidation: public DQMEDAnalyzer{ EcalSelectiveReadoutValidation(const edm::ParameterSet& ps); /// Destructor - ~EcalSelectiveReadoutValidation(); + ~EcalSelectiveReadoutValidation() override; void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override; void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; @@ -316,7 +316,7 @@ class EcalSelectiveReadoutValidation: public DQMEDAnalyzer{ static int dccZsFIR(const EcalDataFrame& frame, const std::vector& firWeights, int firstFIRSample, - bool* saturated = 0); + bool* saturated = nullptr); /** Computes the ZS FIR filter weights from the normalized weights. diff --git a/Validation/EcalDigis/src/EcalBarrelDigisValidation.cc b/Validation/EcalDigis/src/EcalBarrelDigisValidation.cc index 3a684abdd67f9..1609672799b44 100644 --- a/Validation/EcalDigis/src/EcalBarrelDigisValidation.cc +++ b/Validation/EcalDigis/src/EcalBarrelDigisValidation.cc @@ -31,28 +31,28 @@ EcalBarrelDigisValidation::EcalBarrelDigisValidation(const ParameterSet& ps): barrelADCtoGeV_ = 0.035; endcapADCtoGeV_ = 0.06; - meEBDigiOccupancy_ = 0; + meEBDigiOccupancy_ = nullptr; - meEBDigiMultiplicity_ = 0; + meEBDigiMultiplicity_ = nullptr; - meEBDigiADCGlobal_ = 0; + meEBDigiADCGlobal_ = nullptr; for (int i = 0; i < 10 ; i++ ) { - meEBDigiADCAnalog_[i] = 0; - meEBDigiADCgS_[i] = 0; - meEBDigiADCg1_[i] = 0; - meEBDigiADCg6_[i] = 0; - meEBDigiADCg12_[i] = 0; - meEBDigiGain_[i] = 0; + meEBDigiADCAnalog_[i] = nullptr; + meEBDigiADCgS_[i] = nullptr; + meEBDigiADCg1_[i] = nullptr; + meEBDigiADCg6_[i] = nullptr; + meEBDigiADCg12_[i] = nullptr; + meEBDigiGain_[i] = nullptr; } - meEBPedestal_ = 0; + meEBPedestal_ = nullptr; - meEBMaximumgt100ADC_ = 0; + meEBMaximumgt100ADC_ = nullptr; - meEBMaximumgt10ADC_ = 0; + meEBMaximumgt10ADC_ = nullptr; - meEBnADCafterSwitch_ = 0; + meEBnADCafterSwitch_ = nullptr; } diff --git a/Validation/EcalDigis/src/EcalDigisValidation.cc b/Validation/EcalDigis/src/EcalDigisValidation.cc index 2b38603cd3558..36de6ea7fcdbb 100644 --- a/Validation/EcalDigis/src/EcalDigisValidation.cc +++ b/Validation/EcalDigis/src/EcalDigisValidation.cc @@ -38,7 +38,7 @@ EcalDigisValidation::EcalDigisValidation(const edm::ParameterSet& ps): // DQM ROOT output outputFile_ = ps.getUntrackedParameter("outputFile", ""); - if ( outputFile_.size() != 0 ) { + if ( !outputFile_.empty() ) { edm::LogInfo("OutputInfo") << " Ecal Digi Task histograms will be saved to '" << outputFile_.c_str() << "'"; } else { edm::LogInfo("OutputInfo") << " Ecal Digi Task histograms will NOT be saved"; @@ -54,18 +54,18 @@ EcalDigisValidation::EcalDigisValidation(const edm::ParameterSet& ps): barrelADCtoGeV_ = 0.035; endcapADCtoGeV_ = 0.06; - meGunEnergy_ = 0; - meGunEta_ = 0; - meGunPhi_ = 0; + meGunEnergy_ = nullptr; + meGunEta_ = nullptr; + meGunPhi_ = nullptr; - meEBDigiSimRatio_ = 0; - meEEDigiSimRatio_ = 0; + meEBDigiSimRatio_ = nullptr; + meEEDigiSimRatio_ = nullptr; - meEBDigiSimRatiogt10ADC_ = 0; - meEEDigiSimRatiogt20ADC_ = 0; + meEBDigiSimRatiogt10ADC_ = nullptr; + meEEDigiSimRatiogt20ADC_ = nullptr; - meEBDigiSimRatiogt100ADC_ = 0; - meEEDigiSimRatiogt100ADC_ = 0; + meEBDigiSimRatiogt100ADC_ = nullptr; + meEEDigiSimRatiogt100ADC_ = nullptr; } @@ -135,16 +135,16 @@ void EcalDigisValidation::analyze(edm::Event const & e, edm::EventSetup const & e.getByToken( g4TkInfoToken_, SimTk ); e.getByToken( g4VtxInfoToken_, SimVtx ); - const EBDigiCollection* EBdigis =0; - const EEDigiCollection* EEdigis =0; - const ESDigiCollection* ESdigis =0; + const EBDigiCollection* EBdigis =nullptr; + const EEDigiCollection* EEdigis =nullptr; + const ESDigiCollection* ESdigis =nullptr; bool isBarrel = true; e.getByToken( EBdigiCollectionToken_, EcalDigiEB ); if (EcalDigiEB.isValid()) { EBdigis = EcalDigiEB.product(); LogDebug("DigiInfo") << "total # EBdigis: " << EBdigis->size() ; - if ( EBdigis->size() == 0 ) isBarrel = false; + if ( EBdigis->empty() ) isBarrel = false; } else { isBarrel = false; } @@ -154,7 +154,7 @@ void EcalDigisValidation::analyze(edm::Event const & e, edm::EventSetup const & if (EcalDigiEE.isValid()) { EEdigis = EcalDigiEE.product(); LogDebug("DigiInfo") << "total # EEdigis: " << EEdigis->size() ; - if ( EEdigis->size() == 0 ) isEndcap = false; + if ( EEdigis->empty() ) isEndcap = false; } else { isEndcap = false; } @@ -164,7 +164,7 @@ void EcalDigisValidation::analyze(edm::Event const & e, edm::EventSetup const & if (EcalDigiES.isValid()) { ESdigis = EcalDigiES.product(); LogDebug("DigiInfo") << "total # ESdigis: " << ESdigis->size() ; - if ( ESdigis->size() == 0 ) isPreshower = false; + if ( ESdigis->empty() ) isPreshower = false; } else { isPreshower = false; } diff --git a/Validation/EcalDigis/src/EcalEndcapDigisValidation.cc b/Validation/EcalDigis/src/EcalEndcapDigisValidation.cc index b471e06e40be7..bc8d271dd4315 100644 --- a/Validation/EcalDigis/src/EcalEndcapDigisValidation.cc +++ b/Validation/EcalDigis/src/EcalEndcapDigisValidation.cc @@ -26,30 +26,30 @@ EcalEndcapDigisValidation::EcalEndcapDigisValidation(const ParameterSet& ps): barrelADCtoGeV_ = 0.035; endcapADCtoGeV_ = 0.06; - meEEDigiOccupancyzp_ = 0; - meEEDigiOccupancyzm_ = 0; + meEEDigiOccupancyzp_ = nullptr; + meEEDigiOccupancyzm_ = nullptr; - meEEDigiMultiplicityzp_ = 0; - meEEDigiMultiplicityzm_ = 0; + meEEDigiMultiplicityzp_ = nullptr; + meEEDigiMultiplicityzm_ = nullptr; - meEEDigiADCGlobal_ = 0; + meEEDigiADCGlobal_ = nullptr; for (int i = 0; i < 10 ; i++ ) { - meEEDigiADCAnalog_[i] = 0; - meEEDigiADCgS_[i] = 0; - meEEDigiADCg1_[i] = 0; - meEEDigiADCg6_[i] = 0; - meEEDigiADCg12_[i] = 0; - meEEDigiGain_[i] = 0; + meEEDigiADCAnalog_[i] = nullptr; + meEEDigiADCgS_[i] = nullptr; + meEEDigiADCg1_[i] = nullptr; + meEEDigiADCg6_[i] = nullptr; + meEEDigiADCg12_[i] = nullptr; + meEEDigiGain_[i] = nullptr; } - meEEPedestal_ = 0; + meEEPedestal_ = nullptr; - meEEMaximumgt100ADC_ = 0; + meEEMaximumgt100ADC_ = nullptr; - meEEMaximumgt20ADC_ = 0; + meEEMaximumgt20ADC_ = nullptr; - meEEnADCafterSwitch_ = 0; + meEEnADCafterSwitch_ = nullptr; } diff --git a/Validation/EcalDigis/src/EcalMixingModuleValidation.cc b/Validation/EcalDigis/src/EcalMixingModuleValidation.cc index 6b48222ae8f0a..86f2c97d75f66 100644 --- a/Validation/EcalDigis/src/EcalMixingModuleValidation.cc +++ b/Validation/EcalDigis/src/EcalMixingModuleValidation.cc @@ -105,29 +105,29 @@ EcalMixingModuleValidation::EcalMixingModuleValidation(const edm::ParameterSet& barrelADCtoGeV_ = 0.035; endcapADCtoGeV_ = 0.06; - meEBDigiMixRatiogt100ADC_ = 0; - meEEDigiMixRatiogt100ADC_ = 0; + meEBDigiMixRatiogt100ADC_ = nullptr; + meEEDigiMixRatiogt100ADC_ = nullptr; - meEBDigiMixRatioOriggt50pc_ = 0; - meEEDigiMixRatioOriggt40pc_ = 0; + meEBDigiMixRatioOriggt50pc_ = nullptr; + meEEDigiMixRatioOriggt40pc_ = nullptr; - meEBbunchCrossing_ = 0; - meEEbunchCrossing_ = 0; - meESbunchCrossing_ = 0; + meEBbunchCrossing_ = nullptr; + meEEbunchCrossing_ = nullptr; + meESbunchCrossing_ = nullptr; for ( int i = 0 ; i < nBunch ; i++ ) { - meEBBunchShape_[i] = 0; - meEEBunchShape_[i] = 0; - meESBunchShape_[i] = 0; + meEBBunchShape_[i] = nullptr; + meEEBunchShape_[i] = nullptr; + meESBunchShape_[i] = nullptr; } - meEBShape_ = 0; - meEEShape_ = 0; - meESShape_ = 0; + meEBShape_ = nullptr; + meEEShape_ = nullptr; + meESShape_ = nullptr; - meEBShapeRatio_ = 0; - meEEShapeRatio_ = 0; - meESShapeRatio_ = 0; + meEBShapeRatio_ = nullptr; + meEEShapeRatio_ = nullptr; + meESShapeRatio_ = nullptr; } @@ -303,16 +303,16 @@ void EcalMixingModuleValidation::analyze(edm::Event const & e, edm::EventSetup c e.getByToken( HepMCToken_, MCEvt ); if (!MCEvt.isValid()) { skipMC = true; } - const EBDigiCollection* EBdigis =0; - const EEDigiCollection* EEdigis =0; - const ESDigiCollection* ESdigis =0; + const EBDigiCollection* EBdigis =nullptr; + const EEDigiCollection* EEdigis =nullptr; + const ESDigiCollection* ESdigis =nullptr; bool isBarrel = true; e.getByToken( EBdigiCollectionToken_, EcalDigiEB ); if (EcalDigiEB.isValid()) { EBdigis = EcalDigiEB.product(); LogDebug("DigiInfo") << "total # EBdigis: " << EBdigis->size() ; - if ( EBdigis->size() == 0 ) isBarrel = false; + if ( EBdigis->empty() ) isBarrel = false; } else { isBarrel = false; } @@ -322,7 +322,7 @@ void EcalMixingModuleValidation::analyze(edm::Event const & e, edm::EventSetup c if (EcalDigiEE.isValid()) { EEdigis = EcalDigiEE.product(); LogDebug("DigiInfo") << "total # EEdigis: " << EEdigis->size() ; - if ( EEdigis->size() == 0 ) isEndcap = false; + if ( EEdigis->empty() ) isEndcap = false; } else { isEndcap = false; } @@ -332,7 +332,7 @@ void EcalMixingModuleValidation::analyze(edm::Event const & e, edm::EventSetup c if (EcalDigiES.isValid()) { ESdigis = EcalDigiES.product(); LogDebug("DigiInfo") << "total # ESdigis: " << ESdigis->size() ; - if ( ESdigis->size() == 0 ) isPreshower = false; + if ( ESdigis->empty() ) isPreshower = false; } else { isPreshower = false; } diff --git a/Validation/EcalDigis/src/EcalPreshowerDigisValidation.cc b/Validation/EcalDigis/src/EcalPreshowerDigisValidation.cc index a8adf5feec625..6536a84fd52b3 100644 --- a/Validation/EcalDigis/src/EcalPreshowerDigisValidation.cc +++ b/Validation/EcalDigis/src/EcalPreshowerDigisValidation.cc @@ -14,10 +14,10 @@ EcalPreshowerDigisValidation::EcalPreshowerDigisValidation(const edm::ParameterS // verbosity switch verbose_ = ps.getUntrackedParameter("verbose", false); - meESDigiMultiplicity_=0; + meESDigiMultiplicity_=nullptr; for (int i = 0; i < 3 ; i++ ) { - meESDigiADC_[i] = 0; + meESDigiADC_[i] = nullptr; } } diff --git a/Validation/EcalDigis/src/EcalPreshowerNoiseDistrib.cc b/Validation/EcalDigis/src/EcalPreshowerNoiseDistrib.cc index f5d8e147ccec2..f24eb9896abb3 100644 --- a/Validation/EcalDigis/src/EcalPreshowerNoiseDistrib.cc +++ b/Validation/EcalDigis/src/EcalPreshowerNoiseDistrib.cc @@ -13,8 +13,8 @@ EcalPreshowerNoiseDistrib::EcalPreshowerNoiseDistrib(const edm::ParameterSet& ps verbose_ = ps.getUntrackedParameter("verbose", false); // histos - meESDigiMultiplicity_=0; - for (int ii=0; ii<3; ii++ ) { meESDigiADC_[ii] = 0; } + meESDigiMultiplicity_=nullptr; + for (int ii=0; ii<3; ii++ ) { meESDigiADC_[ii] = nullptr; } } diff --git a/Validation/EcalDigis/src/EcalSelectiveReadoutValidation.cc b/Validation/EcalDigis/src/EcalSelectiveReadoutValidation.cc index f58a0da98da4a..4362652c02304 100644 --- a/Validation/EcalDigis/src/EcalSelectiveReadoutValidation.cc +++ b/Validation/EcalDigis/src/EcalSelectiveReadoutValidation.cc @@ -87,7 +87,7 @@ EcalSelectiveReadoutValidation::EcalSelectiveReadoutValidation(const ParameterSe tmin(numeric_limits::max()), l1aOfTmin(0), l1aOfTmax(0), - triggerTowerMap_(0), + triggerTowerMap_(nullptr), localReco_(ps.getParameter("LocalReco")), weights_(ps.getParameter >("weights")), tpInGeV_(ps.getParameter("tpInGeV")), @@ -125,12 +125,12 @@ EcalSelectiveReadoutValidation::EcalSelectiveReadoutValidation(const ParameterSe //File to log SRP algorithem inconsistency srpAlgoErrorLogFileName_ = ps.getUntrackedParameter("srpAlgoErrorLogFile",""); - logSrpAlgoErrors_ = (srpAlgoErrorLogFileName_.size()!=0); + logSrpAlgoErrors_ = (!srpAlgoErrorLogFileName_.empty()); //File to log SRP decision application inconsistency srApplicationErrorLogFileName_ = ps.getUntrackedParameter("srApplicationErrorLogFile",""); - logSrApplicationErrors_ = (srApplicationErrorLogFileName_.size()!=0); + logSrApplicationErrors_ = (!srApplicationErrorLogFileName_.empty()); //FIR ZS weights configFirWeights(ps.getParameter >("dccWeights")); @@ -138,7 +138,7 @@ EcalSelectiveReadoutValidation::EcalSelectiveReadoutValidation(const ParameterSe // DQM ROOT output outputFile_ = ps.getUntrackedParameter("outputFile", ""); - if(outputFile_.size() != 0){ + if(!outputFile_.empty()){ LogInfo("OutputInfo") << " Ecal Digi Task histograms will be saved to '" << outputFile_.c_str() << "'"; } else{ @@ -194,8 +194,8 @@ void EcalSelectiveReadoutValidation::analyze(Event const & event, //retrieves event products: readAllCollections(event); - withEeSimHit_ = (eeSimHits_->size()!=0); - withEbSimHit_ = (ebSimHits_->size()!=0); + withEeSimHit_ = (!eeSimHits_->empty()); + withEbSimHit_ = (!ebSimHits_->empty()); if(ievt_<10){ edm::LogInfo("EcalSrValid") << "Size of TP collection: " << tps_->size() << std::endl @@ -244,10 +244,10 @@ void EcalSelectiveReadoutValidation::analyze(Event const & event, //TP analyzeTP(event, es); - if(ebComputedSrFlags_->size()){ + if(!ebComputedSrFlags_->empty()){ compareSrfColl(event, *ebSrFlags_, *ebComputedSrFlags_); } - if(eeComputedSrFlags_->size()){ + if(!eeComputedSrFlags_->empty()){ compareSrfColl(event, *eeSrFlags_, *eeComputedSrFlags_); } nDroppedFRO_ = 0; @@ -418,9 +418,9 @@ void EcalSelectiveReadoutValidation::analyzeEE(const edm::Event& event, } if(highInterest){ - fill(meEeHiZsFir_, dccZsFIR(frame, firWeights_, firstFIRSample_, 0)); + fill(meEeHiZsFir_, dccZsFIR(frame, firWeights_, firstFIRSample_, nullptr)); } else{ - int v = dccZsFIR(frame, firWeights_, firstFIRSample_, 0); + int v = dccZsFIR(frame, firWeights_, firstFIRSample_, nullptr); fill(meEeLiZsFir_, v); if(v < eeZsThr_){ eventError = true; @@ -684,9 +684,9 @@ EcalSelectiveReadoutValidation::analyzeEB(const edm::Event& event, if(highInterest){ - fill(meEbHiZsFir_, dccZsFIR(frame, firWeights_, firstFIRSample_, 0)); + fill(meEbHiZsFir_, dccZsFIR(frame, firWeights_, firstFIRSample_, nullptr)); } else{ - int v = dccZsFIR(frame, firWeights_, firstFIRSample_, 0); + int v = dccZsFIR(frame, firWeights_, firstFIRSample_, nullptr); fill(meEbLiZsFir_, v); if(v < ebZsThr_){ eventError = true; @@ -925,7 +925,7 @@ void EcalSelectiveReadoutValidation::bookHistograms(DQMStore::IBooker &ibooker, title = string("Trigger primitive TT E_{T};E_{T} ") + tpUnit + string(";Event Count"); meTp_ = bookProfile(ibooker, "hTp", //"EcalTriggerPrimitiveEt", - title.c_str(), + title, (tpInGeV_?100:40), 0., (tpInGeV_?10.:40.)); meTtf_ = bookProfile(ibooker, "hTtf", //"EcalTriggerTowerFlag", @@ -935,7 +935,7 @@ void EcalSelectiveReadoutValidation::bookHistograms(DQMStore::IBooker &ibooker, title = string("Trigger tower flag vs TP;E_{T}(TT) (") + tpUnit + string(");Flag number"); meTtfVsTp_ = book2D(ibooker, "h2TtfVsTp", - title.c_str(), + title, 100, 0., (tpInGeV_?10.:40.), 8, -.5, 7.5); @@ -950,7 +950,7 @@ void EcalSelectiveReadoutValidation::bookHistograms(DQMStore::IBooker &ibooker, "E_{T} (TP) (") + tpUnit + string (")"); meTpVsEtSum_ = book2D(ibooker, "h2TpVsEtSum", - title.c_str(), + title, 100, 0., 10., 100, 0., (tpInGeV_?10.:40.)); @@ -959,7 +959,7 @@ void EcalSelectiveReadoutValidation::bookHistograms(DQMStore::IBooker &ibooker, "iPhi;" "E_{T} (TP) (") + tpUnit + string (")"); meTpMap_ = bookProfile2D(ibooker, "h2Tp", - title.c_str(), + title, 57, -28.5, 28.5, 72, .5, 72.5); @@ -1221,14 +1221,14 @@ void EcalSelectiveReadoutValidation::bookHistograms(DQMStore::IBooker &ibooker, buf << "Number of LI EB channels below the " << ebZsThr_/4. << " ADC count ZS threshold;" "Channel count;Event count", meEbZsErrCnt_ = book1D(ibooker, "hEbZsErrCnt", - buf.str().c_str(), + buf.str(), 200, -.5, 199.5); buf.str(""); buf << "Number of LI EE channels below the " << eeZsThr_/4. << " ADC count ZS theshold;" "Channel count;Event count", meEeZsErrCnt_ = book1D(ibooker, "hEeZsErrCnt", - buf.str().c_str(), + buf.str(), 200, -.5, 199.5); meZsErrCnt_ = book1D(ibooker, "hZsErrCnt", @@ -1292,10 +1292,10 @@ void EcalSelectiveReadoutValidation::bookHistograms(DQMStore::IBooker &ibooker, ++it){ if(*it!=string("all") && availableHistList_.find(*it)==availableHistList_.end()){ - s << (s.str().size()==0?"":", ") << *it; + s << (s.str().empty()?"":", ") << *it; } } - if(s.str().size()!=0){ + if(!s.str().empty()){ LogWarning("Configuration") << "Parameter 'histList' contains some unknown histogram(s). " "Check spelling. Following name were not found: " @@ -1707,7 +1707,7 @@ EcalSelectiveReadoutValidation::readOutUnitOf(const EEDetId& xtalId) const{ int iDccChan = EcalElecId.towerId(); const bool ignoreSingle = true; const vector id = elecMap_->getEcalScDetId(iDCC, iDccChan, ignoreSingle); - return id.size()>0?id[0]:EcalScDetId(); + return !id.empty()?id[0]:EcalScDetId(); } void @@ -1715,9 +1715,9 @@ EcalSelectiveReadoutValidation::setTtEtSums(const edm::EventSetup& es, const EBDigiCollection& ebDigis, const EEDigiCollection& eeDigis){ //ecal geometry: - static const CaloSubdetectorGeometry* eeGeometry = 0; - static const CaloSubdetectorGeometry* ebGeometry = 0; - if(eeGeometry==0 || ebGeometry==0){ + static const CaloSubdetectorGeometry* eeGeometry = nullptr; + static const CaloSubdetectorGeometry* ebGeometry = nullptr; + if(eeGeometry==nullptr || ebGeometry==nullptr){ edm::ESHandle geoHandle; es.get().get(geoHandle); eeGeometry @@ -1830,9 +1830,9 @@ double EcalSelectiveReadoutValidation::frame2EnergyForTp(const T& frame, } MonitorElement* EcalSelectiveReadoutValidation::bookFloat(DQMStore::IBooker& ibook, const std::string& name){ - if(!registerHist(name, "")) return 0; //this histo is disabled + if(!registerHist(name, "")) return nullptr; //this histo is disabled MonitorElement* result = ibook.bookFloat(name); - if(result==0){ + if(result==nullptr){ throw cms::Exception("DQM") << "Failed to book integer DQM monitor element" << name; } @@ -1841,9 +1841,9 @@ MonitorElement* EcalSelectiveReadoutValidation::bookFloat(DQMStore::IBooker& ibo MonitorElement* EcalSelectiveReadoutValidation::book1D(DQMStore::IBooker& ibook, const std::string& name, const std::string& title, int nbins, double xmin, double xmax){ - if(!registerHist(name, title)) return 0; //this histo is disabled + if(!registerHist(name, title)) return nullptr; //this histo is disabled MonitorElement* result = ibook.book1D(name, title, nbins, xmin, xmax); - if(result==0){ + if(result==nullptr){ throw cms::Exception("Histo") << "Failed to book histogram " << name; } @@ -1851,10 +1851,10 @@ MonitorElement* EcalSelectiveReadoutValidation::book1D(DQMStore::IBooker& ibook, } MonitorElement* EcalSelectiveReadoutValidation::book2D(DQMStore::IBooker& ibook, const std::string& name, const std::string& title, int nxbins, double xmin, double xmax, int nybins, double ymin, double ymax){ - if(!registerHist(name, title)) return 0; //this histo is disabled + if(!registerHist(name, title)) return nullptr; //this histo is disabled MonitorElement* result = ibook.book2D(name, title, nxbins, xmin, xmax, nybins, ymin, ymax); - if(result==0){ + if(result==nullptr){ throw cms::Exception("Histo") << "Failed to book histogram " << name; } @@ -1862,10 +1862,10 @@ MonitorElement* EcalSelectiveReadoutValidation::book2D(DQMStore::IBooker& ibook, } MonitorElement* EcalSelectiveReadoutValidation::bookProfile(DQMStore::IBooker& ibook, const std::string& name, const std::string& title, int nbins, double xmin, double xmax){ - if(!registerHist(name, title)) return 0; //this histo is disabled + if(!registerHist(name, title)) return nullptr; //this histo is disabled MonitorElement* result = ibook.bookProfile(name, title, nbins, xmin, xmax, 0, 0, 0); - if(result==0){ + if(result==nullptr){ throw cms::Exception("Histo") << "Failed to book histogram " << name; } @@ -1873,7 +1873,7 @@ MonitorElement* EcalSelectiveReadoutValidation::bookProfile(DQMStore::IBooker& i } MonitorElement* EcalSelectiveReadoutValidation::bookProfile2D(DQMStore::IBooker& ibook, const std::string& name, const std::string& title, int nbinx, double xmin, double xmax, int nbiny, double ymin, double ymax, const char* option){ - if(!registerHist(name, title)) return 0; //this histo is disabled + if(!registerHist(name, title)) return nullptr; //this histo is disabled MonitorElement* result = ibook.bookProfile2D(name, title, @@ -1881,7 +1881,7 @@ MonitorElement* EcalSelectiveReadoutValidation::bookProfile2D(DQMStore::IBooker& nbiny, ymin, ymax, 0, 0, 0, option); - if(result==0){ + if(result==nullptr){ throw cms::Exception("Histo") << "Failed to book histogram " << name; } diff --git a/Validation/EcalHits/interface/EcalBarrelSimHitsValidation.h b/Validation/EcalHits/interface/EcalBarrelSimHitsValidation.h index 696e594db133b..3d0fa7250f296 100644 --- a/Validation/EcalHits/interface/EcalBarrelSimHitsValidation.h +++ b/Validation/EcalHits/interface/EcalBarrelSimHitsValidation.h @@ -43,18 +43,18 @@ class EcalBarrelSimHitsValidation: public edm::EDAnalyzer{ EcalBarrelSimHitsValidation(const edm::ParameterSet& ps); /// Destructor -~EcalBarrelSimHitsValidation(); +~EcalBarrelSimHitsValidation() override; protected: /// Analyze -void analyze(const edm::Event& e, const edm::EventSetup& c); +void analyze(const edm::Event& e, const edm::EventSetup& c) override; // BeginJob -void beginJob(); +void beginJob() override; // EndJob -void endJob(void); +void endJob(void) override; private: diff --git a/Validation/EcalHits/interface/EcalEndcapSimHitsValidation.h b/Validation/EcalHits/interface/EcalEndcapSimHitsValidation.h index 55c8d4d24f527..f3b8c0b46891a 100644 --- a/Validation/EcalHits/interface/EcalEndcapSimHitsValidation.h +++ b/Validation/EcalHits/interface/EcalEndcapSimHitsValidation.h @@ -44,18 +44,18 @@ class EcalEndcapSimHitsValidation: public edm::EDAnalyzer{ EcalEndcapSimHitsValidation(const edm::ParameterSet& ps); /// Destructor -~EcalEndcapSimHitsValidation(); +~EcalEndcapSimHitsValidation() override; protected: /// Analyze -void analyze(const edm::Event& e, const edm::EventSetup& c); +void analyze(const edm::Event& e, const edm::EventSetup& c) override; // BeginJob -void beginJob(); +void beginJob() override; // EndJob -void endJob(void); +void endJob(void) override; private: diff --git a/Validation/EcalHits/interface/EcalPreshowerSimHitsValidation.h b/Validation/EcalHits/interface/EcalPreshowerSimHitsValidation.h index e7ad22f4eb02a..9bb5e8be531a2 100644 --- a/Validation/EcalHits/interface/EcalPreshowerSimHitsValidation.h +++ b/Validation/EcalHits/interface/EcalPreshowerSimHitsValidation.h @@ -44,18 +44,18 @@ class EcalPreshowerSimHitsValidation: public edm::EDAnalyzer{ EcalPreshowerSimHitsValidation(const edm::ParameterSet& ps); /// Destructor -~EcalPreshowerSimHitsValidation(); +~EcalPreshowerSimHitsValidation() override; protected: /// Analyze -void analyze(const edm::Event& e, const edm::EventSetup& c); +void analyze(const edm::Event& e, const edm::EventSetup& c) override; // BeginJob -void beginJob(); +void beginJob() override; // EndJob -void endJob(void); +void endJob(void) override; private: diff --git a/Validation/EcalHits/interface/EcalSimHitsValidProducer.h b/Validation/EcalHits/interface/EcalSimHitsValidProducer.h index 8fff50ef2f802..c491f8de57cd5 100644 --- a/Validation/EcalHits/interface/EcalSimHitsValidProducer.h +++ b/Validation/EcalHits/interface/EcalSimHitsValidProducer.h @@ -32,18 +32,18 @@ class EcalSimHitsValidProducer : public SimProducer, public: EcalSimHitsValidProducer(const edm::ParameterSet&); - virtual ~EcalSimHitsValidProducer(); + ~EcalSimHitsValidProducer() override; - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: - EcalSimHitsValidProducer(const EcalSimHitsValidProducer&); // stop default - const EcalSimHitsValidProducer& operator=(const EcalSimHitsValidProducer&); // stop default + EcalSimHitsValidProducer(const EcalSimHitsValidProducer&) = delete; // stop default + const EcalSimHitsValidProducer& operator=(const EcalSimHitsValidProducer&) = delete; // stop default - void update(const BeginOfEvent*); - void update(const G4Step*); - void update(const EndOfEvent*); + void update(const BeginOfEvent*) override; + void update(const G4Step*) override; + void update(const EndOfEvent*) override; void fillEventInfo(PEcalValidInfo&); diff --git a/Validation/EcalHits/interface/EcalSimHitsValidation.h b/Validation/EcalHits/interface/EcalSimHitsValidation.h index 09b83dc43e8d4..c7235a8725c5b 100644 --- a/Validation/EcalHits/interface/EcalSimHitsValidation.h +++ b/Validation/EcalHits/interface/EcalSimHitsValidation.h @@ -49,18 +49,18 @@ class EcalSimHitsValidation: public edm::EDAnalyzer{ EcalSimHitsValidation(const edm::ParameterSet& ps); /// Destructor -~EcalSimHitsValidation(); +~EcalSimHitsValidation() override; protected: /// Analyze -void analyze(const edm::Event& e, const edm::EventSetup& c); +void analyze(const edm::Event& e, const edm::EventSetup& c) override; // BeginJob -void beginJob(); +void beginJob() override; // EndJob -void endJob(void); +void endJob(void) override; private: diff --git a/Validation/EcalHits/src/EcalBarrelSimHitsValidation.cc b/Validation/EcalHits/src/EcalBarrelSimHitsValidation.cc index 41974b0886fb0..9ae1e7d9831f5 100644 --- a/Validation/EcalHits/src/EcalBarrelSimHitsValidation.cc +++ b/Validation/EcalHits/src/EcalBarrelSimHitsValidation.cc @@ -25,7 +25,7 @@ EcalBarrelSimHitsValidation::EcalBarrelSimHitsValidation(const edm::ParameterSet verbose_ = ps.getUntrackedParameter("verbose", false); // get hold of back-end interface - dbe_ = 0; + dbe_ = nullptr; dbe_ = edm::Service().operator->(); if ( dbe_ ) { if ( verbose_ ) { dbe_->setVerbose(1); } @@ -36,31 +36,31 @@ EcalBarrelSimHitsValidation::EcalBarrelSimHitsValidation(const edm::ParameterSet if ( verbose_ ) dbe_->showDirStructure(); } - menEBHits_ = 0; - menEBCrystals_ = 0; - meEBOccupancy_ = 0; - meEBLongitudinalShower_ = 0; - meEBhitEnergy_ = 0; - meEBhitLog10Energy_ = 0; - meEBhitLog10EnergyNorm_ = 0; - meEBhitLog10Energy25Norm_ = 0; - meEBhitEnergy2_ = 0; - meEBcrystalEnergy_ = 0; - meEBcrystalEnergy2_ = 0; - - meEBe1_ = 0; - meEBe4_ = 0; - meEBe9_ = 0; - meEBe16_ = 0; - meEBe25_ = 0; - - meEBe1oe4_ = 0; - meEBe1oe9_ = 0; - meEBe4oe9_ = 0; - meEBe9oe16_ = 0; - meEBe1oe25_ = 0; - meEBe9oe25_ = 0; - meEBe16oe25_ = 0; + menEBHits_ = nullptr; + menEBCrystals_ = nullptr; + meEBOccupancy_ = nullptr; + meEBLongitudinalShower_ = nullptr; + meEBhitEnergy_ = nullptr; + meEBhitLog10Energy_ = nullptr; + meEBhitLog10EnergyNorm_ = nullptr; + meEBhitLog10Energy25Norm_ = nullptr; + meEBhitEnergy2_ = nullptr; + meEBcrystalEnergy_ = nullptr; + meEBcrystalEnergy2_ = nullptr; + + meEBe1_ = nullptr; + meEBe4_ = nullptr; + meEBe9_ = nullptr; + meEBe16_ = nullptr; + meEBe25_ = nullptr; + + meEBe1oe4_ = nullptr; + meEBe1oe9_ = nullptr; + meEBe4oe9_ = nullptr; + meEBe9oe16_ = nullptr; + meEBe1oe25_ = nullptr; + meEBe9oe25_ = nullptr; + meEBe16oe25_ = nullptr; myEntries = 0; for (int myStep = 0; myStep<26; myStep++) { eRLength[myStep] = 0.0; } diff --git a/Validation/EcalHits/src/EcalEndcapSimHitsValidation.cc b/Validation/EcalHits/src/EcalEndcapSimHitsValidation.cc index 78d7a8301ead7..c1ec00c958cee 100644 --- a/Validation/EcalHits/src/EcalEndcapSimHitsValidation.cc +++ b/Validation/EcalHits/src/EcalEndcapSimHitsValidation.cc @@ -25,7 +25,7 @@ EcalEndcapSimHitsValidation::EcalEndcapSimHitsValidation(const edm::ParameterSet verbose_ = ps.getUntrackedParameter("verbose", false); // get hold of back-end interface - dbe_ = 0; + dbe_ = nullptr; dbe_ = edm::Service().operator->(); if ( dbe_ ) { if ( verbose_ ) { dbe_->setVerbose(1); } @@ -37,34 +37,34 @@ EcalEndcapSimHitsValidation::EcalEndcapSimHitsValidation(const edm::ParameterSet } - meEEzpHits_ = 0; - meEEzmHits_ = 0; - meEEzpCrystals_ = 0; - meEEzmCrystals_ = 0; - meEEzpOccupancy_ = 0; - meEEzmOccupancy_ = 0; - meEELongitudinalShower_ = 0; - meEEHitEnergy_ = 0; - meEEhitLog10Energy_ = 0; - meEEhitLog10EnergyNorm_ = 0; - meEEhitLog10Energy25Norm_ = 0; - meEEHitEnergy2_ = 0; - meEEcrystalEnergy_ = 0; - meEEcrystalEnergy2_ = 0; - - meEEe1_ = 0; - meEEe4_ = 0; - meEEe9_ = 0; - meEEe16_ = 0; - meEEe25_ = 0; - - meEEe1oe4_ = 0; - meEEe1oe9_ = 0; - meEEe4oe9_ = 0; - meEEe9oe16_ = 0; - meEEe1oe25_ = 0; - meEEe9oe25_ = 0; - meEEe16oe25_ = 0; + meEEzpHits_ = nullptr; + meEEzmHits_ = nullptr; + meEEzpCrystals_ = nullptr; + meEEzmCrystals_ = nullptr; + meEEzpOccupancy_ = nullptr; + meEEzmOccupancy_ = nullptr; + meEELongitudinalShower_ = nullptr; + meEEHitEnergy_ = nullptr; + meEEhitLog10Energy_ = nullptr; + meEEhitLog10EnergyNorm_ = nullptr; + meEEhitLog10Energy25Norm_ = nullptr; + meEEHitEnergy2_ = nullptr; + meEEcrystalEnergy_ = nullptr; + meEEcrystalEnergy2_ = nullptr; + + meEEe1_ = nullptr; + meEEe4_ = nullptr; + meEEe9_ = nullptr; + meEEe16_ = nullptr; + meEEe25_ = nullptr; + + meEEe1oe4_ = nullptr; + meEEe1oe9_ = nullptr; + meEEe4oe9_ = nullptr; + meEEe9oe16_ = nullptr; + meEEe1oe25_ = nullptr; + meEEe9oe25_ = nullptr; + meEEe16oe25_ = nullptr; myEntries = 0; for ( int myStep = 0; myStep<26; myStep++) { eRLength[myStep] = 0.0; } diff --git a/Validation/EcalHits/src/EcalPreshowerSimHitsValidation.cc b/Validation/EcalHits/src/EcalPreshowerSimHitsValidation.cc index 2885e63f42dfe..84fbddaa5e440 100644 --- a/Validation/EcalHits/src/EcalPreshowerSimHitsValidation.cc +++ b/Validation/EcalHits/src/EcalPreshowerSimHitsValidation.cc @@ -29,7 +29,7 @@ EcalPreshowerSimHitsValidation::EcalPreshowerSimHitsValidation(const edm::Parame verbose_ = ps.getUntrackedParameter("verbose", false); // get hold of back-end interface - dbe_ = 0; + dbe_ = nullptr; dbe_ = edm::Service().operator->(); if ( dbe_ ) { if ( verbose_ ) { dbe_->setVerbose(1); } @@ -41,26 +41,26 @@ EcalPreshowerSimHitsValidation::EcalPreshowerSimHitsValidation(const edm::Parame } - menESHits1zp_ = 0; - menESHits2zp_ = 0; - menESHits1zm_ = 0; - menESHits2zm_ = 0; + menESHits1zp_ = nullptr; + menESHits2zp_ = nullptr; + menESHits1zm_ = nullptr; + menESHits2zm_ = nullptr; - meESEnergyHits1zp_ = 0; - meESEnergyHits2zp_ = 0; - meESEnergyHits1zm_ = 0; - meESEnergyHits2zm_ = 0; + meESEnergyHits1zp_ = nullptr; + meESEnergyHits2zp_ = nullptr; + meESEnergyHits1zm_ = nullptr; + meESEnergyHits2zm_ = nullptr; - meEShitLog10Energy_ = 0; - meEShitLog10EnergyNorm_ = 0; + meEShitLog10Energy_ = nullptr; + meEShitLog10EnergyNorm_ = nullptr; - meE1alphaE2zp_ = 0; - meE1alphaE2zm_ = 0; - meEEoverESzp_ = 0; - meEEoverESzm_ = 0; + meE1alphaE2zp_ = nullptr; + meE1alphaE2zm_ = nullptr; + meEEoverESzp_ = nullptr; + meEEoverESzm_ = nullptr; - me2eszpOver1eszp_ = 0; - me2eszmOver1eszm_ = 0; + me2eszpOver1eszp_ = nullptr; + me2eszmOver1eszm_ = nullptr; Char_t histo[200]; diff --git a/Validation/EcalHits/src/EcalSimHitsValidProducer.cc b/Validation/EcalHits/src/EcalSimHitsValidProducer.cc index ce70b2ba3839a..c9b17a4ef7a4b 100644 --- a/Validation/EcalHits/src/EcalSimHitsValidProducer.cc +++ b/Validation/EcalHits/src/EcalSimHitsValidProducer.cc @@ -209,7 +209,7 @@ void EcalSimHitsValidProducer::update(const EndOfEvent* evt){ int trackID = 0; - G4PrimaryParticle * thePrim = 0; + G4PrimaryParticle * thePrim = nullptr; int nvertex = (*evt)()->GetNumberOfPrimaryVertex(); if ( nvertex <= 0) { edm::LogWarning("EcalSimHitsValidProducer") @@ -217,7 +217,7 @@ EcalSimHitsValidProducer::update(const EndOfEvent* evt){ }else { for ( int i = 0; i< nvertex; i++){ G4PrimaryVertex * avertex =(*evt)()->GetPrimaryVertex(i); - if ( avertex == 0 ) + if ( avertex == nullptr ) edm::LogWarning("EcalSimHitsValidProducer") <<" Pointer to vertex is NULL!"; else { @@ -232,7 +232,7 @@ EcalSimHitsValidProducer::update(const EndOfEvent* evt){ edm::LogWarning("EcalSimHitsValidProducer") <<" No primary particle in this event"; else { - if ( thePrim == 0) + if ( thePrim == nullptr) thePrim = avertex->GetPrimary(trackID); } } @@ -240,7 +240,7 @@ EcalSimHitsValidProducer::update(const EndOfEvent* evt){ // the direction of momentum of primary particles double pInit =0; // etaInit =0, phiInit =0, // UNUSED - if ( thePrim != 0){ + if ( thePrim != nullptr){ double px = thePrim -> GetPx(); double py = thePrim -> GetPy(); double pz = thePrim -> GetPz(); @@ -420,9 +420,9 @@ EcalSimHitsValidProducer::update(const EndOfEvent* evt){ void EcalSimHitsValidProducer::update(const G4Step* aStep){ G4StepPoint* preStepPoint = aStep->GetPreStepPoint(); - G4ThreeVector hitPoint = preStepPoint->GetPosition(); + const G4ThreeVector& hitPoint = preStepPoint->GetPosition(); G4VPhysicalVolume* currentPV = preStepPoint->GetPhysicalVolume(); - G4String name = currentPV->GetName(); + const G4String& name = currentPV->GetName(); std::string crystal; crystal.assign(name,0,4); diff --git a/Validation/EcalHits/src/EcalSimHitsValidation.cc b/Validation/EcalHits/src/EcalSimHitsValidation.cc index b7aee2dc113df..49179f06df536 100644 --- a/Validation/EcalHits/src/EcalSimHitsValidation.cc +++ b/Validation/EcalHits/src/EcalSimHitsValidation.cc @@ -28,7 +28,7 @@ EcalSimHitsValidation::EcalSimHitsValidation(const edm::ParameterSet& ps): // DQM ROOT output outputFile_ = ps.getUntrackedParameter("outputFile", ""); - if ( outputFile_.size() != 0 ) { + if ( !outputFile_.empty() ) { edm::LogInfo("OutputInfo") << " Ecal SimHits Task histograms will be saved to " << outputFile_.c_str(); } else { edm::LogInfo("OutputInfo") << " Ecal SimHits Task histograms will NOT be saved"; @@ -38,7 +38,7 @@ EcalSimHitsValidation::EcalSimHitsValidation(const edm::ParameterSet& ps): verbose_ = ps.getUntrackedParameter("verbose", false); // DQMServices - dbe_ = 0; + dbe_ = nullptr; // get hold of back-end interface dbe_ = edm::Service().operator->(); @@ -51,12 +51,12 @@ EcalSimHitsValidation::EcalSimHitsValidation(const edm::ParameterSet& ps): if ( verbose_ ) dbe_->showDirStructure(); } - meGunEnergy_ = 0; - meGunEta_ = 0; - meGunPhi_ = 0; - meEBEnergyFraction_ = 0; - meEEEnergyFraction_ = 0; - meESEnergyFraction_ = 0; + meGunEnergy_ = nullptr; + meGunEta_ = nullptr; + meGunPhi_ = nullptr; + meEBEnergyFraction_ = nullptr; + meEEEnergyFraction_ = nullptr; + meESEnergyFraction_ = nullptr; Char_t histo[200]; @@ -87,7 +87,7 @@ EcalSimHitsValidation::EcalSimHitsValidation(const edm::ParameterSet& ps): EcalSimHitsValidation::~EcalSimHitsValidation(){ - if ( outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_); + if ( !outputFile_.empty() && dbe_ ) dbe_->save(outputFile_); } diff --git a/Validation/EcalRecHits/interface/EcalBarrelRecHitsValidation.h b/Validation/EcalRecHits/interface/EcalBarrelRecHitsValidation.h index 8e20c9bc4b037..3264c6e75abba 100644 --- a/Validation/EcalRecHits/interface/EcalBarrelRecHitsValidation.h +++ b/Validation/EcalRecHits/interface/EcalBarrelRecHitsValidation.h @@ -43,7 +43,7 @@ class EcalBarrelRecHitsValidation: public DQMEDAnalyzer{ EcalBarrelRecHitsValidation(const edm::ParameterSet& ps); /// Destructor -~EcalBarrelRecHitsValidation(); +~EcalBarrelRecHitsValidation() override; protected: diff --git a/Validation/EcalRecHits/interface/EcalEndcapRecHitsValidation.h b/Validation/EcalRecHits/interface/EcalEndcapRecHitsValidation.h index 06098ef3fe4a5..01f33ddde3fe0 100644 --- a/Validation/EcalRecHits/interface/EcalEndcapRecHitsValidation.h +++ b/Validation/EcalRecHits/interface/EcalEndcapRecHitsValidation.h @@ -43,7 +43,7 @@ class EcalEndcapRecHitsValidation: public DQMEDAnalyzer{ EcalEndcapRecHitsValidation(const edm::ParameterSet& ps); /// Destructor -~EcalEndcapRecHitsValidation(); +~EcalEndcapRecHitsValidation() override; protected: diff --git a/Validation/EcalRecHits/interface/EcalPreshowerRecHitsValidation.h b/Validation/EcalRecHits/interface/EcalPreshowerRecHitsValidation.h index b5fd1c1ff0ed6..8a4ab1db945a0 100644 --- a/Validation/EcalRecHits/interface/EcalPreshowerRecHitsValidation.h +++ b/Validation/EcalRecHits/interface/EcalPreshowerRecHitsValidation.h @@ -40,7 +40,7 @@ class EcalPreshowerRecHitsValidation: public DQMEDAnalyzer{ EcalPreshowerRecHitsValidation(const edm::ParameterSet& ps); /// Destructor - ~EcalPreshowerRecHitsValidation(); + ~EcalPreshowerRecHitsValidation() override; protected: diff --git a/Validation/EcalRecHits/interface/EcalRecHitsValidation.h b/Validation/EcalRecHits/interface/EcalRecHitsValidation.h index 143c48dfa1916..d34b12b8e43e8 100644 --- a/Validation/EcalRecHits/interface/EcalRecHitsValidation.h +++ b/Validation/EcalRecHits/interface/EcalRecHitsValidation.h @@ -51,7 +51,7 @@ class EcalRecHitsValidation: public DQMEDAnalyzer{ EcalRecHitsValidation(const edm::ParameterSet& ps); /// Destructor -~EcalRecHitsValidation(); +~EcalRecHitsValidation() override; protected: diff --git a/Validation/EcalRecHits/interface/EcalTBValidation.h b/Validation/EcalRecHits/interface/EcalTBValidation.h index fb2f9c261024f..9f39833e2d5d0 100644 --- a/Validation/EcalRecHits/interface/EcalTBValidation.h +++ b/Validation/EcalRecHits/interface/EcalTBValidation.h @@ -21,10 +21,10 @@ class EcalTBValidation : public DQMEDAnalyzer { public: explicit EcalTBValidation( const edm::ParameterSet& ); - ~EcalTBValidation(); + ~EcalTBValidation() override; void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; - virtual void analyze( const edm::Event&, const edm::EventSetup& ) override; + void analyze( const edm::Event&, const edm::EventSetup& ) override; private: diff --git a/Validation/EcalRecHits/src/EcalBarrelRecHitsValidation.cc b/Validation/EcalRecHits/src/EcalBarrelRecHitsValidation.cc index 2d21a77b1b928..25c702994e727 100644 --- a/Validation/EcalRecHits/src/EcalBarrelRecHitsValidation.cc +++ b/Validation/EcalRecHits/src/EcalBarrelRecHitsValidation.cc @@ -24,24 +24,24 @@ EcalBarrelRecHitsValidation::EcalBarrelRecHitsValidation(const ParameterSet& ps) verbose_ = ps.getUntrackedParameter("verbose", false); // ---------------------- - meEBUncalibRecHitsOccupancy_ = 0; - meEBUncalibRecHitsAmplitude_ = 0; - meEBUncalibRecHitsPedestal_ = 0; - meEBUncalibRecHitsJitter_ = 0; - meEBUncalibRecHitsChi2_ = 0; - meEBUncalibRecHitMaxSampleRatio_ = 0; - meEBUncalibRecHitsOccupancyGt100adc_ = 0; - meEBUncalibRecHitsAmplitudeGt100adc_ = 0; - meEBUncalibRecHitsPedestalGt100adc_ = 0; - meEBUncalibRecHitsJitterGt100adc_ = 0; - meEBUncalibRecHitsChi2Gt100adc_ = 0; - meEBUncalibRecHitMaxSampleRatioGt100adc_ = 0; - meEBUncalibRecHitsAmpFullMap_ = 0; - meEBUncalibRecHitsPedFullMap_ = 0; + meEBUncalibRecHitsOccupancy_ = nullptr; + meEBUncalibRecHitsAmplitude_ = nullptr; + meEBUncalibRecHitsPedestal_ = nullptr; + meEBUncalibRecHitsJitter_ = nullptr; + meEBUncalibRecHitsChi2_ = nullptr; + meEBUncalibRecHitMaxSampleRatio_ = nullptr; + meEBUncalibRecHitsOccupancyGt100adc_ = nullptr; + meEBUncalibRecHitsAmplitudeGt100adc_ = nullptr; + meEBUncalibRecHitsPedestalGt100adc_ = nullptr; + meEBUncalibRecHitsJitterGt100adc_ = nullptr; + meEBUncalibRecHitsChi2Gt100adc_ = nullptr; + meEBUncalibRecHitMaxSampleRatioGt100adc_ = nullptr; + meEBUncalibRecHitsAmpFullMap_ = nullptr; + meEBUncalibRecHitsPedFullMap_ = nullptr; for (int i=0; i<36 ; i++) { - meEBUncalibRecHitAmplMap_[i] = 0; - meEBUncalibRecHitPedMap_[i] = 0; + meEBUncalibRecHitAmplMap_[i] = nullptr; + meEBUncalibRecHitPedMap_[i] = nullptr; } } @@ -109,7 +109,7 @@ void EcalBarrelRecHitsValidation::bookHistograms(DQMStore::IBooker &ibooker, edm void EcalBarrelRecHitsValidation::analyze(const Event& e, const EventSetup& c){ - const EBUncalibratedRecHitCollection *EBUncalibRecHit = 0; + const EBUncalibratedRecHitCollection *EBUncalibRecHit = nullptr; Handle< EBUncalibratedRecHitCollection > EcalUncalibRecHitEB; e.getByToken( EBuncalibrechitCollection_token_, EcalUncalibRecHitEB); if (EcalUncalibRecHitEB.isValid()) { @@ -119,7 +119,7 @@ void EcalBarrelRecHitsValidation::analyze(const Event& e, const EventSetup& c){ } bool skipDigis = false; - const EBDigiCollection *EBDigi = 0; + const EBDigiCollection *EBDigi = nullptr; Handle< EBDigiCollection > EcalDigiEB; e.getByToken( EBdigiCollection_token_, EcalDigiEB); if (EcalDigiEB.isValid()) { diff --git a/Validation/EcalRecHits/src/EcalEndcapRecHitsValidation.cc b/Validation/EcalRecHits/src/EcalEndcapRecHitsValidation.cc index 41a07a5399675..35e5559ad30cb 100644 --- a/Validation/EcalRecHits/src/EcalEndcapRecHitsValidation.cc +++ b/Validation/EcalRecHits/src/EcalEndcapRecHitsValidation.cc @@ -24,22 +24,22 @@ EcalEndcapRecHitsValidation::EcalEndcapRecHitsValidation(const ParameterSet& ps) verbose_ = ps.getUntrackedParameter("verbose", false); // ---------------------- - meEEUncalibRecHitsOccupancyPlus_ = 0; - meEEUncalibRecHitsOccupancyMinus_ = 0; - meEEUncalibRecHitsAmplitude_ = 0; - meEEUncalibRecHitsPedestal_ = 0; - meEEUncalibRecHitsJitter_ = 0; - meEEUncalibRecHitsChi2_ = 0; - meEEUncalibRecHitMaxSampleRatio_ = 0; - meEEUncalibRecHitsOccupancyPlusGt60adc_ = 0; - meEEUncalibRecHitsOccupancyMinusGt60adc_ = 0; - meEEUncalibRecHitsAmplitudeGt60adc_ = 0; - meEEUncalibRecHitsPedestalGt60adc_ = 0; - meEEUncalibRecHitsJitterGt60adc_ = 0; - meEEUncalibRecHitsChi2Gt60adc_ = 0; - meEEUncalibRecHitMaxSampleRatioGt60adc_ = 0; - meEEUncalibRecHitsAmpFullMap_ = 0; - meEEUncalibRecHitsPedFullMap_ = 0; + meEEUncalibRecHitsOccupancyPlus_ = nullptr; + meEEUncalibRecHitsOccupancyMinus_ = nullptr; + meEEUncalibRecHitsAmplitude_ = nullptr; + meEEUncalibRecHitsPedestal_ = nullptr; + meEEUncalibRecHitsJitter_ = nullptr; + meEEUncalibRecHitsChi2_ = nullptr; + meEEUncalibRecHitMaxSampleRatio_ = nullptr; + meEEUncalibRecHitsOccupancyPlusGt60adc_ = nullptr; + meEEUncalibRecHitsOccupancyMinusGt60adc_ = nullptr; + meEEUncalibRecHitsAmplitudeGt60adc_ = nullptr; + meEEUncalibRecHitsPedestalGt60adc_ = nullptr; + meEEUncalibRecHitsJitterGt60adc_ = nullptr; + meEEUncalibRecHitsChi2Gt60adc_ = nullptr; + meEEUncalibRecHitMaxSampleRatioGt60adc_ = nullptr; + meEEUncalibRecHitsAmpFullMap_ = nullptr; + meEEUncalibRecHitsPedFullMap_ = nullptr; } @@ -105,7 +105,7 @@ void EcalEndcapRecHitsValidation::bookHistograms(DQMStore::IBooker &ibooker, edm void EcalEndcapRecHitsValidation::analyze(const Event& e, const EventSetup& c){ - const EEUncalibratedRecHitCollection *EEUncalibRecHit = 0; + const EEUncalibratedRecHitCollection *EEUncalibRecHit = nullptr; Handle< EEUncalibratedRecHitCollection > EcalUncalibRecHitEE; e.getByToken( EEuncalibrechitCollection_token_, EcalUncalibRecHitEE); if (EcalUncalibRecHitEE.isValid()) { @@ -115,7 +115,7 @@ void EcalEndcapRecHitsValidation::analyze(const Event& e, const EventSetup& c){ } bool skipDigis = false; - const EEDigiCollection *EEDigi = 0; + const EEDigiCollection *EEDigi = nullptr; Handle< EEDigiCollection > EcalDigiEE; e.getByToken( EEdigiCollection_token_, EcalDigiEE); if (EcalDigiEE.isValid()) { diff --git a/Validation/EcalRecHits/src/EcalPreshowerRecHitsValidation.cc b/Validation/EcalRecHits/src/EcalPreshowerRecHitsValidation.cc index 9a637c9376ae6..da89e32b5fe00 100644 --- a/Validation/EcalRecHits/src/EcalPreshowerRecHitsValidation.cc +++ b/Validation/EcalRecHits/src/EcalPreshowerRecHitsValidation.cc @@ -29,25 +29,25 @@ EcalPreshowerRecHitsValidation::EcalPreshowerRecHitsValidation(const ParameterSe verbose_ = ps.getUntrackedParameter("verbose", false); // ---------------------- - meESRecHitsEnergy_ = 0; // total energy - meESRecHitsEnergy_zp1st_ = 0; - meESRecHitsEnergy_zp2nd_ = 0; - meESRecHitsEnergy_zm1st_ = 0; - meESRecHitsEnergy_zm2nd_ = 0; - meESRecHitsMultip_ = 0; // total multiplicity - meESRecHitsMultip_zp1st_ = 0; - meESRecHitsMultip_zp2nd_ = 0; - meESRecHitsMultip_zm1st_ = 0; - meESRecHitsMultip_zm2nd_ = 0; - meESEERecHitsEnergy_zp_ = 0; // versus EE energy - meESEERecHitsEnergy_zm_ = 0; + meESRecHitsEnergy_ = nullptr; // total energy + meESRecHitsEnergy_zp1st_ = nullptr; + meESRecHitsEnergy_zp2nd_ = nullptr; + meESRecHitsEnergy_zm1st_ = nullptr; + meESRecHitsEnergy_zm2nd_ = nullptr; + meESRecHitsMultip_ = nullptr; // total multiplicity + meESRecHitsMultip_zp1st_ = nullptr; + meESRecHitsMultip_zp2nd_ = nullptr; + meESRecHitsMultip_zm1st_ = nullptr; + meESRecHitsMultip_zm2nd_ = nullptr; + meESEERecHitsEnergy_zp_ = nullptr; // versus EE energy + meESEERecHitsEnergy_zm_ = nullptr; for (int kk=0; kk<32; kk++) { - meESRecHitsStripOccupancy_zp1st_[kk] = 0; - meESRecHitsStripOccupancy_zm1st_[kk] = 0; - meESRecHitsStripOccupancy_zp2nd_[kk] = 0; - meESRecHitsStripOccupancy_zm2nd_[kk] = 0; + meESRecHitsStripOccupancy_zp1st_[kk] = nullptr; + meESRecHitsStripOccupancy_zm1st_[kk] = nullptr; + meESRecHitsStripOccupancy_zp2nd_[kk] = nullptr; + meESRecHitsStripOccupancy_zm2nd_[kk] = nullptr; } } @@ -115,7 +115,7 @@ void EcalPreshowerRecHitsValidation::bookHistograms(DQMStore::IBooker &ibooker, void EcalPreshowerRecHitsValidation::analyze(const Event& e, const EventSetup& c){ - const ESRecHitCollection *ESRecHit = 0; + const ESRecHitCollection *ESRecHit = nullptr; Handle EcalRecHitES; e.getByToken( ESrechitCollection_token_, EcalRecHitES); if (EcalRecHitES.isValid()) { @@ -125,7 +125,7 @@ void EcalPreshowerRecHitsValidation::analyze(const Event& e, const EventSetup& c } bool skipEE = false; - const EERecHitCollection *EERecHit = 0; + const EERecHitCollection *EERecHit = nullptr; Handle EcalRecHitEE; e.getByToken( EErechitCollection_token_, EcalRecHitEE); if (EcalRecHitEE.isValid()){ @@ -134,7 +134,7 @@ void EcalPreshowerRecHitsValidation::analyze(const Event& e, const EventSetup& c skipEE = true; } - const EEUncalibratedRecHitCollection *EEUncalibRecHit = 0; + const EEUncalibratedRecHitCollection *EEUncalibRecHit = nullptr; Handle< EEUncalibratedRecHitCollection > EcalUncalibRecHitEE; e.getByToken( EEuncalibrechitCollection_token_, EcalUncalibRecHitEE); if (EcalUncalibRecHitEE.isValid()) { diff --git a/Validation/EcalRecHits/src/EcalRecHitsValidation.cc b/Validation/EcalRecHits/src/EcalRecHitsValidation.cc index 295fa98ef8aa2..b8740748091c2 100644 --- a/Validation/EcalRecHits/src/EcalRecHitsValidation.cc +++ b/Validation/EcalRecHits/src/EcalRecHitsValidation.cc @@ -45,7 +45,7 @@ EcalRecHitsValidation::EcalRecHitsValidation(const ParameterSet& ps){ // DQM ROOT output outputFile_ = ps.getUntrackedParameter("outputFile", ""); - if ( outputFile_.size() != 0 ) { + if ( !outputFile_.empty() ) { LogInfo("OutputInfo") << " Ecal RecHits Task histograms will be saved to '" << outputFile_.c_str() << "'"; } else { LogInfo("OutputInfo") << " Ecal RecHits Task histograms will NOT be saved"; @@ -56,57 +56,57 @@ EcalRecHitsValidation::EcalRecHitsValidation(const ParameterSet& ps){ verbose_ = ps.getUntrackedParameter("verbose", false); // ---------------------- - meGunEnergy_ = 0; - meGunEta_ = 0; - meGunPhi_ = 0; - meEBRecHitSimHitRatio_ = 0; - meEERecHitSimHitRatio_ = 0; - meESRecHitSimHitRatio_ = 0; - meEBRecHitSimHitRatio1011_ = 0; - meEERecHitSimHitRatio1011_ = 0; - meEBRecHitSimHitRatio12_ = 0; - meEERecHitSimHitRatio12_ = 0; - meEBRecHitSimHitRatio13_ = 0; - meEERecHitSimHitRatio13_ = 0; - meEBRecHitSimHitRatioGt35_ = 0; - meEERecHitSimHitRatioGt35_ = 0; - meEBUnRecHitSimHitRatio_ = 0; - meEEUnRecHitSimHitRatio_ = 0; - meEBUnRecHitSimHitRatioGt35_ = 0; - meEEUnRecHitSimHitRatioGt35_ = 0; - meEBe5x5_ = 0; - meEBe5x5OverSimHits_ = 0; - meEBe5x5OverGun_ = 0; - meEEe5x5_ = 0; - meEEe5x5OverSimHits_ = 0; - meEEe5x5OverGun_ = 0; + meGunEnergy_ = nullptr; + meGunEta_ = nullptr; + meGunPhi_ = nullptr; + meEBRecHitSimHitRatio_ = nullptr; + meEERecHitSimHitRatio_ = nullptr; + meESRecHitSimHitRatio_ = nullptr; + meEBRecHitSimHitRatio1011_ = nullptr; + meEERecHitSimHitRatio1011_ = nullptr; + meEBRecHitSimHitRatio12_ = nullptr; + meEERecHitSimHitRatio12_ = nullptr; + meEBRecHitSimHitRatio13_ = nullptr; + meEERecHitSimHitRatio13_ = nullptr; + meEBRecHitSimHitRatioGt35_ = nullptr; + meEERecHitSimHitRatioGt35_ = nullptr; + meEBUnRecHitSimHitRatio_ = nullptr; + meEEUnRecHitSimHitRatio_ = nullptr; + meEBUnRecHitSimHitRatioGt35_ = nullptr; + meEEUnRecHitSimHitRatioGt35_ = nullptr; + meEBe5x5_ = nullptr; + meEBe5x5OverSimHits_ = nullptr; + meEBe5x5OverGun_ = nullptr; + meEEe5x5_ = nullptr; + meEEe5x5OverSimHits_ = nullptr; + meEEe5x5OverGun_ = nullptr; - meEBRecHitLog10Energy_ = 0; - meEERecHitLog10Energy_ = 0; - meESRecHitLog10Energy_ = 0; - meEBRecHitLog10EnergyContr_ = 0; - meEERecHitLog10EnergyContr_ = 0; - meESRecHitLog10EnergyContr_ = 0; - meEBRecHitLog10Energy5x5Contr_ = 0; - meEERecHitLog10Energy5x5Contr_ = 0; - - meEBRecHitsOccupancyFlag5_6_ = 0; - meEBRecHitsOccupancyFlag8_9_ = 0; - meEERecHitsOccupancyPlusFlag5_6_ = 0; - meEERecHitsOccupancyMinusFlag5_6_ = 0; - meEERecHitsOccupancyPlusFlag8_9_ = 0; - meEERecHitsOccupancyMinusFlag8_9_ = 0; + meEBRecHitLog10Energy_ = nullptr; + meEERecHitLog10Energy_ = nullptr; + meESRecHitLog10Energy_ = nullptr; + meEBRecHitLog10EnergyContr_ = nullptr; + meEERecHitLog10EnergyContr_ = nullptr; + meESRecHitLog10EnergyContr_ = nullptr; + meEBRecHitLog10Energy5x5Contr_ = nullptr; + meEERecHitLog10Energy5x5Contr_ = nullptr; + + meEBRecHitsOccupancyFlag5_6_ = nullptr; + meEBRecHitsOccupancyFlag8_9_ = nullptr; + meEERecHitsOccupancyPlusFlag5_6_ = nullptr; + meEERecHitsOccupancyMinusFlag5_6_ = nullptr; + meEERecHitsOccupancyPlusFlag8_9_ = nullptr; + meEERecHitsOccupancyMinusFlag8_9_ = nullptr; - meEBRecHitFlags_ = 0; - meEBRecHitSimHitvsSimHitFlag5_6_ = 0; - meEBRecHitSimHitFlag6_ = 0; - meEBRecHitSimHitFlag7_ = 0; - meEB5x5RecHitSimHitvsSimHitFlag8_ = 0; + meEBRecHitFlags_ = nullptr; + meEBRecHitSimHitvsSimHitFlag5_6_ = nullptr; + meEBRecHitSimHitFlag6_ = nullptr; + meEBRecHitSimHitFlag7_ = nullptr; + meEB5x5RecHitSimHitvsSimHitFlag8_ = nullptr; - meEERecHitFlags_ = 0; - meEERecHitSimHitvsSimHitFlag5_6_ = 0; - meEERecHitSimHitFlag6_ = 0; - meEERecHitSimHitFlag7_ = 0; + meEERecHitFlags_ = nullptr; + meEERecHitSimHitvsSimHitFlag5_6_ = nullptr; + meEERecHitSimHitFlag6_ = nullptr; + meEERecHitSimHitFlag7_ = nullptr; } @@ -262,7 +262,7 @@ void EcalRecHitsValidation::analyze(const Event& e, const EventSetup& c){ edm::Handle > crossingFrame; bool skipBarrel = false; - const EBUncalibratedRecHitCollection *EBUncalibRecHit =0; + const EBUncalibratedRecHitCollection *EBUncalibRecHit =nullptr; Handle< EBUncalibratedRecHitCollection > EcalUncalibRecHitEB; e.getByToken( EBuncalibrechitCollection_Token_, EcalUncalibRecHitEB); if (EcalUncalibRecHitEB.isValid()) { @@ -272,7 +272,7 @@ void EcalRecHitsValidation::analyze(const Event& e, const EventSetup& c){ } bool skipEndcap = false; - const EEUncalibratedRecHitCollection *EEUncalibRecHit = 0; + const EEUncalibratedRecHitCollection *EEUncalibRecHit = nullptr; Handle< EEUncalibratedRecHitCollection > EcalUncalibRecHitEE; e.getByToken( EEuncalibrechitCollection_Token_, EcalUncalibRecHitEE); if (EcalUncalibRecHitEE.isValid()){ @@ -281,7 +281,7 @@ void EcalRecHitsValidation::analyze(const Event& e, const EventSetup& c){ skipEndcap = true; } - const EBRecHitCollection *EBRecHit = 0; + const EBRecHitCollection *EBRecHit = nullptr; Handle EcalRecHitEB; e.getByToken( EBrechitCollection_Token_, EcalRecHitEB); if (EcalRecHitEB.isValid()){ @@ -290,7 +290,7 @@ void EcalRecHitsValidation::analyze(const Event& e, const EventSetup& c){ skipBarrel = true; } - const EERecHitCollection *EERecHit = 0; + const EERecHitCollection *EERecHit = nullptr; Handle EcalRecHitEE; e.getByToken( EErechitCollection_Token_, EcalRecHitEE); if (EcalRecHitEE.isValid()){ @@ -300,7 +300,7 @@ void EcalRecHitsValidation::analyze(const Event& e, const EventSetup& c){ } bool skipPreshower = false; - const ESRecHitCollection *ESRecHit = 0; + const ESRecHitCollection *ESRecHit = nullptr; Handle EcalRecHitES; e.getByToken( ESrechitCollection_Token_, EcalRecHitES); if (EcalRecHitES.isValid()) { @@ -399,38 +399,38 @@ void EcalRecHitsValidation::analyze(const Event& e, const EventSetup& c){ uint16_t sc = 0; edm::ESHandle pEcs; c.get().get(pEcs); - const EcalChannelStatus* ecs = 0; + const EcalChannelStatus* ecs = nullptr; if( pEcs.isValid() ) ecs = pEcs.product(); - if( ecs != 0 ) { + if( ecs != nullptr ) { EcalChannelStatusMap::const_iterator csmi = ecs->find(EBid.rawId()); EcalChannelStatusCode csc = 0; if( csmi != ecs->end() ) csc = *csmi; sc = csc.getStatusCode(); } - if( meEBRecHitSimHitRatio1011_ != 0 && + if( meEBRecHitSimHitRatio1011_ != nullptr && ( sc == 10 || sc == 11 ) ) { meEBRecHitSimHitRatio1011_->Fill(myRecHit->energy()/ebSimMap[EBid.rawId()]); } - if( meEBRecHitSimHitRatio12_ != 0 && sc == 12 ) { meEBRecHitSimHitRatio12_->Fill(myRecHit->energy()/ebSimMap[EBid.rawId()]); } + if( meEBRecHitSimHitRatio12_ != nullptr && sc == 12 ) { meEBRecHitSimHitRatio12_->Fill(myRecHit->energy()/ebSimMap[EBid.rawId()]); } edm::ESHandle pttMap; c.get().get(pttMap); - const EcalTrigTowerConstituentsMap* ttMap = 0; + const EcalTrigTowerConstituentsMap* ttMap = nullptr; if( pttMap.isValid() ) ttMap = pttMap.product(); double ttSimEnergy = 0; - if( ttMap != 0 ) { + if( ttMap != nullptr ) { EcalTrigTowerDetId ttDetId = EBid.tower(); std::vector vid = ttMap->constituentsOf( ttDetId ); for( std::vector::const_iterator dit = vid.begin(); dit != vid.end(); dit++ ) { EBDetId ttEBid = EBDetId(*dit); ttSimEnergy += ebSimMap[ttEBid.rawId()]; } - if( vid.size() != 0 ) ttSimEnergy = ttSimEnergy / vid.size(); + if( !vid.empty() ) ttSimEnergy = ttSimEnergy / vid.size(); } - if( meEBRecHitSimHitRatio13_ != 0 && sc == 13 && ttSimEnergy != 0 ) + if( meEBRecHitSimHitRatio13_ != nullptr && sc == 13 && ttSimEnergy != 0 ) meEBRecHitSimHitRatio13_->Fill(myRecHit->energy()/ttSimEnergy); int flag = myRecHit->recoFlag(); - if( meEBRecHitFlags_ != 0 ) meEBRecHitFlags_->Fill( flag ); + if( meEBRecHitFlags_ != nullptr ) meEBRecHitFlags_->Fill( flag ); if( meEBRecHitSimHitvsSimHitFlag5_6_ && ( flag == EcalRecHit::kSaturated || flag == EcalRecHit::kLeadingEdgeRecovered )) meEBRecHitSimHitvsSimHitFlag5_6_->Fill( myRecHit->energy()/ebSimMap[EBid.rawId()], ebSimMap[EBid.rawId()] ); if( meEBRecHitSimHitFlag6_ && ( flag == EcalRecHit::kLeadingEdgeRecovered )) @@ -548,21 +548,21 @@ void EcalRecHitsValidation::analyze(const Event& e, const EventSetup& c){ edm::ESHandle pEcs; c.get().get(pEcs); - const EcalChannelStatus* ecs = 0; + const EcalChannelStatus* ecs = nullptr; if( pEcs.isValid() ) ecs = pEcs.product(); - if( ecs != 0 ) { + if( ecs != nullptr ) { EcalChannelStatusMap::const_iterator csmi = ecs->find(EEid.rawId()); EcalChannelStatusCode csc = 0; if( csmi != ecs->end() ) csc = *csmi; uint16_t sc = csc.getStatusCode(); - if( meEERecHitSimHitRatio1011_ != 0 && + if( meEERecHitSimHitRatio1011_ != nullptr && ( sc == 10 || sc == 11 ) ) { meEERecHitSimHitRatio1011_->Fill(myRecHit->energy()/eeSimMap[EEid.rawId()]); } - if( meEERecHitSimHitRatio12_ != 0 && sc == 12 ) { meEERecHitSimHitRatio12_->Fill(myRecHit->energy()/eeSimMap[EEid.rawId()]); } - if( meEERecHitSimHitRatio13_ != 0 && sc == 13 ) { meEERecHitSimHitRatio13_->Fill(myRecHit->energy()/eeSimMap[EEid.rawId()]); } + if( meEERecHitSimHitRatio12_ != nullptr && sc == 12 ) { meEERecHitSimHitRatio12_->Fill(myRecHit->energy()/eeSimMap[EEid.rawId()]); } + if( meEERecHitSimHitRatio13_ != nullptr && sc == 13 ) { meEERecHitSimHitRatio13_->Fill(myRecHit->energy()/eeSimMap[EEid.rawId()]); } } int flag = myRecHit->recoFlag(); - if( meEERecHitFlags_ != 0 ) meEERecHitFlags_->Fill( flag ); + if( meEERecHitFlags_ != nullptr ) meEERecHitFlags_->Fill( flag ); if( meEERecHitSimHitvsSimHitFlag5_6_ && ( flag == EcalRecHit::kSaturated || flag == EcalRecHit::kLeadingEdgeRecovered )) meEERecHitSimHitvsSimHitFlag5_6_->Fill( myRecHit->energy()/eeSimMap[EEid.rawId()], eeSimMap[EEid.rawId()] ); if( meEERecHitSimHitFlag6_ && ( flag == EcalRecHit::kLeadingEdgeRecovered )) diff --git a/Validation/EcalRecHits/src/EcalTBValidation.cc b/Validation/EcalRecHits/src/EcalTBValidation.cc index 27e0906939c0c..5a0e7214679a0 100644 --- a/Validation/EcalRecHits/src/EcalTBValidation.cc +++ b/Validation/EcalRecHits/src/EcalTBValidation.cc @@ -40,28 +40,28 @@ EcalTBValidation::EcalTBValidation( const edm::ParameterSet& config ) { // verbosity... verbose_ = config.getUntrackedParameter("verbose", false); - meETBxib_ = 0; - meETBampltdc_ = 0; - meETBShape_ = 0; - meETBhodoX_ = 0; - meETBhodoY_ = 0; - meETBe1x1_ = 0; - meETBe3x3_ = 0; - meETBe5x5_ = 0; - meETBe1e9_ = 0; - meETBe1e25_ = 0; - meETBe9e25_ = 0; - meETBe1x1_center_ = 0; - meETBe3x3_center_ = 0; - meETBe5x5_center_ = 0; - meETBe1vsX_ = 0; - meETBe1vsY_ = 0; - meETBe1e9vsX_ = 0; - meETBe1e9vsY_ = 0; - meETBe1e25vsX_ = 0; - meETBe1e25vsY_ = 0; - meETBe9e25vsX_ = 0; - meETBe9e25vsY_ = 0; + meETBxib_ = nullptr; + meETBampltdc_ = nullptr; + meETBShape_ = nullptr; + meETBhodoX_ = nullptr; + meETBhodoY_ = nullptr; + meETBe1x1_ = nullptr; + meETBe3x3_ = nullptr; + meETBe5x5_ = nullptr; + meETBe1e9_ = nullptr; + meETBe1e25_ = nullptr; + meETBe9e25_ = nullptr; + meETBe1x1_center_ = nullptr; + meETBe3x3_center_ = nullptr; + meETBe5x5_center_ = nullptr; + meETBe1vsX_ = nullptr; + meETBe1vsY_ = nullptr; + meETBe1e9vsX_ = nullptr; + meETBe1e9vsY_ = nullptr; + meETBe1e25vsX_ = nullptr; + meETBe1e25vsY_ = nullptr; + meETBe9e25vsX_ = nullptr; + meETBe9e25vsY_ = nullptr; } @@ -126,7 +126,7 @@ void EcalTBValidation::analyze( const edm::Event& event, const edm::EventSetup& using namespace cms; // digis - const EBDigiCollection* theDigis=0; + const EBDigiCollection* theDigis=nullptr; Handle pdigis; event.getByToken(digi_Token_, pdigis); if(pdigis.isValid()){ @@ -138,7 +138,7 @@ void EcalTBValidation::analyze( const edm::Event& event, const edm::EventSetup& } // rechits - const EBUncalibratedRecHitCollection* theHits=0; + const EBUncalibratedRecHitCollection* theHits=nullptr; Handle phits; event.getByToken(hit_Token_, phits); if(phits.isValid()){ @@ -150,7 +150,7 @@ void EcalTBValidation::analyze( const edm::Event& event, const edm::EventSetup& } // hodoscopes - const EcalTBHodoscopeRecInfo* theHodo=0; + const EcalTBHodoscopeRecInfo* theHodo=nullptr; Handle pHodo; event.getByToken(hodoRec_Token_, pHodo); if(pHodo.isValid()){ @@ -162,7 +162,7 @@ void EcalTBValidation::analyze( const edm::Event& event, const edm::EventSetup& } // tdc - const EcalTBTDCRecInfo* theTDC=0; + const EcalTBTDCRecInfo* theTDC=nullptr; Handle pTDC; event.getByToken(tdcRec_Token_, pTDC); if(pTDC.isValid()){ @@ -174,7 +174,7 @@ void EcalTBValidation::analyze( const edm::Event& event, const edm::EventSetup& } // event header - const EcalTBEventHeader* evtHeader=0; + const EcalTBEventHeader* evtHeader=nullptr; Handle pEventHeader; event.getByToken(eventHeader_Token_ , pEventHeader); if(pEventHeader.isValid()){ diff --git a/Validation/EcalTriggerPrimitives/src/TPGCheck.cc b/Validation/EcalTriggerPrimitives/src/TPGCheck.cc index df7ad55de7d53..0c3a4b4a3447d 100644 --- a/Validation/EcalTriggerPrimitives/src/TPGCheck.cc +++ b/Validation/EcalTriggerPrimitives/src/TPGCheck.cc @@ -45,13 +45,13 @@ using namespace std; class TPGCheck : public edm::EDAnalyzer { public: explicit TPGCheck(const edm::ParameterSet&); - ~TPGCheck(); + ~TPGCheck() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- TH1I *ecal_et_[2]; diff --git a/Validation/EventGenerator/interface/BPhysicsSpectrum.h b/Validation/EventGenerator/interface/BPhysicsSpectrum.h index eee664c80b64c..e8720cd217bc4 100644 --- a/Validation/EventGenerator/interface/BPhysicsSpectrum.h +++ b/Validation/EventGenerator/interface/BPhysicsSpectrum.h @@ -37,11 +37,11 @@ class BPhysicsSpectrum : public DQMEDAnalyzer { public: explicit BPhysicsSpectrum(const edm::ParameterSet&); - virtual ~BPhysicsSpectrum(); + ~BPhysicsSpectrum() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; - virtual void analyze(edm::Event const&, edm::EventSetup const&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; + void analyze(edm::Event const&, edm::EventSetup const&) override; private: MonitorElement *mass, *Nobj; diff --git a/Validation/EventGenerator/interface/BPhysicsValidation.h b/Validation/EventGenerator/interface/BPhysicsValidation.h index 92efa9f5b60f3..c38c8ed4b22d8 100644 --- a/Validation/EventGenerator/interface/BPhysicsValidation.h +++ b/Validation/EventGenerator/interface/BPhysicsValidation.h @@ -37,11 +37,11 @@ class BPhysicsValidation : public DQMEDAnalyzer { public: explicit BPhysicsValidation(const edm::ParameterSet&); - virtual ~BPhysicsValidation(); + ~BPhysicsValidation() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; - virtual void analyze(edm::Event const&, edm::EventSetup const&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; + void analyze(edm::Event const&, edm::EventSetup const&) override; private: diff --git a/Validation/EventGenerator/interface/BasicGenParticleValidation.h b/Validation/EventGenerator/interface/BasicGenParticleValidation.h index b34929d625273..ec8082f8bf9b1 100644 --- a/Validation/EventGenerator/interface/BasicGenParticleValidation.h +++ b/Validation/EventGenerator/interface/BasicGenParticleValidation.h @@ -37,10 +37,10 @@ class BasicGenParticleValidation : public DQMEDAnalyzer{ public: explicit BasicGenParticleValidation(const edm::ParameterSet&); - virtual ~BasicGenParticleValidation(); + ~BasicGenParticleValidation() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; bool matchParticles(const HepMC::GenParticle*&, const reco::GenParticle*&); diff --git a/Validation/EventGenerator/interface/BasicHepMCHeavyIonValidation.h b/Validation/EventGenerator/interface/BasicHepMCHeavyIonValidation.h index ae79f3e502e26..58e21cf31c7dc 100644 --- a/Validation/EventGenerator/interface/BasicHepMCHeavyIonValidation.h +++ b/Validation/EventGenerator/interface/BasicHepMCHeavyIonValidation.h @@ -34,10 +34,10 @@ class BasicHepMCHeavyIonValidation : public DQMEDAnalyzer { public: explicit BasicHepMCHeavyIonValidation(const edm::ParameterSet&); - virtual ~BasicHepMCHeavyIonValidation(); + ~BasicHepMCHeavyIonValidation() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(edm::Event const&, edm::EventSetup const&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void analyze(edm::Event const&, edm::EventSetup const&) override; private: WeightManager wmanager_; diff --git a/Validation/EventGenerator/interface/BasicHepMCValidation.h b/Validation/EventGenerator/interface/BasicHepMCValidation.h index d87f4661b698d..64f33e0cc47d7 100644 --- a/Validation/EventGenerator/interface/BasicHepMCValidation.h +++ b/Validation/EventGenerator/interface/BasicHepMCValidation.h @@ -35,11 +35,11 @@ class BasicHepMCValidation : public DQMEDAnalyzer{ public: explicit BasicHepMCValidation(const edm::ParameterSet&); - virtual ~BasicHepMCValidation(); + ~BasicHepMCValidation() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; - virtual void analyze(edm::Event const&, edm::EventSetup const&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; + void analyze(edm::Event const&, edm::EventSetup const&) override; private: WeightManager wmanager_; diff --git a/Validation/EventGenerator/interface/DrellYanValidation.h b/Validation/EventGenerator/interface/DrellYanValidation.h index 352cae48d840b..76caa42c70b47 100644 --- a/Validation/EventGenerator/interface/DrellYanValidation.h +++ b/Validation/EventGenerator/interface/DrellYanValidation.h @@ -34,11 +34,11 @@ class DrellYanValidation : public DQMEDAnalyzer{ public: explicit DrellYanValidation(const edm::ParameterSet&); - virtual ~DrellYanValidation(); + ~DrellYanValidation() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; - virtual void analyze(edm::Event const&, edm::EventSetup const&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; + void analyze(edm::Event const&, edm::EventSetup const&) override; private: WeightManager wmanager_; diff --git a/Validation/EventGenerator/interface/DuplicationChecker.h b/Validation/EventGenerator/interface/DuplicationChecker.h index fb5ade67903e7..93862701e8552 100644 --- a/Validation/EventGenerator/interface/DuplicationChecker.h +++ b/Validation/EventGenerator/interface/DuplicationChecker.h @@ -44,10 +44,10 @@ class DuplicationChecker : public DQMEDAnalyzer { typedef std::vector itemList; explicit DuplicationChecker(const edm::ParameterSet&); - virtual ~DuplicationChecker(); + ~DuplicationChecker() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; void findValuesAssociatedWithKey(associationMap &mMap, double &key, itemList &theObjects); diff --git a/Validation/EventGenerator/interface/HiggsValidation.h b/Validation/EventGenerator/interface/HiggsValidation.h index bb9b214e30b44..a3b551ba095b1 100644 --- a/Validation/EventGenerator/interface/HiggsValidation.h +++ b/Validation/EventGenerator/interface/HiggsValidation.h @@ -37,11 +37,11 @@ class HiggsValidation : public DQMEDAnalyzer { public: explicit HiggsValidation(const edm::ParameterSet&); - virtual ~HiggsValidation(); + ~HiggsValidation() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; - virtual void analyze(edm::Event const&, edm::EventSetup const&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; + void analyze(edm::Event const&, edm::EventSetup const&) override; private: WeightManager wmanager_; diff --git a/Validation/EventGenerator/interface/TTbarSpinCorrHepMCAnalyzer.h b/Validation/EventGenerator/interface/TTbarSpinCorrHepMCAnalyzer.h index b7d788713592f..98340da1efa14 100644 --- a/Validation/EventGenerator/interface/TTbarSpinCorrHepMCAnalyzer.h +++ b/Validation/EventGenerator/interface/TTbarSpinCorrHepMCAnalyzer.h @@ -55,10 +55,10 @@ class TTbarSpinCorrHepMCAnalyzer : public DQMEDAnalyzer { public: explicit TTbarSpinCorrHepMCAnalyzer(const edm::ParameterSet&); - ~TTbarSpinCorrHepMCAnalyzer(); + ~TTbarSpinCorrHepMCAnalyzer() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/Validation/EventGenerator/interface/TTbar_GenJetAnalyzer.h b/Validation/EventGenerator/interface/TTbar_GenJetAnalyzer.h index e2ca1e29d5343..7b7485bedcb94 100644 --- a/Validation/EventGenerator/interface/TTbar_GenJetAnalyzer.h +++ b/Validation/EventGenerator/interface/TTbar_GenJetAnalyzer.h @@ -55,10 +55,10 @@ class TTbar_GenJetAnalyzer : public DQMEDAnalyzer { public: explicit TTbar_GenJetAnalyzer(const edm::ParameterSet&); - ~TTbar_GenJetAnalyzer(); + ~TTbar_GenJetAnalyzer() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: diff --git a/Validation/EventGenerator/interface/TTbar_GenLepAnalyzer.h b/Validation/EventGenerator/interface/TTbar_GenLepAnalyzer.h index 0e45f723fda5a..4d68e2189c9a3 100644 --- a/Validation/EventGenerator/interface/TTbar_GenLepAnalyzer.h +++ b/Validation/EventGenerator/interface/TTbar_GenLepAnalyzer.h @@ -53,10 +53,10 @@ class TTbar_GenLepAnalyzer : public DQMEDAnalyzer { public: explicit TTbar_GenLepAnalyzer(const edm::ParameterSet&); - ~TTbar_GenLepAnalyzer(); + ~TTbar_GenLepAnalyzer() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: // ----------member data --------------------------- diff --git a/Validation/EventGenerator/interface/TTbar_Kinematics.h b/Validation/EventGenerator/interface/TTbar_Kinematics.h index 4c54c307246de..02337fc39b61a 100644 --- a/Validation/EventGenerator/interface/TTbar_Kinematics.h +++ b/Validation/EventGenerator/interface/TTbar_Kinematics.h @@ -57,10 +57,10 @@ class TTbar_Kinematics : public DQMEDAnalyzer { public: explicit TTbar_Kinematics(const edm::ParameterSet&); - ~TTbar_Kinematics(); + ~TTbar_Kinematics() override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: diff --git a/Validation/EventGenerator/interface/TauValidation.h b/Validation/EventGenerator/interface/TauValidation.h index 000101d30670e..6266cffbe3421 100644 --- a/Validation/EventGenerator/interface/TauValidation.h +++ b/Validation/EventGenerator/interface/TauValidation.h @@ -54,10 +54,10 @@ class TauValidation : public DQMEDAnalyzer public: explicit TauValidation(const edm::ParameterSet&); - virtual ~TauValidation(); - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; - virtual void analyze(edm::Event const&, edm::EventSetup const&) override; + ~TauValidation() override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; + void analyze(edm::Event const&, edm::EventSetup const&) override; private: // WeightManager wmanager_; diff --git a/Validation/EventGenerator/interface/WValidation.h b/Validation/EventGenerator/interface/WValidation.h index 5fd68c863e18b..77d0eb32fb85d 100644 --- a/Validation/EventGenerator/interface/WValidation.h +++ b/Validation/EventGenerator/interface/WValidation.h @@ -35,10 +35,10 @@ class WValidation : public DQMEDAnalyzer{ public: explicit WValidation(const edm::ParameterSet&); - virtual ~WValidation(); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; + ~WValidation() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; private: diff --git a/Validation/EventGenerator/plugins/BasicHepMCValidation.cc b/Validation/EventGenerator/plugins/BasicHepMCValidation.cc index 874255386116e..97205b673d5ca 100644 --- a/Validation/EventGenerator/plugins/BasicHepMCValidation.cc +++ b/Validation/EventGenerator/plugins/BasicHepMCValidation.cc @@ -221,7 +221,7 @@ void BasicHepMCValidation::analyze(const edm::Event& iEvent,const edm::EventSetu double charge = 999.; // for the charge it's needed a HepPDT method int status = ptcl->status(); const HepPDT::ParticleData* PData = fPDGTable->particle(HepPDT::ParticleID(Id)); - if(PData==0) { + if(PData==nullptr) { // std::cout << "Unknown id = " << Id << '\n'; ++unknownPDTNum; } diff --git a/Validation/EventGenerator/plugins/DrellYanValidation.cc b/Validation/EventGenerator/plugins/DrellYanValidation.cc index 2af1a2b46f713..c91864ae83fb1 100644 --- a/Validation/EventGenerator/plugins/DrellYanValidation.cc +++ b/Validation/EventGenerator/plugins/DrellYanValidation.cc @@ -36,7 +36,7 @@ void DrellYanValidation::bookHistograms(DQMStore::IBooker &i, edm::Run const &, ///Setting the DQM top directories std::string folderName = "Generator/DrellYan"; folderName+=_name; - DQMHelper dqm(&i); i.setCurrentFolder(folderName.c_str()); + DQMHelper dqm(&i); i.setCurrentFolder(folderName); // Number of analyzed events nEvt = dqm.book1dHisto("nEvt", "n analyzed Events", 1, 0., 1.,"bin","Number of Events"); @@ -180,7 +180,7 @@ void DrellYanValidation::analyze(const edm::Event& iEvent,const edm::EventSetup& std::sort(gammasMomenta.begin(), gammasMomenta.end(), HepMCValidationHelper::GreaterByE); //fill gamma histograms - if (gammasMomenta.size() != 0 && dilepton_andphoton_mom.M() > 50.) { + if (!gammasMomenta.empty() && dilepton_andphoton_mom.M() > 50.) { gamma_energy->Fill(gammasMomenta.front().E(),weight); double dphi = lep1.DeltaR(gammasMomenta.front()) < lep2.DeltaR(gammasMomenta.front()) ? lep1.DeltaPhi(gammasMomenta.front()) : lep2.DeltaPhi(gammasMomenta.front()); diff --git a/Validation/EventGenerator/plugins/HiggsValidation.cc b/Validation/EventGenerator/plugins/HiggsValidation.cc index 30889e7b996fc..55654e6a4d84c 100644 --- a/Validation/EventGenerator/plugins/HiggsValidation.cc +++ b/Validation/EventGenerator/plugins/HiggsValidation.cc @@ -47,7 +47,7 @@ void HiggsValidation::bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm //decay type std::string channel = particle_name+"_DecayChannels"; - HiggsDecayChannels = dqm.book1dHisto(channel.c_str(),(particle_name+" decay channels").c_str(),monitoredDecays->size(),0,monitoredDecays->size(),"Decay Channels","Number of Events"); + HiggsDecayChannels = dqm.book1dHisto(channel,particle_name+" decay channels",monitoredDecays->size(),0,monitoredDecays->size(),"Decay Channels","Number of Events"); for(size_t j = 0; j < monitoredDecays->size(); ++j){ HiggsDecayChannels->setBinLabel(1+j,monitoredDecays->channel(j)); diff --git a/Validation/EventGenerator/plugins/MBUEandQCDValidation.cc b/Validation/EventGenerator/plugins/MBUEandQCDValidation.cc index e1b96b07aff9c..20fcc3d0f1ab7 100644 --- a/Validation/EventGenerator/plugins/MBUEandQCDValidation.cc +++ b/Validation/EventGenerator/plugins/MBUEandQCDValidation.cc @@ -254,7 +254,7 @@ void MBUEandQCDValidation::analyze(const edm::Event& iEvent,const edm::EventSetu if ( (*iter)->status() == 1) { hepmcGPCollection.push_back(*iter); const HepPDT::ParticleData* PData = fPDGTable->particle(HepPDT::ParticleID((*iter)->pdg_id())); - if(PData==0) { charge = -999.; } + if(PData==nullptr) { charge = -999.; } else charge = PData->charge(); diff --git a/Validation/EventGenerator/plugins/MBUEandQCDValidation.h b/Validation/EventGenerator/plugins/MBUEandQCDValidation.h index 08eb41032ce54..f7c4ea57ff76d 100644 --- a/Validation/EventGenerator/plugins/MBUEandQCDValidation.h +++ b/Validation/EventGenerator/plugins/MBUEandQCDValidation.h @@ -38,11 +38,11 @@ class MBUEandQCDValidation : public DQMEDAnalyzer { public: explicit MBUEandQCDValidation(const edm::ParameterSet&); - virtual ~MBUEandQCDValidation(); + ~MBUEandQCDValidation() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; - virtual void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override; + void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; private: WeightManager wmanager_; diff --git a/Validation/EventGenerator/plugins/TTbarSpinCorrHepMCAnalyzer.cc b/Validation/EventGenerator/plugins/TTbarSpinCorrHepMCAnalyzer.cc index 80456f29d0650..d89c23ad73b9d 100644 --- a/Validation/EventGenerator/plugins/TTbarSpinCorrHepMCAnalyzer.cc +++ b/Validation/EventGenerator/plugins/TTbarSpinCorrHepMCAnalyzer.cc @@ -36,8 +36,8 @@ void TTbarSpinCorrHepMCAnalyzer::analyze(const edm::Event& iEvent, const edm::Ev Handle genParticles; iEvent.getByToken(genParticlesTagToken_, genParticles); - const reco::GenParticle * _lepton (0) ; - const reco::GenParticle * _leptonBar(0) ; + const reco::GenParticle * _lepton (nullptr) ; + const reco::GenParticle * _leptonBar(nullptr) ; bool hasTop(false), hasTopbar(false); for(size_t i = 0; i < genParticles->size(); ++ i) { @@ -62,8 +62,8 @@ void TTbarSpinCorrHepMCAnalyzer::analyze(const edm::Event& iEvent, const edm::Ev if (_lepton && _leptonBar) { - math::XYZTLorentzVector lepton = _lepton ->p4() ; - math::XYZTLorentzVector leptonBar = _leptonBar->p4() ; + const math::XYZTLorentzVector& lepton = _lepton ->p4() ; + const math::XYZTLorentzVector& leptonBar = _leptonBar->p4() ; double deltaPhi = fabs(TVector2::Phi_mpi_pi(lepton.phi() - leptonBar.phi())) ; _h_deltaPhi->Fill(deltaPhi, weight) ; diff --git a/Validation/EventGenerator/plugins/TauValidation.cc b/Validation/EventGenerator/plugins/TauValidation.cc index e174b79877f29..64642c1eac8cd 100644 --- a/Validation/EventGenerator/plugins/TauValidation.cc +++ b/Validation/EventGenerator/plugins/TauValidation.cc @@ -720,7 +720,7 @@ void TauValidation::photons(const reco::GenParticle* tau, double weight){ std::vector ListofBrem; ListofBrem.clear(); std::vector FSR_photos; FSR_photos.clear(); double BosonScale(1); - if(TauList.size()>0){ + if(!TauList.empty()){ TauValidation::findFSRandBrem(TauList.at(0),passedW,ListofFSR,ListofBrem); TauValidation::FindPhotosFSR(TauList.at(0),FSR_photos,BosonScale); diff --git a/Validation/EventGenerator/plugins/WValidation.cc b/Validation/EventGenerator/plugins/WValidation.cc index 9a4b7d5fcac4f..45a82b8994502 100644 --- a/Validation/EventGenerator/plugins/WValidation.cc +++ b/Validation/EventGenerator/plugins/WValidation.cc @@ -31,7 +31,7 @@ void WValidation::bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::Ev ///Setting the DQM top directories std::string folderName = "Generator/W"; folderName+=_name; - DQMHelper dqm(&i); i.setCurrentFolder(folderName.c_str()); + DQMHelper dqm(&i); i.setCurrentFolder(folderName); // Number of analyzed events nEvt = dqm.book1dHisto("nEvt", "n analyzed Events", 1, 0., 1.,"bin","Number of Events"); @@ -167,7 +167,7 @@ void WValidation::analyze(const edm::Event& iEvent,const edm::EventSetup& iSetup std::sort(gammasMomenta.begin(), gammasMomenta.end(), HepMCValidationHelper::GreaterByE); //fill gamma histograms - if (gammasMomenta.size() != 0 && dilepton_andphoton_mom.M() > 50.) { + if (!gammasMomenta.empty() && dilepton_andphoton_mom.M() > 50.) { gamma_energy->Fill(gammasMomenta.front().E(),weight); double dphi = lep1.DeltaR(gammasMomenta.front()); cos_theta_gamma_lepton->Fill(cos(dphi),weight); diff --git a/Validation/EventGenerator/plugins/WeightManager.cc b/Validation/EventGenerator/plugins/WeightManager.cc index 132b27982b731..c338a11af3031 100644 --- a/Validation/EventGenerator/plugins/WeightManager.cc +++ b/Validation/EventGenerator/plugins/WeightManager.cc @@ -29,7 +29,7 @@ double WeightManager::weight(const Event& iEvent){ const HepMC::GenEvent *myGenEvent = evt->GetEvent(); double weight = 1.; - if (myGenEvent->weights().size() > 0) + if (!myGenEvent->weights().empty()) weight = myGenEvent->weights()[0]; return weight; } else { diff --git a/Validation/EventGenerator/src/CaloCellManager.cc b/Validation/EventGenerator/src/CaloCellManager.cc index ca07f8c44bbba..b5be60f189205 100644 --- a/Validation/EventGenerator/src/CaloCellManager.cc +++ b/Validation/EventGenerator/src/CaloCellManager.cc @@ -176,7 +176,7 @@ unsigned int CaloCellManager::getCellIndexFromAngle(double eta, double phi){ CaloCellId* CaloCellManager::getCellFromIndex(unsigned int id){ if ( id < theCellCollection.size() ) { return theCellCollection[id]; } - return NULL; + return nullptr; } diff --git a/Validation/EventGenerator/src/HepMCValidationHelper.cc b/Validation/EventGenerator/src/HepMCValidationHelper.cc index 8affc00179e1a..fd76fadda5f5d 100644 --- a/Validation/EventGenerator/src/HepMCValidationHelper.cc +++ b/Validation/EventGenerator/src/HepMCValidationHelper.cc @@ -184,7 +184,7 @@ namespace HepMCValidationHelper { for (unsigned int i = 0; i < taus.size(); ++i){ std::vector taudaughters; findDescendents(taus[i], taudaughters); - if ( taudaughters.size()<=0 ) { + if ( taudaughters.empty() ) { edm::LogError("HepMCValidationHelper") << "Tau with no daughters. This is a bug. Fix it"; abort(); } diff --git a/Validation/EventGenerator/src/WeightManager.cc b/Validation/EventGenerator/src/WeightManager.cc index 76e2b5d7cc9bd..4070231745935 100644 --- a/Validation/EventGenerator/src/WeightManager.cc +++ b/Validation/EventGenerator/src/WeightManager.cc @@ -29,7 +29,7 @@ double WeightManager::weight(const Event& iEvent){ const HepMC::GenEvent *myGenEvent = evt->GetEvent(); double weight = 1.; - if (myGenEvent->weights().size() > 0) + if (!myGenEvent->weights().empty()) weight = myGenEvent->weights()[0]; return weight; } else { diff --git a/Validation/Geometry/interface/MaterialBudget.h b/Validation/Geometry/interface/MaterialBudget.h index d4ec0c497c05d..fd020b2c750d4 100644 --- a/Validation/Geometry/interface/MaterialBudget.h +++ b/Validation/Geometry/interface/MaterialBudget.h @@ -30,17 +30,17 @@ class MaterialBudget : public SimWatcher, public: MaterialBudget(const edm::ParameterSet&); - virtual ~MaterialBudget(); + ~MaterialBudget() override; private: - MaterialBudget(const MaterialBudget&); // stop default - const MaterialBudget& operator=(const MaterialBudget&); // ... + MaterialBudget(const MaterialBudget&) = delete; // stop default + const MaterialBudget& operator=(const MaterialBudget&) = delete; // ... - void update(const BeginOfRun*); - void update(const BeginOfTrack*); - void update(const G4Step*); - void update(const EndOfTrack*); + void update(const BeginOfRun*) override; + void update(const BeginOfTrack*) override; + void update(const G4Step*) override; + void update(const EndOfTrack*) override; void book(const edm::ParameterSet&); bool stopAfter(const G4Step*); diff --git a/Validation/Geometry/interface/MaterialBudgetAction.h b/Validation/Geometry/interface/MaterialBudgetAction.h index bb1e85c2c1b48..b518393bbf228 100644 --- a/Validation/Geometry/interface/MaterialBudgetAction.h +++ b/Validation/Geometry/interface/MaterialBudgetAction.h @@ -37,18 +37,18 @@ class MaterialBudgetAction : public SimWatcher, { public: MaterialBudgetAction(const edm::ParameterSet&); - virtual ~MaterialBudgetAction(); + ~MaterialBudgetAction() override; private: MaterialBudgetAction(const MaterialBudgetAction&); // stop default const MaterialBudgetAction& operator=(const MaterialBudgetAction&); // stop default - void update(const BeginOfRun*); - void update(const BeginOfTrack*); - void update(const G4Step*); - void update(const EndOfTrack*); - void update(const EndOfRun*); + void update(const BeginOfRun*) override; + void update(const BeginOfTrack*) override; + void update(const G4Step*) override; + void update(const EndOfTrack*) override; + void update(const EndOfRun*) override; bool CheckTouchableInSelectedVolumes( const G4VTouchable* touch ); bool StopAfterProcess( const G4Step* aStep ); diff --git a/Validation/Geometry/interface/MaterialBudgetEcalHistos.h b/Validation/Geometry/interface/MaterialBudgetEcalHistos.h index c546291d5d44e..f5b2582fa52b0 100644 --- a/Validation/Geometry/interface/MaterialBudgetEcalHistos.h +++ b/Validation/Geometry/interface/MaterialBudgetEcalHistos.h @@ -13,11 +13,11 @@ class MaterialBudgetEcalHistos : public MaterialBudgetFormat MaterialBudgetEcalHistos( MaterialBudgetData* data, TestHistoMgr* mgr, const std::string& fileName ); - virtual ~MaterialBudgetEcalHistos(){ hend(); } + ~MaterialBudgetEcalHistos() override{ hend(); } - virtual void fillStartTrack(); - virtual void fillPerStep(); - virtual void fillEndTrack(); + void fillStartTrack() override; + void fillPerStep() override; + void fillEndTrack() override; private: diff --git a/Validation/Geometry/interface/MaterialBudgetForward.h b/Validation/Geometry/interface/MaterialBudgetForward.h index 43342eb5ba1b0..bb77c3f50208e 100644 --- a/Validation/Geometry/interface/MaterialBudgetForward.h +++ b/Validation/Geometry/interface/MaterialBudgetForward.h @@ -30,17 +30,17 @@ class MaterialBudgetForward : public SimWatcher, public: MaterialBudgetForward(const edm::ParameterSet&); - virtual ~MaterialBudgetForward(); + ~MaterialBudgetForward() override; private: - MaterialBudgetForward(const MaterialBudgetForward&); // stop default - const MaterialBudgetForward& operator=(const MaterialBudgetForward&); // ... + MaterialBudgetForward(const MaterialBudgetForward&) = delete; // stop default + const MaterialBudgetForward& operator=(const MaterialBudgetForward&) = delete; // ... - void update(const BeginOfRun*); - void update(const BeginOfTrack*); - void update(const G4Step*); - void update(const EndOfTrack*); + void update(const BeginOfRun*) override; + void update(const BeginOfTrack*) override; + void update(const G4Step*) override; + void update(const EndOfTrack*) override; void book(const edm::ParameterSet&); bool stopAfter(const G4Step*); diff --git a/Validation/Geometry/interface/MaterialBudgetHcal.h b/Validation/Geometry/interface/MaterialBudgetHcal.h index 93c18d8110751..fc48a5c3bc85e 100644 --- a/Validation/Geometry/interface/MaterialBudgetHcal.h +++ b/Validation/Geometry/interface/MaterialBudgetHcal.h @@ -24,17 +24,17 @@ class MaterialBudgetHcal : public SimWatcher, public: MaterialBudgetHcal(const edm::ParameterSet&); - virtual ~MaterialBudgetHcal(); + ~MaterialBudgetHcal() override; private: - MaterialBudgetHcal(const MaterialBudgetHcal&); // stop default - const MaterialBudgetHcal& operator=(const MaterialBudgetHcal&); // stop default + MaterialBudgetHcal(const MaterialBudgetHcal&) = delete; // stop default + const MaterialBudgetHcal& operator=(const MaterialBudgetHcal&) = delete; // stop default - void update(const BeginOfJob*); - void update(const BeginOfTrack*); - void update(const G4Step*); - void update(const EndOfTrack*); + void update(const BeginOfJob*) override; + void update(const BeginOfTrack*) override; + void update(const G4Step*) override; + void update(const EndOfTrack*) override; bool stopAfter(const G4Step*); diff --git a/Validation/Geometry/interface/MaterialBudgetHistos.h b/Validation/Geometry/interface/MaterialBudgetHistos.h index 511f6b14ef48c..c7d6e526db904 100644 --- a/Validation/Geometry/interface/MaterialBudgetHistos.h +++ b/Validation/Geometry/interface/MaterialBudgetHistos.h @@ -11,11 +11,11 @@ class MaterialBudgetHistos : public MaterialBudgetFormat MaterialBudgetHistos( MaterialBudgetData* data, TestHistoMgr* mgr, const std::string& fileName ); - virtual ~MaterialBudgetHistos(){ hend(); } + ~MaterialBudgetHistos() override{ hend(); } - virtual void fillStartTrack(); - virtual void fillPerStep(); - virtual void fillEndTrack(); + void fillStartTrack() override; + void fillPerStep() override; + void fillEndTrack() override; private: diff --git a/Validation/Geometry/interface/MaterialBudgetTrackerHistos.h b/Validation/Geometry/interface/MaterialBudgetTrackerHistos.h index f30fcfa64bafb..4c8015fbbd508 100644 --- a/Validation/Geometry/interface/MaterialBudgetTrackerHistos.h +++ b/Validation/Geometry/interface/MaterialBudgetTrackerHistos.h @@ -11,11 +11,11 @@ class MaterialBudgetTrackerHistos : public MaterialBudgetFormat MaterialBudgetTrackerHistos( MaterialBudgetData* data, TestHistoMgr* mgr, const std::string& fileName ); - virtual ~MaterialBudgetTrackerHistos(){ hend(); } + ~MaterialBudgetTrackerHistos() override{ hend(); } - virtual void fillStartTrack(); - virtual void fillPerStep(); - virtual void fillEndTrack(); + void fillStartTrack() override; + void fillPerStep() override; + void fillEndTrack() override; private: diff --git a/Validation/Geometry/interface/MaterialBudgetTree.h b/Validation/Geometry/interface/MaterialBudgetTree.h index 600e597b622ae..bc1401442d8be 100644 --- a/Validation/Geometry/interface/MaterialBudgetTree.h +++ b/Validation/Geometry/interface/MaterialBudgetTree.h @@ -15,11 +15,11 @@ class MaterialBudgetTree : public MaterialBudgetFormat public: MaterialBudgetTree( MaterialBudgetData* data, const std::string& fileName ); - virtual ~MaterialBudgetTree(){ hend(); } + ~MaterialBudgetTree() override{ hend(); } - virtual void fillStartTrack(); - virtual void fillPerStep(); - virtual void fillEndTrack(); + void fillStartTrack() override; + void fillPerStep() override; + void fillEndTrack() override; private: diff --git a/Validation/Geometry/interface/MaterialBudgetTxt.h b/Validation/Geometry/interface/MaterialBudgetTxt.h index c3edc5d20a2cc..5c7f2d7e6b610 100644 --- a/Validation/Geometry/interface/MaterialBudgetTxt.h +++ b/Validation/Geometry/interface/MaterialBudgetTxt.h @@ -10,11 +10,11 @@ class MaterialBudgetTxt : public MaterialBudgetFormat { public: MaterialBudgetTxt( MaterialBudgetData* data, const std::string& fileName ); - virtual ~MaterialBudgetTxt(); + ~MaterialBudgetTxt() override; - virtual void fillStartTrack(); - virtual void fillPerStep(); - virtual void fillEndTrack(); + void fillStartTrack() override; + void fillPerStep() override; + void fillEndTrack() override; private: std::ofstream* theFile; diff --git a/Validation/Geometry/src/MaterialBudget.cc b/Validation/Geometry/src/MaterialBudget.cc index 015190da1f4b5..739661b2de1dd 100644 --- a/Validation/Geometry/src/MaterialBudget.cc +++ b/Validation/Geometry/src/MaterialBudget.cc @@ -64,7 +64,7 @@ void MaterialBudget::update(const BeginOfRun* ) { unsigned int kount=detNames.size(); for (unsigned int ii=0; iibegin(); lvcite != lvs->end(); lvcite++) { for (unsigned int ii=0; iiGetName(); + if (logVolumes[ii] != nullptr) name = logVolumes[ii]->GetName(); edm::LogInfo("MaterialBudget") << "LV[" << ii << "] : " << detNames[ii] << " Address " << logVolumes[ii] << " | " << name; @@ -265,7 +265,7 @@ void MaterialBudget::book(const edm::ParameterSet& m_p) { bool MaterialBudget::stopAfter(const G4Step* aStep) { G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition(); - if (aStep->GetPostStepPoint() != 0) + if (aStep->GetPostStepPoint() != nullptr) hitPoint = aStep->GetPostStepPoint()->GetPosition(); double rr = hitPoint.perp(); double zz = std::abs(hitPoint.z()); diff --git a/Validation/Geometry/src/MaterialBudgetAction.cc b/Validation/Geometry/src/MaterialBudgetAction.cc index 90ef1338873d9..bb308521d1c39 100644 --- a/Validation/Geometry/src/MaterialBudgetAction.cc +++ b/Validation/Geometry/src/MaterialBudgetAction.cc @@ -29,7 +29,7 @@ //------------------------------------------------------------------------- MaterialBudgetAction::MaterialBudgetAction(const edm::ParameterSet& iPSet) - : theHistoMgr(0) + : theHistoMgr(nullptr) { theData = new MaterialBudgetData; @@ -157,7 +157,7 @@ void MaterialBudgetAction::update(const BeginOfRun* ) int siz = partTable->size(); for (int ii= 0; ii < siz; ii++) { G4ParticleDefinition * particle = partTable->GetParticle(ii); - std::string particleName = particle->GetParticleName(); + const std::string& particleName = particle->GetParticleName(); //--- All processes of this particle G4ProcessManager * pmanager = particle->GetProcessManager(); @@ -238,7 +238,7 @@ void MaterialBudgetAction::update(const BeginOfTrack* trk) void MaterialBudgetAction::update(const G4Step* aStep) { //----- Check it is inside one of the volumes selected - if( theVolumeList.size() != 0 ) { + if( !theVolumeList.empty() ) { if( !CheckTouchableInSelectedVolumes( aStep->GetTrack()->GetTouchable() ) ) return; } @@ -343,7 +343,7 @@ bool MaterialBudgetAction::StopAfterProcess( const G4Step* aStep ) { if( theProcessToStop == "" ) return false; - if(aStep->GetPostStepPoint()->GetProcessDefinedStep() == NULL) return false; + if(aStep->GetPostStepPoint()->GetProcessDefinedStep() == nullptr) return false; if( aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() == theProcessToStop ) { std::cout << " MaterialBudgetAction::StopAfterProcess " << aStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName() << std::endl; return true; diff --git a/Validation/Geometry/src/MaterialBudgetCastorHistos.cc b/Validation/Geometry/src/MaterialBudgetCastorHistos.cc index 2d9962526af16..ab3ff56ec82d6 100644 --- a/Validation/Geometry/src/MaterialBudgetCastorHistos.cc +++ b/Validation/Geometry/src/MaterialBudgetCastorHistos.cc @@ -81,7 +81,7 @@ void MaterialBudgetCastorHistos::fillPerStep(const G4Step* aStep) { int id2Old = id2; const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable(); std::string name = touch->GetVolume(0)->GetName(); - std::string matName = material->GetName(); + const std::string& matName = material->GetName(); if (printSum) { bool found = false; for (unsigned int ii=0; iiGetMomentum() ; - if( myMaterialBudgetCategorizer == 0) myMaterialBudgetCategorizer = new MaterialBudgetCategorizer; + if( myMaterialBudgetCategorizer == nullptr) myMaterialBudgetCategorizer = new MaterialBudgetCategorizer; theStepN=0; theTotalMB=0; @@ -204,7 +204,7 @@ void MaterialBudgetData::dataPerStep( const G4Step* aStep ) // FIXME: Both volume ID and material ID are zeros, so this part is not executed leaving all // values as zeros. - if(myMaterialBudgetCategorizer->x0fraction(materialName).size() > 0) + if(!myMaterialBudgetCategorizer->x0fraction(materialName).empty()) { theSupportFractionMB = myMaterialBudgetCategorizer->x0fraction(materialName).at(0); theSensitiveFractionMB = myMaterialBudgetCategorizer->x0fraction(materialName).at(1); @@ -240,7 +240,7 @@ void MaterialBudgetData::dataPerStep( const G4Step* aStep ) G4VPhysicalVolume* pv = aStep->GetPreStepPoint()->GetPhysicalVolume(); const G4VTouchable* t = aStep->GetPreStepPoint()->GetTouchable(); - G4ThreeVector objectTranslation = t->GetTranslation(); + const G4ThreeVector& objectTranslation = t->GetTranslation(); const G4RotationMatrix* objectRotation = t->GetRotation(); const G4VProcess* interactionPre = prePoint->GetProcessDefinedStep(); const G4VProcess* interactionPost = postPoint->GetProcessDefinedStep(); diff --git a/Validation/Geometry/src/MaterialBudgetForward.cc b/Validation/Geometry/src/MaterialBudgetForward.cc index 372ceb69ad5a0..cf1296189aab9 100644 --- a/Validation/Geometry/src/MaterialBudgetForward.cc +++ b/Validation/Geometry/src/MaterialBudgetForward.cc @@ -65,7 +65,7 @@ void MaterialBudgetForward::update(const BeginOfRun* ) { unsigned int kount=detNames.size(); for (unsigned int ii=0; iibegin(); lvcite != lvs->end(); lvcite++) { for (unsigned int ii=0; iiGetName(); + if (logVolumes[ii] != nullptr) name = logVolumes[ii]->GetName(); edm::LogInfo("MaterialBudget") << "LV[" << ii << "] : " << detNames[ii] << " Address " << logVolumes[ii] << " | " << name; @@ -279,7 +279,7 @@ void MaterialBudgetForward::book(const edm::ParameterSet& m_p) { bool MaterialBudgetForward::stopAfter(const G4Step* aStep) { G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition(); - if (aStep->GetPostStepPoint() != 0) + if (aStep->GetPostStepPoint() != nullptr) hitPoint = aStep->GetPostStepPoint()->GetPosition(); double rr = hitPoint.perp(); double zz = std::abs(hitPoint.z()); diff --git a/Validation/Geometry/src/MaterialBudgetHcal.cc b/Validation/Geometry/src/MaterialBudgetHcal.cc index a0aa4b9070b03..6217218bbb17d 100644 --- a/Validation/Geometry/src/MaterialBudgetHcal.cc +++ b/Validation/Geometry/src/MaterialBudgetHcal.cc @@ -18,7 +18,7 @@ #include MaterialBudgetHcal::MaterialBudgetHcal(const edm::ParameterSet& p): - theHistoHcal(0), theHistoCastor(0) { + theHistoHcal(nullptr), theHistoCastor(nullptr) { edm::ParameterSet m_p = p.getParameter("MaterialBudgetHcal"); rMax = m_p.getUntrackedParameter("RMax", 4.5)*CLHEP::m; diff --git a/Validation/Geometry/src/MaterialBudgetHcalHistos.cc b/Validation/Geometry/src/MaterialBudgetHcalHistos.cc index 7dc7c5b7e7113..db8b719380ac7 100644 --- a/Validation/Geometry/src/MaterialBudgetHcalHistos.cc +++ b/Validation/Geometry/src/MaterialBudgetHcalHistos.cc @@ -132,7 +132,7 @@ void MaterialBudgetHcalHistos::fillPerStep(const G4Step* aStep) { int idOld = id; const G4VTouchable* touch = aStep->GetPreStepPoint()->GetTouchable(); std::string name = touch->GetVolume(0)->GetName(); - std::string matName = material->GetName(); + const std::string& matName = material->GetName(); if (printSum) { bool found = false; for (unsigned int ii=0; ii -#include +#include #include #include #include @@ -115,8 +115,8 @@ class GlobalDigisAnalyzer : public DQMEDAnalyzer typedef std::map > MapType; explicit GlobalDigisAnalyzer(const edm::ParameterSet&); - virtual ~GlobalDigisAnalyzer(); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~GlobalDigisAnalyzer() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; protected: void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/GlobalDigis/interface/GlobalDigisHistogrammer.h b/Validation/GlobalDigis/interface/GlobalDigisHistogrammer.h index 4744b645bfc35..658a8f8d8e554 100644 --- a/Validation/GlobalDigis/interface/GlobalDigisHistogrammer.h +++ b/Validation/GlobalDigis/interface/GlobalDigisHistogrammer.h @@ -38,12 +38,12 @@ //#include #include -#include +#include #include #include #include #include -#include +#include #include "TString.h" #include "DQMServices/Core/interface/MonitorElement.h" @@ -59,8 +59,8 @@ class GlobalDigisHistogrammer : public DQMEDAnalyzer { typedef std::map > MapType; explicit GlobalDigisHistogrammer(const edm::ParameterSet&); - virtual ~GlobalDigisHistogrammer(); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~GlobalDigisHistogrammer() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/GlobalDigis/interface/GlobalDigisProducer.h b/Validation/GlobalDigis/interface/GlobalDigisProducer.h index efdef46daa6d4..a36a7064c6a9a 100644 --- a/Validation/GlobalDigis/interface/GlobalDigisProducer.h +++ b/Validation/GlobalDigis/interface/GlobalDigisProducer.h @@ -90,7 +90,7 @@ //#include #include -#include +#include #include #include #include @@ -111,10 +111,10 @@ class GlobalDigisProducer : public edm::EDProducer typedef std::map > MapType; explicit GlobalDigisProducer(const edm::ParameterSet&); - virtual ~GlobalDigisProducer(); - virtual void beginJob( void ); - virtual void endJob(); - virtual void produce(edm::Event&, const edm::EventSetup&); + ~GlobalDigisProducer() override; + void beginJob( void ) override; + void endJob() override; + void produce(edm::Event&, const edm::EventSetup&) override; private: diff --git a/Validation/GlobalDigis/src/GlobalDigisAnalyzer.cc b/Validation/GlobalDigis/src/GlobalDigisAnalyzer.cc index e22f048e94ff6..ace728553af1c 100644 --- a/Validation/GlobalDigis/src/GlobalDigisAnalyzer.cc +++ b/Validation/GlobalDigis/src/GlobalDigisAnalyzer.cc @@ -133,9 +133,9 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co "TIDW1", "TIDW2", "TIDW3", "TOBL1", "TOBL2", "TOBL3", "TOBL4"}; for(int i = 0; i<19; ++i) { - mehSiStripn[i]=0; - mehSiStripADC[i]=0; - mehSiStripStrip[i]=0; + mehSiStripn[i]=nullptr; + mehSiStripADC[i]=nullptr; + mehSiStripStrip[i]=nullptr; } std::string hcharname, hchartitle; iBooker.setCurrentFolder("GlobalDigisV/SiStrips"); @@ -170,11 +170,11 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co double ProfileUpper[4] = {1.,1.,1.,1.}; for(int i =0; i<4; ++i) { - mehHcaln[i]=0; - mehHcalAEE[i]=0; - mehHcalSHE[i]=0; - mehHcalAEESHE[i]=0; - mehHcalSHEvAEE[i]=0; + mehHcaln[i]=nullptr; + mehHcalAEE[i]=nullptr; + mehHcalSHE[i]=nullptr; + mehHcalAEESHE[i]=nullptr; + mehHcalSHEvAEE[i]=nullptr; } iBooker.setCurrentFolder("GlobalDigisV/HCals"); @@ -221,12 +221,12 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co std::string ECalString[2] = {"EB","EE"}; for(int i =0; i<2; ++i) { - mehEcaln[i]=0; - mehEcalAEE[i]=0; - mehEcalSHE[i]=0; - mehEcalMaxPos[i]=0; - mehEcalMultvAEE[i]=0; - mehEcalSHEvAEESHE[i]=0; + mehEcaln[i]=nullptr; + mehEcalAEE[i]=nullptr; + mehEcalSHE[i]=nullptr; + mehEcalMaxPos[i]=nullptr; + mehEcalMultvAEE[i]=nullptr; + mehEcalSHEvAEESHE[i]=nullptr; } iBooker.setCurrentFolder("GlobalDigisV/ECals"); @@ -269,7 +269,7 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co mehEcalMultvAEE[amend]->setAxisTitle("Analog Equivalent Energy",1); mehEcalMultvAEE[amend]->setAxisTitle("Number of Digis",2); } - mehEScaln = 0; + mehEScaln = nullptr; hcharname = "hEcaln_ES"; hchartitle= "ESCAL digis"; @@ -279,7 +279,7 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co std::string ADCNumber[3] = {"0", "1", "2"}; for(int i =0; i<3; ++i) { - mehEScalADC[i] = 0; + mehEScalADC[i] = nullptr; hcharname = "hEcalADC"+ADCNumber[i]+"_ES"; hchartitle= "ESCAL ADC"+ADCNumber[i]; mehEScalADC[i] = iBooker.book1D(hcharname,hchartitle, 1500, 0., 1500.); @@ -291,10 +291,10 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co std::string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p", "FWD2n", "FWD2p"}; for(int j =0; j<7; ++j) { - mehSiPixeln[j]=0; - mehSiPixelADC[j]=0; - mehSiPixelRow[j]=0; - mehSiPixelCol[j]=0; + mehSiPixeln[j]=nullptr; + mehSiPixelADC[j]=nullptr; + mehSiPixelRow[j]=nullptr; + mehSiPixelCol[j]=nullptr; } iBooker.setCurrentFolder("GlobalDigisV/SiPixels"); @@ -332,10 +332,10 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co std::string MuonString[4] = {"MB1", "MB2", "MB3", "MB4"}; for(int i =0; i < 4; ++i) { - mehDtMuonn[i] = 0; - mehDtMuonLayer[i] = 0; - mehDtMuonTime[i] = 0; - mehDtMuonTimevLayer[i] = 0; + mehDtMuonn[i] = nullptr; + mehDtMuonLayer[i] = nullptr; + mehDtMuonTime[i] = nullptr; + mehDtMuonTimevLayer[i] = nullptr; } for(int j = 0; j < 4; ++j) { @@ -366,28 +366,28 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co } //CSC - mehCSCStripn = 0; + mehCSCStripn = nullptr; hcharname = "hCSCStripn"; hchartitle = "CSC Strip digis"; mehCSCStripn = iBooker.book1D(hcharname,hchartitle,250, 0., 500.); mehCSCStripn->setAxisTitle("Number of Digis",1); mehCSCStripn->setAxisTitle("Count",2); - mehCSCStripADC = 0; + mehCSCStripADC = nullptr; hcharname = "hCSCStripADC"; hchartitle = "CSC Strip ADC"; mehCSCStripADC = iBooker.book1D(hcharname,hchartitle, 110, 0., 1100.); mehCSCStripADC->setAxisTitle("ADC",1); mehCSCStripADC->setAxisTitle("Count",2); - mehCSCWiren = 0; + mehCSCWiren = nullptr; hcharname = "hCSCWiren"; hchartitle = "CSC Wire digis"; mehCSCWiren = iBooker.book1D(hcharname,hchartitle,250, 0., 500.); mehCSCWiren->setAxisTitle("Number of Digis",1); mehCSCWiren->setAxisTitle("Count",2); - mehCSCWireTime = 0; + mehCSCWireTime = nullptr; hcharname = "hCSCWireTime"; hchartitle = "CSC Wire Time"; mehCSCWireTime = iBooker.book1D(hcharname,hchartitle,10, 0., 10.); @@ -395,7 +395,7 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co mehCSCWireTime->setAxisTitle("Count",2); // RPC - mehRPCMuonn = 0; + mehRPCMuonn = nullptr; hcharname = "hRPCMuonn"; hchartitle = "RPC digis"; mehCSCStripn = iBooker.book1D(hcharname,hchartitle,250, 0., 500.); @@ -404,7 +404,7 @@ void GlobalDigisAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run co std::string MuonRPCString[5] = {"Wmin2", "Wmin1", "W0", "Wpu1", "Wpu2"}; for(int i =0; i < 5; ++i) { - mehRPCRes[i] = 0; + mehRPCRes[i] = nullptr; } for(int j = 0; j < 5; ++j) { @@ -536,7 +536,7 @@ void GlobalDigisAnalyzer::fillECal(const edm::Event& iEvent, validDigiEB = false; } if (validDigiEB) { - if ( EcalDigiEB->size() == 0) isBarrel = false; + if ( EcalDigiEB->empty()) isBarrel = false; if (isBarrel) { @@ -658,7 +658,7 @@ void GlobalDigisAnalyzer::fillECal(const edm::Event& iEvent, validDigiEE = false; } if (validDigiEE) { - if (EcalDigiEE->size() == 0) isEndCap = false; + if (EcalDigiEE->empty()) isEndCap = false; if (isEndCap) { @@ -786,7 +786,7 @@ void GlobalDigisAnalyzer::fillECal(const edm::Event& iEvent, validDigiES = false; if (validDigiES) { - if (EcalDigiES->size() == 0) isPreshower = false; + if (EcalDigiES->empty()) isPreshower = false; if (isPreshower) { diff --git a/Validation/GlobalDigis/src/GlobalDigisHistogrammer.cc b/Validation/GlobalDigis/src/GlobalDigisHistogrammer.cc index 929ba9c10e20d..d996702c84303 100644 --- a/Validation/GlobalDigis/src/GlobalDigisHistogrammer.cc +++ b/Validation/GlobalDigis/src/GlobalDigisHistogrammer.cc @@ -87,9 +87,9 @@ void GlobalDigisHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, "TIDW2", "TIDW3", "TOBL1", "TOBL2", "TOBL3", "TOBL4"}; for (int i = 0; i < 19; ++i) { - mehSiStripn[i] = 0; - mehSiStripADC[i] = 0; - mehSiStripStrip[i] = 0; + mehSiStripn[i] = nullptr; + mehSiStripADC[i] = nullptr; + mehSiStripStrip[i] = nullptr; } ibooker.setCurrentFolder("GlobalDigisV/SiStrips"); @@ -121,11 +121,11 @@ void GlobalDigisHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, double ProfileUpper[4] = {1., 1., 1., 20.}; for (int i =0; i<4; ++i) { - mehHcaln[i] = 0; - mehHcalAEE[i] = 0; - mehHcalSHE[i] = 0; - mehHcalAEESHE[i] = 0; - mehHcalSHEvAEE[i] = 0; + mehHcaln[i] = nullptr; + mehHcalAEE[i] = nullptr; + mehHcalSHE[i] = nullptr; + mehHcalAEESHE[i] = nullptr; + mehHcalSHEvAEE[i] = nullptr; } ibooker.setCurrentFolder("GlobalDigisV/HCals"); @@ -165,12 +165,12 @@ void GlobalDigisHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, std::string ECalString[2] = {"EB","EE"}; for (int i = 0; i < 2; ++i) { - mehEcaln[i] = 0; - mehEcalAEE[i] = 0; - mehEcalSHE[i] = 0; - mehEcalMaxPos[i] = 0; - mehEcalMultvAEE[i] = 0; - mehEcalSHEvAEESHE[i] = 0; + mehEcaln[i] = nullptr; + mehEcalAEE[i] = nullptr; + mehEcalSHE[i] = nullptr; + mehEcalMaxPos[i] = nullptr; + mehEcalMultvAEE[i] = nullptr; + mehEcalSHEvAEESHE[i] = nullptr; } ibooker.setCurrentFolder("GlobalDigisV/ECals"); @@ -210,13 +210,13 @@ void GlobalDigisHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, mehEcalMultvAEE[amend]->setAxisTitle("Number of Digis", 2); } - mehEcaln[2] = 0; + mehEcaln[2] = nullptr; mehEcaln[2] = ibooker.book1D("hEcaln_ES", "ESCAL digis", 100, 0., 500.); mehEcaln[2]->setAxisTitle("Number of Digis", 1); mehEcaln[2]->setAxisTitle("Count", 2); std::string ADCNumber[3] = {"0", "1", "2"}; for (int i = 0; i < 3; ++i) { - mehEScalADC[i] = 0; + mehEScalADC[i] = nullptr; mehEScalADC[i] = ibooker.book1D( "hEcalADC" + ADCNumber[i] + "_ES","ESCAL ADC" + ADCNumber[i], 150, 950., 1500.); @@ -229,10 +229,10 @@ void GlobalDigisHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, "FWD2p"}; for (int j = 0; j < 7; ++j) { - mehSiPixeln[j] = 0; - mehSiPixelADC[j] = 0; - mehSiPixelRow[j] = 0; - mehSiPixelCol[j] = 0; + mehSiPixeln[j] = nullptr; + mehSiPixelADC[j] = nullptr; + mehSiPixelRow[j] = nullptr; + mehSiPixelCol[j] = nullptr; } ibooker.setCurrentFolder("GlobalDigisV/SiPixels"); @@ -270,10 +270,10 @@ void GlobalDigisHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, std::string MuonString[4] = {"MB1", "MB2", "MB3", "MB4"}; for (int i = 0; i < 4; ++i) { - mehDtMuonn[i] = 0; - mehDtMuonLayer[i] = 0; - mehDtMuonTime[i] = 0; - mehDtMuonTimevLayer[i] = 0; + mehDtMuonn[i] = nullptr; + mehDtMuonLayer[i] = nullptr; + mehDtMuonTime[i] = nullptr; + mehDtMuonTimevLayer[i] = nullptr; } for (int j = 0; j < 4; ++j) { @@ -302,22 +302,22 @@ void GlobalDigisHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, // **** Have to do CSC and RPC now ***** //CSC - mehCSCStripn = 0; + mehCSCStripn = nullptr; mehCSCStripn = ibooker.book1D("hCSCStripn", "CSC Strip digis", 25, 0., 50.); mehCSCStripn->setAxisTitle("Number of Digis", 1); mehCSCStripn->setAxisTitle("Count", 2); - mehCSCStripADC = 0; + mehCSCStripADC = nullptr; mehCSCStripADC = ibooker.book1D("hCSCStripADC", "CSC Strip ADC", 110, 0., 1100.); mehCSCStripADC->setAxisTitle("ADC", 1); mehCSCStripADC->setAxisTitle("Count", 2); - mehCSCWiren = 0; + mehCSCWiren = nullptr; mehCSCWiren = ibooker.book1D("hCSCWiren", "CSC Wire digis", 25, 0., 50.); mehCSCWiren->setAxisTitle("Number of Digis", 1); mehCSCWiren->setAxisTitle("Count", 2); - mehCSCWireTime = 0; + mehCSCWireTime = nullptr; mehCSCWiren = ibooker.book1D("hCSCWireTime", "CSC Wire Time", 10, 0., 10.); mehCSCWiren->setAxisTitle("Time", 1); mehCSCWiren->setAxisTitle("Count", 2); diff --git a/Validation/GlobalDigis/src/GlobalDigisProducer.cc b/Validation/GlobalDigis/src/GlobalDigisProducer.cc index 26624f20bc08b..ce1d9a25bbba5 100644 --- a/Validation/GlobalDigis/src/GlobalDigisProducer.cc +++ b/Validation/GlobalDigis/src/GlobalDigisProducer.cc @@ -308,7 +308,7 @@ void GlobalDigisProducer::fillECal(edm::Event& iEvent, << "Unable to find EcalDigiEB in event!"; return; } - if ( EcalDigiEB->size() == 0) isBarrel = false; + if ( EcalDigiEB->empty()) isBarrel = false; if (isBarrel) { @@ -428,7 +428,7 @@ void GlobalDigisProducer::fillECal(edm::Event& iEvent, << "Unable to find EcalDigiEE in event!"; return; } - if (EcalDigiEE->size() == 0) isEndCap = false; + if (EcalDigiEE->empty()) isEndCap = false; if (isEndCap) { @@ -548,7 +548,7 @@ void GlobalDigisProducer::fillECal(edm::Event& iEvent, << "Unable to find EcalDigiES in event!"; return; } - if (EcalDigiES->size() == 0) isPreshower = false; + if (EcalDigiES->empty()) isPreshower = false; if (isPreshower) { diff --git a/Validation/GlobalHits/interface/GlobalHitsHistogrammer.h b/Validation/GlobalHits/interface/GlobalHitsHistogrammer.h index 0064eea6f469a..6e436e7e2ecb1 100644 --- a/Validation/GlobalHits/interface/GlobalHitsHistogrammer.h +++ b/Validation/GlobalHits/interface/GlobalHitsHistogrammer.h @@ -63,7 +63,7 @@ #include "CLHEP/Units/GlobalSystemOfUnits.h" #include -#include +#include #include #include #include @@ -78,8 +78,8 @@ class GlobalHitsHistogrammer : public DQMEDAnalyzer { //typedef std::vector FloatVector; explicit GlobalHitsHistogrammer(const edm::ParameterSet&); - virtual ~GlobalHitsHistogrammer(); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~GlobalHitsHistogrammer() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/GlobalHits/interface/GlobalHitsProdHistStripper.h b/Validation/GlobalHits/interface/GlobalHitsProdHistStripper.h index c012c4dd2b3f3..e322062548247 100644 --- a/Validation/GlobalHits/interface/GlobalHitsProdHistStripper.h +++ b/Validation/GlobalHits/interface/GlobalHitsProdHistStripper.h @@ -31,7 +31,7 @@ #include "CLHEP/Units/GlobalSystemOfUnits.h" #include -#include +#include #include #include #include @@ -47,12 +47,12 @@ class GlobalHitsProdHistStripper : public edm::EDAnalyzer //typedef std::vector FloatVector; explicit GlobalHitsProdHistStripper(const edm::ParameterSet&); - virtual ~GlobalHitsProdHistStripper(); - virtual void beginJob( void ); - virtual void endJob(); - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void beginRun(const edm::Run&, const edm::EventSetup&); - virtual void endRun(const edm::Run&, const edm::EventSetup&); + ~GlobalHitsProdHistStripper() override; + void beginJob( void ) override; + void endJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; + void endRun(const edm::Run&, const edm::EventSetup&) override; private: diff --git a/Validation/GlobalHits/interface/GlobalHitsTester.h b/Validation/GlobalHits/interface/GlobalHitsTester.h index 089acb22bed1a..afe1c66c79c3c 100644 --- a/Validation/GlobalHits/interface/GlobalHitsTester.h +++ b/Validation/GlobalHits/interface/GlobalHitsTester.h @@ -66,7 +66,7 @@ //#include "CLHEP/Units/GlobalSystemOfUnits.h" #include -#include +#include #include #include #include @@ -79,8 +79,8 @@ class GlobalHitsTester : public DQMEDAnalyzer public: explicit GlobalHitsTester(const edm::ParameterSet&); - virtual ~GlobalHitsTester(); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~GlobalHitsTester() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/GlobalHits/src/GlobalHitsHistogrammer.cc b/Validation/GlobalHits/src/GlobalHitsHistogrammer.cc index 4c068a9edf159..ffc10776deae1 100644 --- a/Validation/GlobalHits/src/GlobalHitsHistogrammer.cc +++ b/Validation/GlobalHits/src/GlobalHitsHistogrammer.cc @@ -62,55 +62,55 @@ void GlobalHitsHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, // initialize monitor elements for (Int_t i = 0; i < 2; ++i) { - meMCRGP[i] = 0; - meMCG4Vtx[i] = 0; - meGeantVtxX[i] = 0; - meGeantVtxY[i] = 0; - meGeantVtxZ[i] = 0; - meMCG4Trk[i] = 0; - meCaloEcal[i] = 0; - meCaloEcalE[i] = 0; - meCaloEcalToF[i] = 0; - meCaloPreSh[i] = 0; - meCaloPreShE[i] = 0; - meCaloPreShToF[i] = 0; - meCaloHcal[i] = 0; - meCaloHcalE[i] = 0; - meCaloHcalToF[i] = 0; - meTrackerPx[i] = 0; - meTrackerSi[i] = 0; - meMuon[i] = 0; - meMuonDtToF[i] = 0; - meMuonCscToF[i] = 0; - meMuonRpcFToF[i] = 0; - meMuonRpcBToF[i] = 0; + meMCRGP[i] = nullptr; + meMCG4Vtx[i] = nullptr; + meGeantVtxX[i] = nullptr; + meGeantVtxY[i] = nullptr; + meGeantVtxZ[i] = nullptr; + meMCG4Trk[i] = nullptr; + meCaloEcal[i] = nullptr; + meCaloEcalE[i] = nullptr; + meCaloEcalToF[i] = nullptr; + meCaloPreSh[i] = nullptr; + meCaloPreShE[i] = nullptr; + meCaloPreShToF[i] = nullptr; + meCaloHcal[i] = nullptr; + meCaloHcalE[i] = nullptr; + meCaloHcalToF[i] = nullptr; + meTrackerPx[i] = nullptr; + meTrackerSi[i] = nullptr; + meMuon[i] = nullptr; + meMuonDtToF[i] = nullptr; + meMuonCscToF[i] = nullptr; + meMuonRpcFToF[i] = nullptr; + meMuonRpcBToF[i] = nullptr; } - meGeantTrkPt = 0; - meGeantTrkE = 0; - meCaloEcalPhi = 0; - meCaloEcalEta = 0; - meCaloPreShPhi = 0; - meCaloPreShEta = 0; - meCaloHcalPhi = 0; - meCaloHcalEta = 0; - meTrackerPxPhi = 0; - meTrackerPxEta = 0; - meTrackerPxBToF = 0; - meTrackerPxBR = 0; - meTrackerPxFToF = 0; - meTrackerPxFZ = 0; - meTrackerSiPhi = 0; - meTrackerSiEta = 0; - meTrackerSiBToF = 0; - meTrackerSiBR = 0; - meTrackerSiFToF = 0; - meTrackerSiFZ = 0; - meMuonPhi = 0; - meMuonEta = 0; - meMuonDtR = 0; - meMuonCscZ = 0; - meMuonRpcBR = 0; - meMuonRpcFZ = 0; + meGeantTrkPt = nullptr; + meGeantTrkE = nullptr; + meCaloEcalPhi = nullptr; + meCaloEcalEta = nullptr; + meCaloPreShPhi = nullptr; + meCaloPreShEta = nullptr; + meCaloHcalPhi = nullptr; + meCaloHcalEta = nullptr; + meTrackerPxPhi = nullptr; + meTrackerPxEta = nullptr; + meTrackerPxBToF = nullptr; + meTrackerPxBR = nullptr; + meTrackerPxFToF = nullptr; + meTrackerPxFZ = nullptr; + meTrackerSiPhi = nullptr; + meTrackerSiEta = nullptr; + meTrackerSiBToF = nullptr; + meTrackerSiBR = nullptr; + meTrackerSiFToF = nullptr; + meTrackerSiFZ = nullptr; + meMuonPhi = nullptr; + meMuonEta = nullptr; + meMuonDtR = nullptr; + meMuonCscZ = nullptr; + meMuonRpcBR = nullptr; + meMuonRpcFZ = nullptr; //create histograms Char_t hname[200]; diff --git a/Validation/GlobalHits/src/GlobalHitsProdHistStripper.cc b/Validation/GlobalHits/src/GlobalHitsProdHistStripper.cc index 6ab134f747b7d..8d143096ac4cc 100644 --- a/Validation/GlobalHits/src/GlobalHitsProdHistStripper.cc +++ b/Validation/GlobalHits/src/GlobalHitsProdHistStripper.cc @@ -39,7 +39,7 @@ GlobalHitsProdHistStripper::GlobalHitsProdHistStripper(const verbosity %= 10; // get dqm info - dbe = 0; + dbe = nullptr; dbe = edm::Service().operator->(); if (dbe) { if (verbosity > 0 ) { @@ -74,7 +74,7 @@ GlobalHitsProdHistStripper::GlobalHitsProdHistStripper(const GlobalHitsProdHistStripper::~GlobalHitsProdHistStripper() { if (doOutput) - if (outputfile.size() != 0 && dbe) dbe->save(outputfile); + if (!outputfile.empty() && dbe) dbe->save(outputfile); } void GlobalHitsProdHistStripper::beginJob( void ) @@ -164,7 +164,7 @@ void GlobalHitsProdHistStripper::endRun(const edm::Run& iRun, continue; } - me[i] = 0; + me[i] = nullptr; /* std::cout << "Extracting histogram: " << std::endl diff --git a/Validation/GlobalHits/src/GlobalHitsTester.cc b/Validation/GlobalHits/src/GlobalHitsTester.cc index 069b76f9db705..23f309305892d 100644 --- a/Validation/GlobalHits/src/GlobalHitsTester.cc +++ b/Validation/GlobalHits/src/GlobalHitsTester.cc @@ -43,14 +43,14 @@ GlobalHitsTester::~GlobalHitsTester() void GlobalHitsTester::bookHistograms(DQMStore::IBooker & ibooker, edm::Run const &, edm::EventSetup const & ){ - meTestString = 0; - meTestInt = 0; - meTestFloat = 0; - meTestTH1F = 0; - meTestTH2F = 0; - meTestTH3F = 0; - meTestProfile1 = 0; - meTestProfile2 = 0; + meTestString = nullptr; + meTestInt = nullptr; + meTestFloat = nullptr; + meTestTH1F = nullptr; + meTestTH2F = nullptr; + meTestTH3F = nullptr; + meTestProfile1 = nullptr; + meTestProfile2 = nullptr; Random = new TRandom3(); ibooker.setCurrentFolder("GlobalTestV/String"); diff --git a/Validation/GlobalRecHits/interface/GlobalRecHitsAnalyzer.h b/Validation/GlobalRecHits/interface/GlobalRecHitsAnalyzer.h index eef22ab6e4744..a57c495e6e661 100644 --- a/Validation/GlobalRecHits/interface/GlobalRecHitsAnalyzer.h +++ b/Validation/GlobalRecHits/interface/GlobalRecHitsAnalyzer.h @@ -127,12 +127,12 @@ #include "Geometry/CommonDetUnit/interface/GeomDet.h" #include -#include +#include #include #include #include #include -#include +#include #include "TString.h" #include "DQMServices/Core/interface/MonitorElement.h" @@ -147,8 +147,8 @@ class GlobalRecHitsAnalyzer : public DQMEDAnalyzer typedef std::map > MapType; explicit GlobalRecHitsAnalyzer(const edm::ParameterSet&); - virtual ~GlobalRecHitsAnalyzer(); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~GlobalRecHitsAnalyzer() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; protected: void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/GlobalRecHits/interface/GlobalRecHitsHistogrammer.h b/Validation/GlobalRecHits/interface/GlobalRecHitsHistogrammer.h index dd28f2bf5ff7f..03a57a9cf1327 100644 --- a/Validation/GlobalRecHits/interface/GlobalRecHitsHistogrammer.h +++ b/Validation/GlobalRecHits/interface/GlobalRecHitsHistogrammer.h @@ -39,12 +39,12 @@ //#include #include -#include +#include #include #include #include #include -#include +#include #include "TString.h" #include "DQMServices/Core/interface/MonitorElement.h" @@ -61,8 +61,8 @@ class GlobalRecHitsHistogrammer : public DQMEDAnalyzer typedef std::map > MapType; explicit GlobalRecHitsHistogrammer(const edm::ParameterSet&); - virtual ~GlobalRecHitsHistogrammer(); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~GlobalRecHitsHistogrammer() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/GlobalRecHits/interface/GlobalRecHitsProducer.h b/Validation/GlobalRecHits/interface/GlobalRecHitsProducer.h index d0a4bd0cf0c89..1e03f22d4b76b 100644 --- a/Validation/GlobalRecHits/interface/GlobalRecHitsProducer.h +++ b/Validation/GlobalRecHits/interface/GlobalRecHitsProducer.h @@ -136,12 +136,12 @@ //#include #include -#include +#include #include #include #include #include -#include +#include #include "TString.h" @@ -158,10 +158,10 @@ class GlobalRecHitsProducer : public edm::EDProducer typedef std::map > MapType; explicit GlobalRecHitsProducer(const edm::ParameterSet&); - virtual ~GlobalRecHitsProducer(); - virtual void beginJob(); - virtual void endJob(); - virtual void produce(edm::Event&, const edm::EventSetup&); + ~GlobalRecHitsProducer() override; + void beginJob() override; + void endJob() override; + void produce(edm::Event&, const edm::EventSetup&) override; private: diff --git a/Validation/GlobalRecHits/src/GlobalRecHitsAnalyzer.cc b/Validation/GlobalRecHits/src/GlobalRecHitsAnalyzer.cc index d2dcd49a01a6d..6ed9df0072e8f 100644 --- a/Validation/GlobalRecHits/src/GlobalRecHitsAnalyzer.cc +++ b/Validation/GlobalRecHits/src/GlobalRecHitsAnalyzer.cc @@ -129,9 +129,9 @@ void GlobalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run "TIBL3", "TIBL4", "TIDW1", "TIDW2", "TIDW3", "TOBL1", "TOBL2", "TOBL3", "TOBL4"}; for(int i = 0; i<19; ++i) { - mehSiStripn[i]=0; - mehSiStripResX[i]=0; - mehSiStripResY[i]=0; + mehSiStripn[i]=nullptr; + mehSiStripResX[i]=nullptr; + mehSiStripResY[i]=nullptr; } string hcharname, hchartitle; iBooker.setCurrentFolder("GlobalRecHitsV/SiStrips"); @@ -163,8 +163,8 @@ void GlobalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run float HCalnUpper[4]={3000.,3000.,3000.,3000.}; float HCalnLower[4]={0.,0.,0.,0.}; for(int j =0; j <4; ++j) { - mehHcaln[j]=0; - mehHcalRes[j]=0; + mehHcaln[j]=nullptr; + mehHcalRes[j]=nullptr; } iBooker.setCurrentFolder("GlobalRecHitsV/HCals"); @@ -192,8 +192,8 @@ void GlobalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run float ECalResUpper[3] = {1., 0.3, .0002}; float ECalResLower[3] = {-1., -0.3, -.0002}; for(int i =0; i<3; ++i) { - mehEcaln[i]=0; - mehEcalRes[i]=0; + mehEcaln[i]=nullptr; + mehEcalRes[i]=nullptr; } iBooker.setCurrentFolder("GlobalRecHitsV/ECals"); @@ -217,9 +217,9 @@ void GlobalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p", "FWD2n", "FWD2p"}; for(int j =0; j<7; ++j) { - mehSiPixeln[j]=0; - mehSiPixelResX[j]=0; - mehSiPixelResY[j]=0; + mehSiPixeln[j]=nullptr; + mehSiPixelResX[j]=nullptr; + mehSiPixelResY[j]=nullptr; } iBooker.setCurrentFolder("GlobalRecHitsV/SiPixels"); @@ -248,9 +248,9 @@ void GlobalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run //Muons iBooker.setCurrentFolder("GlobalRecHitsV/Muons"); - mehDtMuonn = 0; - mehCSCn = 0; - mehRPCn = 0; + mehDtMuonn = nullptr; + mehCSCn = nullptr; + mehRPCn = nullptr; string n_List[3] = {"hDtMuonn", "hCSCn", "hRPCn"}; string hist_string[3] = {"Dt", "CSC", "RPC"}; @@ -274,9 +274,9 @@ void GlobalRecHitsAnalyzer::bookHistograms(DQMStore::IBooker &iBooker, edm::Run } } - mehDtMuonRes=0; - mehCSCResRDPhi=0; - mehRPCResX=0; + mehDtMuonRes=nullptr; + mehCSCResRDPhi=nullptr; + mehRPCResX=nullptr; hcharname = "hDtMuonRes"; hchartitle = "DT wire distance resolution"; @@ -1571,7 +1571,7 @@ GlobalRecHitsAnalyzer::findBestRecHit(const DTLayer* layer, const std::vector& recHits, const float simHitDist) { float res = 99999; - const type* theBestRecHit = 0; + const type* theBestRecHit = nullptr; // Loop over RecHits within the cell for(typename std::vector::const_iterator recHit = recHits.begin(); recHit != recHits.end(); @@ -1627,7 +1627,7 @@ std::map > recHitsPerWire = _recHitsPerWire; // Look for a mu hit in the cell const PSimHit* muSimHit = DTHitQualityUtils::findMuSimHit(simHitsInCell); - if (muSimHit==0) { + if (muSimHit==nullptr) { continue; // Skip this cell } diff --git a/Validation/GlobalRecHits/src/GlobalRecHitsHistogrammer.cc b/Validation/GlobalRecHits/src/GlobalRecHitsHistogrammer.cc index 89305cc789dc3..be32a554de5cd 100644 --- a/Validation/GlobalRecHits/src/GlobalRecHitsHistogrammer.cc +++ b/Validation/GlobalRecHits/src/GlobalRecHitsHistogrammer.cc @@ -90,9 +90,9 @@ void GlobalRecHitsHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, "TOBL1", "TOBL2", "TOBL3", "TOBL4"}; for (int i = 0; i < 19; ++i) { - mehSiStripn[i] = 0; - mehSiStripResX[i] = 0; - mehSiStripResY[i] = 0; + mehSiStripn[i] = nullptr; + mehSiStripResX[i] = nullptr; + mehSiStripResY[i] = nullptr; } string hcharname, hchartitle; @@ -124,8 +124,8 @@ void GlobalRecHitsHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, float HCalnUpper[4] = {3000., 3000., 3000., 2000.}; float HCalnLower[4] = {2000., 2000., 2000., 1000.}; for (int j =0; j <4; ++j) { - mehHcaln[j] = 0; - mehHcalRes[j] = 0; + mehHcaln[j] = nullptr; + mehHcalRes[j] = nullptr; } ibooker.setCurrentFolder("GlobalRecHitsV/HCals"); @@ -155,8 +155,8 @@ void GlobalRecHitsHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, float ECalResUpper[3] = {1., 0.3, .0002}; float ECalResLower[3] = {-1., -0.3, -.0002}; for (int i = 0; i < 3; ++i) { - mehEcaln[i] = 0; - mehEcalRes[i] = 0; + mehEcaln[i] = nullptr; + mehEcalRes[i] = nullptr; } ibooker.setCurrentFolder("GlobalRecHitsV/ECals"); @@ -182,9 +182,9 @@ void GlobalRecHitsHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, //Si Pixels string SiPixelString[7] = {"BRL1", "BRL2", "BRL3", "FWD1n", "FWD1p", "FWD2n", "FWD2p"}; for (int j =0; j < 7; ++j) { - mehSiPixeln[j] = 0; - mehSiPixelResX[j] = 0; - mehSiPixelResY[j] = 0; + mehSiPixeln[j] = nullptr; + mehSiPixelResX[j] = nullptr; + mehSiPixelResY[j] = nullptr; } ibooker.setCurrentFolder("GlobalRecHitsV/SiPixels"); @@ -210,9 +210,9 @@ void GlobalRecHitsHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, //Muons ibooker.setCurrentFolder("GlobalRecHitsV/Muons"); - mehDtMuonn = 0; - mehCSCn = 0; - mehRPCn = 0; + mehDtMuonn = nullptr; + mehCSCn = nullptr; + mehRPCn = nullptr; //std::vector me_List = {mehDtMuonn, mehCSCn, mehRPCn}; string n_List[3] = {"hDtMuonn", "hCSCn", "hRPCn"}; @@ -238,9 +238,9 @@ void GlobalRecHitsHistogrammer::bookHistograms(DQMStore::IBooker & ibooker, } } - mehDtMuonRes = 0; - mehCSCResRDPhi = 0; - mehRPCResX = 0; + mehDtMuonRes = nullptr; + mehCSCResRDPhi = nullptr; + mehRPCResX = nullptr; hcharname = "hDtMuonRes"; hchartitle = "DT wire distance resolution"; diff --git a/Validation/GlobalRecHits/src/GlobalRecHitsProducer.cc b/Validation/GlobalRecHits/src/GlobalRecHitsProducer.cc index fddab3b8ca498..2e1c85a0f90c7 100644 --- a/Validation/GlobalRecHits/src/GlobalRecHitsProducer.cc +++ b/Validation/GlobalRecHits/src/GlobalRecHitsProducer.cc @@ -2180,7 +2180,7 @@ GlobalRecHitsProducer::findBestRecHit(const DTLayer* layer, const std::vector& recHits, const float simHitDist) { float res = 99999; - const type* theBestRecHit = 0; + const type* theBestRecHit = nullptr; // Loop over RecHits within the cell for(typename std::vector::const_iterator recHit = recHits.begin(); recHit != recHits.end(); @@ -2236,7 +2236,7 @@ int GlobalRecHitsProducer::compute(const DTGeometry *dtGeom, // Look for a mu hit in the cell const PSimHit* muSimHit = DTHitQualityUtils::findMuSimHit(simHitsInCell); - if (muSimHit==0) { + if (muSimHit==nullptr) { continue; // Skip this cell } diff --git a/Validation/HGCalValidation/plugins/HGCGeometryClient.cc b/Validation/HGCalValidation/plugins/HGCGeometryClient.cc index 42773242becc2..ba41def719b35 100644 --- a/Validation/HGCalValidation/plugins/HGCGeometryClient.cc +++ b/Validation/HGCalValidation/plugins/HGCGeometryClient.cc @@ -19,10 +19,10 @@ class HGCalGeometryClient : public DQMEDHarvester { public: explicit HGCalGeometryClient(const edm::ParameterSet& ); - virtual ~HGCalGeometryClient(); + ~HGCalGeometryClient() override; - virtual void beginRun(const edm::Run& run, const edm::EventSetup& c) {} - void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig); + void beginRun(const edm::Run& run, const edm::EventSetup& c) override {} + void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override; private: std::string subDirectory_; diff --git a/Validation/HGCalValidation/plugins/HGCGeometryValidation.cc b/Validation/HGCalValidation/plugins/HGCGeometryValidation.cc index 1a923e5f4c9b0..e718087a50b6d 100644 --- a/Validation/HGCalValidation/plugins/HGCGeometryValidation.cc +++ b/Validation/HGCalValidation/plugins/HGCGeometryValidation.cc @@ -43,7 +43,7 @@ class HGCGeometryValidation : public DQMEDAnalyzer { public: explicit HGCGeometryValidation( const edm::ParameterSet& ); - ~HGCGeometryValidation(); + ~HGCGeometryValidation() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); protected: @@ -77,7 +77,7 @@ class HGCGeometryValidation : public DQMEDAnalyzer { MonitorElement *hebdX, *hebdY, *hebdZ; }; -HGCGeometryValidation::HGCGeometryValidation(const edm::ParameterSet &cfg) : hcons_(0) { +HGCGeometryValidation::HGCGeometryValidation(const edm::ParameterSet &cfg) : hcons_(nullptr) { g4Token_ = consumes(cfg.getParameter("g4Source")); geometrySource_ = cfg.getUntrackedParameter< std::vector >("geometrySource"); @@ -103,7 +103,7 @@ void HGCGeometryValidation::dqmBeginRun(const edm::Run& iRun, iSetup.get().get(pHRNDC); if (pHRNDC.isValid()) { hcons_ = &(*pHRNDC); - hgcGeometry_.push_back(0); + hgcGeometry_.push_back(nullptr); } else { edm::LogWarning("HGCalValid") << "Cannot initiate HGCalGeometry for " << geometrySource_[i] << std::endl; diff --git a/Validation/HGCalValidation/plugins/HGCalDigiClient.h b/Validation/HGCalValidation/plugins/HGCalDigiClient.h index 027856e9cbe1b..74ff41130e50e 100644 --- a/Validation/HGCalValidation/plugins/HGCalDigiClient.h +++ b/Validation/HGCalValidation/plugins/HGCalDigiClient.h @@ -37,10 +37,10 @@ class HGCalDigiClient : public DQMEDHarvester { public: explicit HGCalDigiClient(const edm::ParameterSet& ); - virtual ~HGCalDigiClient(); + ~HGCalDigiClient() override; - virtual void beginRun(const edm::Run& run, const edm::EventSetup& c); - void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig); + void beginRun(const edm::Run& run, const edm::EventSetup& c) override; + void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override; void runClient_(DQMStore::IBooker &ib, DQMStore::IGetter &ig); int digisEndjob(const std::vector &hcalMEs); }; diff --git a/Validation/HGCalValidation/plugins/HGCalDigiValidation.cc b/Validation/HGCalValidation/plugins/HGCalDigiValidation.cc index 6569d566edfba..7c5121e1afb98 100644 --- a/Validation/HGCalValidation/plugins/HGCalDigiValidation.cc +++ b/Validation/HGCalValidation/plugins/HGCalDigiValidation.cc @@ -78,8 +78,8 @@ void HGCalDigiValidation::analyze(const edm::Event& iEvent, OccupancyMap_plus_.clear(); OccupancyMap_minus_.clear(); - const HGCalGeometry* geom0(0); - const CaloGeometry* geom1(0); + const HGCalGeometry* geom0(nullptr); + const CaloGeometry* geom1(nullptr); if (nameDetector_ == "HCal") { edm::ESHandle geom; iSetup.get().get(geom); @@ -220,7 +220,7 @@ void HGCalDigiValidation::digiValidation(const T1& detId, const T2* geom, if (verbosity_>1) edm::LogInfo("HGCalValidation") << detId; DetId id1 = DetId(detId.rawId()); - GlobalPoint global1 = geom->getPosition(id1); + const GlobalPoint& global1 = geom->getPosition(id1); if (verbosity_>1) edm::LogInfo("HGCalValidation") << " adc = " << adc diff --git a/Validation/HGCalValidation/plugins/HGCalDigiValidation.h b/Validation/HGCalValidation/plugins/HGCalDigiValidation.h index db243065bcc92..a053812c7cebb 100644 --- a/Validation/HGCalValidation/plugins/HGCalDigiValidation.h +++ b/Validation/HGCalValidation/plugins/HGCalDigiValidation.h @@ -53,7 +53,7 @@ class HGCalDigiValidation : public DQMEDAnalyzer { }; explicit HGCalDigiValidation(const edm::ParameterSet&); - ~HGCalDigiValidation(); + ~HGCalDigiValidation() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override; diff --git a/Validation/HGCalValidation/plugins/HGCalHitClient.cc b/Validation/HGCalValidation/plugins/HGCalHitClient.cc index 1af93ac08c1fe..e72b51ff59489 100644 --- a/Validation/HGCalValidation/plugins/HGCalHitClient.cc +++ b/Validation/HGCalValidation/plugins/HGCalHitClient.cc @@ -21,10 +21,10 @@ class HGCalHitClient : public DQMEDHarvester { public: explicit HGCalHitClient(const edm::ParameterSet& ); - virtual ~HGCalHitClient(); + ~HGCalHitClient() override; - virtual void beginRun(const edm::Run& run, const edm::EventSetup& c) {} - void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig); + void beginRun(const edm::Run& run, const edm::EventSetup& c) override {} + void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override; private: std::string subDirectory_; diff --git a/Validation/HGCalValidation/plugins/HGCalHitValidation.cc b/Validation/HGCalValidation/plugins/HGCalHitValidation.cc index e7634c5b98d37..19fe3350fb376 100644 --- a/Validation/HGCalValidation/plugins/HGCalHitValidation.cc +++ b/Validation/HGCalValidation/plugins/HGCalHitValidation.cc @@ -64,7 +64,7 @@ class HGCalHitValidation : public DQMEDAnalyzer { public: explicit HGCalHitValidation( const edm::ParameterSet& ); - ~HGCalHitValidation(); + ~HGCalHitValidation() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); protected: @@ -203,7 +203,7 @@ void HGCalHitValidation::dqmBeginRun(edm::Run const& iRun, iSetup.get().get(pHSNDC); if (pHSNDC.isValid()) { hcCons_ = pHSNDC.product(); - hgcCons_.push_back(0); + hgcCons_.push_back(nullptr); } else { edm::LogWarning("HGCalValid") << "Cannot initiate HcalDDDSimConstants: " << geometrySource_[i] << std::endl; @@ -221,7 +221,7 @@ void HGCalHitValidation::dqmBeginRun(edm::Run const& iRun, if (caloG.isValid()) { const CaloGeometry* geo = caloG.product(); hcGeometry_ = geo->getSubdetectorGeometry(DetId::Hcal,HcalBarrel); - hgcGeometry_.push_back(0); + hgcGeometry_.push_back(nullptr); } else { edm::LogWarning("HGCalValid") << "Cannot initiate HcalGeometry for " << geometrySource_[i] << std::endl; diff --git a/Validation/HGCalValidation/plugins/HGCalRecHitValidation.cc b/Validation/HGCalValidation/plugins/HGCalRecHitValidation.cc index 44cd9064b0ea0..f17bd7f6f9ee0 100644 --- a/Validation/HGCalValidation/plugins/HGCalRecHitValidation.cc +++ b/Validation/HGCalValidation/plugins/HGCalRecHitValidation.cc @@ -149,7 +149,7 @@ template void HGCalRecHitValidation::recHitValidation(DetId & detId, int layer, const T1* geom, T2 it) { - GlobalPoint global = geom->getPosition(detId); + const GlobalPoint& global = geom->getPosition(detId); double energy = it->energy(); float globalx = global.x(); diff --git a/Validation/HGCalValidation/plugins/HGCalRecHitValidation.h b/Validation/HGCalValidation/plugins/HGCalRecHitValidation.h index 370ee45b05e41..719cf6872424f 100644 --- a/Validation/HGCalValidation/plugins/HGCalRecHitValidation.h +++ b/Validation/HGCalValidation/plugins/HGCalRecHitValidation.h @@ -60,7 +60,7 @@ class HGCalRecHitValidation : public DQMEDAnalyzer { explicit HGCalRecHitValidation(const edm::ParameterSet&); - ~HGCalRecHitValidation(); + ~HGCalRecHitValidation() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override; diff --git a/Validation/HGCalValidation/plugins/HGCalRecHitsClient.h b/Validation/HGCalValidation/plugins/HGCalRecHitsClient.h index 94c3083878181..224706556869d 100644 --- a/Validation/HGCalValidation/plugins/HGCalRecHitsClient.h +++ b/Validation/HGCalValidation/plugins/HGCalRecHitsClient.h @@ -40,10 +40,10 @@ class HGCalRecHitsClient : public DQMEDHarvester { public: explicit HGCalRecHitsClient(const edm::ParameterSet& ); - virtual ~HGCalRecHitsClient(); + ~HGCalRecHitsClient() override; - virtual void beginRun(const edm::Run& run, const edm::EventSetup& c); - void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig); + void beginRun(const edm::Run& run, const edm::EventSetup& c) override; + void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override; virtual void runClient_(DQMStore::IBooker &ib, DQMStore::IGetter &ig); int recHitsEndjob(const std::vector &hcalMEs); diff --git a/Validation/HGCalValidation/plugins/HGCalSimHitValidation.h b/Validation/HGCalValidation/plugins/HGCalSimHitValidation.h index e487337221440..34f462369a3bc 100644 --- a/Validation/HGCalValidation/plugins/HGCalSimHitValidation.h +++ b/Validation/HGCalValidation/plugins/HGCalSimHitValidation.h @@ -72,7 +72,7 @@ class HGCalSimHitValidation : public DQMEDAnalyzer { explicit HGCalSimHitValidation(const edm::ParameterSet&); - ~HGCalSimHitValidation(); + ~HGCalSimHitValidation() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); diff --git a/Validation/HGCalValidation/plugins/HGCalSimHitsClient.h b/Validation/HGCalValidation/plugins/HGCalSimHitsClient.h index 18028b9a7b1ca..f1b43187d5c06 100644 --- a/Validation/HGCalValidation/plugins/HGCalSimHitsClient.h +++ b/Validation/HGCalValidation/plugins/HGCalSimHitsClient.h @@ -45,10 +45,10 @@ class HGCalSimHitsClient : public DQMEDHarvester { public: explicit HGCalSimHitsClient(const edm::ParameterSet& ); - virtual ~HGCalSimHitsClient(); + ~HGCalSimHitsClient() override; - virtual void beginRun(const edm::Run& run, const edm::EventSetup& c); - void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig); + void beginRun(const edm::Run& run, const edm::EventSetup& c) override; + void dqmEndJob(DQMStore::IBooker &ib, DQMStore::IGetter &ig) override; virtual void runClient_(DQMStore::IBooker &ib, DQMStore::IGetter &ig); int simHitsEndjob(const std::vector &hcalMEs); }; diff --git a/Validation/HGCalValidation/plugins/SimG4HGCalValidation.cc b/Validation/HGCalValidation/plugins/SimG4HGCalValidation.cc index 372e45df6764b..c53bae7a630bf 100644 --- a/Validation/HGCalValidation/plugins/SimG4HGCalValidation.cc +++ b/Validation/HGCalValidation/plugins/SimG4HGCalValidation.cc @@ -59,9 +59,9 @@ class SimG4HGCalValidation : public SimProducer, public: SimG4HGCalValidation(const edm::ParameterSet &p); - virtual ~SimG4HGCalValidation(); + ~SimG4HGCalValidation() override; - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: SimG4HGCalValidation(const SimG4HGCalValidation&); // stop default @@ -70,9 +70,9 @@ class SimG4HGCalValidation : public SimProducer, void init(); // observer classes - void update(const BeginOfJob * job); - void update(const BeginOfEvent * evt); - void update(const G4Step * step); + void update(const BeginOfJob * job) override; + void update(const BeginOfEvent * evt) override; + void update(const G4Step * step) override; // analysis related class void layerAnalysis(PHGCalValidInfo&); @@ -99,7 +99,7 @@ class SimG4HGCalValidation : public SimProducer, }; SimG4HGCalValidation::SimG4HGCalValidation(const edm::ParameterSet &p): - numberingFromDDD_(0), count_(0) { + numberingFromDDD_(nullptr), count_(0) { edm::ParameterSet m_Anal = p.getParameter("SimG4HGCalValidation"); names_ = m_Anal.getParameter >("Names"); @@ -212,13 +212,13 @@ void SimG4HGCalValidation::update(const BeginOfEvent * evt) { //=================================================================== each STEP void SimG4HGCalValidation::update(const G4Step * aStep) { - if (aStep != NULL) { + if (aStep != nullptr) { G4VPhysicalVolume* curPV = aStep->GetPreStepPoint()->GetPhysicalVolume(); G4VSensitiveDetector* curSD = aStep->GetPreStepPoint()->GetSensitiveDetector(); // Only for Sensitive detector - if (curSD != 0) { - G4String name = curPV->GetName(); + if (curSD != nullptr) { + const G4String& name = curPV->GetName(); int type(-1); for (unsigned int k=0; kGetTrack()->GetNextVolume()!=0) + if (aStep->GetTrack()->GetNextVolume()!=nullptr) nextVolume = aStep->GetTrack()->GetNextVolume()->GetName(); if (nextVolume.c_str()!=name.c_str()) { //save hit when it exits cell diff --git a/Validation/HcalDigis/interface/Digi2Raw2Digi.h b/Validation/HcalDigis/interface/Digi2Raw2Digi.h index e848abfeced9f..4235441f7892d 100644 --- a/Validation/HcalDigis/interface/Digi2Raw2Digi.h +++ b/Validation/HcalDigis/interface/Digi2Raw2Digi.h @@ -15,11 +15,11 @@ class Digi2Raw2Digi : public DQMEDAnalyzer { public: explicit Digi2Raw2Digi(const edm::ParameterSet&); - ~Digi2Raw2Digi(); + ~Digi2Raw2Digi() override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const & ); + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const & ) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; template void compare(const edm::Event&, const edm::EventSetup&, const edm::EDGetTokenT >& tok1, const edm::EDGetTokenT >& tok2); diff --git a/Validation/HcalDigis/interface/HcalDigiTester.h b/Validation/HcalDigis/interface/HcalDigiTester.h index c9131f9b44b6f..64d83cc187971 100644 --- a/Validation/HcalDigis/interface/HcalDigiTester.h +++ b/Validation/HcalDigis/interface/HcalDigiTester.h @@ -22,12 +22,12 @@ class HcalDigiTester : public DQMEDAnalyzer { public: explicit HcalDigiTester(const edm::ParameterSet&); - ~HcalDigiTester(); - virtual void analyze(const edm::Event&, const edm::EventSetup&); + ~HcalDigiTester() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; template void reco(const edm::Event&, const edm::EventSetup&, const edm::EDGetTokenT > &); virtual void endRun() ; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &); + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; private: diff --git a/Validation/HcalDigis/interface/HcalDigisClient.h b/Validation/HcalDigis/interface/HcalDigisClient.h index 547b1e99356cb..2568928e03364 100644 --- a/Validation/HcalDigis/interface/HcalDigisClient.h +++ b/Validation/HcalDigis/interface/HcalDigisClient.h @@ -28,11 +28,11 @@ class HcalDigisClient : public DQMEDHarvester { public: explicit HcalDigisClient(const edm::ParameterSet&); - ~HcalDigisClient(); + ~HcalDigisClient() override; private: - virtual void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter & igetter ) { + void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter & igetter ) override { igetter.setCurrentFolder(dirName_); // This sets the DQMStore (should apply to ibooker as well runClient(ibooker, igetter); } diff --git a/Validation/HcalDigis/interface/ZDCDigiStudy.h b/Validation/HcalDigis/interface/ZDCDigiStudy.h index 0b9b0f568c7a4..c30db69ed5cc6 100644 --- a/Validation/HcalDigis/interface/ZDCDigiStudy.h +++ b/Validation/HcalDigis/interface/ZDCDigiStudy.h @@ -50,15 +50,15 @@ class ZDCDigiStudy: public DQMEDAnalyzer { public: ZDCDigiStudy(const edm::ParameterSet& ps); - ~ZDCDigiStudy(); + ~ZDCDigiStudy() override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &); + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; protected: - void endRun(const edm::Run& run, const edm::EventSetup& c); + void endRun(const edm::Run& run, const edm::EventSetup& c) override; - void analyze (const edm::Event& e, const edm::EventSetup& c); + void analyze (const edm::Event& e, const edm::EventSetup& c) override; int FillHitValHist (int side,int section,int channel,double energy,double time); private: diff --git a/Validation/HcalDigis/src/Digi2Raw2Digi.cc b/Validation/HcalDigis/src/Digi2Raw2Digi.cc index 371cb8745547b..56e869dfeb8c7 100644 --- a/Validation/HcalDigis/src/Digi2Raw2Digi.cc +++ b/Validation/HcalDigis/src/Digi2Raw2Digi.cc @@ -234,7 +234,7 @@ Digi2Raw2Digi::Digi2Raw2Digi(const edm::ParameterSet& iConfig) // DQM ROOT output - if ( outputFile_.size() != 0 ) { + if ( !outputFile_.empty() ) { edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will be saved to '" << outputFile_.c_str() << "'"; diff --git a/Validation/HcalDigis/src/HcalDigiTester.cc b/Validation/HcalDigis/src/HcalDigiTester.cc index 71fee5b02c724..401b2f79e4780 100644 --- a/Validation/HcalDigis/src/HcalDigiTester.cc +++ b/Validation/HcalDigis/src/HcalDigiTester.cc @@ -541,7 +541,7 @@ HcalDigiTester::HcalDigiTester(const edm::ParameterSet& iConfig): nevtot = 0; - if ( outputFile_.size() != 0 ) { + if ( !outputFile_.empty() ) { edm::LogInfo("OutputInfo") << " Hcal Digi Task histograms will be saved to '" << outputFile_.c_str() << "'"; } else { edm::LogInfo("OutputInfo") << " Hcal Digi Task histograms will NOT be saved"; diff --git a/Validation/HcalDigis/src/HcalDigisClient.cc b/Validation/HcalDigis/src/HcalDigisClient.cc index 250c4c693a085..9ad808189308c 100644 --- a/Validation/HcalDigis/src/HcalDigisClient.cc +++ b/Validation/HcalDigis/src/HcalDigisClient.cc @@ -65,7 +65,7 @@ int HcalDigisClient::HcalDigisEndjob(const std::vector &hcalMEs string strtmp; - MonitorElement * nevtot(0); + MonitorElement * nevtot(nullptr); std::vector ieta_iphi_occupancy_maps; std::vector depthID; @@ -100,7 +100,7 @@ int HcalDigisClient::HcalDigisEndjob(const std::vector &hcalMEs } - if ( hcalMEs.size() == 0){ + if ( hcalMEs.empty()){ edm::LogError("HcalDigisClient") << "No nevtot or maps histo found..."; return 0; } @@ -108,7 +108,7 @@ int HcalDigisClient::HcalDigisEndjob(const std::vector &hcalMEs edm::LogError("HcalDigisClient") << "No nevtot histoo found..."; return 0; } - if( ieta_iphi_occupancy_maps.size() < 1){ + if( ieta_iphi_occupancy_maps.empty()){ edm::LogError("HcalDigisClient") << "No maps histos found..."; return 0; } @@ -202,7 +202,7 @@ int HcalDigisClient::HcalDigisEndjob(const std::vector &hcalMEs } MonitorElement* HcalDigisClient::monitor(std::string name) { - if (!msm_->count(name)) return NULL; + if (!msm_->count(name)) return nullptr; else return msm_->find(name)->second; } diff --git a/Validation/HcalHits/interface/HcalSimHitStudy.h b/Validation/HcalHits/interface/HcalSimHitStudy.h index ea3d9864ee048..677d0a0aad8f1 100644 --- a/Validation/HcalHits/interface/HcalSimHitStudy.h +++ b/Validation/HcalHits/interface/HcalSimHitStudy.h @@ -32,14 +32,14 @@ class HcalSimHitStudy: public DQMEDAnalyzer { public: HcalSimHitStudy(const edm::ParameterSet& ps); - ~HcalSimHitStudy(); + ~HcalSimHitStudy() override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const & , edm::EventSetup const & ); + void bookHistograms(DQMStore::IBooker &, edm::Run const & , edm::EventSetup const & ) override; protected: //void endJob (); - void analyze (const edm::Event& e, const edm::EventSetup& c); + void analyze (const edm::Event& e, const edm::EventSetup& c) override; void analyzeHits (std::vector &); diff --git a/Validation/HcalHits/interface/HcalSimHitsClient.h b/Validation/HcalHits/interface/HcalSimHitsClient.h index 736b50609f4bc..9ee251a8221f1 100644 --- a/Validation/HcalHits/interface/HcalSimHitsClient.h +++ b/Validation/HcalHits/interface/HcalSimHitsClient.h @@ -48,11 +48,11 @@ class HcalSimHitsClient : public DQMEDHarvester { public: explicit HcalSimHitsClient(const edm::ParameterSet& ); - virtual ~HcalSimHitsClient(); + ~HcalSimHitsClient() override; - virtual void beginRun(edm::Run const& run, edm::EventSetup const& c); + void beginRun(edm::Run const& run, edm::EventSetup const& c) override; virtual void runClient_(DQMStore::IBooker &, DQMStore::IGetter &); - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &); + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; }; diff --git a/Validation/HcalHits/interface/HcalSimHitsValidation.h b/Validation/HcalHits/interface/HcalSimHitsValidation.h index a98e74633fc73..5d9829f0a6a17 100644 --- a/Validation/HcalHits/interface/HcalSimHitsValidation.h +++ b/Validation/HcalHits/interface/HcalSimHitsValidation.h @@ -44,11 +44,11 @@ class HcalSimHitsValidation : public DQMEDAnalyzer { public: HcalSimHitsValidation(edm::ParameterSet const& conf); - ~HcalSimHitsValidation(); + ~HcalSimHitsValidation() override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const & ); + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const & ) override; - virtual void analyze(edm::Event const& ev, edm::EventSetup const& c); + void analyze(edm::Event const& ev, edm::EventSetup const& c) override; virtual void endJob() ; private: diff --git a/Validation/HcalHits/interface/SimG4HcalValidation.h b/Validation/HcalHits/interface/SimG4HcalValidation.h index f59741f2537e3..66cac3dec2731 100644 --- a/Validation/HcalHits/interface/SimG4HcalValidation.h +++ b/Validation/HcalHits/interface/SimG4HcalValidation.h @@ -40,22 +40,22 @@ class SimG4HcalValidation : public SimProducer, public: SimG4HcalValidation(const edm::ParameterSet &p); - virtual ~SimG4HcalValidation(); + ~SimG4HcalValidation() override; - void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; private: - SimG4HcalValidation(const SimG4HcalValidation&); // stop default - const SimG4HcalValidation& operator=(const SimG4HcalValidation&); + SimG4HcalValidation(const SimG4HcalValidation&) = delete; // stop default + const SimG4HcalValidation& operator=(const SimG4HcalValidation&) = delete; void init(); // observer classes - void update(const BeginOfJob * job); - void update(const BeginOfRun * run); - void update(const BeginOfEvent * evt); - void update(const G4Step * step); - void update(const EndOfEvent * evt); + void update(const BeginOfJob * job) override; + void update(const BeginOfRun * run) override; + void update(const BeginOfEvent * evt) override; + void update(const G4Step * step) override; + void update(const EndOfEvent * evt) override; // jetfinding and analysis-related stuff void fill(const EndOfEvent * ev); diff --git a/Validation/HcalHits/interface/SimHitsValidationHcal.h b/Validation/HcalHits/interface/SimHitsValidationHcal.h index 7bf1d0e8cdf6d..b78714ab876a7 100644 --- a/Validation/HcalHits/interface/SimHitsValidationHcal.h +++ b/Validation/HcalHits/interface/SimHitsValidationHcal.h @@ -30,13 +30,13 @@ class SimHitsValidationHcal: public DQMEDAnalyzer { public: SimHitsValidationHcal(const edm::ParameterSet& ps); - ~SimHitsValidationHcal(); + ~SimHitsValidationHcal() override; static void fillDescriptions(edm::ConfigurationDescriptions & descriptions); protected: - void analyze (const edm::Event& e, const edm::EventSetup& c); - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &); + void analyze (const edm::Event& e, const edm::EventSetup& c) override; + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void analyzeHits (std::vector &); diff --git a/Validation/HcalHits/interface/ZdcSimHitStudy.h b/Validation/HcalHits/interface/ZdcSimHitStudy.h index e0095593c64ab..d27d9c2075d94 100644 --- a/Validation/HcalHits/interface/ZdcSimHitStudy.h +++ b/Validation/HcalHits/interface/ZdcSimHitStudy.h @@ -53,14 +53,14 @@ class ZdcSimHitStudy: public DQMEDAnalyzer{ public: ZdcSimHitStudy(const edm::ParameterSet& ps); - ~ZdcSimHitStudy(); + ~ZdcSimHitStudy() override; protected: - void endRun(const edm::Run& run, const edm::EventSetup& c); - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &); + void endRun(const edm::Run& run, const edm::EventSetup& c) override; + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - void analyze (const edm::Event& e, const edm::EventSetup& c); + void analyze (const edm::Event& e, const edm::EventSetup& c) override; void analyzeHits (std::vector &); int FillHitValHist (int side,int section,int channel,double energy,double time); diff --git a/Validation/HcalHits/src/HcalSimHitsClient.cc b/Validation/HcalHits/src/HcalSimHitsClient.cc index e3fb38e71410a..64e30b10144c2 100644 --- a/Validation/HcalHits/src/HcalSimHitsClient.cc +++ b/Validation/HcalHits/src/HcalSimHitsClient.cc @@ -82,8 +82,8 @@ int HcalSimHitsClient::SimHitsEndjob(const std::vector &hcalMEs char name[40], name1[40], name2[40], name3[40], name4[40]; for (int k=0; k &hcalMEs } for (unsigned int k=0; k(edm::InputTag("g4SimHits","EcalHitsEB")); tok_ecalEE_ = consumes(edm::InputTag("g4SimHits","EcalHitsEE")); - if ( outputFile_.size() != 0 ) { edm::LogInfo("OutputInfo") << " Hcal SimHit Task histograms will be saved to '" << outputFile_.c_str() << "'"; + if ( !outputFile_.empty() ) { edm::LogInfo("OutputInfo") << " Hcal SimHit Task histograms will be saved to '" << outputFile_.c_str() << "'"; } else { edm::LogInfo("OutputInfo") << " Hcal SimHit Task histograms will NOT be saved"; } diff --git a/Validation/HcalHits/src/SimG4HcalHitJetFinder.cc b/Validation/HcalHits/src/SimG4HcalHitJetFinder.cc index e919ffd648bfc..27a161361e44d 100644 --- a/Validation/HcalHits/src/SimG4HcalHitJetFinder.cc +++ b/Validation/HcalHits/src/SimG4HcalHitJetFinder.cc @@ -26,7 +26,7 @@ void SimG4HcalHitJetFinder::setInput(std::vector* hhit) { std::vector* SimG4HcalHitJetFinder::getClusters(bool hcal_only){ clusvector.erase(clusvector.begin(),clusvector.end()); - if (input.size() == 0) { + if (input.empty()) { return &clusvector; } diff --git a/Validation/HcalHits/src/SimG4HcalValidation.cc b/Validation/HcalHits/src/SimG4HcalValidation.cc index 8be5fe3513b3b..35add9a3a53ad 100644 --- a/Validation/HcalHits/src/SimG4HcalValidation.cc +++ b/Validation/HcalHits/src/SimG4HcalValidation.cc @@ -36,7 +36,7 @@ #include SimG4HcalValidation::SimG4HcalValidation(const edm::ParameterSet &p): - jetf(0), numberingFromDDD(0), org(0) { + jetf(nullptr), numberingFromDDD(nullptr), org(nullptr) { edm::ParameterSet m_Anal = p.getParameter("SimG4HcalValidation"); infolevel = m_Anal.getParameter("InfoLevel"); @@ -87,12 +87,12 @@ SimG4HcalValidation::~SimG4HcalValidation() { if (jetf) { edm::LogInfo("ValidHcal") << "Delete Jetfinder"; delete jetf; - jetf = 0; + jetf = nullptr; } if (numberingFromDDD) { edm::LogInfo("ValidHcal") << "Delete HcalNumberingFromDDD"; delete numberingFromDDD; - numberingFromDDD = 0; + numberingFromDDD = nullptr; } } @@ -173,9 +173,9 @@ void SimG4HcalValidation::update(const BeginOfRun * run) { std::string sdname = names[0]; G4SDManager* sd = G4SDManager::GetSDMpointerIfExist(); - if (sd != 0) { + if (sd != nullptr) { G4VSensitiveDetector* aSD = sd->FindSensitiveDetector(sdname); - if (aSD==0) { + if (aSD==nullptr) { edm::LogWarning("ValidHcal") << "SimG4HcalValidation::beginOfRun: No SD" << " with name " << sdname << " in this " << "Setup"; @@ -216,7 +216,7 @@ void SimG4HcalValidation::update(const BeginOfEvent * evt) { //=================================================================== each STEP void SimG4HcalValidation::update(const G4Step * aStep) { - if (aStep != NULL) { + if (aStep != nullptr) { G4VPhysicalVolume* curPV = aStep->GetPreStepPoint()->GetPhysicalVolume(); G4String name = curPV->GetName(); name.assign(name,0,3); @@ -546,7 +546,7 @@ void SimG4HcalValidation::jetAnalysis(PHcalValidInfoJets& product) { std::vector enevec, etavec, phivec; - if ((*result).size() > 0) { + if (!(*result).empty()) { sort((*result).begin(),(*result).end()); diff --git a/Validation/HcalRecHits/interface/HcalRecHitsClient.h b/Validation/HcalRecHits/interface/HcalRecHitsClient.h index cb38d6db804e0..6b8e25d139fd4 100644 --- a/Validation/HcalRecHits/interface/HcalRecHitsClient.h +++ b/Validation/HcalRecHits/interface/HcalRecHitsClient.h @@ -47,9 +47,9 @@ class HcalRecHitsClient : public DQMEDHarvester { public: explicit HcalRecHitsClient(const edm::ParameterSet& ); - virtual ~HcalRecHitsClient(); + ~HcalRecHitsClient() override; - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &); + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; int HcalRecHitsEndjob(const std::vector &hcalMEs); diff --git a/Validation/HcalRecHits/interface/HcalRecHitsValidation.h b/Validation/HcalRecHits/interface/HcalRecHitsValidation.h index 3df69e755d8b2..b86250f825497 100644 --- a/Validation/HcalRecHits/interface/HcalRecHitsValidation.h +++ b/Validation/HcalRecHits/interface/HcalRecHitsValidation.h @@ -56,10 +56,10 @@ class HcalRecHitsValidation : public DQMEDAnalyzer { public: HcalRecHitsValidation(edm::ParameterSet const& conf); - ~HcalRecHitsValidation(); - virtual void analyze(edm::Event const& ev, edm::EventSetup const& c); + ~HcalRecHitsValidation() override; + void analyze(edm::Event const& ev, edm::EventSetup const& c) override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &); + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; private: diff --git a/Validation/HcalRecHits/interface/NoiseRates.h b/Validation/HcalRecHits/interface/NoiseRates.h index a680ed2c6bc61..1cc36259434fa 100644 --- a/Validation/HcalRecHits/interface/NoiseRates.h +++ b/Validation/HcalRecHits/interface/NoiseRates.h @@ -43,12 +43,12 @@ class NoiseRates : public DQMEDAnalyzer { public: explicit NoiseRates(const edm::ParameterSet&); - ~NoiseRates(); + ~NoiseRates() override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &); + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; std::string outputFile_; diff --git a/Validation/HcalRecHits/interface/NoiseRatesClient.h b/Validation/HcalRecHits/interface/NoiseRatesClient.h index 96bd181bf88bb..50ef640ac38bb 100644 --- a/Validation/HcalRecHits/interface/NoiseRatesClient.h +++ b/Validation/HcalRecHits/interface/NoiseRatesClient.h @@ -47,9 +47,9 @@ class NoiseRatesClient : public DQMEDHarvester { public: explicit NoiseRatesClient(const edm::ParameterSet& ); - virtual ~NoiseRatesClient(); + ~NoiseRatesClient() override; - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &); + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; virtual void runClient_(DQMStore::IBooker &, DQMStore::IGetter &); int NoiseRatesEndjob(const std::vector &hcalMEs); diff --git a/Validation/HcalRecHits/src/HcalRecHitsValidation.cc b/Validation/HcalRecHits/src/HcalRecHitsValidation.cc index ecb1016d0a728..98edfbcde4ddd 100644 --- a/Validation/HcalRecHits/src/HcalRecHitsValidation.cc +++ b/Validation/HcalRecHits/src/HcalRecHitsValidation.cc @@ -11,7 +11,7 @@ HcalRecHitsValidation::HcalRecHitsValidation(edm::ParameterSet const& conf) // DQM ROOT output outputFile_ = conf.getUntrackedParameter("outputFile", "myfile.root"); - if ( outputFile_.size() != 0 ) { + if ( !outputFile_.empty() ) { edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will be saved to '" << outputFile_.c_str() << "'"; } else { edm::LogInfo("OutputInfo") << " Hcal RecHit Task histograms will NOT be saved"; diff --git a/Validation/HcalRecHits/src/NoiseRatesClient.cc b/Validation/HcalRecHits/src/NoiseRatesClient.cc index 913602d440506..0d67262af95ca 100644 --- a/Validation/HcalRecHits/src/NoiseRatesClient.cc +++ b/Validation/HcalRecHits/src/NoiseRatesClient.cc @@ -71,7 +71,7 @@ void NoiseRatesClient::runClient_(DQMStore::IBooker &ib, DQMStore::IGetter &ig) int NoiseRatesClient::NoiseRatesEndjob(const std::vector &hcalMEs){ int useAllHistos = 0; - MonitorElement* hLumiBlockCount =0; + MonitorElement* hLumiBlockCount =nullptr; for(unsigned int ih=0; ihgetName().c_str(), "hLumiBlockCount") ==0 ){ hLumiBlockCount = hcalMEs[ih]; diff --git a/Validation/Mixing/interface/GlobalTest.h b/Validation/Mixing/interface/GlobalTest.h index 03fba0c3c0de9..1ac28f8d71338 100644 --- a/Validation/Mixing/interface/GlobalTest.h +++ b/Validation/Mixing/interface/GlobalTest.h @@ -46,11 +46,11 @@ class MonitorElement; class GlobalTest : public DQMEDAnalyzer { public: explicit GlobalTest(const edm::ParameterSet&); - ~GlobalTest(); + ~GlobalTest() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: std::string filename_; diff --git a/Validation/Mixing/interface/MixCollectionValidation.h b/Validation/Mixing/interface/MixCollectionValidation.h index 7a26eeebefc3d..b88ec9fc22c9a 100644 --- a/Validation/Mixing/interface/MixCollectionValidation.h +++ b/Validation/Mixing/interface/MixCollectionValidation.h @@ -34,9 +34,9 @@ class MixCollectionValidation : public DQMEDAnalyzer { public: explicit MixCollectionValidation(const edm::ParameterSet&); - ~MixCollectionValidation(); + ~MixCollectionValidation() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: diff --git a/Validation/Mixing/interface/TestSuite.h b/Validation/Mixing/interface/TestSuite.h index 41e8b873df119..4c4a03f04855f 100644 --- a/Validation/Mixing/interface/TestSuite.h +++ b/Validation/Mixing/interface/TestSuite.h @@ -46,12 +46,12 @@ class TFile; class TestSuite : public edm::EDAnalyzer { public: explicit TestSuite(const edm::ParameterSet&); - ~TestSuite(); + ~TestSuite() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void beginJob(); - virtual void endJob(); + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginJob() override; + void endJob() override; private: std::string filename_; diff --git a/Validation/Mixing/src/MixCollectionValidation.cc b/Validation/Mixing/src/MixCollectionValidation.cc index 1d5dac332d02c..e066fc3a68ef6 100644 --- a/Validation/Mixing/src/MixCollectionValidation.cc +++ b/Validation/Mixing/src/MixCollectionValidation.cc @@ -55,7 +55,7 @@ void MixCollectionValidation::bookHistograms(DQMStore::IBooker & iBooker, edm::R nrHepMCProductH_ = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.); HepMCProductTags_ = tags; - if (HepMCProductTags_.size()) { + if (!HepMCProductTags_.empty()) { crossingFrame_Hep_Token_ = consumes >( edm::InputTag("mix", HepMCProductTags_[0].label())); } @@ -67,7 +67,7 @@ void MixCollectionValidation::bookHistograms(DQMStore::IBooker & iBooker, edm::R nrSimTrackH_ = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.); SimTrackTags_ = tags; - if (SimTrackTags_.size()) { + if (!SimTrackTags_.empty()) { crossingFrame_SimTr_Token_ = consumes >( edm::InputTag("mix", SimTrackTags_[0].label())); } @@ -79,7 +79,7 @@ void MixCollectionValidation::bookHistograms(DQMStore::IBooker & iBooker, edm::R nrSimVertexH_ = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.); SimVertexTags_ = tags; - if (SimVertexTags_.size()) { + if (!SimVertexTags_.empty()) { crossingFrame_SimVtx_Token_ = consumes >( edm::InputTag("mix", SimVertexTags_[0].label())); } @@ -129,7 +129,7 @@ void MixCollectionValidation::analyze(const edm::Event& iEvent, const edm::Event { using namespace edm; - if ( HepMCProductTags_.size() > 0 ) { + if ( !HepMCProductTags_.empty() ) { bool gotHepMCProduct; edm::Handle > crossingFrame; gotHepMCProduct = iEvent.getByToken(crossingFrame_Hep_Token_, crossingFrame); @@ -143,7 +143,7 @@ void MixCollectionValidation::analyze(const edm::Event& iEvent, const edm::Event } } - if ( SimTrackTags_.size() > 0 ) { + if ( !SimTrackTags_.empty() ) { bool gotSimTrack; edm::Handle > crossingFrame; gotSimTrack = iEvent.getByToken(crossingFrame_SimTr_Token_,crossingFrame); @@ -157,7 +157,7 @@ void MixCollectionValidation::analyze(const edm::Event& iEvent, const edm::Event } } - if ( SimVertexTags_.size() > 0 ) { + if ( !SimVertexTags_.empty() ) { bool gotSimVertex; edm::Handle > crossingFrame; std::string SimVertexLabel = SimVertexTags_[0].label(); @@ -172,7 +172,7 @@ void MixCollectionValidation::analyze(const edm::Event& iEvent, const edm::Event } } - if ( PSimHitTags_.size() > 0 ) { + if ( !PSimHitTags_.empty() ) { edm::Handle > crossingFrame; @@ -193,7 +193,7 @@ void MixCollectionValidation::analyze(const edm::Event& iEvent, const edm::Event } } - if ( PCaloHitTags_.size() > 0 ) { + if ( !PCaloHitTags_.empty() ) { edm::Handle > crossingFrame; diff --git a/Validation/Mixing/src/TestSuite.cc b/Validation/Mixing/src/TestSuite.cc index c397912ea70fc..5a075eafe8365 100644 --- a/Validation/Mixing/src/TestSuite.cc +++ b/Validation/Mixing/src/TestSuite.cc @@ -27,7 +27,7 @@ using namespace edm; -TestSuite::TestSuite(const edm::ParameterSet& iConfig): filename_(iConfig.getParameter("fileName")), bunchcr_(iConfig.getParameter("BunchNr")), minbunch_(iConfig.getParameter("minBunch")),maxbunch_(iConfig.getParameter("maxBunch")), dbe_(0), +TestSuite::TestSuite(const edm::ParameterSet& iConfig): filename_(iConfig.getParameter("fileName")), bunchcr_(iConfig.getParameter("BunchNr")), minbunch_(iConfig.getParameter("minBunch")),maxbunch_(iConfig.getParameter("maxBunch")), dbe_(nullptr), cfTrackToken_(consumes > ( iConfig.getParameter("cfTrackTag"))), cfVertexToken_(consumes > ( @@ -60,7 +60,7 @@ void TestSuite::beginJob() { } void TestSuite::endJob() { - if (filename_.size() != 0 && dbe_ ) dbe_->save(filename_); + if (!filename_.empty() && dbe_ ) dbe_->save(filename_); } diff --git a/Validation/MuonCSCDigis/src/CSCALCTDigiValidation.h b/Validation/MuonCSCDigis/src/CSCALCTDigiValidation.h index b2c4e811f545b..58f37d3e25903 100644 --- a/Validation/MuonCSCDigis/src/CSCALCTDigiValidation.h +++ b/Validation/MuonCSCDigis/src/CSCALCTDigiValidation.h @@ -14,9 +14,9 @@ class CSCALCTDigiValidation : public CSCBaseValidation public: CSCALCTDigiValidation(const edm::InputTag & inputTag, edm::ConsumesCollector && iC); - ~CSCALCTDigiValidation(); + ~CSCALCTDigiValidation() override; void bookHistograms(DQMStore::IBooker &); - void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: edm::EDGetTokenT alcts_Token_; diff --git a/Validation/MuonCSCDigis/src/CSCBaseValidation.cc b/Validation/MuonCSCDigis/src/CSCBaseValidation.cc index b0d8efe784fcd..1b5180ed32da9 100644 --- a/Validation/MuonCSCDigis/src/CSCBaseValidation.cc +++ b/Validation/MuonCSCDigis/src/CSCBaseValidation.cc @@ -3,13 +3,13 @@ CSCBaseValidation::CSCBaseValidation(const edm::InputTag & inputTag) : theInputTag(inputTag), - theSimHitMap(0), - theCSCGeometry(0) + theSimHitMap(nullptr), + theCSCGeometry(nullptr) { } const CSCLayer * CSCBaseValidation::findLayer(int detId) const { - assert(theCSCGeometry != 0); + assert(theCSCGeometry != nullptr); const GeomDetUnit* detUnit = theCSCGeometry->idToDetUnit(CSCDetId(detId)); return dynamic_cast(detUnit); } diff --git a/Validation/MuonCSCDigis/src/CSCCLCTDigiValidation.h b/Validation/MuonCSCDigis/src/CSCCLCTDigiValidation.h index 558f9adc91bad..59a7e9765de6f 100644 --- a/Validation/MuonCSCDigis/src/CSCCLCTDigiValidation.h +++ b/Validation/MuonCSCDigis/src/CSCCLCTDigiValidation.h @@ -14,9 +14,9 @@ class CSCCLCTDigiValidation : public CSCBaseValidation public: CSCCLCTDigiValidation(const edm::InputTag & inputTag, edm::ConsumesCollector && iC); - ~CSCCLCTDigiValidation(); + ~CSCCLCTDigiValidation() override; void bookHistograms(DQMStore::IBooker &); - void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: edm::EDGetTokenT clcts_Token_; diff --git a/Validation/MuonCSCDigis/src/CSCComparatorDigiValidation.h b/Validation/MuonCSCDigis/src/CSCComparatorDigiValidation.h index 70f5ac7105667..1f1f9fc417295 100644 --- a/Validation/MuonCSCDigis/src/CSCComparatorDigiValidation.h +++ b/Validation/MuonCSCDigis/src/CSCComparatorDigiValidation.h @@ -16,9 +16,9 @@ class CSCComparatorDigiValidation : public CSCBaseValidation CSCComparatorDigiValidation(const edm::InputTag & inputTag, const edm::InputTag & stripDigiInputTag, edm::ConsumesCollector && iC); - ~CSCComparatorDigiValidation(); + ~CSCComparatorDigiValidation() override; void bookHistograms(DQMStore::IBooker &); - void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: edm::EDGetTokenT theStripDigi_Token_; diff --git a/Validation/MuonCSCDigis/src/CSCDigiValidation.cc b/Validation/MuonCSCDigis/src/CSCDigiValidation.cc index 866c62ecb4d6a..7c1e9343c6375 100644 --- a/Validation/MuonCSCDigis/src/CSCDigiValidation.cc +++ b/Validation/MuonCSCDigis/src/CSCDigiValidation.cc @@ -14,12 +14,12 @@ CSCDigiValidation::CSCDigiValidation(const edm::ParameterSet & ps) : doSim_(ps.getParameter("doSim")), theSimHitMap(ps.getParameter("simHitsTag"), consumesCollector()), - theCSCGeometry(0), - theStripDigiValidation(0), - theWireDigiValidation(0), - theComparatorDigiValidation(0), - theALCTDigiValidation(0), - theCLCTDigiValidation(0) + theCSCGeometry(nullptr), + theStripDigiValidation(nullptr), + theWireDigiValidation(nullptr), + theComparatorDigiValidation(nullptr), + theALCTDigiValidation(nullptr), + theCLCTDigiValidation(nullptr) { theStripDigiValidation = new CSCStripDigiValidation(ps.getParameter("stripDigiTag"), consumesCollector()); diff --git a/Validation/MuonCSCDigis/src/CSCDigiValidation.h b/Validation/MuonCSCDigis/src/CSCDigiValidation.h index 0a37a531c64f6..2eb8fcda1c7c4 100644 --- a/Validation/MuonCSCDigis/src/CSCDigiValidation.h +++ b/Validation/MuonCSCDigis/src/CSCDigiValidation.h @@ -21,9 +21,9 @@ class CSCCLCTDigiValidation; class CSCDigiValidation : public DQMEDAnalyzer { public: explicit CSCDigiValidation(const edm::ParameterSet&); - ~CSCDigiValidation(); + ~CSCDigiValidation() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: bool doSim_; diff --git a/Validation/MuonCSCDigis/src/CSCStripDigiValidation.cc b/Validation/MuonCSCDigis/src/CSCStripDigiValidation.cc index 502aba408d757..49b15320482d8 100644 --- a/Validation/MuonCSCDigis/src/CSCStripDigiValidation.cc +++ b/Validation/MuonCSCDigis/src/CSCStripDigiValidation.cc @@ -10,9 +10,9 @@ CSCStripDigiValidation::CSCStripDigiValidation(const edm::InputTag & inputTag, thePedestalSum(0), thePedestalCovarianceSum(0), thePedestalCount(0), - thePedestalTimeCorrelationPlot(0), - thePedestalNeighborCorrelationPlot(0), - theNDigisPerChamberPlot(0) + thePedestalTimeCorrelationPlot(nullptr), + thePedestalNeighborCorrelationPlot(nullptr), + theNDigisPerChamberPlot(nullptr) { strips_Token_ = iC.consumes(inputTag); } diff --git a/Validation/MuonCSCDigis/src/CSCStripDigiValidation.h b/Validation/MuonCSCDigis/src/CSCStripDigiValidation.h index fcb53dff28276..2a3b9a5cb9b4a 100644 --- a/Validation/MuonCSCDigis/src/CSCStripDigiValidation.h +++ b/Validation/MuonCSCDigis/src/CSCStripDigiValidation.h @@ -14,9 +14,9 @@ class CSCStripDigiValidation : public CSCBaseValidation public: CSCStripDigiValidation(const edm::InputTag & inputTag, edm::ConsumesCollector && iC); - ~CSCStripDigiValidation(); + ~CSCStripDigiValidation() override; void bookHistograms(DQMStore::IBooker &, bool doSim); - void analyze(const edm::Event& e, const edm::EventSetup&); + void analyze(const edm::Event& e, const edm::EventSetup&) override; void setGeometry(const CSCGeometry * geom) {theCSCGeometry = geom;} void plotResolution(const PSimHit & hit, int strip, const CSCLayer * layer, int chamberType); diff --git a/Validation/MuonCSCDigis/src/CSCWireDigiValidation.h b/Validation/MuonCSCDigis/src/CSCWireDigiValidation.h index aabedae7717af..5b2b72c70d20d 100644 --- a/Validation/MuonCSCDigis/src/CSCWireDigiValidation.h +++ b/Validation/MuonCSCDigis/src/CSCWireDigiValidation.h @@ -15,9 +15,9 @@ class CSCWireDigiValidation : public CSCBaseValidation CSCWireDigiValidation(const edm::InputTag & inputTag, edm::ConsumesCollector && iC, bool doSim); - ~CSCWireDigiValidation(); + ~CSCWireDigiValidation() override; void bookHistograms(DQMStore::IBooker &); - void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; void plotResolution(const PSimHit & hit, const CSCWireDigi & digi, const CSCLayer * layer, int chamberType); diff --git a/Validation/MuonDTDigis/src/MuonDTDigis.cc b/Validation/MuonDTDigis/src/MuonDTDigis.cc index 3c7a802663dfc..ac42fe82e3bd8 100755 --- a/Validation/MuonDTDigis/src/MuonDTDigis.cc +++ b/Validation/MuonDTDigis/src/MuonDTDigis.cc @@ -42,28 +42,28 @@ MuonDTDigis::~MuonDTDigis(){ void MuonDTDigis::bookHistograms(DQMStore::IBooker & iBooker, edm::Run const & iRun, edm::EventSetup const & /* iSetup */) { - meDigiTimeBox_ = 0; - meDigiTimeBox_wheel2m_ = 0; - meDigiTimeBox_wheel1m_ = 0; - meDigiTimeBox_wheel0_ = 0; - meDigiTimeBox_wheel1p_ = 0; - meDigiTimeBox_wheel2p_ = 0; - meDigiEfficiency_ = 0; - meDigiEfficiencyMu_ = 0; - meDoubleDigi_ = 0; - meSimvsDigi_ = 0; - meWire_DoubleDigi_ = 0; - - meMB1_sim_occup_ = 0; - meMB1_digi_occup_ = 0; - meMB2_sim_occup_ = 0; - meMB2_digi_occup_ = 0; - meMB3_sim_occup_ = 0; - meMB3_digi_occup_ = 0; - meMB4_sim_occup_ = 0; - meMB4_digi_occup_ = 0; - - meDigiHisto_ = 0; + meDigiTimeBox_ = nullptr; + meDigiTimeBox_wheel2m_ = nullptr; + meDigiTimeBox_wheel1m_ = nullptr; + meDigiTimeBox_wheel0_ = nullptr; + meDigiTimeBox_wheel1p_ = nullptr; + meDigiTimeBox_wheel2p_ = nullptr; + meDigiEfficiency_ = nullptr; + meDigiEfficiencyMu_ = nullptr; + meDoubleDigi_ = nullptr; + meSimvsDigi_ = nullptr; + meWire_DoubleDigi_ = nullptr; + + meMB1_sim_occup_ = nullptr; + meMB1_digi_occup_ = nullptr; + meMB2_sim_occup_ = nullptr; + meMB2_digi_occup_ = nullptr; + meMB3_sim_occup_ = nullptr; + meMB3_digi_occup_ = nullptr; + meMB4_sim_occup_ = nullptr; + meMB4_digi_occup_ = nullptr; + + meDigiHisto_ = nullptr; // ---------------------- // We go @@ -324,7 +324,7 @@ hDigis* MuonDTDigis::WheelHistos(int wheel){ case 2: return hDigis_W2.get(); - default: return NULL; + default: return nullptr; } } #include "FWCore/PluginManager/interface/ModuleDef.h" diff --git a/Validation/MuonDTDigis/src/MuonDTDigis.h b/Validation/MuonDTDigis/src/MuonDTDigis.h index cae7605419b9a..817d7a3e68197 100755 --- a/Validation/MuonDTDigis/src/MuonDTDigis.h +++ b/Validation/MuonDTDigis/src/MuonDTDigis.h @@ -54,7 +54,7 @@ class MuonDTDigis : public DQMEDAnalyzer{ explicit MuonDTDigis(const edm::ParameterSet& pset); // Destructor - virtual ~MuonDTDigis(); + ~MuonDTDigis() override; protected: void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/MuonGEMDigis/interface/GEMCheckGeometry.h b/Validation/MuonGEMDigis/interface/GEMCheckGeometry.h index 152e181062d43..c174b3b11b116 100644 --- a/Validation/MuonGEMDigis/interface/GEMCheckGeometry.h +++ b/Validation/MuonGEMDigis/interface/GEMCheckGeometry.h @@ -14,9 +14,9 @@ class GEMCheckGeometry : public DQMEDAnalyzer { public: explicit GEMCheckGeometry(const edm::ParameterSet& gc); - ~GEMCheckGeometry(); + ~GEMCheckGeometry() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event& e, const edm::EventSetup&) override; + void analyze(const edm::Event& e, const edm::EventSetup&) override; private: diff --git a/Validation/MuonGEMDigis/interface/GEMCoPadDigiValidation.h b/Validation/MuonGEMDigis/interface/GEMCoPadDigiValidation.h index 18ce84fdf5fde..77cf17b257c0c 100644 --- a/Validation/MuonGEMDigis/interface/GEMCoPadDigiValidation.h +++ b/Validation/MuonGEMDigis/interface/GEMCoPadDigiValidation.h @@ -9,7 +9,7 @@ class GEMCoPadDigiValidation : public GEMBaseValidation { public: explicit GEMCoPadDigiValidation( const edm::ParameterSet& ); - ~GEMCoPadDigiValidation(); + ~GEMCoPadDigiValidation() override; void analyze(const edm::Event& e, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; private: diff --git a/Validation/MuonGEMDigis/interface/GEMDigiTrackMatch.h b/Validation/MuonGEMDigis/interface/GEMDigiTrackMatch.h index a828e0652a9a1..937148c566c42 100644 --- a/Validation/MuonGEMDigis/interface/GEMDigiTrackMatch.h +++ b/Validation/MuonGEMDigis/interface/GEMDigiTrackMatch.h @@ -16,7 +16,7 @@ class GEMDigiTrackMatch : public GEMTrackMatch { public: explicit GEMDigiTrackMatch(const edm::ParameterSet& ps); - ~GEMDigiTrackMatch(); + ~GEMDigiTrackMatch() override; void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const &) override; void analyze(const edm::Event& e, const edm::EventSetup&) override; private: diff --git a/Validation/MuonGEMDigis/interface/GEMPadDigiValidation.h b/Validation/MuonGEMDigis/interface/GEMPadDigiValidation.h index 83386dd314916..c4e6215efc53a 100644 --- a/Validation/MuonGEMDigis/interface/GEMPadDigiValidation.h +++ b/Validation/MuonGEMDigis/interface/GEMPadDigiValidation.h @@ -9,7 +9,7 @@ class GEMPadDigiValidation : public GEMBaseValidation { public: explicit GEMPadDigiValidation( const edm::ParameterSet& ); - ~GEMPadDigiValidation(); + ~GEMPadDigiValidation() override; void analyze(const edm::Event& e, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; private: diff --git a/Validation/MuonGEMDigis/interface/GEMStripDigiValidation.h b/Validation/MuonGEMDigis/interface/GEMStripDigiValidation.h index 2c9abb02451bd..1215e84a82803 100644 --- a/Validation/MuonGEMDigis/interface/GEMStripDigiValidation.h +++ b/Validation/MuonGEMDigis/interface/GEMStripDigiValidation.h @@ -11,7 +11,7 @@ class GEMStripDigiValidation : public GEMBaseValidation { public: explicit GEMStripDigiValidation(const edm::ParameterSet&); - ~GEMStripDigiValidation(); + ~GEMStripDigiValidation() override; void analyze(const edm::Event& e, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/MuonGEMDigis/plugins/MuonGEMDigisHarvestor.cc b/Validation/MuonGEMDigis/plugins/MuonGEMDigisHarvestor.cc index 94b9e94b54a08..cf6cea3f5a99e 100644 --- a/Validation/MuonGEMDigis/plugins/MuonGEMDigisHarvestor.cc +++ b/Validation/MuonGEMDigis/plugins/MuonGEMDigisHarvestor.cc @@ -120,7 +120,7 @@ void MuonGEMDigisHarvestor::ProcessBooking( DQMStore::IBooker& ibooker, DQMStore void MuonGEMDigisHarvestor::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& ig) { - ig.setCurrentFolder(dbe_path_.c_str()); + ig.setCurrentFolder(dbe_path_); TH1F* gem_trk_eta[3]; TH1F* gem_trk_phi[3][2]; diff --git a/Validation/MuonGEMDigis/plugins/MuonGEMDigisHarvestor.h b/Validation/MuonGEMDigis/plugins/MuonGEMDigisHarvestor.h index 09d6c2b7ddd6c..46efe50637c55 100644 --- a/Validation/MuonGEMDigis/plugins/MuonGEMDigisHarvestor.h +++ b/Validation/MuonGEMDigis/plugins/MuonGEMDigisHarvestor.h @@ -24,9 +24,9 @@ class MuonGEMDigisHarvestor : public DQMEDHarvester /// constructor explicit MuonGEMDigisHarvestor(const edm::ParameterSet&); /// destructor - virtual ~MuonGEMDigisHarvestor(); + ~MuonGEMDigisHarvestor() override; - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &); + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; void ProcessBooking( DQMStore::IBooker& , DQMStore::IGetter&, const char* label, TString suffix, TH1F* track_hist, TH1F* sh_hist ); TProfile* ComputeEff(TH1F* num, TH1F* denum ); diff --git a/Validation/MuonGEMDigis/src/GEMCoPadDigiValidation.cc b/Validation/MuonGEMDigis/src/GEMCoPadDigiValidation.cc index 197d265c6d031..798384feb349c 100644 --- a/Validation/MuonGEMDigis/src/GEMCoPadDigiValidation.cc +++ b/Validation/MuonGEMDigis/src/GEMCoPadDigiValidation.cc @@ -21,7 +21,7 @@ void GEMCoPadDigiValidation::bookHistograms(DQMStore::IBooker & ibooker, edm::Ru int npadsGE21 = 0; int nPads = 0; - if ( GEMGeometry_->regions()[0]->stations()[1]->superChambers().size() != 0 ) { + if ( !GEMGeometry_->regions()[0]->stations()[1]->superChambers().empty() ) { npadsGE21 = GEMGeometry_->regions()[0]->stations()[1]->superChambers()[0]->chambers()[0]->etaPartitions()[0]->npads(); } diff --git a/Validation/MuonGEMDigis/src/GEMPadDigiValidation.cc b/Validation/MuonGEMDigis/src/GEMPadDigiValidation.cc index 3a67d6f686059..ad52cd599e4df 100644 --- a/Validation/MuonGEMDigis/src/GEMPadDigiValidation.cc +++ b/Validation/MuonGEMDigis/src/GEMPadDigiValidation.cc @@ -19,7 +19,7 @@ void GEMPadDigiValidation::bookHistograms(DQMStore::IBooker & ibooker, edm::Run int npadsGE21 = 0; int nPads = 0; - if ( GEMGeometry_->regions()[0]->stations()[1]->superChambers().size() != 0 ) { + if ( !GEMGeometry_->regions()[0]->stations()[1]->superChambers().empty() ) { npadsGE21 = GEMGeometry_->regions()[0]->stations()[1]->superChambers()[0]->chambers()[0]->etaPartitions()[0]->npads(); } diff --git a/Validation/MuonGEMHits/interface/GEMBaseValidation.h b/Validation/MuonGEMHits/interface/GEMBaseValidation.h index 7e6a714da86c5..dd8124ccd91db 100644 --- a/Validation/MuonGEMHits/interface/GEMBaseValidation.h +++ b/Validation/MuonGEMHits/interface/GEMBaseValidation.h @@ -19,8 +19,8 @@ class GEMBaseValidation : public DQMEDAnalyzer { public: explicit GEMBaseValidation( const edm::ParameterSet& ps ); - virtual ~GEMBaseValidation(); - virtual void analyze(const edm::Event& e, const edm::EventSetup&) = 0 ; + ~GEMBaseValidation() override; + void analyze(const edm::Event& e, const edm::EventSetup&) override = 0 ; MonitorElement* BookHistZR( DQMStore::IBooker &, const char* name, const char* label, unsigned int region_num, unsigned int station_num, unsigned int layer_num =99 ); MonitorElement* BookHistXY( DQMStore::IBooker &, const char* name, const char* label, unsigned int region_num, unsigned int station_num, unsigned int layer_num =99 ); std::string getSuffixName(int region, int station, int layer); diff --git a/Validation/MuonGEMHits/interface/GEMHitsValidation.h b/Validation/MuonGEMHits/interface/GEMHitsValidation.h index 21cb0df658c28..394c64639b5c8 100644 --- a/Validation/MuonGEMHits/interface/GEMHitsValidation.h +++ b/Validation/MuonGEMHits/interface/GEMHitsValidation.h @@ -10,7 +10,7 @@ class GEMHitsValidation : public GEMBaseValidation { public: explicit GEMHitsValidation( const edm::ParameterSet& ); - ~GEMHitsValidation(); + ~GEMHitsValidation() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void analyze(const edm::Event& e, const edm::EventSetup&) override; private: diff --git a/Validation/MuonGEMHits/interface/GEMSimTrackMatch.h b/Validation/MuonGEMHits/interface/GEMSimTrackMatch.h index dd95220961272..bf66d5bec4fec 100644 --- a/Validation/MuonGEMHits/interface/GEMSimTrackMatch.h +++ b/Validation/MuonGEMHits/interface/GEMSimTrackMatch.h @@ -8,7 +8,7 @@ class GEMSimTrackMatch : public GEMTrackMatch { public: explicit GEMSimTrackMatch(const edm::ParameterSet& ps); - ~GEMSimTrackMatch(); + ~GEMSimTrackMatch() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void analyze(const edm::Event& e, const edm::EventSetup&) override; diff --git a/Validation/MuonGEMHits/interface/GEMTrackMatch.h b/Validation/MuonGEMHits/interface/GEMTrackMatch.h index 834cd59d37e60..8da705cf31819 100644 --- a/Validation/MuonGEMHits/interface/GEMTrackMatch.h +++ b/Validation/MuonGEMHits/interface/GEMTrackMatch.h @@ -43,8 +43,8 @@ class GEMTrackMatch : public DQMEDAnalyzer { public: explicit GEMTrackMatch( const edm::ParameterSet& cfg); - virtual ~GEMTrackMatch(); - virtual void analyze(const edm::Event& e, const edm::EventSetup&) = 0 ; + ~GEMTrackMatch() override; + void analyze(const edm::Event& e, const edm::EventSetup&) override = 0 ; void buildLUT(const int maxChamberId); std::pair getClosestChambers(const int maxChamberId, int region, float phi); diff --git a/Validation/MuonGEMHits/plugins/MuonGEMHitsHarvestor.cc b/Validation/MuonGEMHits/plugins/MuonGEMHitsHarvestor.cc index 952df2413da7e..1db1ae45cd149 100644 --- a/Validation/MuonGEMHits/plugins/MuonGEMHitsHarvestor.cc +++ b/Validation/MuonGEMHits/plugins/MuonGEMHitsHarvestor.cc @@ -104,7 +104,7 @@ void MuonGEMHitsHarvestor::ProcessBooking( DQMStore::IBooker& ibooker, DQMStore: void MuonGEMHitsHarvestor::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter &ig ) { - ig.setCurrentFolder(dbe_path_.c_str()); + ig.setCurrentFolder(dbe_path_); TH1F* track_eta[3]; TH1F* track_phi[3][3]; @@ -118,7 +118,7 @@ MuonGEMHitsHarvestor::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & for (unsigned int i = 0; i < s_suffix.size(); i++) { string suffix = s_suffix[i]; string track_eta_name = dbe_path_+"track_eta"+suffix; - if ( ig.get(track_eta_name.c_str()) != nullptr) track_eta[i] = (TH1F*)ig.get(track_eta_name.c_str())->getTH1F()->Clone(); + if ( ig.get(track_eta_name) != nullptr) track_eta[i] = (TH1F*)ig.get(track_eta_name)->getTH1F()->Clone(); for (unsigned int j = 0; j < l_suffix.size(); j++) { suffix = s_suffix[i]+l_suffix[j]; ProcessBooking( ibooker, ig, "sh_eta"+suffix,track_eta[i]); @@ -128,7 +128,7 @@ MuonGEMHitsHarvestor::dqmEndJob(DQMStore::IBooker & ibooker, DQMStore::IGetter & for (unsigned int j = 0 ; j < c_suffix.size(); j++) { string suffix = s_suffix[i]+c_suffix[j]; string track_phi_name = dbe_path_+"track_phi"+suffix; - if ( ig.get(track_phi_name.c_str()) != nullptr) track_phi[i][j] = (TH1F*)ig.get(track_phi_name.c_str())->getTH1F()->Clone(); + if ( ig.get(track_phi_name) != nullptr) track_phi[i][j] = (TH1F*)ig.get(track_phi_name)->getTH1F()->Clone(); for (unsigned int k = 0; k < l_suffix.size(); k++) { suffix = s_suffix[i]+l_suffix[k]+c_suffix[j]; ProcessBooking( ibooker, ig, "sh_phi"+suffix,track_phi[i][j]); diff --git a/Validation/MuonGEMHits/plugins/MuonGEMHitsHarvestor.h b/Validation/MuonGEMHits/plugins/MuonGEMHitsHarvestor.h index 8c4df80db74e8..4a64cefb56164 100644 --- a/Validation/MuonGEMHits/plugins/MuonGEMHitsHarvestor.h +++ b/Validation/MuonGEMHits/plugins/MuonGEMHitsHarvestor.h @@ -24,9 +24,9 @@ class MuonGEMHitsHarvestor : public DQMEDHarvester /// constructor explicit MuonGEMHitsHarvestor(const edm::ParameterSet&); /// destructor - virtual ~MuonGEMHitsHarvestor(); + ~MuonGEMHitsHarvestor() override; - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &); + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; void ProcessBooking( DQMStore::IBooker& , DQMStore::IGetter&, std::string label_suffix, TH1F* track_hist, TH1F* sh_hist=nullptr ); TProfile* ComputeEff(TH1F* num, TH1F* denum ); diff --git a/Validation/MuonGEMHits/src/GEMBaseValidation.cc b/Validation/MuonGEMHits/src/GEMBaseValidation.cc index e34d4a978d2af..f01135f56838c 100644 --- a/Validation/MuonGEMHits/src/GEMBaseValidation.cc +++ b/Validation/MuonGEMHits/src/GEMBaseValidation.cc @@ -112,7 +112,7 @@ MonitorElement* GEMBaseValidation::getSimpleZR(DQMStore::IBooker& ibooker, TStri } MonitorElement* GEMBaseValidation::getDCEta(DQMStore::IBooker& ibooker, const GEMStation* station, TString title, TString histname ) { - if( station->rings().front()->superChambers().size() == 0 ) { + if( station->rings().front()->superChambers().empty() ) { LogDebug("MuonBaseValidation")<<"+++ Error! can not get superChambers. Skip "<region(), station->station())<<" on "< -#include +#include #include #include #include @@ -67,9 +67,9 @@ class MuonSimHitsValidAnalyzer : public DQMEDAnalyzer typedef std::vector UnsigIntegerVector; explicit MuonSimHitsValidAnalyzer(const edm::ParameterSet&); - virtual ~MuonSimHitsValidAnalyzer(); + ~MuonSimHitsValidAnalyzer() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: void fillDT(const edm::Event&, const edm::EventSetup&); diff --git a/Validation/MuonIdentification/interface/MuonIdVal.h b/Validation/MuonIdentification/interface/MuonIdVal.h index f5e0f8069fef3..1fae0a91ea341 100644 --- a/Validation/MuonIdentification/interface/MuonIdVal.h +++ b/Validation/MuonIdentification/interface/MuonIdVal.h @@ -57,12 +57,12 @@ class MuonIdVal : public DQMEDAnalyzer { public: explicit MuonIdVal(const edm::ParameterSet&); - ~MuonIdVal(); + ~MuonIdVal() override; private: virtual void beginJob(); void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; virtual void endJob(); virtual void Fill(MonitorElement*, float); diff --git a/Validation/MuonIsolation/interface/MuIsoValidation.h b/Validation/MuonIsolation/interface/MuIsoValidation.h index 7a38a3b9aded5..badbb87d1f16c 100644 --- a/Validation/MuonIsolation/interface/MuIsoValidation.h +++ b/Validation/MuonIsolation/interface/MuIsoValidation.h @@ -66,12 +66,12 @@ class MuIsoValidation : public DQMEDAnalyzer { public: //---------methods---------------------------- explicit MuIsoValidation(const edm::ParameterSet&); - ~MuIsoValidation(); + ~MuIsoValidation() override; private: //---------methods---------------------------- - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; void InitStatics(); void RecordData(MuonIterator muon);//Fills Histograms with info from single muon void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/MuonIsolation/src/MuIsoValidation.cc b/Validation/MuonIsolation/src/MuIsoValidation.cc index 3b0b6293fd194..42afaa066c2b7 100644 --- a/Validation/MuonIsolation/src/MuIsoValidation.cc +++ b/Validation/MuonIsolation/src/MuIsoValidation.cc @@ -83,7 +83,7 @@ MuIsoValidation::MuIsoValidation(const edm::ParameterSet& ps) InitStatics(); //Set up DAQ - dbe = 0; + dbe = nullptr; dbe = edm::Service().operator->(); subsystemname_ = iConfig.getUntrackedParameter("subSystemFolder", "YourSubsystem") ; @@ -354,7 +354,7 @@ void MuIsoValidation::RecordData(MuonIterator muon){ void MuIsoValidation::bookHistograms(DQMStore::IBooker & ibooker,edm::Run const & iRun,edm::EventSetup const &){ - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); //---initialize number of muons histogram--- h_nMuons = ibooker.book1D("nMuons", title_sam + "Number of Muons", 20, 0., 20.); h_nMuons->setAxisTitle("Number of Muons",XAXIS); diff --git a/Validation/MuonME0Validation/interface/ME0BaseValidation.h b/Validation/MuonME0Validation/interface/ME0BaseValidation.h index 06e26e0607d87..b6d50a5107524 100644 --- a/Validation/MuonME0Validation/interface/ME0BaseValidation.h +++ b/Validation/MuonME0Validation/interface/ME0BaseValidation.h @@ -23,8 +23,8 @@ class ME0BaseValidation : public DQMEDAnalyzer { public: explicit ME0BaseValidation( const edm::ParameterSet& ps ); - virtual ~ME0BaseValidation(); - virtual void analyze(const edm::Event& e, const edm::EventSetup&) = 0 ; + ~ME0BaseValidation() override; + void analyze(const edm::Event& e, const edm::EventSetup&) override = 0 ; MonitorElement* BookHistZR( DQMStore::IBooker &, const char* name, const char* label, unsigned int region_num, unsigned int layer_num =99 ); MonitorElement* BookHistXY( DQMStore::IBooker &, const char* name, const char* label, unsigned int region_num, unsigned int layer_num =99 ); protected: diff --git a/Validation/MuonME0Validation/interface/ME0DigisValidation.h b/Validation/MuonME0Validation/interface/ME0DigisValidation.h index 30a479b213f91..b729c490a29ee 100644 --- a/Validation/MuonME0Validation/interface/ME0DigisValidation.h +++ b/Validation/MuonME0Validation/interface/ME0DigisValidation.h @@ -11,7 +11,7 @@ class ME0DigisValidation : public ME0BaseValidation { public: explicit ME0DigisValidation( const edm::ParameterSet& ); - ~ME0DigisValidation(); + ~ME0DigisValidation() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void analyze(const edm::Event& e, const edm::EventSetup&) override; bool isMatched(const int, const int, const int, const int, const int, const int); diff --git a/Validation/MuonME0Validation/interface/ME0HitsValidation.h b/Validation/MuonME0Validation/interface/ME0HitsValidation.h index 3723224472b95..061285798187c 100644 --- a/Validation/MuonME0Validation/interface/ME0HitsValidation.h +++ b/Validation/MuonME0Validation/interface/ME0HitsValidation.h @@ -9,7 +9,7 @@ class ME0HitsValidation : public ME0BaseValidation { public: explicit ME0HitsValidation( const edm::ParameterSet& ); - ~ME0HitsValidation(); + ~ME0HitsValidation() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void analyze(const edm::Event& e, const edm::EventSetup&) override; private: diff --git a/Validation/MuonME0Validation/interface/ME0RecHitsValidation.h b/Validation/MuonME0Validation/interface/ME0RecHitsValidation.h index 88d8e9778deaf..347a74e76b5e6 100644 --- a/Validation/MuonME0Validation/interface/ME0RecHitsValidation.h +++ b/Validation/MuonME0Validation/interface/ME0RecHitsValidation.h @@ -15,7 +15,7 @@ class ME0RecHitsValidation : public ME0BaseValidation { public: explicit ME0RecHitsValidation( const edm::ParameterSet& ); - ~ME0RecHitsValidation(); + ~ME0RecHitsValidation() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void analyze(const edm::Event& e, const edm::EventSetup&) override; private: diff --git a/Validation/MuonME0Validation/interface/ME0SegmentsValidation.h b/Validation/MuonME0Validation/interface/ME0SegmentsValidation.h index 7cb4b255babeb..a117815e22f50 100644 --- a/Validation/MuonME0Validation/interface/ME0SegmentsValidation.h +++ b/Validation/MuonME0Validation/interface/ME0SegmentsValidation.h @@ -18,7 +18,7 @@ class ME0SegmentsValidation : public ME0BaseValidation { public: explicit ME0SegmentsValidation( const edm::ParameterSet& ); - ~ME0SegmentsValidation(); + ~ME0SegmentsValidation() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void analyze(const edm::Event& e, const edm::EventSetup&) override; std::pair isMatched(ME0DetId, LocalPoint, edm::Handle); diff --git a/Validation/MuonME0Validation/plugins/MuonME0DigisHarvestor.cc b/Validation/MuonME0Validation/plugins/MuonME0DigisHarvestor.cc index fa06ed25d232b..bb96a62f731c4 100644 --- a/Validation/MuonME0Validation/plugins/MuonME0DigisHarvestor.cc +++ b/Validation/MuonME0Validation/plugins/MuonME0DigisHarvestor.cc @@ -156,7 +156,7 @@ void MuonME0DigisHarvestor::ProcessBookingBKG( DQMStore::IBooker& ibooker, DQMSt void MuonME0DigisHarvestor::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& ig) { - ig.setCurrentFolder(dbe_path_.c_str()); + ig.setCurrentFolder(dbe_path_); const char* l_suffix[6] = {"_l1","_l2","_l3","_l4","_l5","_l6"}; const char* r_suffix[2] = {"-1","1"}; diff --git a/Validation/MuonME0Validation/plugins/MuonME0DigisHarvestor.h b/Validation/MuonME0Validation/plugins/MuonME0DigisHarvestor.h index 7586b41779cc7..8e0f396a036e8 100644 --- a/Validation/MuonME0Validation/plugins/MuonME0DigisHarvestor.h +++ b/Validation/MuonME0Validation/plugins/MuonME0DigisHarvestor.h @@ -21,9 +21,9 @@ class MuonME0DigisHarvestor : public DQMEDHarvester /// constructor explicit MuonME0DigisHarvestor(const edm::ParameterSet&); /// destructor - ~MuonME0DigisHarvestor(); + ~MuonME0DigisHarvestor() override; - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &); + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; void ProcessBooking( DQMStore::IBooker& , DQMStore::IGetter&, std::string nameHist, TH1F* num, TH1F* den ); void ProcessBookingBKG( DQMStore::IBooker& ibooker, DQMStore::IGetter& ig, std::string nameHist, TH1F* hist, TH1F* hist2 ); TProfile* ComputeEff(TH1F* num, TH1F* denum, std::string nameHist ); diff --git a/Validation/MuonME0Validation/plugins/MuonME0SegHarvestor.cc b/Validation/MuonME0Validation/plugins/MuonME0SegHarvestor.cc index 460456a610de7..82f4e684b4d63 100644 --- a/Validation/MuonME0Validation/plugins/MuonME0SegHarvestor.cc +++ b/Validation/MuonME0Validation/plugins/MuonME0SegHarvestor.cc @@ -105,7 +105,7 @@ void MuonME0SegHarvestor::ProcessBooking( DQMStore::IBooker& ibooker, DQMStore:: void MuonME0SegHarvestor::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& ig) { - ig.setCurrentFolder(dbe_path_.c_str()); + ig.setCurrentFolder(dbe_path_); TString eta_label_den = TString(dbe_path_)+"me0_simsegment_eta"; TString eta_label_num = TString(dbe_path_)+"me0_matchedsimsegment_eta"; diff --git a/Validation/MuonME0Validation/plugins/MuonME0SegHarvestor.h b/Validation/MuonME0Validation/plugins/MuonME0SegHarvestor.h index 57034e8fa7fab..7738cfcce45ae 100644 --- a/Validation/MuonME0Validation/plugins/MuonME0SegHarvestor.h +++ b/Validation/MuonME0Validation/plugins/MuonME0SegHarvestor.h @@ -21,9 +21,9 @@ class MuonME0SegHarvestor : public DQMEDHarvester /// constructor explicit MuonME0SegHarvestor(const edm::ParameterSet&); /// destructor - ~MuonME0SegHarvestor(); + ~MuonME0SegHarvestor() override; - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &); + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; void ProcessBooking( DQMStore::IBooker& , DQMStore::IGetter&, std::string nameHist, TH1F* num, TH1F* den ); TProfile* ComputeEff(TH1F* num, TH1F* denum, std::string nameHist ); diff --git a/Validation/MuonME0Validation/src/ME0SegmentsValidation.cc b/Validation/MuonME0Validation/src/ME0SegmentsValidation.cc index a647bd7beedc6..9c2daebe7ca24 100644 --- a/Validation/MuonME0Validation/src/ME0SegmentsValidation.cc +++ b/Validation/MuonME0Validation/src/ME0SegmentsValidation.cc @@ -275,7 +275,7 @@ void ME0SegmentsValidation::analyze(const edm::Event& e, for(auto const& seg : myMapSeg) {//loop over the reconstructed me0 segments int num_sh_matched = 0; - if(seg.second.size() == 0) continue; + if(seg.second.empty()) continue; for(auto const& sh : st.second) {//loop over the me0 simHits left by the signal simTracks diff --git a/Validation/MuonRPCDigis/interface/RPCDigiValid.h b/Validation/MuonRPCDigis/interface/RPCDigiValid.h index 484854137b614..e4a11faec73e8 100644 --- a/Validation/MuonRPCDigis/interface/RPCDigiValid.h +++ b/Validation/MuonRPCDigis/interface/RPCDigiValid.h @@ -20,7 +20,7 @@ class RPCDigiValid: public DQMEDAnalyzer public: RPCDigiValid(const edm::ParameterSet& ps); - ~RPCDigiValid(); + ~RPCDigiValid() override; protected: void analyze(const edm::Event& e, const edm::EventSetup& c) override; diff --git a/Validation/MuonRPCGeometry/plugins/RPCGeometryServTest.cc b/Validation/MuonRPCGeometry/plugins/RPCGeometryServTest.cc index 66472f3f7fa60..f286b62b47a92 100644 --- a/Validation/MuonRPCGeometry/plugins/RPCGeometryServTest.cc +++ b/Validation/MuonRPCGeometry/plugins/RPCGeometryServTest.cc @@ -73,7 +73,7 @@ RPCGeometryServTest::analyze( const edm::Event& iEvent, const edm::EventSetup& i //----------------------- RPCCHAMBER TEST --------------------------- - if( dynamic_cast< const RPCChamber* >( *it ) != 0 ){ + if( dynamic_cast< const RPCChamber* >( *it ) != nullptr ){ ++iRPCCHcount; const RPCChamber* ch = dynamic_cast< const RPCChamber* >( *it ); diff --git a/Validation/MuonRPCGeometry/plugins/RPCGeometryServTest.h b/Validation/MuonRPCGeometry/plugins/RPCGeometryServTest.h index 2420b91d5ddf1..efe8cef896854 100644 --- a/Validation/MuonRPCGeometry/plugins/RPCGeometryServTest.h +++ b/Validation/MuonRPCGeometry/plugins/RPCGeometryServTest.h @@ -32,9 +32,9 @@ class RPCGeometryServTest : public edm::EDAnalyzer { public: RPCGeometryServTest( const edm::ParameterSet& pset); - ~RPCGeometryServTest(); + ~RPCGeometryServTest() override; - virtual void analyze( const edm::Event&, const edm::EventSetup& ); + void analyze( const edm::Event&, const edm::EventSetup& ) override; const std::string& myName() { return myName_;} diff --git a/Validation/MuonRPCGeometry/plugins/RPCPhiEff.h b/Validation/MuonRPCGeometry/plugins/RPCPhiEff.h index 59bfbaa87965f..6a051f75b79dd 100644 --- a/Validation/MuonRPCGeometry/plugins/RPCPhiEff.h +++ b/Validation/MuonRPCGeometry/plugins/RPCPhiEff.h @@ -40,15 +40,15 @@ class RPCPhiEff:public edm::EDAnalyzer { public: explicit RPCPhiEff(const edm::ParameterSet &); - ~RPCPhiEff(); + ~RPCPhiEff() override; private: - virtual void beginJob(); - virtual void analyze(const edm::Event &, const edm::EventSetup &); + void beginJob() override; + void analyze(const edm::Event &, const edm::EventSetup &) override; std::string fromCones(const edm::Event & iEvent); std::string fromRaw(const edm::Event & iEvent); - virtual void endJob(); + void endJob() override; std::ofstream m_outfileC; std::ofstream m_outfileR; diff --git a/Validation/Performance/interface/PerformanceAnalyzer.h b/Validation/Performance/interface/PerformanceAnalyzer.h index 6688ba8d7018b..e0ad76c4e30a9 100644 --- a/Validation/Performance/interface/PerformanceAnalyzer.h +++ b/Validation/Performance/interface/PerformanceAnalyzer.h @@ -14,9 +14,9 @@ class PerformanceAnalyzer : public DQMEDAnalyzer public: explicit PerformanceAnalyzer(const edm::ParameterSet&); - ~PerformanceAnalyzer(); + ~PerformanceAnalyzer() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: edm::EDGetTokenT eventTime_Token_; diff --git a/Validation/RPCRecHits/interface/RPCPointVsRecHit.h b/Validation/RPCRecHits/interface/RPCPointVsRecHit.h index 99144d4702772..3984dd317f8d2 100644 --- a/Validation/RPCRecHits/interface/RPCPointVsRecHit.h +++ b/Validation/RPCRecHits/interface/RPCPointVsRecHit.h @@ -20,7 +20,7 @@ class RPCPointVsRecHit : public DQMEDAnalyzer { public: RPCPointVsRecHit(const edm::ParameterSet& pset); - ~RPCPointVsRecHit() {}; + ~RPCPointVsRecHit() override {}; void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/RPCRecHits/interface/RPCRecHitValid.h b/Validation/RPCRecHits/interface/RPCRecHitValid.h index b4ceaa06afda0..8530a31a2bf16 100644 --- a/Validation/RPCRecHits/interface/RPCRecHitValid.h +++ b/Validation/RPCRecHits/interface/RPCRecHitValid.h @@ -25,7 +25,7 @@ class RPCRecHitValid : public DQMEDAnalyzer { public: RPCRecHitValid(const edm::ParameterSet& pset); - ~RPCRecHitValid() {}; + ~RPCRecHitValid() override {}; void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/RPCRecHits/interface/RPCRecHitValidClient.h b/Validation/RPCRecHits/interface/RPCRecHitValidClient.h index 6097bbb83f812..8c8bfbac8ce8f 100644 --- a/Validation/RPCRecHits/interface/RPCRecHitValidClient.h +++ b/Validation/RPCRecHits/interface/RPCRecHitValidClient.h @@ -19,9 +19,9 @@ class RPCRecHitValidClient : public DQMEDHarvester { public: RPCRecHitValidClient(const edm::ParameterSet& pset); - ~RPCRecHitValidClient() {}; + ~RPCRecHitValidClient() override {}; - void dqmEndJob(DQMStore::IBooker& booker, DQMStore::IGetter& getter); + void dqmEndJob(DQMStore::IBooker& booker, DQMStore::IGetter& getter) override; private: std::string subDir_; diff --git a/Validation/RPCRecHits/src/RPCRecHitValid.cc b/Validation/RPCRecHits/src/RPCRecHitValid.cc index 77d6b98c0376c..6a69e330fe804 100644 --- a/Validation/RPCRecHits/src/RPCRecHitValid.cc +++ b/Validation/RPCRecHits/src/RPCRecHitValid.cc @@ -177,10 +177,10 @@ void RPCRecHitValid::bookHistograms(DQMStore::IBooker& booker, h_recPunchOccupancyBarrel_wheel_station->getTH2F()->SetContour(10); h_recPunchOccupancyEndcap_disk_ring ->getTH2F()->SetContour(10); - h_refPunchOccupancyBarrel_wheel_station->getTH2F()->SetStats(0); - h_refPunchOccupancyEndcap_disk_ring ->getTH2F()->SetStats(0); - h_recPunchOccupancyBarrel_wheel_station->getTH2F()->SetStats(0); - h_recPunchOccupancyEndcap_disk_ring ->getTH2F()->SetStats(0); + h_refPunchOccupancyBarrel_wheel_station->getTH2F()->SetStats(false); + h_refPunchOccupancyEndcap_disk_ring ->getTH2F()->SetStats(false); + h_recPunchOccupancyBarrel_wheel_station->getTH2F()->SetStats(false); + h_recPunchOccupancyEndcap_disk_ring ->getTH2F()->SetStats(false); h_refPunchOccupancyBarrel_wheel_station->getTH2F()->SetMinimum(0); h_refPunchOccupancyEndcap_disk_ring ->getTH2F()->SetMinimum(0); diff --git a/Validation/RPCRecHits/src/RPCValidHistograms.cc b/Validation/RPCRecHits/src/RPCValidHistograms.cc index a345349a9587f..e6889f3b92f83 100644 --- a/Validation/RPCRecHits/src/RPCValidHistograms.cc +++ b/Validation/RPCRecHits/src/RPCValidHistograms.cc @@ -169,22 +169,22 @@ void RPCValidHistograms::bookHistograms(DQMStore::IBooker& booker, const std::st pull_station_pull->getTH2F()->SetContour(10); pull_ring_pull ->getTH2F()->SetContour(10); - refHitOccupancyBarrel_wheel_station->getTH2F()->SetStats(0); - refHitOccupancyEndcap_disk_ring ->getTH2F()->SetStats(0); - recHitOccupancyBarrel_wheel_station->getTH2F()->SetStats(0); - recHitOccupancyEndcap_disk_ring ->getTH2F()->SetStats(0); - matchOccupancyBarrel_wheel_station ->getTH2F()->SetStats(0); - matchOccupancyEndcap_disk_ring ->getTH2F()->SetStats(0); - - res_wheel_res ->getTH2F()->SetStats(0); - res_disk_res ->getTH2F()->SetStats(0); - res_station_res->getTH2F()->SetStats(0); - res_ring_res ->getTH2F()->SetStats(0); - - pull_wheel_pull ->getTH2F()->SetStats(0); - pull_disk_pull ->getTH2F()->SetStats(0); - pull_station_pull->getTH2F()->SetStats(0); - pull_ring_pull ->getTH2F()->SetStats(0); + refHitOccupancyBarrel_wheel_station->getTH2F()->SetStats(false); + refHitOccupancyEndcap_disk_ring ->getTH2F()->SetStats(false); + recHitOccupancyBarrel_wheel_station->getTH2F()->SetStats(false); + recHitOccupancyEndcap_disk_ring ->getTH2F()->SetStats(false); + matchOccupancyBarrel_wheel_station ->getTH2F()->SetStats(false); + matchOccupancyEndcap_disk_ring ->getTH2F()->SetStats(false); + + res_wheel_res ->getTH2F()->SetStats(false); + res_disk_res ->getTH2F()->SetStats(false); + res_station_res->getTH2F()->SetStats(false); + res_ring_res ->getTH2F()->SetStats(false); + + pull_wheel_pull ->getTH2F()->SetStats(false); + pull_disk_pull ->getTH2F()->SetStats(false); + pull_station_pull->getTH2F()->SetStats(false); + pull_ring_pull ->getTH2F()->SetStats(false); // Set bin labels for ( int i=1; i<=5; ++i ) diff --git a/Validation/RecoB/plugins/BDHadronTrackMonitoringAnalyzer.cc b/Validation/RecoB/plugins/BDHadronTrackMonitoringAnalyzer.cc index 4ed59daa3b3c4..b029fcf6cbd5e 100644 --- a/Validation/RecoB/plugins/BDHadronTrackMonitoringAnalyzer.cc +++ b/Validation/RecoB/plugins/BDHadronTrackMonitoringAnalyzer.cc @@ -134,7 +134,7 @@ void BDHadronTrackMonitoringAnalyzer::analyze(const edm::Event& iEvent, const ed edm::Handle primaryVertex ; iEvent.getByToken(PrimaryVertexColl_,primaryVertex); - bool pvFound = (primaryVertex->size() != 0); + bool pvFound = (!primaryVertex->empty()); if ( pvFound ) { pv = &(*primaryVertex->begin()); } @@ -155,7 +155,7 @@ void BDHadronTrackMonitoringAnalyzer::analyze(const edm::Event& iEvent, const ed unsigned int flav = abs(jet->hadronFlavour()); //std::cout << "patJet collection has pfImpactParameterTagInfo?: " << jet->hasTagInfo("pfImpactParameter") << std::endl; - const CandIPTagInfo *trackIpTagInfo = jet->tagInfoCandIP(ipTagInfos_.c_str()); + const CandIPTagInfo *trackIpTagInfo = jet->tagInfoCandIP(ipTagInfos_); const std::vector > & selectedTracks( trackIpTagInfo->selectedTracks() ); @@ -225,7 +225,7 @@ void BDHadronTrackMonitoringAnalyzer::analyze(const edm::Event& iEvent, const ed TrkTruthEta = tpr->eta(); TrkTruthPhi = tpr->phi(); - TrackingParticle::Point vertex_pv = pv->position(); + const TrackingParticle::Point& vertex_pv = pv->position(); TrackingParticle::Point vertex_tpr = tpr->vertex(); TrackingParticle::Vector momentum_tpr = tpr->momentum(); TrkTruthDxy = (-(vertex_tpr.x()-vertex_pv.x())*momentum_tpr.y()+(vertex_tpr.y()-vertex_pv.y())*momentum_tpr.x())/tpr->pt(); diff --git a/Validation/RecoB/plugins/BDHadronTrackMonitoringAnalyzer.h b/Validation/RecoB/plugins/BDHadronTrackMonitoringAnalyzer.h index 9541947992b48..2d01a495c7c01 100644 --- a/Validation/RecoB/plugins/BDHadronTrackMonitoringAnalyzer.h +++ b/Validation/RecoB/plugins/BDHadronTrackMonitoringAnalyzer.h @@ -55,10 +55,10 @@ class BDHadronTrackMonitoringAnalyzer : public DQMEDAnalyzer { public: explicit BDHadronTrackMonitoringAnalyzer(const edm::ParameterSet& pSet); - ~BDHadronTrackMonitoringAnalyzer(); + ~BDHadronTrackMonitoringAnalyzer() override; - virtual void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; enum HistoryClasses{ BCWeakDecay=0, BWeakDecay=1, CWeakDecay=2, PU=3, Other=4, Fake=5}; diff --git a/Validation/RecoB/plugins/BDHadronTrackMonitoringHarvester.h b/Validation/RecoB/plugins/BDHadronTrackMonitoringHarvester.h index 04c0fe8d3db9f..dd60473af9ff4 100644 --- a/Validation/RecoB/plugins/BDHadronTrackMonitoringHarvester.h +++ b/Validation/RecoB/plugins/BDHadronTrackMonitoringHarvester.h @@ -24,11 +24,11 @@ using namespace RecoBTag; class BDHadronTrackMonitoringHarvester : public DQMEDHarvester { public: explicit BDHadronTrackMonitoringHarvester(const edm::ParameterSet& pSet); - ~BDHadronTrackMonitoringHarvester(); + ~BDHadronTrackMonitoringHarvester() override; private: void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; - void beginJob(); + void beginJob() override; // Histograms diff --git a/Validation/RecoB/plugins/BTagPerformanceAnalyzerMC.cc b/Validation/RecoB/plugins/BTagPerformanceAnalyzerMC.cc index bb45df86ca877..7691fe7ad8646 100644 --- a/Validation/RecoB/plugins/BTagPerformanceAnalyzerMC.cc +++ b/Validation/RecoB/plugins/BTagPerformanceAnalyzerMC.cc @@ -280,7 +280,7 @@ void BTagPerformanceAnalyzerMC::analyze(const edm::Event& iEvent, const edm::Eve } //Get JEC - const JetCorrector* corrector = 0; + const JetCorrector* corrector = nullptr; if(doJEC) { edm::Handle genInfoHandle; //check if data or MC iEvent.getByToken(genToken, genInfoHandle); diff --git a/Validation/RecoB/plugins/BTagPerformanceAnalyzerMC.h b/Validation/RecoB/plugins/BTagPerformanceAnalyzerMC.h index 4434d5ef122a9..f3b7312989ea4 100644 --- a/Validation/RecoB/plugins/BTagPerformanceAnalyzerMC.h +++ b/Validation/RecoB/plugins/BTagPerformanceAnalyzerMC.h @@ -28,9 +28,9 @@ class BTagPerformanceAnalyzerMC : public DQMEDAnalyzer { public: explicit BTagPerformanceAnalyzerMC(const edm::ParameterSet& pSet); - ~BTagPerformanceAnalyzerMC(); + ~BTagPerformanceAnalyzerMC() override; - virtual void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; + void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; private: diff --git a/Validation/RecoB/plugins/recoBSVTagInfoValidationAnalyzer.cc b/Validation/RecoB/plugins/recoBSVTagInfoValidationAnalyzer.cc index e4366474b1b92..cd664ccb8bb9b 100644 --- a/Validation/RecoB/plugins/recoBSVTagInfoValidationAnalyzer.cc +++ b/Validation/RecoB/plugins/recoBSVTagInfoValidationAnalyzer.cc @@ -43,8 +43,8 @@ class recoBSVTagInfoValidationAnalyzer : public edm::EDAnalyzer private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // Member data VertexClassifierByProxy classifier_; diff --git a/Validation/RecoB/src/HistoCompare.cc b/Validation/RecoB/src/HistoCompare.cc index 67b000bb89992..04a94d1d97897 100644 --- a/Validation/RecoB/src/HistoCompare.cc +++ b/Validation/RecoB/src/HistoCompare.cc @@ -42,7 +42,7 @@ HistoCompare::~HistoCompare() { TH1* HistoCompare::Compare(TH1 *h, const TString& hname) { - if (do_nothing_) return 0; + if (do_nothing_) return nullptr; //std::cout << "histo: " << h->GetName() << " entries: "<< h->GetEntries() << std::endl; //std::cout << "hname: " << hname << std::endl; diff --git a/Validation/RecoEgamma/plugins/ConversionPostprocessing.cc b/Validation/RecoEgamma/plugins/ConversionPostprocessing.cc index a63a25a1c5deb..7bad9b5ebaf62 100644 --- a/Validation/RecoEgamma/plugins/ConversionPostprocessing.cc +++ b/Validation/RecoEgamma/plugins/ConversionPostprocessing.cc @@ -23,7 +23,7 @@ using namespace std; ConversionPostprocessing::ConversionPostprocessing(const edm::ParameterSet& pset) { - dbe_ = 0; + dbe_ = nullptr; dbe_ = edm::Service().operator->(); dbe_->setVerbose(0); parameters_ = pset; @@ -176,7 +176,7 @@ void ConversionPostprocessing::dividePlots(MonitorElement* dividend, MonitorEle double value,err; //quick fix to avoid seg. faults due to null pointers. - if (dividend==0 || numerator==0 || denominator==0)return; + if (dividend==nullptr || numerator==nullptr || denominator==nullptr)return; for (int j=1; j<=numerator->getNbinsX(); j++){ @@ -205,7 +205,7 @@ void ConversionPostprocessing::dividePlots(MonitorElement* dividend, MonitorEle double value,err; //quick fix to avoid seg. faults due to null pointers. - if (dividend==0 || numerator==0 )return; + if (dividend==nullptr || numerator==nullptr )return; for (int j=1; j<=numerator->getNbinsX(); j++){ if (denominator!=0){ diff --git a/Validation/RecoEgamma/plugins/ConversionPostprocessing.h b/Validation/RecoEgamma/plugins/ConversionPostprocessing.h index 292567eb502cc..8ae1d3027a34c 100644 --- a/Validation/RecoEgamma/plugins/ConversionPostprocessing.h +++ b/Validation/RecoEgamma/plugins/ConversionPostprocessing.h @@ -56,14 +56,14 @@ class ConversionPostprocessing : public edm::EDAnalyzer // explicit ConversionPostprocessing( const edm::ParameterSet& pset ) ; - virtual ~ConversionPostprocessing(); + ~ConversionPostprocessing() override; - virtual void analyze(const edm::Event&, const edm::EventSetup& ) ; - virtual void beginJob() ; - virtual void endJob() ; - virtual void endLuminosityBlock( const edm::LuminosityBlock& , const edm::EventSetup& ) ; - virtual void endRun(const edm::Run& , const edm::EventSetup& ) ; + void analyze(const edm::Event&, const edm::EventSetup& ) override ; + void beginJob() override ; + void endJob() override ; + void endLuminosityBlock( const edm::LuminosityBlock& , const edm::EventSetup& ) override ; + void endRun(const edm::Run& , const edm::EventSetup& ) override ; private: // diff --git a/Validation/RecoEgamma/plugins/EgammaObjects.cc b/Validation/RecoEgamma/plugins/EgammaObjects.cc index d53a70a61ad66..af439786b6928 100644 --- a/Validation/RecoEgamma/plugins/EgammaObjects.cc +++ b/Validation/RecoEgamma/plugins/EgammaObjects.cc @@ -31,59 +31,59 @@ EgammaObjects::EgammaObjects( const edm::ParameterSet& ps ) rootFile_ = TFile::Open(ps.getParameter("outputFile").c_str(),"RECREATE"); - hist_EtaEfficiency_ = 0 ; - hist_EtaNumRecoOverNumTrue_ = 0 ; - hist_deltaEtaVsEt_ = 0 ; - hist_deltaEtaVsE_ = 0 ; - hist_deltaEtaVsEta_ = 0 ; - hist_deltaEtaVsPhi_ = 0 ; - hist_resolutionEtaVsEt_ = 0 ; - hist_resolutionEtaVsE_ = 0 ; - hist_resolutionEtaVsEta_ = 0 ; - hist_resolutionEtaVsPhi_ = 0 ; - - hist_Phi_ = 0 ; - hist_PhiOverTruth_ = 0 ; - hist_PhiEfficiency_ = 0 ; - hist_PhiNumRecoOverNumTrue_ = 0 ; - hist_deltaPhiVsEt_ = 0 ; - hist_deltaPhiVsE_ = 0 ; - hist_deltaPhiVsEta_ = 0 ; - hist_deltaPhiVsPhi_ = 0 ; - hist_resolutionPhiVsEt_ = 0 ; - hist_resolutionPhiVsE_ = 0 ; - hist_resolutionPhiVsEta_ = 0 ; - hist_resolutionPhiVsPhi_ = 0 ; - - hist_All_recoMass_ = 0 ; - hist_BarrelOnly_recoMass_ = 0 ; - hist_EndcapOnly_recoMass_ = 0 ; - hist_Mixed_recoMass_ = 0 ; - - hist_recoMass_withBackgroud_NoEtCut_ = 0 ; - hist_recoMass_withBackgroud_5EtCut_ = 0 ; - hist_recoMass_withBackgroud_10EtCut_ = 0 ; - hist_recoMass_withBackgroud_20EtCut_ = 0 ; - - _TEMP_scatterPlot_EtOverTruthVsEt_ = 0 ; - _TEMP_scatterPlot_EtOverTruthVsE_ = 0 ; - _TEMP_scatterPlot_EtOverTruthVsEta_ = 0 ; - _TEMP_scatterPlot_EtOverTruthVsPhi_ = 0 ; - - _TEMP_scatterPlot_EOverTruthVsEt_ = 0 ; - _TEMP_scatterPlot_EOverTruthVsE_ = 0 ; - _TEMP_scatterPlot_EOverTruthVsEta_ = 0 ; - _TEMP_scatterPlot_EOverTruthVsPhi_ = 0 ; - - _TEMP_scatterPlot_deltaEtaVsEt_ = 0 ; - _TEMP_scatterPlot_deltaEtaVsE_ = 0 ; - _TEMP_scatterPlot_deltaEtaVsEta_ = 0 ; - _TEMP_scatterPlot_deltaEtaVsPhi_ = 0 ; - - _TEMP_scatterPlot_deltaPhiVsEt_ = 0 ; - _TEMP_scatterPlot_deltaPhiVsE_ = 0 ; - _TEMP_scatterPlot_deltaPhiVsEta_ = 0 ; - _TEMP_scatterPlot_deltaPhiVsPhi_ = 0 ; + hist_EtaEfficiency_ = nullptr ; + hist_EtaNumRecoOverNumTrue_ = nullptr ; + hist_deltaEtaVsEt_ = nullptr ; + hist_deltaEtaVsE_ = nullptr ; + hist_deltaEtaVsEta_ = nullptr ; + hist_deltaEtaVsPhi_ = nullptr ; + hist_resolutionEtaVsEt_ = nullptr ; + hist_resolutionEtaVsE_ = nullptr ; + hist_resolutionEtaVsEta_ = nullptr ; + hist_resolutionEtaVsPhi_ = nullptr ; + + hist_Phi_ = nullptr ; + hist_PhiOverTruth_ = nullptr ; + hist_PhiEfficiency_ = nullptr ; + hist_PhiNumRecoOverNumTrue_ = nullptr ; + hist_deltaPhiVsEt_ = nullptr ; + hist_deltaPhiVsE_ = nullptr ; + hist_deltaPhiVsEta_ = nullptr ; + hist_deltaPhiVsPhi_ = nullptr ; + hist_resolutionPhiVsEt_ = nullptr ; + hist_resolutionPhiVsE_ = nullptr ; + hist_resolutionPhiVsEta_ = nullptr ; + hist_resolutionPhiVsPhi_ = nullptr ; + + hist_All_recoMass_ = nullptr ; + hist_BarrelOnly_recoMass_ = nullptr ; + hist_EndcapOnly_recoMass_ = nullptr ; + hist_Mixed_recoMass_ = nullptr ; + + hist_recoMass_withBackgroud_NoEtCut_ = nullptr ; + hist_recoMass_withBackgroud_5EtCut_ = nullptr ; + hist_recoMass_withBackgroud_10EtCut_ = nullptr ; + hist_recoMass_withBackgroud_20EtCut_ = nullptr ; + + _TEMP_scatterPlot_EtOverTruthVsEt_ = nullptr ; + _TEMP_scatterPlot_EtOverTruthVsE_ = nullptr ; + _TEMP_scatterPlot_EtOverTruthVsEta_ = nullptr ; + _TEMP_scatterPlot_EtOverTruthVsPhi_ = nullptr ; + + _TEMP_scatterPlot_EOverTruthVsEt_ = nullptr ; + _TEMP_scatterPlot_EOverTruthVsE_ = nullptr ; + _TEMP_scatterPlot_EOverTruthVsEta_ = nullptr ; + _TEMP_scatterPlot_EOverTruthVsPhi_ = nullptr ; + + _TEMP_scatterPlot_deltaEtaVsEt_ = nullptr ; + _TEMP_scatterPlot_deltaEtaVsE_ = nullptr ; + _TEMP_scatterPlot_deltaEtaVsEta_ = nullptr ; + _TEMP_scatterPlot_deltaEtaVsPhi_ = nullptr ; + + _TEMP_scatterPlot_deltaPhiVsEt_ = nullptr ; + _TEMP_scatterPlot_deltaPhiVsE_ = nullptr ; + _TEMP_scatterPlot_deltaPhiVsEta_ = nullptr ; + _TEMP_scatterPlot_deltaPhiVsPhi_ = nullptr ; } @@ -715,25 +715,25 @@ void EgammaObjects::endJob() void EgammaObjects::getDeltaResHistosViaSlicing() { - _TEMP_scatterPlot_EtOverTruthVsEt_->FitSlicesY(0,1,hist_bins_Et_,10,"QRG3"); - _TEMP_scatterPlot_EtOverTruthVsE_->FitSlicesY(0,1,hist_bins_E_,10,"QRG3"); - _TEMP_scatterPlot_EtOverTruthVsEta_->FitSlicesY(0,1,hist_bins_Eta_,10,"QRG2"); - _TEMP_scatterPlot_EtOverTruthVsPhi_->FitSlicesY(0,1,hist_bins_Phi_,10,"QRG2"); - - _TEMP_scatterPlot_EOverTruthVsEt_->FitSlicesY(0,1,hist_bins_Et_,10,"QRG3"); - _TEMP_scatterPlot_EOverTruthVsE_->FitSlicesY(0,1,hist_bins_E_,10,"QRG3"); - _TEMP_scatterPlot_EOverTruthVsEta_->FitSlicesY(0,1,hist_bins_Eta_,10,"QRG2"); - _TEMP_scatterPlot_EOverTruthVsPhi_->FitSlicesY(0,1,hist_bins_Phi_,10,"QRG2"); - - _TEMP_scatterPlot_deltaEtaVsEt_->FitSlicesY(0,1,hist_bins_Et_,10,"QRG3"); - _TEMP_scatterPlot_deltaEtaVsE_->FitSlicesY(0,1,hist_bins_E_,10,"QRG3"); - _TEMP_scatterPlot_deltaEtaVsEta_->FitSlicesY(0,1,hist_bins_Eta_,10,"QRG2"); - _TEMP_scatterPlot_deltaEtaVsPhi_->FitSlicesY(0,1,hist_bins_Phi_,10,"QRG2"); - - _TEMP_scatterPlot_deltaPhiVsEt_->FitSlicesY(0,1,hist_bins_Et_,10,"QRG3"); - _TEMP_scatterPlot_deltaPhiVsE_->FitSlicesY(0,1,hist_bins_E_,10,"QRG3"); - _TEMP_scatterPlot_deltaPhiVsEta_->FitSlicesY(0,1,hist_bins_Eta_,10,"QRG2"); - _TEMP_scatterPlot_deltaPhiVsPhi_->FitSlicesY(0,1,hist_bins_Phi_,10,"QRG2"); + _TEMP_scatterPlot_EtOverTruthVsEt_->FitSlicesY(nullptr,1,hist_bins_Et_,10,"QRG3"); + _TEMP_scatterPlot_EtOverTruthVsE_->FitSlicesY(nullptr,1,hist_bins_E_,10,"QRG3"); + _TEMP_scatterPlot_EtOverTruthVsEta_->FitSlicesY(nullptr,1,hist_bins_Eta_,10,"QRG2"); + _TEMP_scatterPlot_EtOverTruthVsPhi_->FitSlicesY(nullptr,1,hist_bins_Phi_,10,"QRG2"); + + _TEMP_scatterPlot_EOverTruthVsEt_->FitSlicesY(nullptr,1,hist_bins_Et_,10,"QRG3"); + _TEMP_scatterPlot_EOverTruthVsE_->FitSlicesY(nullptr,1,hist_bins_E_,10,"QRG3"); + _TEMP_scatterPlot_EOverTruthVsEta_->FitSlicesY(nullptr,1,hist_bins_Eta_,10,"QRG2"); + _TEMP_scatterPlot_EOverTruthVsPhi_->FitSlicesY(nullptr,1,hist_bins_Phi_,10,"QRG2"); + + _TEMP_scatterPlot_deltaEtaVsEt_->FitSlicesY(nullptr,1,hist_bins_Et_,10,"QRG3"); + _TEMP_scatterPlot_deltaEtaVsE_->FitSlicesY(nullptr,1,hist_bins_E_,10,"QRG3"); + _TEMP_scatterPlot_deltaEtaVsEta_->FitSlicesY(nullptr,1,hist_bins_Eta_,10,"QRG2"); + _TEMP_scatterPlot_deltaEtaVsPhi_->FitSlicesY(nullptr,1,hist_bins_Phi_,10,"QRG2"); + + _TEMP_scatterPlot_deltaPhiVsEt_->FitSlicesY(nullptr,1,hist_bins_Et_,10,"QRG3"); + _TEMP_scatterPlot_deltaPhiVsE_->FitSlicesY(nullptr,1,hist_bins_E_,10,"QRG3"); + _TEMP_scatterPlot_deltaPhiVsEta_->FitSlicesY(nullptr,1,hist_bins_Eta_,10,"QRG2"); + _TEMP_scatterPlot_deltaPhiVsPhi_->FitSlicesY(nullptr,1,hist_bins_Phi_,10,"QRG2"); hist_EtOverTruthVsEt_ = (TH1D*)gDirectory->Get("_TEMP_scatterPlot_EtOverTruthVsEt__1"); hist_EtOverTruthVsE_ = (TH1D*)gDirectory->Get("_TEMP_scatterPlot_EtOverTruthVsE__1"); diff --git a/Validation/RecoEgamma/plugins/EgammaObjects.h b/Validation/RecoEgamma/plugins/EgammaObjects.h index a6df51d4980a2..aa100868c5f1d 100644 --- a/Validation/RecoEgamma/plugins/EgammaObjects.h +++ b/Validation/RecoEgamma/plugins/EgammaObjects.h @@ -23,11 +23,11 @@ namespace edm {class HepMCProduct;} class EgammaObjects : public edm::EDAnalyzer { public: explicit EgammaObjects( const edm::ParameterSet& ); - ~EgammaObjects(); + ~EgammaObjects() override; - virtual void analyze( const edm::Event&, const edm::EventSetup& ); - virtual void beginJob(); - virtual void endJob(); + void analyze( const edm::Event&, const edm::EventSetup& ) override; + void beginJob() override; + void endJob() override; private: TFile* rootFile_; diff --git a/Validation/RecoEgamma/plugins/ElectronConversionRejectionValidator.h b/Validation/RecoEgamma/plugins/ElectronConversionRejectionValidator.h index 97df731cbdd4b..d690544d21eed 100644 --- a/Validation/RecoEgamma/plugins/ElectronConversionRejectionValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronConversionRejectionValidator.h @@ -46,10 +46,10 @@ class ElectronConversionRejectionValidator : public DQMEDAnalyzer public: explicit ElectronConversionRejectionValidator( const edm::ParameterSet& ) ; - virtual ~ElectronConversionRejectionValidator(); + ~ElectronConversionRejectionValidator() override; - virtual void analyze( const edm::Event&, const edm::EventSetup& ) override ; + void analyze( const edm::Event&, const edm::EventSetup& ) override ; void bookHistograms(DQMStore::IBooker& bei, edm::Run const&, edm::EventSetup const&) override; diff --git a/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.h b/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.h index 0053c35d93294..ddae346102b16 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.h @@ -8,9 +8,9 @@ class ElectronMcFakePostValidator : public ElectronDqmHarvesterBase { public: explicit ElectronMcFakePostValidator( const edm::ParameterSet & conf ) ; - virtual ~ElectronMcFakePostValidator() ; + ~ElectronMcFakePostValidator() override ; // virtual void book() ; - virtual void finalize( DQMStore::IBooker & iBooker, DQMStore::IGetter & iGetter ) ; // + void finalize( DQMStore::IBooker & iBooker, DQMStore::IGetter & iGetter ) override ; // private: std::string inputFile_ ; diff --git a/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h b/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h index 465e126a339e0..be9ce34a56285 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h @@ -36,9 +36,9 @@ class ElectronMcFakeValidator : public ElectronDqmAnalyzerBase public: explicit ElectronMcFakeValidator( const edm::ParameterSet & conf ) ; - virtual ~ElectronMcFakeValidator() ; - virtual void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) ; - virtual void analyze( const edm::Event & e, const edm::EventSetup & c ) ; + ~ElectronMcFakeValidator() override ; + void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override ; + void analyze( const edm::Event & e, const edm::EventSetup & c ) override ; private: diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h index 096085cf7587f..340fb71cee5c1 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h @@ -8,8 +8,8 @@ class ElectronMcSignalPostValidatorMiniAOD : public ElectronDqmHarvesterBase { public: explicit ElectronMcSignalPostValidatorMiniAOD( const edm::ParameterSet & conf ) ; - virtual ~ElectronMcSignalPostValidatorMiniAOD() ; - virtual void finalize( DQMStore::IBooker & iBooker, DQMStore::IGetter & iGetter ) ; + ~ElectronMcSignalPostValidatorMiniAOD() override ; + void finalize( DQMStore::IBooker & iBooker, DQMStore::IGetter & iGetter ) override ; private: std::string inputFile_ ; diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc index e1e960d0a47f5..dbd997fd3caa7 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc @@ -81,52 +81,52 @@ ElectronMcSignalValidatorMiniAOD::ElectronMcSignalValidatorMiniAOD(const edm::Pa // so to please coverity... - h1_recEleNum = 0 ; + h1_recEleNum = nullptr ; - h1_ele_vertexPt = 0 ; - h1_ele_vertexEta = 0 ; - h1_ele_vertexPt_nocut = 0 ; + h1_ele_vertexPt = nullptr ; + h1_ele_vertexEta = nullptr ; + h1_ele_vertexPt_nocut = nullptr ; - h1_scl_SigIEtaIEta_mAOD = 0 ; - h1_scl_SigIEtaIEta_mAOD_barrel = 0 ; - h1_scl_SigIEtaIEta_mAOD_endcaps = 0 ; + h1_scl_SigIEtaIEta_mAOD = nullptr ; + h1_scl_SigIEtaIEta_mAOD_barrel = nullptr ; + h1_scl_SigIEtaIEta_mAOD_endcaps = nullptr ; - h2_ele_foundHitsVsEta = 0 ; - h2_ele_foundHitsVsEta_mAOD = 0 ; + h2_ele_foundHitsVsEta = nullptr ; + h2_ele_foundHitsVsEta_mAOD = nullptr ; - h2_ele_PoPtrueVsEta = 0 ; - h2_ele_sigmaIetaIetaVsPt = 0 ; + h2_ele_PoPtrueVsEta = nullptr ; + h2_ele_sigmaIetaIetaVsPt = nullptr ; - h1_ele_HoE_mAOD = 0 ; - h1_ele_HoE_mAOD_barrel = 0 ; - h1_ele_HoE_mAOD_endcaps = 0 ; - h1_ele_mee_all = 0 ; - h1_ele_mee_os = 0 ; + h1_ele_HoE_mAOD = nullptr ; + h1_ele_HoE_mAOD_barrel = nullptr ; + h1_ele_HoE_mAOD_endcaps = nullptr ; + h1_ele_mee_all = nullptr ; + h1_ele_mee_os = nullptr ; - h1_ele_fbrem_mAOD = 0 ; - h1_ele_fbrem_mAOD_barrel = 0 ; - h1_ele_fbrem_mAOD_endcaps = 0 ; + h1_ele_fbrem_mAOD = nullptr ; + h1_ele_fbrem_mAOD_barrel = nullptr ; + h1_ele_fbrem_mAOD_endcaps = nullptr ; - h1_ele_dEtaSc_propVtx_mAOD = 0 ; - h1_ele_dEtaSc_propVtx_mAOD_barrel = 0 ; - h1_ele_dEtaSc_propVtx_mAOD_endcaps = 0 ; - h1_ele_dPhiCl_propOut_mAOD = 0 ; - h1_ele_dPhiCl_propOut_mAOD_barrel = 0 ; - h1_ele_dPhiCl_propOut_mAOD_endcaps = 0 ; - - h1_ele_chargedHadronRelativeIso_mAOD = 0 ; - h1_ele_chargedHadronRelativeIso_mAOD_barrel = 0 ; - h1_ele_chargedHadronRelativeIso_mAOD_endcaps = 0 ; - h1_ele_neutralHadronRelativeIso_mAOD = 0 ; - h1_ele_neutralHadronRelativeIso_mAOD_barrel = 0 ; - h1_ele_neutralHadronRelativeIso_mAOD_endcaps = 0 ; - h1_ele_photonRelativeIso_mAOD = 0 ; - h1_ele_photonRelativeIso_mAOD_barrel = 0 ; - h1_ele_photonRelativeIso_mAOD_endcaps = 0 ; - - h1_ele_chargedHadronRelativeIso_mAOD_recomp = 0 ; - h1_ele_neutralHadronRelativeIso_mAOD_recomp = 0 ; - h1_ele_photonRelativeIso_mAOD_recomp = 0 ; + h1_ele_dEtaSc_propVtx_mAOD = nullptr ; + h1_ele_dEtaSc_propVtx_mAOD_barrel = nullptr ; + h1_ele_dEtaSc_propVtx_mAOD_endcaps = nullptr ; + h1_ele_dPhiCl_propOut_mAOD = nullptr ; + h1_ele_dPhiCl_propOut_mAOD_barrel = nullptr ; + h1_ele_dPhiCl_propOut_mAOD_endcaps = nullptr ; + + h1_ele_chargedHadronRelativeIso_mAOD = nullptr ; + h1_ele_chargedHadronRelativeIso_mAOD_barrel = nullptr ; + h1_ele_chargedHadronRelativeIso_mAOD_endcaps = nullptr ; + h1_ele_neutralHadronRelativeIso_mAOD = nullptr ; + h1_ele_neutralHadronRelativeIso_mAOD_barrel = nullptr ; + h1_ele_neutralHadronRelativeIso_mAOD_endcaps = nullptr ; + h1_ele_photonRelativeIso_mAOD = nullptr ; + h1_ele_photonRelativeIso_mAOD_barrel = nullptr ; + h1_ele_photonRelativeIso_mAOD_endcaps = nullptr ; + + h1_ele_chargedHadronRelativeIso_mAOD_recomp = nullptr ; + h1_ele_neutralHadronRelativeIso_mAOD_recomp = nullptr ; + h1_ele_photonRelativeIso_mAOD_recomp = nullptr ; } @@ -293,7 +293,7 @@ void ElectronMcSignalValidatorMiniAOD::analyze(const edm::Event& iEvent, const e } // DEBUG LINES - KEEP IT ! */ - if ( mother == 0 ) { + if ( mother == nullptr ) { matchingMotherID = true ; } else if ( mother->pdgId() == matchingMotherIDs_[ii] ) { diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h index b0f107a56de78..f2ba6dbdced01 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h @@ -19,12 +19,12 @@ class ElectronMcSignalValidatorMiniAOD : public ElectronDqmAnalyzerBase { public: explicit ElectronMcSignalValidatorMiniAOD(const edm::ParameterSet&); - virtual ~ElectronMcSignalValidatorMiniAOD(); + ~ElectronMcSignalValidatorMiniAOD() override; bool isAncestor(const reco::Candidate * ancestor, const reco::Candidate * particle); private: - virtual void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- edm::EDGetTokenT > mcTruthCollection_; // prunedGenParticles diff --git a/Validation/RecoEgamma/plugins/ElectronMcSignalPostValidator.h b/Validation/RecoEgamma/plugins/ElectronMcSignalPostValidator.h index c2b07bce31d7c..e2c3dd973acd7 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcSignalPostValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcSignalPostValidator.h @@ -8,9 +8,9 @@ class ElectronMcSignalPostValidator : public ElectronDqmHarvesterBase { public: explicit ElectronMcSignalPostValidator( const edm::ParameterSet & conf ) ; - virtual ~ElectronMcSignalPostValidator() ; + ~ElectronMcSignalPostValidator() override ; // virtual void book() ; - virtual void finalize( DQMStore::IBooker & iBooker, DQMStore::IGetter & iGetter ) ; + void finalize( DQMStore::IBooker & iBooker, DQMStore::IGetter & iGetter ) override ; private: std::string inputFile_ ; diff --git a/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.h b/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.h index 51fc29b6db125..23461c10aef98 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.h @@ -25,9 +25,9 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase public: explicit ElectronMcSignalValidator( const edm::ParameterSet & conf ) ; - virtual ~ElectronMcSignalValidator() ; - virtual void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) ; - virtual void analyze( const edm::Event& e, const edm::EventSetup & c ) ; + ~ElectronMcSignalValidator() override ; + void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override ; + void analyze( const edm::Event& e, const edm::EventSetup & c ) override ; private: diff --git a/Validation/RecoEgamma/plugins/PhotonPostprocessing.cc b/Validation/RecoEgamma/plugins/PhotonPostprocessing.cc index 9ad74338ba494..a6fc5cab8027e 100755 --- a/Validation/RecoEgamma/plugins/PhotonPostprocessing.cc +++ b/Validation/RecoEgamma/plugins/PhotonPostprocessing.cc @@ -25,7 +25,7 @@ using namespace std; PhotonPostprocessing::PhotonPostprocessing(const edm::ParameterSet& pset) { - dbe_ = 0; + dbe_ = nullptr; dbe_ = edm::Service().operator->(); dbe_->setVerbose(0); parameters_ = pset; diff --git a/Validation/RecoEgamma/plugins/PhotonPostprocessing.h b/Validation/RecoEgamma/plugins/PhotonPostprocessing.h index c24f10684ad9c..3a3b244d41070 100755 --- a/Validation/RecoEgamma/plugins/PhotonPostprocessing.h +++ b/Validation/RecoEgamma/plugins/PhotonPostprocessing.h @@ -56,14 +56,14 @@ class PhotonPostprocessing : public edm::EDAnalyzer // explicit PhotonPostprocessing( const edm::ParameterSet& pset ) ; - virtual ~PhotonPostprocessing(); + ~PhotonPostprocessing() override; - virtual void analyze(const edm::Event&, const edm::EventSetup& ) ; - virtual void beginJob() ; - virtual void endJob() ; - virtual void endLuminosityBlock( const edm::LuminosityBlock& , const edm::EventSetup& ) ; - virtual void endRun(const edm::Run& , const edm::EventSetup& ) ; + void analyze(const edm::Event&, const edm::EventSetup& ) override ; + void beginJob() override ; + void endJob() override ; + void endLuminosityBlock( const edm::LuminosityBlock& , const edm::EventSetup& ) override ; + void endRun(const edm::Run& , const edm::EventSetup& ) override ; private: diff --git a/Validation/RecoEgamma/plugins/PhotonValidator.cc b/Validation/RecoEgamma/plugins/PhotonValidator.cc index 0f553c6bfe948..43072a214d452 100755 --- a/Validation/RecoEgamma/plugins/PhotonValidator.cc +++ b/Validation/RecoEgamma/plugins/PhotonValidator.cc @@ -1959,7 +1959,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup h_gamgamMass_[1][2] -> Fill(sqrt( gamgamMass2 )); } // both photons converted - if ( myPhotons[0]->conversions().size() > 0 && myPhotons[1]->conversions().size() >0 ) { + if ( !myPhotons[0]->conversions().empty() && !myPhotons[1]->conversions().empty() ) { if ( myPhotons[0]->conversions()[0]->nTracks() ==2 && myPhotons[1]->conversions()[0]->nTracks() ==2 ) { float chi2Prob1 = ChiSquaredProbability( myPhotons[0]->conversions()[0]->conversionVertex().chi2(), myPhotons[0]->conversions()[0]->conversionVertex().ndof() ); float chi2Prob2 = ChiSquaredProbability( myPhotons[1]->conversions()[0]->conversionVertex().chi2(), myPhotons[1]->conversions()[0]->conversionVertex().ndof() ); @@ -1975,7 +1975,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup } } } - } else if ( myPhotons[0]->conversions().size() > 0 && myPhotons[1]->conversions().size() ==0 && myPhotons[1]->r9() > 0.93 ) { // one photon converted + } else if ( !myPhotons[0]->conversions().empty() && myPhotons[1]->conversions().empty() && myPhotons[1]->r9() > 0.93 ) { // one photon converted if ( myPhotons[0]->conversions()[0]->nTracks() ==2 ) { float chi2Prob1 = ChiSquaredProbability( myPhotons[0]->conversions()[0]->conversionVertex().chi2(), myPhotons[0]->conversions()[0]->conversionVertex().ndof() ); if ( chi2Prob1 > 0.0005 ) { @@ -1988,7 +1988,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup } } } - } else if ( myPhotons[1]->conversions().size() > 0 && myPhotons[0]->conversions().size() ==0 && myPhotons[0]->r9() > 0.93 ) { // one photon converted + } else if ( !myPhotons[1]->conversions().empty() && myPhotons[0]->conversions().empty() && myPhotons[0]->r9() > 0.93 ) { // one photon converted if ( myPhotons[1]->conversions()[0]->nTracks() ==2 ) { float chi2Prob1 = ChiSquaredProbability( myPhotons[1]->conversions()[0]->conversionVertex().chi2(), myPhotons[1]->conversions()[0]->conversionVertex().ndof() ); if ( chi2Prob1 > 0.0005 ) { @@ -2027,7 +2027,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup // both photons converted - if ( myPhotons[0]->conversions().size() > 0 && myPhotons[1]->conversions().size() >0 ) { + if ( !myPhotons[0]->conversions().empty() && !myPhotons[1]->conversions().empty() ) { if ( myPhotons[0]->conversions()[0]->nTracks() ==2 && myPhotons[1]->conversions()[0]->nTracks() ==2 ) { float chi2Prob1 = ChiSquaredProbability( myPhotons[0]->conversions()[0]->conversionVertex().chi2(), myPhotons[0]->conversions()[0]->conversionVertex().ndof() ); float chi2Prob2 = ChiSquaredProbability( myPhotons[1]->conversions()[0]->conversionVertex().chi2(), myPhotons[1]->conversions()[0]->conversionVertex().ndof() ); @@ -2043,7 +2043,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup } } } - } else if ( myPhotons[0]->conversions().size() > 0 && myPhotons[1]->conversions().size() ==0 && myPhotons[1]->r9() > 0.93 ) { // one photon converted + } else if ( !myPhotons[0]->conversions().empty() && myPhotons[1]->conversions().empty() && myPhotons[1]->r9() > 0.93 ) { // one photon converted if ( myPhotons[0]->conversions()[0]->nTracks() ==2 ) { float chi2Prob1 = ChiSquaredProbability( myPhotons[0]->conversions()[0]->conversionVertex().chi2(), myPhotons[0]->conversions()[0]->conversionVertex().ndof() ); if ( chi2Prob1 > 0.0005 ) { @@ -2056,7 +2056,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup } } } - } else if ( myPhotons[1]->conversions().size() > 0 && myPhotons[0]->conversions().size() ==0 && myPhotons[0]->r9() > 0.93 ) { // one photon converted + } else if ( !myPhotons[1]->conversions().empty() && myPhotons[0]->conversions().empty() && myPhotons[0]->r9() > 0.93 ) { // one photon converted if ( myPhotons[1]->conversions()[0]->nTracks() ==2 ) { float chi2Prob1 = ChiSquaredProbability( myPhotons[1]->conversions()[0]->conversionVertex().chi2(), myPhotons[1]->conversions()[0]->conversionVertex().ndof() ); if ( chi2Prob1 > 0.0005 ) { @@ -2096,7 +2096,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup // both photons converted - if ( myPhotons[0]->conversions().size() > 0 && myPhotons[1]->conversions().size() >0 ) { + if ( !myPhotons[0]->conversions().empty() && !myPhotons[1]->conversions().empty() ) { if ( myPhotons[0]->conversions()[0]->nTracks() ==2 && myPhotons[1]->conversions()[0]->nTracks() ==2 ) { float chi2Prob1 = ChiSquaredProbability( myPhotons[0]->conversions()[0]->conversionVertex().chi2(), myPhotons[0]->conversions()[0]->conversionVertex().ndof() ); float chi2Prob2 = ChiSquaredProbability( myPhotons[1]->conversions()[0]->conversionVertex().chi2(), myPhotons[1]->conversions()[0]->conversionVertex().ndof() ); @@ -2112,7 +2112,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup } } } - } else if ( myPhotons[0]->conversions().size() > 0 && myPhotons[1]->conversions().size() ==0 && myPhotons[1]->r9() > 0.93 ) { // one photon converted + } else if ( !myPhotons[0]->conversions().empty() && myPhotons[1]->conversions().empty() && myPhotons[1]->r9() > 0.93 ) { // one photon converted if ( myPhotons[0]->conversions()[0]->nTracks() ==2 ) { float chi2Prob1 = ChiSquaredProbability( myPhotons[0]->conversions()[0]->conversionVertex().chi2(), myPhotons[0]->conversions()[0]->conversionVertex().ndof() ); if ( chi2Prob1 > 0.0005 ) { @@ -2125,7 +2125,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup } } } - } else if ( myPhotons[1]->conversions().size() > 0 && myPhotons[0]->conversions().size() ==0 && myPhotons[0]->r9() > 0.93 ) { // one photon converted + } else if ( !myPhotons[1]->conversions().empty() && myPhotons[0]->conversions().empty() && myPhotons[0]->r9() > 0.93 ) { // one photon converted if ( myPhotons[1]->conversions()[0]->nTracks() ==2 ) { float chi2Prob1 = ChiSquaredProbability( myPhotons[1]->conversions()[0]->conversionVertex().chi2(), myPhotons[1]->conversions()[0]->conversionVertex().ndof() ); if ( chi2Prob1 > 0.0005 ) { @@ -2163,7 +2163,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup for ( HepMC::GenEvent::particle_const_iterator mcIter=myGenEvent->particles_begin(); mcIter != myGenEvent->particles_end(); mcIter++ ) { if ( (*mcIter)->pdg_id() != 22 ) continue; bool isTheSame= false; - HepMC::GenParticle* mother = 0; + HepMC::GenParticle* mother = nullptr; if ( (*mcIter)->production_vertex() ) { if ( (*mcIter)->production_vertex()->particles_begin(HepMC::parents) != (*mcIter)->production_vertex()->particles_end(HepMC::parents)) @@ -2189,10 +2189,10 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup - if ( mother ==0 - || (mother != 0 && mother->pdg_id() == 22) - || (mother != 0 && mother->pdg_id() == 25) - || (mother != 0 && mother->pdg_id() == 35) ) + if ( mother ==nullptr + || (mother != nullptr && mother->pdg_id() == 22) + || (mother != nullptr && mother->pdg_id() == 25) + || (mother != nullptr && mother->pdg_id() == 35) ) { double dPt = fabs((*mcIter)->momentum().perp() - (*mcPho).fourMomentum().et()); float phiMother=(*mcIter)->momentum().phi(); @@ -2941,7 +2941,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup tpI = 1; } - if ( !trackV.size() ) continue; + if ( trackV.empty() ) continue; edm::RefToBase tr = trackV.front().first; myAss.insert( std::make_pair (tr.get(),theConvTP_[tpI] ) ); nAssT2++; @@ -2973,7 +2973,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup h_SimConvTwoTracks_[3]->Fill( mcConvZ_ ); h_SimConvTwoTracks_[4]->Fill( (*mcPho).fourMomentum().et()); - if (aConv->caloCluster().size() !=0) h_convEta_[1]->Fill( aConv->caloCluster()[0]->eta() ); + if (!aConv->caloCluster().empty()) h_convEta_[1]->Fill( aConv->caloCluster()[0]->eta() ); float trkProvenance=3; if ( tracks[0]->algoName() == "outInEcalSeededConv" && tracks[1]->algoName() == "outInEcalSeededConv" ) trkProvenance=0; @@ -2998,7 +2998,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup if ( phoIsInEndcap ) h_r9_[2][2]->Fill( r9 ); } - if (aConv->caloCluster().size() !=0) h_convEta_[2]->Fill( aConv->caloCluster()[0]->eta() ); + if (!aConv->caloCluster().empty()) h_convEta_[2]->Fill( aConv->caloCluster()[0]->eta() ); nRecConvAss_++; @@ -3028,7 +3028,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup } if ( chi2Prob > 0.0005 ) { - if (aConv->caloCluster().size() !=0) { + if (!aConv->caloCluster().empty()) { h_convEta_[0]->Fill( aConv->caloCluster()[0]->eta() ); h_convPhi_[0]->Fill( aConv->caloCluster()[0]->phi() ); h_convERes_[0][0]->Fill( aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() ); @@ -3040,12 +3040,12 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup if ( phoIsInEndcap ) h_EtR9Less093_[1][2] ->Fill ( photonEt ); } if ( phoIsInBarrel ) { - if (aConv->caloCluster().size() !=0) h_convERes_[0][1]->Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() ); + if (!aConv->caloCluster().empty()) h_convERes_[0][1]->Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() ); if ( ! isRunCentrally_ ) h_r9VsNofTracks_[0][1]->Fill( r9, aConv->nTracks() ) ; h_mvaOut_[1]-> Fill(like); } if ( phoIsInEndcap ) { - if (aConv->caloCluster().size() !=0) h_convERes_[0][2]->Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() ); + if (!aConv->caloCluster().empty()) h_convERes_[0][2]->Fill(aConv->caloCluster()[0]->energy() / (*mcPho).fourMomentum().e() ); if ( ! isRunCentrally_ ) h_r9VsNofTracks_[0][2]->Fill( r9, aConv->nTracks() ) ; h_mvaOut_[2]-> Fill(like); } @@ -3208,7 +3208,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup float dPhiTracksAtEcal=-99; float dEtaTracksAtEcal=-99; - if (aConv->bcMatchingWithTracks().size() > 0 && aConv->bcMatchingWithTracks()[0].isNonnull() && aConv->bcMatchingWithTracks()[1].isNonnull() ) { + if (!aConv->bcMatchingWithTracks().empty() && aConv->bcMatchingWithTracks()[0].isNonnull() && aConv->bcMatchingWithTracks()[1].isNonnull() ) { nRecConvAssWithEcal_++; float recoPhi1 = aConv->ecalImpactPosition()[0].phi(); float recoPhi2 = aConv->ecalImpactPosition()[1].phi(); @@ -3293,14 +3293,14 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup // if ( fName_ != "pfPhotonValidator" && fName_ != "oldpfPhotonValidator" ) - if ( aConv->bcMatchingWithTracks().size() > 0 && aConv->bcMatchingWithTracks()[i].isNonnull() ) hBCEnergyOverTrackPout_[0]->Fill ( aConv->bcMatchingWithTracks()[i]->energy()/sqrt(aConv->tracks()[i]->outerMomentum().Mag2()) ); + if ( !aConv->bcMatchingWithTracks().empty() && aConv->bcMatchingWithTracks()[i].isNonnull() ) hBCEnergyOverTrackPout_[0]->Fill ( aConv->bcMatchingWithTracks()[i]->energy()/sqrt(aConv->tracks()[i]->outerMomentum().Mag2()) ); if ( phoIsInBarrel ) { h_TkD0_[1]->Fill ( tracks[i]->d0()* tracks[i]->charge() ); h_TkPtPull_[1] ->Fill(ptres/pterror); if ( ! isRunCentrally_ ) h2_PtRecVsPtSim_[1]->Fill ( simPt, refPt); //if ( fName_ != "pfPhotonValidator" && fName_ != "oldpfPhotonValidator") - if ( aConv->bcMatchingWithTracks().size() > 0 && aConv->bcMatchingWithTracks()[i].isNonnull() ) hBCEnergyOverTrackPout_[1]->Fill ( aConv->bcMatchingWithTracks()[i]->energy()/sqrt(aConv->tracks()[i]->outerMomentum().Mag2()) ); + if ( !aConv->bcMatchingWithTracks().empty() && aConv->bcMatchingWithTracks()[i].isNonnull() ) hBCEnergyOverTrackPout_[1]->Fill ( aConv->bcMatchingWithTracks()[i]->energy()/sqrt(aConv->tracks()[i]->outerMomentum().Mag2()) ); } if ( phoIsInEndcap ) { @@ -3308,7 +3308,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup h_TkPtPull_[2] ->Fill(ptres/pterror); if ( ! isRunCentrally_ ) h2_PtRecVsPtSim_[2]->Fill ( simPt, refPt); // if ( fName_ != "pfPhotonValidator" && fName_ != "oldpfPhotonValidator") - if ( aConv->bcMatchingWithTracks().size() > 0 && aConv->bcMatchingWithTracks()[i].isNonnull() ) hBCEnergyOverTrackPout_[2]->Fill ( aConv->bcMatchingWithTracks()[i]->energy()/sqrt(aConv->tracks()[i]->outerMomentum().Mag2()) ); + if ( !aConv->bcMatchingWithTracks().empty() && aConv->bcMatchingWithTracks()[i].isNonnull() ) hBCEnergyOverTrackPout_[2]->Fill ( aConv->bcMatchingWithTracks()[i]->energy()/sqrt(aConv->tracks()[i]->outerMomentum().Mag2()) ); } } @@ -3368,7 +3368,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup tpI = 1; } - if ( !trackV.size() ) continue; + if ( trackV.empty() ) continue; edm::RefToBase tr = trackV.front().first; myAss.insert( std::make_pair (tr.get(),theConvTP_[tpI] ) ); nAssT++; @@ -3487,7 +3487,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup std::vector > tp1 = p1[tk1]; std::vector > tp2 = p2[tk2]; - if (tp1.size()&&tp2.size()) { + if (!tp1.empty()&&!tp2.empty()) { TrackingParticleRef tpr1 = tp1.front().first; TrackingParticleRef tpr2 = tp2.front().first; @@ -3532,7 +3532,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup if ( scalar < 0 ) convR= -sqrt(aConv->conversionVertex().position().perp2()); h_convVtxRvsZ_[0] ->Fill ( fabs (aConv->conversionVertex().position().z() ), sqrt(aConv->conversionVertex().position().perp2()) ) ; - if (aConv->caloCluster().size() !=0) { + if (!aConv->caloCluster().empty()) { if ( ! isRunCentrally_ ) h2_etaVsRreco_[0]->Fill (aConv->caloCluster()[0]->eta(),sqrt(aConv->conversionVertex().position().perp2()) ); if ( fabs(aConv->caloCluster()[0]->eta() ) <= 1.) { @@ -3818,7 +3818,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup double like = aConv->MVAout(); if ( like < likelihoodCut_ ) continue; if ( tracks.size() < 2 ) continue; - if (aConv->caloCluster().size() !=0) { + if (!aConv->caloCluster().empty()) { h_convEtaBkg_->Fill( aConv->caloCluster()[0]->eta() ); h_convPhiBkg_->Fill( aConv->caloCluster()[0]->phi() ); } @@ -3853,7 +3853,7 @@ void PhotonValidator::analyze( const edm::Event& e, const edm::EventSetup& esup if ( ! isRunCentrally_ ) { h_convVtxRvsZBkg_[0] ->Fill ( fabs (aConv->conversionVertex().position().z() ), sqrt(aConv->conversionVertex().position().perp2()) ) ; - if ( aConv->caloCluster().size() !=0 && fabs(aConv->caloCluster()[0]->eta() ) <= 1. ) { + if ( !aConv->caloCluster().empty() && fabs(aConv->caloCluster()[0]->eta() ) <= 1. ) { h_convVtxYvsXBkg_ ->Fill ( aConv->conversionVertex().position().y() , aConv->conversionVertex().position().x() ) ; h_convVtxRvsZBkg_[1] ->Fill ( fabs (aConv->conversionVertex().position().z() ), convR ) ; } diff --git a/Validation/RecoEgamma/plugins/PhotonValidator.h b/Validation/RecoEgamma/plugins/PhotonValidator.h index f592571cf1b4b..5d2669f000171 100755 --- a/Validation/RecoEgamma/plugins/PhotonValidator.h +++ b/Validation/RecoEgamma/plugins/PhotonValidator.h @@ -65,13 +65,13 @@ class PhotonValidator : public DQMEDAnalyzer // explicit PhotonValidator( const edm::ParameterSet& ) ; - virtual ~PhotonValidator(); + ~PhotonValidator() override; - virtual void analyze( const edm::Event&, const edm::EventSetup& ) override; + void analyze( const edm::Event&, const edm::EventSetup& ) override; // virtual void beginJob(); - virtual void dqmBeginRun( edm::Run const & r, edm::EventSetup const & theEventSetup) override; - virtual void endRun (edm::Run const& r, edm::EventSetup const & es) override; + void dqmBeginRun( edm::Run const & r, edm::EventSetup const & theEventSetup) override; + void endRun (edm::Run const& r, edm::EventSetup const & es) override; void bookHistograms( DQMStore::IBooker&, edm::Run const &, edm::EventSetup const &) override; private: diff --git a/Validation/RecoEgamma/plugins/PhotonValidatorMiniAOD.h b/Validation/RecoEgamma/plugins/PhotonValidatorMiniAOD.h index c8e8462db0b8c..9bd5cf2eb6dd0 100755 --- a/Validation/RecoEgamma/plugins/PhotonValidatorMiniAOD.h +++ b/Validation/RecoEgamma/plugins/PhotonValidatorMiniAOD.h @@ -53,13 +53,13 @@ class PhotonValidatorMiniAOD : public DQMEDAnalyzer // explicit PhotonValidatorMiniAOD( const edm::ParameterSet& ) ; - virtual ~PhotonValidatorMiniAOD(); + ~PhotonValidatorMiniAOD() override; - virtual void analyze( const edm::Event&, const edm::EventSetup& ) override; + void analyze( const edm::Event&, const edm::EventSetup& ) override; // virtual void beginJob(); - virtual void dqmBeginRun( edm::Run const & r, edm::EventSetup const & theEventSetup) override; - virtual void endRun (edm::Run const& r, edm::EventSetup const & es) override; + void dqmBeginRun( edm::Run const & r, edm::EventSetup const & theEventSetup) override; + void endRun (edm::Run const& r, edm::EventSetup const & es) override; void bookHistograms( DQMStore::IBooker&, edm::Run const &, edm::EventSetup const &) override; private: diff --git a/Validation/RecoEgamma/plugins/TkConvValidator.h b/Validation/RecoEgamma/plugins/TkConvValidator.h index f4e2349341838..89cf2f6f22de9 100644 --- a/Validation/RecoEgamma/plugins/TkConvValidator.h +++ b/Validation/RecoEgamma/plugins/TkConvValidator.h @@ -55,13 +55,13 @@ class TkConvValidator : public DQMEDAnalyzer // explicit TkConvValidator( const edm::ParameterSet& ) ; - virtual ~TkConvValidator(); + ~TkConvValidator() override; - virtual void analyze( const edm::Event&, const edm::EventSetup& ) override ; + void analyze( const edm::Event&, const edm::EventSetup& ) override ; void bookHistograms( DQMStore::IBooker&, edm::Run const &, edm::EventSetup const &) override; - virtual void dqmBeginRun( edm::Run const & r, edm::EventSetup const & theEventSetup) override ; - virtual void endRun (edm::Run const& r, edm::EventSetup const & es) override; + void dqmBeginRun( edm::Run const & r, edm::EventSetup const & theEventSetup) override ; + void endRun (edm::Run const& r, edm::EventSetup const & es) override; virtual void endJob() ; private: diff --git a/Validation/RecoHI/plugins/HiBasicGenTest.h b/Validation/RecoHI/plugins/HiBasicGenTest.h index 41ca838038ba1..5ab823551eb0e 100644 --- a/Validation/RecoHI/plugins/HiBasicGenTest.h +++ b/Validation/RecoHI/plugins/HiBasicGenTest.h @@ -13,7 +13,7 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "DQMServices/Core/interface/MonitorElement.h" #include -#include +#include namespace edm { class HepMCProduct; } @@ -22,8 +22,8 @@ class HiBasicGenTest : public DQMEDAnalyzer { public: explicit HiBasicGenTest(const edm::ParameterSet&); - virtual ~HiBasicGenTest(); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + ~HiBasicGenTest() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/RecoJets/plugins/JetTester.cc b/Validation/RecoJets/plugins/JetTester.cc index b41c06fee12c5..072b05ac51bff 100644 --- a/Validation/RecoJets/plugins/JetTester.cc +++ b/Validation/RecoJets/plugins/JetTester.cc @@ -39,111 +39,111 @@ JetTester::JetTester(const edm::ParameterSet& iConfig) : } // Events variables - mNvtx = 0; + mNvtx = nullptr; // Jet parameters - mEta = 0; - mPhi = 0; - mEnergy = 0; - mP = 0; - mPt = 0; - mMass = 0; - mConstituents = 0; - mJetArea = 0; + mEta = nullptr; + mPhi = nullptr; + mEnergy = nullptr; + mP = nullptr; + mPt = nullptr; + mMass = nullptr; + mConstituents = nullptr; + mJetArea = nullptr; // mRho = 0; // Corrected jets - mCorrJetPt = 0; - mCorrJetEta = 0; - mCorrJetPhi = 0; - mCorrJetEta_Pt40 = 0; - mCorrJetPhi_Pt40 = 0; + mCorrJetPt = nullptr; + mCorrJetEta = nullptr; + mCorrJetPhi = nullptr; + mCorrJetEta_Pt40 = nullptr; + mCorrJetPhi_Pt40 = nullptr; // Corrected jets profiles - mPtCorrOverReco_Pt_B = 0; - mPtCorrOverReco_Pt_E = 0; - mPtCorrOverReco_Pt_F = 0; - mPtCorrOverReco_Eta_20_40 = 0; - mPtCorrOverReco_Eta_40_200 = 0; - mPtCorrOverReco_Eta_200_600 = 0; - mPtCorrOverReco_Eta_600_1500 = 0; - mPtCorrOverReco_Eta_1500_3500 = 0; - mPtCorrOverReco_Eta_3500_5000 = 0; - mPtCorrOverReco_Eta_5000_6500 = 0; - mPtCorrOverReco_Eta_3500 = 0; - mPtCorrOverGen_GenPt_B = 0; - mPtCorrOverGen_GenPt_E = 0; - mPtCorrOverGen_GenPt_F = 0; - mPtCorrOverGen_GenEta_20_40 = 0; - mPtCorrOverGen_GenEta_40_200 = 0; - mPtCorrOverGen_GenEta_200_600 = 0; - mPtCorrOverGen_GenEta_600_1500 = 0; - mPtCorrOverGen_GenEta_1500_3500 = 0; - mPtCorrOverGen_GenEta_3500_5000 = 0; - mPtCorrOverGen_GenEta_5000_6500 = 0; - mPtCorrOverGen_GenEta_3500 = 0; + mPtCorrOverReco_Pt_B = nullptr; + mPtCorrOverReco_Pt_E = nullptr; + mPtCorrOverReco_Pt_F = nullptr; + mPtCorrOverReco_Eta_20_40 = nullptr; + mPtCorrOverReco_Eta_40_200 = nullptr; + mPtCorrOverReco_Eta_200_600 = nullptr; + mPtCorrOverReco_Eta_600_1500 = nullptr; + mPtCorrOverReco_Eta_1500_3500 = nullptr; + mPtCorrOverReco_Eta_3500_5000 = nullptr; + mPtCorrOverReco_Eta_5000_6500 = nullptr; + mPtCorrOverReco_Eta_3500 = nullptr; + mPtCorrOverGen_GenPt_B = nullptr; + mPtCorrOverGen_GenPt_E = nullptr; + mPtCorrOverGen_GenPt_F = nullptr; + mPtCorrOverGen_GenEta_20_40 = nullptr; + mPtCorrOverGen_GenEta_40_200 = nullptr; + mPtCorrOverGen_GenEta_200_600 = nullptr; + mPtCorrOverGen_GenEta_600_1500 = nullptr; + mPtCorrOverGen_GenEta_1500_3500 = nullptr; + mPtCorrOverGen_GenEta_3500_5000 = nullptr; + mPtCorrOverGen_GenEta_5000_6500 = nullptr; + mPtCorrOverGen_GenEta_3500 = nullptr; // Generation - mGenEta = 0; - mGenPhi = 0; - mGenPt = 0; - mGenEtaFirst = 0; - mGenPhiFirst = 0; - mPtHat = 0; - mDeltaEta = 0; - mDeltaPhi = 0; - mDeltaPt = 0; - - mPtRecoOverGen_B_20_40 = 0; - mPtRecoOverGen_E_20_40 = 0; - mPtRecoOverGen_F_20_40 = 0; - mPtRecoOverGen_B_40_200 = 0; - mPtRecoOverGen_E_40_200 = 0; - mPtRecoOverGen_F_40_200 = 0; - mPtRecoOverGen_B_200_600 = 0; - mPtRecoOverGen_E_200_600 = 0; - mPtRecoOverGen_F_200_600 = 0; - mPtRecoOverGen_B_600_1500 = 0; - mPtRecoOverGen_E_600_1500 = 0; - mPtRecoOverGen_F_600_1500 = 0; - mPtRecoOverGen_B_1500_3500 = 0; - mPtRecoOverGen_E_1500_3500 = 0; - mPtRecoOverGen_F_1500_3500 = 0; - mPtRecoOverGen_B_3500_5000 = 0; - mPtRecoOverGen_E_3500_5000 = 0; - mPtRecoOverGen_B_5000_6500 = 0; - mPtRecoOverGen_E_5000_6500 = 0; - mPtRecoOverGen_B_3500 = 0; - mPtRecoOverGen_E_3500 = 0; - mPtRecoOverGen_F_3500 = 0; + mGenEta = nullptr; + mGenPhi = nullptr; + mGenPt = nullptr; + mGenEtaFirst = nullptr; + mGenPhiFirst = nullptr; + mPtHat = nullptr; + mDeltaEta = nullptr; + mDeltaPhi = nullptr; + mDeltaPt = nullptr; + + mPtRecoOverGen_B_20_40 = nullptr; + mPtRecoOverGen_E_20_40 = nullptr; + mPtRecoOverGen_F_20_40 = nullptr; + mPtRecoOverGen_B_40_200 = nullptr; + mPtRecoOverGen_E_40_200 = nullptr; + mPtRecoOverGen_F_40_200 = nullptr; + mPtRecoOverGen_B_200_600 = nullptr; + mPtRecoOverGen_E_200_600 = nullptr; + mPtRecoOverGen_F_200_600 = nullptr; + mPtRecoOverGen_B_600_1500 = nullptr; + mPtRecoOverGen_E_600_1500 = nullptr; + mPtRecoOverGen_F_600_1500 = nullptr; + mPtRecoOverGen_B_1500_3500 = nullptr; + mPtRecoOverGen_E_1500_3500 = nullptr; + mPtRecoOverGen_F_1500_3500 = nullptr; + mPtRecoOverGen_B_3500_5000 = nullptr; + mPtRecoOverGen_E_3500_5000 = nullptr; + mPtRecoOverGen_B_5000_6500 = nullptr; + mPtRecoOverGen_E_5000_6500 = nullptr; + mPtRecoOverGen_B_3500 = nullptr; + mPtRecoOverGen_E_3500 = nullptr; + mPtRecoOverGen_F_3500 = nullptr; // Generation profiles - mPtRecoOverGen_GenPt_B = 0; - mPtRecoOverGen_GenPt_E = 0; - mPtRecoOverGen_GenPt_F = 0; - mPtRecoOverGen_GenPhi_B = 0; - mPtRecoOverGen_GenPhi_E = 0; - mPtRecoOverGen_GenPhi_F = 0; - mPtRecoOverGen_GenEta_20_40 = 0; - mPtRecoOverGen_GenEta_40_200 = 0; - mPtRecoOverGen_GenEta_200_600 = 0; - mPtRecoOverGen_GenEta_600_1500 = 0; - mPtRecoOverGen_GenEta_1500_3500 = 0; - mPtRecoOverGen_GenEta_3500_5000 = 0; - mPtRecoOverGen_GenEta_5000_6500 = 0; - mPtRecoOverGen_GenEta_3500 = 0; + mPtRecoOverGen_GenPt_B = nullptr; + mPtRecoOverGen_GenPt_E = nullptr; + mPtRecoOverGen_GenPt_F = nullptr; + mPtRecoOverGen_GenPhi_B = nullptr; + mPtRecoOverGen_GenPhi_E = nullptr; + mPtRecoOverGen_GenPhi_F = nullptr; + mPtRecoOverGen_GenEta_20_40 = nullptr; + mPtRecoOverGen_GenEta_40_200 = nullptr; + mPtRecoOverGen_GenEta_200_600 = nullptr; + mPtRecoOverGen_GenEta_600_1500 = nullptr; + mPtRecoOverGen_GenEta_1500_3500 = nullptr; + mPtRecoOverGen_GenEta_3500_5000 = nullptr; + mPtRecoOverGen_GenEta_5000_6500 = nullptr; + mPtRecoOverGen_GenEta_3500 = nullptr; // Some jet algebra - mEtaFirst = 0; - mPhiFirst = 0; - mPtFirst = 0; - mMjj = 0; - mNJetsEta_B_20_40 = 0; - mNJetsEta_E_20_40 = 0; - mNJetsEta_B_40 = 0; - mNJetsEta_E_40 = 0; - mNJets1 = 0; - mNJets2 = 0; + mEtaFirst = nullptr; + mPhiFirst = nullptr; + mPtFirst = nullptr; + mMjj = nullptr; + mNJetsEta_B_20_40 = nullptr; + mNJetsEta_E_20_40 = nullptr; + mNJetsEta_B_40 = nullptr; + mNJetsEta_E_40 = nullptr; + mNJets1 = nullptr; + mNJets2 = nullptr; // // PFJet specific // mHadEnergyInHF = 0; @@ -155,33 +155,33 @@ JetTester::JetTester(const edm::ParameterSet& iConfig) : // ---- Calo Jet specific information ---- /// returns the maximum energy deposited in ECAL towers - maxEInEmTowers = 0; + maxEInEmTowers = nullptr; /// returns the maximum energy deposited in HCAL towers - maxEInHadTowers = 0; + maxEInHadTowers = nullptr; /// returns the jet hadronic energy fraction - energyFractionHadronic = 0; + energyFractionHadronic = nullptr; /// returns the jet electromagnetic energy fraction - emEnergyFraction = 0; + emEnergyFraction = nullptr; /// returns the jet hadronic energy in HB - hadEnergyInHB = 0; + hadEnergyInHB = nullptr; /// returns the jet hadronic energy in HO - hadEnergyInHO = 0; + hadEnergyInHO = nullptr; /// returns the jet hadronic energy in HE - hadEnergyInHE = 0; + hadEnergyInHE = nullptr; /// returns the jet hadronic energy in HF - hadEnergyInHF = 0; + hadEnergyInHF = nullptr; /// returns the jet electromagnetic energy in EB - emEnergyInEB = 0; + emEnergyInEB = nullptr; /// returns the jet electromagnetic energy in EE - emEnergyInEE = 0; + emEnergyInEE = nullptr; /// returns the jet electromagnetic energy extracted from HF - emEnergyInHF = 0; + emEnergyInHF = nullptr; /// returns area of contributing towers - towersArea = 0; + towersArea = nullptr; /// returns the number of constituents carrying a 90% of the total Jet energy*/ - n90 = 0; + n90 = nullptr; /// returns the number of constituents carrying a 60% of the total Jet energy*/ - n60 = 0; + n60 = nullptr; // ---- JPT Jet specific information ---- /// chargedMultiplicity @@ -189,74 +189,74 @@ JetTester::JetTester(const edm::ParameterSet& iConfig) : // ---- JPT or PF Jet specific information ---- /// muonMultiplicity - muonMultiplicity = 0; + muonMultiplicity = nullptr; /// chargedMultiplicity - chargedMultiplicity = 0; + chargedMultiplicity = nullptr; /// chargedEmEnergy - chargedEmEnergy = 0; + chargedEmEnergy = nullptr; /// neutralEmEnergy - neutralEmEnergy = 0; + neutralEmEnergy = nullptr; /// chargedHadronEnergy - chargedHadronEnergy = 0; + chargedHadronEnergy = nullptr; /// neutralHadronEnergy - neutralHadronEnergy = 0; + neutralHadronEnergy = nullptr; /// chargedHadronEnergyFraction (relative to uncorrected jet energy) - chargedHadronEnergyFraction = 0; + chargedHadronEnergyFraction = nullptr; /// neutralHadronEnergyFraction (relative to uncorrected jet energy) - neutralHadronEnergyFraction = 0; + neutralHadronEnergyFraction = nullptr; /// chargedEmEnergyFraction (relative to uncorrected jet energy) - chargedEmEnergyFraction = 0; + chargedEmEnergyFraction = nullptr; /// neutralEmEnergyFraction (relative to uncorrected jet energy) - neutralEmEnergyFraction = 0; + neutralEmEnergyFraction = nullptr; // ---- PF Jet specific information ---- /// photonEnergy - photonEnergy = 0; + photonEnergy = nullptr; /// photonEnergyFraction (relative to corrected jet energy) - photonEnergyFraction = 0; + photonEnergyFraction = nullptr; /// electronEnergy - electronEnergy = 0; + electronEnergy = nullptr; /// electronEnergyFraction (relative to corrected jet energy) - electronEnergyFraction = 0; + electronEnergyFraction = nullptr; /// muonEnergy - muonEnergy = 0; + muonEnergy = nullptr; /// muonEnergyFraction (relative to corrected jet energy) - muonEnergyFraction = 0; + muonEnergyFraction = nullptr; /// HFHadronEnergy - HFHadronEnergy = 0; + HFHadronEnergy = nullptr; /// HFHadronEnergyFraction (relative to corrected jet energy) - HFHadronEnergyFraction = 0; + HFHadronEnergyFraction = nullptr; /// HFEMEnergy - HFEMEnergy = 0; + HFEMEnergy = nullptr; /// HFEMEnergyFraction (relative to corrected jet energy) - HFEMEnergyFraction = 0; + HFEMEnergyFraction = nullptr; /// chargedHadronMultiplicity - chargedHadronMultiplicity = 0; + chargedHadronMultiplicity = nullptr; /// neutralHadronMultiplicity - neutralHadronMultiplicity = 0; + neutralHadronMultiplicity = nullptr; /// photonMultiplicity - photonMultiplicity = 0; + photonMultiplicity = nullptr; /// electronMultiplicity - electronMultiplicity = 0; + electronMultiplicity = nullptr; /// HFHadronMultiplicity - HFHadronMultiplicity = 0; + HFHadronMultiplicity = nullptr; /// HFEMMultiplicity - HFEMMultiplicity = 0; + HFEMMultiplicity = nullptr; /// chargedMuEnergy - chargedMuEnergy = 0; + chargedMuEnergy = nullptr; /// chargedMuEnergyFraction - chargedMuEnergyFraction = 0; + chargedMuEnergyFraction = nullptr; /// neutralMultiplicity - neutralMultiplicity = 0; + neutralMultiplicity = nullptr; /// HOEnergy - HOEnergy = 0; + HOEnergy = nullptr; /// HOEnergyFraction (relative to corrected jet energy) - HOEnergyFraction = 0; + HOEnergyFraction = nullptr; - hadronFlavor=0; - partonFlavor=0; - genPartonPDGID=0; + hadronFlavor=nullptr; + partonFlavor=nullptr; + genPartonPDGID=nullptr; } @@ -831,7 +831,7 @@ void JetTester::analyze(const edm::Event& mEvent, const edm::EventSetup& mSetup) if (isMiniAODJet){ if(hadronFlavor)hadronFlavor->Fill((*patJets)[ijet].hadronFlavour()); if(partonFlavor)partonFlavor->Fill((*patJets)[ijet].partonFlavour()); - if(genPartonPDGID && (*patJets)[ijet].genParton()!=NULL)genPartonPDGID->Fill((*patJets)[ijet].genParton()->pdgId()); + if(genPartonPDGID && (*patJets)[ijet].genParton()!=nullptr)genPartonPDGID->Fill((*patJets)[ijet].genParton()->pdgId()); } @@ -910,7 +910,7 @@ void JetTester::analyze(const edm::Event& mEvent, const edm::EventSetup& mSetup) for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) { if (fabs(gjet->eta()) > 6.) continue; // Out of the detector if (gjet->pt() < mMatchGenPtThreshold) continue; - if (recoJets.size() <= 0) continue; + if (recoJets.empty()) continue; // pt response //------------------------------------------------------------ int iMatch = -1; diff --git a/Validation/RecoJets/plugins/JetTester.h b/Validation/RecoJets/plugins/JetTester.h index eda1def4895fc..ffb5cae4427ae 100644 --- a/Validation/RecoJets/plugins/JetTester.h +++ b/Validation/RecoJets/plugins/JetTester.h @@ -44,10 +44,10 @@ class JetTester : public DQMEDAnalyzer { public: JetTester (const edm::ParameterSet&); - ~JetTester(); + ~JetTester() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; private: diff --git a/Validation/RecoJets/plugins/JetTesterPostProcessor.h b/Validation/RecoJets/plugins/JetTesterPostProcessor.h index df6c372b015be..db8725a32bbb3 100644 --- a/Validation/RecoJets/plugins/JetTesterPostProcessor.h +++ b/Validation/RecoJets/plugins/JetTesterPostProcessor.h @@ -5,8 +5,8 @@ // system include files #include -#include -#include +#include +#include #include // user include files @@ -28,10 +28,10 @@ class JetTesterPostProcessor : public DQMEDHarvester { public: explicit JetTesterPostProcessor(const edm::ParameterSet&); - ~JetTesterPostProcessor(); + ~JetTesterPostProcessor() override; private: - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) ; + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override ; edm::InputTag inputJetLabelRECO_; edm::InputTag inputJetLabelMiniAOD_; diff --git a/Validation/RecoJets/plugins/JetTester_HeavyIons.cc b/Validation/RecoJets/plugins/JetTester_HeavyIons.cc index 17be95bfc73b7..7cb70df37d536 100644 --- a/Validation/RecoJets/plugins/JetTester_HeavyIons.cc +++ b/Validation/RecoJets/plugins/JetTester_HeavyIons.cc @@ -56,255 +56,255 @@ JetTester_HeavyIons::JetTester_HeavyIons(const edm::ParameterSet& iConfig) : // need to initialize the PF cand histograms : which are also event variables if(isPFJet){ - mNPFpart = 0; - mPFPt = 0; - mPFEta = 0; - mPFPhi = 0; - mPFArea = 0; - mSumPFPt = 0; - mSumSquaredPFPt = 0; - mSumPFPt_HF = 0; - - mSumPFPt_n5p191_n2p650 = 0; - mSumPFPt_n2p650_n2p043 = 0; - mSumPFPt_n2p043_n1p740 = 0; - mSumPFPt_n1p740_n1p479 = 0; - mSumPFPt_n1p479_n1p131 = 0; - mSumPFPt_n1p131_n0p783 = 0; - mSumPFPt_n0p783_n0p522 = 0; - mSumPFPt_n0p522_0p522 = 0; - mSumPFPt_0p522_0p783 = 0; - mSumPFPt_0p783_1p131 = 0; - mSumPFPt_1p131_1p479 = 0; - mSumPFPt_1p479_1p740 = 0; - mSumPFPt_1p740_2p043 = 0; - mSumPFPt_2p043_2p650 = 0; - mSumPFPt_2p650_5p191 = 0; - - mPFCandpT_vs_eta_Unknown = 0; // pf id 0 - mPFCandpT_vs_eta_ChargedHadron = 0; // pf id - 1 - mPFCandpT_vs_eta_electron = 0; // pf id - 2 - mPFCandpT_vs_eta_muon = 0; // pf id - 3 - mPFCandpT_vs_eta_photon = 0; // pf id - 4 - mPFCandpT_vs_eta_NeutralHadron = 0; // pf id - 5 - mPFCandpT_vs_eta_HadE_inHF = 0; // pf id - 6 - mPFCandpT_vs_eta_EME_inHF = 0; // pf id - 7 + mNPFpart = nullptr; + mPFPt = nullptr; + mPFEta = nullptr; + mPFPhi = nullptr; + mPFArea = nullptr; + mSumPFPt = nullptr; + mSumSquaredPFPt = nullptr; + mSumPFPt_HF = nullptr; + + mSumPFPt_n5p191_n2p650 = nullptr; + mSumPFPt_n2p650_n2p043 = nullptr; + mSumPFPt_n2p043_n1p740 = nullptr; + mSumPFPt_n1p740_n1p479 = nullptr; + mSumPFPt_n1p479_n1p131 = nullptr; + mSumPFPt_n1p131_n0p783 = nullptr; + mSumPFPt_n0p783_n0p522 = nullptr; + mSumPFPt_n0p522_0p522 = nullptr; + mSumPFPt_0p522_0p783 = nullptr; + mSumPFPt_0p783_1p131 = nullptr; + mSumPFPt_1p131_1p479 = nullptr; + mSumPFPt_1p479_1p740 = nullptr; + mSumPFPt_1p740_2p043 = nullptr; + mSumPFPt_2p043_2p650 = nullptr; + mSumPFPt_2p650_5p191 = nullptr; + + mPFCandpT_vs_eta_Unknown = nullptr; // pf id 0 + mPFCandpT_vs_eta_ChargedHadron = nullptr; // pf id - 1 + mPFCandpT_vs_eta_electron = nullptr; // pf id - 2 + mPFCandpT_vs_eta_muon = nullptr; // pf id - 3 + mPFCandpT_vs_eta_photon = nullptr; // pf id - 4 + mPFCandpT_vs_eta_NeutralHadron = nullptr; // pf id - 5 + mPFCandpT_vs_eta_HadE_inHF = nullptr; // pf id - 6 + mPFCandpT_vs_eta_EME_inHF = nullptr; // pf id - 7 - mPFCandpT_Barrel_Unknown = 0; // pf id 0 - mPFCandpT_Barrel_ChargedHadron = 0; // pf id - 1 - mPFCandpT_Barrel_electron = 0; // pf id - 2 - mPFCandpT_Barrel_muon = 0; // pf id - 3 - mPFCandpT_Barrel_photon = 0; // pf id - 4 - mPFCandpT_Barrel_NeutralHadron = 0; // pf id - 5 - mPFCandpT_Barrel_HadE_inHF = 0; // pf id - 6 - mPFCandpT_Barrel_EME_inHF = 0; // pf id - 7 - - mPFCandpT_Endcap_Unknown = 0; // pf id 0 - mPFCandpT_Endcap_ChargedHadron = 0; // pf id - 1 - mPFCandpT_Endcap_electron = 0; // pf id - 2 - mPFCandpT_Endcap_muon = 0; // pf id - 3 - mPFCandpT_Endcap_photon = 0; // pf id - 4 - mPFCandpT_Endcap_NeutralHadron = 0; // pf id - 5 - mPFCandpT_Endcap_HadE_inHF = 0; // pf id - 6 - mPFCandpT_Endcap_EME_inHF = 0; // pf id - 7 - - mPFCandpT_Forward_Unknown = 0; // pf id 0 - mPFCandpT_Forward_ChargedHadron = 0; // pf id - 1 - mPFCandpT_Forward_electron = 0; // pf id - 2 - mPFCandpT_Forward_muon = 0; // pf id - 3 - mPFCandpT_Forward_photon = 0; // pf id - 4 - mPFCandpT_Forward_NeutralHadron = 0; // pf id - 5 - mPFCandpT_Forward_HadE_inHF = 0; // pf id - 6 - mPFCandpT_Forward_EME_inHF = 0; // pf id - 7 + mPFCandpT_Barrel_Unknown = nullptr; // pf id 0 + mPFCandpT_Barrel_ChargedHadron = nullptr; // pf id - 1 + mPFCandpT_Barrel_electron = nullptr; // pf id - 2 + mPFCandpT_Barrel_muon = nullptr; // pf id - 3 + mPFCandpT_Barrel_photon = nullptr; // pf id - 4 + mPFCandpT_Barrel_NeutralHadron = nullptr; // pf id - 5 + mPFCandpT_Barrel_HadE_inHF = nullptr; // pf id - 6 + mPFCandpT_Barrel_EME_inHF = nullptr; // pf id - 7 + + mPFCandpT_Endcap_Unknown = nullptr; // pf id 0 + mPFCandpT_Endcap_ChargedHadron = nullptr; // pf id - 1 + mPFCandpT_Endcap_electron = nullptr; // pf id - 2 + mPFCandpT_Endcap_muon = nullptr; // pf id - 3 + mPFCandpT_Endcap_photon = nullptr; // pf id - 4 + mPFCandpT_Endcap_NeutralHadron = nullptr; // pf id - 5 + mPFCandpT_Endcap_HadE_inHF = nullptr; // pf id - 6 + mPFCandpT_Endcap_EME_inHF = nullptr; // pf id - 7 + + mPFCandpT_Forward_Unknown = nullptr; // pf id 0 + mPFCandpT_Forward_ChargedHadron = nullptr; // pf id - 1 + mPFCandpT_Forward_electron = nullptr; // pf id - 2 + mPFCandpT_Forward_muon = nullptr; // pf id - 3 + mPFCandpT_Forward_photon = nullptr; // pf id - 4 + mPFCandpT_Forward_NeutralHadron = nullptr; // pf id - 5 + mPFCandpT_Forward_HadE_inHF = nullptr; // pf id - 6 + mPFCandpT_Forward_EME_inHF = nullptr; // pf id - 7 } if(isCaloJet){ - mNCalopart = 0; - mCaloPt = 0; - mCaloEta = 0; - mCaloPhi = 0; - mCaloArea = 0; + mNCalopart = nullptr; + mCaloPt = nullptr; + mCaloEta = nullptr; + mCaloPhi = nullptr; + mCaloArea = nullptr; - mSumCaloPt = 0; - mSumSquaredCaloPt = 0; - mSumCaloPt_HF = 0; - - mSumCaloPt_n5p191_n2p650 = 0; - mSumCaloPt_n2p650_n2p043 = 0; - mSumCaloPt_n2p043_n1p740 = 0; - mSumCaloPt_n1p740_n1p479 = 0; - mSumCaloPt_n1p479_n1p131 = 0; - mSumCaloPt_n1p131_n0p783 = 0; - mSumCaloPt_n0p783_n0p522 = 0; - mSumCaloPt_n0p522_0p522 = 0; - mSumCaloPt_0p522_0p783 = 0; - mSumCaloPt_0p783_1p131 = 0; - mSumCaloPt_1p131_1p479 = 0; - mSumCaloPt_1p479_1p740 = 0; - mSumCaloPt_1p740_2p043 = 0; - mSumCaloPt_2p043_2p650 = 0; - mSumCaloPt_2p650_5p191 = 0; + mSumCaloPt = nullptr; + mSumSquaredCaloPt = nullptr; + mSumCaloPt_HF = nullptr; + + mSumCaloPt_n5p191_n2p650 = nullptr; + mSumCaloPt_n2p650_n2p043 = nullptr; + mSumCaloPt_n2p043_n1p740 = nullptr; + mSumCaloPt_n1p740_n1p479 = nullptr; + mSumCaloPt_n1p479_n1p131 = nullptr; + mSumCaloPt_n1p131_n0p783 = nullptr; + mSumCaloPt_n0p783_n0p522 = nullptr; + mSumCaloPt_n0p522_0p522 = nullptr; + mSumCaloPt_0p522_0p783 = nullptr; + mSumCaloPt_0p783_1p131 = nullptr; + mSumCaloPt_1p131_1p479 = nullptr; + mSumCaloPt_1p479_1p740 = nullptr; + mSumCaloPt_1p740_2p043 = nullptr; + mSumCaloPt_2p043_2p650 = nullptr; + mSumCaloPt_2p650_5p191 = nullptr; } - mSumpt = 0; + mSumpt = nullptr; // Events variables - mNvtx = 0; - mHF = 0; + mNvtx = nullptr; + mHF = nullptr; // Jet parameters - mEta = 0; - mPhi = 0; - mEnergy = 0; - mP = 0; - mPt = 0; - mMass = 0; - mConstituents = 0; - mJetArea = 0; - mjetpileup = 0; - mNJets_40 = 0; - mNJets = 0; - - mGenEta = 0; - mGenPhi = 0; - mGenPt = 0; - mPtHat = 0; - - mPtRecoOverGen_B_20_30_Cent_0_10 = 0; - mPtRecoOverGen_E_20_30_Cent_0_10 = 0; - mPtRecoOverGen_F_20_30_Cent_0_10 = 0; - mPtRecoOverGen_B_30_50_Cent_0_10 = 0; - mPtRecoOverGen_E_30_50_Cent_0_10 = 0; - mPtRecoOverGen_F_30_50_Cent_0_10 = 0; - mPtRecoOverGen_B_50_80_Cent_0_10 = 0; - mPtRecoOverGen_E_50_80_Cent_0_10 = 0; - mPtRecoOverGen_F_50_80_Cent_0_10 = 0; - mPtRecoOverGen_B_80_120_Cent_0_10 = 0; - mPtRecoOverGen_E_80_120_Cent_0_10 = 0; - mPtRecoOverGen_F_80_120_Cent_0_10 = 0; - mPtRecoOverGen_B_120_180_Cent_0_10 = 0; - mPtRecoOverGen_E_120_180_Cent_0_10 = 0; - mPtRecoOverGen_F_120_180_Cent_0_10 = 0; - mPtRecoOverGen_B_180_300_Cent_0_10 = 0; - mPtRecoOverGen_E_180_300_Cent_0_10 = 0; - mPtRecoOverGen_F_180_300_Cent_0_10 = 0; - mPtRecoOverGen_B_300_Inf_Cent_0_10 = 0; - mPtRecoOverGen_E_300_Inf_Cent_0_10 = 0; - mPtRecoOverGen_F_300_Inf_Cent_0_10 = 0; - - mPtRecoOverGen_B_20_30_Cent_10_30 = 0; - mPtRecoOverGen_E_20_30_Cent_10_30 = 0; - mPtRecoOverGen_F_20_30_Cent_10_30 = 0; - mPtRecoOverGen_B_30_50_Cent_10_30 = 0; - mPtRecoOverGen_E_30_50_Cent_10_30 = 0; - mPtRecoOverGen_F_30_50_Cent_10_30 = 0; - mPtRecoOverGen_B_50_80_Cent_10_30 = 0; - mPtRecoOverGen_E_50_80_Cent_10_30 = 0; - mPtRecoOverGen_F_50_80_Cent_10_30 = 0; - mPtRecoOverGen_B_80_120_Cent_10_30 = 0; - mPtRecoOverGen_E_80_120_Cent_10_30 = 0; - mPtRecoOverGen_F_80_120_Cent_10_30 = 0; - mPtRecoOverGen_B_120_180_Cent_10_30 = 0; - mPtRecoOverGen_E_120_180_Cent_10_30 = 0; - mPtRecoOverGen_F_120_180_Cent_10_30 = 0; - mPtRecoOverGen_B_180_300_Cent_10_30 = 0; - mPtRecoOverGen_E_180_300_Cent_10_30 = 0; - mPtRecoOverGen_F_180_300_Cent_10_30 = 0; - mPtRecoOverGen_B_300_Inf_Cent_10_30 = 0; - mPtRecoOverGen_E_300_Inf_Cent_10_30 = 0; - mPtRecoOverGen_F_300_Inf_Cent_10_30 = 0; - - mPtRecoOverGen_B_20_30_Cent_30_50 = 0; - mPtRecoOverGen_E_20_30_Cent_30_50 = 0; - mPtRecoOverGen_F_20_30_Cent_30_50 = 0; - mPtRecoOverGen_B_30_50_Cent_30_50 = 0; - mPtRecoOverGen_E_30_50_Cent_30_50 = 0; - mPtRecoOverGen_F_30_50_Cent_30_50 = 0; - mPtRecoOverGen_B_50_80_Cent_30_50 = 0; - mPtRecoOverGen_E_50_80_Cent_30_50 = 0; - mPtRecoOverGen_F_50_80_Cent_30_50 = 0; - mPtRecoOverGen_B_80_120_Cent_30_50 = 0; - mPtRecoOverGen_E_80_120_Cent_30_50 = 0; - mPtRecoOverGen_F_80_120_Cent_30_50 = 0; - mPtRecoOverGen_B_120_180_Cent_30_50 = 0; - mPtRecoOverGen_E_120_180_Cent_30_50 = 0; - mPtRecoOverGen_F_120_180_Cent_30_50 = 0; - mPtRecoOverGen_B_180_300_Cent_30_50 = 0; - mPtRecoOverGen_E_180_300_Cent_30_50 = 0; - mPtRecoOverGen_F_180_300_Cent_30_50 = 0; - mPtRecoOverGen_B_300_Inf_Cent_30_50 = 0; - mPtRecoOverGen_E_300_Inf_Cent_30_50 = 0; - mPtRecoOverGen_F_300_Inf_Cent_30_50 = 0; - - mPtRecoOverGen_B_20_30_Cent_50_80 = 0; - mPtRecoOverGen_E_20_30_Cent_50_80 = 0; - mPtRecoOverGen_F_20_30_Cent_50_80 = 0; - mPtRecoOverGen_B_30_50_Cent_50_80 = 0; - mPtRecoOverGen_E_30_50_Cent_50_80 = 0; - mPtRecoOverGen_F_30_50_Cent_50_80 = 0; - mPtRecoOverGen_B_50_80_Cent_50_80 = 0; - mPtRecoOverGen_E_50_80_Cent_50_80 = 0; - mPtRecoOverGen_F_50_80_Cent_50_80 = 0; - mPtRecoOverGen_B_80_120_Cent_50_80 = 0; - mPtRecoOverGen_E_80_120_Cent_50_80 = 0; - mPtRecoOverGen_F_80_120_Cent_50_80 = 0; - mPtRecoOverGen_B_120_180_Cent_50_80 = 0; - mPtRecoOverGen_E_120_180_Cent_50_80 = 0; - mPtRecoOverGen_F_120_180_Cent_50_80 = 0; - mPtRecoOverGen_B_180_300_Cent_50_80 = 0; - mPtRecoOverGen_E_180_300_Cent_50_80 = 0; - mPtRecoOverGen_F_180_300_Cent_50_80 = 0; - mPtRecoOverGen_B_300_Inf_Cent_50_80 = 0; - mPtRecoOverGen_E_300_Inf_Cent_50_80 = 0; - mPtRecoOverGen_F_300_Inf_Cent_50_80 = 0; + mEta = nullptr; + mPhi = nullptr; + mEnergy = nullptr; + mP = nullptr; + mPt = nullptr; + mMass = nullptr; + mConstituents = nullptr; + mJetArea = nullptr; + mjetpileup = nullptr; + mNJets_40 = nullptr; + mNJets = nullptr; + + mGenEta = nullptr; + mGenPhi = nullptr; + mGenPt = nullptr; + mPtHat = nullptr; + + mPtRecoOverGen_B_20_30_Cent_0_10 = nullptr; + mPtRecoOverGen_E_20_30_Cent_0_10 = nullptr; + mPtRecoOverGen_F_20_30_Cent_0_10 = nullptr; + mPtRecoOverGen_B_30_50_Cent_0_10 = nullptr; + mPtRecoOverGen_E_30_50_Cent_0_10 = nullptr; + mPtRecoOverGen_F_30_50_Cent_0_10 = nullptr; + mPtRecoOverGen_B_50_80_Cent_0_10 = nullptr; + mPtRecoOverGen_E_50_80_Cent_0_10 = nullptr; + mPtRecoOverGen_F_50_80_Cent_0_10 = nullptr; + mPtRecoOverGen_B_80_120_Cent_0_10 = nullptr; + mPtRecoOverGen_E_80_120_Cent_0_10 = nullptr; + mPtRecoOverGen_F_80_120_Cent_0_10 = nullptr; + mPtRecoOverGen_B_120_180_Cent_0_10 = nullptr; + mPtRecoOverGen_E_120_180_Cent_0_10 = nullptr; + mPtRecoOverGen_F_120_180_Cent_0_10 = nullptr; + mPtRecoOverGen_B_180_300_Cent_0_10 = nullptr; + mPtRecoOverGen_E_180_300_Cent_0_10 = nullptr; + mPtRecoOverGen_F_180_300_Cent_0_10 = nullptr; + mPtRecoOverGen_B_300_Inf_Cent_0_10 = nullptr; + mPtRecoOverGen_E_300_Inf_Cent_0_10 = nullptr; + mPtRecoOverGen_F_300_Inf_Cent_0_10 = nullptr; + + mPtRecoOverGen_B_20_30_Cent_10_30 = nullptr; + mPtRecoOverGen_E_20_30_Cent_10_30 = nullptr; + mPtRecoOverGen_F_20_30_Cent_10_30 = nullptr; + mPtRecoOverGen_B_30_50_Cent_10_30 = nullptr; + mPtRecoOverGen_E_30_50_Cent_10_30 = nullptr; + mPtRecoOverGen_F_30_50_Cent_10_30 = nullptr; + mPtRecoOverGen_B_50_80_Cent_10_30 = nullptr; + mPtRecoOverGen_E_50_80_Cent_10_30 = nullptr; + mPtRecoOverGen_F_50_80_Cent_10_30 = nullptr; + mPtRecoOverGen_B_80_120_Cent_10_30 = nullptr; + mPtRecoOverGen_E_80_120_Cent_10_30 = nullptr; + mPtRecoOverGen_F_80_120_Cent_10_30 = nullptr; + mPtRecoOverGen_B_120_180_Cent_10_30 = nullptr; + mPtRecoOverGen_E_120_180_Cent_10_30 = nullptr; + mPtRecoOverGen_F_120_180_Cent_10_30 = nullptr; + mPtRecoOverGen_B_180_300_Cent_10_30 = nullptr; + mPtRecoOverGen_E_180_300_Cent_10_30 = nullptr; + mPtRecoOverGen_F_180_300_Cent_10_30 = nullptr; + mPtRecoOverGen_B_300_Inf_Cent_10_30 = nullptr; + mPtRecoOverGen_E_300_Inf_Cent_10_30 = nullptr; + mPtRecoOverGen_F_300_Inf_Cent_10_30 = nullptr; + + mPtRecoOverGen_B_20_30_Cent_30_50 = nullptr; + mPtRecoOverGen_E_20_30_Cent_30_50 = nullptr; + mPtRecoOverGen_F_20_30_Cent_30_50 = nullptr; + mPtRecoOverGen_B_30_50_Cent_30_50 = nullptr; + mPtRecoOverGen_E_30_50_Cent_30_50 = nullptr; + mPtRecoOverGen_F_30_50_Cent_30_50 = nullptr; + mPtRecoOverGen_B_50_80_Cent_30_50 = nullptr; + mPtRecoOverGen_E_50_80_Cent_30_50 = nullptr; + mPtRecoOverGen_F_50_80_Cent_30_50 = nullptr; + mPtRecoOverGen_B_80_120_Cent_30_50 = nullptr; + mPtRecoOverGen_E_80_120_Cent_30_50 = nullptr; + mPtRecoOverGen_F_80_120_Cent_30_50 = nullptr; + mPtRecoOverGen_B_120_180_Cent_30_50 = nullptr; + mPtRecoOverGen_E_120_180_Cent_30_50 = nullptr; + mPtRecoOverGen_F_120_180_Cent_30_50 = nullptr; + mPtRecoOverGen_B_180_300_Cent_30_50 = nullptr; + mPtRecoOverGen_E_180_300_Cent_30_50 = nullptr; + mPtRecoOverGen_F_180_300_Cent_30_50 = nullptr; + mPtRecoOverGen_B_300_Inf_Cent_30_50 = nullptr; + mPtRecoOverGen_E_300_Inf_Cent_30_50 = nullptr; + mPtRecoOverGen_F_300_Inf_Cent_30_50 = nullptr; + + mPtRecoOverGen_B_20_30_Cent_50_80 = nullptr; + mPtRecoOverGen_E_20_30_Cent_50_80 = nullptr; + mPtRecoOverGen_F_20_30_Cent_50_80 = nullptr; + mPtRecoOverGen_B_30_50_Cent_50_80 = nullptr; + mPtRecoOverGen_E_30_50_Cent_50_80 = nullptr; + mPtRecoOverGen_F_30_50_Cent_50_80 = nullptr; + mPtRecoOverGen_B_50_80_Cent_50_80 = nullptr; + mPtRecoOverGen_E_50_80_Cent_50_80 = nullptr; + mPtRecoOverGen_F_50_80_Cent_50_80 = nullptr; + mPtRecoOverGen_B_80_120_Cent_50_80 = nullptr; + mPtRecoOverGen_E_80_120_Cent_50_80 = nullptr; + mPtRecoOverGen_F_80_120_Cent_50_80 = nullptr; + mPtRecoOverGen_B_120_180_Cent_50_80 = nullptr; + mPtRecoOverGen_E_120_180_Cent_50_80 = nullptr; + mPtRecoOverGen_F_120_180_Cent_50_80 = nullptr; + mPtRecoOverGen_B_180_300_Cent_50_80 = nullptr; + mPtRecoOverGen_E_180_300_Cent_50_80 = nullptr; + mPtRecoOverGen_F_180_300_Cent_50_80 = nullptr; + mPtRecoOverGen_B_300_Inf_Cent_50_80 = nullptr; + mPtRecoOverGen_E_300_Inf_Cent_50_80 = nullptr; + mPtRecoOverGen_F_300_Inf_Cent_50_80 = nullptr; - mPtRecoOverGen_GenPt_B_Cent_0_10 = 0; - mPtRecoOverGen_GenPt_E_Cent_0_10 = 0; - mPtRecoOverGen_GenPt_F_Cent_0_10 = 0; - mPtRecoOverGen_GenPt_B_Cent_10_30 = 0; - mPtRecoOverGen_GenPt_E_Cent_10_30 = 0; - mPtRecoOverGen_GenPt_F_Cent_10_30 = 0; - mPtRecoOverGen_GenPt_B_Cent_30_50 = 0; - mPtRecoOverGen_GenPt_E_Cent_30_50 = 0; - mPtRecoOverGen_GenPt_F_Cent_30_50 = 0; - mPtRecoOverGen_GenPt_B_Cent_50_80 = 0; - mPtRecoOverGen_GenPt_E_Cent_50_80 = 0; - mPtRecoOverGen_GenPt_F_Cent_50_80 = 0; - - mPtRecoOverGen_GenEta_20_30_Cent_0_10 = 0; - mPtRecoOverGen_GenEta_30_50_Cent_0_10 = 0; - mPtRecoOverGen_GenEta_50_80_Cent_0_10 = 0; - mPtRecoOverGen_GenEta_80_120_Cent_0_10 = 0; - mPtRecoOverGen_GenEta_120_180_Cent_0_10 = 0; - mPtRecoOverGen_GenEta_180_300_Cent_0_10 = 0; - mPtRecoOverGen_GenEta_300_Inf_Cent_0_10 = 0; - - mPtRecoOverGen_GenEta_20_30_Cent_10_30 = 0; - mPtRecoOverGen_GenEta_30_50_Cent_10_30 = 0; - mPtRecoOverGen_GenEta_50_80_Cent_10_30 = 0; - mPtRecoOverGen_GenEta_80_120_Cent_10_30 = 0; - mPtRecoOverGen_GenEta_120_180_Cent_10_30 = 0; - mPtRecoOverGen_GenEta_180_300_Cent_10_30 = 0; - mPtRecoOverGen_GenEta_300_Inf_Cent_10_30 = 0; - - mPtRecoOverGen_GenEta_20_30_Cent_30_50 = 0; - mPtRecoOverGen_GenEta_30_50_Cent_30_50 = 0; - mPtRecoOverGen_GenEta_50_80_Cent_30_50 = 0; - mPtRecoOverGen_GenEta_80_120_Cent_30_50 = 0; - mPtRecoOverGen_GenEta_120_180_Cent_30_50 = 0; - mPtRecoOverGen_GenEta_180_300_Cent_30_50 = 0; - mPtRecoOverGen_GenEta_300_Inf_Cent_30_50 = 0; + mPtRecoOverGen_GenPt_B_Cent_0_10 = nullptr; + mPtRecoOverGen_GenPt_E_Cent_0_10 = nullptr; + mPtRecoOverGen_GenPt_F_Cent_0_10 = nullptr; + mPtRecoOverGen_GenPt_B_Cent_10_30 = nullptr; + mPtRecoOverGen_GenPt_E_Cent_10_30 = nullptr; + mPtRecoOverGen_GenPt_F_Cent_10_30 = nullptr; + mPtRecoOverGen_GenPt_B_Cent_30_50 = nullptr; + mPtRecoOverGen_GenPt_E_Cent_30_50 = nullptr; + mPtRecoOverGen_GenPt_F_Cent_30_50 = nullptr; + mPtRecoOverGen_GenPt_B_Cent_50_80 = nullptr; + mPtRecoOverGen_GenPt_E_Cent_50_80 = nullptr; + mPtRecoOverGen_GenPt_F_Cent_50_80 = nullptr; + + mPtRecoOverGen_GenEta_20_30_Cent_0_10 = nullptr; + mPtRecoOverGen_GenEta_30_50_Cent_0_10 = nullptr; + mPtRecoOverGen_GenEta_50_80_Cent_0_10 = nullptr; + mPtRecoOverGen_GenEta_80_120_Cent_0_10 = nullptr; + mPtRecoOverGen_GenEta_120_180_Cent_0_10 = nullptr; + mPtRecoOverGen_GenEta_180_300_Cent_0_10 = nullptr; + mPtRecoOverGen_GenEta_300_Inf_Cent_0_10 = nullptr; + + mPtRecoOverGen_GenEta_20_30_Cent_10_30 = nullptr; + mPtRecoOverGen_GenEta_30_50_Cent_10_30 = nullptr; + mPtRecoOverGen_GenEta_50_80_Cent_10_30 = nullptr; + mPtRecoOverGen_GenEta_80_120_Cent_10_30 = nullptr; + mPtRecoOverGen_GenEta_120_180_Cent_10_30 = nullptr; + mPtRecoOverGen_GenEta_180_300_Cent_10_30 = nullptr; + mPtRecoOverGen_GenEta_300_Inf_Cent_10_30 = nullptr; + + mPtRecoOverGen_GenEta_20_30_Cent_30_50 = nullptr; + mPtRecoOverGen_GenEta_30_50_Cent_30_50 = nullptr; + mPtRecoOverGen_GenEta_50_80_Cent_30_50 = nullptr; + mPtRecoOverGen_GenEta_80_120_Cent_30_50 = nullptr; + mPtRecoOverGen_GenEta_120_180_Cent_30_50 = nullptr; + mPtRecoOverGen_GenEta_180_300_Cent_30_50 = nullptr; + mPtRecoOverGen_GenEta_300_Inf_Cent_30_50 = nullptr; - mPtRecoOverGen_GenEta_20_30_Cent_50_80 = 0; - mPtRecoOverGen_GenEta_30_50_Cent_50_80 = 0; - mPtRecoOverGen_GenEta_50_80_Cent_50_80 = 0; - mPtRecoOverGen_GenEta_80_120_Cent_50_80 = 0; - mPtRecoOverGen_GenEta_120_180_Cent_50_80 = 0; - mPtRecoOverGen_GenEta_180_300_Cent_50_80 = 0; - mPtRecoOverGen_GenEta_300_Inf_Cent_50_80 = 0; + mPtRecoOverGen_GenEta_20_30_Cent_50_80 = nullptr; + mPtRecoOverGen_GenEta_30_50_Cent_50_80 = nullptr; + mPtRecoOverGen_GenEta_50_80_Cent_50_80 = nullptr; + mPtRecoOverGen_GenEta_80_120_Cent_50_80 = nullptr; + mPtRecoOverGen_GenEta_120_180_Cent_50_80 = nullptr; + mPtRecoOverGen_GenEta_180_300_Cent_50_80 = nullptr; + mPtRecoOverGen_GenEta_300_Inf_Cent_50_80 = nullptr; } @@ -1085,7 +1085,7 @@ void JetTester_HeavyIons::analyze(const edm::Event& mEvent, const edm::EventSetu for (GenJetCollection::const_iterator gjet=genJets->begin(); gjet!=genJets->end(); gjet++) { if (fabs(gjet->eta()) > 6.) continue; // Out of the detector if (gjet->pt() < mMatchGenPtThreshold) continue; - if (recoJets.size() <= 0) continue; + if (recoJets.empty()) continue; bool inBarrel = false; bool inEndcap = false; diff --git a/Validation/RecoJets/plugins/JetTester_HeavyIons.h b/Validation/RecoJets/plugins/JetTester_HeavyIons.h index 89863c02a32ab..711edae9d71c3 100644 --- a/Validation/RecoJets/plugins/JetTester_HeavyIons.h +++ b/Validation/RecoJets/plugins/JetTester_HeavyIons.h @@ -73,7 +73,7 @@ class JetTester_HeavyIons : public DQMEDAnalyzer { public: explicit JetTester_HeavyIons (const edm::ParameterSet&); - virtual ~JetTester_HeavyIons(); + ~JetTester_HeavyIons() override; void analyze(const edm::Event&, const edm::EventSetup&) override; //virtual void beginJob(); diff --git a/Validation/RecoMET/plugins/METTester.cc b/Validation/RecoMET/plugins/METTester.cc index 6bbe1a29ab04f..52ee6bbbbc9eb 100644 --- a/Validation/RecoMET/plugins/METTester.cc +++ b/Validation/RecoMET/plugins/METTester.cc @@ -53,77 +53,77 @@ METTester::METTester(const edm::ParameterSet& iConfig) } //Events variables - mNvertex = 0; + mNvertex = nullptr; //Common variables - mMEx = 0; - mMEy = 0; - mMETSig = 0; - mMET = 0; - mMETFine = 0; - mMET_Nvtx = 0; - mMETPhi = 0; - mSumET = 0; - mMETDifference_GenMETTrue = 0; - mMETDeltaPhi_GenMETTrue = 0; - mMETDifference_GenMETCalo = 0; - mMETDeltaPhi_GenMETCalo = 0; + mMEx = nullptr; + mMEy = nullptr; + mMETSig = nullptr; + mMET = nullptr; + mMETFine = nullptr; + mMET_Nvtx = nullptr; + mMETPhi = nullptr; + mSumET = nullptr; + mMETDifference_GenMETTrue = nullptr; + mMETDeltaPhi_GenMETTrue = nullptr; + mMETDifference_GenMETCalo = nullptr; + mMETDeltaPhi_GenMETCalo = nullptr; // MET Uncertainities: Only for MiniAOD - mMETUnc_JetResUp = 0; - mMETUnc_JetResDown = 0; - mMETUnc_JetEnUp = 0; - mMETUnc_JetEnDown = 0; - mMETUnc_MuonEnUp = 0; - mMETUnc_MuonEnDown = 0; - mMETUnc_ElectronEnUp = 0; - mMETUnc_ElectronEnDown = 0; - mMETUnc_TauEnUp = 0; - mMETUnc_TauEnDown = 0; - mMETUnc_UnclusteredEnUp = 0; - mMETUnc_UnclusteredEnDown = 0; - mMETUnc_PhotonEnUp = 0; - mMETUnc_PhotonEnDown = 0; + mMETUnc_JetResUp = nullptr; + mMETUnc_JetResDown = nullptr; + mMETUnc_JetEnUp = nullptr; + mMETUnc_JetEnDown = nullptr; + mMETUnc_MuonEnUp = nullptr; + mMETUnc_MuonEnDown = nullptr; + mMETUnc_ElectronEnUp = nullptr; + mMETUnc_ElectronEnDown = nullptr; + mMETUnc_TauEnUp = nullptr; + mMETUnc_TauEnDown = nullptr; + mMETUnc_UnclusteredEnUp = nullptr; + mMETUnc_UnclusteredEnDown = nullptr; + mMETUnc_PhotonEnUp = nullptr; + mMETUnc_PhotonEnDown = nullptr; //CaloMET variables - mCaloMaxEtInEmTowers = 0; - mCaloMaxEtInHadTowers = 0; - mCaloEtFractionHadronic = 0; - mCaloEmEtFraction = 0; - mCaloHadEtInHB = 0; - mCaloHadEtInHO = 0; - mCaloHadEtInHE = 0; - mCaloHadEtInHF = 0; - mCaloEmEtInHF = 0; - mCaloSETInpHF = 0; - mCaloSETInmHF = 0; - mCaloEmEtInEE = 0; - mCaloEmEtInEB = 0; + mCaloMaxEtInEmTowers = nullptr; + mCaloMaxEtInHadTowers = nullptr; + mCaloEtFractionHadronic = nullptr; + mCaloEmEtFraction = nullptr; + mCaloHadEtInHB = nullptr; + mCaloHadEtInHO = nullptr; + mCaloHadEtInHE = nullptr; + mCaloHadEtInHF = nullptr; + mCaloEmEtInHF = nullptr; + mCaloSETInpHF = nullptr; + mCaloSETInmHF = nullptr; + mCaloEmEtInEE = nullptr; + mCaloEmEtInEB = nullptr; //GenMET variables - mNeutralEMEtFraction=0; - mNeutralHadEtFraction=0; - mChargedEMEtFraction=0; - mChargedHadEtFraction=0; - mMuonEtFraction=0; - mInvisibleEtFraction=0; + mNeutralEMEtFraction=nullptr; + mNeutralHadEtFraction=nullptr; + mChargedEMEtFraction=nullptr; + mChargedHadEtFraction=nullptr; + mMuonEtFraction=nullptr; + mInvisibleEtFraction=nullptr; //MET variables //PFMET variables - mMETDifference_GenMETTrue_MET0to20=0; - mMETDifference_GenMETTrue_MET20to40=0; - mMETDifference_GenMETTrue_MET40to60=0; - mMETDifference_GenMETTrue_MET60to80=0; - mMETDifference_GenMETTrue_MET80to100=0; - mMETDifference_GenMETTrue_MET100to150=0; - mMETDifference_GenMETTrue_MET150to200=0; - mMETDifference_GenMETTrue_MET200to300=0; - mMETDifference_GenMETTrue_MET300to400=0; - mMETDifference_GenMETTrue_MET400to500=0; - mMETDifference_GenMETTrue_MET500=0; + mMETDifference_GenMETTrue_MET0to20=nullptr; + mMETDifference_GenMETTrue_MET20to40=nullptr; + mMETDifference_GenMETTrue_MET40to60=nullptr; + mMETDifference_GenMETTrue_MET60to80=nullptr; + mMETDifference_GenMETTrue_MET80to100=nullptr; + mMETDifference_GenMETTrue_MET100to150=nullptr; + mMETDifference_GenMETTrue_MET150to200=nullptr; + mMETDifference_GenMETTrue_MET200to300=nullptr; + mMETDifference_GenMETTrue_MET300to400=nullptr; + mMETDifference_GenMETTrue_MET400to500=nullptr; + mMETDifference_GenMETTrue_MET500=nullptr; } @@ -278,7 +278,7 @@ void METTester::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) // Get Generated MET for Resolution plots - const reco::GenMET *genMetTrue=NULL; + const reco::GenMET *genMetTrue=nullptr; bool isvalidgenmet=false; if(!isMiniAODMET){ diff --git a/Validation/RecoMET/plugins/METTester.h b/Validation/RecoMET/plugins/METTester.h index f568b94e7d575..e0a1255243713 100644 --- a/Validation/RecoMET/plugins/METTester.h +++ b/Validation/RecoMET/plugins/METTester.h @@ -55,7 +55,7 @@ class METTester: public DQMEDAnalyzer { explicit METTester(const edm::ParameterSet&); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; diff --git a/Validation/RecoMET/plugins/METTesterPostProcessor.cc b/Validation/RecoMET/plugins/METTesterPostProcessor.cc index a0a7761750d24..befe521630b2d 100644 --- a/Validation/RecoMET/plugins/METTesterPostProcessor.cc +++ b/Validation/RecoMET/plugins/METTesterPostProcessor.cc @@ -48,17 +48,17 @@ METTesterPostProcessor::dqmEndJob(DQMStore::IBooker& ibook_, DQMStore::IGetter& void METTesterPostProcessor::FillMETRes(std::string metdir, DQMStore::IGetter & iget) { - mMETDifference_GenMETTrue_MET0to20=0; - mMETDifference_GenMETTrue_MET20to40=0; - mMETDifference_GenMETTrue_MET40to60=0; - mMETDifference_GenMETTrue_MET60to80=0; - mMETDifference_GenMETTrue_MET80to100=0; - mMETDifference_GenMETTrue_MET100to150=0; - mMETDifference_GenMETTrue_MET150to200=0; - mMETDifference_GenMETTrue_MET200to300=0; - mMETDifference_GenMETTrue_MET300to400=0; - mMETDifference_GenMETTrue_MET400to500=0; - mMETDifference_GenMETTrue_MET500=0; + mMETDifference_GenMETTrue_MET0to20=nullptr; + mMETDifference_GenMETTrue_MET20to40=nullptr; + mMETDifference_GenMETTrue_MET40to60=nullptr; + mMETDifference_GenMETTrue_MET60to80=nullptr; + mMETDifference_GenMETTrue_MET80to100=nullptr; + mMETDifference_GenMETTrue_MET100to150=nullptr; + mMETDifference_GenMETTrue_MET150to200=nullptr; + mMETDifference_GenMETTrue_MET200to300=nullptr; + mMETDifference_GenMETTrue_MET300to400=nullptr; + mMETDifference_GenMETTrue_MET400to500=nullptr; + mMETDifference_GenMETTrue_MET500=nullptr; mMETDifference_GenMETTrue_MET0to20 = iget.get(metdir+"/METResolution_GenMETTrue_MET0to20"); mMETDifference_GenMETTrue_MET20to40 = iget.get(metdir+"/METResolution_GenMETTrue_MET20to40"); diff --git a/Validation/RecoMET/plugins/METTesterPostProcessor.h b/Validation/RecoMET/plugins/METTesterPostProcessor.h index ceacc683430ea..12131a464c76f 100644 --- a/Validation/RecoMET/plugins/METTesterPostProcessor.h +++ b/Validation/RecoMET/plugins/METTesterPostProcessor.h @@ -5,8 +5,8 @@ // system include files #include -#include -#include +#include +#include #include // user include files @@ -28,10 +28,10 @@ class METTesterPostProcessor : public DQMEDHarvester { public: explicit METTesterPostProcessor(const edm::ParameterSet&); - ~METTesterPostProcessor(); + ~METTesterPostProcessor() override; private: - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) ; + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override ; std::vector met_dirs; void FillMETRes(std::string metdir,DQMStore::IGetter &); diff --git a/Validation/RecoMET/plugins/METTesterPostProcessorHarvesting.h b/Validation/RecoMET/plugins/METTesterPostProcessorHarvesting.h index 1c65fad27153b..ebecb895497c0 100644 --- a/Validation/RecoMET/plugins/METTesterPostProcessorHarvesting.h +++ b/Validation/RecoMET/plugins/METTesterPostProcessorHarvesting.h @@ -5,8 +5,8 @@ // system include files #include -#include -#include +#include +#include #include // user include files @@ -28,10 +28,10 @@ class METTesterPostProcessorHarvesting : public DQMEDHarvester { public: explicit METTesterPostProcessorHarvesting(const edm::ParameterSet&); - ~METTesterPostProcessorHarvesting(); + ~METTesterPostProcessorHarvesting() override; private: - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) ; + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override ; edm::InputTag inputMETLabelRECO_; edm::InputTag inputMETLabelMiniAOD_; diff --git a/Validation/RecoMuon/plugins/MuonTrackValidator.cc b/Validation/RecoMuon/plugins/MuonTrackValidator.cc index 102613e5435cb..4b6fb662cd38e 100644 --- a/Validation/RecoMuon/plugins/MuonTrackValidator.cc +++ b/Validation/RecoMuon/plugins/MuonTrackValidator.cc @@ -50,20 +50,20 @@ void MuonTrackValidator::bookHistograms(DQMStore::IBooker& ibooker, edm::Run con dirName+="_TkAsso"; } std::replace(dirName.begin(), dirName.end(), ':', '_'); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); setUpVectors(); ibooker.goUp(); string subDirName = dirName + "/simulation"; - ibooker.setCurrentFolder(subDirName.c_str()); + ibooker.setCurrentFolder(subDirName); h_ptSIM.push_back( ibooker.book1D("ptSIM", "generated p_{t}", 5500, 0, 110 ) ); h_etaSIM.push_back( ibooker.book1D("etaSIM", "generated pseudorapidity", 500, -2.5, 2.5 ) ); h_tracksSIM.push_back( ibooker.book1D("tracksSIM","number of simulated tracks",200,-0.5,99.5) ); h_vertposSIM.push_back( ibooker.book1D("vertposSIM","Transverse position of sim vertices",100,0.,120.) ); ibooker.cd(); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); h_tracks.push_back( ibooker.book1D("tracks","number of reconstructed tracks",200,-0.5,19.5) ); h_fakes.push_back( ibooker.book1D("fakes","number of fake reco tracks",20,-0.5,19.5) ); h_charge.push_back( ibooker.book1D("charge","charge",3,-1.5,1.5) ); @@ -395,7 +395,7 @@ void MuonTrackValidator::analyze(const edm::Event& event, const edm::EventSetup& std::vector, double> > rt; if(simRecColl.find(tpr) != simRecColl.end()){ rt = (std::vector, double> >) simRecColl[tpr]; - if (rt.size()!=0) { + if (!rt.empty()) { RefToBase assoc_recoTrack = rt.begin()->first; edm::LogVerbatim("MuonTrackValidator")<<"-----------------------------associated Track #"<first; // RtS and StR must associate the same pair ! if(simRecColl.find(tpr) != simRecColl.end()) { @@ -603,7 +603,7 @@ void MuonTrackValidator::analyze(const edm::Event& event, const edm::EventSetup& else { if(recSimColl.find(track) != recSimColl.end()){ tp = recSimColl[track]; - if (tp.size()!=0) { + if (!tp.empty()) { Track_is_matched = true; tpr = tp.begin()->first; at++; @@ -737,10 +737,10 @@ void MuonTrackValidator::analyze(const edm::Event& event, const edm::EventSetup& double phiErrorRec(0); //loop to decide whether to take gsfTrack (utilisation of mode-function) or common track - const GsfTrack* gsfTrack(0); + const GsfTrack* gsfTrack(nullptr); if(useGsf){ gsfTrack = dynamic_cast(&(*track)); - if (gsfTrack==0) edm::LogInfo("MuonTrackValidator") << "Trying to access mode for a non-GsfTrack"; + if (gsfTrack==nullptr) edm::LogInfo("MuonTrackValidator") << "Trying to access mode for a non-GsfTrack"; } if (gsfTrack) { @@ -961,7 +961,7 @@ void MuonTrackValidator::endRun(Run const&, EventSetup const&) { } } - if ( out.size() != 0 && dbe_ ) dbe_->save(out); + if ( !out.empty() && dbe_ ) dbe_->save(out); } void MuonTrackValidator::getRecoMomentum (const reco::Track& track, diff --git a/Validation/RecoMuon/plugins/MuonTrackValidator.h b/Validation/RecoMuon/plugins/MuonTrackValidator.h index 851caa65a3303..c4f55443fcd4d 100644 --- a/Validation/RecoMuon/plugins/MuonTrackValidator.h +++ b/Validation/RecoMuon/plugins/MuonTrackValidator.h @@ -136,15 +136,15 @@ class MuonTrackValidator : public DQMEDAnalyzer, protected MuonTrackValidatorBas } /// Destructor - virtual ~MuonTrackValidator(){ } + ~MuonTrackValidator() override{ } /// Method called before the event loop // void beginRun(edm::Run const&, edm::EventSetup const&); /// Method called once per event - void analyze(const edm::Event&, const edm::EventSetup& ); + void analyze(const edm::Event&, const edm::EventSetup& ) override; /// Method called at the end of the event loop - void endRun(edm::Run const&, edm::EventSetup const&); - void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&); + void endRun(edm::Run const&, edm::EventSetup const&) override; + void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override; private: /// retrieval of reconstructed momentum components from reco::Track (== mean values for GSF) diff --git a/Validation/RecoMuon/plugins/NewMuonTrackValidator.h b/Validation/RecoMuon/plugins/NewMuonTrackValidator.h index 9561a0c7c07d0..10d28ad02ab8a 100644 --- a/Validation/RecoMuon/plugins/NewMuonTrackValidator.h +++ b/Validation/RecoMuon/plugins/NewMuonTrackValidator.h @@ -134,7 +134,7 @@ class NewMuonTrackValidator : public DQMEDAnalyzer, protected NewMuonTrackValida } /// Destructor - virtual ~NewMuonTrackValidator(){ } + ~NewMuonTrackValidator() override{ } /// Method called before the event loop // void beginRun(edm::Run const&, edm::EventSetup const&); diff --git a/Validation/RecoMuon/src/GlobalMuonMatchAnalyzer.cc b/Validation/RecoMuon/src/GlobalMuonMatchAnalyzer.cc index 0e941ea9a1b9d..a18ae73ac4987 100644 --- a/Validation/RecoMuon/src/GlobalMuonMatchAnalyzer.cc +++ b/Validation/RecoMuon/src/GlobalMuonMatchAnalyzer.cc @@ -123,7 +123,7 @@ GlobalMuonMatchAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup RefToBase rGlb; if(glbsimToRecoCollection.find(tp) != glbsimToRecoCollection.end()){ rvGlb = glbsimToRecoCollection[tp]; - if(rvGlb.size() != 0) { + if(!rvGlb.empty()) { rGlb = rvGlb.begin()->first; } } @@ -132,7 +132,7 @@ GlobalMuonMatchAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup RefToBase rSta; if(stasimToRecoCollection.find(tp) != stasimToRecoCollection.end()){ rvSta = stasimToRecoCollection[tp]; - if(rvSta.size() != 0) { + if(!rvSta.empty()) { rSta = rvSta.begin()->first; } } @@ -141,12 +141,12 @@ GlobalMuonMatchAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup RefToBase rTk; if(tksimToRecoCollection.find(tp) != tksimToRecoCollection.end()){ rvTk = tksimToRecoCollection[tp]; - if(rvTk.size() != 0) { + if(!rvTk.empty()) { rTk = rvTk.begin()->first; } } - if( rvSta.size() != 0 && rvTk.size() != 0 ){ + if( !rvSta.empty() && !rvTk.empty() ){ //should have matched h_shouldMatch->Fill(rTk->eta(),rTk->pt()); } @@ -184,7 +184,7 @@ GlobalMuonMatchAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup TrackingParticleRef tp1r; if(glbrecoToSimCollection.find(glbRef) != glbrecoToSimCollection.end()){ tp1 = glbrecoToSimCollection[glbRef]; - if(tp1.size() != 0) { + if(!tp1.empty()) { tp1r = tp1.begin()->first; } } @@ -193,7 +193,7 @@ GlobalMuonMatchAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup TrackingParticleRef tp2r; if(starecoToSimCollection.find(staRef) != starecoToSimCollection.end()){ tp2 = starecoToSimCollection[staRef]; - if(tp2.size() != 0) { + if(!tp2.empty()) { tp2r = tp2.begin()->first; } } @@ -202,13 +202,13 @@ GlobalMuonMatchAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup TrackingParticleRef tp3r; if(tkrecoToSimCollection.find(tkRef) != tkrecoToSimCollection.end()){ tp3 = tkrecoToSimCollection[tkRef]; - if(tp3.size() != 0) { + if(!tp3.empty()) { tp3r = tp3.begin()->first; } } - if(tp1.size() != 0) { + if(!tp1.empty()) { //was reconstructed h_totReco->Fill(glbRef->eta(),glbRef->pt()); if(tp2r == tp3r) { // && tp1r == tp3r) { @@ -240,7 +240,7 @@ void GlobalMuonMatchAnalyzer::endRun(edm::Run const&, edm::EventSetup const&) { computeEfficiencyEta(h_fake,h_fakeMatch,h_totReco); computeEfficiencyPt(h_fakePt,h_fakeMatch,h_totReco); - if( out.size() != 0 && dbe_ ) dbe_->save(out); + if( !out.empty() && dbe_ ) dbe_->save(out); } //void GlobalMuonMatchAnalyzer::beginRun(const edm::Run&, const edm::EventSetup& setup) @@ -254,7 +254,7 @@ void GlobalMuonMatchAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, ibooker.cd(); std::string dirName="Matcher/"; // ibooker.setCurrentFolder("RecoMuonV/Matcher"); - ibooker.setCurrentFolder(dirName.c_str()) ; + ibooker.setCurrentFolder(dirName) ; h_shouldMatch = ibooker.book2D("h_shouldMatch","SIM associated to Tk and Sta",50,-2.5,2.5,100,0.,500.); h_goodMatchSim = ibooker.book2D("h_goodMatchSim","SIM associated to Glb Sta Tk",50,-2.5,2.5,100,0.,500.); diff --git a/Validation/RecoMuon/src/GlobalMuonMatchAnalyzer.h b/Validation/RecoMuon/src/GlobalMuonMatchAnalyzer.h index 1300d442c696f..edf53734fde7c 100644 --- a/Validation/RecoMuon/src/GlobalMuonMatchAnalyzer.h +++ b/Validation/RecoMuon/src/GlobalMuonMatchAnalyzer.h @@ -46,16 +46,16 @@ class DQMStore; class GlobalMuonMatchAnalyzer : public DQMEDAnalyzer { public: explicit GlobalMuonMatchAnalyzer(const edm::ParameterSet&); - ~GlobalMuonMatchAnalyzer(); + ~GlobalMuonMatchAnalyzer() override; private: virtual void beginJob() ; // virtual void beginRun(const edm::Run&, const edm::EventSetup&) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; virtual void endJob() ; - virtual void endRun(const edm::Run&, const edm::EventSetup&) override; + void endRun(const edm::Run&, const edm::EventSetup&) override; void computeEfficiencyEta(MonitorElement*, MonitorElement *recoTH2, MonitorElement *simTH2); void computeEfficiencyPt(MonitorElement*, MonitorElement *recoTH2, MonitorElement *simTH2); diff --git a/Validation/RecoMuon/src/HTrack.cc b/Validation/RecoMuon/src/HTrack.cc index 0450cfb0fa16d..a2231e1a6f57d 100644 --- a/Validation/RecoMuon/src/HTrack.cc +++ b/Validation/RecoMuon/src/HTrack.cc @@ -19,95 +19,95 @@ HTrack::HTrack( DQMStore::IBooker & ibooker, string dirName_,string name,string ibooker.cd(); std::string dirName=dirName_; dirName+="/"; - dirName+=name.c_str(); + dirName+=name; dirName+="_"; - dirName+=whereIs.c_str(); + dirName+=whereIs; - ibooker.setCurrentFolder(dirName.c_str()); - hVariables = new HTrackVariables(ibooker, dirName.c_str(),name,whereIs); + ibooker.setCurrentFolder(dirName); + hVariables = new HTrackVariables(ibooker, dirName,name,whereIs); ibooker.cd(); string resName = dirName; resName+="/Resolution"; - hResolution = new HResolution(ibooker, resName.c_str(),name+"_Res",whereIs); + hResolution = new HResolution(ibooker, resName,name+"_Res",whereIs); ibooker.cd(); - ibooker.setCurrentFolder(dirName.c_str()); - hTDRResolution = new HResolution(ibooker, resName.c_str(),name+"_TDRRes",whereIs); + ibooker.setCurrentFolder(dirName); + hTDRResolution = new HResolution(ibooker, resName,name+"_TDRRes",whereIs); ibooker.cd(); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); string pullName = dirName; pullName+="/Pull"; - hPull = new HResolution(ibooker, pullName.c_str(),name+"_Pull",whereIs); - hTDRPull = new HResolution(ibooker,pullName.c_str(),name+"_TDRPull",whereIs); + hPull = new HResolution(ibooker, pullName,name+"_Pull",whereIs); + hTDRPull = new HResolution(ibooker,pullName,name+"_TDRPull",whereIs); doSubHisto = false; if(doSubHisto){ ibooker.cd(); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); string subName = dirName; subName+="/subHistos"; // [5-10] GeV range - hResolution_5_10 = new HResolution(ibooker, subName.c_str(),name+"_Res_Pt_5_10",whereIs); - hTDRResolution_5_10 = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Pt_5_10",whereIs); - hPull_5_10 = new HResolution(ibooker, subName.c_str(),name+"_Pull_Pt_5_10",whereIs); + hResolution_5_10 = new HResolution(ibooker, subName,name+"_Res_Pt_5_10",whereIs); + hTDRResolution_5_10 = new HResolution(ibooker, subName,name+"_TDRRes_Pt_5_10",whereIs); + hPull_5_10 = new HResolution(ibooker, subName,name+"_Pull_Pt_5_10",whereIs); - hResolution_10_40 = new HResolution(ibooker, subName.c_str(),name+"_Res_Pt_10_40",whereIs); - hTDRResolution_10_40 = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Pt_10_40",whereIs); - hPull_10_40 = new HResolution(ibooker, subName.c_str(),name+"_Pull_Pt_10_40",whereIs); + hResolution_10_40 = new HResolution(ibooker, subName,name+"_Res_Pt_10_40",whereIs); + hTDRResolution_10_40 = new HResolution(ibooker, subName,name+"_TDRRes_Pt_10_40",whereIs); + hPull_10_40 = new HResolution(ibooker, subName,name+"_Pull_Pt_10_40",whereIs); - hResolution_40_70 = new HResolution(ibooker, subName.c_str(),name+"_Res_Pt_40_70",whereIs); - hTDRResolution_40_70 = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Pt_40_70",whereIs); - hPull_40_70 = new HResolution(ibooker, subName.c_str(),name+"_Pull_Pt_40_70",whereIs); + hResolution_40_70 = new HResolution(ibooker, subName,name+"_Res_Pt_40_70",whereIs); + hTDRResolution_40_70 = new HResolution(ibooker, subName,name+"_TDRRes_Pt_40_70",whereIs); + hPull_40_70 = new HResolution(ibooker, subName,name+"_Pull_Pt_40_70",whereIs); - hResolution_70_100 = new HResolution(ibooker, subName.c_str(),name+"_Res_Pt_70_100",whereIs); - hTDRResolution_70_100 = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Pt_70_100",whereIs); - hPull_70_100 = new HResolution(ibooker, subName.c_str(),name+"_Pull_Pt_70_100",whereIs); + hResolution_70_100 = new HResolution(ibooker, subName,name+"_Res_Pt_70_100",whereIs); + hTDRResolution_70_100 = new HResolution(ibooker, subName,name+"_TDRRes_Pt_70_100",whereIs); + hPull_70_100 = new HResolution(ibooker, subName,name+"_Pull_Pt_70_100",whereIs); - hResolution_08 = new HResolution(ibooker, subName.c_str(),name+"_Res_Eta_08",whereIs); - hTDRResolution_08 = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Eta_08",whereIs); - hPull_08 = new HResolution(ibooker, subName.c_str(),name+"_Pull_Eta_08",whereIs); + hResolution_08 = new HResolution(ibooker, subName,name+"_Res_Eta_08",whereIs); + hTDRResolution_08 = new HResolution(ibooker, subName,name+"_TDRRes_Eta_08",whereIs); + hPull_08 = new HResolution(ibooker, subName,name+"_Pull_Eta_08",whereIs); - hResolution_08_12 = new HResolution(ibooker, subName.c_str(),name+"_Res_Eta_08_12",whereIs); - hTDRResolution_08_12 = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Eta_08_12",whereIs); - hPull_08_12 = new HResolution(ibooker, subName.c_str(),name+"_Pull_Eta_08_12",whereIs); + hResolution_08_12 = new HResolution(ibooker, subName,name+"_Res_Eta_08_12",whereIs); + hTDRResolution_08_12 = new HResolution(ibooker, subName,name+"_TDRRes_Eta_08_12",whereIs); + hPull_08_12 = new HResolution(ibooker, subName,name+"_Pull_Eta_08_12",whereIs); - hResolution_12_21 = new HResolution(ibooker, subName.c_str(),name+"_Res_Eta_12_21",whereIs); - hTDRResolution_12_21 = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Eta_12_21",whereIs); - hPull_12_21 = new HResolution(ibooker, subName.c_str(),name+"_Pull_Eta_12_21",whereIs); + hResolution_12_21 = new HResolution(ibooker, subName,name+"_Res_Eta_12_21",whereIs); + hTDRResolution_12_21 = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_21",whereIs); + hPull_12_21 = new HResolution(ibooker, subName,name+"_Pull_Eta_12_21",whereIs); - hResolution_12_24 = new HResolution(ibooker, subName.c_str(),name+"_Res_Eta_12_24",whereIs); - hTDRResolution_12_24 = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Eta_12_24",whereIs); - hPull_12_24 = new HResolution(ibooker, subName.c_str(),name+"_Pull_Eta_12_24",whereIs); + hResolution_12_24 = new HResolution(ibooker, subName,name+"_Res_Eta_12_24",whereIs); + hTDRResolution_12_24 = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_24",whereIs); + hPull_12_24 = new HResolution(ibooker, subName,name+"_Pull_Eta_12_24",whereIs); - hResolution_12_21_plus = new HResolution(ibooker, subName.c_str(),name+"_Res_Eta_12_21_plus",whereIs); - hTDRResolution_12_21_plus = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Eta_12_21_plus",whereIs); - hPull_12_21_plus = new HResolution(ibooker, subName.c_str(),name+"_Pull_Eta_12_21_plus",whereIs); + hResolution_12_21_plus = new HResolution(ibooker, subName,name+"_Res_Eta_12_21_plus",whereIs); + hTDRResolution_12_21_plus = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_21_plus",whereIs); + hPull_12_21_plus = new HResolution(ibooker, subName,name+"_Pull_Eta_12_21_plus",whereIs); - hResolution_12_24_plus = new HResolution(ibooker, subName.c_str(),name+"_Res_Eta_12_24_plus",whereIs); - hTDRResolution_12_24_plus = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Eta_12_24_plus",whereIs); - hPull_12_24_plus = new HResolution(ibooker, subName.c_str(),name+"_Pull_Eta_12_24_plus",whereIs); + hResolution_12_24_plus = new HResolution(ibooker, subName,name+"_Res_Eta_12_24_plus",whereIs); + hTDRResolution_12_24_plus = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_24_plus",whereIs); + hPull_12_24_plus = new HResolution(ibooker, subName,name+"_Pull_Eta_12_24_plus",whereIs); - hResolution_12_21_minus = new HResolution(ibooker, subName.c_str(),name+"_Res_Eta_12_21_minus",whereIs); - hTDRResolution_12_21_minus = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Eta_12_21_minus",whereIs); - hPull_12_21_minus = new HResolution(ibooker, subName.c_str(),name+"_Pull_Eta_12_21_minus",whereIs); + hResolution_12_21_minus = new HResolution(ibooker, subName,name+"_Res_Eta_12_21_minus",whereIs); + hTDRResolution_12_21_minus = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_21_minus",whereIs); + hPull_12_21_minus = new HResolution(ibooker, subName,name+"_Pull_Eta_12_21_minus",whereIs); - hResolution_12_24_minus = new HResolution(ibooker, subName.c_str(),name+"_Res_Eta_12_24_minus",whereIs); - hTDRResolution_12_24_minus = new HResolution(ibooker, subName.c_str(),name+"_TDRRes_Eta_12_24_minus",whereIs); - hPull_12_24_minus = new HResolution(ibooker, subName.c_str(),name+"_Pull_Eta_12_24_minus",whereIs); + hResolution_12_24_minus = new HResolution(ibooker, subName,name+"_Res_Eta_12_24_minus",whereIs); + hTDRResolution_12_24_minus = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_24_minus",whereIs); + hPull_12_24_minus = new HResolution(ibooker, subName,name+"_Pull_Eta_12_24_minus",whereIs); } } diff --git a/Validation/RecoMuon/src/Histograms.h b/Validation/RecoMuon/src/Histograms.h index 71d4ce22f2d8e..d85445518419a 100644 --- a/Validation/RecoMuon/src/Histograms.h +++ b/Validation/RecoMuon/src/Histograms.h @@ -19,19 +19,19 @@ #include "DataFormats/GeometryVector/interface/Pi.h" #include #include -#include +#include class HTrackVariables{ public: - HTrackVariables(DQMStore::IBooker &ibooker,std::string dirName_, std::string name,std::string whereIs =""):theName(name.c_str()),where(whereIs.c_str()){ + HTrackVariables(DQMStore::IBooker &ibooker,std::string dirName_, std::string name,std::string whereIs =""):theName(name),where(whereIs){ ibooker.cd(); - std::string dirName=dirName_; + const std::string& dirName=dirName_; //dirName+="/"; //dirName+=name.c_str(); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); hEta = ibooker.book1D(theName+"_Eta_"+where,"#eta at "+where,120,-3.,3.); hPhi = ibooker.book1D(theName+"_Phi_"+where,"#phi at "+where,100,-Geom::pi(),Geom::pi()); @@ -159,14 +159,14 @@ class HTrackVariables{ class HResolution { public: - HResolution(DQMStore::IBooker &ibooker, std::string dirName_,std::string name,std::string whereIs):theName(name.c_str()),where(whereIs.c_str()){ + HResolution(DQMStore::IBooker &ibooker, std::string dirName_,std::string name,std::string whereIs):theName(name),where(whereIs){ ibooker.cd(); - std::string dirName=dirName_; + const std::string& dirName=dirName_; //dirName+="/"; //dirName+=name.c_str(); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); double eta = 15.; int neta = 800; double phi = 12.; int nphi = 400; @@ -197,7 +197,7 @@ class HResolution { h2PhiVsEta = ibooker.book2D(theName+"_Phi_vs_Eta"+where,"#phi "+theName+" as a function of #eta",200,-2.5,2.5,nphi,-phi,phi); } - HResolution(DQMStore::IBooker &ibooker, std::string name, TFile* file):theName(name.c_str()){ + HResolution(DQMStore::IBooker &ibooker, std::string name, TFile* file):theName(name){ // dynamic_cast( file->Get(theName+"") ); } @@ -289,7 +289,7 @@ class HResolution { class HResolution1DRecHit{ public: - HResolution1DRecHit(DQMStore::IBooker &ibooker, std::string name):theName(name.c_str()){ + HResolution1DRecHit(DQMStore::IBooker &ibooker, std::string name):theName(name){ // Position, sigma, residual, pull hResX = ibooker.book1D (theName+"_X_Res", "X residual", 5000, -0.5,0.5); diff --git a/Validation/RecoMuon/src/MuonSeedTrack.h b/Validation/RecoMuon/src/MuonSeedTrack.h index 4d17310b32407..63612cc1b4c06 100644 --- a/Validation/RecoMuon/src/MuonSeedTrack.h +++ b/Validation/RecoMuon/src/MuonSeedTrack.h @@ -48,17 +48,17 @@ class MuonSeedTrack : public edm::EDProducer { explicit MuonSeedTrack(const edm::ParameterSet&); /// destructor - ~MuonSeedTrack(); + ~MuonSeedTrack() override; private: /// pre-job booking - virtual void beginJob() ; + void beginJob() override ; /// construct proto-tracks - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; /// post-job - virtual void endJob() ; + void endJob() override ; /// get the TrajectorySeed's TrajectoryStateOnSurface TrajectoryStateOnSurface getSeedTSOS(const TrajectorySeed& seed) const; diff --git a/Validation/RecoMuon/src/MuonTrackAnalyzer.cc b/Validation/RecoMuon/src/MuonTrackAnalyzer.cc index 9f0e755f7a12c..4b6a738c650c4 100644 --- a/Validation/RecoMuon/src/MuonTrackAnalyzer.cc +++ b/Validation/RecoMuon/src/MuonTrackAnalyzer.cc @@ -110,35 +110,35 @@ void MuonTrackAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, dirName.replace(dirName.find("Tracks"),6,""); } std::replace(dirName.begin(), dirName.end(), ':', '_'); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); //ibooker.goUp(); std::string simName = dirName; simName+="/SimTracks"; - hSimTracks = new HTrackVariables(ibooker,simName.c_str(),"SimTracks"); + hSimTracks = new HTrackVariables(ibooker,simName,"SimTracks"); ibooker.cd(); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); // Create the root file //theFile = new TFile(theRootFileName.c_str(), "RECREATE"); if(doSeedsAnalysis){ ibooker.cd(); - ibooker.setCurrentFolder(dirName.c_str()); - hRecoSeedInner = new HTrack(ibooker,dirName.c_str(),"RecoSeed","Inner"); - hRecoSeedPCA = new HTrack(ibooker,dirName.c_str(),"RecoSeed","PCA"); + ibooker.setCurrentFolder(dirName); + hRecoSeedInner = new HTrack(ibooker,dirName,"RecoSeed","Inner"); + hRecoSeedPCA = new HTrack(ibooker,dirName,"RecoSeed","PCA"); } if(doTracksAnalysis){ ibooker.cd(); - ibooker.setCurrentFolder(dirName.c_str()); - hRecoTracksPCA = new HTrack(ibooker,dirName.c_str(),"RecoTracks","PCA"); - hRecoTracksInner = new HTrack(ibooker,dirName.c_str(),"RecoTracks","Inner"); - hRecoTracksOuter = new HTrack(ibooker,dirName.c_str(),"RecoTracks","Outer"); + ibooker.setCurrentFolder(dirName); + hRecoTracksPCA = new HTrack(ibooker,dirName,"RecoTracks","PCA"); + hRecoTracksInner = new HTrack(ibooker,dirName,"RecoTracks","Inner"); + hRecoTracksOuter = new HTrack(ibooker,dirName,"RecoTracks","Outer"); ibooker.cd(); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); // General Histos @@ -189,7 +189,7 @@ void MuonTrackAnalyzer::endRun(DQMStore::IBooker & ibooker) { double eff = hRecoSeedInner->computeEfficiency(hSimTracks,ibooker); LogInfo("MuonTrackAnalyzer")<<" *Seed Efficiency* = "<< eff <<"%"; } - if ( out.size() != 0 && dbe_ ) dbe_->save(out); + if ( !out.empty() && dbe_ ) dbe_->save(out); } void MuonTrackAnalyzer::analyze(const Event & event, const EventSetup& eventSetup){ @@ -254,7 +254,7 @@ void MuonTrackAnalyzer::tracksAnalysis(const Event & event, const EventSetup& ev LogTrace("MuonTrackAnalyzer")<<"Reconstructed tracks: " << tracks->size() << endl; hNumberOfTracks->Fill(tracks->size()); - if(tracks->size()) numberOfRecTracks++; + if(!tracks->empty()) numberOfRecTracks++; // Loop over the Rec tracks for(reco::TrackCollection::const_iterator t = tracks->begin(); t != tracks->end(); ++t) { @@ -508,7 +508,7 @@ TrajectoryStateOnSurface MuonTrackAnalyzer::getSeedTSOS(const TrajectorySeed& se detLayers = theService->muonNavigationSchool()->compatibleLayers(*initialLayer, *initialState.freeState(),detLayerOrder); TrajectoryStateOnSurface result = initialState; - if(detLayers.size()){ + if(!detLayers.empty()){ const DetLayer* finalLayer = detLayers.back(); const TrajectoryStateOnSurface propagatedState = theService->propagator(theSeedPropagatorName)->propagate(initialState, finalLayer->surface()); if(propagatedState.isValid()) diff --git a/Validation/RecoMuon/src/MuonTrackAnalyzer.h b/Validation/RecoMuon/src/MuonTrackAnalyzer.h index 030d2e903ce0b..4c91a10440be2 100644 --- a/Validation/RecoMuon/src/MuonTrackAnalyzer.h +++ b/Validation/RecoMuon/src/MuonTrackAnalyzer.h @@ -54,7 +54,7 @@ class MuonTrackAnalyzer: public DQMEDAnalyzer { MuonTrackAnalyzer(const edm::ParameterSet& pset); /// Destructor - virtual ~MuonTrackAnalyzer(); + ~MuonTrackAnalyzer() override; // Operations diff --git a/Validation/RecoMuon/src/MuonTrackResidualAnalyzer.cc b/Validation/RecoMuon/src/MuonTrackResidualAnalyzer.cc index ae350273d02bd..92f8287bd2a0e 100644 --- a/Validation/RecoMuon/src/MuonTrackResidualAnalyzer.cc +++ b/Validation/RecoMuon/src/MuonTrackResidualAnalyzer.cc @@ -105,7 +105,7 @@ void MuonTrackResidualAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, dirName.replace(dirName.find("Tracks"),6,""); } std::replace(dirName.begin(), dirName.end(), ':', '_'); - ibooker.setCurrentFolder(dirName.c_str()); + ibooker.setCurrentFolder(dirName); hDPtRef = ibooker.book1D("DeltaPtRef","P^{in}_{t}-P^{in ref}",10000,-20,20); @@ -123,7 +123,7 @@ void MuonTrackResidualAnalyzer::bookHistograms(DQMStore::IBooker & ibooker, } void MuonTrackResidualAnalyzer::endRun(edm::Run const&, edm::EventSetup const&){ - if ( out.size() != 0 && dbe_ ) dbe_->save(out); + if ( !out.empty() && dbe_ ) dbe_->save(out); } void MuonTrackResidualAnalyzer::analyze(const edm::Event & event, const edm::EventSetup& eventSetup){ LogDebug("MuonTrackResidualAnalyzer")<<"Analyze"; diff --git a/Validation/RecoMuon/src/MuonTrackResidualAnalyzer.h b/Validation/RecoMuon/src/MuonTrackResidualAnalyzer.h index 6ab8f27891b11..575895c55b824 100644 --- a/Validation/RecoMuon/src/MuonTrackResidualAnalyzer.h +++ b/Validation/RecoMuon/src/MuonTrackResidualAnalyzer.h @@ -54,7 +54,7 @@ class MuonTrackResidualAnalyzer: public DQMEDAnalyzer { MuonTrackResidualAnalyzer(const edm::ParameterSet& ps); /// Destructor - virtual ~MuonTrackResidualAnalyzer(); + ~MuonTrackResidualAnalyzer() override; // Operations @@ -62,7 +62,7 @@ class MuonTrackResidualAnalyzer: public DQMEDAnalyzer { virtual void beginJob() ; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void endRun(edm::Run const&, edm::EventSetup const&) override; + void endRun(edm::Run const&, edm::EventSetup const&) override; protected: diff --git a/Validation/RecoMuon/src/RecoMuonValidator.h b/Validation/RecoMuon/src/RecoMuonValidator.h index 13c6063687a3f..8a4def98b059e 100644 --- a/Validation/RecoMuon/src/RecoMuonValidator.h +++ b/Validation/RecoMuon/src/RecoMuonValidator.h @@ -34,12 +34,12 @@ class RecoMuonValidator : public DQMEDAnalyzer { public: RecoMuonValidator(const edm::ParameterSet& pset); - ~RecoMuonValidator(); + ~RecoMuonValidator() override; - virtual void dqmBeginRun(const edm::Run&, const edm::EventSetup& eventSetup) override; + void dqmBeginRun(const edm::Run&, const edm::EventSetup& eventSetup) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; - virtual void endRun(edm::Run const&, edm::EventSetup const&) override; - virtual void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override; + void endRun(edm::Run const&, edm::EventSetup const&) override; + void analyze(const edm::Event& event, const edm::EventSetup& eventSetup) override; virtual int countMuonHits(const reco::Track& track) const; virtual int countTrackerHits(const reco::Track& track) const; diff --git a/Validation/RecoParticleFlow/interface/Comparator.h b/Validation/RecoParticleFlow/interface/Comparator.h index ea4742414bf71..10da2741305c5 100644 --- a/Validation/RecoParticleFlow/interface/Comparator.h +++ b/Validation/RecoParticleFlow/interface/Comparator.h @@ -1,7 +1,7 @@ #ifndef __Validation_RecoParticleFlow_Comparator__ #define __Validation_RecoParticleFlow_Comparator__ -#include +#include #include #include @@ -25,14 +25,14 @@ class Comparator { }; Comparator() : rebin_(-1), xMin_(0), xMax_(0), resetAxis_(false), - s0_(0), s1_(0), legend_(0,0,1,1) {} + s0_(nullptr), s1_(nullptr), legend_(0,0,1,1) {} Comparator( const char* file0, const char* dir0, const char* file1, const char* dir1 ) : rebin_(-1), xMin_(0), xMax_(0), resetAxis_(false), - s0_(0), s1_(0), legend_(0,0,1,1) { + s0_(nullptr), s1_(nullptr), legend_(0,0,1,1) { SetDirs( file0, dir0, file1, dir1); } diff --git a/Validation/RecoParticleFlow/interface/TH2Analyzer.h b/Validation/RecoParticleFlow/interface/TH2Analyzer.h index bff998050a969..0089f325952af 100644 --- a/Validation/RecoParticleFlow/interface/TH2Analyzer.h +++ b/Validation/RecoParticleFlow/interface/TH2Analyzer.h @@ -22,26 +22,26 @@ class TH2Analyzer : public TObject { public: TH2Analyzer( const TH2* h, int rebin=1) : hist2D_(h), - rebinnedHist2D_(0), - average_(0), - RMS_(0), - sigmaGauss_(0), - meanXslice_(0) { + rebinnedHist2D_(nullptr), + average_(nullptr), + RMS_(nullptr), + sigmaGauss_(nullptr), + meanXslice_(nullptr) { Eval(rebin); } TH2Analyzer( const TH2* h, const int binxmin, const int binxmax, const int rebin, const bool cst_binning=true) : hist2D_(h), - rebinnedHist2D_(0), - average_(0), - RMS_(0), - sigmaGauss_(0), - meanXslice_(0) { + rebinnedHist2D_(nullptr), + average_(nullptr), + RMS_(nullptr), + sigmaGauss_(nullptr), + meanXslice_(nullptr) { Eval(rebin, binxmin, binxmax, cst_binning); } - ~TH2Analyzer() {Reset(); } + ~TH2Analyzer() override {Reset(); } void Reset(); diff --git a/Validation/RecoParticleFlow/plugins/GenericBenchmarkAnalyzer.cc b/Validation/RecoParticleFlow/plugins/GenericBenchmarkAnalyzer.cc index 268a4835284fa..c995328ebb73f 100644 --- a/Validation/RecoParticleFlow/plugins/GenericBenchmarkAnalyzer.cc +++ b/Validation/RecoParticleFlow/plugins/GenericBenchmarkAnalyzer.cc @@ -56,7 +56,7 @@ GenericBenchmarkAnalyzer::GenericBenchmarkAnalyzer(const edm::ParameterSet& iCon maxDeltaPhi_ = iConfig.getParameter("maxDeltaPhi"); doMetPlots_ = iConfig.getParameter("doMetPlots"); - if (outputFile_.size() > 0) + if (!outputFile_.empty()) edm::LogInfo("OutputInfo") << " ParticleFLow Task histograms will be saved to '" << outputFile_.c_str()<< "'"; else edm::LogInfo("OutputInfo") << " ParticleFlow Task histograms will NOT be saved"; @@ -79,7 +79,7 @@ GenericBenchmarkAnalyzer::beginJob() //string path = "PFTask/Benchmarks/" + benchmarkLabel_ + "/"; std::string path = "ParticleFlow/" + benchmarkLabel_ + "/" ; if (plotAgainstRecoQuantities_) path += "Reco"; else path += "Gen"; - dbe_->setCurrentFolder(path.c_str()); + dbe_->setCurrentFolder(path); setup(dbe_, plotAgainstRecoQuantities_, minDeltaEt_, maxDeltaEt_, minDeltaPhi_, maxDeltaPhi_, doMetPlots_); } @@ -150,6 +150,6 @@ void GenericBenchmarkAnalyzer::endJob() { // Store the DAQ Histograms - if (outputFile_.size() != 0) + if (!outputFile_.empty()) dbe_->save(outputFile_); } diff --git a/Validation/RecoParticleFlow/plugins/GenericBenchmarkAnalyzer.h b/Validation/RecoParticleFlow/plugins/GenericBenchmarkAnalyzer.h index ea9273bd3bb34..008e18f36a59b 100644 --- a/Validation/RecoParticleFlow/plugins/GenericBenchmarkAnalyzer.h +++ b/Validation/RecoParticleFlow/plugins/GenericBenchmarkAnalyzer.h @@ -18,11 +18,11 @@ class GenericBenchmarkAnalyzer: public edm::EDAnalyzer, public GenericBenchmark public: explicit GenericBenchmarkAnalyzer(const edm::ParameterSet&); - virtual ~GenericBenchmarkAnalyzer(); + ~GenericBenchmarkAnalyzer() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void beginJob() ; - virtual void endJob() ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginJob() override ; + void endJob() override ; private: diff --git a/Validation/RecoParticleFlow/plugins/PFFilter.h b/Validation/RecoParticleFlow/plugins/PFFilter.h index 8759aa5538c7f..95ea24a20970a 100644 --- a/Validation/RecoParticleFlow/plugins/PFFilter.h +++ b/Validation/RecoParticleFlow/plugins/PFFilter.h @@ -12,11 +12,11 @@ class PFFilter: public edm::EDFilter{ public: explicit PFFilter(const edm::ParameterSet&); - virtual ~PFFilter(); + ~PFFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void beginJob(); - virtual void endJob(); + bool filter(edm::Event&, const edm::EventSetup&) override; + void beginJob() override; + void endJob() override; bool checkInput(); private: diff --git a/Validation/RecoParticleFlow/plugins/PFJetBenchmarkAnalyzer.cc b/Validation/RecoParticleFlow/plugins/PFJetBenchmarkAnalyzer.cc index bace5a2072718..5719bd40361cc 100644 --- a/Validation/RecoParticleFlow/plugins/PFJetBenchmarkAnalyzer.cc +++ b/Validation/RecoParticleFlow/plugins/PFJetBenchmarkAnalyzer.cc @@ -52,13 +52,13 @@ using namespace std; class PFJetBenchmarkAnalyzer : public edm::EDAnalyzer { public: explicit PFJetBenchmarkAnalyzer(const edm::ParameterSet&); - ~PFJetBenchmarkAnalyzer(); + ~PFJetBenchmarkAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- edm::EDGetTokenT sGenJetAlgo_tok_; edm::EDGetTokenT sJetAlgo_tok_; diff --git a/Validation/RecoParticleFlow/plugins/PFJetFilter.cc b/Validation/RecoParticleFlow/plugins/PFJetFilter.cc index 352dcbdf8a50d..1785ffdf0fab8 100644 --- a/Validation/RecoParticleFlow/plugins/PFJetFilter.cc +++ b/Validation/RecoParticleFlow/plugins/PFJetFilter.cc @@ -88,7 +88,7 @@ PFJetFilter::filter(edm::Event& iEvent, const edm::EventSetup& iESetup) const reco::Candidate *particle = &(*reco_candidates)[i]; // This protection is meant at not being used ! - assert( particle!=NULL ); + assert( particle!=nullptr ); double rec_pt = particle->pt(); double rec_eta = particle->eta(); @@ -134,7 +134,7 @@ PFJetFilter::filter(edm::Event& iEvent, const edm::EventSetup& iESetup) truth_candidates); // Check there is a genJet associated to the recoJet - if(gen_particle==NULL) continue; + if(gen_particle==nullptr) continue; // check deltaR is small enough double deltaR = algo_->deltaR(particle, gen_particle); diff --git a/Validation/RecoParticleFlow/plugins/PFJetFilter.h b/Validation/RecoParticleFlow/plugins/PFJetFilter.h index 74e270c8eafea..7cb050b3f19a3 100644 --- a/Validation/RecoParticleFlow/plugins/PFJetFilter.h +++ b/Validation/RecoParticleFlow/plugins/PFJetFilter.h @@ -14,13 +14,13 @@ class PFJetFilter: public edm::EDFilter { public: explicit PFJetFilter(const edm::ParameterSet&); - ~PFJetFilter(); + ~PFJetFilter() override; private: - virtual void beginJob() ; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void endJob(); + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override; double resolution(double, bool); double response(double, bool); diff --git a/Validation/RecoParticleFlow/plugins/PFMETBenchmarkAnalyzer.cc b/Validation/RecoParticleFlow/plugins/PFMETBenchmarkAnalyzer.cc index 8c4677d59b425..cfb95c1e2222d 100644 --- a/Validation/RecoParticleFlow/plugins/PFMETBenchmarkAnalyzer.cc +++ b/Validation/RecoParticleFlow/plugins/PFMETBenchmarkAnalyzer.cc @@ -54,13 +54,13 @@ using namespace std; class PFMETBenchmarkAnalyzer : public edm::EDAnalyzer { public: explicit PFMETBenchmarkAnalyzer(const edm::ParameterSet&); - ~PFMETBenchmarkAnalyzer(); + ~PFMETBenchmarkAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- edm::EDGetTokenT sInputTruthLabel_tok_; edm::EDGetTokenT sInputRecoLabel_tok_; diff --git a/Validation/RecoParticleFlow/plugins/PFMETFilter.h b/Validation/RecoParticleFlow/plugins/PFMETFilter.h index aa41c26ce7bd3..a9264995718a5 100644 --- a/Validation/RecoParticleFlow/plugins/PFMETFilter.h +++ b/Validation/RecoParticleFlow/plugins/PFMETFilter.h @@ -12,11 +12,11 @@ class PFMETFilter: public edm::EDFilter{ public: explicit PFMETFilter(const edm::ParameterSet&); - virtual ~PFMETFilter(); + ~PFMETFilter() override; - virtual bool filter(edm::Event&, const edm::EventSetup&); - virtual void beginJob(); - virtual void endJob(); + bool filter(edm::Event&, const edm::EventSetup&) override; + void beginJob() override; + void endJob() override; bool checkInput(); private: diff --git a/Validation/RecoParticleFlow/plugins/PFTauElecRejectionBenchMarkAnalyzer.cc b/Validation/RecoParticleFlow/plugins/PFTauElecRejectionBenchMarkAnalyzer.cc index fce3d948b183c..c00a746395770 100644 --- a/Validation/RecoParticleFlow/plugins/PFTauElecRejectionBenchMarkAnalyzer.cc +++ b/Validation/RecoParticleFlow/plugins/PFTauElecRejectionBenchMarkAnalyzer.cc @@ -26,13 +26,13 @@ using namespace std; class PFTauElecRejectionBenchmarkAnalyzer : public edm::EDAnalyzer { public: explicit PFTauElecRejectionBenchmarkAnalyzer(const edm::ParameterSet&); - ~PFTauElecRejectionBenchmarkAnalyzer(); + ~PFTauElecRejectionBenchmarkAnalyzer() override; private: - virtual void beginJob() override ; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- string outputfile; diff --git a/Validation/RecoParticleFlow/plugins/PFTester.cc b/Validation/RecoParticleFlow/plugins/PFTester.cc index 3477446892f72..cf1dc08f36d91 100644 --- a/Validation/RecoParticleFlow/plugins/PFTester.cc +++ b/Validation/RecoParticleFlow/plugins/PFTester.cc @@ -43,7 +43,7 @@ PFTester::PFTester(const edm::ParameterSet& iConfig) inputPFlowLabel_tok_ = consumes (iConfig.getParameter("InputPFlowLabel") ); outputFile_ = iConfig.getUntrackedParameter("OutputFile"); - if (outputFile_.size() > 0) + if (!outputFile_.empty()) edm::LogInfo("OutputInfo") << " ParticleFLow Task histograms will be saved to '" << outputFile_.c_str() << "'"; else edm::LogInfo("OutputInfo") << " ParticleFlow Task histograms will NOT be saved"; @@ -215,7 +215,7 @@ void PFTester::endJob() { // Store the DAQ Histograms - if (outputFile_.size() > 0 && dbe_) + if (!outputFile_.empty() && dbe_) dbe_->save(outputFile_); } diff --git a/Validation/RecoParticleFlow/plugins/PFTester.h b/Validation/RecoParticleFlow/plugins/PFTester.h index 1281f0a3c9408..f69a254a44c06 100644 --- a/Validation/RecoParticleFlow/plugins/PFTester.h +++ b/Validation/RecoParticleFlow/plugins/PFTester.h @@ -20,11 +20,11 @@ class PFTester: public edm::EDAnalyzer { public: explicit PFTester(const edm::ParameterSet&); - virtual ~PFTester(); + ~PFTester() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void beginJob() ; - virtual void endJob() ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginJob() override ; + void endJob() override ; private: diff --git a/Validation/RecoParticleFlow/src/Comparator.cc b/Validation/RecoParticleFlow/src/Comparator.cc index 8bbbdbd14ac0b..3ead1c8b5639b 100644 --- a/Validation/RecoParticleFlow/src/Comparator.cc +++ b/Validation/RecoParticleFlow/src/Comparator.cc @@ -302,8 +302,8 @@ void Comparator::Draw( const char* key, Mode mode) { void Comparator::Draw( const char* key0, const char* key1, Mode mode) { - TH1* h0=0; - TH1* h1=0; + TH1* h0=nullptr; + TH1* h1=nullptr; if(mode!=EFF) { h0 = Histo( key0, 0); @@ -341,9 +341,9 @@ void Comparator::Draw( const char* key0, const char* key1, Mode mode) { TH1* Comparator::Histo( const char* key, unsigned dirIndex) { if(dirIndex>1U) { // dirIndex >= 0, since dirIndex is unsigned cerr<<"bad dir index: "<GetNbinsX(); ++i) { TH1D* proj = histo->ProjectionY("toto", i, i); @@ -243,7 +243,7 @@ void TH2Analyzer::ProcessSlices( const TH2D* histo) { delete proj; } - TH1::AddDirectory(1); + TH1::AddDirectory(true); } diff --git a/Validation/RecoTau/interface/TauTagValidation.h b/Validation/RecoTau/interface/TauTagValidation.h index 275cf5b2487e7..9806f4578697c 100644 --- a/Validation/RecoTau/interface/TauTagValidation.h +++ b/Validation/RecoTau/interface/TauTagValidation.h @@ -73,11 +73,11 @@ class TauTagValidation : public DQMEDAnalyzer{ public: explicit TauTagValidation(const edm::ParameterSet&); - ~TauTagValidation(); + ~TauTagValidation() override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override; - virtual void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; + void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; private: /// label of the current module diff --git a/Validation/RecoTau/plugins/DQMFileLoader.h b/Validation/RecoTau/plugins/DQMFileLoader.h index 57d42ac0ace72..47c6be7fbaeb5 100644 --- a/Validation/RecoTau/plugins/DQMFileLoader.h +++ b/Validation/RecoTau/plugins/DQMFileLoader.h @@ -38,10 +38,10 @@ class TauDQMFileLoader : public edm::EDAnalyzer public: explicit TauDQMFileLoader(const edm::ParameterSet&); - virtual ~TauDQMFileLoader(); - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(){} - virtual void endRun(const edm::Run& r, const edm::EventSetup& c); + ~TauDQMFileLoader() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override{} + void endRun(const edm::Run& r, const edm::EventSetup& c) override; private: std::map fileSets_; diff --git a/Validation/RecoTau/plugins/DQMHistEffProducer.cc b/Validation/RecoTau/plugins/DQMHistEffProducer.cc index e68fe24780044..a6079825ec0d6 100644 --- a/Validation/RecoTau/plugins/DQMHistEffProducer.cc +++ b/Validation/RecoTau/plugins/DQMHistEffProducer.cc @@ -54,7 +54,7 @@ TauDQMHistEffProducer::TauDQMHistEffProducer(const edm::ParameterSet& cfg) typedef std::vector vstring; vstring plotParameter = plotConfig.getParameter("parameter"); - if ( plotParameter.size() == 0 ) { + if ( plotParameter.empty() ) { cfgEntryPlot_.push_back(cfgEntryPlot(plotConfig)); } else { std::string numerator = plotConfig.getParameter("numerator"); @@ -107,7 +107,7 @@ void TauDQMHistEffProducer::endRun(const edm::Run& r, const edm::EventSetup& c) //std::cout << "numeratorHistogramDirectory = " << numeratorHistogramDirectory << std::endl; MonitorElement* meNumerator = dqmStore.get(std::string(numeratorHistogramDirectory).append(dqmSeparator).append(numeratorHistogramName)); //std::cout << "meNumerator = " << meNumerator << std::endl; - TH1* histoNumerator = ( meNumerator != NULL ) ? meNumerator->getTH1() : NULL; + TH1* histoNumerator = ( meNumerator != nullptr ) ? meNumerator->getTH1() : nullptr; //std::cout << "plot->denominator_ = " << plot->denominator_ << std::endl; std::string denominatorHistogramName, denominatorHistogramDirectory; @@ -116,9 +116,9 @@ void TauDQMHistEffProducer::endRun(const edm::Run& r, const edm::EventSetup& c) //std::cout << "denominatorHistogramDirectory = " << denominatorHistogramDirectory << std::endl; MonitorElement* meDenominator = dqmStore.get(std::string(denominatorHistogramDirectory).append(dqmSeparator).append(denominatorHistogramName)); //std::cout << "meDenominator = " << meDenominator << std::endl; - TH1* histoDenominator = ( meDenominator != NULL ) ? meDenominator->getTH1() : NULL; + TH1* histoDenominator = ( meDenominator != nullptr ) ? meDenominator->getTH1() : nullptr; - if ( histoNumerator != NULL && histoDenominator != NULL ) { + if ( histoNumerator != nullptr && histoDenominator != nullptr ) { if ( !histoNumerator->GetSumw2N() ) histoNumerator->Sumw2(); //std::cout << " histoNumerator->GetName = " << histoNumerator->GetName() << std::endl; @@ -151,8 +151,8 @@ void TauDQMHistEffProducer::endRun(const edm::Run& r, const edm::EventSetup& c) */ } else { edm::LogError("endRun") << " Failed to produce efficiency histogram = " << plot->efficiency_ << " !!"; - if ( histoNumerator == NULL ) edm::LogError("endRun") << " numerator = " << plot->numerator_ << " does not exist."; - if ( histoDenominator == NULL ) edm::LogError("endRun") << " denominator = " << plot->denominator_ << " does not exist."; + if ( histoNumerator == nullptr ) edm::LogError("endRun") << " numerator = " << plot->numerator_ << " does not exist."; + if ( histoDenominator == nullptr ) edm::LogError("endRun") << " denominator = " << plot->denominator_ << " does not exist."; } } } diff --git a/Validation/RecoTau/plugins/DQMHistEffProducer.h b/Validation/RecoTau/plugins/DQMHistEffProducer.h index 38544a7bc1615..0b3eb116f8072 100644 --- a/Validation/RecoTau/plugins/DQMHistEffProducer.h +++ b/Validation/RecoTau/plugins/DQMHistEffProducer.h @@ -32,10 +32,10 @@ class TauDQMHistEffProducer : public edm::EDAnalyzer public: explicit TauDQMHistEffProducer(const edm::ParameterSet&); - virtual ~TauDQMHistEffProducer(); - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(){} - virtual void endRun(const edm::Run& r, const edm::EventSetup& c); + ~TauDQMHistEffProducer() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override{} + void endRun(const edm::Run& r, const edm::EventSetup& c) override; private: std::vector cfgEntryPlot_; diff --git a/Validation/RecoTau/plugins/DQMHistNormalizer.cc b/Validation/RecoTau/plugins/DQMHistNormalizer.cc index a951d9a71db3a..16ad09ca15637 100644 --- a/Validation/RecoTau/plugins/DQMHistNormalizer.cc +++ b/Validation/RecoTau/plugins/DQMHistNormalizer.cc @@ -38,10 +38,10 @@ class DQMHistNormalizer : public edm::EDAnalyzer public: explicit DQMHistNormalizer(const edm::ParameterSet&); - virtual ~DQMHistNormalizer(); - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override{} - virtual void endRun(const edm::Run& r, const edm::EventSetup& c) override; + ~DQMHistNormalizer() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override{} + void endRun(const edm::Run& r, const edm::EventSetup& c) override; private: lat::Regexp* buildRegex(const string & expr); @@ -68,7 +68,7 @@ void DQMHistNormalizer::analyze(const edm::Event&, const edm::EventSetup&) lat::Regexp* DQMHistNormalizer::buildRegex(const string & expr) { - lat::Regexp* rx = 0; + lat::Regexp* rx = nullptr; try { rx = new lat::Regexp(expr, 0, lat::Regexp::Wildcard); diff --git a/Validation/RecoTau/plugins/DQMHistPlotter.cc b/Validation/RecoTau/plugins/DQMHistPlotter.cc index cf5f92bf54462..6e0f0f6e1fefe 100644 --- a/Validation/RecoTau/plugins/DQMHistPlotter.cc +++ b/Validation/RecoTau/plugins/DQMHistPlotter.cc @@ -119,7 +119,7 @@ const T* findCfgDef(const std::string& cfgEntryName, std::map& d return &(it->second); } else { edm::LogError ("findCfgDef") << " " << defType << " = " << cfgEntryName << " undefined, needed by drawJob = " << drawJobName << " !!"; - return NULL; + return nullptr; } } @@ -923,7 +923,7 @@ void TauDQMHistPlotter::endRun(const edm::Run& r, const edm::EventSetup& c) //pad.Divide(1,1); //pad.cd(1); - TPostScript* ps = NULL; + TPostScript* ps = nullptr; if ( outputFileName_ != "" ) { std::string psFileName = ( outputFilePath_ != "" ) ? std::string(outputFilePath_).append("/").append(outputFileName_) : outputFileName_; ps = new TPostScript(psFileName.data(), 112); @@ -937,7 +937,7 @@ void TauDQMHistPlotter::endRun(const edm::Run& r, const edm::EventSetup& c) std::cout << "--> processing drawJob " << drawJobName << "..." << std::endl; //--- prepare internally used histogram data-structures - TH1* stackedHistogram_sum = NULL; + TH1* stackedHistogram_sum = nullptr; std::list histogramsToDelete; std::list drawOptionsToDelete; @@ -958,7 +958,7 @@ void TauDQMHistPlotter::endRun(const edm::Run& r, const edm::EventSetup& c) // TH1* histogram = ( dqmMonitorElement ) ? dynamic_cast(dqmMonitorElement->getTH1()->Clone()) : NULL; //histogramsToDelete.push_back(histogram); - if ( histogram == NULL ) { + if ( histogram == nullptr ) { edm::LogError ("endJob") << " Failed to access dqmMonitorElement = " << dqmMonitorElementName_full <<"," << " needed by drawJob = " << drawJobName << " --> histograms will NOT be plotted !!"; continue; @@ -968,7 +968,7 @@ void TauDQMHistPlotter::endRun(const edm::Run& r, const edm::EventSetup& c) const cfgEntryDrawOption* drawOptionConfig = findCfgDef(plot->drawOptionEntry_, drawOptionEntries_, "drawOptionEntry", drawJobName); - if ( drawOptionConfig == NULL ) { + if ( drawOptionConfig == nullptr ) { edm::LogError ("endJob") << " Failed to access information needed by drawJob = " << drawJobName << " --> histograms will NOT be plotted !!"; return; @@ -1041,7 +1041,7 @@ void TauDQMHistPlotter::endRun(const edm::Run& r, const edm::EventSetup& c) const cfgEntryAxisX* xAxisConfig = findCfgDef(drawJob->xAxis_, xAxes_, "xAxis", drawJobName); const cfgEntryAxisY* yAxisConfig = findCfgDef(drawJob->yAxis_, yAxes_, "yAxis", drawJobName); const cfgEntryLegend* legendConfig = findCfgDef(drawJob->legend_, legends_, "legend", drawJobName); - if ( xAxisConfig == NULL || yAxisConfig == NULL || legendConfig == NULL ) { + if ( xAxisConfig == nullptr || yAxisConfig == nullptr || legendConfig == nullptr ) { edm::LogError ("endJob") << " Failed to access information needed by drawJob = " << drawJobName << " --> histograms will NOT be plotted !!"; return; @@ -1067,7 +1067,7 @@ void TauDQMHistPlotter::endRun(const edm::Run& r, const edm::EventSetup& c) const cfgEntryDrawOption* drawOptionConfig = findCfgDef(drawOption->drawOptionEntry_, drawOptionEntries_, "drawOptionEntry", drawJobName); const cfgEntryProcess* processConfig = findCfgDef(drawOption->process_, processes_, "process", drawJobName); - if ( drawOptionConfig == NULL || processConfig == NULL ) { + if ( drawOptionConfig == nullptr || processConfig == nullptr ) { edm::LogError ("endJob") << " Failed to access information needed by drawJob = " << drawJobName << " --> histograms will NOT be plotted !!"; return; diff --git a/Validation/RecoTau/plugins/DQMHistPlotter.h b/Validation/RecoTau/plugins/DQMHistPlotter.h index 194c45105ea99..fa3b0d5c14b8f 100644 --- a/Validation/RecoTau/plugins/DQMHistPlotter.h +++ b/Validation/RecoTau/plugins/DQMHistPlotter.h @@ -154,10 +154,10 @@ class TauDQMHistPlotter : public edm::EDAnalyzer public: explicit TauDQMHistPlotter(const edm::ParameterSet&); - virtual ~TauDQMHistPlotter(); - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(){} - virtual void endRun(const edm::Run& r, const edm::EventSetup& c); + ~TauDQMHistPlotter() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override{} + void endRun(const edm::Run& r, const edm::EventSetup& c) override; private: std::map processes_; diff --git a/Validation/RecoTau/plugins/DQMSimpleFileSaver.h b/Validation/RecoTau/plugins/DQMSimpleFileSaver.h index 6ef0babf94473..e32a8443d1c7b 100644 --- a/Validation/RecoTau/plugins/DQMSimpleFileSaver.h +++ b/Validation/RecoTau/plugins/DQMSimpleFileSaver.h @@ -21,9 +21,9 @@ class TauDQMSimpleFileSaver : public edm::EDAnalyzer { public: explicit TauDQMSimpleFileSaver(const edm::ParameterSet&); - virtual ~TauDQMSimpleFileSaver(); - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob(); + ~TauDQMSimpleFileSaver() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override; private: std::string outputFileName_; diff --git a/Validation/RecoTau/plugins/Selectors.cc b/Validation/RecoTau/plugins/Selectors.cc index 8ca000ed9e6a4..290b28295ceec 100644 --- a/Validation/RecoTau/plugins/Selectors.cc +++ b/Validation/RecoTau/plugins/Selectors.cc @@ -56,12 +56,12 @@ DEFINE_FWK_MODULE( TauValGenPRefSelector ); class ElectronIdFilter : public edm::EDFilter { public: explicit ElectronIdFilter(const edm::ParameterSet&); - ~ElectronIdFilter(); + ~ElectronIdFilter() override; private: - virtual void beginJob() override ; - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void endJob() override ; + void beginJob() override ; + bool filter(edm::Event&, const edm::EventSetup&) override; + void endJob() override ; edm::EDGetTokenT recoGsfElectronCollectionToken_; edm::EDGetTokenT< edm::ValueMap > edmValueMapFloatToken_; diff --git a/Validation/RecoTau/src/TauTagValidation.cc b/Validation/RecoTau/src/TauTagValidation.cc index 081359b2ed8f6..c15ce82fbaa60 100644 --- a/Validation/RecoTau/src/TauTagValidation.cc +++ b/Validation/RecoTau/src/TauTagValidation.cc @@ -61,8 +61,8 @@ TauTagValidation::TauTagValidation(const edm::ParameterSet& iConfig): { turnOnTrigger_ = iConfig.exists("turnOnTrigger") && iConfig.getParameter("turnOnTrigger"); - genericTriggerEventFlag_ = (iConfig.exists("GenericTriggerSelection") && turnOnTrigger_) ? new GenericTriggerEventFlag(iConfig.getParameter("GenericTriggerSelection"), consumesCollector(), *this) : NULL; - if(genericTriggerEventFlag_ != NULL) LogDebug(moduleLabel_) <<"--> GenericTriggerSelection parameters found in "<("GenericTriggerSelection"), consumesCollector(), *this) : nullptr; + if(genericTriggerEventFlag_ != nullptr) LogDebug(moduleLabel_) <<"--> GenericTriggerSelection parameters found in "< GenericTriggerSelection not found in "<Fill(value1);} - inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);} - inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);} - inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);} + inline void fillME(MonitorElement* ME,float value1){if (ME!=nullptr)ME->Fill(value1);} + inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=nullptr)ME->Fill(value1,value2);} + inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=nullptr)ME->Fill(value1,value2,value3);} + inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=nullptr)ME->Fill(value1,value2,value3,value4);} edm::ParameterSet conf_; diff --git a/Validation/RecoTrack/plugins/CrossingFramePSimHitToPSimHits.cc b/Validation/RecoTrack/plugins/CrossingFramePSimHitToPSimHits.cc index 1a88764e2bb4c..80132b7eb4c5c 100644 --- a/Validation/RecoTrack/plugins/CrossingFramePSimHitToPSimHits.cc +++ b/Validation/RecoTrack/plugins/CrossingFramePSimHitToPSimHits.cc @@ -14,7 +14,7 @@ class CrossingFramePSimHitToPSimHitsConverter: public edm::global::EDProducer<> static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); - virtual void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override; + void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override; private: struct InputInfo { diff --git a/Validation/RecoTrack/plugins/MultiTrackValidator.cc b/Validation/RecoTrack/plugins/MultiTrackValidator.cc index 6f8410b9ec490..65c16e56e250a 100644 --- a/Validation/RecoTrack/plugins/MultiTrackValidator.cc +++ b/Validation/RecoTrack/plugins/MultiTrackValidator.cc @@ -273,7 +273,7 @@ void MultiTrackValidator::bookHistograms(DQMStore::IBooker& ibook, edm::Run cons dirName+=assoc; std::replace(dirName.begin(), dirName.end(), ':', '_'); - ibook.setCurrentFolder(dirName.c_str()); + ibook.setCurrentFolder(dirName); const bool doResolutionPlots = doResolutionPlots_[www]; @@ -810,7 +810,7 @@ void MultiTrackValidator::analyze(const edm::Event& event, const edm::EventSetup unsigned int selectsHP = mvaCollections.size(); if(simRecColl.find(tpr) != simRecColl.end()){ auto const & rt = simRecColl[tpr]; - if (rt.size()!=0) { + if (!rt.empty()) { ats++; //This counter counts the number of simTracks that have a recoTrack associated // isRecoMatched = true; // UNUSED matchedTrackPointer = rt.begin()->first.get(); diff --git a/Validation/RecoTrack/plugins/MultiTrackValidatorGenPs.cc b/Validation/RecoTrack/plugins/MultiTrackValidatorGenPs.cc index 3170d177f65c7..82728466868bb 100644 --- a/Validation/RecoTrack/plugins/MultiTrackValidatorGenPs.cc +++ b/Validation/RecoTrack/plugins/MultiTrackValidatorGenPs.cc @@ -250,11 +250,11 @@ void MultiTrackValidatorGenPs::analyze(const edm::Event& event, const edm::Event // fill RecoAssociated GenTracks' histograms // ############################################## // bool isRecoMatched(false); // UNUSED - const reco::Track* matchedTrackPointer=0; + const reco::Track* matchedTrackPointer=nullptr; std::vector, double> > rt; if(genRecColl.find(tpr) != genRecColl.end()){ rt = (std::vector, double> >) genRecColl[tpr]; - if (rt.size()!=0) { + if (!rt.empty()) { ats++; //This counter counts the number of simTracks that have a recoTrack associated // isRecoMatched = true; // UNUSED matchedTrackPointer = rt.begin()->first.get(); @@ -319,7 +319,7 @@ void MultiTrackValidatorGenPs::analyze(const edm::Event& event, const edm::Event std::vector > tp; if(recGenColl.find(track) != recGenColl.end()){ tp = recGenColl[track]; - if (tp.size()!=0) { + if (!tp.empty()) { /* std::vector simhits=tp[0].first->trackPSimHit(DetId::Tracker); nSimHits = simhits.end()-simhits.begin(); @@ -359,7 +359,7 @@ void MultiTrackValidatorGenPs::analyze(const edm::Event& event, const edm::Event //Fill other histos //try{ //Is this really necessary ???? - if (tp.size()==0) continue; + if (tp.empty()) continue; histoProducerAlgo_->fill_simAssociated_recoTrack_histos(w,*track); diff --git a/Validation/RecoTrack/plugins/SiPixelTrackingRecHitsValid.cc b/Validation/RecoTrack/plugins/SiPixelTrackingRecHitsValid.cc index 2c65a9552445e..042a8081e4cc2 100644 --- a/Validation/RecoTrack/plugins/SiPixelTrackingRecHitsValid.cc +++ b/Validation/RecoTrack/plugins/SiPixelTrackingRecHitsValid.cc @@ -47,7 +47,7 @@ // End job: write and close the ntuple file void SiPixelTrackingRecHitsValid::endJob() { - if(debugNtuple_.size()!=0){ + if(!debugNtuple_.empty()){ tfile_->Write(); tfile_->Close(); } @@ -56,7 +56,7 @@ void SiPixelTrackingRecHitsValid::endJob() void SiPixelTrackingRecHitsValid::beginJob() { - if(debugNtuple_.size()!=0){ + if(!debugNtuple_.empty()){ tfile_ = new TFile (debugNtuple_.c_str() , "RECREATE"); t_ = new TTree("Ntuple", "Ntuple"); @@ -111,7 +111,7 @@ void SiPixelTrackingRecHitsValid::beginJob() SiPixelTrackingRecHitsValid::SiPixelTrackingRecHitsValid(const edm::ParameterSet& ps) : trackerHitAssociatorConfig_(ps, consumesCollector()), - dbe_(0), tfile_(0), t_(0) + dbe_(nullptr), tfile_(nullptr), t_(nullptr) { //Read config file MTCCtrack_ = ps.getParameter("MTCCtrack"); @@ -1067,7 +1067,7 @@ void SiPixelTrackingRecHitsValid::bookHistograms(DQMStore::IBooker & ibooker,con SiPixelTrackingRecHitsValid::~SiPixelTrackingRecHitsValid() { //save local root file only in standalone mode - if ( runStandalone && outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_); + if ( runStandalone && !outputFile_.empty() && dbe_ ) dbe_->save(outputFile_); } // Functions that gets called by framework every event @@ -1198,7 +1198,7 @@ void SiPixelTrackingRecHitsValid::analyze(const edm::Event& e, const edm::EventS int n_tracks = (int)tracks->size(); // number of tracks in this event meTracksPerEvent->Fill( n_tracks ); - if ( tracks->size() > 0 ) + if ( !tracks->empty() ) { // Loop on tracks for ( tciter=tracks->begin(); tciter!=tracks->end(); tciter++) @@ -1749,7 +1749,7 @@ void SiPixelTrackingRecHitsValid::analyze(const edm::Event& e, const edm::EventS } // else if ( detId.subdetId()==PixelSubdetector::PixelEndcap ) else edm::LogWarning("SiPixelTrackingRecHitsValid") << "Pixel rechit but we are not in the pixel detector" << (int)detId.subdetId() ; - if(debugNtuple_.size()!=0)t_->Fill(); + if(!debugNtuple_.empty())t_->Fill(); } // if ( !matched.empty() ) //else diff --git a/Validation/RecoTrack/plugins/TrackFromSeedProducer.cc b/Validation/RecoTrack/plugins/TrackFromSeedProducer.cc index 1f0b25b0a1507..426744bdb07e0 100644 --- a/Validation/RecoTrack/plugins/TrackFromSeedProducer.cc +++ b/Validation/RecoTrack/plugins/TrackFromSeedProducer.cc @@ -49,12 +49,12 @@ class TrackFromSeedProducer : public edm::global::EDProducer<> { public: explicit TrackFromSeedProducer(const edm::ParameterSet&); - ~TrackFromSeedProducer(); + ~TrackFromSeedProducer() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; // ----------member data --------------------------- edm::EDGetTokenT > seedsToken; diff --git a/Validation/RecoTrack/src/SiStripTrackingRecHitsValid.cc b/Validation/RecoTrack/src/SiStripTrackingRecHitsValid.cc index cc13323722f11..a80c4c8cc1df0 100644 --- a/Validation/RecoTrack/src/SiStripTrackingRecHitsValid.cc +++ b/Validation/RecoTrack/src/SiStripTrackingRecHitsValid.cc @@ -944,7 +944,7 @@ void SiStripTrackingRecHitsValid::rechitanalysis_matched(LocalVector ldir, const //if (hit && matchedhit) cout<<"manganosimpleandmatchedhit"<topology(); - LocalVector trackdirection = ldir; + const LocalVector& trackdirection = ldir; GlobalVector gtrkdir = gluedDet->toGlobal(trackdirection); LocalVector monotkdir = monodet->toLocal(gtrkdir); @@ -1027,7 +1027,7 @@ void SiStripTrackingRecHitsValid::rechitanalysis_matched(LocalVector ldir, const float distx = std::numeric_limits::max(); float disty = std::numeric_limits::max(); std::pair closestPair; - PSimHit* closest = NULL; + PSimHit* closest = nullptr; const StripGeomDetUnit* partnerstripdet = static_cast(gluedDet->stereoDet()); std::pair hitPair; @@ -1101,7 +1101,7 @@ void SiStripTrackingRecHitsValid::rechitanalysis(LocalVector ldir, const Trackin MeasurementPoint Mposition = topol.measurementPosition(position); MeasurementError Merror = topol.measurementError(position,error); - LocalVector trackdirection = ldir; + const LocalVector& trackdirection = ldir; rechitpro.trackangle = std::atan(trackdirection.x() / trackdirection.z()) * TMath::RadToDeg(); rechitpro.trackanglebeta = std::atan(trackdirection.y() / trackdirection.z()) * TMath::RadToDeg(); @@ -1157,7 +1157,7 @@ void SiStripTrackingRecHitsValid::rechitanalysis(LocalVector ldir, const Trackin matched.clear(); float mindist = std::numeric_limits::max(); float dist = std::numeric_limits::max(); - PSimHit* closest = NULL; + PSimHit* closest = nullptr; if(simplehit1or2D){ matched = associate.associateHit(*hit1d); @@ -1325,38 +1325,38 @@ void SiStripTrackingRecHitsValid::createMEs(DQMStore::IBooker & ibooker,const ed //------------------------------------------------------------------------------------------ void SiStripTrackingRecHitsValid::createSimpleHitsMEs(DQMStore::IBooker & ibooker) { - simplehitsMEs.meCategory = 0; - simplehitsMEs.meTrackwidth = 0; - simplehitsMEs.meExpectedwidth = 0; - simplehitsMEs.meClusterwidth = 0; - simplehitsMEs.meTrackanglealpha = 0; - simplehitsMEs.meTrackanglebeta = 0; - simplehitsMEs.meResolxMFTrackwidthProfile = 0; - simplehitsMEs.meResolxMFTrackwidthProfileWClus1 = 0; - simplehitsMEs.meResolxMFTrackwidthProfileWClus2 = 0; - simplehitsMEs.meResolxMFTrackwidthProfileWClus3 = 0; - simplehitsMEs.meResolxMFTrackwidthProfileWClus4 = 0; - simplehitsMEs.meResMFTrackwidthProfileWClus1 = 0; - - simplehitsMEs.meResMFTrackwidthProfileWClus2 = 0; - simplehitsMEs.meResMFTrackwidthProfileWClus21 = 0; - simplehitsMEs.meResMFTrackwidthProfileWClus22 = 0; - simplehitsMEs.meResMFTrackwidthProfileWClus23 = 0; - - simplehitsMEs.meResMFTrackwidthProfileWClus3 = 0; - simplehitsMEs.meResMFTrackwidthProfileWClus4 = 0; - simplehitsMEs.meResolxMFTrackwidthProfileCategory1 = 0; - simplehitsMEs.meResolxMFTrackwidthProfileCategory2 = 0; - simplehitsMEs.meResolxMFTrackwidthProfileCategory3 = 0; - simplehitsMEs.meResolxMFTrackwidthProfileCategory4 = 0; - simplehitsMEs.meResolxMFClusterwidthProfileCategory1 = 0; - simplehitsMEs.meResolxMFAngleProfile = 0; - simplehitsMEs.meResolxLF = 0; - simplehitsMEs.meResLF = 0; - simplehitsMEs.mePullLF = 0; - simplehitsMEs.meResolxMF = 0; - simplehitsMEs.meResMF = 0; - simplehitsMEs.mePullMF = 0; + simplehitsMEs.meCategory = nullptr; + simplehitsMEs.meTrackwidth = nullptr; + simplehitsMEs.meExpectedwidth = nullptr; + simplehitsMEs.meClusterwidth = nullptr; + simplehitsMEs.meTrackanglealpha = nullptr; + simplehitsMEs.meTrackanglebeta = nullptr; + simplehitsMEs.meResolxMFTrackwidthProfile = nullptr; + simplehitsMEs.meResolxMFTrackwidthProfileWClus1 = nullptr; + simplehitsMEs.meResolxMFTrackwidthProfileWClus2 = nullptr; + simplehitsMEs.meResolxMFTrackwidthProfileWClus3 = nullptr; + simplehitsMEs.meResolxMFTrackwidthProfileWClus4 = nullptr; + simplehitsMEs.meResMFTrackwidthProfileWClus1 = nullptr; + + simplehitsMEs.meResMFTrackwidthProfileWClus2 = nullptr; + simplehitsMEs.meResMFTrackwidthProfileWClus21 = nullptr; + simplehitsMEs.meResMFTrackwidthProfileWClus22 = nullptr; + simplehitsMEs.meResMFTrackwidthProfileWClus23 = nullptr; + + simplehitsMEs.meResMFTrackwidthProfileWClus3 = nullptr; + simplehitsMEs.meResMFTrackwidthProfileWClus4 = nullptr; + simplehitsMEs.meResolxMFTrackwidthProfileCategory1 = nullptr; + simplehitsMEs.meResolxMFTrackwidthProfileCategory2 = nullptr; + simplehitsMEs.meResolxMFTrackwidthProfileCategory3 = nullptr; + simplehitsMEs.meResolxMFTrackwidthProfileCategory4 = nullptr; + simplehitsMEs.meResolxMFClusterwidthProfileCategory1 = nullptr; + simplehitsMEs.meResolxMFAngleProfile = nullptr; + simplehitsMEs.meResolxLF = nullptr; + simplehitsMEs.meResLF = nullptr; + simplehitsMEs.mePullLF = nullptr; + simplehitsMEs.meResolxMF = nullptr; + simplehitsMEs.meResMF = nullptr; + simplehitsMEs.mePullMF = nullptr; if(layerswitchResolx_LF) { @@ -1508,348 +1508,348 @@ void SiStripTrackingRecHitsValid::createLayerMEs(DQMStore::IBooker & ibooker,std SiStripHistoId hidmanager; LayerMEs layerMEs; - layerMEs.meWclusRphi = 0; - layerMEs.meAdcRphi = 0; - layerMEs.meResolxLFRphi = 0; - layerMEs.meResolxMFRphi = 0; - layerMEs.meResolxMFRphiwclus1 = 0; - layerMEs.meResolxMFRphiwclus2 = 0; - layerMEs.meResolxMFRphiwclus3 = 0; - layerMEs.meResolxMFRphiwclus4 = 0; - layerMEs.meResLFRphi = 0; - layerMEs.meResMFRphi = 0; - layerMEs.meResMFRphiwclus1 = 0; - layerMEs.meResMFRphiwclus2 = 0; - layerMEs.meResMFRphiwclus3 = 0; - layerMEs.meResMFRphiwclus4 = 0; - layerMEs.mePullLFRphi = 0; - layerMEs.mePullMFRphi = 0; - layerMEs.mePullMFRphiwclus1 = 0; - layerMEs.mePullMFRphiwclus2 = 0; - layerMEs.mePullMFRphiwclus3 = 0; - layerMEs.mePullMFRphiwclus4 = 0; - layerMEs.meTrackangleRphi = 0; - layerMEs.meTrackanglebetaRphi = 0; - layerMEs.meTrackangle2Rphi = 0; - layerMEs.mePullTrackangleProfileRphi = 0; - layerMEs.mePullTrackangle2DRphi = 0; - layerMEs.meTrackwidthRphi = 0; - layerMEs.meExpectedwidthRphi = 0; - layerMEs.meClusterwidthRphi = 0; - layerMEs.meCategoryRphi = 0; - layerMEs.mePullTrackwidthProfileRphi = 0; - layerMEs.mePullTrackwidthProfileRphiwclus1 = 0; - layerMEs.mePullTrackwidthProfileRphiwclus2 = 0; - layerMEs.mePullTrackwidthProfileRphiwclus3 = 0; - layerMEs.mePullTrackwidthProfileRphiwclus4 = 0; - layerMEs.mePullTrackwidthProfileCategory1Rphi = 0; - layerMEs.mePullTrackwidthProfileCategory2Rphi = 0; - layerMEs.mePullTrackwidthProfileCategory3Rphi = 0; - layerMEs.mePullTrackwidthProfileCategory4Rphi = 0; - layerMEs.meResolxMFTrackwidthProfileRphi = 0; - - layerMEs.meResolxMFTrackwidthProfileWclus1Rphi = 0; - layerMEs.meResolxMFTrackwidthProfileWclus2Rphi = 0; - layerMEs.meResolxMFTrackwidthProfileWclus3Rphi = 0; - layerMEs.meResolxMFTrackwidthProfileWclus4Rphi = 0; - layerMEs.meResMFTrackwidthProfileWclus1Rphi = 0; - layerMEs.meResMFTrackwidthProfileWclus2Rphi = 0; - layerMEs.meResMFTrackwidthProfileWclus3Rphi = 0; - layerMEs.meResMFTrackwidthProfileWclus4Rphi = 0; - - layerMEs.meResolxMFTrackwidthProfileCategory1Rphi = 0; - layerMEs.meResolxMFTrackwidthProfileCategory2Rphi = 0; - layerMEs.meResolxMFTrackwidthProfileCategory3Rphi = 0; - layerMEs.meResolxMFTrackwidthProfileCategory4Rphi = 0; - layerMEs.meResolxMFClusterwidthProfileCategory1Rphi = 0; - layerMEs.meResolxMFAngleProfileRphi = 0; - layerMEs.merapidityResProfilewclus1 = 0; - layerMEs.merapidityResProfilewclus2 = 0; - layerMEs.merapidityResProfilewclus3 = 0; - layerMEs.merapidityResProfilewclus4 = 0; + layerMEs.meWclusRphi = nullptr; + layerMEs.meAdcRphi = nullptr; + layerMEs.meResolxLFRphi = nullptr; + layerMEs.meResolxMFRphi = nullptr; + layerMEs.meResolxMFRphiwclus1 = nullptr; + layerMEs.meResolxMFRphiwclus2 = nullptr; + layerMEs.meResolxMFRphiwclus3 = nullptr; + layerMEs.meResolxMFRphiwclus4 = nullptr; + layerMEs.meResLFRphi = nullptr; + layerMEs.meResMFRphi = nullptr; + layerMEs.meResMFRphiwclus1 = nullptr; + layerMEs.meResMFRphiwclus2 = nullptr; + layerMEs.meResMFRphiwclus3 = nullptr; + layerMEs.meResMFRphiwclus4 = nullptr; + layerMEs.mePullLFRphi = nullptr; + layerMEs.mePullMFRphi = nullptr; + layerMEs.mePullMFRphiwclus1 = nullptr; + layerMEs.mePullMFRphiwclus2 = nullptr; + layerMEs.mePullMFRphiwclus3 = nullptr; + layerMEs.mePullMFRphiwclus4 = nullptr; + layerMEs.meTrackangleRphi = nullptr; + layerMEs.meTrackanglebetaRphi = nullptr; + layerMEs.meTrackangle2Rphi = nullptr; + layerMEs.mePullTrackangleProfileRphi = nullptr; + layerMEs.mePullTrackangle2DRphi = nullptr; + layerMEs.meTrackwidthRphi = nullptr; + layerMEs.meExpectedwidthRphi = nullptr; + layerMEs.meClusterwidthRphi = nullptr; + layerMEs.meCategoryRphi = nullptr; + layerMEs.mePullTrackwidthProfileRphi = nullptr; + layerMEs.mePullTrackwidthProfileRphiwclus1 = nullptr; + layerMEs.mePullTrackwidthProfileRphiwclus2 = nullptr; + layerMEs.mePullTrackwidthProfileRphiwclus3 = nullptr; + layerMEs.mePullTrackwidthProfileRphiwclus4 = nullptr; + layerMEs.mePullTrackwidthProfileCategory1Rphi = nullptr; + layerMEs.mePullTrackwidthProfileCategory2Rphi = nullptr; + layerMEs.mePullTrackwidthProfileCategory3Rphi = nullptr; + layerMEs.mePullTrackwidthProfileCategory4Rphi = nullptr; + layerMEs.meResolxMFTrackwidthProfileRphi = nullptr; + + layerMEs.meResolxMFTrackwidthProfileWclus1Rphi = nullptr; + layerMEs.meResolxMFTrackwidthProfileWclus2Rphi = nullptr; + layerMEs.meResolxMFTrackwidthProfileWclus3Rphi = nullptr; + layerMEs.meResolxMFTrackwidthProfileWclus4Rphi = nullptr; + layerMEs.meResMFTrackwidthProfileWclus1Rphi = nullptr; + layerMEs.meResMFTrackwidthProfileWclus2Rphi = nullptr; + layerMEs.meResMFTrackwidthProfileWclus3Rphi = nullptr; + layerMEs.meResMFTrackwidthProfileWclus4Rphi = nullptr; + + layerMEs.meResolxMFTrackwidthProfileCategory1Rphi = nullptr; + layerMEs.meResolxMFTrackwidthProfileCategory2Rphi = nullptr; + layerMEs.meResolxMFTrackwidthProfileCategory3Rphi = nullptr; + layerMEs.meResolxMFTrackwidthProfileCategory4Rphi = nullptr; + layerMEs.meResolxMFClusterwidthProfileCategory1Rphi = nullptr; + layerMEs.meResolxMFAngleProfileRphi = nullptr; + layerMEs.merapidityResProfilewclus1 = nullptr; + layerMEs.merapidityResProfilewclus2 = nullptr; + layerMEs.merapidityResProfilewclus3 = nullptr; + layerMEs.merapidityResProfilewclus4 = nullptr; //WclusRphi if(layerswitchWclusRphi) { layerMEs.meWclusRphi = bookME1D(ibooker,"TH1WclusRphi", hidmanager.createHistoLayer("Wclus_rphi","layer",label,"").c_str() ,"Cluster Width - Number of strips that belong to the RecHit cluster"); - layerMEs.meWclusRphi->setAxisTitle(("Cluster Width [nr strips] in "+ label).c_str()); + layerMEs.meWclusRphi->setAxisTitle("Cluster Width [nr strips] in "+ label); } //AdcRphi if(layerswitchAdcRphi) { layerMEs.meAdcRphi = bookME1D(ibooker,"TH1AdcRphi", hidmanager.createHistoLayer("Adc_rphi","layer",label,"").c_str() ,"RecHit Cluster Charge"); - layerMEs.meAdcRphi->setAxisTitle(("cluster charge [ADC] in " + label).c_str()); + layerMEs.meAdcRphi->setAxisTitle("cluster charge [ADC] in " + label); } //ResolxLFRphi if(layerswitchResolxLFRphi) { layerMEs.meResolxLFRphi = bookME1D(ibooker,"TH1ResolxLFRphi", hidmanager.createHistoLayer("Resolx_LF_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord."); //~20micron - layerMEs.meResolxLFRphi->setAxisTitle(("resol(x) RecHit coord. (local frame) in " + label).c_str()); + layerMEs.meResolxLFRphi->setAxisTitle("resol(x) RecHit coord. (local frame) in " + label); } //ResolxMFRphi if(layerswitchResolxMFRphi) { layerMEs.meResolxMFRphi = bookME1D(ibooker,"TH1ResolxMFRphi", hidmanager.createHistoLayer("Resolx_MF_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord."); //~20micron - layerMEs.meResolxMFRphi->setAxisTitle(("resol(x) RecHit coord. (measurement frame) in " + label).c_str()); + layerMEs.meResolxMFRphi->setAxisTitle("resol(x) RecHit coord. (measurement frame) in " + label); } //ResolxMFRphiwclus1 if(layerswitchResolxMFRphiwclus1) { layerMEs.meResolxMFRphiwclus1 = bookME1D(ibooker,"TH1ResolxMFRphiwclus1", hidmanager.createHistoLayer("Resolx_MF_wclus1_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord. w=1 "); //~20micron - layerMEs.meResolxMFRphiwclus1->setAxisTitle(("resol(x) RecHit coord. (measurement frame) for w=1 in " + label).c_str()); + layerMEs.meResolxMFRphiwclus1->setAxisTitle("resol(x) RecHit coord. (measurement frame) for w=1 in " + label); } //ResolxMFRphiwclus2 if(layerswitchResolxMFRphiwclus2) { layerMEs.meResolxMFRphiwclus2 = bookME1D(ibooker,"TH1ResolxMFRphiwclus2", hidmanager.createHistoLayer("Resolx_MF_wclus2_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord. w=2 "); //~20micron - layerMEs.meResolxMFRphiwclus2->setAxisTitle(("resol(x) RecHit coord. (measurement frame) for w=2 in " + label).c_str()); + layerMEs.meResolxMFRphiwclus2->setAxisTitle("resol(x) RecHit coord. (measurement frame) for w=2 in " + label); } //ResolxMFRphiwclus3 if(layerswitchResolxMFRphiwclus3) { layerMEs.meResolxMFRphiwclus3 = bookME1D(ibooker,"TH1ResolxMFRphiwclus3", hidmanager.createHistoLayer("Resolx_MF_wclus3_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord. w=3 "); //~20micron - layerMEs.meResolxMFRphiwclus3->setAxisTitle(("resol(x) RecHit coord. (measurement frame) for w=3 in " + label).c_str()); + layerMEs.meResolxMFRphiwclus3->setAxisTitle("resol(x) RecHit coord. (measurement frame) for w=3 in " + label); } //ResolxMFRphiwclus4 if(layerswitchResolxMFRphiwclus4) { layerMEs.meResolxMFRphiwclus4 = bookME1D(ibooker,"TH1ResolxMFRphiwclus4", hidmanager.createHistoLayer("Resolx_MF_wclus4_rphi","layer",label,"").c_str() ,"RecHit resol(x) coord. w=4 "); //~20micron - layerMEs.meResolxMFRphiwclus4->setAxisTitle(("resol(x) RecHit coord. (measurement frame) for w=4 in " + label).c_str()); + layerMEs.meResolxMFRphiwclus4->setAxisTitle("resol(x) RecHit coord. (measurement frame) for w=4 in " + label); } //ResLFRphi if(layerswitchResLFRphi) { layerMEs.meResLFRphi = bookME1D(ibooker,"TH1ResLFRphi", hidmanager.createHistoLayer("Res_LF_rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate"); - layerMEs.meResLFRphi->setAxisTitle(("Hit Residuals(x) (local frame) in " + label).c_str()); + layerMEs.meResLFRphi->setAxisTitle("Hit Residuals(x) (local frame) in " + label); } //ResMFRphi if(layerswitchResMFRphi) { layerMEs.meResMFRphi = bookME1D(ibooker,"TH1ResMFRphi",hidmanager.createHistoLayer("Res_MF_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate"); - layerMEs.meResMFRphi->setAxisTitle(("Hit Residuals(x) (measurement frame) in "+ label).c_str()); + layerMEs.meResMFRphi->setAxisTitle("Hit Residuals(x) (measurement frame) in "+ label); } //ResMFRphiwclus1 if(layerswitchResMFRphiwclus1) { layerMEs.meResMFRphiwclus1 = bookME1D(ibooker,"TH1ResMFRphiwclus1",hidmanager.createHistoLayer("Res_MF_wclus1_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate w=1"); - layerMEs.meResMFRphiwclus1->setAxisTitle(("Hit Residuals(x) (measurement frame) for w=1 in "+ label).c_str()); + layerMEs.meResMFRphiwclus1->setAxisTitle("Hit Residuals(x) (measurement frame) for w=1 in "+ label); } //ResMFRphiwclus2 if(layerswitchResMFRphiwclus2) { layerMEs.meResMFRphiwclus2 = bookME1D(ibooker,"TH1ResMFRphiwclus2",hidmanager.createHistoLayer("Res_MF_wclus2_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate w=2"); - layerMEs.meResMFRphiwclus2->setAxisTitle(("Hit Residuals(x) (measurement frame) for w=2 in "+ label).c_str()); + layerMEs.meResMFRphiwclus2->setAxisTitle("Hit Residuals(x) (measurement frame) for w=2 in "+ label); } //ResMFRphiwclus3 if(layerswitchResMFRphiwclus3) { layerMEs.meResMFRphiwclus3 = bookME1D(ibooker,"TH1ResMFRphiwclus3",hidmanager.createHistoLayer("Res_MF_wclus3_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate w=3"); - layerMEs.meResMFRphiwclus3->setAxisTitle(("Hit Residuals(x) (measurement frame) for w=3 in "+ label).c_str()); + layerMEs.meResMFRphiwclus3->setAxisTitle("Hit Residuals(x) (measurement frame) for w=3 in "+ label); } //ResMFRphiwclus4 if(layerswitchResMFRphiwclus4) { layerMEs.meResMFRphiwclus4 = bookME1D(ibooker,"TH1ResMFRphiwclus4",hidmanager.createHistoLayer("Res_MF_wclus4_Rphi","layer",label,"").c_str() ,"Residual of the hit x coordinate w=4"); - layerMEs.meResMFRphiwclus4->setAxisTitle(("Hit Residuals(x) (measurement frame) for w=4 in "+ label).c_str()); + layerMEs.meResMFRphiwclus4->setAxisTitle("Hit Residuals(x) (measurement frame) for w=4 in "+ label); } //PullLFRphi if(layerswitchPullLFRphi) { layerMEs.mePullLFRphi = bookME1D(ibooker,"TH1PullLFRphi", hidmanager.createHistoLayer("Pull_LF_rphi","layer",label,"").c_str() ,"Pull distribution"); - layerMEs.mePullLFRphi->setAxisTitle(("Pull distribution (local frame) in " + label).c_str()); + layerMEs.mePullLFRphi->setAxisTitle("Pull distribution (local frame) in " + label); } //PullMFRphi if(layerswitchPullMFRphi) { layerMEs.mePullMFRphi = bookME1D(ibooker,"TH1PullMFRphi", hidmanager.createHistoLayer("Pull_MF_rphi","layer",label,"").c_str() ,"Pull distribution"); - layerMEs.mePullMFRphi->setAxisTitle(("Pull distribution (measurement frame) in " + label).c_str()); + layerMEs.mePullMFRphi->setAxisTitle("Pull distribution (measurement frame) in " + label); } //PullMFRphiwclus1 if(layerswitchPullMFRphiwclus1) { layerMEs.mePullMFRphiwclus1 = bookME1D(ibooker,"TH1PullMFRphiwclus1", hidmanager.createHistoLayer("Pull_MF_wclus1_rphi","layer",label,"").c_str() ,"Pull distribution w=1"); - layerMEs.mePullMFRphiwclus1->setAxisTitle(("Pull distribution (measurement frame) for w=1 in " + label).c_str()); + layerMEs.mePullMFRphiwclus1->setAxisTitle("Pull distribution (measurement frame) for w=1 in " + label); } //PullMFRphiwclus2 if(layerswitchPullMFRphiwclus2) { layerMEs.mePullMFRphiwclus2 = bookME1D(ibooker,"TH1PullMFRphiwclus2", hidmanager.createHistoLayer("Pull_MF_wclus2_rphi","layer",label,"").c_str() ,"Pull distribution w=2"); - layerMEs.mePullMFRphiwclus2->setAxisTitle(("Pull distribution (measurement frame) for w=2 in " + label).c_str()); + layerMEs.mePullMFRphiwclus2->setAxisTitle("Pull distribution (measurement frame) for w=2 in " + label); } //PullMFRphiwclus3 if(layerswitchPullMFRphiwclus3) { layerMEs.mePullMFRphiwclus3 = bookME1D(ibooker,"TH1PullMFRphiwclus3", hidmanager.createHistoLayer("Pull_MF_wclus3_rphi","layer",label,"").c_str() ,"Pull distribution w=3"); - layerMEs.mePullMFRphiwclus3->setAxisTitle(("Pull distribution (measurement frame) for w=3 in " + label).c_str()); + layerMEs.mePullMFRphiwclus3->setAxisTitle("Pull distribution (measurement frame) for w=3 in " + label); } //PullMFRphiwclus4 if(layerswitchPullMFRphiwclus4) { layerMEs.mePullMFRphiwclus4 = bookME1D(ibooker,"TH1PullMFRphiwclus4", hidmanager.createHistoLayer("Pull_MF_wclus4_rphi","layer",label,"").c_str() ,"Pull distribution w=4"); - layerMEs.mePullMFRphiwclus4->setAxisTitle(("Pull distribution (measurement frame) for w=4 in " + label).c_str()); + layerMEs.mePullMFRphiwclus4->setAxisTitle("Pull distribution (measurement frame) for w=4 in " + label); } if(layerswitchTrackangleRphi) { layerMEs.meTrackangleRphi = bookME1D(ibooker,"TH1TrackangleRphi",hidmanager.createHistoLayer("Track_angle_Rphi","layer",label,"").c_str() ,"Track angle alpha"); - layerMEs.meTrackangleRphi->setAxisTitle(("Track angle in "+ label).c_str()); + layerMEs.meTrackangleRphi->setAxisTitle("Track angle in "+ label); } if(layerswitchTrackanglebetaRphi) { layerMEs.meTrackanglebetaRphi = bookME1D(ibooker,"TH1TrackanglebetaRphi",hidmanager.createHistoLayer("Track_angle_beta_Rphi","layer",label,"").c_str() ,"Track angle beta"); - layerMEs.meTrackanglebetaRphi->setAxisTitle((""+ label).c_str()); + layerMEs.meTrackanglebetaRphi->setAxisTitle(""+ label); } if(layerswitchTrackangle2Rphi) { layerMEs.meTrackangle2Rphi = bookME1D(ibooker,"TH1Trackangle2Rphi",hidmanager.createHistoLayer("Track_angle2_Rphi","layer",label,"").c_str() ,""); - layerMEs.meTrackangle2Rphi->setAxisTitle((""+ label).c_str()); + layerMEs.meTrackangle2Rphi->setAxisTitle(""+ label); } if(layerswitchPullTrackangleProfileRphi) { layerMEs.mePullTrackangleProfileRphi = bookMEProfile(ibooker,"TProfPullTrackangleProfileRphi",hidmanager.createHistoLayer("Pull_Trackangle_Profile_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track angle alpha"); - layerMEs.mePullTrackangleProfileRphi->setAxisTitle(("Track angle alpha in "+ label).c_str(),1); - layerMEs.mePullTrackangleProfileRphi->setAxisTitle(("Pull (MF) in "+ label).c_str(),2); + layerMEs.mePullTrackangleProfileRphi->setAxisTitle("Track angle alpha in "+ label,1); + layerMEs.mePullTrackangleProfileRphi->setAxisTitle("Pull (MF) in "+ label,2); } if(layerswitchPullTrackangle2DRphi) { layerMEs.mePullTrackangle2DRphi = bookME1D(ibooker,"TH1PullTrackangle2DRphi",hidmanager.createHistoLayer("Pull_Trackangle_2D_Rphi","layer",label,"").c_str() ,""); - layerMEs.mePullTrackangle2DRphi->setAxisTitle((""+ label).c_str()); + layerMEs.mePullTrackangle2DRphi->setAxisTitle(""+ label); } if(layerswitchTrackwidthRphi) { layerMEs.meTrackwidthRphi = bookME1D(ibooker,"TH1TrackwidthRphi",hidmanager.createHistoLayer("Track_width_Rphi","layer",label,"").c_str() ,"Track width"); - layerMEs.meTrackwidthRphi->setAxisTitle(("Track width in "+ label).c_str()); + layerMEs.meTrackwidthRphi->setAxisTitle("Track width in "+ label); } if(layerswitchExpectedwidthRphi) { layerMEs.meExpectedwidthRphi = bookME1D(ibooker,"TH1ExpectedwidthRphi",hidmanager.createHistoLayer("Expected_width_Rphi","layer",label,"").c_str() ,"Expected width"); - layerMEs.meExpectedwidthRphi->setAxisTitle(("Expected width in "+ label).c_str()); + layerMEs.meExpectedwidthRphi->setAxisTitle("Expected width in "+ label); } if(layerswitchClusterwidthRphi) { layerMEs.meClusterwidthRphi = bookME1D(ibooker,"TH1ClusterwidthRphi",hidmanager.createHistoLayer("Cluster_width_Rphi","layer",label,"").c_str() ,"Cluster width"); - layerMEs.meClusterwidthRphi->setAxisTitle(("Cluster width in "+ label).c_str()); + layerMEs.meClusterwidthRphi->setAxisTitle("Cluster width in "+ label); } if(layerswitchCategoryRphi) { layerMEs.meCategoryRphi = bookME1D(ibooker,"TH1CategoryRphi",hidmanager.createHistoLayer("Category_Rphi","layer",label,"").c_str() ,"Category"); - layerMEs.meCategoryRphi->setAxisTitle(("Category in "+ label).c_str()); + layerMEs.meCategoryRphi->setAxisTitle("Category in "+ label); } if(layerswitchPullTrackwidthProfileRphi) { layerMEs.mePullTrackwidthProfileRphi = bookMEProfile(ibooker,"TProfPullTrackwidthProfileRphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width"); - layerMEs.mePullTrackwidthProfileRphi->setAxisTitle(("track width in "+ label).c_str(),1); - layerMEs.mePullTrackwidthProfileRphi->setAxisTitle(("Pull (MF) in "+ label).c_str(),2); + layerMEs.mePullTrackwidthProfileRphi->setAxisTitle("track width in "+ label,1); + layerMEs.mePullTrackwidthProfileRphi->setAxisTitle("Pull (MF) in "+ label,2); } if(layerswitchPullTrackwidthProfileRphiwclus1) { layerMEs.mePullTrackwidthProfileRphiwclus1 = bookMEProfile(ibooker,"TProfPullTrackwidthProfileRphiwclus1",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus1","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for w=1"); - layerMEs.mePullTrackwidthProfileRphiwclus1->setAxisTitle(("track width for w=1 in "+ label).c_str(),1); - layerMEs.mePullTrackwidthProfileRphiwclus1->setAxisTitle(("Pull (MF) for w=1 in "+ label).c_str(),2); + layerMEs.mePullTrackwidthProfileRphiwclus1->setAxisTitle("track width for w=1 in "+ label,1); + layerMEs.mePullTrackwidthProfileRphiwclus1->setAxisTitle("Pull (MF) for w=1 in "+ label,2); } if(layerswitchPullTrackwidthProfileRphiwclus2) { layerMEs.mePullTrackwidthProfileRphiwclus2 = bookMEProfile(ibooker,"TProfPullTrackwidthProfileRphiwclus2",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus2","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for w=2"); - layerMEs.mePullTrackwidthProfileRphiwclus2->setAxisTitle(("track width for w=2 in "+ label).c_str(),1); - layerMEs.mePullTrackwidthProfileRphiwclus2->setAxisTitle(("Pull (MF) for w=2 in "+ label).c_str(),2); + layerMEs.mePullTrackwidthProfileRphiwclus2->setAxisTitle("track width for w=2 in "+ label,1); + layerMEs.mePullTrackwidthProfileRphiwclus2->setAxisTitle("Pull (MF) for w=2 in "+ label,2); } if(layerswitchPullTrackwidthProfileRphiwclus3) { layerMEs.mePullTrackwidthProfileRphiwclus3 = bookMEProfile(ibooker,"TProfPullTrackwidthProfileRphiwclus3",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus3","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for w=3"); - layerMEs.mePullTrackwidthProfileRphiwclus3->setAxisTitle(("track width for w=3 in "+ label).c_str(),1); - layerMEs.mePullTrackwidthProfileRphiwclus3->setAxisTitle(("Pull (MF) for w=3 in "+ label).c_str(),2); + layerMEs.mePullTrackwidthProfileRphiwclus3->setAxisTitle("track width for w=3 in "+ label,1); + layerMEs.mePullTrackwidthProfileRphiwclus3->setAxisTitle("Pull (MF) for w=3 in "+ label,2); } if(layerswitchPullTrackwidthProfileRphiwclus4) { layerMEs.mePullTrackwidthProfileRphiwclus4 = bookMEProfile(ibooker,"TProfPullTrackwidthProfileRphiwclus4",hidmanager.createHistoLayer("Pull_Track_width_Profile_Rphi_wclus4","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for w=4"); - layerMEs.mePullTrackwidthProfileRphiwclus4->setAxisTitle(("track width for w=4 in "+ label).c_str(),1); - layerMEs.mePullTrackwidthProfileRphiwclus4->setAxisTitle(("Pull (MF) for w=4 in "+ label).c_str(),2); + layerMEs.mePullTrackwidthProfileRphiwclus4->setAxisTitle("track width for w=4 in "+ label,1); + layerMEs.mePullTrackwidthProfileRphiwclus4->setAxisTitle("Pull (MF) for w=4 in "+ label,2); } if(layerswitchPullTrackwidthProfileCategory1Rphi) { layerMEs.mePullTrackwidthProfileCategory1Rphi = bookMEProfile(ibooker,"TProfPullTrackwidthProfileCategory1Rphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category1_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for Category 1"); - layerMEs.mePullTrackwidthProfileCategory1Rphi->setAxisTitle(("track width for Category 1 in "+ label).c_str(),1); - layerMEs.mePullTrackwidthProfileCategory1Rphi->setAxisTitle(("Pull (MF) for Category 1 in "+ label).c_str(),2); + layerMEs.mePullTrackwidthProfileCategory1Rphi->setAxisTitle("track width for Category 1 in "+ label,1); + layerMEs.mePullTrackwidthProfileCategory1Rphi->setAxisTitle("Pull (MF) for Category 1 in "+ label,2); } if(layerswitchPullTrackwidthProfileCategory2Rphi) { layerMEs.mePullTrackwidthProfileCategory2Rphi = bookMEProfile(ibooker,"TProfPullTrackwidthProfileCategory2Rphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category2_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for Category 2"); - layerMEs.mePullTrackwidthProfileCategory2Rphi->setAxisTitle(("track width for Category 2 in "+ label).c_str(),1); - layerMEs.mePullTrackwidthProfileCategory2Rphi->setAxisTitle(("Pull (MF) for Category 2 in "+ label).c_str(),2); + layerMEs.mePullTrackwidthProfileCategory2Rphi->setAxisTitle("track width for Category 2 in "+ label,1); + layerMEs.mePullTrackwidthProfileCategory2Rphi->setAxisTitle("Pull (MF) for Category 2 in "+ label,2); } if(layerswitchPullTrackwidthProfileCategory3Rphi) { layerMEs.mePullTrackwidthProfileCategory3Rphi = bookMEProfile(ibooker,"TProfPullTrackwidthProfileCategory3Rphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category3_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for Category 3"); - layerMEs.mePullTrackwidthProfileCategory3Rphi->setAxisTitle(("track width for Category 3 in "+ label).c_str(),1); - layerMEs.mePullTrackwidthProfileCategory3Rphi->setAxisTitle(("Pull (MF) for Category 3 in "+ label).c_str(),2); + layerMEs.mePullTrackwidthProfileCategory3Rphi->setAxisTitle("track width for Category 3 in "+ label,1); + layerMEs.mePullTrackwidthProfileCategory3Rphi->setAxisTitle("Pull (MF) for Category 3 in "+ label,2); } if(layerswitchPullTrackwidthProfileCategory4Rphi) { layerMEs.mePullTrackwidthProfileCategory4Rphi = bookMEProfile(ibooker,"TProfPullTrackwidthProfileCategory4Rphi",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category4_Rphi","layer",label,"").c_str() ,"Profile of Pull in MF vs track width for Category 4"); - layerMEs.mePullTrackwidthProfileCategory4Rphi->setAxisTitle(("track width for Category 4 in "+ label).c_str(),1); - layerMEs.mePullTrackwidthProfileCategory4Rphi->setAxisTitle(("Pull (MF) for Category 4 in "+ label).c_str(),2); + layerMEs.mePullTrackwidthProfileCategory4Rphi->setAxisTitle("track width for Category 4 in "+ label,1); + layerMEs.mePullTrackwidthProfileCategory4Rphi->setAxisTitle("Pull (MF) for Category 4 in "+ label,2); } if(layerswitchResolxMFTrackwidthProfileRphi) { layerMEs.meResolxMFTrackwidthProfileRphi = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileRphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width"); - layerMEs.meResolxMFTrackwidthProfileRphi->setAxisTitle(("track width in "+ label).c_str(),1); - layerMEs.meResolxMFTrackwidthProfileRphi->setAxisTitle(("Resolution in MF in "+ label).c_str(),2); + layerMEs.meResolxMFTrackwidthProfileRphi->setAxisTitle("track width in "+ label,1); + layerMEs.meResolxMFTrackwidthProfileRphi->setAxisTitle("Resolution in MF in "+ label,2); } if(layerswitchResolxMFTrackwidthProfileWclus1Rphi) { layerMEs.meResolxMFTrackwidthProfileWclus1Rphi = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileWclus1Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus1_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for w=1"); - layerMEs.meResolxMFTrackwidthProfileWclus1Rphi->setAxisTitle(("track width for w=1 in "+ label).c_str(),1); - layerMEs.meResolxMFTrackwidthProfileWclus1Rphi->setAxisTitle(("Resolution in MF for w=1 in "+ label).c_str(),2); + layerMEs.meResolxMFTrackwidthProfileWclus1Rphi->setAxisTitle("track width for w=1 in "+ label,1); + layerMEs.meResolxMFTrackwidthProfileWclus1Rphi->setAxisTitle("Resolution in MF for w=1 in "+ label,2); } if(layerswitchResolxMFTrackwidthProfileWclus2Rphi) { layerMEs.meResolxMFTrackwidthProfileWclus2Rphi = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileWclus2Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus2_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for w=2"); - layerMEs.meResolxMFTrackwidthProfileWclus2Rphi->setAxisTitle(("track width for w=2 in "+ label).c_str(),1); - layerMEs.meResolxMFTrackwidthProfileWclus2Rphi->setAxisTitle(("Resolution in MF for w=2 in "+ label).c_str(),2); + layerMEs.meResolxMFTrackwidthProfileWclus2Rphi->setAxisTitle("track width for w=2 in "+ label,1); + layerMEs.meResolxMFTrackwidthProfileWclus2Rphi->setAxisTitle("Resolution in MF for w=2 in "+ label,2); } if(layerswitchResolxMFTrackwidthProfileWclus3Rphi) { layerMEs.meResolxMFTrackwidthProfileWclus3Rphi = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileWclus3Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus3_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for w=3"); - layerMEs.meResolxMFTrackwidthProfileWclus3Rphi->setAxisTitle(("track width for w=3 in "+ label).c_str(),1); - layerMEs.meResolxMFTrackwidthProfileWclus3Rphi->setAxisTitle(("Resolution in MF for w=3 in "+ label).c_str(),2); + layerMEs.meResolxMFTrackwidthProfileWclus3Rphi->setAxisTitle("track width for w=3 in "+ label,1); + layerMEs.meResolxMFTrackwidthProfileWclus3Rphi->setAxisTitle("Resolution in MF for w=3 in "+ label,2); } if(layerswitchResolxMFTrackwidthProfileWclus4Rphi) { layerMEs.meResolxMFTrackwidthProfileWclus4Rphi = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileWclus4Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Wclus4_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for w=4"); - layerMEs.meResolxMFTrackwidthProfileWclus4Rphi->setAxisTitle(("track width for w=4 in "+ label).c_str(),1); - layerMEs.meResolxMFTrackwidthProfileWclus4Rphi->setAxisTitle(("Resolution in MF for w=4 in "+ label).c_str(),2); + layerMEs.meResolxMFTrackwidthProfileWclus4Rphi->setAxisTitle("track width for w=4 in "+ label,1); + layerMEs.meResolxMFTrackwidthProfileWclus4Rphi->setAxisTitle("Resolution in MF for w=4 in "+ label,2); } if(layerswitchResMFTrackwidthProfileWclus1Rphi) { layerMEs.meResMFTrackwidthProfileWclus1Rphi = bookMEProfile(ibooker,"TProfResMFTrackwidthProfileWclus1Rphi",hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus1_Rphi","layer",label,"").c_str() ,"Profile of Residuals(x) in MF vs track width for w=1"); - layerMEs.meResMFTrackwidthProfileWclus1Rphi->setAxisTitle(("track width for w=1 in "+ label).c_str(),1); - layerMEs.meResMFTrackwidthProfileWclus1Rphi->setAxisTitle(("Residuals(x) in MF for w=1 in "+ label).c_str(),2); + layerMEs.meResMFTrackwidthProfileWclus1Rphi->setAxisTitle("track width for w=1 in "+ label,1); + layerMEs.meResMFTrackwidthProfileWclus1Rphi->setAxisTitle("Residuals(x) in MF for w=1 in "+ label,2); } if(layerswitchResMFTrackwidthProfileWclus2Rphi) { layerMEs.meResMFTrackwidthProfileWclus2Rphi = bookMEProfile(ibooker,"TProfResMFTrackwidthProfileWclus2Rphi",hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus2_Rphi","layer",label,"").c_str() ,"Profile of Residuals(x) in MF vs track width for w=2"); - layerMEs.meResMFTrackwidthProfileWclus2Rphi->setAxisTitle(("track width for w=2 in "+ label).c_str(),1); - layerMEs.meResMFTrackwidthProfileWclus2Rphi->setAxisTitle(("Residuals(x) in MF for w=2 in "+ label).c_str(),2); + layerMEs.meResMFTrackwidthProfileWclus2Rphi->setAxisTitle("track width for w=2 in "+ label,1); + layerMEs.meResMFTrackwidthProfileWclus2Rphi->setAxisTitle("Residuals(x) in MF for w=2 in "+ label,2); } if(layerswitchResMFTrackwidthProfileWclus3Rphi) { layerMEs.meResMFTrackwidthProfileWclus3Rphi = bookMEProfile(ibooker,"TProfResMFTrackwidthProfileWclus3Rphi",hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus3_Rphi","layer",label,"").c_str() ,"Profile of Residuals(x) in MF vs track width for w=3"); - layerMEs.meResMFTrackwidthProfileWclus3Rphi->setAxisTitle(("track width for w=3 in "+ label).c_str(),1); - layerMEs.meResMFTrackwidthProfileWclus3Rphi->setAxisTitle(("Residuals(x) in MF for w=3 in "+ label).c_str(),2); + layerMEs.meResMFTrackwidthProfileWclus3Rphi->setAxisTitle("track width for w=3 in "+ label,1); + layerMEs.meResMFTrackwidthProfileWclus3Rphi->setAxisTitle("Residuals(x) in MF for w=3 in "+ label,2); } if(layerswitchResMFTrackwidthProfileWclus4Rphi) { layerMEs.meResMFTrackwidthProfileWclus4Rphi = bookMEProfile(ibooker,"TProfResMFTrackwidthProfileWclus4Rphi",hidmanager.createHistoLayer("ResMF_Track_width_Profile_Wclus4_Rphi","layer",label,"").c_str() ,"Profile of Residuals(x) in MF vs track width for w=4"); - layerMEs.meResMFTrackwidthProfileWclus4Rphi->setAxisTitle(("track width for w=4 in "+ label).c_str(),1); - layerMEs.meResMFTrackwidthProfileWclus4Rphi->setAxisTitle(("Residuals(x) in MF for w=4 in "+ label).c_str(),2); + layerMEs.meResMFTrackwidthProfileWclus4Rphi->setAxisTitle("track width for w=4 in "+ label,1); + layerMEs.meResMFTrackwidthProfileWclus4Rphi->setAxisTitle("Residuals(x) in MF for w=4 in "+ label,2); } if(layerswitchResolxMFTrackwidthProfileCategory1Rphi) { layerMEs.meResolxMFTrackwidthProfileCategory1Rphi = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileCategory1Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category1_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for Category 1"); - layerMEs.meResolxMFTrackwidthProfileCategory1Rphi->setAxisTitle(("track width for Category 1 in "+ label).c_str(),1); - layerMEs.meResolxMFTrackwidthProfileCategory1Rphi->setAxisTitle(("Resolution in MF for Category 1 in "+ label).c_str(),2); + layerMEs.meResolxMFTrackwidthProfileCategory1Rphi->setAxisTitle("track width for Category 1 in "+ label,1); + layerMEs.meResolxMFTrackwidthProfileCategory1Rphi->setAxisTitle("Resolution in MF for Category 1 in "+ label,2); } if(layerswitchResolxMFTrackwidthProfileCategory2Rphi) { layerMEs.meResolxMFTrackwidthProfileCategory2Rphi = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileCategory2Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category2_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for Category 2"); - layerMEs.meResolxMFTrackwidthProfileCategory2Rphi->setAxisTitle(("track width for Category 2 in "+ label).c_str(),1); - layerMEs.meResolxMFTrackwidthProfileCategory2Rphi->setAxisTitle(("Resolution in MF for Category 2 in "+ label).c_str(),2); + layerMEs.meResolxMFTrackwidthProfileCategory2Rphi->setAxisTitle("track width for Category 2 in "+ label,1); + layerMEs.meResolxMFTrackwidthProfileCategory2Rphi->setAxisTitle("Resolution in MF for Category 2 in "+ label,2); } if(layerswitchResolxMFTrackwidthProfileCategory3Rphi) { layerMEs.meResolxMFTrackwidthProfileCategory3Rphi = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileCategory3Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category3_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for Category 3"); - layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle(("track width for Category 3 in "+ label).c_str(),1); - layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle(("Resolution in MF for Category 3 in "+ label).c_str(),2); + layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle("track width for Category 3 in "+ label,1); + layerMEs.meResolxMFTrackwidthProfileCategory3Rphi->setAxisTitle("Resolution in MF for Category 3 in "+ label,2); } if(layerswitchResolxMFTrackwidthProfileCategory4Rphi) { layerMEs.meResolxMFTrackwidthProfileCategory4Rphi = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileCategory4Rphi",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category3_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width for Category 4"); - layerMEs.meResolxMFTrackwidthProfileCategory4Rphi->setAxisTitle(("track width for Category 4 in "+ label).c_str(),1); - layerMEs.meResolxMFTrackwidthProfileCategory4Rphi->setAxisTitle(("Resolution in MF for Category 4 in "+ label).c_str(),2); + layerMEs.meResolxMFTrackwidthProfileCategory4Rphi->setAxisTitle("track width for Category 4 in "+ label,1); + layerMEs.meResolxMFTrackwidthProfileCategory4Rphi->setAxisTitle("Resolution in MF for Category 4 in "+ label,2); } if(layerswitchResolxMFClusterwidthProfileCategory1Rphi) { layerMEs.meResolxMFClusterwidthProfileCategory1Rphi = bookMEProfile(ibooker,"TProfResolxMFClusterwidthProfileCategory1Rphi",hidmanager.createHistoLayer("ResolxMF_Cluster_width_Profile_Category1_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs cluster width for Category 1"); - layerMEs.meResolxMFClusterwidthProfileCategory1Rphi->setAxisTitle(("cluster width for Category 1 in "+ label).c_str(),1); - layerMEs.meResolxMFClusterwidthProfileCategory1Rphi->setAxisTitle(("Resolution in MF for Category 1 in "+ label).c_str(),2); + layerMEs.meResolxMFClusterwidthProfileCategory1Rphi->setAxisTitle("cluster width for Category 1 in "+ label,1); + layerMEs.meResolxMFClusterwidthProfileCategory1Rphi->setAxisTitle("Resolution in MF for Category 1 in "+ label,2); } if(layerswitchResolxMFAngleProfileRphi) { layerMEs.meResolxMFAngleProfileRphi = bookMEProfile(ibooker,"TProfResolxMFAngleProfileRphi",hidmanager.createHistoLayer("ResolxMF_Angle_Profile_Rphi","layer",label,"").c_str() ,"Profile of Resolution in MF vs track angle alpha"); - layerMEs.meResolxMFAngleProfileRphi->setAxisTitle(("track angle alpha in "+ label).c_str(),1); - layerMEs.meResolxMFAngleProfileRphi->setAxisTitle(("Resolution in MF in "+ label).c_str(),2); + layerMEs.meResolxMFAngleProfileRphi->setAxisTitle("track angle alpha in "+ label,1); + layerMEs.meResolxMFAngleProfileRphi->setAxisTitle("Resolution in MF in "+ label,2); } if(layerswitchrapidityResProfilewclus1) { layerMEs.merapidityResProfilewclus1 = bookMEProfile(ibooker,"TProfrapidityResProfilewclus1",hidmanager.createHistoLayer("rapidity_Res_Profile_wclus1","layer",label,"").c_str() ,"Profile of rapidity vs Res for w=1"); - layerMEs.merapidityResProfilewclus1->setAxisTitle(("Res for w=1 in "+ label).c_str(),1); - layerMEs.merapidityResProfilewclus1->setAxisTitle(("rapidity for w=1 in "+ label).c_str(),2); + layerMEs.merapidityResProfilewclus1->setAxisTitle("Res for w=1 in "+ label,1); + layerMEs.merapidityResProfilewclus1->setAxisTitle("rapidity for w=1 in "+ label,2); } if(layerswitchrapidityResProfilewclus2) { layerMEs.merapidityResProfilewclus2 = bookMEProfile(ibooker,"TProfrapidityResProfilewclus2",hidmanager.createHistoLayer("rapidity_Res_Profile_wclus2","layer",label,"").c_str() ,"Profile of rapidity vs Res for w=2"); - layerMEs.merapidityResProfilewclus2->setAxisTitle(("Res for w=2 in "+ label).c_str(),1); - layerMEs.merapidityResProfilewclus2->setAxisTitle(("rapidity for w=2 in "+ label).c_str(),2); + layerMEs.merapidityResProfilewclus2->setAxisTitle("Res for w=2 in "+ label,1); + layerMEs.merapidityResProfilewclus2->setAxisTitle("rapidity for w=2 in "+ label,2); } if(layerswitchrapidityResProfilewclus3) { layerMEs.merapidityResProfilewclus3 = bookMEProfile(ibooker,"TProfrapidityResProfilewclus3",hidmanager.createHistoLayer("rapidity_Res_Profile_wclus3","layer",label,"").c_str() ,"Profile of rapidity vs Res for w=3"); - layerMEs.merapidityResProfilewclus3->setAxisTitle(("Res for w=3 in "+ label).c_str(),1); - layerMEs.merapidityResProfilewclus3->setAxisTitle(("rapidity for w=3 in "+ label).c_str(),2); + layerMEs.merapidityResProfilewclus3->setAxisTitle("Res for w=3 in "+ label,1); + layerMEs.merapidityResProfilewclus3->setAxisTitle("rapidity for w=3 in "+ label,2); } if(layerswitchrapidityResProfilewclus4) { layerMEs.merapidityResProfilewclus4 = bookMEProfile(ibooker,"TProfrapidityResProfilewclus4",hidmanager.createHistoLayer("rapidity_Res_Profile_wclus4","layer",label,"").c_str() ,"Profile of rapidity vs Res for w=4"); - layerMEs.merapidityResProfilewclus4->setAxisTitle(("Res for w=4 in "+ label).c_str(),1); - layerMEs.merapidityResProfilewclus4->setAxisTitle(("rapidity for w=4 in "+ label).c_str(),2); + layerMEs.merapidityResProfilewclus4->setAxisTitle("Res for w=4 in "+ label,1); + layerMEs.merapidityResProfilewclus4->setAxisTitle("rapidity for w=4 in "+ label,2); } @@ -1862,202 +1862,202 @@ void SiStripTrackingRecHitsValid::createStereoAndMatchedMEs(DQMStore::IBooker & SiStripHistoId hidmanager; StereoAndMatchedMEs stereoandmatchedMEs; - stereoandmatchedMEs.meWclusSas = 0; - stereoandmatchedMEs.meAdcSas = 0; - stereoandmatchedMEs.meResolxLFSas = 0; - stereoandmatchedMEs.meResolxMFSas = 0; - stereoandmatchedMEs.meResLFSas = 0; - stereoandmatchedMEs.meResMFSas = 0; - stereoandmatchedMEs.mePullLFSas = 0; - stereoandmatchedMEs.mePullMFSas = 0; - stereoandmatchedMEs.meTrackangleSas = 0; - stereoandmatchedMEs.meTrackanglebetaSas = 0; - stereoandmatchedMEs.mePullTrackangleProfileSas = 0; - stereoandmatchedMEs.meTrackwidthSas = 0; - stereoandmatchedMEs.meExpectedwidthSas = 0; - stereoandmatchedMEs.meClusterwidthSas = 0; - stereoandmatchedMEs.meCategorySas = 0; - stereoandmatchedMEs.mePullTrackwidthProfileSas = 0; - stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas = 0; - stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas = 0; - stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas = 0; - stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas = 0; - stereoandmatchedMEs.meResolxMFTrackwidthProfileSas = 0; - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas = 0; - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas = 0; - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas = 0; - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas = 0; - stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas = 0; - stereoandmatchedMEs.meResolxMFAngleProfileSas = 0; - - stereoandmatchedMEs.mePosxMatched = 0; - stereoandmatchedMEs.mePosyMatched = 0; - stereoandmatchedMEs.meResolxMatched = 0; - stereoandmatchedMEs.meResolyMatched = 0; - stereoandmatchedMEs.meResxMatched = 0; - stereoandmatchedMEs.meResyMatched = 0; - stereoandmatchedMEs.mePullxMatched = 0; - stereoandmatchedMEs.mePullyMatched = 0; + stereoandmatchedMEs.meWclusSas = nullptr; + stereoandmatchedMEs.meAdcSas = nullptr; + stereoandmatchedMEs.meResolxLFSas = nullptr; + stereoandmatchedMEs.meResolxMFSas = nullptr; + stereoandmatchedMEs.meResLFSas = nullptr; + stereoandmatchedMEs.meResMFSas = nullptr; + stereoandmatchedMEs.mePullLFSas = nullptr; + stereoandmatchedMEs.mePullMFSas = nullptr; + stereoandmatchedMEs.meTrackangleSas = nullptr; + stereoandmatchedMEs.meTrackanglebetaSas = nullptr; + stereoandmatchedMEs.mePullTrackangleProfileSas = nullptr; + stereoandmatchedMEs.meTrackwidthSas = nullptr; + stereoandmatchedMEs.meExpectedwidthSas = nullptr; + stereoandmatchedMEs.meClusterwidthSas = nullptr; + stereoandmatchedMEs.meCategorySas = nullptr; + stereoandmatchedMEs.mePullTrackwidthProfileSas = nullptr; + stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas = nullptr; + stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas = nullptr; + stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas = nullptr; + stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas = nullptr; + stereoandmatchedMEs.meResolxMFTrackwidthProfileSas = nullptr; + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas = nullptr; + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas = nullptr; + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas = nullptr; + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas = nullptr; + stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas = nullptr; + stereoandmatchedMEs.meResolxMFAngleProfileSas = nullptr; + + stereoandmatchedMEs.mePosxMatched = nullptr; + stereoandmatchedMEs.mePosyMatched = nullptr; + stereoandmatchedMEs.meResolxMatched = nullptr; + stereoandmatchedMEs.meResolyMatched = nullptr; + stereoandmatchedMEs.meResxMatched = nullptr; + stereoandmatchedMEs.meResyMatched = nullptr; + stereoandmatchedMEs.mePullxMatched = nullptr; + stereoandmatchedMEs.mePullyMatched = nullptr; //WclusSas if(layerswitchWclusSas) { stereoandmatchedMEs.meWclusSas = bookME1D(ibooker,"TH1WclusSas", hidmanager.createHistoLayer("Wclus_sas","layer",label,"").c_str() ,"Cluster Width - Number of strips that belong to the RecHit cluster"); - stereoandmatchedMEs.meWclusSas->setAxisTitle(("Cluster Width [nr strips] (stereo) in "+ label).c_str()); + stereoandmatchedMEs.meWclusSas->setAxisTitle("Cluster Width [nr strips] (stereo) in "+ label); } //AdcSas if(layerswitchAdcSas) { stereoandmatchedMEs.meAdcSas = bookME1D(ibooker,"TH1AdcSas", hidmanager.createHistoLayer("Adc_sas","layer",label,"").c_str() ,"RecHit Cluster Charge"); - stereoandmatchedMEs.meAdcSas->setAxisTitle(("cluster charge [ADC] (stereo) in " + label).c_str()); + stereoandmatchedMEs.meAdcSas->setAxisTitle("cluster charge [ADC] (stereo) in " + label); } //ResolxLFSas if(layerswitchResolxLFSas) { stereoandmatchedMEs.meResolxLFSas = bookME1D(ibooker,"TH1ResolxLFSas", hidmanager.createHistoLayer("Resolx_LF_sas","layer",label,"").c_str() ,"RecHit resol(x) coord."); - stereoandmatchedMEs.meResolxLFSas->setAxisTitle(("resol(x) RecHit coord. (local frame) (stereo) in " + label).c_str()); + stereoandmatchedMEs.meResolxLFSas->setAxisTitle("resol(x) RecHit coord. (local frame) (stereo) in " + label); } //ResolxMFSas if(layerswitchResolxMFSas) { stereoandmatchedMEs.meResolxMFSas = bookME1D(ibooker,"TH1ResolxMFSas", hidmanager.createHistoLayer("Resolx_MF_sas","layer",label,"").c_str() ,"RecHit resol(x) coord."); - stereoandmatchedMEs.meResolxMFSas->setAxisTitle(("resol(x) RecHit coord. (measurement frame) (stereo) in " + label).c_str()); + stereoandmatchedMEs.meResolxMFSas->setAxisTitle("resol(x) RecHit coord. (measurement frame) (stereo) in " + label); } //ResLFSas if(layerswitchResLFSas) { stereoandmatchedMEs.meResLFSas = bookME1D(ibooker,"TH1ResLFSas", hidmanager.createHistoLayer("Res_LF_sas","layer",label,"").c_str() ,"Residual of the hit x coordinate"); - stereoandmatchedMEs.meResLFSas->setAxisTitle(("Hit Residuals(x) (local frame) (stereo) in " + label).c_str()); + stereoandmatchedMEs.meResLFSas->setAxisTitle("Hit Residuals(x) (local frame) (stereo) in " + label); } //ResMFSas if(layerswitchResMFSas) { stereoandmatchedMEs.meResMFSas = bookME1D(ibooker,"TH1ResMFSas", hidmanager.createHistoLayer("Res_MF_sas","layer",label,"").c_str() ,"Residual of the hit x coordinate"); - stereoandmatchedMEs.meResMFSas->setAxisTitle(("Hit Residuals(x) (stereo) in " + label).c_str()); + stereoandmatchedMEs.meResMFSas->setAxisTitle("Hit Residuals(x) (stereo) in " + label); } //PullLFSas if(layerswitchPullLFSas) { stereoandmatchedMEs.mePullLFSas = bookME1D(ibooker,"TH1PullLFSas", hidmanager.createHistoLayer("Pull_LF_sas","layer",label,"").c_str() ,"Pull distribution"); - stereoandmatchedMEs.mePullLFSas->setAxisTitle(("Pull distribution (local frame) (stereo) in " + label).c_str()); + stereoandmatchedMEs.mePullLFSas->setAxisTitle("Pull distribution (local frame) (stereo) in " + label); } //PullMFSas if(layerswitchPullMFSas) { stereoandmatchedMEs.mePullMFSas = bookME1D(ibooker,"TH1PullMFSas", hidmanager.createHistoLayer("Pull_MF_sas","layer",label,"").c_str() ,"Pull distribution"); - stereoandmatchedMEs.mePullMFSas->setAxisTitle(("Pull distribution (measurement frame) (stereo) in " + label).c_str()); + stereoandmatchedMEs.mePullMFSas->setAxisTitle("Pull distribution (measurement frame) (stereo) in " + label); } if(layerswitchTrackangleSas) { stereoandmatchedMEs.meTrackangleSas = bookME1D(ibooker,"TH1TrackangleSas",hidmanager.createHistoLayer("Track_angle_Sas","layer",label,"").c_str() ,"Track angle"); - stereoandmatchedMEs.meTrackangleSas->setAxisTitle(("Track angle (stereo) in " + label).c_str()); + stereoandmatchedMEs.meTrackangleSas->setAxisTitle("Track angle (stereo) in " + label); } if(layerswitchTrackanglebetaSas) { stereoandmatchedMEs.meTrackanglebetaSas = bookME1D(ibooker,"TH1TrackanglebetaSas",hidmanager.createHistoLayer("Track_angle_beta_Sas","layer",label,"").c_str() ,"Track angle beta"); - stereoandmatchedMEs.meTrackanglebetaSas->setAxisTitle(("Track angle beta (stereo) in " + label).c_str()); + stereoandmatchedMEs.meTrackanglebetaSas->setAxisTitle("Track angle beta (stereo) in " + label); } if(layerswitchPullTrackangleProfileSas) { stereoandmatchedMEs.mePullTrackangleProfileSas = bookMEProfile(ibooker,"TProfPullTrackangleProfileSas",hidmanager.createHistoLayer("Pull_Track_angle_Profile_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track angle (stereo)"); - stereoandmatchedMEs.mePullTrackangleProfileSas->setAxisTitle(("track angle (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.mePullTrackangleProfileSas->setAxisTitle(("Pull in MF (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.mePullTrackangleProfileSas->setAxisTitle("track angle (stereo) in " + label,1); + stereoandmatchedMEs.mePullTrackangleProfileSas->setAxisTitle("Pull in MF (stereo) in " + label,2); } if(layerswitchTrackwidthSas) { stereoandmatchedMEs.meTrackwidthSas = bookME1D(ibooker,"TH1TrackwidthSas",hidmanager.createHistoLayer("Track_width_Sas","layer",label,"").c_str() ,"Track width"); - stereoandmatchedMEs.meTrackwidthSas->setAxisTitle(("Track width (stereo) in " + label).c_str()); + stereoandmatchedMEs.meTrackwidthSas->setAxisTitle("Track width (stereo) in " + label); } if(layerswitchExpectedwidthSas) { stereoandmatchedMEs.meExpectedwidthSas = bookME1D(ibooker,"TH1ExpectedwidthSas",hidmanager.createHistoLayer("Expected_width_Sas","layer",label,"").c_str() ,"Expected width"); - stereoandmatchedMEs.meExpectedwidthSas->setAxisTitle(("Expected width (stereo) in " + label).c_str()); + stereoandmatchedMEs.meExpectedwidthSas->setAxisTitle("Expected width (stereo) in " + label); } if(layerswitchClusterwidthSas) { stereoandmatchedMEs.meClusterwidthSas = bookME1D(ibooker,"TH1ClusterwidthSas",hidmanager.createHistoLayer("Cluster_width_Sas","layer",label,"").c_str() ,"Cluster width"); - stereoandmatchedMEs.meClusterwidthSas->setAxisTitle(("Cluster width (stereo) in " + label).c_str()); + stereoandmatchedMEs.meClusterwidthSas->setAxisTitle("Cluster width (stereo) in " + label); } if(layerswitchCategorySas) { stereoandmatchedMEs.meCategorySas = bookME1D(ibooker,"TH1CategorySas",hidmanager.createHistoLayer("Category_Sas","layer",label,"").c_str() ,"Category"); - stereoandmatchedMEs.meCategorySas->setAxisTitle(("Category (stereo) in " + label).c_str()); + stereoandmatchedMEs.meCategorySas->setAxisTitle("Category (stereo) in " + label); } if(layerswitchPullTrackwidthProfileSas) { stereoandmatchedMEs.mePullTrackwidthProfileSas = bookMEProfile(ibooker,"TProfPullTrackwidthProfileSas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (stereo)"); - stereoandmatchedMEs.mePullTrackwidthProfileSas->setAxisTitle(("track width (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.mePullTrackwidthProfileSas->setAxisTitle(("Pull in MF (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.mePullTrackwidthProfileSas->setAxisTitle("track width (stereo) in " + label,1); + stereoandmatchedMEs.mePullTrackwidthProfileSas->setAxisTitle("Pull in MF (stereo) in " + label,2); } if(layerswitchPullTrackwidthProfileCategory1Sas) { stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas = bookMEProfile(ibooker,"TProfPullTrackwidthProfileCategory1Sas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category1_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (Category 1) (stereo)"); - stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas->setAxisTitle(("track width (Category 1) (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas->setAxisTitle(("Pull in MF (Category 1) (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas->setAxisTitle("track width (Category 1) (stereo) in " + label,1); + stereoandmatchedMEs.mePullTrackwidthProfileCategory1Sas->setAxisTitle("Pull in MF (Category 1) (stereo) in " + label,2); } if(layerswitchPullTrackwidthProfileCategory2Sas) { stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas = bookMEProfile(ibooker,"TProfPullTrackwidthProfileCategory2Sas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category2_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (Category 2) (stereo)"); - stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas->setAxisTitle(("track width (Category 2) (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas->setAxisTitle(("Pull in MF (Category 2) (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas->setAxisTitle("track width (Category 2) (stereo) in " + label,1); + stereoandmatchedMEs.mePullTrackwidthProfileCategory2Sas->setAxisTitle("Pull in MF (Category 2) (stereo) in " + label,2); } if(layerswitchPullTrackwidthProfileCategory3Sas) { stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas = bookMEProfile(ibooker,"TProfPullTrackwidthProfileCategory3Sas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category3_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (Category 3) (stereo)"); - stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas->setAxisTitle(("track width (Category 3) (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas->setAxisTitle(("Pull in MF (Category 3) (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas->setAxisTitle("track width (Category 3) (stereo) in " + label,1); + stereoandmatchedMEs.mePullTrackwidthProfileCategory3Sas->setAxisTitle("Pull in MF (Category 3) (stereo) in " + label,2); } if(layerswitchPullTrackwidthProfileCategory4Sas) { stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas = bookMEProfile(ibooker,"TProfPullTrackwidthProfileCategory4Sas",hidmanager.createHistoLayer("Pull_Track_width_Profile_Category4_Sas","layer",label,"").c_str() ,"Profile of Pull in MF vs track width (Category 4) (stereo)"); - stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas->setAxisTitle(("track width (Category 4) (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas->setAxisTitle(("Pull in MF (Category 4) (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas->setAxisTitle("track width (Category 4) (stereo) in " + label,1); + stereoandmatchedMEs.mePullTrackwidthProfileCategory4Sas->setAxisTitle("Pull in MF (Category 4) (stereo) in " + label,2); } if(layerswitchResolxMFTrackwidthProfileSas) { stereoandmatchedMEs.meResolxMFTrackwidthProfileSas = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileSas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (stereo)"); - stereoandmatchedMEs.meResolxMFTrackwidthProfileSas->setAxisTitle(("track width (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.meResolxMFTrackwidthProfileSas->setAxisTitle(("Resolution in MF (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.meResolxMFTrackwidthProfileSas->setAxisTitle("track width (stereo) in " + label,1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileSas->setAxisTitle("Resolution in MF (stereo) in " + label,2); } if(layerswitchResolxMFTrackwidthProfileCategory1Sas) { stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileCategory1Sas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category1_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (Category 1) (stereo)"); - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas->setAxisTitle((" track width (Category 1) (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas->setAxisTitle((" Resolution in MF (Category 1) (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas->setAxisTitle(" track width (Category 1) (stereo) in " + label,1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory1Sas->setAxisTitle(" Resolution in MF (Category 1) (stereo) in " + label,2); } if(layerswitchResolxMFTrackwidthProfileCategory2Sas) { stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileCategory2Sas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category2_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (Category 2) (stereo)"); - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas->setAxisTitle((" track width (Category 2) (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas->setAxisTitle((" Resolution in MF (Category 2) (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas->setAxisTitle(" track width (Category 2) (stereo) in " + label,1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory2Sas->setAxisTitle(" Resolution in MF (Category 2) (stereo) in " + label,2); } if(layerswitchResolxMFTrackwidthProfileCategory3Sas) { stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileCategory3Sas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category3_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (Category 3) (stereo)"); - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas->setAxisTitle((" track width (Category 3) (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas->setAxisTitle((" Resolution in MF (Category 3) (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas->setAxisTitle(" track width (Category 3) (stereo) in " + label,1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory3Sas->setAxisTitle(" Resolution in MF (Category 3) (stereo) in " + label,2); } if(layerswitchResolxMFTrackwidthProfileCategory4Sas) { stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas = bookMEProfile(ibooker,"TProfResolxMFTrackwidthProfileCategory4Sas",hidmanager.createHistoLayer("ResolxMF_Track_width_Profile_Category4_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track width (Category 4) (stereo)"); - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas->setAxisTitle((" track width (Category 4) (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas->setAxisTitle((" Resolution in MF (Category 4) (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas->setAxisTitle(" track width (Category 4) (stereo) in " + label,1); + stereoandmatchedMEs.meResolxMFTrackwidthProfileCategory4Sas->setAxisTitle(" Resolution in MF (Category 4) (stereo) in " + label,2); } if(layerswitchResolxMFClusterwidthProfileCategory1Sas) { stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas = bookMEProfile(ibooker,"TProfResolxMFClusterwidthProfileCategory1Sas",hidmanager.createHistoLayer("ResolxMF_Cluster_width_Profile_Category1_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs cluster width (Category 1) (stereo)"); - stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas->setAxisTitle(("cluster width (Category 1) (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas->setAxisTitle((" Resolution in MF (Category 1) (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas->setAxisTitle("cluster width (Category 1) (stereo) in " + label,1); + stereoandmatchedMEs.meResolxMFClusterwidthProfileCategory1Sas->setAxisTitle(" Resolution in MF (Category 1) (stereo) in " + label,2); } if(layerswitchResolxMFAngleProfileSas) { stereoandmatchedMEs.meResolxMFAngleProfileSas = bookMEProfile(ibooker,"TProfResolxMFAngleProfileSas",hidmanager.createHistoLayer("ResolxMF_Angle_Profile_Sas","layer",label,"").c_str() ,"Profile of Resolution in MF vs track angle (stereo)"); - stereoandmatchedMEs.meResolxMFAngleProfileSas->setAxisTitle(("track angle (stereo) in " + label).c_str(),1); - stereoandmatchedMEs.meResolxMFAngleProfileSas->setAxisTitle(("Resolution in MF (stereo) in " + label).c_str(),2); + stereoandmatchedMEs.meResolxMFAngleProfileSas->setAxisTitle("track angle (stereo) in " + label,1); + stereoandmatchedMEs.meResolxMFAngleProfileSas->setAxisTitle("Resolution in MF (stereo) in " + label,2); } //PosxMatched if(layerswitchPosxMatched) { stereoandmatchedMEs.mePosxMatched = bookME1D(ibooker,"TH1PosxMatched", hidmanager.createHistoLayer("Posx_matched","layer",label,"").c_str() ,"RecHit x coord."); - stereoandmatchedMEs.mePosxMatched->setAxisTitle(("x coord. matched RecHit (local frame) in " + label).c_str()); + stereoandmatchedMEs.mePosxMatched->setAxisTitle("x coord. matched RecHit (local frame) in " + label); } //PosyMatched if(layerswitchPosyMatched) { stereoandmatchedMEs.mePosyMatched = bookME1D(ibooker,"TH1PosyMatched", hidmanager.createHistoLayer("Posy_matched","layer",label,"").c_str() ,"RecHit y coord."); - stereoandmatchedMEs.mePosyMatched->setAxisTitle(("y coord. matched RecHit (local frame) in " + label).c_str()); + stereoandmatchedMEs.mePosyMatched->setAxisTitle("y coord. matched RecHit (local frame) in " + label); } //ResolxMatched if(layerswitchResolxMatched) { stereoandmatchedMEs.meResolxMatched = bookME1D(ibooker,"TH1ResolxMatched", hidmanager.createHistoLayer("Resolx_matched","layer",label,"").c_str() ,"RecHit resol(x) coord."); - stereoandmatchedMEs.meResolxMatched->setAxisTitle(("resol(x) coord. matched RecHit (local frame) in " + label).c_str()); + stereoandmatchedMEs.meResolxMatched->setAxisTitle("resol(x) coord. matched RecHit (local frame) in " + label); } //ResolyMatched if(layerswitchResolyMatched) { stereoandmatchedMEs.meResolyMatched = bookME1D(ibooker,"TH1ResolyMatched", hidmanager.createHistoLayer("Resoly_matched","layer",label,"").c_str() ,"RecHit resol(y) coord."); - stereoandmatchedMEs.meResolyMatched->setAxisTitle(("resol(y) coord. matched RecHit (local frame) in " + label).c_str()); + stereoandmatchedMEs.meResolyMatched->setAxisTitle("resol(y) coord. matched RecHit (local frame) in " + label); } //ResxMatched if(layerswitchResxMatched) { stereoandmatchedMEs.meResxMatched = bookME1D(ibooker,"TH1ResxMatched", hidmanager.createHistoLayer("Resx_matched","layer",label,"").c_str() ,"Residual of the hit x coord."); - stereoandmatchedMEs.meResxMatched->setAxisTitle(("Residuals(x) in matched RecHit in " + label).c_str()); + stereoandmatchedMEs.meResxMatched->setAxisTitle("Residuals(x) in matched RecHit in " + label); } //ResyMatched if(layerswitchResyMatched) { stereoandmatchedMEs.meResyMatched = bookME1D(ibooker,"TH1ResyMatched", hidmanager.createHistoLayer("Resy_matched","layer",label,"").c_str() ,"Residual of the hit x coord."); - stereoandmatchedMEs.meResyMatched->setAxisTitle(("Res(y) in matched RecHit in " + label).c_str()); + stereoandmatchedMEs.meResyMatched->setAxisTitle("Res(y) in matched RecHit in " + label); } StereoAndMatchedMEsMap[label]=stereoandmatchedMEs; diff --git a/Validation/RecoVertex/bin/BSvsPVPlots.cc b/Validation/RecoVertex/bin/BSvsPVPlots.cc index a296e1b22548e..eb2dede2ea690 100644 --- a/Validation/RecoVertex/bin/BSvsPVPlots.cc +++ b/Validation/RecoVertex/bin/BSvsPVPlots.cc @@ -396,7 +396,7 @@ void BSvsPVPlots(const char* fullname,const char* module, const char* label, con gStyle->SetOptStat(1111); gStyle->SetOptFit(0); - if(runs.size()) { + if(!runs.empty()) { std::string plotfilename; plotfilename = outtrunk; diff --git a/Validation/RecoVertex/bin/PrimaryVertexPlots.cc b/Validation/RecoVertex/bin/PrimaryVertexPlots.cc index 3be5b58fef03b..6d0ca580eadff 100644 --- a/Validation/RecoVertex/bin/PrimaryVertexPlots.cc +++ b/Validation/RecoVertex/bin/PrimaryVertexPlots.cc @@ -742,7 +742,7 @@ void PrimaryVertexPlots(const char* fullname,const char* module, const char* pos } } - if(runs.size()) { + if(!runs.empty()) { std::string plotfilename; plotfilename = outtrunk; diff --git a/Validation/RecoVertex/interface/PrimaryVertexAnalyzer4PUSlimmed.h b/Validation/RecoVertex/interface/PrimaryVertexAnalyzer4PUSlimmed.h index f1bf162ab562b..84055211ede65 100644 --- a/Validation/RecoVertex/interface/PrimaryVertexAnalyzer4PUSlimmed.h +++ b/Validation/RecoVertex/interface/PrimaryVertexAnalyzer4PUSlimmed.h @@ -131,10 +131,10 @@ class PrimaryVertexAnalyzer4PUSlimmed : public DQMEDAnalyzer { public: explicit PrimaryVertexAnalyzer4PUSlimmed(const edm::ParameterSet&); - ~PrimaryVertexAnalyzer4PUSlimmed(); + ~PrimaryVertexAnalyzer4PUSlimmed() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; - virtual void bookHistograms(DQMStore::IBooker &i, + void analyze(const edm::Event&, const edm::EventSetup&) override; + void bookHistograms(DQMStore::IBooker &i, edm::Run const&, edm::EventSetup const&) override; diff --git a/Validation/RecoVertex/interface/TrackParameterAnalyzer.h b/Validation/RecoVertex/interface/TrackParameterAnalyzer.h index e2399e81fbae2..cf3e99dbad8c3 100644 --- a/Validation/RecoVertex/interface/TrackParameterAnalyzer.h +++ b/Validation/RecoVertex/interface/TrackParameterAnalyzer.h @@ -47,11 +47,11 @@ typedef reco::TrackBase::ParameterVector ParameterVector; class TrackParameterAnalyzer : public edm::EDAnalyzer { public: explicit TrackParameterAnalyzer(const edm::ParameterSet&); - ~TrackParameterAnalyzer(); + ~TrackParameterAnalyzer() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void beginJob(); - virtual void endJob(); + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginJob() override; + void endJob() override; private: bool match(const ParameterVector &a, const ParameterVector &b); diff --git a/Validation/RecoVertex/interface/V0Validator.h b/Validation/RecoVertex/interface/V0Validator.h index 06b61e44952ec..c5c2cbbb49b0d 100644 --- a/Validation/RecoVertex/interface/V0Validator.h +++ b/Validation/RecoVertex/interface/V0Validator.h @@ -80,7 +80,7 @@ class V0Validator : public DQMEDAnalyzer { public: explicit V0Validator(const edm::ParameterSet &); - ~V0Validator(); + ~V0Validator() override; enum V0Type { KSHORT, LAMBDA }; struct V0Couple { reco::TrackRef one; @@ -102,7 +102,7 @@ class V0Validator : public DQMEDAnalyzer { }; private: - virtual void analyze(const edm::Event &, const edm::EventSetup &) override; + void analyze(const edm::Event &, const edm::EventSetup &) override; void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; void doFakeRates(const reco::VertexCompositeCandidateCollection &collection, diff --git a/Validation/RecoVertex/src/AnotherPrimaryVertexAnalyzer.cc b/Validation/RecoVertex/src/AnotherPrimaryVertexAnalyzer.cc index 261faa0512c61..69c9fc7829af0 100644 --- a/Validation/RecoVertex/src/AnotherPrimaryVertexAnalyzer.cc +++ b/Validation/RecoVertex/src/AnotherPrimaryVertexAnalyzer.cc @@ -52,15 +52,15 @@ class AnotherPrimaryVertexAnalyzer : public edm::EDAnalyzer { public: explicit AnotherPrimaryVertexAnalyzer(const edm::ParameterSet&); - ~AnotherPrimaryVertexAnalyzer(); + ~AnotherPrimaryVertexAnalyzer() override; private: - virtual void beginJob() ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void beginRun(const edm::Run&, const edm::EventSetup&); - virtual void endRun(const edm::Run&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; + void endRun(const edm::Run&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- @@ -88,7 +88,7 @@ AnotherPrimaryVertexAnalyzer::AnotherPrimaryVertexAnalyzer(const edm::ParameterS , _firstOnly(iConfig.getUntrackedParameter("firstOnly",false)) , _weightprov(iConfig.getParameter("usePrescaleWeight") ? new PrescaleWeightProvider(iConfig.getParameter("prescaleWeightProviderPSet"), consumesCollector(), *this) - : 0 + : nullptr ) { //now do what ever initialization is needed @@ -127,7 +127,7 @@ AnotherPrimaryVertexAnalyzer::analyze(const edm::Event& iEvent, const edm::Event if(_firstOnly) { reco::VertexCollection firstpv; - if(pvcoll->size()) firstpv.push_back((*pvcoll)[0]); + if(!pvcoll->empty()) firstpv.push_back((*pvcoll)[0]); _vhm.fill(iEvent,firstpv,weight); } else { diff --git a/Validation/RecoVertex/src/BSvsPVAnalyzer.cc b/Validation/RecoVertex/src/BSvsPVAnalyzer.cc index 97cc6817bde1f..b94391870358c 100644 --- a/Validation/RecoVertex/src/BSvsPVAnalyzer.cc +++ b/Validation/RecoVertex/src/BSvsPVAnalyzer.cc @@ -50,15 +50,15 @@ class BSvsPVAnalyzer : public edm::EDAnalyzer { public: explicit BSvsPVAnalyzer(const edm::ParameterSet&); - ~BSvsPVAnalyzer(); + ~BSvsPVAnalyzer() override; private: - virtual void beginJob() ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void beginRun(const edm::Run&, const edm::EventSetup&); - virtual void endRun(const edm::Run&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; + void endRun(const edm::Run&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- @@ -125,7 +125,7 @@ BSvsPVAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) if(_firstOnly) { reco::VertexCollection firstpv; - if(pvcoll->size()) firstpv.push_back((*pvcoll)[0]); + if(!pvcoll->empty()) firstpv.push_back((*pvcoll)[0]); _bspvhm.fill(iEvent,firstpv,*bs); } else { diff --git a/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc b/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc index ad4cf44c6362e..98592b4a7a3e1 100644 --- a/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc +++ b/Validation/RecoVertex/src/BSvsPVHistogramMaker.cc @@ -12,11 +12,11 @@ BSvsPVHistogramMaker::BSvsPVHistogramMaker(edm::ConsumesCollector&& iC): - _currdir(0), m_maxLS(100), useSlope_(true), _trueOnly(true), + _currdir(nullptr), m_maxLS(100), useSlope_(true), _trueOnly(true), _runHisto(true), _runHistoProfile(true), _runHistoBXProfile(true), _runHistoBX2D(false), _histoParameters(), _rhm(iC) { } BSvsPVHistogramMaker::BSvsPVHistogramMaker(const edm::ParameterSet& iConfig, edm::ConsumesCollector&& iC): - _currdir(0), + _currdir(nullptr), m_maxLS(iConfig.getParameter("maxLSBeforeRebin")), useSlope_(iConfig.getParameter("useSlope")), _trueOnly(iConfig.getUntrackedParameter("trueOnly",true)), @@ -148,7 +148,7 @@ void BSvsPVHistogramMaker::beginRun(const unsigned int nrun) { sprintf(runname,"run_%d",nrun); TFileDirectory* currdir = _currdir; - if(currdir==0) { + if(currdir==nullptr) { edm::Service tfserv; currdir = &(tfserv->tFileDirectory()); } diff --git a/Validation/RecoVertex/src/BeamSpotAnalyzer.cc b/Validation/RecoVertex/src/BeamSpotAnalyzer.cc index c0641b277ba94..f36a1894d850e 100644 --- a/Validation/RecoVertex/src/BeamSpotAnalyzer.cc +++ b/Validation/RecoVertex/src/BeamSpotAnalyzer.cc @@ -48,15 +48,15 @@ class AnotherBeamSpotAnalyzer : public edm::EDAnalyzer { public: explicit AnotherBeamSpotAnalyzer(const edm::ParameterSet&); - ~AnotherBeamSpotAnalyzer(); + ~AnotherBeamSpotAnalyzer() override; private: - virtual void beginJob() ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void beginRun(const edm::Run&, const edm::EventSetup&); - virtual void endRun(const edm::Run&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; + void endRun(const edm::Run&, const edm::EventSetup&) override; + void endJob() override ; // ----------member data --------------------------- diff --git a/Validation/RecoVertex/src/BeamSpotHistogramMaker.cc b/Validation/RecoVertex/src/BeamSpotHistogramMaker.cc index 97b4dfe97dbab..fac8c291e4703 100644 --- a/Validation/RecoVertex/src/BeamSpotHistogramMaker.cc +++ b/Validation/RecoVertex/src/BeamSpotHistogramMaker.cc @@ -10,10 +10,10 @@ BeamSpotHistogramMaker::BeamSpotHistogramMaker(edm::ConsumesCollector&& iC): - _currdir(0), _histoParameters(), _rhm(iC) { } + _currdir(nullptr), _histoParameters(), _rhm(iC) { } BeamSpotHistogramMaker::BeamSpotHistogramMaker(const edm::ParameterSet& iConfig, edm::ConsumesCollector&& iC): - _currdir(0), + _currdir(nullptr), _histoParameters(iConfig.getUntrackedParameter("histoParameters",edm::ParameterSet())), _rhm(iC) { } @@ -83,7 +83,7 @@ void BeamSpotHistogramMaker::beginRun(const unsigned int nrun) { sprintf(runname,"run_%d",nrun); TFileDirectory* currdir = _currdir; - if(currdir==0) { + if(currdir==nullptr) { edm::Service tfserv; currdir = &(tfserv->tFileDirectory()); } diff --git a/Validation/RecoVertex/src/MCVerticesAnalyzer.cc b/Validation/RecoVertex/src/MCVerticesAnalyzer.cc index 09e066cbe87fc..e7a115e2cedc9 100644 --- a/Validation/RecoVertex/src/MCVerticesAnalyzer.cc +++ b/Validation/RecoVertex/src/MCVerticesAnalyzer.cc @@ -57,10 +57,10 @@ class MCVerticesAnalyzer : public edm::one::EDAnalyzer { public: explicit MCVerticesAnalyzer(const edm::ParameterSet&); - ~MCVerticesAnalyzer(); + ~MCVerticesAnalyzer() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- diff --git a/Validation/RecoVertex/src/MCVerticesWeight.cc b/Validation/RecoVertex/src/MCVerticesWeight.cc index 82c3437f60a97..764b96c99ffe8 100644 --- a/Validation/RecoVertex/src/MCVerticesWeight.cc +++ b/Validation/RecoVertex/src/MCVerticesWeight.cc @@ -49,10 +49,10 @@ class MCVerticesWeight : public edm::global::EDFilter<> { public: explicit MCVerticesWeight(const edm::ParameterSet&); - ~MCVerticesWeight(); + ~MCVerticesWeight() override; private: - virtual bool filter(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + bool filter(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; // ----------member data --------------------------- diff --git a/Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc b/Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc index 0d769b3c4466b..6fbaf4a692f94 100644 --- a/Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc +++ b/Validation/RecoVertex/src/MCvsRecoVerticesAnalyzer.cc @@ -59,10 +59,10 @@ class MCvsRecoVerticesAnalyzer : public edm::one::EDAnalyzer { public: explicit MCvsRecoVerticesAnalyzer(const edm::ParameterSet&); - ~MCvsRecoVerticesAnalyzer(); + ~MCvsRecoVerticesAnalyzer() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- @@ -252,7 +252,7 @@ MCvsRecoVerticesAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetu // compute the difference between the main interaction vertex z position and the first vertex of the collection - if(pvcoll->size() !=0) { + if(!pvcoll->empty()) { if(!(*pvcoll)[0].isFake()) { // get the first vertex if(Evt->vertices_begin() != Evt->vertices_end()) { diff --git a/Validation/RecoVertex/src/PrimaryVertexAnalyzer4PUSlimmed.cc b/Validation/RecoVertex/src/PrimaryVertexAnalyzer4PUSlimmed.cc index 763cd90f7dbb3..e330d4010cf59 100644 --- a/Validation/RecoVertex/src/PrimaryVertexAnalyzer4PUSlimmed.cc +++ b/Validation/RecoVertex/src/PrimaryVertexAnalyzer4PUSlimmed.cc @@ -634,7 +634,7 @@ void PrimaryVertexAnalyzer4PUSlimmed::fillRecoAssociatedGenVertexHistograms( if (v.closest_vertex_distance_z > 0.) mes_[label]["GenAllAssoc2Reco_ClosestDistanceZ"] ->Fill(v.closest_vertex_distance_z); - if (v.rec_vertices.size()) { + if (!v.rec_vertices.empty()) { mes_[label]["GenAllAssoc2RecoMatched_X"]->Fill(v.x); mes_[label]["GenAllAssoc2RecoMatched_Y"]->Fill(v.y); mes_[label]["GenAllAssoc2RecoMatched_Z"]->Fill(v.z); @@ -688,7 +688,7 @@ void PrimaryVertexAnalyzer4PUSlimmed::fillGenAssociatedRecoVertexHistograms( if (v.closest_vertex_distance_z > 0.) mes_[label]["RecoAllAssoc2Gen_ClosestDistanceZ"] ->Fill(v.closest_vertex_distance_z); - if (v.sim_vertices.size()) { + if (!v.sim_vertices.empty()) { v.kind_of_vertex |= recoPrimaryVertex::MATCHED; mes_[label]["RecoAllAssoc2GenMatched_X"]->Fill(v.x); mes_[label]["RecoAllAssoc2GenMatched_Y"]->Fill(v.y); @@ -978,7 +978,7 @@ PrimaryVertexAnalyzer4PUSlimmed::getSimPVs( assert((**iTrack).eventId().bunchCrossing() == 0); } // TODO(rovere) maybe get rid of this old logic completely ... ? - simPrimaryVertex* vp = NULL; // will become non-NULL if a vertex + simPrimaryVertex* vp = nullptr; // will become non-NULL if a vertex // is found and then point to it for (std::vector::iterator v0 = simpv.begin(); v0 != simpv.end(); v0++) { @@ -1204,7 +1204,7 @@ void PrimaryVertexAnalyzer4PUSlimmed::matchSim2RecoVertices( } if (verbose_) { - if (vsim->rec_vertices.size()) { + if (!vsim->rec_vertices.empty()) { for (auto const& v : vsim->rec_vertices) { std::cout << "Found a matching vertex for genVtx " << vsim->z << " at " << v->z() @@ -1416,7 +1416,7 @@ void PrimaryVertexAnalyzer4PUSlimmed::analyze(const edm::Event& iEvent, mistag = 0.; kind_of_signal_vertex |= (1 << IS_ASSOC2FIRST_RECO); } else { - if (v.rec_vertices.size()) { + if (!v.rec_vertices.empty()) { kind_of_signal_vertex |= (1 << IS_ASSOC2ANY_RECO); } } @@ -1498,7 +1498,7 @@ void PrimaryVertexAnalyzer4PUSlimmed::analyze(const edm::Event& iEvent, } } - if (v.rec_vertices.size()) num_total_gen_vertices_assoc2reco++; + if (!v.rec_vertices.empty()) num_total_gen_vertices_assoc2reco++; if (v.rec_vertices.size() > 1) num_total_gen_vertices_multiassoc2reco++; // No need to N-tplicate the Gen-related cumulative histograms: // fill them only at the first iteration @@ -1515,7 +1515,7 @@ void PrimaryVertexAnalyzer4PUSlimmed::analyze(const edm::Event& iEvent, ->Fill(simpv.size(), num_total_gen_vertices_multiassoc2reco); for (auto & v : recopv) { fillGenAssociatedRecoVertexHistograms(label, num_pileup_vertices, v); - if (v.sim_vertices.size()) { + if (!v.sim_vertices.empty()) { num_total_reco_vertices_assoc2gen++; if (v.sim_vertices_internal[0]->rec_vertices.size() > 1) { num_total_reco_vertices_duplicate++; diff --git a/Validation/RecoVertex/src/V0Validator.cc b/Validation/RecoVertex/src/V0Validator.cc index ca132670610dc..17ff20370308b 100644 --- a/Validation/RecoVertex/src/V0Validator.cc +++ b/Validation/RecoVertex/src/V0Validator.cc @@ -64,7 +64,7 @@ void V0Validator::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, ibooker.cd(); std::string subDirName = V0Validator::dirName + "/K0"; - ibooker.setCurrentFolder(subDirName.c_str()); + ibooker.setCurrentFolder(subDirName); candidateEffVsR_num_[V0Validator::KSHORT] = ibooker.book1D( "K0sEffVsR_num", "K^{0}_{S} Efficiency vs #rho", 80, 0., 40.); @@ -128,7 +128,7 @@ void V0Validator::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const&, // Lambda Plots follow subDirName = V0Validator::dirName + "/Lambda"; - ibooker.setCurrentFolder(subDirName.c_str()); + ibooker.setCurrentFolder(subDirName); candidateEffVsR_num_[V0Validator::LAMBDA] = ibooker.book1D( "LamEffVsR_num", "#Lambda^{0} Efficiency vs #rho", 80, 0., 40.); @@ -210,7 +210,7 @@ void V0Validator::doFakeRates( float CandidateR = 0.; int CandidateStatus = 0; const unsigned int NUM_DAUGHTERS = 2; - if (collection.size() > 0) { + if (!collection.empty()) { for (reco::VertexCompositeCandidateCollection::const_iterator iCandidate = collection.begin(); iCandidate != collection.end(); iCandidate++) { @@ -243,7 +243,7 @@ void V0Validator::doFakeRates( if (recotosimCollection.find(track) != recotosimCollection.end()) { const std::vector >& tp = recotosimCollection[track]; - if (tp.size() != 0) { + if (!tp.empty()) { tpref = tp.begin()->first; TrackingVertexRef parentVertex = tpref->parentVertex(); @@ -337,7 +337,7 @@ void V0Validator::doEfficiencies( * indeed does not matter that much. */ std::set reconstructed_V0_couples; - if (collection.size() > 0) { + if (!collection.empty()) { for (reco::VertexCompositeCandidateCollection::const_iterator iCandidate = collection.begin(); iCandidate != collection.end(); iCandidate++) { @@ -395,8 +395,7 @@ void V0Validator::doEfficiencies( if (simtorecoCollection.find( gen_vertex.daughterTracks()[daughter]) != simtorecoCollection.end()) { - if (simtorecoCollection[gen_vertex.daughterTracks()[daughter]] - .size() != 0) { + if (!simtorecoCollection[gen_vertex.daughterTracks()[daughter]].empty()) { candidateEff[daughter] = 1; // Found a daughter track reco_daughter[daughter] = simtorecoCollection[gen_vertex.daughterTracks()[daughter]] diff --git a/Validation/RecoVertex/src/VertexHistogramMaker.cc b/Validation/RecoVertex/src/VertexHistogramMaker.cc index 3e81f4426347e..044582f49d6eb 100644 --- a/Validation/RecoVertex/src/VertexHistogramMaker.cc +++ b/Validation/RecoVertex/src/VertexHistogramMaker.cc @@ -14,7 +14,7 @@ VertexHistogramMaker::VertexHistogramMaker(edm::ConsumesCollector&& iC) - : m_currdir(0), m_maxLS(100), m_weightThreshold(0.5), m_trueOnly(true) + : m_currdir(nullptr), m_maxLS(100), m_weightThreshold(0.5), m_trueOnly(true) , m_runHisto(true), m_runHistoProfile(true), m_runHistoBXProfile(true), m_runHistoBXProfile2D(false), m_runHisto2D(false) , m_bsConstrained(false) , m_histoParameters() @@ -22,7 +22,7 @@ VertexHistogramMaker::VertexHistogramMaker(edm::ConsumesCollector&& iC) , m_fhm(iC) { } VertexHistogramMaker::VertexHistogramMaker(const edm::ParameterSet& iConfig, edm::ConsumesCollector&& iC) - : m_currdir(0) + : m_currdir(nullptr) , m_maxLS(iConfig.getParameter("maxLSBeforeRebin")) , m_weightThreshold(iConfig.getUntrackedParameter("weightThreshold",0.5)) , m_trueOnly(iConfig.getUntrackedParameter("trueOnly",true)) @@ -201,7 +201,7 @@ void VertexHistogramMaker::book(const std::string dirname) { void VertexHistogramMaker::beginRun(const edm::Run& iRun) { TFileDirectory* currdir = m_currdir; - if(currdir==0) { + if(currdir==nullptr) { edm::Service tfserv; currdir = &(tfserv->tFileDirectory()); } diff --git a/Validation/RecoVertex/src/VertexWeighter.cc b/Validation/RecoVertex/src/VertexWeighter.cc index e690ecaeb2902..500266a44882f 100644 --- a/Validation/RecoVertex/src/VertexWeighter.cc +++ b/Validation/RecoVertex/src/VertexWeighter.cc @@ -1,6 +1,6 @@ #include "Validation/RecoVertex/interface/VertexWeighter.h" #include -#include +#include #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/Validation/SiPixelPhase1DigisV/interface/SiPixelPhase1DigisV.h b/Validation/SiPixelPhase1DigisV/interface/SiPixelPhase1DigisV.h index 0b6186ef4be9a..fc9d579e44838 100644 --- a/Validation/SiPixelPhase1DigisV/interface/SiPixelPhase1DigisV.h +++ b/Validation/SiPixelPhase1DigisV/interface/SiPixelPhase1DigisV.h @@ -29,7 +29,7 @@ class SiPixelPhase1DigisV : public SiPixelPhase1Base { public: explicit SiPixelPhase1DigisV(const edm::ParameterSet& conf); - void analyze(const edm::Event&, const edm::EventSetup&) ; + void analyze(const edm::Event&, const edm::EventSetup&) override ; private: edm::EDGetTokenT> srcToken_; diff --git a/Validation/SiPixelPhase1HitsV/interface/SiPixelPhase1HitsV.h b/Validation/SiPixelPhase1HitsV/interface/SiPixelPhase1HitsV.h index 18dc2d0aaf2c5..2a7e8cf813fc7 100644 --- a/Validation/SiPixelPhase1HitsV/interface/SiPixelPhase1HitsV.h +++ b/Validation/SiPixelPhase1HitsV/interface/SiPixelPhase1HitsV.h @@ -35,7 +35,7 @@ class SiPixelPhase1HitsV : public SiPixelPhase1Base { public: explicit SiPixelPhase1HitsV(const edm::ParameterSet& conf); - void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: edm::EDGetTokenT pixelBarrelLowToken_; diff --git a/Validation/SiPixelPhase1RecHitsV/interface/SiPixelPhase1RecHitsV.h b/Validation/SiPixelPhase1RecHitsV/interface/SiPixelPhase1RecHitsV.h index 875e604734cb8..f1bdf94e6ff4b 100644 --- a/Validation/SiPixelPhase1RecHitsV/interface/SiPixelPhase1RecHitsV.h +++ b/Validation/SiPixelPhase1RecHitsV/interface/SiPixelPhase1RecHitsV.h @@ -30,7 +30,7 @@ class SiPixelPhase1RecHitsV : public SiPixelPhase1Base { public: explicit SiPixelPhase1RecHitsV(const edm::ParameterSet& conf); - void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: TrackerHitAssociator::Config trackerHitAssociatorConfig_; diff --git a/Validation/SiPixelPhase1TrackClustersV/interface/SiPixelPhase1TrackClustersV.h b/Validation/SiPixelPhase1TrackClustersV/interface/SiPixelPhase1TrackClustersV.h index eae555602d569..79fe67b4560ba 100644 --- a/Validation/SiPixelPhase1TrackClustersV/interface/SiPixelPhase1TrackClustersV.h +++ b/Validation/SiPixelPhase1TrackClustersV/interface/SiPixelPhase1TrackClustersV.h @@ -22,7 +22,7 @@ class SiPixelPhase1TrackClustersV : public SiPixelPhase1Base { public: explicit SiPixelPhase1TrackClustersV(const edm::ParameterSet& conf); - void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: edm::EDGetTokenT > clustersToken_; diff --git a/Validation/TrackerDigis/interface/SiPixelDigiValid.h b/Validation/TrackerDigis/interface/SiPixelDigiValid.h index a62c763a374d8..4bfe73aefb022 100644 --- a/Validation/TrackerDigis/interface/SiPixelDigiValid.h +++ b/Validation/TrackerDigis/interface/SiPixelDigiValid.h @@ -22,12 +22,12 @@ class SiPixelDigiValid: public DQMEDAnalyzer { public: SiPixelDigiValid(const edm::ParameterSet& ps); - ~SiPixelDigiValid(); + ~SiPixelDigiValid() override; protected: - void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; void beginJob(); - void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es); + void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es) override; void endJob(void); private: diff --git a/Validation/TrackerDigis/interface/SiStripDigiValid.h b/Validation/TrackerDigis/interface/SiStripDigiValid.h index 8a4a68ea67ff9..b21573a89da4b 100644 --- a/Validation/TrackerDigis/interface/SiStripDigiValid.h +++ b/Validation/TrackerDigis/interface/SiStripDigiValid.h @@ -19,12 +19,12 @@ class SiStripDigiValid: public DQMEDAnalyzer { public: SiStripDigiValid(const edm::ParameterSet& ps); - ~SiStripDigiValid(); + ~SiStripDigiValid() override; protected: - void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; void beginJob(); - void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es); + void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es) override; void endJob(void); private: diff --git a/Validation/TrackerDigis/plugins/SiPixelDigiValid.cc b/Validation/TrackerDigis/plugins/SiPixelDigiValid.cc index 6eecf43b93076..564cc5bdcaac6 100644 --- a/Validation/TrackerDigis/plugins/SiPixelDigiValid.cc +++ b/Validation/TrackerDigis/plugins/SiPixelDigiValid.cc @@ -26,7 +26,7 @@ SiPixelDigiValid::SiPixelDigiValid(const edm::ParameterSet& ps) : outputFile_( ps.getUntrackedParameter( "outputFile", "pixeldigihisto.root" ) ) , runStandalone ( ps.getParameter("runStandalone") ) - , dbe_(0) + , dbe_(nullptr) , edmDetSetVector_PixelDigi_Token_( consumes< edm::DetSetVector >( ps.getParameter( "src" ) ) ) { @@ -277,7 +277,7 @@ void SiPixelDigiValid::bookHistograms(DQMStore::IBooker & ibooker,const edm::Run void SiPixelDigiValid::endJob() { //Save histos in a file only in standalone mode - if ( runStandalone && outputFile_.size() != 0 && dbe_ ){dbe_->save(outputFile_);} + if ( runStandalone && !outputFile_.empty() && dbe_ ){dbe_->save(outputFile_);} } void SiPixelDigiValid::analyze(const edm::Event& e, const edm::EventSetup& c){ diff --git a/Validation/TrackerDigis/plugins/SiStripDigiValid.cc b/Validation/TrackerDigis/plugins/SiStripDigiValid.cc index a4fbf4b21cd9e..bda9df6c46d7a 100644 --- a/Validation/TrackerDigis/plugins/SiStripDigiValid.cc +++ b/Validation/TrackerDigis/plugins/SiStripDigiValid.cc @@ -22,7 +22,7 @@ #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h" SiStripDigiValid::SiStripDigiValid(const edm::ParameterSet& ps) - : dbe_(0) + : dbe_(nullptr) , runStandalone ( ps.getParameter("runStandalone") ) , outputFile_( ps.getUntrackedParameter( "outputFile", "stripdigihisto.root" ) ) , edmDetSetVector_SiStripDigi_Token_( consumes< edm::DetSetVector >( ps.getParameter( "src" ) ) ) { @@ -332,7 +332,7 @@ void SiStripDigiValid::bookHistograms(DQMStore::IBooker & ibooker,const edm::Run } void SiStripDigiValid::endJob() { - if ( runStandalone && outputFile_.size() != 0 && dbe_ ){ dbe_->save(outputFile_);} + if ( runStandalone && !outputFile_.empty() && dbe_ ){ dbe_->save(outputFile_);} } diff --git a/Validation/TrackerHits/interface/TrackerHitAnalyzer.h b/Validation/TrackerHits/interface/TrackerHitAnalyzer.h index 127b9a9decf70..741cff55a088e 100644 --- a/Validation/TrackerHits/interface/TrackerHitAnalyzer.h +++ b/Validation/TrackerHits/interface/TrackerHitAnalyzer.h @@ -29,14 +29,14 @@ class TrackerHitAnalyzer: public DQMEDAnalyzer { TrackerHitAnalyzer(const edm::ParameterSet& ps); /// Destructor -~TrackerHitAnalyzer(); +~TrackerHitAnalyzer() override; protected: - void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es); + void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es) override; /// Analyze -void analyze(const edm::Event& e, const edm::EventSetup& c); +void analyze(const edm::Event& e, const edm::EventSetup& c) override; diff --git a/Validation/TrackerHits/interface/TrackerHitProducer.h b/Validation/TrackerHits/interface/TrackerHitProducer.h index a46bc3fb8e35f..e163feed3ea85 100644 --- a/Validation/TrackerHits/interface/TrackerHitProducer.h +++ b/Validation/TrackerHits/interface/TrackerHitProducer.h @@ -27,10 +27,10 @@ class TrackerHitProducer : public edm::EDProducer typedef std::vector IntegerVector; explicit TrackerHitProducer(const edm::ParameterSet&); - virtual ~TrackerHitProducer(); - virtual void beginJob(); - virtual void endJob(); - virtual void produce(edm::Event&, const edm::EventSetup&); + ~TrackerHitProducer() override; + void beginJob() override; + void endJob() override; + void produce(edm::Event&, const edm::EventSetup&) override; private: diff --git a/Validation/TrackerHits/src/TrackerHitAnalyzer.cc b/Validation/TrackerHits/src/TrackerHitAnalyzer.cc index dcf50e66b6966..5dedceefd0346 100644 --- a/Validation/TrackerHits/src/TrackerHitAnalyzer.cc +++ b/Validation/TrackerHits/src/TrackerHitAnalyzer.cc @@ -35,7 +35,7 @@ #include #include -#include +#include #include TrackerHitAnalyzer::TrackerHitAnalyzer(const edm::ParameterSet& ps) @@ -53,7 +53,7 @@ TrackerHitAnalyzer::TrackerHitAnalyzer(const edm::ParameterSet& ps) , edmPSimHitContainer_siTECLow_Token_( consumes( ps.getParameter( "SiTECLowSrc" ) ) ) , edmPSimHitContainer_siTECHigh_Token_( consumes( ps.getParameter( "SiTECHighSrc" ) ) ) , edmSimTrackContainerToken_( consumes( ps.getParameter( "G4TrkSrc" ) ) ) - , fDBE( NULL ) + , fDBE( nullptr ) , conf_(ps) , runStandalone ( ps.getParameter("runStandalone") ) , fOutputFile( ps.getUntrackedParameter( "outputFile", "TrackerHitHisto.root" ) ) @@ -83,7 +83,7 @@ void TrackerHitAnalyzer::bookHistograms(DQMStore::IBooker & ibooker,const edm::R if ( verbose_ ) fDBE->showDirStructure(); } - if ( fDBE != NULL ) { + if ( fDBE != nullptr ) { // fDBE->setCurrentFolder("TrackerHitsV/TrackerHitTask"); // is there any way to record CPU Info ??? @@ -338,7 +338,7 @@ void TrackerHitAnalyzer::endJob(){ //and here we will do the profile //Save root file only in standalone mode - if ( runStandalone && fOutputFile.size() != 0 && fDBE ){ fDBE->save(fOutputFile);} + if ( runStandalone && !fOutputFile.empty() && fDBE ){ fDBE->save(fOutputFile);} } diff --git a/Validation/TrackerHits/src/TrackerHitProducer.cc b/Validation/TrackerHits/src/TrackerHitProducer.cc index 7d57c3ae4e884..9cd12079de16a 100644 --- a/Validation/TrackerHits/src/TrackerHitProducer.cc +++ b/Validation/TrackerHits/src/TrackerHitProducer.cc @@ -31,7 +31,7 @@ #include #include -#include +#include TrackerHitProducer::TrackerHitProducer(const edm::ParameterSet& iPSet) : getAllProvenances( iPSet.getParameter( "ProvenanceLookup" ).getUntrackedParameter( "GetAllProvenances", false ) ) diff --git a/Validation/TrackerRecHits/interface/SiPixelRecHitsValid.h b/Validation/TrackerRecHits/interface/SiPixelRecHitsValid.h index de8a24d8b29e1..145a28cc75d8b 100644 --- a/Validation/TrackerRecHits/interface/SiPixelRecHitsValid.h +++ b/Validation/TrackerRecHits/interface/SiPixelRecHitsValid.h @@ -32,13 +32,13 @@ class SiPixelRecHitsValid : public DQMEDAnalyzer { SiPixelRecHitsValid(const edm::ParameterSet& conf); //Destructor - ~SiPixelRecHitsValid(); + ~SiPixelRecHitsValid() override; protected: - virtual void analyze(const edm::Event& e, const edm::EventSetup& c); + void analyze(const edm::Event& e, const edm::EventSetup& c) override; void beginJob(); - void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es); + void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es) override; private: void fillBarrel(const SiPixelRecHit &,const PSimHit &, DetId, const PixelGeomDetUnit *, diff --git a/Validation/TrackerRecHits/src/SiPixelRecHitsValid.cc b/Validation/TrackerRecHits/src/SiPixelRecHitsValid.cc index beca6a6d4fe0a..6e4c48ba7fba5 100644 --- a/Validation/TrackerRecHits/src/SiPixelRecHitsValid.cc +++ b/Validation/TrackerRecHits/src/SiPixelRecHitsValid.cc @@ -44,7 +44,7 @@ #include "SimDataFormats/TrackingHit/interface/PSimHit.h" #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h" -#include +#include SiPixelRecHitsValid::SiPixelRecHitsValid(const edm::ParameterSet& ps) : trackerHitAssociatorConfig_(ps, consumesCollector()) diff --git a/Validation/TrackingMCTruth/interface/TrackingTruthValid.h b/Validation/TrackingMCTruth/interface/TrackingTruthValid.h index b337a6199f838..a68008e5958aa 100755 --- a/Validation/TrackingMCTruth/interface/TrackingTruthValid.h +++ b/Validation/TrackingMCTruth/interface/TrackingTruthValid.h @@ -18,11 +18,11 @@ class TrackingTruthValid : public DQMEDAnalyzer { //Constructor explicit TrackingTruthValid(const edm::ParameterSet& conf) ; //Destructor - ~TrackingTruthValid(){} ; + ~TrackingTruthValid() override{} ; - virtual void analyze(const edm::Event&, const edm::EventSetup& ); + void analyze(const edm::Event&, const edm::EventSetup& ) override; - void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es); + void bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es) override; void beginJob(const edm::ParameterSet& conf); void endJob(); diff --git a/Validation/TrackingMCTruth/plugins/TrackingTruthValid.cc b/Validation/TrackingMCTruth/plugins/TrackingTruthValid.cc index ffa0a5bad32cb..0123482bde392 100644 --- a/Validation/TrackingMCTruth/plugins/TrackingTruthValid.cc +++ b/Validation/TrackingMCTruth/plugins/TrackingTruthValid.cc @@ -34,7 +34,7 @@ void TrackingTruthValid::beginJob(const edm::ParameterSet& conf) {} TrackingTruthValid::TrackingTruthValid(const edm::ParameterSet& conf) : runStandalone( conf.getParameter("runStandalone") ) , outputFile( conf.getParameter( "outputFile" ) ) - , dbe_( NULL ) + , dbe_( nullptr ) , vec_TrackingParticle_Token_( consumes( conf.getParameter( "src" ) ) ) {} void TrackingTruthValid::bookHistograms(DQMStore::IBooker & ibooker,const edm::Run& run, const edm::EventSetup& es){ @@ -184,6 +184,6 @@ void TrackingTruthValid::analyze(const edm::Event& event, const edm::EventSetup& void TrackingTruthValid::endJob(){ //Only in standalone mode save local root file - if (runStandalone && outputFile.size() != 0 && dbe_ ){dbe_->save(outputFile);} + if (runStandalone && !outputFile.empty() && dbe_ ){dbe_->save(outputFile);} } From 12e1919bb3fee18327b9fab143e200f734317678 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 4 Nov 2017 11:07:26 +0100 Subject: [PATCH 2/8] clang fixes --- HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h | 6 +++--- .../SecondaryVertex/interface/TemplatedSecondaryVertex.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h index be2a1e7e02378..661af8a930030 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h @@ -82,9 +82,9 @@ class BPHMultiSelect: public T { bool accept( const reco::Candidate & cand, const BPHRecoBuilder* build ) const override { return false; } bool accept( const reco::Candidate & cand ) const override { return false; } - bool accept( const BPHDecayMomentum& cand ) const override { return false; } - bool accept( const BPHDecayVertex & cand ) const override { return false; } - bool accept( const BPHKinematicFit & cand ) const override { return false; } + bool accept( const BPHDecayMomentum& cand ) const { return false; } + bool accept( const BPHDecayVertex & cand ) const { return false; } + bool accept( const BPHKinematicFit & cand ) const { return false; } private: diff --git a/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h b/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h index ada765f0394a0..07737522c417d 100644 --- a/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h +++ b/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h @@ -17,7 +17,7 @@ class TemplatedSecondaryVertex : public SV { bool withPVError = false) : SV(sv),dist1d_(computeDist1d(pv, sv, direction, withPVError)),dist2d_(computeDist2d(pv, sv, direction, withPVError)),dist3d_(computeDist3d(pv, sv, direction, withPVError)) {} - ~TemplatedSecondaryVertex() override {} + ~TemplatedSecondaryVertex() {} inline Measurement1D dist1d() const { return dist1d_; } inline Measurement1D dist2d() const { return dist2d_; } inline Measurement1D dist3d() const { return dist3d_; } From cb4084bc3cf6c8b90d2e6fa92c95f68fa8912b19 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 4 Nov 2017 11:45:27 +0100 Subject: [PATCH 3/8] clang fixes --- HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h | 6 +++--- .../SecondaryVertex/interface/TemplatedSecondaryVertex.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h index 661af8a930030..be2a1e7e02378 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h @@ -82,9 +82,9 @@ class BPHMultiSelect: public T { bool accept( const reco::Candidate & cand, const BPHRecoBuilder* build ) const override { return false; } bool accept( const reco::Candidate & cand ) const override { return false; } - bool accept( const BPHDecayMomentum& cand ) const { return false; } - bool accept( const BPHDecayVertex & cand ) const { return false; } - bool accept( const BPHKinematicFit & cand ) const { return false; } + bool accept( const BPHDecayMomentum& cand ) const override { return false; } + bool accept( const BPHDecayVertex & cand ) const override { return false; } + bool accept( const BPHKinematicFit & cand ) const override { return false; } private: diff --git a/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h b/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h index 07737522c417d..ada765f0394a0 100644 --- a/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h +++ b/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h @@ -17,7 +17,7 @@ class TemplatedSecondaryVertex : public SV { bool withPVError = false) : SV(sv),dist1d_(computeDist1d(pv, sv, direction, withPVError)),dist2d_(computeDist2d(pv, sv, direction, withPVError)),dist3d_(computeDist3d(pv, sv, direction, withPVError)) {} - ~TemplatedSecondaryVertex() {} + ~TemplatedSecondaryVertex() override {} inline Measurement1D dist1d() const { return dist1d_; } inline Measurement1D dist2d() const { return dist2d_; } inline Measurement1D dist3d() const { return dist3d_; } From c9e51e65dcbe8c3f4c9d6e375631cef7c75c6229 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 4 Nov 2017 12:25:01 +0100 Subject: [PATCH 4/8] sometimes templates use classes with and without virtual fuctions. Seems to confuse clang-tidy --- DataFormats/VertexReco/interface/Vertex.h | 2 ++ HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h | 2 +- HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h | 2 +- HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DataFormats/VertexReco/interface/Vertex.h b/DataFormats/VertexReco/interface/Vertex.h index 816d23dc217ac..0eb4cf38b3d9f 100755 --- a/DataFormats/VertexReco/interface/Vertex.h +++ b/DataFormats/VertexReco/interface/Vertex.h @@ -64,6 +64,8 @@ namespace reco { Vertex( const Point &, const Error &, double chi2, double ndof, size_t size ); /// constructor for a valid vertex, with all data 4D Vertex( const Point &, const Error4D &, double time, double chi2, double ndof, size_t size ); + // + virtual ~Vertex() {;} /// Tells whether the vertex is valid. bool isValid() const {return validity_;} /// Tells whether a Vertex is fake, i.e. not a vertex made out of a proper diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h index bcf656ea38a76..7eb278e43f399 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h @@ -43,7 +43,7 @@ class BPHFitSelect { /** Operations */ /// accept function - virtual bool accept( const BPHKinematicFit& cand ) const = 0; + virtual bool accept( const BPHKinematicFit& cand ) const {return false;} private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h index c205f4351d6c1..d35998f80bf19 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h @@ -43,7 +43,7 @@ class BPHMomentumSelect { /** Operations */ /// accept function - virtual bool accept( const BPHDecayMomentum& cand ) const = 0; + virtual bool accept( const BPHDecayMomentum& cand ) const {return false}; private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h index 3fe9032326d86..df9425d2e5a2b 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h @@ -43,7 +43,7 @@ class BPHVertexSelect { /** Operations */ /// accept function - virtual bool accept( const BPHDecayVertex& cand ) const = 0; + virtual bool accept( const BPHDecayVertex& cand ) const {return false;} private: From 35d724dc131373d7c0d67cf834f11d0fc8a83966 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 4 Nov 2017 12:55:50 +0100 Subject: [PATCH 5/8] sometimes templates use classes with and without virtual fuctions. Seems to confuse clang-tidy --- HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h | 2 +- HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h index d35998f80bf19..c8f3689e27e30 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h @@ -43,7 +43,7 @@ class BPHMomentumSelect { /** Operations */ /// accept function - virtual bool accept( const BPHDecayMomentum& cand ) const {return false}; + virtual bool accept( const BPHDecayMomentum& cand ) const {return false;}; private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h index be2a1e7e02378..661af8a930030 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h @@ -82,9 +82,9 @@ class BPHMultiSelect: public T { bool accept( const reco::Candidate & cand, const BPHRecoBuilder* build ) const override { return false; } bool accept( const reco::Candidate & cand ) const override { return false; } - bool accept( const BPHDecayMomentum& cand ) const override { return false; } - bool accept( const BPHDecayVertex & cand ) const override { return false; } - bool accept( const BPHKinematicFit & cand ) const override { return false; } + bool accept( const BPHDecayMomentum& cand ) const { return false; } + bool accept( const BPHDecayVertex & cand ) const { return false; } + bool accept( const BPHKinematicFit & cand ) const { return false; } private: From f82ef83e6e88916fa0cd90d471def7cb72320654 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 4 Nov 2017 15:04:08 +0100 Subject: [PATCH 6/8] revert and try to avoid clang-tidy checks on some templated code --- DataFormats/VertexReco/interface/Vertex.h | 2 -- HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h | 2 +- HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h | 2 +- HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h | 6 +++--- HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h | 2 +- .../SecondaryVertex/interface/TemplatedSecondaryVertex.h | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/DataFormats/VertexReco/interface/Vertex.h b/DataFormats/VertexReco/interface/Vertex.h index 0eb4cf38b3d9f..816d23dc217ac 100755 --- a/DataFormats/VertexReco/interface/Vertex.h +++ b/DataFormats/VertexReco/interface/Vertex.h @@ -64,8 +64,6 @@ namespace reco { Vertex( const Point &, const Error &, double chi2, double ndof, size_t size ); /// constructor for a valid vertex, with all data 4D Vertex( const Point &, const Error4D &, double time, double chi2, double ndof, size_t size ); - // - virtual ~Vertex() {;} /// Tells whether the vertex is valid. bool isValid() const {return validity_;} /// Tells whether a Vertex is fake, i.e. not a vertex made out of a proper diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h index 7eb278e43f399..75381c64e2df1 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHFitSelect.h @@ -43,7 +43,7 @@ class BPHFitSelect { /** Operations */ /// accept function - virtual bool accept( const BPHKinematicFit& cand ) const {return false;} + virtual bool accept( const BPHKinematicFit& cand ) const =0; private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h index c8f3689e27e30..c205f4351d6c1 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMomentumSelect.h @@ -43,7 +43,7 @@ class BPHMomentumSelect { /** Operations */ /// accept function - virtual bool accept( const BPHDecayMomentum& cand ) const {return false;}; + virtual bool accept( const BPHDecayMomentum& cand ) const = 0; private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h index 661af8a930030..0eb6f04763f5f 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h @@ -82,9 +82,9 @@ class BPHMultiSelect: public T { bool accept( const reco::Candidate & cand, const BPHRecoBuilder* build ) const override { return false; } bool accept( const reco::Candidate & cand ) const override { return false; } - bool accept( const BPHDecayMomentum& cand ) const { return false; } - bool accept( const BPHDecayVertex & cand ) const { return false; } - bool accept( const BPHKinematicFit & cand ) const { return false; } + bool accept( const BPHDecayMomentum& cand ) const { return false; } //NOLINT + bool accept( const BPHDecayVertex & cand ) const { return false; } //NOLINT + bool accept( const BPHKinematicFit & cand ) const { return false; } //NOLINT private: diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h index df9425d2e5a2b..3fe9032326d86 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHVertexSelect.h @@ -43,7 +43,7 @@ class BPHVertexSelect { /** Operations */ /// accept function - virtual bool accept( const BPHDecayVertex& cand ) const {return false;} + virtual bool accept( const BPHDecayVertex& cand ) const = 0; private: diff --git a/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h b/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h index ada765f0394a0..6bd05c394ce18 100644 --- a/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h +++ b/RecoBTag/SecondaryVertex/interface/TemplatedSecondaryVertex.h @@ -17,7 +17,7 @@ class TemplatedSecondaryVertex : public SV { bool withPVError = false) : SV(sv),dist1d_(computeDist1d(pv, sv, direction, withPVError)),dist2d_(computeDist2d(pv, sv, direction, withPVError)),dist3d_(computeDist3d(pv, sv, direction, withPVError)) {} - ~TemplatedSecondaryVertex() override {} + ~TemplatedSecondaryVertex() {} //NOLINT inline Measurement1D dist1d() const { return dist1d_; } inline Measurement1D dist2d() const { return dist2d_; } inline Measurement1D dist3d() const { return dist3d_; } From 627cda981a82bb8bf2788989b87e3099abe8f017 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 5 Nov 2017 10:32:47 +0100 Subject: [PATCH 7/8] revert changes to compile --- .../RecoDecay/interface/BPHMultiSelect.h | 4 ++-- .../interface/AbsFFTSpecificScaleCalculator.h | 2 +- .../interface/FFTJetCorrectorParametersLoader.h | 2 +- .../interface/FFTJetCorrectorSequenceLoader.h | 12 ++++++------ .../interface/FFTJetLookupTableSequenceLoader.h | 2 +- .../interface/StorableMultivariateFunctorReader.h | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h index 0eb6f04763f5f..354c5a00a48b0 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h @@ -80,8 +80,8 @@ class BPHMultiSelect: public T { /// accept function bool accept( const reco::Candidate & cand, - const BPHRecoBuilder* build ) const override { return false; } - bool accept( const reco::Candidate & cand ) const override { return false; } + const BPHRecoBuilder* build ) const { return false; } //NOLINT + bool accept( const reco::Candidate & cand ) const { return false; } //NOLINT bool accept( const BPHDecayMomentum& cand ) const { return false; } //NOLINT bool accept( const BPHDecayVertex & cand ) const { return false; } //NOLINT bool accept( const BPHKinematicFit & cand ) const { return false; } //NOLINT diff --git a/JetMETCorrections/FFTJetObjects/interface/AbsFFTSpecificScaleCalculator.h b/JetMETCorrections/FFTJetObjects/interface/AbsFFTSpecificScaleCalculator.h index 9405dee2bf382..1e3bbc2fc8f57 100644 --- a/JetMETCorrections/FFTJetObjects/interface/AbsFFTSpecificScaleCalculator.h +++ b/JetMETCorrections/FFTJetObjects/interface/AbsFFTSpecificScaleCalculator.h @@ -30,7 +30,7 @@ class FFTSpecificScaleCalculatorFactory : { typedef DefaultFFTJetObjectFactory Base; friend class StaticFFTJetObjectFactory; - FFTSpecificScaleCalculatorFactory() = delete; + FFTSpecificScaleCalculatorFactory(); }; typedef StaticFFTJetObjectFactory diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h index 01866eb7b430e..768b5e2a696c8 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h @@ -13,7 +13,7 @@ class FFTJetCorrectorParametersLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTJetCorrectorParametersLoader() = delete; + FFTJetCorrectorParametersLoader(); }; typedef StaticFFTJetRcdMapper diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorSequenceLoader.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorSequenceLoader.h index ada4838993c9b..9c6db2a0eea48 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorSequenceLoader.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorSequenceLoader.h @@ -9,7 +9,7 @@ class FFTBasicJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTBasicJetCorrectorSequenceLoader() = delete; + FFTBasicJetCorrectorSequenceLoader(); }; typedef StaticFFTJetRcdMapper @@ -20,7 +20,7 @@ class FFTCaloJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTCaloJetCorrectorSequenceLoader() = delete; + FFTCaloJetCorrectorSequenceLoader(); }; typedef StaticFFTJetRcdMapper @@ -31,7 +31,7 @@ class FFTGenJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTGenJetCorrectorSequenceLoader() = delete; + FFTGenJetCorrectorSequenceLoader(); }; typedef StaticFFTJetRcdMapper @@ -42,7 +42,7 @@ class FFTPFJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTPFJetCorrectorSequenceLoader() = delete; + FFTPFJetCorrectorSequenceLoader(); }; typedef StaticFFTJetRcdMapper @@ -53,7 +53,7 @@ class FFTTrackJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTTrackJetCorrectorSequenceLoader() = delete; + FFTTrackJetCorrectorSequenceLoader(); }; typedef StaticFFTJetRcdMapper @@ -64,7 +64,7 @@ class FFTJPTJetCorrectorSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTJPTJetCorrectorSequenceLoader() = delete; + FFTJPTJetCorrectorSequenceLoader(); }; typedef StaticFFTJetRcdMapper diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableSequenceLoader.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableSequenceLoader.h index f2709c809b0b6..0cb028d937366 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableSequenceLoader.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetLookupTableSequenceLoader.h @@ -13,7 +13,7 @@ class FFTJetLookupTableSequenceLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTJetLookupTableSequenceLoader() = delete; + FFTJetLookupTableSequenceLoader(); }; typedef StaticFFTJetRcdMapper diff --git a/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h b/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h index 169f32116f1ee..5554ea7ef6c03 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h @@ -25,7 +25,7 @@ namespace npstat { { typedef gs::DefaultReader Base; friend class gs::StaticReader; - StorableMultivariateFunctorReader() = delete; + StorableMultivariateFunctorReader(); }; /** The reader factory for descendants of StorableMultivariateFunctor */ From d79bebbf6cb6d600826ab73f155397018eabc971 Mon Sep 17 00:00:00 2001 From: David Date: Sun, 5 Nov 2017 11:07:49 +0100 Subject: [PATCH 8/8] avoid clang confusion --- HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h | 2 +- .../FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h | 2 +- .../interface/StorableMultivariateFunctorReader.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h index 354c5a00a48b0..c92f7427056a2 100644 --- a/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h +++ b/HeavyFlavorAnalysis/RecoDecay/interface/BPHMultiSelect.h @@ -79,7 +79,7 @@ class BPHMultiSelect: public T { } /// accept function - bool accept( const reco::Candidate & cand, + bool accept( const reco::Candidate & cand, //NOLINT const BPHRecoBuilder* build ) const { return false; } //NOLINT bool accept( const reco::Candidate & cand ) const { return false; } //NOLINT bool accept( const BPHDecayMomentum& cand ) const { return false; } //NOLINT diff --git a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h index 768b5e2a696c8..c0d58b372d78f 100644 --- a/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h +++ b/JetMETCorrections/FFTJetObjects/interface/FFTJetCorrectorParametersLoader.h @@ -13,7 +13,7 @@ class FFTJetCorrectorParametersLoader : { typedef DefaultFFTJetRcdMapper Base; friend class StaticFFTJetRcdMapper; - FFTJetCorrectorParametersLoader(); + FFTJetCorrectorParametersLoader(); //NOLINT }; typedef StaticFFTJetRcdMapper diff --git a/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h b/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h index 5554ea7ef6c03..7020f4aef7ff9 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctorReader.h @@ -25,7 +25,7 @@ namespace npstat { { typedef gs::DefaultReader Base; friend class gs::StaticReader; - StorableMultivariateFunctorReader(); + StorableMultivariateFunctorReader(); //NOLINT }; /** The reader factory for descendants of StorableMultivariateFunctor */