From 576a70d64412333ef23b671fe728e8b06b73a5fc Mon Sep 17 00:00:00 2001 From: David Date: Thu, 5 Oct 2017 15:29:00 +0200 Subject: [PATCH] clang check Alignment --- .../interface/TrackerDetectorStruct.h | 40 +- .../interface/TrackerSectorStruct.h | 52 +- .../APEEstimation/plugins/ApeEstimator.cc | 50 +- .../plugins/ApeEstimatorSummary.cc | 52 +- .../CocoaApplication/src/CocoaAnalyzer.cc | 8 +- .../interface/CocoaSolidShapeBox.h | 2 +- .../interface/CocoaSolidShapeTubs.h | 2 +- Alignment/CocoaDaq/interface/CocoaDaqReader.h | 2 +- .../CocoaDaq/interface/CocoaDaqRootEvent.h | 12 +- Alignment/CocoaDaq/src/CocoaDaqReader.cc | 4 +- Alignment/CocoaFit/interface/Fit.h | 10 +- Alignment/CocoaFit/interface/NtupleObjects.h | 14 +- Alignment/CocoaFit/src/CocoaDBMgr.cc | 18 +- .../CocoaFit/src/FittedEntriesManager.cc | 2 +- Alignment/CocoaFit/src/FittedEntriesSet.cc | 4 +- Alignment/CocoaFit/src/FittedEntry.cc | 2 +- Alignment/CocoaFit/src/HistoDef.cc | 2 +- Alignment/CocoaFit/src/MatrixMeschach.cc | 2 +- Alignment/CocoaFit/src/NtupleManager.cc | 2 +- Alignment/CocoaModel/interface/ALILine.h | 4 +- .../CocoaModel/interface/CocoaDaqReaderRoot.h | 8 +- .../CocoaModel/interface/CocoaDaqReaderText.h | 6 +- Alignment/CocoaModel/interface/EntryAngle.h | 12 +- .../interface/EntryAngleAffAngles.h | 10 +- Alignment/CocoaModel/interface/EntryLength.h | 12 +- .../interface/EntryLengthAffCentre.h | 12 +- Alignment/CocoaModel/interface/EntryNoDim.h | 8 +- .../CocoaModel/interface/MeasurementCOPS.h | 12 +- .../interface/MeasurementDiffEntry.h | 6 +- .../interface/MeasurementDistancemeter.h | 8 +- .../interface/MeasurementDistancemeter3dim.h | 8 +- .../interface/MeasurementSensor2D.h | 8 +- .../interface/MeasurementTiltmeter.h | 8 +- Alignment/CocoaModel/interface/Model.h | 2 +- Alignment/CocoaModel/interface/OptOCOPS.h | 12 +- .../CocoaModel/interface/OptOCameraDetector.h | 6 +- .../CocoaModel/interface/OptOCubeSplitter.h | 12 +- .../CocoaModel/interface/OptODistancemeter.h | 8 +- .../interface/OptODistancemeter3dim.h | 8 +- Alignment/CocoaModel/interface/OptOLaser.h | 6 +- Alignment/CocoaModel/interface/OptOLens.h | 6 +- Alignment/CocoaModel/interface/OptOMirror.h | 14 +- .../interface/OptOModifiedRhomboidPrism.h | 12 +- .../CocoaModel/interface/OptOOpticalSquare.h | 12 +- Alignment/CocoaModel/interface/OptOPinhole.h | 6 +- .../CocoaModel/interface/OptOPlateSplitter.h | 12 +- .../CocoaModel/interface/OptORisleyPrism.h | 6 +- Alignment/CocoaModel/interface/OptOScreen.h | 6 +- Alignment/CocoaModel/interface/OptOSensor2D.h | 16 +- Alignment/CocoaModel/interface/OptOSource.h | 6 +- .../CocoaModel/interface/OptOTiltmeter.h | 8 +- .../CocoaModel/interface/OptOUserDefined.h | 4 +- Alignment/CocoaModel/interface/OptOXLaser.h | 6 +- .../CocoaModel/interface/OpticalObject.h | 2 +- .../CocoaModel/interface/OpticalObjectMgr.h | 4 +- Alignment/CocoaModel/src/ALIRmDataFromFile.cc | 6 +- .../CocoaModel/src/CocoaDaqReaderText.cc | 6 +- .../src/DeviationsFromFileSensor2D.cc | 8 +- Alignment/CocoaModel/src/Entry.cc | 6 +- Alignment/CocoaModel/src/EntryMgr.cc | 10 +- .../CocoaModel/src/ErrorCorrelationMgr.cc | 2 +- Alignment/CocoaModel/src/LightRay.cc | 6 +- Alignment/CocoaModel/src/Measurement.cc | 18 +- .../CocoaModel/src/MeasurementDiffEntry.cc | 2 +- .../src/MeasurementDistancemeter.cc | 4 +- .../src/MeasurementDistancemeter3dim.cc | 4 +- Alignment/CocoaModel/src/OptOCOPS.cc | 4 +- Alignment/CocoaModel/src/OptOCubeSplitter.cc | 8 +- Alignment/CocoaModel/src/OptODistancemeter.cc | 2 +- Alignment/CocoaModel/src/OptOMirror.cc | 10 +- .../src/OptOModifiedRhomboidPrism.cc | 16 +- Alignment/CocoaModel/src/OptOOpticalSquare.cc | 8 +- Alignment/CocoaModel/src/OptOPlateSplitter.cc | 10 +- Alignment/CocoaModel/src/OptOUserDefined.cc | 4 +- Alignment/CocoaModel/src/OpticalObjectMgr.cc | 10 +- Alignment/CocoaModel/src/ParameterMgr.cc | 2 +- Alignment/CocoaToDDL/src/CocoaToDDLMgr.cc | 6 +- Alignment/CocoaToDDL/src/CocoaUnitsTable.cc | 6 +- .../CocoaUtilities/interface/ALIFileOut.h | 2 +- Alignment/CocoaUtilities/interface/ALIUtils.h | 2 +- .../CocoaUtilities/interface/CocoaGlobals.h | 4 +- .../interface/GlobalOptionMgr.h | 2 +- Alignment/CocoaUtilities/src/ALIFileIn.cc | 6 +- Alignment/CocoaUtilities/src/ALIFileOut.cc | 2 +- Alignment/CocoaUtilities/src/ALIUtils.cc | 12 +- .../CocoaUtilities/src/GlobalOptionMgr.cc | 8 +- .../interface/AlignableComposite.h | 34 +- .../CommonAlignment/interface/AlignableDet.h | 12 +- .../interface/AlignableDetUnit.h | 42 +- .../interface/AlignmentParametersData.h | 2 +- .../CommonAlignment/plugins/APVModeFilter.cc | 6 +- .../plugins/MagneticFieldFilter.cc | 6 +- Alignment/CommonAlignment/src/AlignTools.cc | 2 +- .../CommonAlignment/src/AlignableComposite.cc | 4 +- Alignment/CommonAlignment/src/AlignableDet.cc | 8 +- .../CommonAlignment/src/AlignableDetUnit.cc | 20 +- .../CommonAlignment/src/AlignableModifier.cc | 2 +- .../CommonAlignment/src/AlignableObjectId.cc | 10 +- .../src/AlignmentParameters.cc | 10 +- .../CommonAlignment/src/SurveyResidual.cc | 4 +- Alignment/CommonAlignment/src/Utilities.cc | 4 +- .../interface/AlignableDataIORoot.h | 16 +- .../interface/AlignmentCorrelationsIORoot.h | 12 +- .../AlignmentExtendedCorrelationsStore.h | 14 +- .../interface/AlignmentIORootBase.h | 2 +- .../interface/AlignmentParameterSelector.h | 4 +- .../interface/AlignmentParametersIORoot.h | 12 +- .../interface/SelectionUserVariables.h | 4 +- .../plugins/ApeSettingAlgorithm.cc | 16 +- .../plugins/SiPixelLorentzAngleCalibration.cc | 32 +- .../plugins/SiStripBackplaneCalibration.cc | 36 +- .../plugins/SiStripLorentzAngleCalibration.cc | 32 +- .../src/AlignableDataIO.cc | 2 +- .../src/AlignableDataIORoot.cc | 4 +- .../src/AlignmentCorrelationsStore.cc | 12 +- .../src/AlignmentExtendedCorrelationsStore.cc | 12 +- .../src/AlignmentIORootBase.cc | 10 +- .../src/AlignmentParameterBuilder.cc | 6 +- .../src/AlignmentParameterStore.cc | 8 +- .../src/AlignmentParametersIO.cc | 4 +- .../src/AlignmentParametersIORoot.cc | 2 +- .../src/AlignmentUserVariablesIO.cc | 2 +- .../src/TkModuleGroupSelector.cc | 2 +- .../interface/AlignmentMonitorBase.h | 4 +- .../plugins/AlignmentMonitorGeneric.cc | 4 +- .../plugins/AlignmentMonitorGeneric.h | 6 +- .../plugins/AlignmentMonitorMuonResiduals.cc | 2 +- .../AlignmentMonitorMuonSystemMap1D.cc | 22 +- .../AlignmentMonitorMuonVsCurvature.cc | 16 +- .../AlignmentMonitorSegmentDifferences.cc | 14 +- .../plugins/AlignmentMonitorSurvey.cc | 2 +- .../plugins/AlignmentMonitorSurvey.h | 6 +- .../plugins/AlignmentMonitorTemplate.cc | 2 +- .../plugins/AlignmentStats.cc | 8 +- .../plugins/AlignmentStats.h | 8 +- .../plugins/TrackerToMuonPropagator.cc | 12 +- .../src/AlignmentMonitorBase.cc | 2 +- .../interface/BeamSpotAlignmentParameters.h | 22 +- .../BowedSurfaceAlignmentParameters.h | 18 +- .../interface/RigidBodyAlignmentParameters.h | 22 +- .../RigidBodyAlignmentParameters4D.h | 10 +- .../TwoBowedSurfacesAlignmentParameters.h | 18 +- .../src/AlignmentParametersFactory.cc | 2 +- .../src/BeamSpotAlignmentParameters.cc | 2 +- .../src/BowedSurfaceAlignmentDerivatives.cc | 2 +- .../src/CompositeAlignmentParameters.cc | 2 +- .../src/RigidBodyAlignmentParameters.cc | 2 +- .../TwoBowedSurfacesAlignmentParameters.cc | 2 +- .../AlignmentTwoBodyDecayTrackSelector.h | 2 +- .../AlignmentMuonHIPTrajectorySelector.cc | 6 +- .../plugins/AlignmentProducer.h | 30 +- .../plugins/AlignmentProducerAsAnalyzer.h | 26 +- .../plugins/FakeAlignmentProducer.cc | 2 +- .../plugins/FakeAlignmentSource.cc | 4 +- .../plugins/LSNumberFilter.cc | 8 +- .../src/AlignmentGlobalTrackSelector.cc | 2 +- .../src/AlignmentProducerBase.cc | 8 +- .../src/AlignmentTrackSelector.cc | 20 +- .../src/AlignmentTwoBoyDecayTrackSelector.cc | 8 +- Alignment/Geners/src/AbsArchive.cc | 4 +- Alignment/Geners/src/AbsReference.cc | 6 +- Alignment/Geners/src/BZ2Handle.cc | 16 +- Alignment/Geners/src/BinaryArchiveBase.cc | 16 +- Alignment/Geners/src/BinaryFileArchive.cc | 18 +- Alignment/Geners/src/CStringStream.cc | 2 +- Alignment/Geners/src/CatalogEntry.cc | 4 +- Alignment/Geners/src/ClassId.cc | 2 +- Alignment/Geners/src/ContiguousCatalog.cc | 2 +- Alignment/Geners/src/GeneralCatalog.cc | 2 +- Alignment/Geners/src/ItemLocation.cc | 4 +- Alignment/Geners/src/MultiFileArchive.cc | 24 +- Alignment/Geners/src/stringArchiveIO.cc | 2 +- .../interface/HIPAlignmentAlgorithm.h | 10 +- .../interface/HIPUserVariables.h | 4 +- .../interface/HIPUserVariablesIORoot.h | 12 +- .../interface/LhcTrackAnalyzer.h | 8 +- .../plugins/HIPTwoBodyDecayAnalyzer.cc | 8 +- .../src/HIPAlignableSpecificParameters.cc | 2 +- .../src/HIPAlignmentAlgorithm.cc | 8 +- .../src/HIPUserVariablesIORoot.cc | 2 +- .../LaserAlignment/plugins/LaserAlignment.cc | 12 +- .../plugins/LaserAlignmentEventFilter.h | 4 +- .../plugins/LaserAlignmentT0Producer.h | 8 +- .../plugins/RawDataConverter.cc | 4 +- .../LaserAlignment/plugins/RawDataConverter.h | 10 +- .../LaserAlignment/plugins/TkLasBeamFitter.cc | 26 +- .../interface/LaserBeamsBarrel.h | 4 +- .../interface/LaserBeamsTEC1.h | 4 +- .../interface/LaserBeamsTEC2.h | 4 +- .../interface/LaserOpticalPhysicsList.h | 6 +- .../interface/LaserPrimaryGeneratorAction.h | 4 +- .../interface/LaserSteppingAction.h | 4 +- .../interface/LaserSteppingVerbose.h | 6 +- .../interface/LaserTrackingAction.h | 6 +- .../plugins/LaserAlignmentProducer.cc | 2 +- .../plugins/LaserAlignmentProducer.h | 4 +- .../plugins/LaserAlignmentSimulation.cc | 8 +- .../plugins/LaserAlignmentSimulation.h | 16 +- .../src/LaserBeamsBarrel.cc | 8 +- .../src/LaserBeamsTEC1.cc | 8 +- .../src/LaserBeamsTEC2.cc | 8 +- .../src/LaserOpticalPhysicsList.cc | 12 +- .../src/LaserPrimaryGeneratorAction.cc | 6 +- .../src/LaserSteppingVerbose.cc | 6 +- .../src/MaterialProperties.cc | 8 +- Alignment/LaserDQM/plugins/LaserDQM.cc | 870 +++++++++--------- Alignment/LaserDQM/plugins/LaserDQM.h | 8 +- .../interface/MillePedeVariables.h | 4 +- .../interface/MillePedeVariablesIORoot.h | 14 +- .../plugins/MillePedeAlignmentAlgorithm.cc | 24 +- .../plugins/MillePedeAlignmentAlgorithm.h | 28 +- .../plugins/MillePedeDQMModule.h | 6 +- .../plugins/MillePedeFileConverter.h | 8 +- .../plugins/MillePedeFileExtractor.cc | 2 +- .../plugins/MillePedeFileExtractor.h | 8 +- .../plugins/MomentumDependentPedeLabeler.h | 26 +- .../plugins/PedeLabeler.h | 26 +- .../plugins/RunRangeDependentPedeLabeler.h | 28 +- .../ZMuMuMassConstraintParameterFinder.cc | 4 +- .../src/MillePedeVariablesIORoot.cc | 2 +- .../src/PedeLabelerBase.cc | 2 +- .../src/PedeReader.cc | 2 +- .../src/PedeSteererWeakModeConstraints.cc | 10 +- .../interface/AlignableCSCEndcap.h | 10 +- .../interface/AlignableCSCRing.h | 6 +- .../interface/AlignableCSCStation.h | 6 +- .../interface/AlignableDTBarrel.h | 10 +- .../interface/AlignableDTStation.h | 6 +- .../interface/AlignableDTWheel.h | 6 +- .../MuonAlignment/interface/AlignableMuon.h | 10 +- .../interface/MuonAlignmentInputDB.h | 4 +- .../interface/MuonAlignmentInputMethod.h | 4 +- .../interface/MuonAlignmentInputSurveyDB.h | 8 +- .../interface/MuonAlignmentInputXML.h | 8 +- .../interface/MuonAlignmentOutputXML.h | 4 +- .../interface/MuonScenarioBuilder.h | 4 +- .../plugins/MuonGeometryArrange.cc | 24 +- .../plugins/MuonGeometryArrange.h | 6 +- .../plugins/MuonGeometryDBConverter.cc | 6 +- .../plugins/MuonGeometrySVGTemplate.cc | 4 +- .../plugins/MuonGeometrySanityCheck.cc | 24 +- Alignment/MuonAlignment/src/AlignableMuon.cc | 2 +- Alignment/MuonAlignment/src/MuonAlignment.cc | 10 +- .../src/MuonAlignmentInputXML.cc | 208 ++--- .../src/MuonAlignmentOutputXML.cc | 6 +- .../interface/MuonCSCChamberResidual.h | 4 +- .../interface/MuonDT13ChamberResidual.h | 4 +- .../interface/MuonDT2ChamberResidual.h | 4 +- .../interface/MuonResiduals1DOFFitter.h | 14 +- .../interface/MuonResiduals5DOFFitter.h | 18 +- .../interface/MuonResiduals6DOFFitter.h | 18 +- .../interface/MuonResiduals6DOFrphiFitter.h | 18 +- .../interface/MuonResidualsAngleFitter.h | 14 +- .../MuonResidualsBfieldAngleFitter.h | 14 +- .../interface/MuonResidualsPositionFitter.h | 14 +- .../interface/MuonResidualsTwoBin.h | 4 +- .../interface/MuonTrackCSCChamberResidual.h | 4 +- .../interface/MuonTrackDT13ChamberResidual.h | 4 +- .../interface/MuonTrackDT2ChamberResidual.h | 4 +- .../plugins/CSCAlignmentCorrections.cc | 4 +- .../plugins/CSCChamberFitter.cc | 12 +- .../plugins/CSCOverlapsAlignmentAlgorithm.cc | 92 +- .../plugins/CSCOverlapsAlignmentAlgorithm.h | 8 +- .../plugins/CSCOverlapsBeamSplashCut.cc | 8 +- .../plugins/CSCOverlapsTrackPreparation.cc | 10 +- .../plugins/CSCPairResidualsConstraint.cc | 6 +- .../plugins/CSCPairResidualsConstraint.h | 10 +- .../plugins/MuonAlignmentFromReference.cc | 20 +- .../plugins/MuonAlignmentPreFilter.cc | 8 +- .../plugins/MuonMillepedeAlgorithm.h | 8 +- .../plugins/MuonMillepedeTrackRefitter.h | 4 +- .../src/DTMuonLocalAlignment.cc | 2 +- .../src/MuonResiduals1DOFFitter.cc | 2 +- .../src/MuonResiduals5DOFFitter.cc | 6 +- .../src/MuonResiduals6DOFFitter.cc | 10 +- .../src/MuonResiduals6DOFrphiFitter.cc | 6 +- .../src/MuonResidualsAngleFitter.cc | 2 +- .../src/MuonResidualsBfieldAngleFitter.cc | 2 +- .../src/MuonResidualsFitter.cc | 8 +- .../src/MuonResidualsFromTrack.cc | 18 +- .../src/MuonResidualsPositionFitter.cc | 2 +- .../src/MuonTrackCSCChamberResidual.cc | 2 +- .../src/MuonTrackDT13ChamberResidual.cc | 2 +- .../src/MuonTrackDT2ChamberResidual.cc | 2 +- .../MuonAlignmentAlgorithms/src/ReadPGInfo.cc | 10 +- .../plugins/CosmicSplitterValidation.cc | 16 +- .../plugins/EopTreeWriter.cc | 14 +- .../plugins/MuonAlignmentAnalyzer.cc | 244 ++--- .../plugins/MuonAlignmentAnalyzer.h | 8 +- .../plugins/ResidualRefitting.cc | 8 +- .../plugins/ResidualRefitting.h | 8 +- .../OfflineValidation/plugins/TkAlStyle.cc | 4 +- .../plugins/TrackerOfflineValidation.cc | 30 +- .../TrackerOfflineValidationSummary.cc | 26 +- .../plugins/Tracker_OldtoNewConverter.cc | 10 +- .../plugins/ValidationMisalignedTracker.cc | 8 +- .../plugins/ValidationMisalignedTracker.h | 6 +- .../src/TrackerValidationVariables.cc | 8 +- .../interface/BeamSpotGeomDet.h | 6 +- .../BeamSpotTransientTrackingRecHit.h | 24 +- .../interface/BzeroReferenceTrajectory.h | 4 +- .../interface/DualBzeroReferenceTrajectory.h | 6 +- .../interface/DualReferenceTrajectory.h | 4 +- .../interface/ReferenceTrajectory.h | 4 +- .../interface/ReferenceTrajectoryBase.h | 2 +- .../interface/TwoBodyDecayTrajectory.h | 4 +- .../plugins/BzeroReferenceTrajectoryFactory.h | 12 +- .../plugins/CombinedTrajectoryFactory.cc | 8 +- .../plugins/DualBzeroTrajectoryFactory.cc | 8 +- .../plugins/DualTrajectoryFactory.cc | 8 +- .../plugins/ReferenceTrajectoryFactory.cc | 12 +- .../plugins/TwoBodyDecayTrajectoryFactory.cc | 8 +- .../src/ReferenceTrajectory.cc | 4 +- .../interface/SurveyAlignmentPoints.h | 4 +- .../interface/SurveyAlignmentSensor.h | 4 +- .../interface/SurveyInputBase.h | 8 +- .../interface/SurveyParameters.h | 20 +- .../SurveyAnalysis/plugins/CreateSurveyRcds.h | 4 +- .../SurveyAnalysis/plugins/DTSurveyConvert.h | 2 +- .../plugins/SurveyAlignmentAlgorithm.h | 10 +- .../plugins/SurveyDBUploader.cc | 4 +- .../SurveyAnalysis/plugins/SurveyDBUploader.h | 6 +- .../plugins/SurveyDataConverter.h | 4 +- .../plugins/SurveyInputCSCfromPins.cc | 6 +- .../plugins/SurveyInputCSCfromPins.h | 2 +- .../plugins/SurveyInputTrackerFromDB.h | 4 +- .../plugins/SurveyMisalignmentInput.h | 4 +- Alignment/SurveyAnalysis/src/DTSurvey.cc | 2 +- .../SurveyAnalysis/src/SurveyInputBase.cc | 6 +- .../SurveyAnalysis/src/SurveyParameters.cc | 4 +- .../interface/AlignableSiStripDet.h | 4 +- .../interface/AlignableTracker.h | 6 +- .../interface/TrackerAlignableIndexer.h | 2 +- .../interface/TrackerScenarioBuilder.h | 8 +- .../plugins/AlignmentPrescaler.cc | 14 +- .../plugins/AlignmentPrescaler.h | 8 +- .../plugins/CosmicRateAnalyzer.cc | 14 +- .../plugins/CreateTrackerAlignmentRcds.cc | 4 +- .../plugins/MisalignedTrackerESProducer.cc | 2 +- .../plugins/TkAlCaOverlapTagger.cc | 18 +- .../plugins/TkAlCaSkimTreeMerger.cc | 28 +- .../plugins/TrackerSystematicMisalignments.cc | 2 +- .../plugins/TrackerSystematicMisalignments.h | 4 +- .../plugins/TrackerTreeGenerator.cc | 8 +- .../src/AlignableTrackerBuilder.cc | 2 +- 345 files changed, 2212 insertions(+), 2212 deletions(-) diff --git a/Alignment/APEEstimation/interface/TrackerDetectorStruct.h b/Alignment/APEEstimation/interface/TrackerDetectorStruct.h index 1c4faf0644c81..aa788d8c008d0 100644 --- a/Alignment/APEEstimation/interface/TrackerDetectorStruct.h +++ b/Alignment/APEEstimation/interface/TrackerDetectorStruct.h @@ -6,26 +6,26 @@ struct TrackerDetectorStruct{ - TrackerDetectorStruct(): TrkSize(0), TrkSizeGood(0), - HitsSize(0), HitsValid(0), HitsInvalid(0), Hits2D(0), - HitsGood(0), LayersMissed(0), - HitsPixel(0), HitsStrip(0), - Charge(0), - Chi2(0), Ndof(0), NorChi2(0), Prob(0), - Eta(0), EtaErr(0), EtaSig(0), Theta(0), - Phi(0), PhiErr(0), PhiSig(0), - D0Beamspot(0), D0BeamspotErr(0), D0BeamspotSig(0), - Dz(0), DzErr(0), DzSig(0), - P(0), Pt(0), PtErr(0), PtSig(0), - MeanAngle(0), - HitsGoodVsHitsValid(0), MeanAngleVsHits(0), - HitsPixelVsEta(0), HitsPixelVsTheta(0), - HitsStripVsEta(0), HitsStripVsTheta(0), - PtVsEta(0), PtVsTheta(0), - PHitsGoodVsHitsValid(0), PMeanAngleVsHits(0), - PHitsPixelVsEta(0), PHitsPixelVsTheta(0), - PHitsStripVsEta(0), PHitsStripVsTheta(0), - PPtVsEta(0), PPtVsTheta(0){} + TrackerDetectorStruct(): TrkSize(nullptr), TrkSizeGood(nullptr), + HitsSize(nullptr), HitsValid(nullptr), HitsInvalid(nullptr), Hits2D(nullptr), + HitsGood(nullptr), LayersMissed(nullptr), + HitsPixel(nullptr), HitsStrip(nullptr), + Charge(nullptr), + Chi2(nullptr), Ndof(nullptr), NorChi2(nullptr), Prob(nullptr), + Eta(nullptr), EtaErr(nullptr), EtaSig(nullptr), Theta(nullptr), + Phi(nullptr), PhiErr(nullptr), PhiSig(nullptr), + D0Beamspot(nullptr), D0BeamspotErr(nullptr), D0BeamspotSig(nullptr), + Dz(nullptr), DzErr(nullptr), DzSig(nullptr), + P(nullptr), Pt(nullptr), PtErr(nullptr), PtSig(nullptr), + MeanAngle(nullptr), + HitsGoodVsHitsValid(nullptr), MeanAngleVsHits(nullptr), + HitsPixelVsEta(nullptr), HitsPixelVsTheta(nullptr), + HitsStripVsEta(nullptr), HitsStripVsTheta(nullptr), + PtVsEta(nullptr), PtVsTheta(nullptr), + PHitsGoodVsHitsValid(nullptr), PMeanAngleVsHits(nullptr), + PHitsPixelVsEta(nullptr), PHitsPixelVsTheta(nullptr), + PHitsStripVsEta(nullptr), PHitsStripVsTheta(nullptr), + PPtVsEta(nullptr), PPtVsTheta(nullptr){} TH1 *TrkSize, *TrkSizeGood, *HitsSize, *HitsValid, *HitsInvalid, *Hits2D, diff --git a/Alignment/APEEstimation/interface/TrackerSectorStruct.h b/Alignment/APEEstimation/interface/TrackerSectorStruct.h index b4dd4dd271f13..81c718d4cc14d 100644 --- a/Alignment/APEEstimation/interface/TrackerSectorStruct.h +++ b/Alignment/APEEstimation/interface/TrackerSectorStruct.h @@ -42,11 +42,11 @@ class TrackerSectorStruct{ struct CorrelationHists{ - CorrelationHists():Variable(0), - NorResXVsVar(0), ProbXVsVar(0), - SigmaXHitVsVar(0), SigmaXTrkVsVar(0), SigmaXVsVar(0), - PNorResXVsVar(0), PProbXVsVar(0), - PSigmaXHitVsVar(0), PSigmaXTrkVsVar(0), PSigmaXVsVar(0){}; + CorrelationHists():Variable(nullptr), + NorResXVsVar(nullptr), ProbXVsVar(nullptr), + SigmaXHitVsVar(nullptr), SigmaXTrkVsVar(nullptr), SigmaXVsVar(nullptr), + PNorResXVsVar(nullptr), PProbXVsVar(nullptr), + PSigmaXHitVsVar(nullptr), PSigmaXTrkVsVar(nullptr), PSigmaXVsVar(nullptr){}; inline void fillCorrHists(const TString, const TrackStruct::HitParameterStruct& hitParameterStruct, double variable); inline void fillCorrHistsX(const TrackStruct::HitParameterStruct& hitParameterStruct, double variable); @@ -126,26 +126,26 @@ class TrackerSectorStruct{ -TrackerSectorStruct::TrackerSectorStruct(): directory_(0), +TrackerSectorStruct::TrackerSectorStruct(): directory_(nullptr), norResXMax_(999.), sigmaXHitMax_(999.), sigmaXMax_(999.), - name("default"), Name(0), - ResX(0), NorResX(0), XHit(0), XTrk(0), - SigmaX2(0), ProbX(0), - WidthVsPhiSensX(0), WidthVsWidthProjected(0), WidthDiffVsMaxStrip(0), WidthDiffVsSigmaXHit(0), - PhiSensXVsBarycentreX(0), - PWidthVsPhiSensX(0), PWidthVsWidthProjected(0), PWidthDiffVsMaxStrip(0), PWidthDiffVsSigmaXHit(0), - PPhiSensXVsBarycentreX(0), - ResY(0), NorResY(0), YHit(0), YTrk(0), - SigmaY2(0), ProbY(0), - PhiSensYVsBarycentreY(0), - PPhiSensYVsBarycentreY(0), - RawId(0), - EntriesX(0), - MeanX(0), RmsX(0), FitMeanX1(0), ResidualWidthX1(0), CorrectionX1(0), - FitMeanX2(0), ResidualWidthX2(0), CorrectionX2(0), - EntriesY(0), - MeanY(0), RmsY(0), FitMeanY1(0), ResidualWidthY1(0), CorrectionY1(0), - FitMeanY2(0), ResidualWidthY2(0), CorrectionY2(0), + name("default"), Name(nullptr), + ResX(nullptr), NorResX(nullptr), XHit(nullptr), XTrk(nullptr), + SigmaX2(nullptr), ProbX(nullptr), + WidthVsPhiSensX(nullptr), WidthVsWidthProjected(nullptr), WidthDiffVsMaxStrip(nullptr), WidthDiffVsSigmaXHit(nullptr), + PhiSensXVsBarycentreX(nullptr), + PWidthVsPhiSensX(nullptr), PWidthVsWidthProjected(nullptr), PWidthDiffVsMaxStrip(nullptr), PWidthDiffVsSigmaXHit(nullptr), + PPhiSensXVsBarycentreX(nullptr), + ResY(nullptr), NorResY(nullptr), YHit(nullptr), YTrk(nullptr), + SigmaY2(nullptr), ProbY(nullptr), + PhiSensYVsBarycentreY(nullptr), + PPhiSensYVsBarycentreY(nullptr), + RawId(nullptr), + EntriesX(nullptr), + MeanX(nullptr), RmsX(nullptr), FitMeanX1(nullptr), ResidualWidthX1(nullptr), CorrectionX1(nullptr), + FitMeanX2(nullptr), ResidualWidthX2(nullptr), CorrectionX2(nullptr), + EntriesY(nullptr), + MeanY(nullptr), RmsY(nullptr), FitMeanY1(nullptr), ResidualWidthY1(nullptr), CorrectionY1(nullptr), + FitMeanY2(nullptr), ResidualWidthY2(nullptr), CorrectionY2(nullptr), isPixel(false){} @@ -185,7 +185,7 @@ TrackerSectorStruct::bookCorrHists(TString xY,TString varName,TString varTitle,T suffix = "_y"; } - std::string o(options); + const std::string& o(options); CorrelationHists correlationHists; if(!(o.find("n") != std::string::npos || o.find("p") != std::string::npos || o.find("h") != std::string::npos || @@ -244,7 +244,7 @@ TrackerSectorStruct::bookCorrHists(TString xY,TString varName,TString labelX,TSt xy = "y"; } - std::string o(options); + const std::string& o(options); CorrelationHists correlationHists; if(!(o.find("n") != std::string::npos || o.find("p") != std::string::npos || o.find("h") != std::string::npos || diff --git a/Alignment/APEEstimation/plugins/ApeEstimator.cc b/Alignment/APEEstimation/plugins/ApeEstimator.cc index 6162953a38b65..7cf0db8cbaffe 100644 --- a/Alignment/APEEstimation/plugins/ApeEstimator.cc +++ b/Alignment/APEEstimation/plugins/ApeEstimator.cc @@ -129,7 +129,7 @@ class ApeEstimator : public edm::EDAnalyzer { public: explicit ApeEstimator(const edm::ParameterSet&); - ~ApeEstimator(); + ~ApeEstimator() override; private: @@ -143,9 +143,9 @@ class ApeEstimator : public edm::EDAnalyzer { }; typedef std::pair StatePositionAndError2; - 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; bool isHit2D(const TrackingRecHit&)const; @@ -257,7 +257,7 @@ ApeEstimator::sectorBuilder(){ edm::LogError("SectorBuilder")<<"TrackerTreeFile not found"; return; } - TTree* tkTree(0); + TTree* tkTree(nullptr); tkTreeFile->GetObject("TrackerTreeGenerator/TrackerTree/TrackerTree",tkTree); if(tkTree){ edm::LogInfo("SectorBuilder")<<"TrackerTree OK"; @@ -425,7 +425,7 @@ ApeEstimator::sectorBuilder(){ bool ApeEstimator::checkIntervalsForSectors(const unsigned int sectorCounter, const std::vector& v_id)const{ - if(v_id.size()==0)return true; + if(v_id.empty())return true; if(v_id.size()%2==1){ edm::LogError("SectorBuilder")<<"Incorrect Sector Definition: Position Vectors need even number of arguments (Intervals)" <<"\n... sector selection is not applied, sector "<& v_id)const{ - if(v_id.size()==0)return true; + if(v_id.empty())return true; for(std::vector::const_iterator i_id = v_id.begin(); i_id != v_id.end(); ++i_id){ if(id==*i_id)return true; } @@ -455,7 +455,7 @@ ApeEstimator::checkModuleIds(const unsigned int id, const std::vector& v_id)const{ - if(v_id.size()==0)return true; + if(v_id.empty())return true; for(std::vector::const_iterator i_id = v_id.begin(); i_id != v_id.end(); ++i_id){ if(1==*i_id && id)return true; if(2==*i_id && !id)return true; @@ -465,7 +465,7 @@ ApeEstimator::checkModuleBools(const bool id, const std::vector& v bool ApeEstimator::checkModuleDirections(const int id, const std::vector& v_id)const{ - if(v_id.size()==0)return true; + if(v_id.empty())return true; for(std::vector::const_iterator i_id = v_id.begin(); i_id != v_id.end(); ++i_id){ if(id==*i_id)return true; } @@ -474,7 +474,7 @@ ApeEstimator::checkModuleDirections(const int id, const std::vector& v_id)c bool ApeEstimator::checkModulePositions(const float id, const std::vector& v_id)const{ - if(v_id.size()==0)return true; + if(v_id.empty())return true; int entry(1); double intervalBegin(999.); for(std::vector::const_iterator i_id = v_id.begin(); i_id != v_id.end(); ++i_id, ++entry){ if(entry%2==1)intervalBegin = *i_id; @@ -600,13 +600,13 @@ ApeEstimator::bookSectorHistsForAnalyzerMode(){ } std::stringstream sector; sector << "Sector_" << (*i_sector).first; - TFileDirectory secDir = fileService->mkdir(sector.str().c_str()); + TFileDirectory secDir = fileService->mkdir(sector.str()); // Dummy histo containing the sector name as title (*i_sector).second.Name = secDir.make("z_name",(*i_sector).second.name.c_str(),1,0,1); // Do not book histos for empty sectors - if((*i_sector).second.v_rawId.size()==0){ + if((*i_sector).second.v_rawId.empty()){ continue; } // Set parameters for correlationHists @@ -799,23 +799,23 @@ ApeEstimator::bookSectorHistsForApeCalculation(){ } std::stringstream sector; sector << "Sector_" << (*i_sector).first; - TFileDirectory secDir = fileService->mkdir(sector.str().c_str()); + TFileDirectory secDir = fileService->mkdir(sector.str()); // Dummy histo containing the sector name as title (*i_sector).second.Name = secDir.make("z_name",(*i_sector).second.name.c_str(),1,0,1); // Do not book histos for empty sectors - if((*i_sector).second.v_rawId.size()==0){ + if((*i_sector).second.v_rawId.empty()){ continue; } // Distributions in each interval (stay in [cm], to have all calculations in [cm]) - if(m_resErrBins_.size()==0){m_resErrBins_[1].first = 0.;m_resErrBins_[1].second = 0.01;} // default if no selection taken into account: calculate APE with one bin with residual error 0-100um + if(m_resErrBins_.empty()){m_resErrBins_[1].first = 0.;m_resErrBins_[1].second = 0.01;} // default if no selection taken into account: calculate APE with one bin with residual error 0-100um for(std::map >::const_iterator i_errBins = m_resErrBins_.begin(); i_errBins != m_resErrBins_.end(); ++i_errBins){ std::stringstream interval; interval << "Interval_" << (*i_errBins).first; - TFileDirectory intDir = secDir.mkdir(interval.str().c_str()); + TFileDirectory intDir = secDir.mkdir(interval.str()); (*i_sector).second.m_binnedHists[(*i_errBins).first]["sigmaX"] = intDir.make("h_sigmaX","residual resolution #sigma_{x};#sigma_{x} [cm];# hits",100,0.,0.01); (*i_sector).second.m_binnedHists[(*i_errBins).first]["norResX"] = intDir.make("h_norResX","normalized residual r_{x}/#sigma_{r,x};(x_{trk}-x_{hit})/#sigma_{r,x};# hits",100,-10,10); if((*i_sector).second.isPixel){ @@ -1240,7 +1240,7 @@ ApeEstimator::fillHitVariables(const TrajectoryMeasurement& i_meas, const edm::E edm::LogError("FillHitVariables")<<"RecHit in Strip is 'Matched' or 'Projected', but here all should be monohits per module"; hitParams.hitState = TrackStruct::invalid; return hitParams; } - const SiStripCluster* clusterPtr(0); + const SiStripCluster* clusterPtr(nullptr); if(m_tkTreeVar_[rawId].subdetId==StripSubdetector::TIB || m_tkTreeVar_[rawId].subdetId==StripSubdetector::TOB){ if(dynamic_cast(&recHit)){ const SiStripRecHit1D& stripHit = dynamic_cast(recHit); @@ -1344,7 +1344,7 @@ ApeEstimator::fillHitVariables(const TrajectoryMeasurement& i_meas, const edm::E if(!hitParams.isModuleUsable){hitParams.hitState = TrackStruct::invalid; return hitParams;} - if(0==hitParams.v_sector.size()){hitParams.hitState = TrackStruct::notAssignedToSectors; return hitParams;} + if(hitParams.v_sector.empty()){hitParams.hitState = TrackStruct::notAssignedToSectors; return hitParams;} return hitParams; //} @@ -1515,7 +1515,7 @@ ApeEstimator::hitSelection(){ edm::LogInfo("HitSelector")<<"applying hit cuts ..."; bool emptyMap(true); for(std::map >::iterator i_hitSelection = m_hitSelection_.begin(); i_hitSelection != m_hitSelection_.end(); ++i_hitSelection){ - if(0 < (*i_hitSelection).second.size()){ + if(!(*i_hitSelection).second.empty()){ int entry(1); double intervalBegin(999.); for(std::vector::iterator i_hitInterval = (*i_hitSelection).second.begin(); i_hitInterval != (*i_hitSelection).second.end(); ++entry){ if(entry%2==1){intervalBegin = *i_hitInterval; ++i_hitInterval;} @@ -1530,14 +1530,14 @@ ApeEstimator::hitSelection(){ } } } - if(0 < (*i_hitSelection).second.size())emptyMap = false; + if(!(*i_hitSelection).second.empty())emptyMap = false; } } bool emptyMapUInt(true); for(std::map >::iterator i_hitSelection = m_hitSelectionUInt_.begin(); i_hitSelection != m_hitSelectionUInt_.end(); ++i_hitSelection){ - if(0 < (*i_hitSelection).second.size()){ + if(!(*i_hitSelection).second.empty()){ int entry(1); unsigned int intervalBegin(999); for(std::vector::iterator i_hitInterval = (*i_hitSelection).second.begin(); i_hitInterval != (*i_hitSelection).second.end(); ++entry){ if(entry%2==1){intervalBegin = *i_hitInterval; ++i_hitInterval;} @@ -1552,7 +1552,7 @@ ApeEstimator::hitSelection(){ } } } - if(0 < (*i_hitSelection).second.size())emptyMapUInt = false; + if(!(*i_hitSelection).second.empty())emptyMapUInt = false; } } @@ -1613,7 +1613,7 @@ ApeEstimator::hitSelected(TrackStruct::HitParameterStruct& hitParams)const{ for(std::map >::const_iterator i_hitSelection = m_hitSelection_.begin(); i_hitSelection != m_hitSelection_.end(); ++i_hitSelection){ const std::string& hitSelection((*i_hitSelection).first); const std::vector& v_hitSelection((*i_hitSelection).second); - if(v_hitSelection.size()==0)continue; + if(v_hitSelection.empty())continue; // For pixel and strip sectors in common if (hitSelection == "phiSens") {if(!this->inDoubleInterval(v_hitSelection, hitParams.phiSens))isGoodHit = false;} @@ -1667,7 +1667,7 @@ ApeEstimator::hitSelected(TrackStruct::HitParameterStruct& hitParams)const{ for(std::map >::const_iterator i_hitSelection = m_hitSelectionUInt_.begin(); i_hitSelection != m_hitSelectionUInt_.end(); ++i_hitSelection){ const std::string& hitSelection((*i_hitSelection).first); const std::vector& v_hitSelection((*i_hitSelection).second); - if(v_hitSelection.size()==0)continue; + if(v_hitSelection.empty())continue; // For pixel and strip sectors in common @@ -2197,7 +2197,7 @@ ApeEstimator::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) if(analyzerMode_)this->fillHistsForAnalyzerMode(trackStruct); if(calculateApe_)this->fillHistsForApeCalculation(trackStruct); - if(trackStruct.v_hitParams.size()>0)++trackSizeGood; + if(!trackStruct.v_hitParams.empty())++trackSizeGood; } if(analyzerMode_ && trackSizeGood>0)tkDetector_.TrkSizeGood->Fill(trackSizeGood); } diff --git a/Alignment/APEEstimation/plugins/ApeEstimatorSummary.cc b/Alignment/APEEstimation/plugins/ApeEstimatorSummary.cc index f7f8c471ff4f7..4bb1f9213251d 100644 --- a/Alignment/APEEstimation/plugins/ApeEstimatorSummary.cc +++ b/Alignment/APEEstimation/plugins/ApeEstimatorSummary.cc @@ -62,13 +62,13 @@ class ApeEstimatorSummary : public edm::EDAnalyzer { public: explicit ApeEstimatorSummary(const edm::ParameterSet&); - ~ApeEstimatorSummary(); + ~ApeEstimatorSummary() 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 ; void openInputFile(); void getTrackerSectorStructs(); @@ -104,7 +104,7 @@ class ApeEstimatorSummary : public edm::EDAnalyzer { // ApeEstimatorSummary::ApeEstimatorSummary(const edm::ParameterSet& iConfig): parameterSet_(iConfig), -inputFile_(0) +inputFile_(nullptr) { } @@ -148,7 +148,7 @@ ApeEstimatorSummary::getTrackerSectorStructs(){ TString pluginName(inputFile_->GetListOfKeys()->At(0)->GetName()); pluginName += "/"; - TDirectory *sectorDir(0), *intervalDir(0); + TDirectory *sectorDir(nullptr), *intervalDir(nullptr); bool sectorBool(true); for(unsigned int iSector(1);sectorBool;++iSector){ std::stringstream sectorName, fullSectorName; @@ -182,7 +182,7 @@ ApeEstimatorSummary::getTrackerSectorStructs(){ if(iSector==1)edm::LogInfo("CalculateAPE")<<"There are "<GetObject("h_entriesX;1", tkSector.EntriesX); if(tkSector.isPixel)resultsDir->GetObject("h_entriesY;1", tkSector.EntriesY); - TTree* rawIdTree(0); + TTree* rawIdTree(nullptr); resultsDir->GetObject("rawIdTree", rawIdTree); unsigned int rawId(0); rawIdTree->SetBranchAddress("RawId", &rawId); @@ -304,10 +304,10 @@ ApeEstimatorSummary::calculateApe(){ // Read in baseline file for calculation of APE value (if not setting baseline) // Has same format as iterationFile const std::string baselineFileName(parameterSet_.getParameter("BaselineFile")); - TFile* baselineFile(0); - TTree* baselineTreeX(0); - TTree* baselineTreeY(0); - TTree* sectorNameBaselineTree(0); + TFile* baselineFile(nullptr); + TTree* baselineTreeX(nullptr); + TTree* baselineTreeY(nullptr); + TTree* sectorNameBaselineTree(nullptr); if(!setBaseline){ std::ifstream baselineFileStream; // Check if baseline file exists @@ -334,12 +334,12 @@ ApeEstimatorSummary::calculateApe(){ // Set up TTree for iterative APE values on first pass (first iteration) or read from file (further iterations) - TTree* iterationTreeX(0); - TTree* iterationTreeY(0); + TTree* iterationTreeX(nullptr); + TTree* iterationTreeY(nullptr); iterationFile->GetObject("iterTreeX;1",iterationTreeX); iterationFile->GetObject("iterTreeY;1",iterationTreeY); // The same for TTree containing the names of the sectors (no additional check, since always handled exactly as iterationTree) - TTree* sectorNameTree(0); + TTree* sectorNameTree(nullptr); iterationFile->GetObject("nameTree;1",sectorNameTree); bool firstIter(false); @@ -381,8 +381,8 @@ ApeEstimatorSummary::calculateApe(){ a_baselineSectorX[iSector] = -99.; a_baselineSectorY[iSector] = -99.; - a_sectorName[iSector] = 0; - a_sectorBaselineName[iSector] = 0; + a_sectorName[iSector] = nullptr; + a_sectorBaselineName[iSector] = nullptr; std::stringstream ss_sector, ss_sectorSuffixed; ss_sector << "Ape_Sector_" << iSector; if(!setBaseline && baselineTreeX){ @@ -697,12 +697,12 @@ ApeEstimatorSummary::calculateApe(){ // Do the final calculations - if(v_weightAndResultsPerBinX.size()==0){ + if(v_weightAndResultsPerBinX.empty()){ edm::LogError("CalculateAPE")<<"NO error interval of sector "<<(*i_sector).first<<" has a valid x APE calculated,\n...so cannot set APE"; continue; } - if((*i_sector).second.isPixel && v_weightAndResultsPerBinY.size()==0){ + if((*i_sector).second.isPixel && v_weightAndResultsPerBinY.empty()){ edm::LogError("CalculateAPE")<<"NO error interval of sector "<<(*i_sector).first<<" has a valid y APE calculated,\n...so cannot set APE"; continue; } @@ -875,8 +875,8 @@ ApeEstimatorSummary::analyze(const edm::Event& iEvent, const edm::EventSetup& iS // Read in baseline file for calculation of APE value (if not setting baseline) // Has same format as iterationFile const std::string baselineFileName(parameterSet_.getParameter("BaselineFile")); - TFile* baselineFile(0); - TTree* sectorNameBaselineTree(0); + TFile* baselineFile(nullptr); + TTree* sectorNameBaselineTree(nullptr); if(!setBaseline){ std::ifstream baselineFileStream; // Check if baseline file exists @@ -899,12 +899,12 @@ ApeEstimatorSummary::analyze(const edm::Event& iEvent, const edm::EventSetup& iS TFile* defaultFile = new TFile(defaultFileName.c_str(),"RECREATE"); // Naming in the root files has to be iterTreeX to be consistent for the plotting tool - TTree* defaultTreeX(0); - TTree* defaultTreeY(0); + TTree* defaultTreeX(nullptr); + TTree* defaultTreeY(nullptr); defaultFile->GetObject("iterTreeX;1",defaultTreeX); defaultFile->GetObject("iterTreeY;1",defaultTreeY); // The same for TTree containing the names of the sectors (no additional check, since always handled exactly as defaultTree) - TTree* sectorNameTree(0); + TTree* sectorNameTree(nullptr); defaultFile->GetObject("nameTree;1",sectorNameTree); bool firstIter(false); @@ -933,8 +933,8 @@ ApeEstimatorSummary::analyze(const edm::Event& iEvent, const edm::EventSetup& iS a_defaultSectorX[iSector] = -99.; a_defaultSectorY[iSector] = -99.; - a_sectorName[iSector] = 0; - a_sectorBaselineName[iSector] = 0; + a_sectorName[iSector] = nullptr; + a_sectorBaselineName[iSector] = nullptr; std::stringstream ss_sector, ss_sectorSuffixed; ss_sector << "Ape_Sector_" << iSector; if(!setBaseline && sectorNameBaselineTree){ diff --git a/Alignment/CocoaApplication/src/CocoaAnalyzer.cc b/Alignment/CocoaApplication/src/CocoaAnalyzer.cc index c58add045c12a..d20690aa4d014 100644 --- a/Alignment/CocoaApplication/src/CocoaAnalyzer.cc +++ b/Alignment/CocoaApplication/src/CocoaAnalyzer.cc @@ -177,8 +177,8 @@ void CocoaAnalyzer::ReadXMLFile( const edm::EventSetup& evts ) DDTranslation transl = (fv.translation()); DDRotationMatrix rot = (fv.rotation()); DDExpandedNode parent = fv.geoHistory()[ fv.geoHistory().size()-2 ]; - DDTranslation parentTransl = parent.absTranslation(); - DDRotationMatrix parentRot = parent.absRotation(); + const DDTranslation& parentTransl = parent.absTranslation(); + const DDRotationMatrix& parentRot = parent.absRotation(); transl = parentRot.Inverse()*(transl - parentTransl ); rot = parentRot.Inverse()*rot; rot = rot.Inverse(); //DDL uses opposite convention than COCOA @@ -474,7 +474,7 @@ void CocoaAnalyzer::CorrectOptAlignments( std::vector& oaListC OpticalAlignInfo oaInfoDB = *it; OpticalAlignInfo* oaInfoXML = FindOpticalAlignInfoXML( oaInfoDB ); std::cerr << "error " << (*it).name_ << std::endl; - if( oaInfoXML == 0 ) { + if( oaInfoXML == nullptr ) { if(ALIUtils::debug >= 2) { std::cerr << "@@@@@ WARNING CocoaAnalyzer::CorrectOptAlignments: OpticalAlignInfo read from DB is not present in XML "<< *it << std::endl; } @@ -523,7 +523,7 @@ void CocoaAnalyzer::CorrectOptAlignments( std::vector& oaListC //------------------------------------------------------------------------ OpticalAlignInfo* CocoaAnalyzer::FindOpticalAlignInfoXML( const OpticalAlignInfo& oaInfo ) { - OpticalAlignInfo* oaInfoXML = 0; + OpticalAlignInfo* oaInfoXML = nullptr; std::vector::iterator it; for( it=oaList_.opticalAlignments_.begin();it!=oaList_.opticalAlignments_.end(); ++it ){ std::string oaName = oaInfo.name_.substr( 1, oaInfo.name_.size()-2 ); diff --git a/Alignment/CocoaDDLObjects/interface/CocoaSolidShapeBox.h b/Alignment/CocoaDDLObjects/interface/CocoaSolidShapeBox.h index cc2400eed09fb..6c2a7b8ef6c15 100644 --- a/Alignment/CocoaDDLObjects/interface/CocoaSolidShapeBox.h +++ b/Alignment/CocoaDDLObjects/interface/CocoaSolidShapeBox.h @@ -17,7 +17,7 @@ class CocoaSolidShapeBox : public CocoaSolidShape public: //---------- Constructors / Destructor CocoaSolidShapeBox( ALIstring type, ALIfloat xdim, ALIfloat ydim, ALIfloat zdim ); - ~CocoaSolidShapeBox(){ }; + ~CocoaSolidShapeBox() override{ }; ALIfloat getXHalfLength() const { return theXHalfLength; } diff --git a/Alignment/CocoaDDLObjects/interface/CocoaSolidShapeTubs.h b/Alignment/CocoaDDLObjects/interface/CocoaSolidShapeTubs.h index 57f27266283bd..7fdb1686c4a2d 100644 --- a/Alignment/CocoaDDLObjects/interface/CocoaSolidShapeTubs.h +++ b/Alignment/CocoaDDLObjects/interface/CocoaSolidShapeTubs.h @@ -17,7 +17,7 @@ class CocoaSolidShapeTubs : public CocoaSolidShape public: //---------- Constructors / Destructor CocoaSolidShapeTubs( const ALIstring pType, ALIfloat pRMin, ALIfloat pRMax, ALIfloat pDz, ALIfloat pSPhi = 0.*deg, ALIfloat pDPhi = 360.*deg ); - ~CocoaSolidShapeTubs(){ }; + ~CocoaSolidShapeTubs() override{ }; ALIfloat getInnerRadius() const { return theInnerRadius; } ALIfloat getOuterRadius() const { diff --git a/Alignment/CocoaDaq/interface/CocoaDaqReader.h b/Alignment/CocoaDaq/interface/CocoaDaqReader.h index 865a40cba5432..933b619fa159a 100644 --- a/Alignment/CocoaDaq/interface/CocoaDaqReader.h +++ b/Alignment/CocoaDaq/interface/CocoaDaqReader.h @@ -16,7 +16,7 @@ class CocoaDaqReader { virtual ~CocoaDaqReader(){ }; virtual bool ReadNextEvent() = 0; - virtual bool ReadEvent( int nev ){ return 0; }; + virtual bool ReadEvent( int nev ){ return false; }; virtual void BuildMeasurementsFromOptAlign( std::vector& measList ); public: diff --git a/Alignment/CocoaDaq/interface/CocoaDaqRootEvent.h b/Alignment/CocoaDaq/interface/CocoaDaqRootEvent.h index 3df6af12ba942..28631dea30b51 100644 --- a/Alignment/CocoaDaq/interface/CocoaDaqRootEvent.h +++ b/Alignment/CocoaDaq/interface/CocoaDaqRootEvent.h @@ -49,7 +49,7 @@ class AliDaqPosition2D : public TObject { public: AliDaqPosition2D() : fX(0), fY(0), fX_error(0), fY_error(0), fID(""), fTimeStamp(0) { } - virtual ~AliDaqPosition2D() { } + ~AliDaqPosition2D() override { } Float_t GetX() const { return fX; } Float_t GetY() const { return fY; } Float_t GetXerror() const { return fX_error; } @@ -83,7 +83,7 @@ class AliDaqPositionCOPS : public TObject { fDCOPS_up_error(0), fDCOPS_down_error(0), fDCOPS_left_error(0), fDCOPS_right_error(0), fID(""), fTimeStamp(0) { } - virtual ~AliDaqPositionCOPS() { } + ~AliDaqPositionCOPS() override { } Float_t GetUp() const { return fDCOPS_up; } Float_t GetDown() const { return fDCOPS_down; } Float_t GetLeft() const { return fDCOPS_left; } @@ -111,7 +111,7 @@ class AliDaqTilt : public TObject { public: AliDaqTilt() : fTilt(0), fTilt_error(0), fID(""), fTimeStamp(0) { } - virtual ~AliDaqTilt() { } + ~AliDaqTilt() override { } Float_t GetTilt() const { return fTilt; } Float_t GetTiltError() const { return fTilt_error; } TString GetID() { return fID; } @@ -133,7 +133,7 @@ class AliDaqDistance : public TObject { public: AliDaqDistance() : fDistance(0), fDistance_error(0), fID(""), fTimeStamp(0) { } - virtual ~AliDaqDistance() { } + ~AliDaqDistance() override { } Float_t GetDistance() const { return fDistance; } Float_t GetDistanceError() const { return fDistance_error; } TString GetID() { return fID; } @@ -156,7 +156,7 @@ class AliDaqTemperature : public TObject { public: AliDaqTemperature() : fTemperature(0), fTemperature_error(0), fID(""), fTimeStamp(0) { } - virtual ~AliDaqTemperature() { } + ~AliDaqTemperature() override { } Float_t GetTemperature() const { return fTemperature; } Float_t GetTemperatureError() const { return fTemperature_error; } TString GetID() { return fID; } @@ -197,7 +197,7 @@ class CocoaDaqRootEvent : public TObject { public: CocoaDaqRootEvent(); - virtual ~CocoaDaqRootEvent() { }; + ~CocoaDaqRootEvent() override { }; void SetHeader(int run, int evt) {Header->SetRunEvt(run,evt); } void DumpIt(); diff --git a/Alignment/CocoaDaq/src/CocoaDaqReader.cc b/Alignment/CocoaDaq/src/CocoaDaqReader.cc index 79763a36d5841..c73fa248c10b3 100644 --- a/Alignment/CocoaDaq/src/CocoaDaqReader.cc +++ b/Alignment/CocoaDaq/src/CocoaDaqReader.cc @@ -1,12 +1,12 @@ #include "CondFormats/OptAlignObjects/interface/OpticalAlignMeasurements.h" #include "Alignment/CocoaDaq/interface/CocoaDaqReader.h" -CocoaDaqReader* CocoaDaqReader::theDaqReader = 0; +CocoaDaqReader* CocoaDaqReader::theDaqReader = nullptr; //---------------------------------------------------------------------- void CocoaDaqReader::SetDaqReader( CocoaDaqReader* reader ) { - if( theDaqReader != 0 ) { + if( theDaqReader != nullptr ) { std::cerr << "!!FATAL ERROR CocoaDaqReader:: trying to instantiate two CocoaDaqReader " << std::endl; std::exception(); } diff --git a/Alignment/CocoaFit/interface/Fit.h b/Alignment/CocoaFit/interface/Fit.h index 2de8ba8dac0ec..9dffdf7aef152 100644 --- a/Alignment/CocoaFit/interface/Fit.h +++ b/Alignment/CocoaFit/interface/Fit.h @@ -48,12 +48,12 @@ class Fit //deprecated static void dumpFittedEntries(); //----- Dump all the entries of all the objects - static void dumpFittedValues( ALIFileOut& fileout, ALIbool printErrors = 1, ALIbool printOrig = 1 ); - static void dumpFittedValuesInAllAncestorFrames( ALIFileOut& fileout, ALIbool printErrors = 1, ALIbool printOrig = 1 ); - static void dumpEntryAfterFit( ALIFileOut& fileout, const Entry* entry, double entryvalue, ALIbool printErrors = 1, ALIbool printOrig = 1 ); + static void dumpFittedValues( ALIFileOut& fileout, ALIbool printErrors = true, ALIbool printOrig = true ); + static void dumpFittedValuesInAllAncestorFrames( ALIFileOut& fileout, ALIbool printErrors = true, ALIbool printOrig = true ); + static void dumpEntryAfterFit( ALIFileOut& fileout, const Entry* entry, double entryvalue, ALIbool printErrors = true, ALIbool printOrig = true ); static void dumpEntryCorrelations( ALIFileOut& file ); - static void printCentreInOptOFrame( const OpticalObject* opto, const OpticalObject* optoAncestor, ALIFileOut& fileout, ALIbool printErrors = 1, ALIbool printOrig = 1 ); - static void printRotationAnglesInOptOFrame( const OpticalObject* opto, const OpticalObject* optoAncestor, ALIFileOut& fileout, ALIbool printErrors = 1, ALIbool printOrig = 1 ); + static void printCentreInOptOFrame( const OpticalObject* opto, const OpticalObject* optoAncestor, ALIFileOut& fileout, ALIbool printErrors = true, ALIbool printOrig = true ); + static void printRotationAnglesInOptOFrame( const OpticalObject* opto, const OpticalObject* optoAncestor, ALIFileOut& fileout, ALIbool printErrors = true, ALIbool printOrig = true ); //----- Dump matrices used for the fit static void dumpMatrices(); diff --git a/Alignment/CocoaFit/interface/NtupleObjects.h b/Alignment/CocoaFit/interface/NtupleObjects.h index 43036417b83f9..77ff344729848 100644 --- a/Alignment/CocoaFit/interface/NtupleObjects.h +++ b/Alignment/CocoaFit/interface/NtupleObjects.h @@ -15,7 +15,7 @@ class FitParam : public TObject { public: FitParam(); - ~FitParam() {} + ~FitParam() override {} double InitialValue; double FittedValue; double InitialSigma; @@ -31,7 +31,7 @@ class OptObject : public TObject { public: OptObject(); - ~OptObject() {} + ~OptObject() override {} double CentreGlobal[3]; double AnglesGlobal[3]; double CentreLocal[3]; @@ -47,7 +47,7 @@ class Sensor2DMeas : public TObject { public: Sensor2DMeas(); - ~Sensor2DMeas() {} + ~Sensor2DMeas() override {} double Position[2]; double PosError[2]; double SimulatedPosition[2]; @@ -61,7 +61,7 @@ class DistancemeterMeas : public TObject { public: DistancemeterMeas(); - ~DistancemeterMeas() {} + ~DistancemeterMeas() override {} double Distance; double DisError; double SimulatedDistance; @@ -75,7 +75,7 @@ class Distancemeter1DimMeas : public TObject { public: Distancemeter1DimMeas(); - ~Distancemeter1DimMeas() {} + ~Distancemeter1DimMeas() override {} double Distance; double DisError; double SimulatedDistance; @@ -89,7 +89,7 @@ class TiltmeterMeas : public TObject { public: TiltmeterMeas(); - ~TiltmeterMeas() {} + ~TiltmeterMeas() override {} double Angle; double AngError; double SimulatedAngle; @@ -103,7 +103,7 @@ class CopsMeas : public TObject { public: CopsMeas(); - ~CopsMeas() {} + ~CopsMeas() override {} double Position[4]; double PosError[4]; double SimulatedPosition[4]; diff --git a/Alignment/CocoaFit/src/CocoaDBMgr.cc b/Alignment/CocoaFit/src/CocoaDBMgr.cc index 97dbaa14eab35..c6c2a278dc935 100644 --- a/Alignment/CocoaFit/src/CocoaDBMgr.cc +++ b/Alignment/CocoaFit/src/CocoaDBMgr.cc @@ -31,7 +31,7 @@ #include "CondCore/CondDB/interface/Serialization.h" -CocoaDBMgr* CocoaDBMgr::instance = 0; +CocoaDBMgr* CocoaDBMgr::instance = nullptr; //---------------------------------------------------------------------- CocoaDBMgr* CocoaDBMgr::getInstance() @@ -98,7 +98,7 @@ bool CocoaDBMgr::DumpCocoaResults() if( gomgr->GlobalOptions()["writeDBAlign"] > 0) { // Build DT alignments and errors - std::pair< Alignments*,AlignmentErrorsExtended*> dtali = BuildAlignments(1); + std::pair< Alignments*,AlignmentErrorsExtended*> dtali = BuildAlignments(true); Alignments* dt_Alignments = dtali.first; AlignmentErrorsExtended* dt_AlignmentErrors = dtali.second; @@ -131,7 +131,7 @@ bool CocoaDBMgr::DumpCocoaResults() if(ALIUtils::debug >= 2) std::cout << "DTAlignmentErrorExtendedRcd WRITTEN TO DB : "<< nrcd << std::endl; // Build CSC alignments and errors - std::pair< Alignments*,AlignmentErrorsExtended*> cscali = BuildAlignments(0); + std::pair< Alignments*,AlignmentErrorsExtended*> cscali = BuildAlignments(false); Alignments* csc_Alignments = cscali.first; AlignmentErrorsExtended* csc_AlignmentErrors = cscali.second; @@ -185,7 +185,7 @@ OpticalAlignInfo CocoaDBMgr::GetOptAlignInfoFromOptO( OpticalObject* opto ) CLHEP::HepRotation parentRmGlobInv = inverseOf( opto->parent()->rmGlob() ); centreLocal = parentRmGlobInv * centreLocal; - const std::vector< Entry* > theCoordinateEntryVector = opto->CoordinateEntryList(); + const std::vector< Entry* >& theCoordinateEntryVector = opto->CoordinateEntryList(); std::cout << " CocoaDBMgr::GetOptAlignInfoFromOptO starting coord " < theExtraEntryVector = opto->ExtraEntryList(); std::cout << " CocoaDBMgr::GetOptAlignInfoFromOptO starting entry " << std::endl; + const std::vector< Entry* >& theExtraEntryVector = opto->ExtraEntryList(); std::cout << " CocoaDBMgr::GetOptAlignInfoFromOptO starting entry " << std::endl; std::vector< Entry* >::const_iterator ite; for( ite = theExtraEntryVector.begin(); ite != theExtraEntryVector.end(); ++ite ) { @@ -316,8 +316,8 @@ AlignTransform* CocoaDBMgr::GetAlignInfoFromOptO( OpticalObject* opto ) { if(ALIUtils::debug >= 3) std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptO " << opto->name() << std::endl; - AlignTransform::Translation trans = opto->centreGlob(); - AlignTransform::Rotation rot = opto->rmGlob(); + const AlignTransform::Translation& trans = opto->centreGlob(); + const AlignTransform::Rotation& rot = opto->rmGlob(); align::ID cmsswID = opto->getCmsswID(); std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptO buildalign" << opto->name() << std::endl; @@ -348,7 +348,7 @@ AlignTransformErrorExtended* CocoaDBMgr::GetAlignInfoErrorFromOptO( OpticalObjec return alignError; CLHEP::HepMatrix errm(3,3); - const std::vector< Entry* > theCoordinateEntryVector = opto->CoordinateEntryList(); + const std::vector< Entry* >& theCoordinateEntryVector = opto->CoordinateEntryList(); std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptOfill errm " << opto->name() << std::endl; errm(0,0) = GetEntryError( theCoordinateEntryVector[0] ) / 100.; // in cm errm(1,1) = GetEntryError( theCoordinateEntryVector[1] ) / 100.; // in cm @@ -370,7 +370,7 @@ std::cout << "@@@ CocoaDBMgr::GetAlignInfoFromOptO errms filled " << opto->name( std::cout << alignError << "@@@ CocoaDBMgr::GetAlignInfoFromOptO error built " << opto->name() << std::endl; //t return alignError; - return (AlignTransformErrorExtended*)(0); + return (AlignTransformErrorExtended*)nullptr; } diff --git a/Alignment/CocoaFit/src/FittedEntriesManager.cc b/Alignment/CocoaFit/src/FittedEntriesManager.cc index 183a7cafb5a71..7a8b3a1c7f7fb 100644 --- a/Alignment/CocoaFit/src/FittedEntriesManager.cc +++ b/Alignment/CocoaFit/src/FittedEntriesManager.cc @@ -14,7 +14,7 @@ #include "Alignment/CocoaUtilities/interface/ALIUtils.h" #include "Alignment/CocoaUtilities/interface/GlobalOptionMgr.h" -FittedEntriesManager* FittedEntriesManager::instance = 0; +FittedEntriesManager* FittedEntriesManager::instance = nullptr; //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //@@ Gets the only instance of Model diff --git a/Alignment/CocoaFit/src/FittedEntriesSet.cc b/Alignment/CocoaFit/src/FittedEntriesSet.cc index 0ad2e90631e80..f37e7b202de06 100644 --- a/Alignment/CocoaFit/src/FittedEntriesSet.cc +++ b/Alignment/CocoaFit/src/FittedEntriesSet.cc @@ -40,7 +40,7 @@ FittedEntriesSet::FittedEntriesSet( const std::vector& wl ) theTime = "99:99"; theMinEntryQuality = 2; - theEntriesErrorMatrix = (MatrixMeschach*)0; + theEntriesErrorMatrix = (MatrixMeschach*)nullptr; FillEntriesFromFile( wl ); @@ -53,7 +53,7 @@ FittedEntriesSet::FittedEntriesSet( const std::vector& vSets theTime = "99:99"; theMinEntryQuality = 2; - theEntriesErrorMatrix = (MatrixMeschach*)0; + theEntriesErrorMatrix = (MatrixMeschach*)nullptr; FillEntriesAveragingSets( vSets ); diff --git a/Alignment/CocoaFit/src/FittedEntry.cc b/Alignment/CocoaFit/src/FittedEntry.cc index 0394382be301c..5bf6b7f398673 100644 --- a/Alignment/CocoaFit/src/FittedEntry.cc +++ b/Alignment/CocoaFit/src/FittedEntry.cc @@ -57,7 +57,7 @@ FittedEntry::FittedEntry( ALIstring name, float value, float sigma) // std::cout << " building theEntryName " << theEntryName << " " << pointold << " " << name << std::endl; Entry* entry = Model::getEntryByName( theOptOName, theEntryName ); - theEntry = 0; + theEntry = nullptr; //------ store values and sigmas in dimensions indicated by global options ALIdouble dimv = entry->OutputValueDimensionFactor(); diff --git a/Alignment/CocoaFit/src/HistoDef.cc b/Alignment/CocoaFit/src/HistoDef.cc index 306edda1e2950..1a8c692b3c7a6 100644 --- a/Alignment/CocoaFit/src/HistoDef.cc +++ b/Alignment/CocoaFit/src/HistoDef.cc @@ -6,7 +6,7 @@ // Pedro Arce #include "Alignment/CocoaFit/interface/HistoDef.h" -#include +#include //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2 void HistoDef::init( ALIstring name) diff --git a/Alignment/CocoaFit/src/MatrixMeschach.cc b/Alignment/CocoaFit/src/MatrixMeschach.cc index e8e6b01aeda46..6b66808bd5cd2 100644 --- a/Alignment/CocoaFit/src/MatrixMeschach.cc +++ b/Alignment/CocoaFit/src/MatrixMeschach.cc @@ -186,7 +186,7 @@ MatrixMeschach operator+( const MatrixMeschach& mat1, const MatrixMeschach& mat2 MatrixMeschach operator-( const MatrixMeschach& mat1, const MatrixMeschach& mat2 ) { MatrixMeschach matout( mat1 ); - MatrixMeschach matout2( mat2 ); + const MatrixMeschach& matout2( mat2 ); matout += (-1 * matout2); return MatrixMeschach( matout ); } diff --git a/Alignment/CocoaFit/src/NtupleManager.cc b/Alignment/CocoaFit/src/NtupleManager.cc index 68a4ec26e49d6..16c104f749ea6 100644 --- a/Alignment/CocoaFit/src/NtupleManager.cc +++ b/Alignment/CocoaFit/src/NtupleManager.cc @@ -21,7 +21,7 @@ #include "TClonesArray.h" //#include "TMath.h" -NtupleManager* NtupleManager::instance = 0; +NtupleManager* NtupleManager::instance = nullptr; //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ //@@ Gets the only instance of Model diff --git a/Alignment/CocoaModel/interface/ALILine.h b/Alignment/CocoaModel/interface/ALILine.h index 1671d7b02a4d5..16fabd5570e3a 100644 --- a/Alignment/CocoaModel/interface/ALILine.h +++ b/Alignment/CocoaModel/interface/ALILine.h @@ -22,8 +22,8 @@ class ALILine { // Next 1 line was added with 22 Mar 2001 // CLHEP::Hep3Vector ALILine( const ALILine& l2, bool notParallel = 0); //0 - CLHEP::Hep3Vector intersect( const ALILine& l2, bool notParallel = 0); - CLHEP::Hep3Vector intersect( const ALIPlane& plane, bool notParallel = 1); + CLHEP::Hep3Vector intersect( const ALILine& l2, bool notParallel = false); + CLHEP::Hep3Vector intersect( const ALIPlane& plane, bool notParallel = true); const CLHEP::Hep3Vector& pt() const {return _point;}; const CLHEP::Hep3Vector& vec() const {return _direction;}; diff --git a/Alignment/CocoaModel/interface/CocoaDaqReaderRoot.h b/Alignment/CocoaModel/interface/CocoaDaqReaderRoot.h index ee5656c1e2bea..95f7a09dac4bf 100644 --- a/Alignment/CocoaModel/interface/CocoaDaqReaderRoot.h +++ b/Alignment/CocoaModel/interface/CocoaDaqReaderRoot.h @@ -13,10 +13,10 @@ class OpticalAlignMeasurementInfo; class CocoaDaqReaderRoot : public CocoaDaqReader { public: CocoaDaqReaderRoot(const std::string& m_inFileName ); - ~CocoaDaqReaderRoot(); - virtual bool ReadNextEvent() override; - virtual bool ReadEvent( int nev ) override; - virtual void BuildMeasurementsFromOptAlign( std::vector& measList ) override; + ~CocoaDaqReaderRoot() override; + bool ReadNextEvent() override; + bool ReadEvent( int nev ) override; + void BuildMeasurementsFromOptAlign( std::vector& measList ) override; public: int GetNEvents() const { return nev; } diff --git a/Alignment/CocoaModel/interface/CocoaDaqReaderText.h b/Alignment/CocoaModel/interface/CocoaDaqReaderText.h index 46b01a29717b2..c7e1db81074ff 100644 --- a/Alignment/CocoaModel/interface/CocoaDaqReaderText.h +++ b/Alignment/CocoaModel/interface/CocoaDaqReaderText.h @@ -12,10 +12,10 @@ class CocoaDaqReaderText : public CocoaDaqReader { public: CocoaDaqReaderText(const std::string& fileName ); - virtual ~CocoaDaqReaderText(); + ~CocoaDaqReaderText() override; - virtual bool ReadNextEvent(); - virtual void BuildMeasurementsFromOptAlign( std::vector& measList ); + bool ReadNextEvent() override; + void BuildMeasurementsFromOptAlign( std::vector& measList ) override; public: int GetNEvents() const { return nev; } diff --git a/Alignment/CocoaModel/interface/EntryAngle.h b/Alignment/CocoaModel/interface/EntryAngle.h index 16b6dc9534d77..5c51c891ef2c1 100644 --- a/Alignment/CocoaModel/interface/EntryAngle.h +++ b/Alignment/CocoaModel/interface/EntryAngle.h @@ -21,24 +21,24 @@ class EntryAngle : public Entry theDimType = ED_angle; //- std::cout << "entryangle " << type << std::endl; }; - ~EntryAngle(){}; + ~EntryAngle() override{}; //----- Return value and sigma dimension factors - virtual ALIdouble ValueDimensionFactor() const{ + ALIdouble ValueDimensionFactor() const override{ return ALIUtils::AngleValueDimensionFactor(); } - virtual ALIdouble SigmaDimensionFactor() const{ + ALIdouble SigmaDimensionFactor() const override{ return ALIUtils::AngleSigmaDimensionFactor(); } - virtual ALIdouble OutputValueDimensionFactor() const{ + ALIdouble OutputValueDimensionFactor() const override{ return ALIUtils::OutputAngleValueDimensionFactor(); } - virtual ALIdouble OutputSigmaDimensionFactor() const{ + ALIdouble OutputSigmaDimensionFactor() const override{ return ALIUtils::OutputAngleSigmaDimensionFactor(); } //----- Return starting displacement for derivative - virtual ALIdouble startingDisplacement() { + ALIdouble startingDisplacement() override { return _startingDisplacement; } diff --git a/Alignment/CocoaModel/interface/EntryAngleAffAngles.h b/Alignment/CocoaModel/interface/EntryAngleAffAngles.h index 08923273e1d41..dfa0054852534 100644 --- a/Alignment/CocoaModel/interface/EntryAngleAffAngles.h +++ b/Alignment/CocoaModel/interface/EntryAngleAffAngles.h @@ -17,13 +17,13 @@ class EntryAngleAffAngles : public EntryAngle { public: EntryAngleAffAngles( const ALIstring& type ); - ~EntryAngleAffAngles(){}; + ~EntryAngleAffAngles() override{}; virtual void FillName( const ALIstring& name ); - virtual void displace( ALIdouble disp ); - virtual void displaceOriginal( ALIdouble disp ); - virtual void displaceOriginalOriginal( ALIdouble disp ); - virtual ALIdouble valueDisplaced() const; + void displace( ALIdouble disp ) override; + void displaceOriginal( ALIdouble disp ) override; + void displaceOriginalOriginal( ALIdouble disp ) override; + ALIdouble valueDisplaced() const override; ALIdouble checkDiff( const CLHEP::Hep3Vector& axis, const CLHEP::Hep3Vector& axisOrig,const std::vector& localrot, const std::vector& localrotorig ) const; }; diff --git a/Alignment/CocoaModel/interface/EntryLength.h b/Alignment/CocoaModel/interface/EntryLength.h index 14c23d6b4b0fe..0cfc888269320 100644 --- a/Alignment/CocoaModel/interface/EntryLength.h +++ b/Alignment/CocoaModel/interface/EntryLength.h @@ -22,24 +22,24 @@ class EntryLength : public Entry // std::cout << "entrylength" << std::endl; theDimType = ED_length; }; - ~EntryLength(){}; + ~EntryLength() override{}; //----- Return value and sigma dimension factors - virtual ALIdouble ValueDimensionFactor() const{ + ALIdouble ValueDimensionFactor() const override{ return ALIUtils::LengthValueDimensionFactor(); } - virtual ALIdouble SigmaDimensionFactor() const{ + ALIdouble SigmaDimensionFactor() const override{ return ALIUtils::LengthSigmaDimensionFactor(); } - virtual ALIdouble OutputValueDimensionFactor() const{ + ALIdouble OutputValueDimensionFactor() const override{ return ALIUtils::OutputLengthValueDimensionFactor(); } - virtual ALIdouble OutputSigmaDimensionFactor() const{ + ALIdouble OutputSigmaDimensionFactor() const override{ return ALIUtils::OutputLengthSigmaDimensionFactor(); } //----- Return starting displacement for derivative - virtual ALIdouble startingDisplacement() { + ALIdouble startingDisplacement() override { return _startingDisplacement; } diff --git a/Alignment/CocoaModel/interface/EntryLengthAffCentre.h b/Alignment/CocoaModel/interface/EntryLengthAffCentre.h index ba54a031b6d13..7d1fc511cf99c 100644 --- a/Alignment/CocoaModel/interface/EntryLengthAffCentre.h +++ b/Alignment/CocoaModel/interface/EntryLengthAffCentre.h @@ -17,14 +17,14 @@ class EntryLengthAffCentre : public EntryLength { public: EntryLengthAffCentre( const ALIstring& type ); - ~EntryLengthAffCentre(){}; + ~EntryLengthAffCentre() override{}; virtual void FillName( const ALIstring& name ); - virtual void displace( ALIdouble disp ); - virtual void displaceOriginal( ALIdouble disp ); - virtual void displaceOriginalOriginal( ALIdouble disp ); - virtual ALIdouble valueInGlobalReferenceFrame() const; - virtual ALIdouble valueDisplaced() const; + void displace( ALIdouble disp ) override; + void displaceOriginal( ALIdouble disp ) override; + void displaceOriginalOriginal( ALIdouble disp ) override; + ALIdouble valueInGlobalReferenceFrame() const override; + ALIdouble valueDisplaced() const override; }; diff --git a/Alignment/CocoaModel/interface/EntryNoDim.h b/Alignment/CocoaModel/interface/EntryNoDim.h index 87550cce2bc03..d28081a57669e 100644 --- a/Alignment/CocoaModel/interface/EntryNoDim.h +++ b/Alignment/CocoaModel/interface/EntryNoDim.h @@ -20,18 +20,18 @@ class EntryNoDim : public Entry theDimType = ED_nodim; //std::cout << "entryNoDim" << std::endl; }; - ~EntryNoDim(){}; + ~EntryNoDim() override{}; // Access DATA MEMBERS //----------- Return value and sigma dimension factors (1. as object of this class have no dimension) - virtual ALIdouble ValueDimensionFactor() const{ + ALIdouble ValueDimensionFactor() const override{ return 1.0; } - virtual ALIdouble SigmaDimensionFactor() const{ + ALIdouble SigmaDimensionFactor() const override{ return 1.0; } //----- Return starting displacement for derivative - virtual ALIdouble startingDisplacement() { + ALIdouble startingDisplacement() override { return 0.1; } }; diff --git a/Alignment/CocoaModel/interface/MeasurementCOPS.h b/Alignment/CocoaModel/interface/MeasurementCOPS.h index a13cfcdd8581b..83d72e6923c14 100644 --- a/Alignment/CocoaModel/interface/MeasurementCOPS.h +++ b/Alignment/CocoaModel/interface/MeasurementCOPS.h @@ -23,20 +23,20 @@ class MeasurementCOPS : public Measurement for(unsigned int ii=0; ii<4; ii++) theXlaserLine[ii] = -1; }; MeasurementCOPS(){ }; - ~MeasurementCOPS(){ }; + ~MeasurementCOPS() override{ }; // Get simulated value (called every time a parameter is displaced) - virtual void calculateSimulatedValue( ALIbool firstTime ); + void calculateSimulatedValue( ALIbool firstTime ) override; //---------- Add any correction between the measurement data and the default format in COCOA - virtual void correctValueAndSigma(); + void correctValueAndSigma() override; //---------- Convert from V to rad - virtual void setConversionFactor( const std::vector& wordlist ); - virtual int xlaserLine( unsigned int ii) { + void setConversionFactor( const std::vector& wordlist ) override; + int xlaserLine( unsigned int ii) override { return theXlaserLine[ii]; } - virtual void setXlaserLine( unsigned int ii, int val) { + void setXlaserLine( unsigned int ii, int val) override { theXlaserLine[ii] = val;}; private: diff --git a/Alignment/CocoaModel/interface/MeasurementDiffEntry.h b/Alignment/CocoaModel/interface/MeasurementDiffEntry.h index eded2e3dd6b85..b63d0842a7708 100644 --- a/Alignment/CocoaModel/interface/MeasurementDiffEntry.h +++ b/Alignment/CocoaModel/interface/MeasurementDiffEntry.h @@ -21,13 +21,13 @@ class MeasurementDiffEntry : public Measurement MeasurementDiffEntry( const ALIint measdim, ALIstring& type, ALIstring& name ) : Measurement( measdim, type, name ){}; MeasurementDiffEntry(){ }; - ~MeasurementDiffEntry(){ }; + ~MeasurementDiffEntry() override{ }; // separate OptO names and Entry names - virtual void buildOptONamesList( const std::vector& wl ); + void buildOptONamesList( const std::vector& wl ) override; // Get simulated value (called every time a parameter is displaced) - virtual void calculateSimulatedValue( ALIbool firstTime ); + void calculateSimulatedValue( ALIbool firstTime ) override; private: ALIstring theEntryNameFirst; diff --git a/Alignment/CocoaModel/interface/MeasurementDistancemeter.h b/Alignment/CocoaModel/interface/MeasurementDistancemeter.h index 1e17779f1c82a..991f8ab0ab89a 100644 --- a/Alignment/CocoaModel/interface/MeasurementDistancemeter.h +++ b/Alignment/CocoaModel/interface/MeasurementDistancemeter.h @@ -21,16 +21,16 @@ class MeasurementDistancemeter : public Measurement MeasurementDistancemeter( const ALIint measdim, ALIstring& type, ALIstring& name ) : Measurement( measdim, type, name ), theFactor(1.), theFactorSigma(0.){}; MeasurementDistancemeter(){ }; - ~MeasurementDistancemeter(){ }; + ~MeasurementDistancemeter() override{ }; // Get simulated value (called every time a parameter is displaced) - virtual void calculateSimulatedValue( ALIbool firstTime ); + void calculateSimulatedValue( ALIbool firstTime ) override; //---------- Convert from V to rad - virtual void setConversionFactor( const std::vector& wordlist ); + void setConversionFactor( const std::vector& wordlist ) override; //---------- Add any correction between the measurement data and the default format in COCOA - virtual void correctValueAndSigma(); + void correctValueAndSigma() override; private: ALIdouble theFactor; diff --git a/Alignment/CocoaModel/interface/MeasurementDistancemeter3dim.h b/Alignment/CocoaModel/interface/MeasurementDistancemeter3dim.h index 6bd30c3282464..d111e8963c789 100644 --- a/Alignment/CocoaModel/interface/MeasurementDistancemeter3dim.h +++ b/Alignment/CocoaModel/interface/MeasurementDistancemeter3dim.h @@ -21,16 +21,16 @@ class MeasurementDistancemeter3dim : public Measurement MeasurementDistancemeter3dim( const ALIint measdim, ALIstring& type, ALIstring& name ) : Measurement( measdim, type, name ), theFactor(1.), theFactorSigma(0.){ }; MeasurementDistancemeter3dim(){ }; - ~MeasurementDistancemeter3dim(){ }; + ~MeasurementDistancemeter3dim() override{ }; // Get simulated value (called every time a parameter is displaced) - virtual void calculateSimulatedValue( ALIbool firstTime ); + void calculateSimulatedValue( ALIbool firstTime ) override; //---------- Convert from V to rad - virtual void setConversionFactor( const std::vector& wordlist ); + void setConversionFactor( const std::vector& wordlist ) override; //---------- Add any correction between the measurement data and the default format in COCOA - virtual void correctValueAndSigma(); + void correctValueAndSigma() override; private: ALIdouble theFactor; diff --git a/Alignment/CocoaModel/interface/MeasurementSensor2D.h b/Alignment/CocoaModel/interface/MeasurementSensor2D.h index 5a22bce6eacf0..852976a055d14 100644 --- a/Alignment/CocoaModel/interface/MeasurementSensor2D.h +++ b/Alignment/CocoaModel/interface/MeasurementSensor2D.h @@ -20,16 +20,16 @@ class MeasurementSensor2D : public Measurement public: MeasurementSensor2D( const ALIint measdim, ALIstring& type, ALIstring& name ) : Measurement( measdim, type, name ){ }; MeasurementSensor2D(){ }; - ~MeasurementSensor2D(){ }; + ~MeasurementSensor2D() override{ }; // Get simulated value (called every time a parameter is displaced) - virtual void calculateSimulatedValue( ALIbool firstTime ); + void calculateSimulatedValue( ALIbool firstTime ) override; //---------- Add any correction between the measurement data and the default format in COCOA - virtual void correctValueAndSigma(); + void correctValueAndSigma() override; //---------- Convert from V to rad - virtual void setConversionFactor( const std::vector& wordlist ); + void setConversionFactor( const std::vector& wordlist ) override; private: diff --git a/Alignment/CocoaModel/interface/MeasurementTiltmeter.h b/Alignment/CocoaModel/interface/MeasurementTiltmeter.h index 8f37dc99b9c5f..779cf519e4eaf 100644 --- a/Alignment/CocoaModel/interface/MeasurementTiltmeter.h +++ b/Alignment/CocoaModel/interface/MeasurementTiltmeter.h @@ -21,16 +21,16 @@ class MeasurementTiltmeter : public Measurement MeasurementTiltmeter( const ALIint measdim, ALIstring& type, ALIstring& name ) : Measurement( measdim, type, name ), theFactor(1.), theFactorSigma(0.), theConstantTerm(0.), theConstantTermSigma(0.), thePedestal(0.), thePedestalSigma(0.) { }; MeasurementTiltmeter(){ }; - ~MeasurementTiltmeter(){ }; + ~MeasurementTiltmeter() override{ }; // Get simulated value (called every time a parameter is displaced) - virtual void calculateSimulatedValue( ALIbool firstTime ); + void calculateSimulatedValue( ALIbool firstTime ) override; //---------- Convert from V to rad - virtual void setConversionFactor( const std::vector& wordlist ); + void setConversionFactor( const std::vector& wordlist ) override; //---------- Add any correction between the measurement data and the default format in COCOA - virtual void correctValueAndSigma(); + void correctValueAndSigma() override; private: ALIdouble theFactor; diff --git a/Alignment/CocoaModel/interface/Model.h b/Alignment/CocoaModel/interface/Model.h index 3b5de2083a8f5..37d8c96793a83 100644 --- a/Alignment/CocoaModel/interface/Model.h +++ b/Alignment/CocoaModel/interface/Model.h @@ -80,7 +80,7 @@ class Model return theMeasurementVector; } - static Measurement* getMeasurementByName( const ALIstring& name, ALIbool exists = 1); + static Measurement* getMeasurementByName( const ALIstring& name, ALIbool exists = true); /// the name of the System Description File static ALIstring& SDFName(){ diff --git a/Alignment/CocoaModel/interface/OptOCOPS.h b/Alignment/CocoaModel/interface/OptOCOPS.h index ad25acda447ef..d495b14d38425 100644 --- a/Alignment/CocoaModel/interface/OptOCOPS.h +++ b/Alignment/CocoaModel/interface/OptOCOPS.h @@ -24,15 +24,15 @@ class OptOCOPS: public OpticalObject //---------- Constructors / Destructor OptOCOPS(){ }; OptOCOPS(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : - OpticalObject( parent, type, name, copy_data), fdevi_from_file(0){ }; - ~OptOCOPS(){ }; + OpticalObject( parent, type, name, copy_data), fdevi_from_file(false){ }; + ~OptOCOPS() override{ }; //---------- defaultBehaviour: make measurement - virtual void defaultBehaviour( LightRay& lightray, Measurement& meas ); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; //---------- Make measurement - virtual void makeMeasurement( LightRay& lightray, Measurement& meas ); + void makeMeasurement( LightRay& lightray, Measurement& meas ) override; //---------- Fast simulation of the light ray traversing - virtual void fastTraversesLightRay( LightRay& lightray ); + void fastTraversesLightRay( LightRay& lightray ) override; // Get intersection in local coordinates ALIdouble* convertPointToLocalCoordinates( const CLHEP::Hep3Vector& point); @@ -41,7 +41,7 @@ class OptOCOPS: public OpticalObject virtual void fillVRML(); virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; private: ALIdouble getMeasFromInters( ALILine& line_xhair, ALILine& ccd, CLHEP::Hep3Vector& cops_line ); diff --git a/Alignment/CocoaModel/interface/OptOCameraDetector.h b/Alignment/CocoaModel/interface/OptOCameraDetector.h index 65f77403e7dfb..75f1b1a35297c 100644 --- a/Alignment/CocoaModel/interface/OptOCameraDetector.h +++ b/Alignment/CocoaModel/interface/OptOCameraDetector.h @@ -23,11 +23,11 @@ class OptOCameraDetector: public OpticalObject OptOCameraDetector(){ }; OptOCameraDetector(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOCameraDetector(){ }; + ~OptOCameraDetector() override{ }; //---------- Propagate light for measurement meas - virtual void participateInMeasurement( LightRay& lightray, Measurement& meas, const ALIstring& behav ) override; - virtual void constructSolidShape() override; + void participateInMeasurement( LightRay& lightray, Measurement& meas, const ALIstring& behav ) override; + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOCubeSplitter.h b/Alignment/CocoaModel/interface/OptOCubeSplitter.h index 76475cc5c5d55..f97a10a3665c3 100644 --- a/Alignment/CocoaModel/interface/OptOCubeSplitter.h +++ b/Alignment/CocoaModel/interface/OptOCubeSplitter.h @@ -23,16 +23,16 @@ class OptOCubeSplitter: public OpticalObject OptOCubeSplitter(){ }; OptOCubeSplitter(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOCubeSplitter(){ }; + ~OptOCubeSplitter() override{ }; //---------- Fast simulation of deviation of the light ray (reflection, shift, ...) - virtual void fastDeviatesLightRay( LightRay& lightray ); + void fastDeviatesLightRay( LightRay& lightray ) override; //---------- Detailed simulation of the light ray traversing - virtual void fastTraversesLightRay( LightRay& lightray ); + void fastTraversesLightRay( LightRay& lightray ) override; //---------- Detailed simulation of deviation of the light ray (reflection, shift, ...) - virtual void detailedDeviatesLightRay( LightRay& lightray ); + void detailedDeviatesLightRay( LightRay& lightray ) override; //---------- Fast simulation of the light ray traversing - virtual void detailedTraversesLightRay( LightRay& lightray ); + void detailedTraversesLightRay( LightRay& lightray ) override; ALIPlane getMiddlePlate(); ALIPlane getUpperPlate(); @@ -40,7 +40,7 @@ class OptOCubeSplitter: public OpticalObject #ifdef COCOA_VIS virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptODistancemeter.h b/Alignment/CocoaModel/interface/OptODistancemeter.h index b3d5ff5aef4c1..87c4fb1741662 100644 --- a/Alignment/CocoaModel/interface/OptODistancemeter.h +++ b/Alignment/CocoaModel/interface/OptODistancemeter.h @@ -23,19 +23,19 @@ class OptODistancemeter: public OpticalObject OptODistancemeter(){ }; OptODistancemeter(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptODistancemeter(){ }; + ~OptODistancemeter() override{ }; //---------- defaultBehaviour: make measurement - virtual void defaultBehaviour( LightRay& lightray, Measurement& meas ); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; //---------- Make measurement - virtual void makeMeasurement( LightRay& lightray, Measurement& meas ); + void makeMeasurement( LightRay& lightray, Measurement& meas ) override; #ifdef COCOA_VIS void fillVRML(); virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptODistancemeter3dim.h b/Alignment/CocoaModel/interface/OptODistancemeter3dim.h index 8602685881b31..0ee6cf6b93290 100644 --- a/Alignment/CocoaModel/interface/OptODistancemeter3dim.h +++ b/Alignment/CocoaModel/interface/OptODistancemeter3dim.h @@ -23,19 +23,19 @@ class OptODistancemeter3dim: public OpticalObject OptODistancemeter3dim(){ }; OptODistancemeter3dim(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptODistancemeter3dim(){ }; + ~OptODistancemeter3dim() override{ }; //---------- defaultBehaviour: make measurement - virtual void defaultBehaviour( LightRay& lightray, Measurement& meas ); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; //---------- Make measurement - virtual void makeMeasurement( LightRay& lightray, Measurement& meas ); + void makeMeasurement( LightRay& lightray, Measurement& meas ) override; #ifdef COCOA_VIS virtual void fillVRML(); virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOLaser.h b/Alignment/CocoaModel/interface/OptOLaser.h index b0535ddc287a9..db7a2854cc564 100644 --- a/Alignment/CocoaModel/interface/OptOLaser.h +++ b/Alignment/CocoaModel/interface/OptOLaser.h @@ -23,16 +23,16 @@ class OptOLaser: public OpticalObject OptOLaser(){ }; OptOLaser(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOLaser(){ }; + ~OptOLaser() override{ }; //---------- Default behaviour: create a LightRay object - virtual void defaultBehaviour( LightRay& lightray, Measurement& meas ); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; #ifdef COCOA_VIS virtual void fillVRML(); virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOLens.h b/Alignment/CocoaModel/interface/OptOLens.h index d151a1a89a5e2..4c597793efea6 100644 --- a/Alignment/CocoaModel/interface/OptOLens.h +++ b/Alignment/CocoaModel/interface/OptOLens.h @@ -23,15 +23,15 @@ class OptOLens: public OpticalObject OptOLens(); OptOLens(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOLens(){ }; + ~OptOLens() override{ }; //---------- Propagate light for measurement meas - virtual void participateInMeasurement( LightRay& lightray, Measurement& meas, const ALIstring& behav ); + void participateInMeasurement( LightRay& lightray, Measurement& meas, const ALIstring& behav ) override; #ifdef COCOA_VIS virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOMirror.h b/Alignment/CocoaModel/interface/OptOMirror.h index 1d78a2d755379..b06029b5e6698 100644 --- a/Alignment/CocoaModel/interface/OptOMirror.h +++ b/Alignment/CocoaModel/interface/OptOMirror.h @@ -23,24 +23,24 @@ class OptOMirror: public OpticalObject OptOMirror(){ }; OptOMirror(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOMirror(){ }; + ~OptOMirror() override{ }; //---------- Propagate light for measurement meas //----- Default behaviour: detailed deviation - void defaultBehaviour( LightRay& lightray, Measurement& meas ); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; - virtual void detailedDeviatesLightRay( LightRay& lightray ); + void detailedDeviatesLightRay( LightRay& lightray ) override; - virtual void fastDeviatesLightRay( LightRay& lightray ); + void fastDeviatesLightRay( LightRay& lightray ) override; - virtual void detailedTraversesLightRay( LightRay& lightray ); + void detailedTraversesLightRay( LightRay& lightray ) override; - virtual void fastTraversesLightRay( LightRay& lightray ); + void fastTraversesLightRay( LightRay& lightray ) override; #ifdef COCOA_VIS virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOModifiedRhomboidPrism.h b/Alignment/CocoaModel/interface/OptOModifiedRhomboidPrism.h index 29288c3bb04d2..cea62b7161e45 100644 --- a/Alignment/CocoaModel/interface/OptOModifiedRhomboidPrism.h +++ b/Alignment/CocoaModel/interface/OptOModifiedRhomboidPrism.h @@ -23,16 +23,16 @@ class OptOModifiedRhomboidPrism: public OpticalObject OptOModifiedRhomboidPrism(){ }; OptOModifiedRhomboidPrism(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOModifiedRhomboidPrism(){ }; + ~OptOModifiedRhomboidPrism() override{ }; //---------- Fast simulation of deviation of the light ray (reflection, shift, ...) - virtual void fastDeviatesLightRay( LightRay& lightray ); + void fastDeviatesLightRay( LightRay& lightray ) override; //---------- Detailed simulation of the light ray traversing - virtual void fastTraversesLightRay( LightRay& lightray ); + void fastTraversesLightRay( LightRay& lightray ) override; //---------- Detailed simulation of deviation of the light ray (reflection, shift, ...) - virtual void detailedDeviatesLightRay( LightRay& lightray ); + void detailedDeviatesLightRay( LightRay& lightray ) override; //---------- Fast simulation of the light ray traversing - virtual void detailedTraversesLightRay( LightRay& lightray ); + void detailedTraversesLightRay( LightRay& lightray ) override; //--------- Get the up and down plates rotated by an angle 'angle_planes' ALIPlane getRotatedPlate(const ALIbool forwardPlate); @@ -41,7 +41,7 @@ class OptOModifiedRhomboidPrism: public OpticalObject #ifdef COCOA_VIS virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOOpticalSquare.h b/Alignment/CocoaModel/interface/OptOOpticalSquare.h index 9aceb69316ad7..4bd47d0fbda6b 100644 --- a/Alignment/CocoaModel/interface/OptOOpticalSquare.h +++ b/Alignment/CocoaModel/interface/OptOOpticalSquare.h @@ -23,21 +23,21 @@ class OptOOpticalSquare: public OpticalObject OptOOpticalSquare(){ }; OptOOpticalSquare(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOOpticalSquare(){ }; + ~OptOOpticalSquare() override{ }; //---------- Fast simulation of deviation of the light ray (reflection, shift, ...) - virtual void fastDeviatesLightRay( LightRay& lightray ); + void fastDeviatesLightRay( LightRay& lightray ) override; //---------- Detailed simulation of the light ray traversing - virtual void fastTraversesLightRay( LightRay& lightray ); + void fastTraversesLightRay( LightRay& lightray ) override; //---------- Detailed simulation of deviation of the light ray (reflection, shift, ...) - virtual void detailedDeviatesLightRay( LightRay& lightray ); + void detailedDeviatesLightRay( LightRay& lightray ) override; //---------- Fast simulation of the light ray traversing - virtual void detailedTraversesLightRay( LightRay& lightray ); + void detailedTraversesLightRay( LightRay& lightray ) override; #ifdef COCOA_VIS virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; private: //---------- Calculate the centre points and normal std::vector of each of the four pentaprism faces the light ray may touch diff --git a/Alignment/CocoaModel/interface/OptOPinhole.h b/Alignment/CocoaModel/interface/OptOPinhole.h index a3ab9156da972..67b0640d607a7 100644 --- a/Alignment/CocoaModel/interface/OptOPinhole.h +++ b/Alignment/CocoaModel/interface/OptOPinhole.h @@ -23,15 +23,15 @@ class OptOPinhole: public OpticalObject OptOPinhole(){ }; OptOPinhole(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOPinhole(){ }; + ~OptOPinhole() override{ }; //---------- Default behaviour - void defaultBehaviour( LightRay& lightray, Measurement& meas ); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; #ifdef COCOA_VIS virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOPlateSplitter.h b/Alignment/CocoaModel/interface/OptOPlateSplitter.h index 1b3080a093e68..ddfa3eb87d4e2 100644 --- a/Alignment/CocoaModel/interface/OptOPlateSplitter.h +++ b/Alignment/CocoaModel/interface/OptOPlateSplitter.h @@ -23,21 +23,21 @@ class OptOPlateSplitter: public OpticalObject OptOPlateSplitter(){ }; OptOPlateSplitter(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOPlateSplitter(){ }; + ~OptOPlateSplitter() override{ }; //---------- Detailed simulation of deviation of the light ray (reflection, shift, ...) - virtual void detailedDeviatesLightRay( LightRay& lightray ); + void detailedDeviatesLightRay( LightRay& lightray ) override; //---------- Detailed simulation of the light ray traversing - virtual void detailedTraversesLightRay( LightRay& lightray ); + void detailedTraversesLightRay( LightRay& lightray ) override; //---------- Fast simulation of deviation of the light ray (reflection, shift, ...) - virtual void fastDeviatesLightRay( LightRay& lightray ); + void fastDeviatesLightRay( LightRay& lightray ) override; //---------- Fast simulation of the light ray traversing - virtual void fastTraversesLightRay( LightRay& lightray ); + void fastTraversesLightRay( LightRay& lightray ) override; #ifdef COCOA_VIS virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptORisleyPrism.h b/Alignment/CocoaModel/interface/OptORisleyPrism.h index e87d50072611b..54868a3cdc43e 100644 --- a/Alignment/CocoaModel/interface/OptORisleyPrism.h +++ b/Alignment/CocoaModel/interface/OptORisleyPrism.h @@ -23,11 +23,11 @@ class OptORisleyPrism: public OpticalObject OptORisleyPrism(){ }; OptORisleyPrism(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptORisleyPrism(){ }; + ~OptORisleyPrism() override{ }; //---------- Propagate light for measurement meas - virtual void participateInMeasurement( LightRay& lightray, Measurement& meas, const ALIstring& behav ); - void constructSolidShape(); + void participateInMeasurement( LightRay& lightray, Measurement& meas, const ALIstring& behav ) override; + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOScreen.h b/Alignment/CocoaModel/interface/OptOScreen.h index 82d5ea71f2dfb..a26dbae15cc9e 100644 --- a/Alignment/CocoaModel/interface/OptOScreen.h +++ b/Alignment/CocoaModel/interface/OptOScreen.h @@ -23,15 +23,15 @@ class OptOScreen: public OpticalObject OptOScreen(){ }; OptOScreen(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOScreen(){ }; + ~OptOScreen() override{ }; //---------- defaultBehaviour: do nothing - virtual void defaultBehaviour( LightRay& lightray, Measurement& meas ); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; #ifdef COCOA_VIS virtual void fillVRML(); virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOSensor2D.h b/Alignment/CocoaModel/interface/OptOSensor2D.h index 6ac4286fe2a9a..507430e073c97 100644 --- a/Alignment/CocoaModel/interface/OptOSensor2D.h +++ b/Alignment/CocoaModel/interface/OptOSensor2D.h @@ -23,20 +23,20 @@ class OptOSensor2D: public OpticalObject //---------- Constructors / Destructor OptOSensor2D(){ }; OptOSensor2D(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : - OpticalObject( parent, type, name, copy_data), fdevi_from_file(0){ }; - ~OptOSensor2D(){ }; + OpticalObject( parent, type, name, copy_data), fdevi_from_file(false){ }; + ~OptOSensor2D() override{ }; //---------- defaultBehaviour: make measurement - virtual void defaultBehaviour( LightRay& lightray, Measurement& meas ); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; //---------- Make measurement - virtual void makeMeasurement( LightRay& lightray, Measurement& meas ); + void makeMeasurement( LightRay& lightray, Measurement& meas ) override; //---------- Fast simulation of the light ray traversing - virtual void fastTraversesLightRay( LightRay& lightray ); + void fastTraversesLightRay( LightRay& lightray ) override; //---------- Detailed simulation of the light ray traversing - virtual void detailedTraversesLightRay( LightRay& lightray ); + void detailedTraversesLightRay( LightRay& lightray ) override; // Create and fill an extra entry, checking if it has to be read from file - virtual void fillExtraEntry( std::vector& wordlist ); + void fillExtraEntry( std::vector& wordlist ) override; // Get intersection in local coordinates ALIdouble* convertPointToLocalCoordinates( const CLHEP::Hep3Vector& point); @@ -45,7 +45,7 @@ class OptOSensor2D: public OpticalObject virtual void fillVRML(); virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; private: // Deviation values read from file diff --git a/Alignment/CocoaModel/interface/OptOSource.h b/Alignment/CocoaModel/interface/OptOSource.h index db9c57435fdb2..23873bc1de43b 100644 --- a/Alignment/CocoaModel/interface/OptOSource.h +++ b/Alignment/CocoaModel/interface/OptOSource.h @@ -23,7 +23,7 @@ class OptOSource: public OpticalObject OptOSource(); OptOSource(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOSource(){ }; + ~OptOSource() override{ }; #ifdef COCOA_VIS @@ -32,8 +32,8 @@ class OptOSource: public OpticalObject #endif //---------- Propagate light for measurement meas - virtual void defaultBehaviour( LightRay& lightray, Measurement& meas ); - void constructSolidShape(); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOTiltmeter.h b/Alignment/CocoaModel/interface/OptOTiltmeter.h index 73e83ed2b2f1f..b3ebe96450667 100644 --- a/Alignment/CocoaModel/interface/OptOTiltmeter.h +++ b/Alignment/CocoaModel/interface/OptOTiltmeter.h @@ -23,17 +23,17 @@ class OptOTiltmeter: public OpticalObject OptOTiltmeter(){ }; OptOTiltmeter(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOTiltmeter(){ }; + ~OptOTiltmeter() override{ }; //---------- defaultBehaviour: make measurement - virtual void defaultBehaviour( LightRay& lightray, Measurement& meas ); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; //---------- Make measurement - virtual void makeMeasurement( LightRay& lightray, Measurement& meas ); + void makeMeasurement( LightRay& lightray, Measurement& meas ) override; #ifdef COCOA_VIS virtual void fillVRML(); virtual void fillIguana(); #endif - void constructSolidShape(); + void constructSolidShape() override; }; diff --git a/Alignment/CocoaModel/interface/OptOUserDefined.h b/Alignment/CocoaModel/interface/OptOUserDefined.h index 3e16bc85a8c87..24cde5f169e6b 100644 --- a/Alignment/CocoaModel/interface/OptOUserDefined.h +++ b/Alignment/CocoaModel/interface/OptOUserDefined.h @@ -23,14 +23,14 @@ class OptOUserDefined: public OpticalObject OptOUserDefined(){ }; OptOUserDefined(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOUserDefined(){ }; + ~OptOUserDefined() override{ }; #ifdef COCOA_VIS virtual void fillVRML() override; virtual void fillIguana() override; #endif //---------- userDefinedBehaviour - virtual void userDefinedBehaviour( LightRay& lightray, Measurement& meas, const ALIstring& behav) override; + void userDefinedBehaviour( LightRay& lightray, Measurement& meas, const ALIstring& behav) override; }; diff --git a/Alignment/CocoaModel/interface/OptOXLaser.h b/Alignment/CocoaModel/interface/OptOXLaser.h index 759861924f7c6..c58232131ab11 100644 --- a/Alignment/CocoaModel/interface/OptOXLaser.h +++ b/Alignment/CocoaModel/interface/OptOXLaser.h @@ -23,11 +23,11 @@ class OptOXLaser: public OpticalObject OptOXLaser(){ }; OptOXLaser(OpticalObject* parent, const ALIstring& type, const ALIstring& name, const ALIbool copy_data) : OpticalObject( parent, type, name, copy_data){ }; - ~OptOXLaser(){ }; + ~OptOXLaser() override{ }; //---------- Default behaviour: create a LightRay object - virtual void defaultBehaviour( LightRay& lightray, Measurement& meas ); - void constructSolidShape(); + void defaultBehaviour( LightRay& lightray, Measurement& meas ) override; + void constructSolidShape() override; #ifdef COCOA_VIS virtual void fillIguana(); diff --git a/Alignment/CocoaModel/interface/OpticalObject.h b/Alignment/CocoaModel/interface/OpticalObject.h index ac2b8700bf5fc..17eac357a81eb 100644 --- a/Alignment/CocoaModel/interface/OpticalObject.h +++ b/Alignment/CocoaModel/interface/OpticalObject.h @@ -249,7 +249,7 @@ class OpticalObject bool eq2ang( double ang1, double ang2 ); double approxTo0( double val ); double addPii( double val ); - int checkMatrixEquations( double angleX, double angleY, double angleZ, CLHEP::HepRotation* rot = 0); + int checkMatrixEquations( double angleX, double angleY, double angleZ, CLHEP::HepRotation* rot = nullptr); //- CLHEP::Hep3Vector GetAxisForDisplacement( const XYZcoor coor ); void setGlobalCoordinates(); diff --git a/Alignment/CocoaModel/interface/OpticalObjectMgr.h b/Alignment/CocoaModel/interface/OpticalObjectMgr.h index 32d3aa5a00af5..5f83d35ce2636 100644 --- a/Alignment/CocoaModel/interface/OpticalObjectMgr.h +++ b/Alignment/CocoaModel/interface/OpticalObjectMgr.h @@ -32,9 +32,9 @@ class OpticalObjectMgr theOptODict[opto->longName()] = opto; } // find an OpticalObject by long name (its name + name of its ancestors) - OpticalObject* findOptO( const ALIstring& longName, bool exists = 0 ) const; + OpticalObject* findOptO( const ALIstring& longName, bool exists = false ) const; // find a list of OpticalObject's by name - std::vector findOptOs( const ALIstring& name, bool exists = 0 ) const; + std::vector findOptOs( const ALIstring& name, bool exists = false ) const; void dumpOptOs( std::ostream& out= std::cout ) const; diff --git a/Alignment/CocoaModel/src/ALIRmDataFromFile.cc b/Alignment/CocoaModel/src/ALIRmDataFromFile.cc index 331eeab54b89d..94d97822ac96b 100644 --- a/Alignment/CocoaModel/src/ALIRmDataFromFile.cc +++ b/Alignment/CocoaModel/src/ALIRmDataFromFile.cc @@ -34,7 +34,7 @@ ALIbool ALIRmDataFromFile::setAngleX( const ALIdouble val ) { theAngleX = val; theDataFilled += "X"; - return 1; + return true; } //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ -42,7 +42,7 @@ ALIbool ALIRmDataFromFile::setAngleY( const ALIdouble val ) { theAngleY = val; theDataFilled += "Y"; - return 1; + return true; } //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@ -50,7 +50,7 @@ ALIbool ALIRmDataFromFile::setAngleZ( const ALIdouble val ) { theAngleZ = val; theDataFilled += "Z"; - return 1; + return true; } //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ diff --git a/Alignment/CocoaModel/src/CocoaDaqReaderText.cc b/Alignment/CocoaModel/src/CocoaDaqReaderText.cc index ea36fff925fbb..62d6458700c9e 100644 --- a/Alignment/CocoaModel/src/CocoaDaqReaderText.cc +++ b/Alignment/CocoaModel/src/CocoaDaqReaderText.cc @@ -35,7 +35,7 @@ bool CocoaDaqReaderText::ReadNextEvent() //if( retfil == 0 ) { if( theFilein.getWordsInLine(wordlist) == 0 ) { if(ALIUtils::debug>=4 ) std::cout << "@@@@ No more measurements left" << std::endl; - return 0; + return false; } ////--- Transform to time_t format and save it @@ -126,9 +126,9 @@ bool CocoaDaqReaderText::ReadNextEvent() //- std::cout << " returning readmeasff" << std::endl; if( theFilein.eof() ) { - return 0; + return false; } else { - return 1; + return true; } } diff --git a/Alignment/CocoaModel/src/DeviationsFromFileSensor2D.cc b/Alignment/CocoaModel/src/DeviationsFromFileSensor2D.cc index 0272b156143a5..8378610a08026 100644 --- a/Alignment/CocoaModel/src/DeviationsFromFileSensor2D.cc +++ b/Alignment/CocoaModel/src/DeviationsFromFileSensor2D.cc @@ -159,7 +159,7 @@ std::pair< ALIdouble, ALIdouble > DeviationsFromFileSensor2D::getDevis( ALIdoubl auto yrows = std::make_unique(theNPoints); unsigned int ii = 0; - ALIbool insideMatrix = 0; + ALIbool insideMatrix = false; for( vvdite = theDeviations.begin(); vvdite != (theDeviations.end()-1); ++vvdite ){ for( vdite = (*vvdite).begin(); vdite != ((*vvdite).end()-1); ++vdite ){ if( verbose >= 5 ) std::cout << " check posy " << (*(vdite))->posY() << " " << (*(vdite+1))->posY() << " " << (*(vdite)) << std::endl; @@ -172,7 +172,7 @@ std::pair< ALIdouble, ALIdouble > DeviationsFromFileSensor2D::getDevis( ALIdoubl //-std::cout << " ii " << ii << std::endl; yrows[ii] = vdite - (*vvdite).begin(); if( verbose >= 3 ) std::cout << intersY << " DeviationsFromFileSensor2D yrows " << ii << " " << yrows[ii] << " : " << (*(vdite))->posY() << std::endl; - insideMatrix = 1; + insideMatrix = true; break; } } @@ -182,7 +182,7 @@ std::pair< ALIdouble, ALIdouble > DeviationsFromFileSensor2D::getDevis( ALIdoubl std::cerr << "!!EXITING intersection in Y outside matrix of deviations from file " << intersY << std::endl; exit(1); } - insideMatrix = 0; + insideMatrix = false; vd thePoints; thePoints.clear(); @@ -199,7 +199,7 @@ std::pair< ALIdouble, ALIdouble > DeviationsFromFileSensor2D::getDevis( ALIdoubl && (intersX - dev2->posX() )*theScanSenseX < 0) { thePoints.push_back( dev1 ); thePoints.push_back( dev2 ); - insideMatrix = 1; + insideMatrix = true; if( verbose >= 3 ) std::cout << " column up " << ii << " " << dev1->posX() << " " << dev2->posX() << " : " << intersX << std::endl; } diff --git a/Alignment/CocoaModel/src/Entry.cc b/Alignment/CocoaModel/src/Entry.cc index 67f04fe0b80fc..d2e875e051ebf 100644 --- a/Alignment/CocoaModel/src/Entry.cc +++ b/Alignment/CocoaModel/src/Entry.cc @@ -65,7 +65,7 @@ void Entry::fill( const std::vector& wordlist ) ALIdouble fre; gomgr->getGlobalOptionValue("reportOutReadValue", fre ); - if( entryData != 0 && fre == 1) { + if( entryData != nullptr && fre == 1) { // std::cout << OptOCurrent()->name() << " " << name_ << "call fillFromReportOutFileValue " << type_ << std::endl; fillFromReportOutFileValue( entryData ); } else { @@ -73,13 +73,13 @@ void Entry::fill( const std::vector& wordlist ) fillFromInputFileValue( wordlist ); } gomgr->getGlobalOptionValue("reportOutReadSigma", fre ); - if( entryData != 0 && fre == 1) { + if( entryData != nullptr && fre == 1) { fillFromReportOutFileSigma( entryData ); } else { fillFromInputFileSigma( wordlist ); } gomgr->getGlobalOptionValue("reportOutReadQuality", fre ); - if( entryData != 0 && fre == 1) { + if( entryData != nullptr && fre == 1) { fillFromReportOutFileQuality( entryData ); } else { fillFromInputFileQuality( wordlist ); diff --git a/Alignment/CocoaModel/src/EntryMgr.cc b/Alignment/CocoaModel/src/EntryMgr.cc index 7742980cccf23..9a9ea1a017673 100644 --- a/Alignment/CocoaModel/src/EntryMgr.cc +++ b/Alignment/CocoaModel/src/EntryMgr.cc @@ -11,7 +11,7 @@ //---------------------------------------------------------------------------- -EntryMgr* EntryMgr::theInstance = 0; +EntryMgr* EntryMgr::theInstance = nullptr; //---------------------------------------------------------------------------- EntryMgr* EntryMgr::getInstance() @@ -52,14 +52,14 @@ ALIbool EntryMgr::readEntryFromReportOut( const std::vector& wl ) data->fill( wl ); } - return 1; + return true; } //---------------------------------------------------------------------------- EntryData* EntryMgr::findEntryByShortName( const ALIstring& optoName, const ALIstring& entryName ) { - EntryData* data = 0; + EntryData* data = nullptr; int icount = 0; std::vector::iterator ite; @@ -82,7 +82,7 @@ EntryData* EntryMgr::findEntryByShortName( const ALIstring& optoName, const ALIs //---------------------------------------------------------------------------- EntryData* EntryMgr::findEntryByLongName( const ALIstring& optoName, const ALIstring& entryName ) { - EntryData* data = 0; + EntryData* data = nullptr; int icount = 0; std::vector::iterator ite; @@ -112,7 +112,7 @@ EntryData* EntryMgr::findEntryByLongName( const ALIstring& optoName, const ALIst //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ EntryData* EntryMgr::findEntry( const std::vector& wl ) { - EntryData* data = 0; + EntryData* data = nullptr; ALIstring optoName = wl[2]; ALIstring entryName = wl[3]; data = findEntryByLongName( optoName, entryName ); diff --git a/Alignment/CocoaModel/src/ErrorCorrelationMgr.cc b/Alignment/CocoaModel/src/ErrorCorrelationMgr.cc index 7feeda0178a88..d88c41ad656a8 100644 --- a/Alignment/CocoaModel/src/ErrorCorrelationMgr.cc +++ b/Alignment/CocoaModel/src/ErrorCorrelationMgr.cc @@ -9,7 +9,7 @@ #include //---------------------------------------------------------------------------- -ErrorCorrelationMgr* ErrorCorrelationMgr::theInstance = 0; +ErrorCorrelationMgr* ErrorCorrelationMgr::theInstance = nullptr; //---------------------------------------------------------------------------- ErrorCorrelationMgr* ErrorCorrelationMgr::getInstance() diff --git a/Alignment/CocoaModel/src/LightRay.cc b/Alignment/CocoaModel/src/LightRay.cc index b3c70f2eb2496..8277e2a9e8696 100644 --- a/Alignment/CocoaModel/src/LightRay.cc +++ b/Alignment/CocoaModel/src/LightRay.cc @@ -31,7 +31,7 @@ void LightRay::startLightRay( OpticalObject* opto ) //---------- Get Z axis of opto CLHEP::Hep3Vector ZAxis(0.,0.,1.); - CLHEP::HepRotation rmt = opto->rmGlob(); + const CLHEP::HepRotation& rmt = opto->rmGlob(); ZAxis = rmt * ZAxis; //---------- By convention, direction of LightRay = opto_ZAxis @@ -88,7 +88,7 @@ void LightRay::intersect( const OpticalObject& opto ) { if(ALIUtils::debug >= 3) std::cout << "% LR INTERSECT WITH OPTO" << std::endl; CLHEP::Hep3Vector ZAxis(0.,0.,1.); - CLHEP::HepRotation rmt = opto.rmGlob(); + const CLHEP::HepRotation& rmt = opto.rmGlob(); ZAxis = rmt*ZAxis; ALIPlane optoPlane(opto.centreGlob(), ZAxis); intersect( optoPlane ); @@ -277,7 +277,7 @@ void LightRay::shiftAndDeviateWhileTraversing( const OpticalObject* opto, ALIdou CLHEP::Hep3Vector XAxis(1.,0.,0.); CLHEP::Hep3Vector YAxis(0.,1.,0.); CLHEP::Hep3Vector ZAxis(0.,0.,1.); - CLHEP::HepRotation rmt = opto->rmGlob(); + const CLHEP::HepRotation& rmt = opto->rmGlob(); XAxis = rmt*XAxis; YAxis = rmt*YAxis; ZAxis = rmt*ZAxis; diff --git a/Alignment/CocoaModel/src/Measurement.cc b/Alignment/CocoaModel/src/Measurement.cc index 7d2be3786d191..5f0cff37d5ebc 100644 --- a/Alignment/CocoaModel/src/Measurement.cc +++ b/Alignment/CocoaModel/src/Measurement.cc @@ -35,7 +35,7 @@ ALIstring Measurement::theMeasurementsFileName = ""; ALIstring Measurement::theCurrentDate = "99/99/99"; ALIstring Measurement::theCurrentTime = "99:99"; -ALIbool Measurement::only1 = 0; +ALIbool Measurement::only1 = false; ALIstring Measurement::only1Date = ""; ALIstring Measurement::only1Time = ""; @@ -232,11 +232,11 @@ void Measurement::fillData( ALIuint coor, const std::vector& wordlist //----- Set value (translate it if a PARAMETER is used) ALIdouble val = 0.; - theValueIsSimulated[coor] = 0; + theValueIsSimulated[coor] = false; if( !ALIUtils::IsNumber(wordlist[1]) ) { if ( parmgr->getParameterValue( wordlist[1], val ) == 0 ) { if( wordlist[1] == ALIstring("simulated_value") ) { - theValueIsSimulated[coor] = 1; + theValueIsSimulated[coor] = true; } else { // ALIFileIn::getInstance( Model::SDFName() ).ErrorInLine(); std::cerr << "!!! parameter for value not found: " << wordlist[1].c_str() << std::endl; @@ -293,7 +293,7 @@ void Measurement::fillData( ALIuint coor, OpticalAlignParam* oaParam) //---------- set data members //----- Set value (translate it if a PARAMETER is used) ALIdouble val = 0.; - theValueIsSimulated[coor] = 0; + theValueIsSimulated[coor] = false; val = oaParam->value(); val *= valueDimensionFactor(); theValue[coor] = val; @@ -357,7 +357,7 @@ void Measurement::buildOptOList() } OpticalObject* OptOitem = Model::getOptOByName( referenceOptO ); if ( ALIUtils::debug >= 3 ) std::cout << "Measurement::buildOptOList: OptO in Measurement: " << OptOitem->name() << std::endl; - if ( OptOitem != (OpticalObject*)0 ) { + if ( OptOitem != (OpticalObject*)nullptr ) { _OptOList.push_back( OptOitem); } else { std::cerr << "!!! Error in Measurement: can't find Optical Object " << @@ -412,7 +412,7 @@ void Measurement::addAffectingEntriesFromOptO( const OpticalObject* optoP ) if(ALIUtils::debug >= 4) std::cout << "Entry that may affect Measurement: " << (*vecite)->name() << std::endl; } } - if(optoP->parent() != 0) { + if(optoP->parent() != nullptr) { addAffectingEntriesFromOptO( optoP->parent() ); } } @@ -453,7 +453,7 @@ void Measurement::printStartCalculateSimulatedValue( const Measurement* meas) void Measurement::calculateOriginalSimulatedValue() { //---------- Calculate the simulated value of the Measurement - calculateSimulatedValue( 1 ); + calculateSimulatedValue( true ); #ifdef COCOA_VIS if( ALIUtils::getFirstTime() ) { @@ -529,7 +529,7 @@ std::vector Measurement::DerivativeRespectEntry( Entry* entry ) entry->displace( displacement ); if ( ALIUtils::debug >= 5) std::cout << "Get simulated value for displacement " << displacement << std::endl; - calculateSimulatedValue( 0 ); + calculateSimulatedValue( false ); //---------- Get sum of derivatives sumderiv = 0; @@ -699,7 +699,7 @@ void Measurement::setName() { // name already set by passing one argument with sensor type if( theName != "" ) return; - if( _OptONameList.size() == 0) { + if( _OptONameList.empty()) { std::cerr << " !!! Error in your code, you cannot ask for the name of the Measurement before the OptONameList is build " << std::endl; exit(9); } diff --git a/Alignment/CocoaModel/src/MeasurementDiffEntry.cc b/Alignment/CocoaModel/src/MeasurementDiffEntry.cc index 98ecbc4ccb44b..43010c591d2d6 100644 --- a/Alignment/CocoaModel/src/MeasurementDiffEntry.cc +++ b/Alignment/CocoaModel/src/MeasurementDiffEntry.cc @@ -64,7 +64,7 @@ void MeasurementDiffEntry::calculateSimulatedValue( ALIbool firstTime ) if( ALIUtils::debug >= 5) std::cout << "OptOList size" <name() << " 2nd " << (*vocite+1)->name() << std::endl; DumpBadOrderOptOs(); diff --git a/Alignment/CocoaModel/src/MeasurementDistancemeter.cc b/Alignment/CocoaModel/src/MeasurementDistancemeter.cc index 70a3610aae197..5a90796b5477d 100644 --- a/Alignment/CocoaModel/src/MeasurementDistancemeter.cc +++ b/Alignment/CocoaModel/src/MeasurementDistancemeter.cc @@ -33,12 +33,12 @@ void MeasurementDistancemeter::calculateSimulatedValue( ALIbool firstTime ) if( ALIUtils::debug >= 5) std::cout << "OptOList size= " <type() == "distance_target" && ( (*(vocite+1))->type() == "distancemeter" || (*(vocite+1))->type() == "distancemeter1dim" ) ) { - right_objects = 1; + right_objects = true; } } if( !right_objects ) { diff --git a/Alignment/CocoaModel/src/MeasurementDistancemeter3dim.cc b/Alignment/CocoaModel/src/MeasurementDistancemeter3dim.cc index 3211c37780a30..c664c70034ad9 100644 --- a/Alignment/CocoaModel/src/MeasurementDistancemeter3dim.cc +++ b/Alignment/CocoaModel/src/MeasurementDistancemeter3dim.cc @@ -33,11 +33,11 @@ void MeasurementDistancemeter3dim::calculateSimulatedValue( ALIbool firstTime ) if( ALIUtils::debug >= 5) std::cout << "OptOList size" <type() == "distance_target" && ( (*(vocite+1))->type() == "distancemeter3dim" ) ) { - right_objects = 1; + right_objects = true; } } if( !right_objects ) { diff --git a/Alignment/CocoaModel/src/OptOCOPS.cc b/Alignment/CocoaModel/src/OptOCOPS.cc index 45fa66cd2aaad..02b4e86535549 100644 --- a/Alignment/CocoaModel/src/OptOCOPS.cc +++ b/Alignment/CocoaModel/src/OptOCOPS.cc @@ -172,7 +172,7 @@ ALILine rightCCD( dowel2 + posxy, -line_dowel21_perp ); //samir changed sign to if (ALIUtils::debug >= 35) std::cout << "2. Get the Y of the laser and project it on the COPS" << std::endl; CLHEP::Hep3Vector YAxis_xhair(0.,1.,0.); - CLHEP::HepRotation rmtx = xhairOptO->rmGlob(); + const CLHEP::HepRotation& rmtx = xhairOptO->rmGlob(); YAxis_xhair = rmtx * YAxis_xhair; ALILine Yline_xhair( inters, copsPlane.project( YAxis_xhair )); if (ALIUtils::debug >= 3) { @@ -395,7 +395,7 @@ ALIdouble OptOCOPS::getMeasFromInters( ALILine& line_xhair, ALILine& ccd, CLHEP: { if(ALIUtils::debug >= 5) std::cout << "***** OptOCOPS::getMeasFromInters" <= 2) std::cout << "LR: FAST TRAVERSE CUBE SPLITTER " << name() << std::endl; //---------- Get backward plate - ALIPlane plate = getPlate(0, 0); + ALIPlane plate = getPlate(false, false); lightray.intersect( plate ); if (ALIUtils::debug >= 2) { lightray.dumpData("Intersected with plate"); @@ -99,7 +99,7 @@ void OptOCubeSplitter::detailedDeviatesLightRay( LightRay& lightray ) //---------- Get first plate if (ALIUtils::debug >= 3) std::cout << "%%%%% refracting at entering first plate " << std::endl; if (ALIUtils::debug >= 3) std::cout << "%%% getting first plate " << std::endl; - ALIPlane plate = getPlate(1, 1); + ALIPlane plate = getPlate(true, true); //---------- Refract ALIdouble refra_ind1 = 1.; @@ -143,7 +143,7 @@ void OptOCubeSplitter::detailedTraversesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: DETAILED TRAVERSE CUBE SPLITTER " << name() << std::endl; //---------- Get forward plate - ALIPlane plate = getPlate(1, 1); + ALIPlane plate = getPlate(true, true); //---------- Refract while entering splitter ALIdouble refra_ind1 = 1.; @@ -154,7 +154,7 @@ void OptOCubeSplitter::detailedTraversesLightRay( LightRay& lightray ) } //---------- Get backward plate - plate = getPlate(0, 1); + plate = getPlate(false, true); //---------- Refract while exiting splitter lightray.refract( plate, refra_ind2, refra_ind1 ); if (ALIUtils::debug >= 2) { diff --git a/Alignment/CocoaModel/src/OptODistancemeter.cc b/Alignment/CocoaModel/src/OptODistancemeter.cc index 86dd9489018cb..f2dd78134f90c 100644 --- a/Alignment/CocoaModel/src/OptODistancemeter.cc +++ b/Alignment/CocoaModel/src/OptODistancemeter.cc @@ -43,7 +43,7 @@ void OptODistancemeter::makeMeasurement( LightRay& lightray, Measurement& meas ) ALILine dm_line( centreGlob(), ZAxis ); CLHEP::Hep3Vector ZAxisdt(0.,0.,1.); - CLHEP::HepRotation rmtdt = opto_prev->rmGlob(); + const CLHEP::HepRotation& rmtdt = opto_prev->rmGlob(); ZAxisdt = rmtdt * ZAxisdt; ALIPlane dt_plane( opto_prev->centreGlob(), ZAxisdt ); diff --git a/Alignment/CocoaModel/src/OptOMirror.cc b/Alignment/CocoaModel/src/OptOMirror.cc index 170c0c5c8aaaa..eb10ba41d52a0 100644 --- a/Alignment/CocoaModel/src/OptOMirror.cc +++ b/Alignment/CocoaModel/src/OptOMirror.cc @@ -36,7 +36,7 @@ void OptOMirror::detailedDeviatesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 3) ALIUtils::dump3v( centreGlob(), " centre Global "); //---------- Get forward plate and intersect lightray with it - ALIPlane plate = getPlate(1, 0); + ALIPlane plate = getPlate(true, false); lightray.intersect( plate ); CLHEP::Hep3Vector inters = lightray.point( ); @@ -116,7 +116,7 @@ void OptOMirror::fastDeviatesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: FAST REFLECTION IN MIRROR " << name() << std::endl; //---------- Get forward plate - ALIPlane plate = getPlate(1, 0); + ALIPlane plate = getPlate(true, false); //---------- Reflect in plate (including intersection with it) lightray.reflect( plate ); @@ -140,7 +140,7 @@ void OptOMirror::detailedTraversesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: DETAILED TRAVERSE IN MIRROR " << name() << std::endl; //---------- Get forward plate - ALIPlane plate = getPlate(1, 1); + ALIPlane plate = getPlate(true, true); //---------- If width is 0, just keep the same point ALIdouble width = findExtraEntryValue("width"); if( width == 0 ) { @@ -157,7 +157,7 @@ void OptOMirror::detailedTraversesLightRay( LightRay& lightray ) } //---------- Get backward plate - plate = getPlate(0, 1); + plate = getPlate(false, true); //---------- Refract while exiting mirror lightray.refract( plate, refra_ind2, refra_ind1 ); if (ALIUtils::debug >= 2) { @@ -173,7 +173,7 @@ void OptOMirror::fastTraversesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: TRAVERSE MIRROR " << name() << std::endl; //---------- Get backward plate - ALIPlane plate = getPlate(0, 0); + ALIPlane plate = getPlate(false, false); lightray.intersect( plate ); if (ALIUtils::debug >= 2) { lightray.dumpData("Intersected with plate"); diff --git a/Alignment/CocoaModel/src/OptOModifiedRhomboidPrism.cc b/Alignment/CocoaModel/src/OptOModifiedRhomboidPrism.cc index 1d8f2b1a78730..686c9db5e6d5d 100644 --- a/Alignment/CocoaModel/src/OptOModifiedRhomboidPrism.cc +++ b/Alignment/CocoaModel/src/OptOModifiedRhomboidPrism.cc @@ -46,7 +46,7 @@ void OptOModifiedRhomboidPrism::detailedDeviatesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "$$$ LR: REFRACTION IN FORWARD PLATE " << std::endl; //---------- Get forward plate - ALIPlane plate = getPlate( 1, 1 ); + ALIPlane plate = getPlate( true, true ); //---------- Refract in plate while entering ALIdouble refra_ind1 = 1.; ALIdouble refra_ind2 = findExtraEntryValueMustExist("refra_ind"); @@ -57,19 +57,19 @@ void OptOModifiedRhomboidPrism::detailedDeviatesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << std::endl << "$$$ LR: REFLECTION IN FIRST PLATE " << std::endl; //---------- Get up plate rotated - plate = getRotatedPlate( 1 ); + plate = getRotatedPlate( true ); //---------- Reflect in plate lightray.reflect( plate ); if (ALIUtils::debug >= 2) std::cout << std::endl << "$$$ LR: REFLECTION IN SECOND PLATE " << std::endl; //---------- Get up plate rotated - plate = getRotatedPlate( 0 ); + plate = getRotatedPlate( false ); //---------- Reflect in plate lightray.reflect( plate ); if (ALIUtils::debug >= 2) std::cout << std::endl << "$$$ LR: REFRACTION IN BACKWARD PLATE " << std::endl; //---------- Get backward plate - plate = getPlate( 0, 1 ); + plate = getPlate( false, true ); //---------- Refract in plate while exiting lightray.refract( plate, refra_ind2, refra_ind1 ); @@ -89,7 +89,7 @@ void OptOModifiedRhomboidPrism::detailedTraversesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: DETAILED TRAVERSE MODIFIED RHOMBOID PRISM " << name() << std::endl; //---------- Get forward plate - ALIPlane plate = getPlate(1, 1); + ALIPlane plate = getPlate(true, true); //---------- Refract while entering splitter ALIdouble refra_ind1 = 1.; ALIdouble refra_ind2 = findExtraEntryValueMustExist("refra_ind"); @@ -99,7 +99,7 @@ void OptOModifiedRhomboidPrism::detailedTraversesLightRay( LightRay& lightray ) } //---------- Get back ward plate (of triangular piiece) - plate = getPlate(1, 0); + plate = getPlate(true, false); //---------- Refract while exiting prism lightray.refract( plate, refra_ind2, refra_ind1 ); if (ALIUtils::debug >= 2) { @@ -121,7 +121,7 @@ void OptOModifiedRhomboidPrism::fastDeviatesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: FAST REFLECTION IN MODIFIED RHOMBOID PRISM " << name() << std::endl; //---------- Get backward plate - ALIPlane plate = getPlate(0, 0); + ALIPlane plate = getPlate(false, false); //---------- Intersect with plate lightray.intersect( plate ); if (ALIUtils::debug >= 2) { @@ -159,7 +159,7 @@ void OptOModifiedRhomboidPrism::fastTraversesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: FAST TRAVERSE MODIFIED RHOMBOID PRISM " << name() << std::endl; //---------- Get backward plate - ALIPlane plate = getPlate(0, 0); + ALIPlane plate = getPlate(false, false); lightray.intersect( plate ); if (ALIUtils::debug >= 2) { lightray.dumpData("Intersected with plate"); diff --git a/Alignment/CocoaModel/src/OptOOpticalSquare.cc b/Alignment/CocoaModel/src/OptOOpticalSquare.cc index c3f3af809a415..c7ce90b4b2d81 100644 --- a/Alignment/CocoaModel/src/OptOOpticalSquare.cc +++ b/Alignment/CocoaModel/src/OptOOpticalSquare.cc @@ -29,7 +29,7 @@ void OptOOpticalSquare::detailedDeviatesLightRay( LightRay& lightray ) { if (ALIUtils::debug >= 2) std::cout << "LR: DETAILED DEVIATION IN OPTICAL SQUARE " << name() << std::endl; - calculateFaces( 1 ); + calculateFaces( true ); //---------- Deviate in prism //---------- Refract after entering face 0, reflect in face 1, reflect in face 2, refract after face 3 @@ -66,7 +66,7 @@ void OptOOpticalSquare::detailedTraversesLightRay( LightRay& lightray ) { if (ALIUtils::debug >= 2) std::cout << "LR: DETAILED TRAVERSES OPTICAL SQUARE " << name() << std::endl; - calculateFaces( 1 ); + calculateFaces( true ); const ALIdouble refra_ind = findExtraEntryValueMustExist("refra_ind"); const ALIdouble refra_ind0 = 1.; @@ -85,7 +85,7 @@ void OptOOpticalSquare::fastDeviatesLightRay( LightRay& lightray ) { if (ALIUtils::debug >= 2) std::cout << "LR: FAST DEVIATION IN OPTICAL SQUARE " << name() << std::endl; - calculateFaces( 0 ); + calculateFaces( false ); //---------- Deviate in prism lightray.reflect( ALIPlane(faceP[1],faceV[1] )); @@ -130,7 +130,7 @@ void OptOOpticalSquare::fastTraversesLightRay( LightRay& lightray ) { // std::cerr << " WARNING there should be an extra piece to make entering and exiting surfaces parallel (like in modified_rhomboid_prism) " << std::endl; - calculateFaces( 0 ); + calculateFaces( false ); lightray.intersect( ALIPlane(faceP[1],faceV[1] )); //---------- Shift and Deviate diff --git a/Alignment/CocoaModel/src/OptOPlateSplitter.cc b/Alignment/CocoaModel/src/OptOPlateSplitter.cc index ef988caf0a9ca..22176ff985842 100644 --- a/Alignment/CocoaModel/src/OptOPlateSplitter.cc +++ b/Alignment/CocoaModel/src/OptOPlateSplitter.cc @@ -29,7 +29,7 @@ void OptOPlateSplitter::detailedDeviatesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 3) ALIUtils::dump3v( centreGlob(), " centre Global RF "); //---------- Get forward plate - ALIPlane plate = getPlate(1, 1); + ALIPlane plate = getPlate(true, true); //---------- Reflect lightray.reflect( plate ); if (ALIUtils::debug >= 2) { @@ -53,7 +53,7 @@ void OptOPlateSplitter::detailedTraversesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: DETAILED TRAVERSE IN PLATE SPLITTER " << name() << std::endl; //---------- Get forward plate - ALIPlane plate = getPlate(1, 1); + ALIPlane plate = getPlate(true, true); //---------- If width is 0, just keep the same point ALIdouble width = findExtraEntryValue("width"); if( width == 0 ) { @@ -70,7 +70,7 @@ void OptOPlateSplitter::detailedTraversesLightRay( LightRay& lightray ) } //---------- Get backward plate - plate = getPlate(0, 1); + plate = getPlate(false, true); //---------- Refract while exiting splitter lightray.refract( plate, refra_ind2, refra_ind1 ); if (ALIUtils::debug >= 2) { @@ -92,7 +92,7 @@ void OptOPlateSplitter::fastDeviatesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: REFLECTION IN PLATE SPLITTER " << name() << std::endl; //---------- Get forward plate - ALIPlane plate = getPlate(1, 0); + ALIPlane plate = getPlate(true, false); //---------- Reflect in plate (including intersection with it) lightray.reflect( plate ); if (ALIUtils::debug >= 2) { @@ -121,7 +121,7 @@ void OptOPlateSplitter::fastTraversesLightRay( LightRay& lightray ) if (ALIUtils::debug >= 2) std::cout << "LR: TRAVERSE PLATE SPLITTER " << name() << std::endl; //---------- Get backward plate - ALIPlane plate = getPlate(0, 0); + ALIPlane plate = getPlate(false, false); lightray.intersect( plate ); if (ALIUtils::debug >= 2) { lightray.dumpData("Intersected with plate"); diff --git a/Alignment/CocoaModel/src/OptOUserDefined.cc b/Alignment/CocoaModel/src/OptOUserDefined.cc index 26a7d32c1c01a..f3afcf3b111ed 100644 --- a/Alignment/CocoaModel/src/OptOUserDefined.cc +++ b/Alignment/CocoaModel/src/OptOUserDefined.cc @@ -35,7 +35,7 @@ void OptOUserDefined::userDefinedBehaviour( LightRay& lightray, Measurement& mea if(ALIUtils::debug >= 5)ALIUtils::dump3v( centreGlob(), " user Defined centre " ); //---- Object is not a basic one - if(ExtraEntryList().size() == 0) { + if(ExtraEntryList().empty()) { std::cerr << "OpticalObject: !!! EXITING at Measurement: " << meas.name() << " in OptO: " << name() << " behaviour ':" << behav << "' is not adequate " << std::endl; std::cerr << "an OptO has to indicate if detailed simulation traverses (:T) or deviates (:D) or Fast Simulation traverses (:FT) or deviates (:FD) or default behaviour () "<< std::endl; exit(4); @@ -67,7 +67,7 @@ void OptOUserDefined::userDefinedBehaviour( LightRay& lightray, Measurement& mea //- << " deviX " << deviX << " deviY " << deviY << std::endl; } - ALIPlane plate = getPlate(0, 0); + ALIPlane plate = getPlate(false, false); lightray.intersect( plate ); #ifdef COCOA_VIS diff --git a/Alignment/CocoaModel/src/OpticalObjectMgr.cc b/Alignment/CocoaModel/src/OpticalObjectMgr.cc index 040887344dbf0..3066179ee9eb9 100644 --- a/Alignment/CocoaModel/src/OpticalObjectMgr.cc +++ b/Alignment/CocoaModel/src/OpticalObjectMgr.cc @@ -3,7 +3,7 @@ #include "Alignment/CocoaModel/interface/Model.h" #include -OpticalObjectMgr* OpticalObjectMgr::theInstance = 0; +OpticalObjectMgr* OpticalObjectMgr::theInstance = nullptr; //----------------------------------------------------------------------- OpticalObjectMgr* OpticalObjectMgr::getInstance() @@ -20,7 +20,7 @@ OpticalObjectMgr* OpticalObjectMgr::getInstance() //----------------------------------------------------------------------- OpticalObject* OpticalObjectMgr::findOptO( const ALIstring& longName, bool exists ) const { - OpticalObject* opto = 0; + OpticalObject* opto = nullptr; msopto::const_iterator cite = theOptODict.find( longName ); if( cite == theOptODict.end() ) { if( exists ) { @@ -53,7 +53,7 @@ std::vector OpticalObjectMgr::findOptOs( const ALIstring& name, } } - if( vopto.size() == 0 ) { + if( vopto.empty() ) { if( exists ) { std::cerr << "!!!! EXITING: OptO not found: " << name << std::endl; exit(1); @@ -74,8 +74,8 @@ void OpticalObjectMgr::dumpOptOs( std::ostream& out ) const std::vector< OpticalObject* >::const_iterator vocite; for( vocite = Model::OptOList().begin(); vocite != Model::OptOList().end(); ++vocite ) { ALIstring name = (*vocite)->name(); - ALIUtils::dump3v( (*vocite)->centreGlobal(), (name + " CENTRE GLOBAL: ").c_str() ); - if( (*vocite)->parent() != 0 ) ALIUtils::dump3v( (*vocite)->centreLocal(), (name + " CENTRE LOCAL: ").c_str() ); //not for the 'system' + ALIUtils::dump3v( (*vocite)->centreGlobal(), name + " CENTRE GLOBAL: " ); + if( (*vocite)->parent() != nullptr ) ALIUtils::dump3v( (*vocite)->centreLocal(), name + " CENTRE LOCAL: " ); //not for the 'system' } } diff --git a/Alignment/CocoaModel/src/ParameterMgr.cc b/Alignment/CocoaModel/src/ParameterMgr.cc index 06b36eb24c124..291c4ce6e77cd 100644 --- a/Alignment/CocoaModel/src/ParameterMgr.cc +++ b/Alignment/CocoaModel/src/ParameterMgr.cc @@ -13,7 +13,7 @@ //---------------------------------------------------------------------------- -ParameterMgr* ParameterMgr::theInstance = 0; +ParameterMgr* ParameterMgr::theInstance = nullptr; //---------------------------------------------------------------------------- ParameterMgr* ParameterMgr::getInstance() diff --git a/Alignment/CocoaToDDL/src/CocoaToDDLMgr.cc b/Alignment/CocoaToDDL/src/CocoaToDDLMgr.cc index 298755347148c..15fbcbc5a7537 100644 --- a/Alignment/CocoaToDDL/src/CocoaToDDLMgr.cc +++ b/Alignment/CocoaToDDL/src/CocoaToDDLMgr.cc @@ -19,7 +19,7 @@ -CocoaToDDLMgr* CocoaToDDLMgr::instance = 0; +CocoaToDDLMgr* CocoaToDDLMgr::instance = nullptr; //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ CocoaToDDLMgr* CocoaToDDLMgr::getInstance() @@ -622,7 +622,7 @@ void CocoaToDDLMgr::specPar(OpticalObject * opto) file_ << " type() << "\" eval=\"false\" /> " << std::endl; file_ << " getCmsswID() << "\" /> " << std::endl; - const std::vector< Entry* > coord = opto->CoordinateEntryList(); + const std::vector< Entry* >& coord = opto->CoordinateEntryList(); for( int ii=3; ii<6; ii++ ){ Entry* ent = coord[ii]; file_ << " name()+std::string("_value") << "\" value=\""; @@ -641,7 +641,7 @@ void CocoaToDDLMgr::specPar(OpticalObject * opto) file_ << " name()+std::string("_quality") << "\" value=\"" << ent->quality() << "\" /> " << std::endl; } - const std::vector< Entry* > extraEnt = opto->ExtraEntryList(); + const std::vector< Entry* >& extraEnt = opto->ExtraEntryList(); for( ALIuint ii=0; iiname() << "\" eval=\"false\" /> " << std::endl; diff --git a/Alignment/CocoaToDDL/src/CocoaUnitsTable.cc b/Alignment/CocoaToDDL/src/CocoaUnitsTable.cc index c33e035a5e8a0..4c9e08da49c18 100644 --- a/Alignment/CocoaToDDL/src/CocoaUnitsTable.cc +++ b/Alignment/CocoaToDDL/src/CocoaUnitsTable.cc @@ -85,7 +85,7 @@ CocoaUnitsTable& CocoaUnitDefinition::GetUnitsTable() ALIdouble CocoaUnitDefinition::GetValueOf(const ALIstring& str) { - if(theUnitsTable.size()==0) BuildUnitsTable(); + if(theUnitsTable.empty()) BuildUnitsTable(); ALIstring name,symbol; for (size_t i=0;iGetUnitsList(); @@ -105,7 +105,7 @@ ALIdouble CocoaUnitDefinition::GetValueOf(const ALIstring& str) ALIstring CocoaUnitDefinition::GetCategory(const ALIstring& str) { - if(theUnitsTable.size()==0) BuildUnitsTable(); + if(theUnitsTable.empty()) BuildUnitsTable(); ALIstring name,symbol; for (size_t i=0;iGetUnitsList(); @@ -322,7 +322,7 @@ CocoaBestUnit::CocoaBestUnit(ALIdouble value, const ALIstring& category) { // find the category CocoaUnitsTable& theUnitsTable = CocoaUnitDefinition::GetUnitsTable(); - if( theUnitsTable.size() == 0 ) CocoaUnitDefinition::BuildUnitsTable(); //t should be done somewhere else + if( theUnitsTable.empty() ) CocoaUnitDefinition::BuildUnitsTable(); //t should be done somewhere else size_t nbCat = theUnitsTable.size(); size_t i = 0; while diff --git a/Alignment/CocoaUtilities/interface/ALIFileOut.h b/Alignment/CocoaUtilities/interface/ALIFileOut.h index da1b706e496a2..ca62c8aa042a1 100644 --- a/Alignment/CocoaUtilities/interface/ALIFileOut.h +++ b/Alignment/CocoaUtilities/interface/ALIFileOut.h @@ -24,7 +24,7 @@ class ALIFileOut : public std::ofstream public: ALIFileOut(){}; ALIFileOut( const ALIstring& name ): std::ofstream(), theName(name){}; - ~ALIFileOut(){}; + ~ALIFileOut() override{}; // get the instance of file with name filename static ALIFileOut& getInstance( const ALIstring& filename ); diff --git a/Alignment/CocoaUtilities/interface/ALIUtils.h b/Alignment/CocoaUtilities/interface/ALIUtils.h index cac49db41b093..991ba668bf00d 100644 --- a/Alignment/CocoaUtilities/interface/ALIUtils.h +++ b/Alignment/CocoaUtilities/interface/ALIUtils.h @@ -16,7 +16,7 @@ #include "CLHEP/Vector/ThreeVector.h" #include "CLHEP/Vector/Rotation.h" #include -#include +#include #include #include #include diff --git a/Alignment/CocoaUtilities/interface/CocoaGlobals.h b/Alignment/CocoaUtilities/interface/CocoaGlobals.h index 3fa0725ad93d6..8fef0eb9d8798 100644 --- a/Alignment/CocoaUtilities/interface/CocoaGlobals.h +++ b/Alignment/CocoaUtilities/interface/CocoaGlobals.h @@ -3,8 +3,8 @@ //#include #include -#include -#include +#include +#include typedef std::string ALIstring; diff --git a/Alignment/CocoaUtilities/interface/GlobalOptionMgr.h b/Alignment/CocoaUtilities/interface/GlobalOptionMgr.h index e571c85d2d3c7..db0a8a4dc6bf2 100644 --- a/Alignment/CocoaUtilities/interface/GlobalOptionMgr.h +++ b/Alignment/CocoaUtilities/interface/GlobalOptionMgr.h @@ -38,7 +38,7 @@ class GlobalOptionMgr ///----- Search a string in theGlobalOptions and return 1 if found int getGlobalOptionValue( const ALIstring& sstr, ALIdouble& val ); void setGlobalOption( const ALIstring go, const ALIdouble val, ALIFileIn& filein ); - bool setGlobalOption( const ALIstring go, const ALIdouble val, bool bExit = 1 ); + bool setGlobalOption( const ALIstring go, const ALIdouble val, bool bExit = true ); private: static GlobalOptionMgr* theInstance; diff --git a/Alignment/CocoaUtilities/src/ALIFileIn.cc b/Alignment/CocoaUtilities/src/ALIFileIn.cc index d1fa2a5840189..7e8ae250a8669 100644 --- a/Alignment/CocoaUtilities/src/ALIFileIn.cc +++ b/Alignment/CocoaUtilities/src/ALIFileIn.cc @@ -8,7 +8,7 @@ #include "Alignment/CocoaUtilities/interface/ALIFileIn.h" -#include +#include #include //#include @@ -167,7 +167,7 @@ ALIint ALIFileIn::getWordsInLine(std::vector& wordlist) // typedef istream_iterator ALIstring_iter; // copy(ALIstring_iter(istr_line), ALIstring_iter(), back_inserter(wordlist)); - if ( wordlist.size() != 0 ) { + if ( !wordlist.empty() ) { if( (*(wordlist.end()-1)) == "\\" ) { //use '\' to mark continuing line wordlist.pop_back(); } else { @@ -219,7 +219,7 @@ ALIbool ALIFileIn::eof() //only real closing if all files are closed //- std::cout << " eof " << isok << " " << theCurrentFile << std::endl; if( theCurrentFile != -1 ) { - return 0; + return false; } else { return isok; } diff --git a/Alignment/CocoaUtilities/src/ALIFileOut.cc b/Alignment/CocoaUtilities/src/ALIFileOut.cc index fa445fa48c864..9485f7089c160 100644 --- a/Alignment/CocoaUtilities/src/ALIFileOut.cc +++ b/Alignment/CocoaUtilities/src/ALIFileOut.cc @@ -7,7 +7,7 @@ #include "Alignment/CocoaUtilities/interface/ALIFileOut.h" -#include +#include #include std::vector ALIFileOut::theInstances; diff --git a/Alignment/CocoaUtilities/src/ALIUtils.cc b/Alignment/CocoaUtilities/src/ALIUtils.cc index 3accfda423ba6..a22c1370079b9 100644 --- a/Alignment/CocoaUtilities/src/ALIUtils.cc +++ b/Alignment/CocoaUtilities/src/ALIUtils.cc @@ -8,8 +8,8 @@ #include "Alignment/CocoaUtilities/interface/ALIUtils.h" #include "Alignment/CocoaUtilities/interface/GlobalOptionMgr.h" -#include -#include +#include +#include #include @@ -423,19 +423,19 @@ int ALIUtils::getInt( const ALIstring& str ) exit(1); } else { //----- Check that it is not a float, no decimal or E-n - bool isFloat = 0; + bool isFloat = false; int ch = str.find('.'); ALIuint ii = 0; if(ch != -1 ) { for( ii = ch+1; ii < str.size(); ii++) { - if( str[ii] != '0' ) isFloat = 1; + if( str[ii] != '0' ) isFloat = true; } } ch = str.find('E'); if(ch != -1 ) ch = str.find('e'); if(ch != -1 ) { - if(str[ch+1] == '-') isFloat = 1; + if(str[ch+1] == '-') isFloat = true; } if(isFloat) { @@ -799,7 +799,7 @@ double ALIUtils::addPii( double val ) int ALIUtils::checkMatrixEquations( double angleX, double angleY, double angleZ, CLHEP::HepRotation* rot) { //- std::cout << " cme " << angleX << " " << angleY << " " << angleZ << std::endl; - if( rot == 0 ) { + if( rot == nullptr ) { rot = new CLHEP::HepRotation(); rot->rotateX( angleX ); rot->rotateY( angleY ); diff --git a/Alignment/CocoaUtilities/src/GlobalOptionMgr.cc b/Alignment/CocoaUtilities/src/GlobalOptionMgr.cc index 3fd5d042153fb..efaa6fadb6385 100644 --- a/Alignment/CocoaUtilities/src/GlobalOptionMgr.cc +++ b/Alignment/CocoaUtilities/src/GlobalOptionMgr.cc @@ -13,7 +13,7 @@ #include "Alignment/CocoaUtilities/interface/ALIFileIn.h" #include -GlobalOptionMgr* GlobalOptionMgr::theInstance = 0; +GlobalOptionMgr* GlobalOptionMgr::theInstance = nullptr; GlobalOptionMgr* GlobalOptionMgr::getInstance() { @@ -145,7 +145,7 @@ ALIint GlobalOptionMgr::getGlobalOptionValue( const ALIstring& sstr, ALIdouble& void GlobalOptionMgr::setGlobalOption( const ALIstring gopt, const ALIdouble val, ALIFileIn& filein ) { - if( !setGlobalOption( gopt, val, 0 ) ){ + if( !setGlobalOption( gopt, val, false ) ){ filein.ErrorInLine(); std::cerr << "!!! global option not found: " << gopt << std::endl; if ( ALIUtils::debug >= 3 ) { @@ -175,14 +175,14 @@ bool GlobalOptionMgr::setGlobalOption( const ALIstring gopt, const ALIdouble val ALIUtils::setDebugVerbosity( ALIint(val) ); } - return 1; + return true; //----- if global option does not exist: error } else { if( bExit ) { std::cerr << "!!! global option not found: " << gopt << std::endl; exit(2); } - return 0; + return false; } } diff --git a/Alignment/CommonAlignment/interface/AlignableComposite.h b/Alignment/CommonAlignment/interface/AlignableComposite.h index e2e97fea9fc05..36a3391a9b264 100644 --- a/Alignment/CommonAlignment/interface/AlignableComposite.h +++ b/Alignment/CommonAlignment/interface/AlignableComposite.h @@ -34,7 +34,7 @@ class AlignableComposite : public Alignable const RotationType& rot = RotationType() ); /// deleting its components - virtual ~AlignableComposite(); + ~AlignableComposite() override; /// Updater for a composite with given rotation. /// The given id and structure type have to match the current ones. @@ -45,16 +45,16 @@ class AlignableComposite : public Alignable /// 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 theComponents; } + Alignables components() const override { return theComponents; } /// 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; /// Move with respect to the local reference frame virtual void moveComponentsLocal( const LocalVector& localDisplacement ); @@ -63,45 +63,45 @@ class AlignableComposite : public Alignable virtual void moveComponentLocal( const int i, const LocalVector& localDisplacement ); /// Rotation interpreted in global reference frame - virtual void rotateInGlobalFrame( const RotationType& rotation ); + void rotateInGlobalFrame( const RotationType& rotation ) override; /// Set the AlignmentPositionError (if this Alignable is a Det) and, /// if (propagateDown), to all the components of the composite - virtual void setAlignmentPositionError( const AlignmentPositionError& ape, bool propagateDown ); + void setAlignmentPositionError( const AlignmentPositionError& ape, bool propagateDown ) override; /// Add the AlignmentPositionError (if this Alignable is a Det) and, /// if (propagateDown), add to all the components of the composite - virtual void addAlignmentPositionError( const AlignmentPositionError& ape, bool propagateDown ); + void addAlignmentPositionError( const AlignmentPositionError& ape, bool propagateDown ) override; /// Add the AlignmentPositionError resulting from global rotation (if this Alignable is a Det) and, /// if (propagateDown), add to all the components of the composite - virtual void addAlignmentPositionErrorFromRotation( const RotationType& rotation, bool propagateDown ); + void addAlignmentPositionErrorFromRotation( const RotationType& rotation, 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; /// Set the surface deformation parameters - if (!propagateDown) do not affect daughters - virtual void setSurfaceDeformation(const SurfaceDeformation *deformation, bool propagateDown); + void setSurfaceDeformation(const SurfaceDeformation *deformation, bool propagateDown) override; /// Add the surface deformation parameters to the existing ones, /// if (!propagateDown) do not affect daughters. - virtual void addSurfaceDeformation(const SurfaceDeformation *deformation, bool propagateDown); + void addSurfaceDeformation(const SurfaceDeformation *deformation, bool propagateDown) override; /// Return the alignable type identifier - virtual StructureType alignableObjectId() const { return theStructureType; } + StructureType alignableObjectId() const override { return theStructureType; } /// Recursive printout of alignable structure - virtual void dump() const; + void dump() const override; /// Return alignment data - virtual Alignments* alignments() const; + Alignments* alignments() const override; /// Return vector of alignment errors - virtual AlignmentErrorsExtended* alignmentErrors() const; + AlignmentErrorsExtended* alignmentErrors() const override; /// Return surface deformations - virtual int surfaceDeformationIdPairs(std::vector > &) const; + int surfaceDeformationIdPairs(std::vector > &) const override; protected: /// Constructor from GeomDet, only for use in AlignableDet diff --git a/Alignment/CommonAlignment/interface/AlignableDet.h b/Alignment/CommonAlignment/interface/AlignableDet.h index 796205fe1a32a..73cfd724d62cf 100644 --- a/Alignment/CommonAlignment/interface/AlignableDet.h +++ b/Alignment/CommonAlignment/interface/AlignableDet.h @@ -15,33 +15,33 @@ class AlignableDet: public AlignableComposite AlignableDet( const GeomDet* geomDet, bool addComponents = true ); /// Destructor - virtual ~AlignableDet(); + ~AlignableDet() override; /// Updater from GeomDet /// The given GeomDet id has to match the current id. void update(const GeomDet* geomDet, bool updateComponents = true); /// 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; // No need to overwrite, version from AlignableComposite is just fine: // virtual void addAlignmentPositionErrorFromLocalRotation(const RotationType &rot, // bool propagateDown); /// 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;} diff --git a/Alignment/CommonAlignment/interface/AlignableDetUnit.h b/Alignment/CommonAlignment/interface/AlignableDetUnit.h index 2faff6d3c10c6..be0a6ee095e9f 100644 --- a/Alignment/CommonAlignment/interface/AlignableDetUnit.h +++ b/Alignment/CommonAlignment/interface/AlignableDetUnit.h @@ -19,75 +19,75 @@ class AlignableDetUnit : public Alignable AlignableDetUnit(const GeomDetUnit *geomDetUnit); /// Destructor - virtual ~AlignableDetUnit(); + ~AlignableDetUnit() override; /// Updater from GeomDetUnit /// The given GeomDetUnit id has to match the current id. void update(const GeomDetUnit* geomDetUnit); /// No components here => exception! - virtual void addComponent( Alignable* ); + void addComponent( Alignable* ) override; /// Returns a null vector (no components here) - virtual Alignables components() const { return Alignables(); } + Alignables components() const override { return Alignables(); } /// Do nothing (no components here, so no subcomponents either...) - 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 with respect to the global reference frame - virtual void rotateInGlobalFrame( const RotationType& rotation ); + void rotateInGlobalFrame( const RotationType& rotation ) override; /// Set the AlignmentPositionError (no components => second argument ignored) - virtual void setAlignmentPositionError(const AlignmentPositionError &ape, bool /*propDown*/); + void setAlignmentPositionError(const AlignmentPositionError &ape, bool /*propDown*/) override; /// Add (or set if it does not exist yet) the AlignmentPositionError /// (no components => second argument without effect) - virtual void addAlignmentPositionError(const AlignmentPositionError& ape, bool /*propDown*/); + void addAlignmentPositionError(const AlignmentPositionError& ape, bool /*propDown*/) override; /// Add (or set if it does not exist yet) the AlignmentPositionError /// resulting from a rotation in the global reference frame /// (no components => second argument without effect) - virtual void addAlignmentPositionErrorFromRotation(const RotationType& rot, bool /*propDown*/); + void addAlignmentPositionErrorFromRotation(const RotationType& rot, bool /*propDown*/) override; /// Add (or set if it does not exist yet) the AlignmentPositionError /// resulting from a rotation in the local reference frame /// (no components => second argument without effect) - virtual void addAlignmentPositionErrorFromLocalRotation(const RotationType& rot, bool /*propDown*/); + void addAlignmentPositionErrorFromLocalRotation(const RotationType& rot, bool /*propDown*/) override; /// Set surface deformation parameters (2nd argument without effect) - virtual void setSurfaceDeformation(const SurfaceDeformation *deformation, bool); + void setSurfaceDeformation(const SurfaceDeformation *deformation, bool) override; /// Add surface deformation parameters to the existing ones (2nd argument without effect) - virtual void addSurfaceDeformation(const SurfaceDeformation *deformation, bool); + void addSurfaceDeformation(const SurfaceDeformation *deformation, bool) override; /// Return the alignable type identifier - virtual StructureType alignableObjectId () const { return align::AlignableDetUnit; } + StructureType alignableObjectId () const override { return align::AlignableDetUnit; } /// Printout information about GeomDet - 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; /// Return surface deformations - virtual int surfaceDeformationIdPairs(std::vector > &) const; + int surfaceDeformationIdPairs(std::vector > &) const override; /// cache the current position, rotation and other parameters (e.g. surface deformations) - virtual void cacheTransformation(); + void cacheTransformation() override; /// cache for the given run the current position, rotation and other parameters (e.g. surface deformations) - virtual void cacheTransformation(const align::RunNumber&); + void cacheTransformation(const align::RunNumber&) override; /// restore the previously cached transformation - virtual void restoreCachedTransformation(); + void restoreCachedTransformation() override; /// restore for the given run the previously cached transformation - virtual void restoreCachedTransformation(const align::RunNumber&); + void restoreCachedTransformation(const align::RunNumber&) override; /// alignment position error - for checking only, otherwise use alignmentErrors() above! const AlignmentPositionError* alignmentPositionError() const { return theAlignmentPositionError;} diff --git a/Alignment/CommonAlignment/interface/AlignmentParametersData.h b/Alignment/CommonAlignment/interface/AlignmentParametersData.h index 13940fb230973..17d8882ea2ffc 100644 --- a/Alignment/CommonAlignment/interface/AlignmentParametersData.h +++ b/Alignment/CommonAlignment/interface/AlignmentParametersData.h @@ -34,7 +34,7 @@ class AlignmentParametersData : public ReferenceCounted AlignmentParametersData( const AlgebraicVector& param, const AlgebraicSymMatrix& cov ); - ~AlignmentParametersData( void ); + ~AlignmentParametersData( void ) override; /// Access to the parameter vector. const AlgebraicVector& parameters( void ) const { return *theParameters; } diff --git a/Alignment/CommonAlignment/plugins/APVModeFilter.cc b/Alignment/CommonAlignment/plugins/APVModeFilter.cc index d91604d240a76..167c4c477d92e 100644 --- a/Alignment/CommonAlignment/plugins/APVModeFilter.cc +++ b/Alignment/CommonAlignment/plugins/APVModeFilter.cc @@ -57,13 +57,13 @@ class APVModeFilter : public edm::stream::EDFilter<> { public: explicit APVModeFilter(const edm::ParameterSet&); - ~APVModeFilter() = default; + ~APVModeFilter() override = default; static void fillDescriptions(edm::ConfigurationDescriptions&); private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void beginRun(const edm::Run&, const edm::EventSetup&) override; + bool filter(edm::Event&, const edm::EventSetup&) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; using BitMask = std::bitset<16>; /// APV mode is encoded in uin16_t diff --git a/Alignment/CommonAlignment/plugins/MagneticFieldFilter.cc b/Alignment/CommonAlignment/plugins/MagneticFieldFilter.cc index ecf82289eaaba..24a663ff5d93a 100644 --- a/Alignment/CommonAlignment/plugins/MagneticFieldFilter.cc +++ b/Alignment/CommonAlignment/plugins/MagneticFieldFilter.cc @@ -41,13 +41,13 @@ class MagneticFieldFilter : public edm::stream::EDFilter<> { public: explicit MagneticFieldFilter(const edm::ParameterSet&); - ~MagneticFieldFilter() = default; + ~MagneticFieldFilter() override = default; static void fillDescriptions(edm::ConfigurationDescriptions&); private: - virtual bool filter(edm::Event&, const edm::EventSetup&) override; - virtual void beginRun(const edm::Run&, const edm::EventSetup&) override; + bool filter(edm::Event&, const edm::EventSetup&) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; /// convert Ampere (A) to Tesla (T) float currentToField(const float& current) const; diff --git a/Alignment/CommonAlignment/src/AlignTools.cc b/Alignment/CommonAlignment/src/AlignTools.cc index c63c4866228dd..3532eabf5c243 100644 --- a/Alignment/CommonAlignment/src/AlignTools.cc +++ b/Alignment/CommonAlignment/src/AlignTools.cc @@ -49,7 +49,7 @@ AlgebraicVector align::diffAlignables(Alignable* refAli, Alignable*curAli, const //adjust translational difference factoring in different rotational CM //needed because rotateInGlobalFrame is about CM of alignable, not points - align::GlobalVector::BasicVectorType lpvgf = cmdiff.basicVector(); + const align::GlobalVector::BasicVectorType& lpvgf = cmdiff.basicVector(); align::GlobalVector moveV( rot.multiplyInverse(lpvgf) - lpvgf); align::GlobalVector theRprime(theR + moveV); //convert to local movement diff --git a/Alignment/CommonAlignment/src/AlignableComposite.cc b/Alignment/CommonAlignment/src/AlignableComposite.cc index 7b0c148b57c00..282a99ec372b4 100644 --- a/Alignment/CommonAlignment/src/AlignableComposite.cc +++ b/Alignment/CommonAlignment/src/AlignableComposite.cc @@ -160,7 +160,7 @@ void AlignableComposite::rotateInGlobalFrame( const RotationType& rotation ) // Local Position given in coordinates of the GLOBAL Frame const GlobalVector localPositionVector = (**i).globalPosition() - myPosition; - GlobalVector::BasicVectorType lpvgf = localPositionVector.basicVector(); + const GlobalVector::BasicVectorType& lpvgf = localPositionVector.basicVector(); // rotate with GLOBAL rotation matrix and subtract => moveVector in // global Coordinates @@ -235,7 +235,7 @@ void AlignableComposite::addAlignmentPositionErrorFromRotation( const RotationTy // when the composite is rotated. // Local Position given in coordinates of the GLOBAL Frame const GlobalVector localPositionVector = (**i).globalPosition()-myPosition; - GlobalVector::BasicVectorType lpvgf = localPositionVector.basicVector(); + const GlobalVector::BasicVectorType& lpvgf = localPositionVector.basicVector(); // rotate with GLOBAL rotation matrix and subtract => moveVector in global coordinates // apparently... you have to use the inverse of the rotation here diff --git a/Alignment/CommonAlignment/src/AlignableDet.cc b/Alignment/CommonAlignment/src/AlignableDet.cc index 460c74afba9c8..5c6d046f86275 100644 --- a/Alignment/CommonAlignment/src/AlignableDet.cc +++ b/Alignment/CommonAlignment/src/AlignableDet.cc @@ -14,7 +14,7 @@ //__________________________________________________________________________________________________ AlignableDet::AlignableDet( const GeomDet* geomDet, bool addComponents ) : AlignableComposite( geomDet ), - theAlignmentPositionError(0) + theAlignmentPositionError(nullptr) { // ensure that the surface is not constrained to the average position of the // components: @@ -26,7 +26,7 @@ AlignableDet::AlignableDet( const GeomDet* geomDet, bool addComponents ) : } if (addComponents) { - if ( geomDet->components().size() == 0 ) { // Is a DetUnit + if ( geomDet->components().empty() ) { // Is a DetUnit throw cms::Exception("BadHierarchy") << "[AlignableDet] GeomDet with DetId " << geomDet->geographicalId().rawId() << " has no components, use AlignableDetUnit.\n"; @@ -69,7 +69,7 @@ void AlignableDet::update(const GeomDet* geomDet, bool updateComponents) } if (updateComponents) { - if (geomDet->components().size() == 0 ) { // Is a DetUnit + if (geomDet->components().empty() ) { // Is a DetUnit throw cms::Exception("BadHierarchy") << "[AlignableDet] GeomDet with DetId " << geomDet->geographicalId().rawId() @@ -151,7 +151,7 @@ void AlignableDet::addAlignmentPositionErrorFromRotation(const RotationType& rot // (xWidth/2,yLength/2,0) caused by the rotation rot GlobalVector localPositionVector = surface().toGlobal( LocalVector(.5 * surface().width(), .5 * surface().length(), 0.) ); - LocalVector::BasicVectorType lpvgf = localPositionVector.basicVector(); + const LocalVector::BasicVectorType& lpvgf = localPositionVector.basicVector(); GlobalVector gv( rot.multiplyInverse(lpvgf) - lpvgf ); AlignmentPositionError ape( gv.x(),gv.y(),gv.z() ); diff --git a/Alignment/CommonAlignment/src/AlignableDetUnit.cc b/Alignment/CommonAlignment/src/AlignableDetUnit.cc index 0d272692a0369..d1bd5243556ec 100644 --- a/Alignment/CommonAlignment/src/AlignableDetUnit.cc +++ b/Alignment/CommonAlignment/src/AlignableDetUnit.cc @@ -14,9 +14,9 @@ //__________________________________________________________________________________________________ AlignableDetUnit::AlignableDetUnit(const GeomDetUnit *geomDetUnit) : // rely on non-NULL pointer! Alignable(geomDetUnit->geographicalId().rawId(), geomDetUnit->surface()), - theAlignmentPositionError(0), - theSurfaceDeformation(0), - theCachedSurfaceDeformation(0) + theAlignmentPositionError(nullptr), + theSurfaceDeformation(nullptr), + theCachedSurfaceDeformation(nullptr) { if (geomDetUnit->alignmentPositionError()) { // take over APE from geometry // 2nd argument w/o effect: @@ -126,7 +126,7 @@ void AlignableDetUnit::addAlignmentPositionErrorFromRotation(const RotationType& .5 * surface().length(), 0.) ); - LocalVector::BasicVectorType lpvgf = localPositionVector.basicVector(); + const LocalVector::BasicVectorType& lpvgf = localPositionVector.basicVector(); GlobalVector gv( rot.multiplyInverse(lpvgf) - lpvgf ); AlignmentPositionError ape( gv.x(),gv.y(),gv.z() ); @@ -153,7 +153,7 @@ void AlignableDetUnit::setSurfaceDeformation(const SurfaceDeformation *deformati if (deformation) { theSurfaceDeformation = deformation->clone(); } else { - theSurfaceDeformation = 0; + theSurfaceDeformation = nullptr; } } @@ -171,7 +171,7 @@ void AlignableDetUnit::addSurfaceDeformation(const SurfaceDeformation *deformati << " to type " << theSurfaceDeformation->type() << ", so erase deformation information."; delete theSurfaceDeformation; - theSurfaceDeformation = 0; + theSurfaceDeformation = nullptr; } } @@ -261,7 +261,7 @@ void AlignableDetUnit::cacheTransformation() if (theCachedSurfaceDeformation) { delete theCachedSurfaceDeformation; - theCachedSurfaceDeformation = 0; + theCachedSurfaceDeformation = nullptr; } if (theSurfaceDeformation) @@ -278,7 +278,7 @@ void AlignableDetUnit::cacheTransformation(const align::RunNumber& run) auto existingCache = surfaceDeformationsCache_.find(run); if (existingCache != surfaceDeformationsCache_.end()) { delete existingCache->second; - existingCache->second = 0; + existingCache->second = nullptr; } if (theSurfaceDeformation) { @@ -295,7 +295,7 @@ void AlignableDetUnit::restoreCachedTransformation() if (theSurfaceDeformation) { delete theSurfaceDeformation; - theSurfaceDeformation = 0; + theSurfaceDeformation = nullptr; } if (theCachedSurfaceDeformation) { @@ -318,7 +318,7 @@ void AlignableDetUnit::restoreCachedTransformation(const align::RunNumber& run) if (theSurfaceDeformation) { delete theSurfaceDeformation; - theSurfaceDeformation = 0; + theSurfaceDeformation = nullptr; } if (surfaceDeformationsCache_[run]) { diff --git a/Alignment/CommonAlignment/src/AlignableModifier.cc b/Alignment/CommonAlignment/src/AlignableModifier.cc index 104aba4eb182c..d2af7781d4e90 100644 --- a/Alignment/CommonAlignment/src/AlignableModifier.cc +++ b/Alignment/CommonAlignment/src/AlignableModifier.cc @@ -1,5 +1,5 @@ #include -#include +#include #include "CLHEP/Random/DRand48Engine.h" #include "CLHEP/Random/RandGauss.h" diff --git a/Alignment/CommonAlignment/src/AlignableObjectId.cc b/Alignment/CommonAlignment/src/AlignableObjectId.cc index b146c25722b8d..4391f0dafe9e2 100644 --- a/Alignment/CommonAlignment/src/AlignableObjectId.cc +++ b/Alignment/CommonAlignment/src/AlignableObjectId.cc @@ -77,7 +77,7 @@ namespace { {align:: AlignableMuon , "Muon"}, {align::BeamSpot, "BeamSpot"}, - {align::notfound, 0} + {align::notfound, nullptr} }; constexpr AlignableObjectId::entry entries_PhaseI[] { @@ -143,7 +143,7 @@ namespace { {align::AlignableMuon , "Muon"}, {align::BeamSpot, "BeamSpot"}, - {align::notfound, 0} + {align::notfound, nullptr} }; constexpr AlignableObjectId::entry entries_PhaseII[] { @@ -211,7 +211,7 @@ namespace { {align::AlignableMuon , "Muon"}, {align::BeamSpot, "BeamSpot"}, - {align::notfound, 0} + {align::notfound, nullptr} }; @@ -221,7 +221,7 @@ namespace { constexpr char const *objectIdToString(align::StructureType type, AlignableObjectId::entry const *entries) { - return !entries->name ? 0 : + return !entries->name ? nullptr : entries->type == type ? entries->name : objectIdToString(type, entries+1); } @@ -283,7 +283,7 @@ const char *AlignableObjectId::idToString(align::StructureType type) const { const char *result = objectIdToString(type, entries_); - if (result == 0) + if (result == nullptr) { throw cms::Exception("AlignableObjectIdError") << "Unknown alignableObjectId " << type; diff --git a/Alignment/CommonAlignment/src/AlignmentParameters.cc b/Alignment/CommonAlignment/src/AlignmentParameters.cc index e708f18bf1b10..e834eefe5fbca 100644 --- a/Alignment/CommonAlignment/src/AlignmentParameters.cc +++ b/Alignment/CommonAlignment/src/AlignmentParameters.cc @@ -8,8 +8,8 @@ //__________________________________________________________________________________________________ AlignmentParameters::AlignmentParameters() : - theAlignable( 0), - theUserVariables( 0), + theAlignable( nullptr), + theUserVariables( nullptr), bValid(true) {} @@ -19,7 +19,7 @@ AlignmentParameters::AlignmentParameters(Alignable* object, const AlgebraicVecto const AlgebraicSymMatrix& cov) : theAlignable(object), theData( DataContainer( new AlignmentParametersData(par,cov) ) ), - theUserVariables(0), + theUserVariables(nullptr), bValid(true) { // is the data consistent? @@ -33,7 +33,7 @@ AlignmentParameters::AlignmentParameters(Alignable* object, const AlgebraicVecto const std::vector& sel) : theAlignable(object), theData( DataContainer( new AlignmentParametersData(par,cov,sel) ) ), - theUserVariables(0), + theUserVariables(nullptr), bValid(true) { // is the data consistent? @@ -46,7 +46,7 @@ AlignmentParameters::AlignmentParameters(Alignable* object, const AlignmentParametersData::DataContainer& data ) : theAlignable(object), theData(data), - theUserVariables(0), + theUserVariables(nullptr), bValid(true) { // is the data consistent? diff --git a/Alignment/CommonAlignment/src/SurveyResidual.cc b/Alignment/CommonAlignment/src/SurveyResidual.cc index da47a8e1c5b2a..904e6588d6ad0 100644 --- a/Alignment/CommonAlignment/src/SurveyResidual.cc +++ b/Alignment/CommonAlignment/src/SurveyResidual.cc @@ -11,7 +11,7 @@ using namespace align; SurveyResidual::SurveyResidual(const Alignable& ali, StructureType type, bool bias): - theMother(0), + theMother(nullptr), theSurface( ali.surface() ), theSelector( ali.alignmentParameters()->selector() ) { @@ -40,7 +40,7 @@ SurveyResidual::SurveyResidual(const Alignable& ali, findSisters(theMother, bias); - if (theSisters.size() == 0) + if (theSisters.empty()) { throw cms::Exception("ConfigError") << "You are finding an unbiased residual of an alignable " diff --git a/Alignment/CommonAlignment/src/Utilities.cc b/Alignment/CommonAlignment/src/Utilities.cc index 5ee39b54dc005..15eed7e57a7b5 100644 --- a/Alignment/CommonAlignment/src/Utilities.cc +++ b/Alignment/CommonAlignment/src/Utilities.cc @@ -228,7 +228,7 @@ align::makeNonOverlappingRunRanges(const edm::VParameterSet& runRanges, ipset.getParameter >("RunRanges"); for (const auto& irange: RunRangeStrings) { if (irange.find(':')==std::string::npos) { - long int temp{strtol(irange.c_str(), 0, 0)}; + long int temp{strtol(irange.c_str(), nullptr, 0)}; auto first = (temp != -1) ? temp : beginValue; uniqueFirstRunNumbers[first] = first; } else { @@ -238,7 +238,7 @@ align::makeNonOverlappingRunRanges(const edm::VParameterSet& runRanges, << "the start run number is used internally. The number of the last" << " run is ignored and can besafely removed from the config file."; auto tokens = edm::tokenize(irange, ":"); - long int temp{strtol(tokens[0].c_str(), 0, 0)}; + long int temp{strtol(tokens[0].c_str(), nullptr, 0)}; auto first = (temp != -1) ? temp : beginValue; uniqueFirstRunNumbers[first] = first; } diff --git a/Alignment/CommonAlignmentAlgorithm/interface/AlignableDataIORoot.h b/Alignment/CommonAlignmentAlgorithm/interface/AlignableDataIORoot.h index 775b7baafbb6d..ecd8a71c3bec2 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/AlignableDataIORoot.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/AlignableDataIORoot.h @@ -19,24 +19,24 @@ class AlignableDataIORoot : public AlignmentIORootBase, public AlignableDataIO AlignableDataIORoot(PosType p); /// open IO - int open(const char* filename, int iteration, bool writemode) + int open(const char* filename, int iteration, bool writemode) override { newopen=true; return openRoot(filename,iteration,writemode); } /// close IO - int close(void){ return closeRoot(); } + int close(void) override{ return closeRoot(); } /// write absolute positions - int writeAbsRaw(const AlignableAbsData &ad); + int writeAbsRaw(const AlignableAbsData &ad) override; /// read absolute positions - AlignableAbsData readAbsRaw(Alignable* ali,int& ierr); + AlignableAbsData readAbsRaw(Alignable* ali,int& ierr) override; /// write relative positions - int writeRelRaw(const AlignableRelData &ad); + int writeRelRaw(const AlignableRelData &ad) override; /// read relative positions - AlignableRelData readRelRaw(Alignable* ali,int& ierr); + AlignableRelData readRelRaw(Alignable* ali,int& ierr) override; int findEntry(align::ID, align::StructureType); - void createBranches(void); - void setBranchAddresses(void); + void createBranches(void) override; + void setBranchAddresses(void) override; // data members diff --git a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentCorrelationsIORoot.h b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentCorrelationsIORoot.h index 8dccd9d0f2e43..58376cb0aa466 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentCorrelationsIORoot.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentCorrelationsIORoot.h @@ -17,21 +17,21 @@ class AlignmentCorrelationsIORoot : public AlignmentIORootBase, public Alignment AlignmentCorrelationsIORoot(); /// open IO - int open(const char* filename, int iteration, bool writemode) { + int open(const char* filename, int iteration, bool writemode) override { return openRoot(filename,iteration,writemode); }; /// close IO - int close(void){ return closeRoot(); }; + int close(void) override{ return closeRoot(); }; /// write correlations - int write(const align::Correlations& cor, bool validCheck); + int write(const align::Correlations& cor, bool validCheck) override; /// read correlations - align::Correlations read(const align::Alignables& alivec, int& ierr); + align::Correlations read(const align::Alignables& alivec, int& ierr) override; - void createBranches(void); - void setBranchAddresses(void); + void createBranches(void) override; + void setBranchAddresses(void) override; // data members diff --git a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentExtendedCorrelationsStore.h b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentExtendedCorrelationsStore.h index 9dbfb2b8344c9..5f68e5e5c7878 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentExtendedCorrelationsStore.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentExtendedCorrelationsStore.h @@ -26,33 +26,33 @@ class AlignmentExtendedCorrelationsStore : public AlignmentCorrelationsStore AlignmentExtendedCorrelationsStore( const edm::ParameterSet& config ); - virtual ~AlignmentExtendedCorrelationsStore( void ) {} + ~AlignmentExtendedCorrelationsStore( void ) override {} /// Write correlations directly to the covariance matrix starting at the /// given position. Indices are assumed to start from 0. - virtual void correlations( Alignable* ap1, Alignable* ap2, + void correlations( Alignable* ap1, Alignable* ap2, AlgebraicSymMatrix& cov, int row, int col ) const override; /// Get correlations directly from the given position of the covariance /// matrix and store them. Indices are assumed to start from 0. - virtual void setCorrelations( Alignable* ap1, Alignable* ap2, + void setCorrelations( Alignable* ap1, Alignable* ap2, const AlgebraicSymMatrix& cov, int row, int col ) override; /// Set correlations without checking whether the maximum /// number of updates has already been reached. - virtual void setCorrelations( Alignable* ap1, Alignable* ap2, AlgebraicMatrix& mat ) override; + void setCorrelations( Alignable* ap1, Alignable* ap2, AlgebraicMatrix& mat ) override; /// Get correlations. virtual void getCorrelations( Alignable* ap1, Alignable* ap2, AlgebraicMatrix& mat ) const; /// Check whether correlations are stored for a given pair of alignables. - virtual bool correlationsAvailable( Alignable* ap1, Alignable* ap2 ) const override; + bool correlationsAvailable( Alignable* ap1, Alignable* ap2 ) const override; /// Reset correlations. - virtual void resetCorrelations( void ) override; + void resetCorrelations( void ) override; /// Get number of stored correlations. - virtual unsigned int size( void ) const override; + unsigned int size( void ) const override; private: diff --git a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORootBase.h b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORootBase.h index 162c187629dfc..bae943e33dbb2 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORootBase.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentIORootBase.h @@ -13,7 +13,7 @@ class AlignmentIORootBase protected: /// constructor - AlignmentIORootBase() : tree(0), myFile(0) {} + AlignmentIORootBase() : tree(nullptr), myFile(nullptr) {} /// destructor virtual ~AlignmentIORootBase(); diff --git a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentParameterSelector.h b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentParameterSelector.h index 89512364a191d..e93f3355fe922 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentParameterSelector.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentParameterSelector.h @@ -26,8 +26,8 @@ namespace edm { class AlignmentParameterSelector { public: /// Constructor from tracker only or from tracker and muon - explicit AlignmentParameterSelector(AlignableTracker *aliTracker, AlignableMuon *aliMuon = 0, - AlignableExtras *aliExtras = 0); + explicit AlignmentParameterSelector(AlignableTracker *aliTracker, AlignableMuon *aliMuon = nullptr, + AlignableExtras *aliExtras = nullptr); /// Destructor virtual ~AlignmentParameterSelector() {} diff --git a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentParametersIORoot.h b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentParametersIORoot.h index 176d49964a08a..ea72c84f5678e 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentParametersIORoot.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentParametersIORoot.h @@ -23,17 +23,17 @@ class AlignmentParametersIORoot : public AlignmentIORootBase, public AlignmentPa AlignmentParametersIORoot(); /// Write AlignmentParameters of one Alignable - int writeOne(Alignable* ali); + int writeOne(Alignable* ali) override; /// Read AlignmentParameters of one Alignable - AlignmentParameters* readOne(Alignable* ali, int& ierr); + AlignmentParameters* readOne(Alignable* ali, int& ierr) override; /// Open IO - int open(const char* filename, int iteration, bool writemode) + int open(const char* filename, int iteration, bool writemode) override {return openRoot(filename,iteration,writemode);}; /// Close IO - int close(void); + int close(void) override; // helper functions @@ -42,10 +42,10 @@ class AlignmentParametersIORoot : public AlignmentIORootBase, public AlignmentPa int findEntry(align::ID, align::StructureType); /// Create all branches and give names - void createBranches(void); + void createBranches(void) override; /// Set branch adresses - void setBranchAddresses(void); + void setBranchAddresses(void) override; // Alignment parameter tree int theCovRang, theCovarRang, theHieraLevel, theParamType; diff --git a/Alignment/CommonAlignmentAlgorithm/interface/SelectionUserVariables.h b/Alignment/CommonAlignmentAlgorithm/interface/SelectionUserVariables.h index 69354fdb11528..e43013bff01f9 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/SelectionUserVariables.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/SelectionUserVariables.h @@ -21,8 +21,8 @@ class SelectionUserVariables : public AlignmentUserVariables { public: explicit SelectionUserVariables(const std::vector &sel) : myFullSelection(sel) {} - virtual ~SelectionUserVariables() {} - virtual SelectionUserVariables* clone() const { return new SelectionUserVariables(*this);} + ~SelectionUserVariables() override {} + SelectionUserVariables* clone() const override { return new SelectionUserVariables(*this);} const std::vector& fullSelection() const {return myFullSelection;} diff --git a/Alignment/CommonAlignmentAlgorithm/plugins/ApeSettingAlgorithm.cc b/Alignment/CommonAlignmentAlgorithm/plugins/ApeSettingAlgorithm.cc index 6bb8daba920bc..6a2970951c3ad 100644 --- a/Alignment/CommonAlignmentAlgorithm/plugins/ApeSettingAlgorithm.cc +++ b/Alignment/CommonAlignmentAlgorithm/plugins/ApeSettingAlgorithm.cc @@ -64,18 +64,18 @@ class ApeSettingAlgorithm : public AlignmentAlgorithmBase ApeSettingAlgorithm(const edm::ParameterSet &cfg); /// Destructor - virtual ~ApeSettingAlgorithm(); + ~ApeSettingAlgorithm() override; /// Call at beginning of job - virtual void initialize(const edm::EventSetup &setup, + void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store) override; /// Call at end of job - virtual void terminate(const edm::EventSetup& iSetup) override; + void terminate(const edm::EventSetup& iSetup) override; /// Run the algorithm - virtual void run(const edm::EventSetup &setup, const EventInfo &eventInfo) override; + void run(const edm::EventSetup &setup, const EventInfo &eventInfo) override; private: edm::ParameterSet theConfig; @@ -96,7 +96,7 @@ class ApeSettingAlgorithm : public AlignmentAlgorithmBase //____________________________________________________ ApeSettingAlgorithm::ApeSettingAlgorithm(const edm::ParameterSet &cfg) : AlignmentAlgorithmBase(cfg), theConfig(cfg), - theAlignableNavigator(0) + theAlignableNavigator(nullptr) { edm::LogInfo("Alignment") << "@SUB=ApeSettingAlgorithm" << "Start."; saveApeToAscii_ = theConfig.getUntrackedParameter("saveApeToASCII"); @@ -145,7 +145,7 @@ void ApeSettingAlgorithm::initialize(const edm::EventSetup &setup, { DetId id(apeId); AlignableDetOrUnitPtr alidet(theAlignableNavigator->alignableFromDetId(id)); //NULL if none if (alidet) - { if ((alidet->components().size()<1) || setComposites_) //the problem with glued dets... + { if ((alidet->components().empty()) || setComposites_) //the problem with glued dets... { GlobalErrorExtended globErr; if (readLocalNotGlobal_) { AlgebraicSymMatrix33 as; @@ -200,7 +200,7 @@ void ApeSettingAlgorithm::terminate(const edm::EventSetup& iSetup) for (int i=0; i < theSize; ++i) { int id= aliErr->m_alignError[i].rawId(); AlignableDetOrUnitPtr alidet(theAlignableNavigator->alignableFromDetId(DetId(id))); //NULL if none - if (alidet && ((alidet->components().size()<1) || saveComposites_)) + if (alidet && ((alidet->components().empty()) || saveComposites_)) { apeSaveFile<m_alignError[i].matrix(); if (saveLocalNotGlobal_) @@ -223,7 +223,7 @@ void ApeSettingAlgorithm::terminate(const edm::EventSetup& iSetup) } // clean up at end: // FIXME: should we delete here or in destructor? delete theAlignableNavigator; - theAlignableNavigator = 0; + theAlignableNavigator = nullptr; } // Run the algorithm on trajectories and tracks ------------------------------- diff --git a/Alignment/CommonAlignmentAlgorithm/plugins/SiPixelLorentzAngleCalibration.cc b/Alignment/CommonAlignmentAlgorithm/plugins/SiPixelLorentzAngleCalibration.cc index a7ec32fd2e20e..28c5bc9f8e08e 100644 --- a/Alignment/CommonAlignmentAlgorithm/plugins/SiPixelLorentzAngleCalibration.cc +++ b/Alignment/CommonAlignmentAlgorithm/plugins/SiPixelLorentzAngleCalibration.cc @@ -58,10 +58,10 @@ class SiPixelLorentzAngleCalibration : public IntegratedCalibrationBase explicit SiPixelLorentzAngleCalibration(const edm::ParameterSet &cfg); /// Destructor - virtual ~SiPixelLorentzAngleCalibration(); + ~SiPixelLorentzAngleCalibration() override; /// How many parameters does this calibration define? - virtual unsigned int numParameters() const override; + unsigned int numParameters() const override; // /// Return all derivatives, // /// default implementation uses other derivatives(..) method, @@ -73,7 +73,7 @@ class SiPixelLorentzAngleCalibration : public IntegratedCalibrationBase /// Return non-zero derivatives for x- and y-measurements with their indices by reference. /// Return value is their number. - virtual unsigned int derivatives(std::vector &outDerivInds, + unsigned int derivatives(std::vector &outDerivInds, const TransientTrackingRecHit &hit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, @@ -81,22 +81,22 @@ class SiPixelLorentzAngleCalibration : public IntegratedCalibrationBase /// Setting the determined parameter identified by index, /// returns false if out-of-bounds, true otherwise. - virtual bool setParameter(unsigned int index, double value) override; + bool setParameter(unsigned int index, double value) override; /// Setting the determined parameter uncertainty identified by index, /// returns false if out-of-bounds, true otherwise. - virtual bool setParameterError(unsigned int index, double error) override; + bool setParameterError(unsigned int index, double error) override; /// Return current value of parameter identified by index. /// Return 0. if index out-of-bounds. - virtual double getParameter(unsigned int index) const override; + double getParameter(unsigned int index) const override; /// Return current value of parameter identified by index. /// Returns 0. if index out-of-bounds or if errors undetermined. - virtual double getParameterError(unsigned int index) const override; + double getParameterError(unsigned int index) const override; // /// Call at beginning of job: - virtual void beginOfJob(AlignableTracker *tracker, + void beginOfJob(AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras) override; @@ -104,7 +104,7 @@ class SiPixelLorentzAngleCalibration : public IntegratedCalibrationBase /// Called at end of a the job of the AlignmentProducer. /// Write out determined parameters. - virtual void endOfJob() override; + void endOfJob() override; private: /// If called the first time, fill 'siPixelLorentzAngleInput_', @@ -149,8 +149,8 @@ SiPixelLorentzAngleCalibration::SiPixelLorentzAngleCalibration(const edm::Parame recordNameDBwrite_(cfg.getParameter("recordNameDBwrite")), outFileName_(cfg.getParameter("treeFile")), mergeFileNames_(cfg.getParameter >("mergeTreeFiles")), - siPixelLorentzAngleInput_(0), - moduleGroupSelector_(0), + siPixelLorentzAngleInput_(nullptr), + moduleGroupSelector_(nullptr), moduleGroupSelCfg_(cfg.getParameter("LorentzAngleModuleGroups")) { @@ -268,7 +268,7 @@ void SiPixelLorentzAngleCalibration::beginOfJob(AlignableTracker *aliTracker, << "\n N(merge files) = " << mergeFileNames_.size() << "\n number of IOVs = " << moduleGroupSelector_->numIovs(); - if (mergeFileNames_.size()) { + if (!mergeFileNames_.empty()) { edm::LogInfo("Alignment") << "@SUB=SiPixelLorentzAngleCalibration" << "First file to merge: " << mergeFileNames_[0]; } @@ -329,7 +329,7 @@ void SiPixelLorentzAngleCalibration::endOfJob() if (saveToDB_) { // If requested, write out to DB edm::Service dbService; if (dbService.isAvailable()) { - dbService->writeOne(output, firstRunOfIOV, recordNameDBwrite_.c_str()); + dbService->writeOne(output, firstRunOfIOV, recordNameDBwrite_); // no 'delete output;': writeOne(..) took over ownership } else { delete output; @@ -468,17 +468,17 @@ SiPixelLorentzAngleCalibration::createFromTree(const char *fileName, const char { // Check for file existence on your own to work around // https://hypernews.cern.ch/HyperNews/CMS/get/swDevelopment/2715.html: - TFile* file = 0; + TFile* file = nullptr; FILE* testFile = fopen(fileName,"r"); if (testFile) { fclose(testFile); file = TFile::Open(fileName, "READ"); } // else not existing, see error below - TTree *tree = 0; + TTree *tree = nullptr; if (file) file->GetObject(treeName, tree); - SiPixelLorentzAngle *result = 0; + SiPixelLorentzAngle *result = nullptr; if (tree) { unsigned int id = 0; float value = 0.; diff --git a/Alignment/CommonAlignmentAlgorithm/plugins/SiStripBackplaneCalibration.cc b/Alignment/CommonAlignmentAlgorithm/plugins/SiStripBackplaneCalibration.cc index 693407ee23af0..c96633ddf9315 100644 --- a/Alignment/CommonAlignmentAlgorithm/plugins/SiStripBackplaneCalibration.cc +++ b/Alignment/CommonAlignmentAlgorithm/plugins/SiStripBackplaneCalibration.cc @@ -59,10 +59,10 @@ class SiStripBackplaneCalibration : public IntegratedCalibrationBase explicit SiStripBackplaneCalibration(const edm::ParameterSet &cfg); /// Destructor - virtual ~SiStripBackplaneCalibration(); + ~SiStripBackplaneCalibration() override; /// How many parameters does this calibration define? - virtual unsigned int numParameters() const; + unsigned int numParameters() const override; // /// Return all derivatives, // /// default implementation uses other derivatives(..) method, @@ -74,36 +74,36 @@ class SiStripBackplaneCalibration : public IntegratedCalibrationBase /// Return non-zero derivatives for x- and y-measurements with their indices by reference. /// Return value is their number. - virtual unsigned int derivatives(std::vector &outDerivInds, + unsigned int derivatives(std::vector &outDerivInds, const TransientTrackingRecHit &hit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, - const EventInfo &eventInfo) const; + const EventInfo &eventInfo) const override; /// Setting the determined parameter identified by index, /// returns false if out-of-bounds, true otherwise. - virtual bool setParameter(unsigned int index, double value); + bool setParameter(unsigned int index, double value) override; /// Setting the determined parameter uncertainty identified by index, /// returns false if out-of-bounds, true otherwise. - virtual bool setParameterError(unsigned int index, double error); + bool setParameterError(unsigned int index, double error) override; /// Return current value of parameter identified by index. /// Returns 0. if index out-of-bounds. - virtual double getParameter(unsigned int index) const; + double getParameter(unsigned int index) const override; /// Return current value of parameter identified by index. /// Returns 0. if index out-of-bounds or if errors undetermined. - virtual double getParameterError(unsigned int index) const; + double getParameterError(unsigned int index) const override; // /// Call at beginning of job: - virtual void beginOfJob(AlignableTracker *tracker, + void beginOfJob(AlignableTracker *tracker, AlignableMuon *muon, - AlignableExtras *extras); + AlignableExtras *extras) override; /// Called at end of a the job of the AlignmentProducer. /// Write out determined parameters. - virtual void endOfJob(); + void endOfJob() override; private: /// If called the first time, fill 'siStripBackPlaneCorrInput_', @@ -152,8 +152,8 @@ SiStripBackplaneCalibration::SiStripBackplaneCalibration(const edm::ParameterSet recordNameDBwrite_(cfg.getParameter("recordNameDBwrite")), outFileName_(cfg.getParameter("treeFile")), mergeFileNames_(cfg.getParameter >("mergeTreeFiles")), - siStripBackPlaneCorrInput_(0), - moduleGroupSelector_(0), + siStripBackPlaneCorrInput_(nullptr), + moduleGroupSelector_(nullptr), moduleGroupSelCfg_(cfg.getParameter("BackplaneModuleGroups")) { @@ -313,7 +313,7 @@ void SiStripBackplaneCalibration::beginOfJob(AlignableTracker *aliTracker, << "\n N(merge files) = " << mergeFileNames_.size() << "\n number of IOVs = " << moduleGroupSelector_->numIovs(); - if (mergeFileNames_.size()) { + if (!mergeFileNames_.empty()) { edm::LogInfo("Alignment") << "@SUB=SiStripBackplaneCalibration" << "First file to merge: " << mergeFileNames_[0]; } @@ -399,7 +399,7 @@ void SiStripBackplaneCalibration::endOfJob() if (saveToDB_) { // If requested, write out to DB edm::Service dbService; if (dbService.isAvailable()) { - dbService->writeOne(output, firstRunOfIOV, recordNameDBwrite_.c_str()); + dbService->writeOne(output, firstRunOfIOV, recordNameDBwrite_); // no 'delete output;': writeOne(..) took over ownership } else { delete output; @@ -541,17 +541,17 @@ SiStripBackplaneCalibration::createFromTree(const char *fileName, const char *tr { // Check for file existence on your own to work around // https://hypernews.cern.ch/HyperNews/CMS/get/swDevelopment/2715.html: - TFile* file = 0; + TFile* file = nullptr; FILE* testFile = fopen(fileName,"r"); if (testFile) { fclose(testFile); file = TFile::Open(fileName, "READ"); } // else not existing, see error below - TTree *tree = 0; + TTree *tree = nullptr; if (file) file->GetObject(treeName, tree); - SiStripBackPlaneCorrection *result = 0; + SiStripBackPlaneCorrection *result = nullptr; if (tree) { unsigned int id = 0; float value = 0.; diff --git a/Alignment/CommonAlignmentAlgorithm/plugins/SiStripLorentzAngleCalibration.cc b/Alignment/CommonAlignmentAlgorithm/plugins/SiStripLorentzAngleCalibration.cc index 71313aef0bd32..04e9280627b64 100644 --- a/Alignment/CommonAlignmentAlgorithm/plugins/SiStripLorentzAngleCalibration.cc +++ b/Alignment/CommonAlignmentAlgorithm/plugins/SiStripLorentzAngleCalibration.cc @@ -57,10 +57,10 @@ class SiStripLorentzAngleCalibration : public IntegratedCalibrationBase explicit SiStripLorentzAngleCalibration(const edm::ParameterSet &cfg); /// Destructor - virtual ~SiStripLorentzAngleCalibration(); + ~SiStripLorentzAngleCalibration() override; /// How many parameters does this calibration define? - virtual unsigned int numParameters() const override; + unsigned int numParameters() const override; // /// Return all derivatives, // /// default implementation uses other derivatives(..) method, @@ -72,7 +72,7 @@ class SiStripLorentzAngleCalibration : public IntegratedCalibrationBase /// Return non-zero derivatives for x- and y-measurements with their indices by reference. /// Return value is their number. - virtual unsigned int derivatives(std::vector &outDerivInds, + unsigned int derivatives(std::vector &outDerivInds, const TransientTrackingRecHit &hit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, @@ -80,29 +80,29 @@ class SiStripLorentzAngleCalibration : public IntegratedCalibrationBase /// Setting the determined parameter identified by index, /// returns false if out-of-bounds, true otherwise. - virtual bool setParameter(unsigned int index, double value) override; + bool setParameter(unsigned int index, double value) override; /// Setting the determined parameter uncertainty identified by index, /// returns false if out-of-bounds, true otherwise. - virtual bool setParameterError(unsigned int index, double error) override; + bool setParameterError(unsigned int index, double error) override; /// Return current value of parameter identified by index. /// Returns 0. if index out-of-bounds. - virtual double getParameter(unsigned int index) const override; + double getParameter(unsigned int index) const override; /// Return current value of parameter identified by index. /// Returns 0. if index out-of-bounds or if errors undetermined. - virtual double getParameterError(unsigned int index) const override; + double getParameterError(unsigned int index) const override; // /// Call at beginning of job: - virtual void beginOfJob(AlignableTracker *tracker, + void beginOfJob(AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras) override; /// Called at end of a the job of the AlignmentProducer. /// Write out determined parameters. - virtual void endOfJob() override; + void endOfJob() override; private: /// If called the first time, fill 'siStripLorentzAngleInput_', @@ -152,8 +152,8 @@ SiStripLorentzAngleCalibration::SiStripLorentzAngleCalibration(const edm::Parame recordNameDBwrite_(cfg.getParameter("recordNameDBwrite")), outFileName_(cfg.getParameter("treeFile")), mergeFileNames_(cfg.getParameter >("mergeTreeFiles")), - siStripLorentzAngleInput_(0), - moduleGroupSelector_(0), + siStripLorentzAngleInput_(nullptr), + moduleGroupSelector_(nullptr), moduleGroupSelCfg_(cfg.getParameter("LorentzAngleModuleGroups")) { @@ -298,7 +298,7 @@ void SiStripLorentzAngleCalibration::beginOfJob(AlignableTracker *aliTracker, << "\n N(merge files) = " << mergeFileNames_.size() << "\n number of IOVs = " << moduleGroupSelector_->numIovs(); - if (mergeFileNames_.size()) { + if (!mergeFileNames_.empty()) { edm::LogInfo("Alignment") << "@SUB=SiStripLorentzAngleCalibration" << "First file to merge: " << mergeFileNames_[0]; } @@ -365,7 +365,7 @@ void SiStripLorentzAngleCalibration::endOfJob() if (saveToDB_) { // If requested, write out to DB edm::Service dbService; if (dbService.isAvailable()) { - dbService->writeOne(output, firstRunOfIOV, recordNameDBwrite_.c_str()); + dbService->writeOne(output, firstRunOfIOV, recordNameDBwrite_); // no 'delete output;': writeOne(..) took over ownership } else { delete output; @@ -525,17 +525,17 @@ SiStripLorentzAngleCalibration::createFromTree(const char *fileName, const char { // Check for file existence on your own to work around // https://hypernews.cern.ch/HyperNews/CMS/get/swDevelopment/2715.html: - TFile* file = 0; + TFile* file = nullptr; FILE* testFile = fopen(fileName,"r"); if (testFile) { fclose(testFile); file = TFile::Open(fileName, "READ"); } // else not existing, see error below - TTree *tree = 0; + TTree *tree = nullptr; if (file) file->GetObject(treeName, tree); - SiStripLorentzAngle *result = 0; + SiStripLorentzAngle *result = nullptr; if (tree) { unsigned int id = 0; float value = 0.; diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignableDataIO.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignableDataIO.cc index 08903431a7628..35939ede97e90 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignableDataIO.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignableDataIO.cc @@ -65,7 +65,7 @@ int AlignableDataIO::writeRelPos(Alignable* ali, bool validCheck) if ( !(validCheck) || ali->alignmentParameters()->isValid() ) { // rel. shift in global frame - align::GlobalVector pos = ali->displacement(); + const align::GlobalVector& pos = ali->displacement(); // rel. rotation in global frame align::RotationType rot = ali->rotation(); // FIXME: should add something to store changes of surface deformations... diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignableDataIORoot.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignableDataIORoot.cc index b81a118e2fc78..aa309e295be29 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignableDataIORoot.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignableDataIORoot.cc @@ -79,7 +79,7 @@ int AlignableDataIORoot::findEntry(align::ID id, align::StructureType comp) // ---------------------------------------------------------------------------- int AlignableDataIORoot::writeAbsRaw(const AlignableAbsData &ad) { - align::GlobalPoint pos = ad.pos(); + const align::GlobalPoint& pos = ad.pos(); align::RotationType rot = ad.rot(); Id = ad.id(); ObjId = ad.objId(); @@ -101,7 +101,7 @@ int AlignableDataIORoot::writeAbsRaw(const AlignableAbsData &ad) // ---------------------------------------------------------------------------- int AlignableDataIORoot::writeRelRaw(const AlignableRelData &ad) { - align::GlobalVector pos = ad.pos(); + const align::GlobalVector& pos = ad.pos(); align::RotationType rot = ad.rot(); Id = ad.id(); ObjId = ad.objId(); diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignmentCorrelationsStore.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignmentCorrelationsStore.cc index e3f5575f733d3..303d0b2ea3b00 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignmentCorrelationsStore.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignmentCorrelationsStore.cc @@ -15,11 +15,11 @@ AlignmentCorrelationsStore::AlignmentCorrelationsStore( void ) void AlignmentCorrelationsStore::correlations( Alignable* ap1, Alignable* ap2, AlgebraicSymMatrix& cov, int row, int col ) const { - static Alignable* previousAlignable = 0; + static Alignable* previousAlignable = nullptr; static CorrelationsTable* previousCorrelations; // Needed by 'resetCorrelations()' to reset the static pointer: - if ( ap1 == 0 ) { previousAlignable = 0; return; } + if ( ap1 == nullptr ) { previousAlignable = nullptr; return; } bool transpose = ( ap2 > ap1 ); if ( transpose ) std::swap( ap1, ap2 ); @@ -60,11 +60,11 @@ void AlignmentCorrelationsStore::correlations( Alignable* ap1, Alignable* ap2, void AlignmentCorrelationsStore::setCorrelations( Alignable* ap1, Alignable* ap2, const AlgebraicSymMatrix& cov, int row, int col ) { - static Alignable* previousAlignable = 0; + static Alignable* previousAlignable = nullptr; static CorrelationsTable* previousCorrelations; // Needed by 'resetCorrelations()' to reset the static pointer: - if ( ap1 == 0 ) { previousAlignable = 0; return; } + if ( ap1 == nullptr ) { previousAlignable = nullptr; return; } bool transpose = ( ap2 > ap1 ); if ( transpose ) std::swap( ap1, ap2 ); @@ -137,8 +137,8 @@ void AlignmentCorrelationsStore::resetCorrelations( void ) // Reset the static pointers to the 'previous alignables' AlgebraicSymMatrix dummy; - correlations( 0, 0, dummy, 0, 0 ); - setCorrelations( 0, 0, dummy, 0, 0 ); + correlations( nullptr, nullptr, dummy, 0, 0 ); + setCorrelations( nullptr, nullptr, dummy, 0, 0 ); } diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignmentExtendedCorrelationsStore.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignmentExtendedCorrelationsStore.cc index d21ab8e8f33d1..d1f5d65742e8c 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignmentExtendedCorrelationsStore.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignmentExtendedCorrelationsStore.cc @@ -23,11 +23,11 @@ AlignmentExtendedCorrelationsStore::AlignmentExtendedCorrelationsStore( const ed void AlignmentExtendedCorrelationsStore::correlations( Alignable* ap1, Alignable* ap2, AlgebraicSymMatrix& cov, int row, int col ) const { - static Alignable* previousAlignable = 0; + static Alignable* previousAlignable = nullptr; static ExtendedCorrelationsTable* previousCorrelations; // Needed by 'resetCorrelations()' to reset the static pointer: - if ( ap1 == 0 ) { previousAlignable = 0; return; } + if ( ap1 == nullptr ) { previousAlignable = nullptr; return; } bool transpose = ( ap2 > ap1 ); if ( transpose ) std::swap( ap1, ap2 ); @@ -68,11 +68,11 @@ void AlignmentExtendedCorrelationsStore::correlations( Alignable* ap1, Alignable void AlignmentExtendedCorrelationsStore::setCorrelations( Alignable* ap1, Alignable* ap2, const AlgebraicSymMatrix& cov, int row, int col ) { - static Alignable* previousAlignable = 0; + static Alignable* previousAlignable = nullptr; static ExtendedCorrelationsTable* previousCorrelations; // Needed by 'resetCorrelations()' to reset the static pointer: - if ( ap1 == 0 ) { previousAlignable = 0; return; } + if ( ap1 == nullptr ) { previousAlignable = nullptr; return; } bool transpose = ( ap2 > ap1 ); if ( transpose ) std::swap( ap1, ap2 ); @@ -175,8 +175,8 @@ void AlignmentExtendedCorrelationsStore::resetCorrelations( void ) // Reset the static pointers to the 'previous alignables' AlgebraicSymMatrix dummy; - correlations( 0, 0, dummy, 0, 0 ); - setCorrelations( 0, 0, dummy, 0, 0 ); + correlations( nullptr, nullptr, dummy, 0, 0 ); + setCorrelations( nullptr, nullptr, dummy, 0, 0 ); } diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignmentIORootBase.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignmentIORootBase.cc index 2243238dd4370..6f0e36a735ee5 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignmentIORootBase.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignmentIORootBase.cc @@ -83,7 +83,7 @@ int AlignmentIORootBase::openRoot(const char* filename, int iteration, bool writ // set trees edm::LogInfo("AlignmentIORootBase") <<" Tree: " <Get(treeName(iter,treename)); - if (tree==NULL) { + if (tree==nullptr) { edm::LogError("AlignmentIORootBase") <<"Tree does not exist in file!"; return -1; } @@ -103,8 +103,8 @@ int AlignmentIORootBase::closeRoot(void) } delete myFile; - myFile = 0; - tree = 0; // deleted with file + myFile = nullptr; + tree = nullptr; // deleted with file return 0; } @@ -117,14 +117,14 @@ int AlignmentIORootBase::testFile(const char* filename, const TString &tname) { FILE* testFILE; testFILE = fopen(filename,"r"); - if (testFILE == NULL) { + if (testFILE == nullptr) { return -1; } else { fclose(testFILE); int ihighest=-2; TFile *aFile = TFile::Open(filename,"read"); for (int iter=0; iterGet(treeName(iter,tname))) + if ((nullptr != (TTree*)aFile->Get(treeName(iter,tname))) && (iter>ihighest)) ihighest=iter; } delete aFile; diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterBuilder.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterBuilder.cc index a37bf846f8bf6..9c307198b895c 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterBuilder.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterBuilder.cc @@ -29,7 +29,7 @@ AlignmentParameterBuilder::AlignmentParameterBuilder(AlignableTracker* alignable AlignableExtras* alignableExtras) : theAlignables(), theAlignableTracker(alignableTracker), - theAlignableMuon(0), + theAlignableMuon(nullptr), theAlignableExtras(alignableExtras) { } @@ -52,7 +52,7 @@ AlignmentParameterBuilder::AlignmentParameterBuilder(AlignableTracker* alignable const edm::ParameterSet &pSet) : theAlignables(), theAlignableTracker(alignableTracker), - theAlignableMuon(0), + theAlignableMuon(nullptr), theAlignableExtras(alignableExtras) { this->addAllSelections(pSet); @@ -79,7 +79,7 @@ const AlignableTracker* AlignmentParameterBuilder::alignableTracker() const //__________________________________________________________________________________________________ void AlignmentParameterBuilder::addAllSelections(const edm::ParameterSet &pSet) { - AlignmentParameterSelector selector(0); + AlignmentParameterSelector selector(nullptr); std::vector selsTypes(pSet.getParameter >("parameterTypes")); for (unsigned int i = 0; i < selsTypes.size(); ++i) { diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterStore.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterStore.cc index 7286f88bdc226..1204248e9089a 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterStore.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterStore.cc @@ -280,7 +280,7 @@ Alignable* AlignmentParameterStore::alignableFromAlignableDet( const AlignableDe mother = mother->mother(); } - return 0; + return nullptr; } //__________________________________________________________________________________________________ @@ -296,7 +296,7 @@ void AlignmentParameterStore::applyParameters(void) void AlignmentParameterStore::applyParameters(Alignable* alignable) { - AlignmentParameters *pars = (alignable ? alignable->alignmentParameters() : 0); + AlignmentParameters *pars = (alignable ? alignable->alignmentParameters() : nullptr); if (!pars) { throw cms::Exception("BadAlignable") << "applyParameters: provided alignable does not have alignment parameters"; @@ -460,7 +460,7 @@ applyAlignableAbsolutePositions(const align::Alignables& alivec, const Alignable const align::RotationType& rold = ali->globalRotation(); // Current surf. deformation std::vector > dold_id_pairs; - SurfaceDeformation* dold_obj=0; + SurfaceDeformation* dold_obj=nullptr; SurfaceDeformationFactory::Type dtype = SurfaceDeformationFactory::kNoDeformations; std::vector dold; if (1 == ali->surfaceDeformationIdPairs(dold_id_pairs)){ // might not have any... @@ -550,7 +550,7 @@ applyAlignableRelativePositions(const align::Alignables& alivec, const Alignable else { // Current surf. deformation std::vector > dold_id_pairs; - SurfaceDeformation* dold_obj=0; + SurfaceDeformation* dold_obj=nullptr; SurfaceDeformationFactory::Type dtype = SurfaceDeformationFactory::kNoDeformations; std::vector dold; if (1 == ali->surfaceDeformationIdPairs(dold_id_pairs)){ // might not have any... diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParametersIO.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParametersIO.cc index 43529bbda80b1..9b1b0ce0e1ad4 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParametersIO.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParametersIO.cc @@ -12,7 +12,7 @@ int AlignmentParametersIO::writeOneOrigRigidBody(Alignable *ali) { AlignmentParameters *par = ali->alignmentParameters(); - AlignmentParameters *parBack = (par ? par->clone(par->parameters(), par->covariance()) : 0); + AlignmentParameters *parBack = (par ? par->clone(par->parameters(), par->covariance()) : nullptr); ali->setAlignmentParameters(new RigidBodyAlignmentParameters(ali, true)); int iret = this->writeOne(ali); @@ -75,7 +75,7 @@ AlignmentParametersIO::read(const align::Alignables& alivec, int& ierr) for(align::Alignables::const_iterator it=alivec.begin(); it!=alivec.end(); ++it) { AlignmentParameters* ad=readOne(*it, ierr2); - if (ad!=0 && ierr2==0) { retvec.push_back(ad); icount++; } + if (ad!=nullptr && ierr2==0) { retvec.push_back(ad); icount++; } } edm::LogInfo("Alignment") << "@SUB-AlignmentParametersIO::write" << "Read " << icount << " out of " << alivec.size() << " parameters"; diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParametersIORoot.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParametersIORoot.cc index 5e8535b6759b1..cbc4176e6e2d8 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParametersIORoot.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParametersIORoot.cc @@ -111,7 +111,7 @@ AlignmentParameters* AlignmentParametersIORoot::readOne( Alignable* ali, int& ie } ierr=-1; - return(0); + return(nullptr); } diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignmentUserVariablesIO.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignmentUserVariablesIO.cc index 4c6fc889be691..9111a832403aa 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignmentUserVariablesIO.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignmentUserVariablesIO.cc @@ -50,7 +50,7 @@ AlignmentUserVariablesIO::read(const align::Alignables& alivec, int& ierr) AlignmentUserVariables* ad=readOne(*it, ierr2); // should create with new! if (ierr2==0) { retvec.push_back(ad); icount++; - if (ad!=0) icount2++; + if (ad!=nullptr) icount2++; } } edm::LogInfo("Alignment") << "@SUB=AlignmentUserVariablesIO::read" diff --git a/Alignment/CommonAlignmentAlgorithm/src/TkModuleGroupSelector.cc b/Alignment/CommonAlignmentAlgorithm/src/TkModuleGroupSelector.cc index e5b30f0ed3b31..f9896ee1a101d 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/TkModuleGroupSelector.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/TkModuleGroupSelector.cc @@ -97,7 +97,7 @@ bool TkModuleGroupSelector::createGroup( this->fillDetIdMap((*it)->id(), firstId_.size()-1); modules_selected = true; } - if(refrun > 0 && range.size() > 0) { //FIXME: last condition not really needed? + if(refrun > 0 && !range.empty()) { //FIXME: last condition not really needed? Id += range.size() - 1; nparameters_ += range.size() - 1; } else { diff --git a/Alignment/CommonAlignmentMonitor/interface/AlignmentMonitorBase.h b/Alignment/CommonAlignmentMonitor/interface/AlignmentMonitorBase.h index e16547ccc8cc8..a9f9897b5a89b 100644 --- a/Alignment/CommonAlignmentMonitor/interface/AlignmentMonitorBase.h +++ b/Alignment/CommonAlignmentMonitor/interface/AlignmentMonitorBase.h @@ -96,8 +96,8 @@ class AlignmentMonitorBase const edm::InputTag m_beamSpotTag; private: - AlignmentMonitorBase(const AlignmentMonitorBase&); // stop default - const AlignmentMonitorBase& operator=(const AlignmentMonitorBase&); // stop default + AlignmentMonitorBase(const AlignmentMonitorBase&) = delete; // stop default + const AlignmentMonitorBase& operator=(const AlignmentMonitorBase&) = delete; // stop default // ---------- member data -------------------------------- diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorGeneric.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorGeneric.cc index 24023b1b042c3..f1c8cfc4a55ed 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorGeneric.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorGeneric.cc @@ -37,7 +37,7 @@ void AlignmentMonitorGeneric::book() Hist1Ds& hists = m_resHists[ali]; - hists.resize(nResidName, 0); + hists.resize(nResidName, nullptr); align::ID id = ali->id(); align::StructureType type = ali->alignableObjectId(); @@ -59,7 +59,7 @@ void AlignmentMonitorGeneric::book() } } - m_trkHists.resize(6, 0); + m_trkHists.resize(6, nullptr); m_trkHists[0] = book1D("/iterN/", "pt" , "track p_{t} (GeV)" , nBin_, 0.0,100.0); m_trkHists[1] = book1D("/iterN/", "eta" , "track #eta" , nBin_, - 3.0, 3.0); diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorGeneric.h b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorGeneric.h index 7b0fe918585a6..2c5bf045c10ff 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorGeneric.h +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorGeneric.h @@ -36,12 +36,12 @@ class AlignmentMonitorGeneric: const edm::ParameterSet& ); - virtual void book(); + void book() override; - virtual void event(const edm::Event&, + void event(const edm::Event&, const edm::EventSetup&, const ConstTrajTrackPairCollection& - ); + ) override; private: diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonResiduals.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonResiduals.cc index cb63e2b0045a0..f614d9c508e7f 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonResiduals.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonResiduals.cc @@ -34,7 +34,7 @@ class AlignmentMonitorMuonResiduals: public AlignmentMonitorBase { public: AlignmentMonitorMuonResiduals(const edm::ParameterSet& cfg); - ~AlignmentMonitorMuonResiduals() {}; + ~AlignmentMonitorMuonResiduals() override {}; void book() override; void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection& iTrajTracks) override; diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc index bf25ea7bed1ca..60fb658c5695c 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc @@ -35,7 +35,7 @@ class AlignmentMonitorMuonSystemMap1D: public AlignmentMonitorBase { public: AlignmentMonitorMuonSystemMap1D(const edm::ParameterSet& cfg); - virtual ~AlignmentMonitorMuonSystemMap1D() {} + ~AlignmentMonitorMuonSystemMap1D() override {} void book() override; @@ -352,7 +352,7 @@ void AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack(MuonResidual m_counter_dt++; - if (id.station() < 4 && dt13 != NULL && dt13->numHits() >= m_minDT13Hits && dt2 != NULL && dt2->numHits() >= m_minDT2Hits && (dt2->chi2() / double(dt2->ndof())) < 2.0) + if (id.station() < 4 && dt13 != nullptr && dt13->numHits() >= m_minDT13Hits && dt2 != nullptr && dt2->numHits() >= m_minDT2Hits && (dt2->chi2() / double(dt2->ndof())) < 2.0) { m_counter_13numhits++; @@ -394,7 +394,7 @@ void AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack(MuonResidual m_DTvsphi_station[id.station()-1][id.wheel()+2]->fill_dydz(charge, phi, resslope, chi2, dof); } - if (id.station() == 4 && dt13 != NULL && dt13->numHits() >= m_minDT13Hits) + if (id.station() == 4 && dt13 != nullptr && dt13->numHits() >= m_minDT13Hits) { m_counter_13numhits++; @@ -428,7 +428,7 @@ void AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack(MuonResidual m_counter_csc++; - if (csc != NULL && csc->numHits() >= m_minCSCHits) + if (csc != nullptr && csc->numHits() >= m_minCSCHits) { m_counter_cscnumhits++; @@ -499,7 +499,7 @@ void AlignmentMonitorMuonSystemMap1D::afterAlignment() AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::MuonSystemMapPlot1D(std::string name, AlignmentMonitorMuonSystemMap1D *module, int bins, double low, double high, bool xy, bool add_1d) : m_name(name), m_bins(bins), m_xy(xy), m_1d(add_1d) { - m_x_2d = m_y_2d = m_dxdz_2d = m_dydz_2d = NULL; + m_x_2d = m_y_2d = m_dxdz_2d = m_dydz_2d = nullptr; std::stringstream name_x_2d, name_y_2d, name_dxdz_2d, name_dydz_2d; name_x_2d << m_name << "_x_2d"; name_y_2d << m_name << "_y_2d"; @@ -509,16 +509,16 @@ AlignmentMonitorMuonSystemMap1D::MuonSystemMapPlot1D::MuonSystemMapPlot1D(std::s const int nbins = 200; const double window = 100.; - m_x_2d = module->book2D("/iterN/", name_x_2d.str().c_str(), "", m_bins, low, high, nbins, -window, window); - if (m_xy) m_y_2d = module->book2D("/iterN/", name_y_2d.str().c_str(), "", m_bins, low, high, nbins, -window, window); - m_dxdz_2d = module->book2D("/iterN/", name_dxdz_2d.str().c_str(), "", m_bins, low, high, nbins, -window, window); - if (m_xy) m_dydz_2d = module->book2D("/iterN/", name_dydz_2d.str().c_str(), "", m_bins, low, high, nbins, -window, window); + m_x_2d = module->book2D("/iterN/", name_x_2d.str(), "", m_bins, low, high, nbins, -window, window); + if (m_xy) m_y_2d = module->book2D("/iterN/", name_y_2d.str(), "", m_bins, low, high, nbins, -window, window); + m_dxdz_2d = module->book2D("/iterN/", name_dxdz_2d.str(), "", m_bins, low, high, nbins, -window, window); + if (m_xy) m_dydz_2d = module->book2D("/iterN/", name_dydz_2d.str(), "", m_bins, low, high, nbins, -window, window); - m_x_1d = NULL; + m_x_1d = nullptr; if (m_1d) { std::stringstream name_x_1d;//, name_y_1d, name_dxdz_1d, name_dydz_1d; name_x_1d << m_name << "_x_1d"; - m_x_1d = module->book1D("/iterN/", name_x_1d.str().c_str(), "", nbins, -window, window); + m_x_1d = module->book1D("/iterN/", name_x_1d.str(), "", nbins, -window, window); } } diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc index 1afc93866a33c..e3ba1342ce235 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc @@ -35,12 +35,12 @@ class AlignmentMonitorMuonVsCurvature: public AlignmentMonitorBase { public: AlignmentMonitorMuonVsCurvature(const edm::ParameterSet& cfg); - virtual ~AlignmentMonitorMuonVsCurvature() {} + ~AlignmentMonitorMuonVsCurvature() override {} void book() override; void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection& iTrajTracks) override; - void processMuonResidualsFromTrack(MuonResidualsFromTrack &mrft, const Trajectory* traj = NULL); + void processMuonResidualsFromTrack(MuonResidualsFromTrack &mrft, const Trajectory* traj = nullptr); private: @@ -135,9 +135,9 @@ void AlignmentMonitorMuonVsCurvature::book() } th2f_wheel_st_sector[wheel+2][station-1][sector-1][component] = - book2D("/iterN/", th2f_name.str().c_str(), "", 30, -xminmax, xminmax, ynbins, -yminmax, yminmax); + book2D("/iterN/", th2f_name.str(), "", 30, -xminmax, xminmax, ynbins, -yminmax, yminmax); tprofile_wheel_st_sector[wheel+2][station-1][sector-1][component] = - bookProfile("/iterN/", tprofile_name.str().c_str(), "", 30, -xminmax, xminmax); + bookProfile("/iterN/", tprofile_name.str(), "", 30, -xminmax, xminmax); } } @@ -176,9 +176,9 @@ void AlignmentMonitorMuonVsCurvature::book() tprofile_name << "tprofile_" << stname[station] << ringname << chname << componentname.str(); th2f_st_ring_chamber[station][ring-1][chamber-1][component] = - book2D("/iterN/", th2f_name.str().c_str(), "", 30, -xminmax, xminmax, 100, -yminmax, yminmax); + book2D("/iterN/", th2f_name.str(), "", 30, -xminmax, xminmax, 100, -yminmax, yminmax); tprofile_st_ring_chamber[station][ring-1][chamber-1][component] = - bookProfile("/iterN/", tprofile_name.str().c_str(), "", 30, -xminmax, xminmax); + bookProfile("/iterN/", tprofile_name.str(), "", 30, -xminmax, xminmax); } } @@ -265,7 +265,7 @@ void AlignmentMonitorMuonVsCurvature::processMuonResidualsFromTrack(MuonResidual DTChamberId dtid(chamberId->rawId()); MuonChamberResidual *dt13 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT13); - if (dt13 != NULL && dt13->numHits() >= m_minDT13Hits) + if (dt13 != nullptr && dt13->numHits() >= m_minDT13Hits) { int wheel = dtid.wheel() + 2; int station = dtid.station() -1; @@ -289,7 +289,7 @@ void AlignmentMonitorMuonVsCurvature::processMuonResidualsFromTrack(MuonResidual CSCDetId cscid(chamberId->rawId()); MuonChamberResidual *csc = mrft.chamberResidual(*chamberId, MuonChamberResidual::kCSC); - if (csc != NULL && csc->numHits() >= m_minCSCHits) + if (csc != nullptr && csc->numHits() >= m_minCSCHits) { int station = 4*cscid.endcap() + cscid.station() - 5; int ring = cscid.ring() - 1; diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc index c1cd50d78e4b0..b37ea1634f537 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc @@ -35,7 +35,7 @@ class AlignmentMonitorSegmentDifferences: public AlignmentMonitorBase { public: AlignmentMonitorSegmentDifferences(const edm::ParameterSet& cfg); - ~AlignmentMonitorSegmentDifferences() {} + ~AlignmentMonitorSegmentDifferences() override {} void book() override; @@ -415,7 +415,7 @@ void AlignmentMonitorSegmentDifferences::processMuonResidualsFromTrack(MuonResid MuonChamberResidual *dt13 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT13); MuonChamberResidual *dt2 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT2); - if (dt13 != NULL && dt13->numHits() >= m_minDT13Hits) + if (dt13 != nullptr && dt13->numHits() >= m_minDT13Hits) { DTChamberId thisid(chamberId->rawId()); for (std::vector::const_iterator otherId = chamberIds.begin(); otherId != chamberIds.end(); ++otherId) @@ -426,7 +426,7 @@ void AlignmentMonitorSegmentDifferences::processMuonResidualsFromTrack(MuonResid if (thisid.rawId() != thatid.rawId() && thisid.wheel() == thatid.wheel() && thisid.sector() == thatid.sector()) { MuonChamberResidual *dt13other = mrft.chamberResidual(*otherId, MuonChamberResidual::kDT13); - if (dt13other != NULL && dt13other->numHits() >= m_minDT13Hits) + if (dt13other != nullptr && dt13other->numHits() >= m_minDT13Hits) { double slopediff = 1000. * (dt13->global_resslope() - dt13other->global_resslope()); //double length = dt13->chamberAlignable()->surface().toGlobal(align::LocalPoint(0,0,0)).perp() - @@ -465,7 +465,7 @@ void AlignmentMonitorSegmentDifferences::processMuonResidualsFromTrack(MuonResid if ( !( (thatid.station()==1 && thatid.ring()==3) || (thatid.station()==2 && thatid.ring()==2) ) ) continue; MuonChamberResidual *cscother = mrft.chamberResidual(*otherId, MuonChamberResidual::kCSC); - if (cscother != NULL && cscother->numHits() >= m_minCSCHits) + if (cscother != nullptr && cscother->numHits() >= m_minCSCHits) { // scale to adjust the csc residual size to be comparabe to dt's one double csc_scale = dt13->chamberAlignable()->surface().toGlobal(align::LocalPoint(dt13->trackx(), dt13->tracky(),0)).perp() / @@ -492,7 +492,7 @@ void AlignmentMonitorSegmentDifferences::processMuonResidualsFromTrack(MuonResid } // end if DT13 // z-direction - if (dt2 != NULL && dt2->numHits() >= m_minDT2Hits && (dt2->chi2() / double(dt2->ndof())) < 2.0) + if (dt2 != nullptr && dt2->numHits() >= m_minDT2Hits && (dt2->chi2() / double(dt2->ndof())) < 2.0) { DTChamberId thisid(chamberId->rawId()); for (std::vector::const_iterator otherId = chamberIds.begin(); otherId != chamberIds.end(); ++otherId) @@ -503,7 +503,7 @@ void AlignmentMonitorSegmentDifferences::processMuonResidualsFromTrack(MuonResid if (thisid.rawId() != thatid.rawId() && thisid.wheel() == thatid.wheel() && thisid.sector() == thatid.sector()) { MuonChamberResidual *dt2other = mrft.chamberResidual(*otherId, MuonChamberResidual::kDT2); - if (dt2other != NULL && dt2other->numHits() >= m_minDT2Hits) + if (dt2other != nullptr && dt2other->numHits() >= m_minDT2Hits) { double slopediff = 1000. * (dt2->global_resslope() - dt2other->global_resslope()); //double length = dt2->chamberAlignable()->surface().toGlobal(align::LocalPoint(0,0,0)).perp() - @@ -550,7 +550,7 @@ void AlignmentMonitorSegmentDifferences::processMuonResidualsFromTrack(MuonResid if (thisid.rawId() != thatid.rawId() && thisid.endcap() == thatid.endcap()) { MuonChamberResidual *cscother = mrft.chamberResidual(*otherId, MuonChamberResidual::kCSC); - if (cscother != NULL && cscother->numHits() >= m_minCSCHits) + if (cscother != nullptr && cscother->numHits() >= m_minCSCHits) { double slopediff = 1000. * (csc->global_resslope() - cscother->global_resslope()); //double length = csc->chamberAlignable()->surface().toGlobal(align::LocalPoint(0,0,0)).z() - diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSurvey.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSurvey.cc index 41b070025bf3b..108606978b772 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSurvey.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSurvey.cc @@ -16,7 +16,7 @@ void AlignmentMonitorSurvey::book() align::StructureType level; // fill 'theLevels' only once (and only if necessary) - if (theLevels.size() == 0 && levelNames_.size() != 0) { + if (theLevels.empty() && !levelNames_.empty()) { auto alignableObjectId = AlignableObjectId::commonObjectIdProvider(pTracker(), pMuon()); for (const auto& levelName: levelNames_) { diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSurvey.h b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSurvey.h index 758fc7179a52a..7c48ebdf1aca2 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSurvey.h +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSurvey.h @@ -25,11 +25,11 @@ class AlignmentMonitorSurvey: AlignmentMonitorSurvey(const edm::ParameterSet&); - virtual void book(); + void book() override; - virtual void event(const edm::Event&, + void event(const edm::Event&, const edm::EventSetup&, - const ConstTrajTrackPairCollection&) {} + const ConstTrajTrackPairCollection&) override {} private: std::vector levelNames_; diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorTemplate.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorTemplate.cc index d676fb869f236..f10eea1ee958c 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorTemplate.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorTemplate.cc @@ -28,7 +28,7 @@ class AlignmentMonitorTemplate: public AlignmentMonitorBase { public: AlignmentMonitorTemplate(const edm::ParameterSet& cfg): AlignmentMonitorBase(cfg, "AlignmentMonitorTemplate") { }; - ~AlignmentMonitorTemplate() {}; + ~AlignmentMonitorTemplate() override {}; void book() override; void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection& iTrajTracks) override; diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc index 7181d3fb39338..85a97e96b92a1 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentStats.cc @@ -39,7 +39,7 @@ AlignmentStats::AlignmentStats(const edm::ParameterSet &iConfig) : //sanity checks //init - outtree_=0; + outtree_=nullptr; }//end constructor @@ -184,7 +184,7 @@ void AlignmentStats::analyze(const edm::Event &iEvent, const edm::EventSetup &iS if (type == typeid(SiStripRecHit1D)) { //Notice the difference respect to when one loops on Trajectories: the recHit is a TrackingRecHit and not a TransientTrackingRecHit const SiStripRecHit1D* striphit=dynamic_cast(hit); - if(striphit!=0){ + if(striphit!=nullptr){ SiStripRecHit1D::ClusterRef stripclust(striphit->cluster()); inval = OverlapMap[stripclust]; } @@ -195,7 +195,7 @@ void AlignmentStats::analyze(const edm::Event &iEvent, const edm::EventSetup &iS }//end if sistriprechit1D if (type == typeid(SiStripRecHit2D)) { const SiStripRecHit2D* striphit=dynamic_cast(hit); - if(striphit!=0){ + if(striphit!=nullptr){ SiStripRecHit2D::ClusterRef stripclust(striphit->cluster()); inval = OverlapMap[stripclust]; //cout<<"Taken the Strip Cluster with ProdId "<geographicalId().rawId()<<")"<(hit); - if(pixelhit!=0){ + if(pixelhit!=nullptr){ SiPixelClusterRefNew pixclust(pixelhit->cluster()); inval = OverlapMap[pixclust]; //cout<<"Taken the Pixel Cluster with ProdId "<geographicalId().rawId()<<")"<("trackerTrackTransformer")); } - else m_trackTransformer = NULL; + else m_trackTransformer = nullptr; produces >(); produces(); @@ -230,7 +230,7 @@ TrackerToMuonPropagator::produce(edm::Event& iEvent, const edm::EventSetup& iSet } // end loop over standAloneMuon hits // if it has any successful extrapolations, make them into a Trajectory - if (muonHits.size() > 0) { + if (!muonHits.empty()) { PTrajectoryStateOnDet const & PTraj = trajectoryStateTransform::persistentState(tracker_tsos, outerDetId.rawId()); TrajectorySeed trajectorySeed(PTraj, muonHits, alongMomentum); Trajectory trajectory(trajectorySeed, alongMomentum); diff --git a/Alignment/CommonAlignmentMonitor/src/AlignmentMonitorBase.cc b/Alignment/CommonAlignmentMonitor/src/AlignmentMonitorBase.cc index ccb7723170048..826c1c666cb5f 100644 --- a/Alignment/CommonAlignmentMonitor/src/AlignmentMonitorBase.cc +++ b/Alignment/CommonAlignmentMonitor/src/AlignmentMonitorBase.cc @@ -20,7 +20,7 @@ AlignmentMonitorBase::AlignmentMonitorBase(const edm::ParameterSet& cfg, std::string name) : m_beamSpotTag(cfg.getUntrackedParameter("beamSpotTag",edm::InputTag("offlineBeamSpot"))) - , m_iteration(0), mp_tracker(0), mp_muon(0), mp_store(0) + , m_iteration(0), mp_tracker(nullptr), mp_muon(nullptr), mp_store(nullptr) { edm::Service tFileService; m_baseDirMap[std::vector()] = new TFileDirectory(tFileService->mkdir(name)); diff --git a/Alignment/CommonAlignmentParametrization/interface/BeamSpotAlignmentParameters.h b/Alignment/CommonAlignmentParametrization/interface/BeamSpotAlignmentParameters.h index 8c6f29aced5cb..d19b8327457ef 100644 --- a/Alignment/CommonAlignmentParametrization/interface/BeamSpotAlignmentParameters.h +++ b/Alignment/CommonAlignmentParametrization/interface/BeamSpotAlignmentParameters.h @@ -46,25 +46,25 @@ class BeamSpotAlignmentParameters : public AlignmentParameters const std::vector& selection ); /// Destructor - virtual ~BeamSpotAlignmentParameters(); - virtual void apply(); - virtual int type() const; + ~BeamSpotAlignmentParameters() override; + void apply() override; + int type() const override; /// Clone all parameters (for update of parameters) - virtual BeamSpotAlignmentParameters* clone( const AlgebraicVector& parameters, - const AlgebraicSymMatrix& covMatrix ) const; + BeamSpotAlignmentParameters* clone( const AlgebraicVector& parameters, + const AlgebraicSymMatrix& covMatrix ) const override; /// Clone selected parameters (for update of parameters) - virtual BeamSpotAlignmentParameters* - cloneFromSelected(const AlgebraicVector& parameters, const AlgebraicSymMatrix& covMatrix) const; + BeamSpotAlignmentParameters* + cloneFromSelected(const AlgebraicVector& parameters, const AlgebraicSymMatrix& covMatrix) const override; /// Get all derivatives - virtual AlgebraicMatrix derivatives( const TrajectoryStateOnSurface& tsos, - const AlignableDetOrUnitPtr & ) const; + AlgebraicMatrix derivatives( const TrajectoryStateOnSurface& tsos, + const AlignableDetOrUnitPtr & ) const override; /// Get selected derivatives - virtual AlgebraicMatrix selectedDerivatives( const TrajectoryStateOnSurface& tsos, - const AlignableDetOrUnitPtr & ) const; + AlgebraicMatrix selectedDerivatives( const TrajectoryStateOnSurface& tsos, + const AlignableDetOrUnitPtr & ) const override; /// Get translation parameters AlgebraicVector translation(void) const; diff --git a/Alignment/CommonAlignmentParametrization/interface/BowedSurfaceAlignmentParameters.h b/Alignment/CommonAlignmentParametrization/interface/BowedSurfaceAlignmentParameters.h index e1290876b6cfa..5a215828c68e4 100644 --- a/Alignment/CommonAlignmentParametrization/interface/BowedSurfaceAlignmentParameters.h +++ b/Alignment/CommonAlignmentParametrization/interface/BowedSurfaceAlignmentParameters.h @@ -56,22 +56,22 @@ class BowedSurfaceAlignmentParameters : public AlignmentParameters const std::vector &selection); /// Destructor - virtual ~BowedSurfaceAlignmentParameters() {}; - virtual void apply(); - virtual int type() const; + ~BowedSurfaceAlignmentParameters() override {}; + void apply() override; + int type() const override; /// Clone all parameters (for update of parameters) - virtual BowedSurfaceAlignmentParameters* clone(const AlgebraicVector ¶meters, - const AlgebraicSymMatrix &covMatrix) const; + BowedSurfaceAlignmentParameters* clone(const AlgebraicVector ¶meters, + const AlgebraicSymMatrix &covMatrix) const override; /// Clone selected parameters (for update of parameters) - virtual BowedSurfaceAlignmentParameters* + BowedSurfaceAlignmentParameters* cloneFromSelected(const AlgebraicVector ¶meters, - const AlgebraicSymMatrix &covMatrix) const; + const AlgebraicSymMatrix &covMatrix) const override; /// Get all derivatives - virtual AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, - const AlignableDetOrUnitPtr &aliDet) const; + AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, + const AlignableDetOrUnitPtr &aliDet) const override; /// Get translation parameters in double precision align::LocalVector translation() const; diff --git a/Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters.h b/Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters.h index a49728f80e6b9..86bdf790896f0 100644 --- a/Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters.h +++ b/Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters.h @@ -46,25 +46,25 @@ class RigidBodyAlignmentParameters : public AlignmentParameters const std::vector& selection ); /// Destructor - virtual ~RigidBodyAlignmentParameters() {}; - virtual void apply(); - virtual int type() const; + ~RigidBodyAlignmentParameters() override {}; + void apply() override; + int type() const override; /// Clone all parameters (for update of parameters) - virtual RigidBodyAlignmentParameters* clone( const AlgebraicVector& parameters, - const AlgebraicSymMatrix& covMatrix ) const; + RigidBodyAlignmentParameters* clone( const AlgebraicVector& parameters, + const AlgebraicSymMatrix& covMatrix ) const override; /// Clone selected parameters (for update of parameters) - virtual RigidBodyAlignmentParameters* - cloneFromSelected(const AlgebraicVector& parameters, const AlgebraicSymMatrix& covMatrix) const; + RigidBodyAlignmentParameters* + cloneFromSelected(const AlgebraicVector& parameters, const AlgebraicSymMatrix& covMatrix) const override; /// Get all derivatives - virtual AlgebraicMatrix derivatives( const TrajectoryStateOnSurface& tsos, - const AlignableDetOrUnitPtr & ) const; + AlgebraicMatrix derivatives( const TrajectoryStateOnSurface& tsos, + const AlignableDetOrUnitPtr & ) const override; /// Get selected derivatives - virtual AlgebraicMatrix selectedDerivatives( const TrajectoryStateOnSurface& tsos, - const AlignableDetOrUnitPtr & ) const; + AlgebraicMatrix selectedDerivatives( const TrajectoryStateOnSurface& tsos, + const AlignableDetOrUnitPtr & ) const override; /// Get translation parameters AlgebraicVector translation(void) const; diff --git a/Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters4D.h b/Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters4D.h index fb163fcf6f2b2..fd492faf76458 100644 --- a/Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters4D.h +++ b/Alignment/CommonAlignmentParametrization/interface/RigidBodyAlignmentParameters4D.h @@ -43,21 +43,21 @@ class RigidBodyAlignmentParameters4D : public RigidBodyAlignmentParameters RigidBodyAlignmentParameters(alignable, parameters, covMatrix, selection){}; /// Destructor - ~RigidBodyAlignmentParameters4D() {}; + ~RigidBodyAlignmentParameters4D() override {}; - int type() const; + int type() const override; /// Get all derivatives AlgebraicMatrix derivatives( const TrajectoryStateOnSurface& tsos, - const AlignableDetOrUnitPtr & ) const; + const AlignableDetOrUnitPtr & ) const override; /// Clone all parameters (for update of parameters) RigidBodyAlignmentParameters4D* clone( const AlgebraicVector& parameters, - const AlgebraicSymMatrix& covMatrix ) const; + const AlgebraicSymMatrix& covMatrix ) const override; /// Clone selected parameters (for update of parameters) RigidBodyAlignmentParameters4D* - cloneFromSelected(const AlgebraicVector& parameters, const AlgebraicSymMatrix& covMatrix) const; + cloneFromSelected(const AlgebraicVector& parameters, const AlgebraicSymMatrix& covMatrix) const override; }; diff --git a/Alignment/CommonAlignmentParametrization/interface/TwoBowedSurfacesAlignmentParameters.h b/Alignment/CommonAlignmentParametrization/interface/TwoBowedSurfacesAlignmentParameters.h index 64161ac6164fc..a4ef7eeff0ca0 100644 --- a/Alignment/CommonAlignmentParametrization/interface/TwoBowedSurfacesAlignmentParameters.h +++ b/Alignment/CommonAlignmentParametrization/interface/TwoBowedSurfacesAlignmentParameters.h @@ -81,22 +81,22 @@ class TwoBowedSurfacesAlignmentParameters : public AlignmentParameters const std::vector &selection); /// Destructor - virtual ~TwoBowedSurfacesAlignmentParameters() {}; - virtual void apply(); - virtual int type() const; + ~TwoBowedSurfacesAlignmentParameters() override {}; + void apply() override; + int type() const override; /// Clone all parameters (for update of parameters) - virtual TwoBowedSurfacesAlignmentParameters* clone(const AlgebraicVector ¶meters, - const AlgebraicSymMatrix &covMatrix) const; + TwoBowedSurfacesAlignmentParameters* clone(const AlgebraicVector ¶meters, + const AlgebraicSymMatrix &covMatrix) const override; /// Clone selected parameters (for update of parameters) - virtual TwoBowedSurfacesAlignmentParameters* + TwoBowedSurfacesAlignmentParameters* cloneFromSelected(const AlgebraicVector ¶meters, - const AlgebraicSymMatrix &covMatrix) const; + const AlgebraicSymMatrix &covMatrix) const override; /// Get all derivatives - virtual AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, - const AlignableDetOrUnitPtr &aliDet) const; + AlgebraicMatrix derivatives(const TrajectoryStateOnSurface &tsos, + const AlignableDetOrUnitPtr &aliDet) const override; /// print parameters to screen virtual void print() const; diff --git a/Alignment/CommonAlignmentParametrization/src/AlignmentParametersFactory.cc b/Alignment/CommonAlignmentParametrization/src/AlignmentParametersFactory.cc index 356c39aba9b26..2cdaad6ac0cd5 100644 --- a/Alignment/CommonAlignmentParametrization/src/AlignmentParametersFactory.cc +++ b/Alignment/CommonAlignmentParametrization/src/AlignmentParametersFactory.cc @@ -121,6 +121,6 @@ namespace AlignmentParametersFactory { break; } - return 0; // unreached (all ParametersType appear in switch), to please the compiler + return nullptr; // unreached (all ParametersType appear in switch), to please the compiler } } diff --git a/Alignment/CommonAlignmentParametrization/src/BeamSpotAlignmentParameters.cc b/Alignment/CommonAlignmentParametrization/src/BeamSpotAlignmentParameters.cc index c274a7840b7f7..df00c84a1d0a4 100644 --- a/Alignment/CommonAlignmentParametrization/src/BeamSpotAlignmentParameters.cc +++ b/Alignment/CommonAlignmentParametrization/src/BeamSpotAlignmentParameters.cc @@ -19,7 +19,7 @@ //__________________________________________________________________________________________________ BeamSpotAlignmentParameters::BeamSpotAlignmentParameters(Alignable* ali, bool calcMis) : - AlignmentParameters(ali, displacementFromAlignable(calcMis ? ali : 0), + AlignmentParameters(ali, displacementFromAlignable(calcMis ? ali : nullptr), AlgebraicSymMatrix(N_PARAM, 0)) { diff --git a/Alignment/CommonAlignmentParametrization/src/BowedSurfaceAlignmentDerivatives.cc b/Alignment/CommonAlignmentParametrization/src/BowedSurfaceAlignmentDerivatives.cc index 12ac0823f253c..afc2d75fc5e9e 100644 --- a/Alignment/CommonAlignmentParametrization/src/BowedSurfaceAlignmentDerivatives.cc +++ b/Alignment/CommonAlignmentParametrization/src/BowedSurfaceAlignmentDerivatives.cc @@ -8,7 +8,7 @@ #include "Alignment/CommonAlignmentParametrization/interface/KarimakiAlignmentDerivatives.h" #include "Alignment/CommonAlignmentParametrization/interface/BowedSurfaceAlignmentDerivatives.h" -#include +#include AlgebraicMatrix BowedSurfaceAlignmentDerivatives::operator()(const TrajectoryStateOnSurface &tsos, diff --git a/Alignment/CommonAlignmentParametrization/src/CompositeAlignmentParameters.cc b/Alignment/CommonAlignmentParametrization/src/CompositeAlignmentParameters.cc index 35683f73161a4..b643e5cd1b554 100644 --- a/Alignment/CommonAlignmentParametrization/src/CompositeAlignmentParameters.cc +++ b/Alignment/CommonAlignmentParametrization/src/CompositeAlignmentParameters.cc @@ -264,7 +264,7 @@ CompositeAlignmentParameters::alignableFromAlignableDet(const AlignableDetOrUnit AlignableDetToAlignableMap::const_iterator iali = theAlignableDetToAlignableMap.find(adet); if ( iali!=theAlignableDetToAlignableMap.end() ) return (*iali).second; - else return 0; + else return nullptr; } diff --git a/Alignment/CommonAlignmentParametrization/src/RigidBodyAlignmentParameters.cc b/Alignment/CommonAlignmentParametrization/src/RigidBodyAlignmentParameters.cc index 507cf3928d423..fffe5ef0f6255 100644 --- a/Alignment/CommonAlignmentParametrization/src/RigidBodyAlignmentParameters.cc +++ b/Alignment/CommonAlignmentParametrization/src/RigidBodyAlignmentParameters.cc @@ -19,7 +19,7 @@ //__________________________________________________________________________________________________ RigidBodyAlignmentParameters::RigidBodyAlignmentParameters(Alignable* ali, bool calcMis) : - AlignmentParameters(ali, displacementFromAlignable(calcMis ? ali : 0), + AlignmentParameters(ali, displacementFromAlignable(calcMis ? ali : nullptr), AlgebraicSymMatrix(N_PARAM, 0)) { } diff --git a/Alignment/CommonAlignmentParametrization/src/TwoBowedSurfacesAlignmentParameters.cc b/Alignment/CommonAlignmentParametrization/src/TwoBowedSurfacesAlignmentParameters.cc index 4296642d035ca..c3ab90d1429ce 100644 --- a/Alignment/CommonAlignmentParametrization/src/TwoBowedSurfacesAlignmentParameters.cc +++ b/Alignment/CommonAlignmentParametrization/src/TwoBowedSurfacesAlignmentParameters.cc @@ -21,7 +21,7 @@ // This class's header #include "Alignment/CommonAlignmentParametrization/interface/TwoBowedSurfacesAlignmentParameters.h" -#include +#include #include //_________________________________________________________________________________________________ TwoBowedSurfacesAlignmentParameters::TwoBowedSurfacesAlignmentParameters(Alignable *ali) : diff --git a/Alignment/CommonAlignmentProducer/interface/AlignmentTwoBodyDecayTrackSelector.h b/Alignment/CommonAlignmentProducer/interface/AlignmentTwoBodyDecayTrackSelector.h index 12fca1a30e79c..faa5a17cf47e5 100644 --- a/Alignment/CommonAlignmentProducer/interface/AlignmentTwoBodyDecayTrackSelector.h +++ b/Alignment/CommonAlignmentProducer/interface/AlignmentTwoBodyDecayTrackSelector.h @@ -34,7 +34,7 @@ class AlignmentTwoBodyDecayTrackSelector ///checks if the mass of the mother is in the mass region adding missing E_T Tracks checkMETMass(const Tracks& cands,const edm::Event& iEvent)const; ///checks if the mother has charge = [theCharge] - bool checkCharge(const reco::Track* trk1,const reco::Track* trk2 = 0)const; + bool checkCharge(const reco::Track* trk1,const reco::Track* trk2 = nullptr)const; ///checks if the [cands] are acoplanar (returns empty set if not) bool checkAcoplanarity(const reco::Track* trk1,const reco::Track* trk2)const; ///checks if [cands] contains a acoplanar track w.r.t missing ET (returns empty set if not) diff --git a/Alignment/CommonAlignmentProducer/plugins/AlignmentMuonHIPTrajectorySelector.cc b/Alignment/CommonAlignmentProducer/plugins/AlignmentMuonHIPTrajectorySelector.cc index 19d015dff8c6e..43b783e8e2383 100644 --- a/Alignment/CommonAlignmentProducer/plugins/AlignmentMuonHIPTrajectorySelector.cc +++ b/Alignment/CommonAlignmentProducer/plugins/AlignmentMuonHIPTrajectorySelector.cc @@ -55,10 +55,10 @@ class AlignmentMuonHIPTrajectorySelector : public edm::EDProducer { public: explicit AlignmentMuonHIPTrajectorySelector(const edm::ParameterSet&); - ~AlignmentMuonHIPTrajectorySelector(); + ~AlignmentMuonHIPTrajectorySelector() override; private: - virtual void produce(edm::Event&, const edm::EventSetup&) override; + void produce(edm::Event&, const edm::EventSetup&) override; // ---------- member data -------------------------------- edm::InputTag m_input; @@ -91,7 +91,7 @@ AlignmentMuonHIPTrajectorySelector::AlignmentMuonHIPTrajectorySelector(const edm , m_minTrackerDOF(iConfig.getParameter("minTrackerDOF")) , m_maxMuonResidual(iConfig.getParameter("maxMuonResidual")) , m_hists(iConfig.getParameter("hists")) - , m_pt(NULL), m_tracker_forwardredchi2(NULL), m_tracker_dof(NULL) + , m_pt(nullptr), m_tracker_forwardredchi2(nullptr), m_tracker_dof(nullptr) { produces(); diff --git a/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.h b/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.h index ebf7aa4e712c3..95e27b8b6bc13 100644 --- a/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.h +++ b/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.h @@ -23,7 +23,7 @@ class AlignmentProducer : public AlignmentProducerBase, public edm::ESProducerLo AlignmentProducer(const edm::ParameterSet&); /// Destructor - ~AlignmentProducer() = default; + ~AlignmentProducer() override = default; /// Produce the tracker geometry virtual std::shared_ptr produceTracker(const TrackerDigiGeometryRecord&); @@ -35,43 +35,43 @@ class AlignmentProducer : public AlignmentProducerBase, public edm::ESProducerLo virtual std::shared_ptr produceCSC(const MuonGeometryRecord&); /// Called at beginning of job - virtual void beginOfJob(const edm::EventSetup&) override; + void beginOfJob(const edm::EventSetup&) override; /// Called at end of job - virtual void endOfJob() override; + void endOfJob() override; /// Called at beginning of loop - virtual void startingNewLoop(unsigned int iLoop) override; + void startingNewLoop(unsigned int iLoop) override; /// Called at end of loop - virtual Status endOfLoop(const edm::EventSetup&, unsigned int iLoop) override; + Status endOfLoop(const edm::EventSetup&, unsigned int iLoop) override; /// Called at run start and calling algorithms beginRun - virtual void beginRun(const edm::Run&, const edm::EventSetup&) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; /// Called at run end - currently reading TkFittedLasBeam if an InpuTag is given for that - virtual void endRun(const edm::Run&, const edm::EventSetup&) override; + void endRun(const edm::Run&, const edm::EventSetup&) override; /// Called at lumi block start, calling algorithm's beginLuminosityBlock - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, + void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override; /// Called at lumi block end, calling algorithm's endLuminosityBlock - virtual void endLuminosityBlock(const edm::LuminosityBlock&, + void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override; /// Called at each event - virtual Status duringLoop(const edm::Event&, const edm::EventSetup&) override; + Status duringLoop(const edm::Event&, const edm::EventSetup&) override; private: - virtual bool getTrajTrackAssociationCollection(const edm::Event&, + bool getTrajTrackAssociationCollection(const edm::Event&, edm::Handle&) override; - virtual bool getBeamSpot(const edm::Event&, edm::Handle&) override; - virtual bool getTkFittedLasBeamCollection(const edm::Run&, + bool getBeamSpot(const edm::Event&, edm::Handle&) override; + bool getTkFittedLasBeamCollection(const edm::Run&, edm::Handle&) override; - virtual bool getTsosVectorCollection(const edm::Run&, + bool getTsosVectorCollection(const edm::Run&, edm::Handle&) override; - virtual bool getAliClusterValueMap(const edm::Event&, + bool getAliClusterValueMap(const edm::Event&, edm::Handle&) override; const unsigned int maxLoops_; /// Number of loops to loop diff --git a/Alignment/CommonAlignmentProducer/plugins/AlignmentProducerAsAnalyzer.h b/Alignment/CommonAlignmentProducer/plugins/AlignmentProducerAsAnalyzer.h index 19aa0e9bc9840..1e1b44b653ff3 100644 --- a/Alignment/CommonAlignmentProducer/plugins/AlignmentProducerAsAnalyzer.h +++ b/Alignment/CommonAlignmentProducer/plugins/AlignmentProducerAsAnalyzer.h @@ -38,33 +38,33 @@ class AlignmentProducerAsAnalyzer : AlignmentProducerAsAnalyzer(const edm::ParameterSet&); /// Destructor - virtual ~AlignmentProducerAsAnalyzer() = default; + ~AlignmentProducerAsAnalyzer() override = default; /*** Code which implements the interface Called from outside ***/ - virtual void beginJob() override; - virtual void endJob() override; + void beginJob() override; + void endJob() override; - virtual void beginRun(const edm::Run&, const edm::EventSetup&) override; - virtual void endRun(const edm::Run&, const edm::EventSetup&) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; + void endRun(const edm::Run&, const edm::EventSetup&) override; - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, + void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override; - virtual void endLuminosityBlock(const edm::LuminosityBlock&, + void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: - virtual bool getTrajTrackAssociationCollection(const edm::Event&, + bool getTrajTrackAssociationCollection(const edm::Event&, edm::Handle&) override; - virtual bool getBeamSpot(const edm::Event&, edm::Handle&) override; - virtual bool getTkFittedLasBeamCollection(const edm::Run&, + bool getBeamSpot(const edm::Event&, edm::Handle&) override; + bool getTkFittedLasBeamCollection(const edm::Run&, edm::Handle&) override; - virtual bool getTsosVectorCollection(const edm::Run&, + bool getTsosVectorCollection(const edm::Run&, edm::Handle&) override; - virtual bool getAliClusterValueMap(const edm::Event&, + bool getAliClusterValueMap(const edm::Event&, edm::Handle&) override; edm::EDGetTokenT tjTkAssociationMapToken_; diff --git a/Alignment/CommonAlignmentProducer/plugins/FakeAlignmentProducer.cc b/Alignment/CommonAlignmentProducer/plugins/FakeAlignmentProducer.cc index 3edf509bd17be..9240daca69348 100644 --- a/Alignment/CommonAlignmentProducer/plugins/FakeAlignmentProducer.cc +++ b/Alignment/CommonAlignmentProducer/plugins/FakeAlignmentProducer.cc @@ -44,7 +44,7 @@ reconstruction Geometry should notice that and not pass to GeometryAligner. class FakeAlignmentProducer : public edm::ESProducer { public: FakeAlignmentProducer(const edm::ParameterSet&); - ~FakeAlignmentProducer() {} + ~FakeAlignmentProducer() override {} std::unique_ptr produceTkAli(const TrackerAlignmentRcd&) { return std::make_unique();} diff --git a/Alignment/CommonAlignmentProducer/plugins/FakeAlignmentSource.cc b/Alignment/CommonAlignmentProducer/plugins/FakeAlignmentSource.cc index 950d1f948172a..3b89e581e126e 100644 --- a/Alignment/CommonAlignmentProducer/plugins/FakeAlignmentSource.cc +++ b/Alignment/CommonAlignmentProducer/plugins/FakeAlignmentSource.cc @@ -47,7 +47,7 @@ reconstruction Geometry should notice that and not pass to GeometryAligner. class FakeAlignmentSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder { public: FakeAlignmentSource(const edm::ParameterSet&); - ~FakeAlignmentSource() {} + ~FakeAlignmentSource() override {} /// Tracker and its APE std::unique_ptr produceTkAli(const TrackerAlignmentRcd&) { @@ -86,7 +86,7 @@ class FakeAlignmentSource : public edm::ESProducer, public edm::EventSetupRecord protected: /// provide (dummy) IOV - virtual void setIntervalFor( const edm::eventsetup::EventSetupRecordKey& /*dummy*/, + void setIntervalFor( const edm::eventsetup::EventSetupRecordKey& /*dummy*/, const edm::IOVSyncValue& ioSyncVal, edm::ValidityInterval& iov) override; private: diff --git a/Alignment/CommonAlignmentProducer/plugins/LSNumberFilter.cc b/Alignment/CommonAlignmentProducer/plugins/LSNumberFilter.cc index 1c95da1e920c3..3663152367c4f 100644 --- a/Alignment/CommonAlignmentProducer/plugins/LSNumberFilter.cc +++ b/Alignment/CommonAlignmentProducer/plugins/LSNumberFilter.cc @@ -21,13 +21,13 @@ class LSNumberFilter : public edm::EDFilter { public: explicit LSNumberFilter(const edm::ParameterSet&); - ~LSNumberFilter(); + ~LSNumberFilter() 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 ; unsigned int minLS; }; diff --git a/Alignment/CommonAlignmentProducer/src/AlignmentGlobalTrackSelector.cc b/Alignment/CommonAlignmentProducer/src/AlignmentGlobalTrackSelector.cc index 5041aee2c54e4..940a496625394 100644 --- a/Alignment/CommonAlignmentProducer/src/AlignmentGlobalTrackSelector.cc +++ b/Alignment/CommonAlignmentProducer/src/AlignmentGlobalTrackSelector.cc @@ -17,7 +17,7 @@ #include //STL -#include +#include #include "Alignment/CommonAlignmentProducer/interface/AlignmentGlobalTrackSelector.h" diff --git a/Alignment/CommonAlignmentProducer/src/AlignmentProducerBase.cc b/Alignment/CommonAlignmentProducer/src/AlignmentProducerBase.cc index 7ab5cff48d321..90723a4e0cd21 100644 --- a/Alignment/CommonAlignmentProducer/src/AlignmentProducerBase.cc +++ b/Alignment/CommonAlignmentProducer/src/AlignmentProducerBase.cc @@ -211,7 +211,7 @@ AlignmentProducerBase::processEvent(const edm::Event& event, // Run the alignment algorithm with its input const AliClusterValueMap* clusterValueMapPtr{nullptr}; - if (clusterValueMapTag_.encode().size()) { + if (!clusterValueMapTag_.encode().empty()) { edm::Handle clusterValueMap; getAliClusterValueMap(event, clusterValueMap); clusterValueMapPtr = &(*clusterValueMap); @@ -271,7 +271,7 @@ AlignmentProducerBase::beginRunImpl(const edm::Run& run, const edm::EventSetup& void AlignmentProducerBase::endRunImpl(const edm::Run& run, const edm::EventSetup& setup) { - if (tkLasBeamTag_.encode().size()) { + if (!tkLasBeamTag_.encode().empty()) { edm::Handle lasBeams; edm::Handle tsoses; getTkFittedLasBeamCollection(run, lasBeams); @@ -282,7 +282,7 @@ AlignmentProducerBase::endRunImpl(const edm::Run& run, const edm::EventSetup& se edm::LogInfo("Alignment") << "@SUB=AlignmentProducerBase::endRunImpl" << "No Tk LAS beams to forward to algorithm."; - alignmentAlgo_->endRun(EndRunInfo(run.id(), 0, 0), setup); + alignmentAlgo_->endRun(EndRunInfo(run.id(), nullptr, nullptr), setup); } } @@ -710,7 +710,7 @@ AlignmentProducerBase::simpleMisalignment(const align::Alignables &alivec, std::vector commSel(0); if (selection != "-1") { - AlignmentParameterSelector aSelector(0,0); // no alignable needed here... + AlignmentParameterSelector aSelector(nullptr,nullptr); // no alignable needed here... const std::vector cSel(aSelector.convertParamSel(selection)); if (cSel.size() < RigidBodyAlignmentParameters::N_PARAM) { throw cms::Exception("BadConfig") diff --git a/Alignment/CommonAlignmentProducer/src/AlignmentTrackSelector.cc b/Alignment/CommonAlignmentProducer/src/AlignmentTrackSelector.cc index cacde21467489..98e990773bee9 100644 --- a/Alignment/CommonAlignmentProducer/src/AlignmentTrackSelector.cc +++ b/Alignment/CommonAlignmentProducer/src/AlignmentTrackSelector.cc @@ -86,7 +86,7 @@ AlignmentTrackSelector::AlignmentTrackSelector(const edm::ParameterSet & cfg, ed RorZofLastHitMax_( cfg.getParameter >( "RorZofLastHitMax" ) ), clusterValueMapTag_(cfg.getParameter("hitPrescaleMapTag")), minPrescaledHits_( cfg.getParameter("minPrescaledHits")), - applyPrescaledHitsFilter_(clusterValueMapTag_.encode().size() && minPrescaledHits_ > 0) + applyPrescaledHitsFilter_(!clusterValueMapTag_.encode().empty() && minPrescaledHits_ > 0) { if(applyIsolation_) { rphirecHitsToken_ = iC.consumes(cfg.getParameter("rphirecHits")); @@ -100,7 +100,7 @@ AlignmentTrackSelector::AlignmentTrackSelector(const edm::ParameterSet & cfg, ed //convert track quality from string to enum std::vector trkQualityStrings(cfg.getParameter >("trackQualities")); std::string qualities; - if(trkQualityStrings.size()>0){ + if(!trkQualityStrings.empty()){ applyTrkQualityCheck_=true; for (unsigned int i = 0; i < trkQualityStrings.size(); ++i) { (qualities += trkQualityStrings[i]) += ", "; @@ -110,7 +110,7 @@ AlignmentTrackSelector::AlignmentTrackSelector(const edm::ParameterSet & cfg, ed else applyTrkQualityCheck_=false; std::vector trkIterStrings(cfg.getParameter >("iterativeTrackingSteps")); - if(trkIterStrings.size()>0){ + if(!trkIterStrings.empty()){ applyIterStepCheck_=true; std::string tracksteps; for (unsigned int i = 0; i < trkIterStrings.size(); ++i) { @@ -162,7 +162,7 @@ AlignmentTrackSelector::AlignmentTrackSelector(const edm::ParameterSet & cfg, ed << "Max value of |nHitsinENDCAPplus - nHitsinENDCAPminus| = " << maxHitDiffEndcaps_; - if (trkQualityStrings.size()) { + if (!trkQualityStrings.empty()) { edm::LogInfo("AlignmentTrackSelector") << "Select tracks with these qualities: " << qualities; } @@ -347,7 +347,7 @@ bool AlignmentTrackSelector::detailedHitsCheck(const reco::Track *trackp, const || minHitsinTECplus_ || minHitsinTECminus_ || minHitsinFPIX_ || minHitsinBPIX_ || minHitsinPIX_ ||nHitMin2D_ || chargeCheck_ || applyIsolation_ || (seedOnlyFromAbove_ == 1 || seedOnlyFromAbove_ == 2) - || RorZofFirstHitMin_.size() > 0 || RorZofFirstHitMax_.size() > 0 || RorZofLastHitMin_.size() > 0 || RorZofLastHitMax_.size() > 0 ) { + || !RorZofFirstHitMin_.empty() || !RorZofFirstHitMax_.empty() || !RorZofLastHitMin_.empty() || !RorZofLastHitMax_.empty() ) { // any detailed hit cut is active, so have to check int nhitinTIB = 0, nhitinTOB = 0, nhitinTID = 0; @@ -436,7 +436,7 @@ bool AlignmentTrackSelector::detailedHitsCheck(const reco::Track *trackp, const if( RorZofFirstHitMin_.at(0) != 0.0 || RorZofFirstHitMin_.at(1) != 0.0 || RorZofFirstHitMax_.at(0) != 999.0 || RorZofFirstHitMax_.at(1) != 999.0 ) { - const reco::TrackBase::Point firstPoint(trackp->innerPosition()); + const reco::TrackBase::Point& firstPoint(trackp->innerPosition()); if( (std::fabs(firstPoint.R()) < RorZofFirstHitMin_.at(0) )) passedFirstHitPositionR = false; if( (std::fabs(firstPoint.R()) > RorZofFirstHitMax_.at(0) )) passedFirstHitPositionR = false; @@ -447,7 +447,7 @@ bool AlignmentTrackSelector::detailedHitsCheck(const reco::Track *trackp, const if( RorZofLastHitMin_.at(0) != 0.0 || RorZofLastHitMin_.at(1) != 0.0 || RorZofLastHitMax_.at(0) != 999.0 || RorZofLastHitMax_.at(1) != 999.0 ) { - const reco::TrackBase::Point lastPoint(trackp->outerPosition()); + const reco::TrackBase::Point& lastPoint(trackp->outerPosition()); if( (std::fabs(lastPoint.R()) < RorZofLastHitMin_.at(0) )) passedLastHitPositionR = false; if( (std::fabs(lastPoint.R()) > RorZofLastHitMax_.at(0) )) passedLastHitPositionR = false; @@ -712,14 +712,14 @@ AlignmentTrackSelector::checkPrescaledHits(const Tracks& tracks, const edm::Even if (type == typeid(SiStripRecHit2D)) { const SiStripRecHit2D* striphit=dynamic_cast(hit); - if(striphit!=0){ + if(striphit!=nullptr){ SiStripRecHit2D::ClusterRef stripclust(striphit->cluster()); flag = flagMap[stripclust]; } } else if(type == typeid(SiStripRecHit1D)){ const SiStripRecHit1D* striphit = dynamic_cast(hit); - if(striphit!=0){ + if(striphit!=nullptr){ SiStripRecHit1D::ClusterRef stripclust(striphit->cluster()); flag = flagMap[stripclust]; } @@ -735,7 +735,7 @@ AlignmentTrackSelector::checkPrescaledHits(const Tracks& tracks, const edm::Even }//end if hit in Strips else{ // test explicitely BPIX/FPIX const SiPixelRecHit* pixelhit= dynamic_cast(hit); - if(pixelhit!=0){ + if(pixelhit!=nullptr){ SiPixelRecHit::ClusterRef pixclust(pixelhit->cluster()); flag = flagMap[pixclust]; } diff --git a/Alignment/CommonAlignmentProducer/src/AlignmentTwoBoyDecayTrackSelector.cc b/Alignment/CommonAlignmentProducer/src/AlignmentTwoBoyDecayTrackSelector.cc index 08229da40e03c..a5b19acb5181a 100644 --- a/Alignment/CommonAlignmentProducer/src/AlignmentTwoBoyDecayTrackSelector.cc +++ b/Alignment/CommonAlignmentProducer/src/AlignmentTwoBoyDecayTrackSelector.cc @@ -11,7 +11,7 @@ #include //STL -#include +#include //ROOT #include "TLorentzVector.h" @@ -156,7 +156,7 @@ AlignmentTwoBodyDecayTrackSelector::checkMass(const Tracks& cands) const } } - if (candCollection.size()==0) return result; + if (candCollection.empty()) return result; sort(candCollection.begin(), candCollection.end(), higherTwoBodyDecayPt()); @@ -192,7 +192,7 @@ AlignmentTwoBodyDecayTrackSelector::checkMETMass(const Tracks& cands,const edm:: LogDebug("Alignment") <<"> cands size : "<< cands.size(); - if (cands.size()==0) return result; + if (cands.empty()) return result; TLorentzVector track; TLorentzVector met4; @@ -245,7 +245,7 @@ AlignmentTwoBodyDecayTrackSelector::checkMETMass(const Tracks& cands,const edm:: } } - if (candCollection.size()==0) return result; + if (candCollection.empty()) return result; sort(candCollection.begin(), candCollection.end(), higherTwoBodyDecayPt()); diff --git a/Alignment/Geners/src/AbsArchive.cc b/Alignment/Geners/src/AbsArchive.cc index 9bee51532bc4d..3ce2fea8db9ca 100644 --- a/Alignment/Geners/src/AbsArchive.cc +++ b/Alignment/Geners/src/AbsArchive.cc @@ -45,8 +45,8 @@ namespace { const char* name, const char* category) : gs::AbsRecord(classId, ioPrototype, name, category) {} private: - NotWritableRecord(); - inline bool writeData(std::ostream&) const {return false;} + NotWritableRecord() = delete; + inline bool writeData(std::ostream&) const override {return false;} }; } diff --git a/Alignment/Geners/src/AbsReference.cc b/Alignment/Geners/src/AbsReference.cc index f74bf67fd309e..0b2f091ea9f71 100644 --- a/Alignment/Geners/src/AbsReference.cc +++ b/Alignment/Geners/src/AbsReference.cc @@ -17,7 +17,7 @@ namespace gs { std::istream& AbsReference::positionInputStream( const unsigned long long id) const { - return archive_.inputStream(id, 0); + return archive_.inputStream(id, nullptr); } void AbsReference::initialize() const @@ -147,8 +147,8 @@ namespace gs { classId_(classId), ioProto_(ioPrototype ? ioPrototype : ""), searchId_(itemId), - namePattern_(0), - categoryPattern_(0), + namePattern_(nullptr), + categoryPattern_(nullptr), itemId_(0), initialized_(false) { diff --git a/Alignment/Geners/src/BZ2Handle.cc b/Alignment/Geners/src/BZ2Handle.cc index f82eeac7b3f7d..ed8771a3bce70 100644 --- a/Alignment/Geners/src/BZ2Handle.cc +++ b/Alignment/Geners/src/BZ2Handle.cc @@ -6,11 +6,11 @@ namespace gs { BZ2InflateHandle::BZ2InflateHandle(bz_stream& strm) : strm_(&strm) { - strm_->bzalloc = 0; - strm_->bzfree = 0; - strm_->opaque = 0; + strm_->bzalloc = nullptr; + strm_->bzfree = nullptr; + strm_->opaque = nullptr; strm_->avail_in = 0; - strm_->next_in = 0; + strm_->next_in = nullptr; assert(BZ2_bzDecompressInit(strm_, 0, 0) == BZ_OK); } @@ -22,11 +22,11 @@ namespace gs { BZ2DeflateHandle::BZ2DeflateHandle(bz_stream& strm) : strm_(&strm) { - strm_->bzalloc = 0; - strm_->bzfree = 0; - strm_->opaque = 0; + strm_->bzalloc = nullptr; + strm_->bzfree = nullptr; + strm_->opaque = nullptr; strm_->avail_in = 0; - strm_->next_in = 0; + strm_->next_in = nullptr; assert(BZ2_bzCompressInit(strm_, 9, 0, 0) == BZ_OK); } diff --git a/Alignment/Geners/src/BinaryArchiveBase.cc b/Alignment/Geners/src/BinaryArchiveBase.cc index fb6780db0fb6a..75c794adaafa7 100644 --- a/Alignment/Geners/src/BinaryArchiveBase.cc +++ b/Alignment/Geners/src/BinaryArchiveBase.cc @@ -60,11 +60,11 @@ namespace gs { BinaryArchiveBase::BinaryArchiveBase(const char* name, const char* mode) : AbsArchive(name), mode_(parseMode(mode)), - errorStream_(0), - cStream_(0), - catalog_(0), - storedEntryId_(0), - storedLocationId_(0), + errorStream_(nullptr), + cStream_(nullptr), + catalog_(nullptr), + storedEntryId_(nullptr), + storedLocationId_(nullptr), catalogIsSet_(false), addCatalogToData_(false) { @@ -93,8 +93,8 @@ namespace gs { void BinaryArchiveBase::releaseClassIds() { - delete storedEntryId_; storedEntryId_ = 0; - delete storedLocationId_; storedLocationId_ = 0; + delete storedEntryId_; storedEntryId_ = nullptr; + delete storedLocationId_; storedLocationId_ = nullptr; } @@ -277,7 +277,7 @@ namespace gs { char* mode = const_cast(cmode.c_str()); unsigned cnt = 0; - for (char* opt = strtok(mode, ":"); opt; opt = strtok(0, ":"), ++cnt) + for (char* opt = strtok(mode, ":"); opt; opt = strtok(nullptr, ":"), ++cnt) { // Skip the first word -- this is the file opening mode if (!cnt) diff --git a/Alignment/Geners/src/BinaryFileArchive.cc b/Alignment/Geners/src/BinaryFileArchive.cc index cc7fc2286bf55..069f915976209 100644 --- a/Alignment/Geners/src/BinaryFileArchive.cc +++ b/Alignment/Geners/src/BinaryFileArchive.cc @@ -14,8 +14,8 @@ namespace gs { const unsigned dataFileBufferSize, const unsigned catalogFileBufferSize) : BinaryArchiveBase(basename, mode), - filebuf_(0), - catabuf_(0), + filebuf_(nullptr), + catabuf_(nullptr), annotation_(ann ? std::string(ann) : std::string("")), dataFileName_(AbsArchive::name() + ".0.gsbd"), // binary data catalogFileName_(AbsArchive::name() + ".gsbmf"), // binary metafile @@ -88,7 +88,7 @@ namespace gs { } catch (std::exception& e) { - setCatalog(0); + setCatalog(nullptr); releaseBuffers(); errorStream() << e.what(); } @@ -98,10 +98,10 @@ namespace gs { { if (dataStream_.is_open()) dataStream_.close(); if (catStream_.is_open()) catStream_.close(); - catStream_.rdbuf()->pubsetbuf(0, 0); - dataStream_.rdbuf()->pubsetbuf(0, 0); - delete [] catabuf_; catabuf_ = 0; - delete [] filebuf_; filebuf_ = 0; + catStream_.rdbuf()->pubsetbuf(nullptr, 0); + dataStream_.rdbuf()->pubsetbuf(nullptr, 0); + delete [] catabuf_; catabuf_ = nullptr; + delete [] filebuf_; filebuf_ = nullptr; } BinaryFileArchive::~BinaryFileArchive() @@ -116,7 +116,7 @@ namespace gs { { if (!annotationsMerged_) { - if (annotation_.size()) + if (!annotation_.empty()) catalogAnnotations_.push_back(annotation_); annotationsMerged_ = true; } @@ -222,7 +222,7 @@ namespace gs { if (openmode() & std::ios_base::out) { - if (dynamic_cast(catalog()) == 0) + if (dynamic_cast(catalog()) == nullptr) writeCatalog(); catStream_.flush(); } diff --git a/Alignment/Geners/src/CStringStream.cc b/Alignment/Geners/src/CStringStream.cc index e1cfbfe1d8dd8..9c28a073e40d5 100644 --- a/Alignment/Geners/src/CStringStream.cc +++ b/Alignment/Geners/src/CStringStream.cc @@ -80,7 +80,7 @@ namespace gs { // performance even if the user wants to shoot himself // in a foot comprBuf_(bufSize > 1024U ? bufSize : 1024U), - sink_(0) + sink_(nullptr) { this->init(&buf_); } diff --git a/Alignment/Geners/src/CatalogEntry.cc b/Alignment/Geners/src/CatalogEntry.cc index 03d6aeb5f3eb1..0af54c50efdb6 100644 --- a/Alignment/Geners/src/CatalogEntry.cc +++ b/Alignment/Geners/src/CatalogEntry.cc @@ -9,7 +9,7 @@ namespace gs { : ItemDescriptor(), id_(0), len_(0), - location_(ItemLocation(std::streampos(0), 0)) + location_(ItemLocation(std::streampos(0), nullptr)) { } @@ -91,7 +91,7 @@ namespace gs { if (hasOffset) read_pod(in, &offset); - CatalogEntry* rec = 0; + CatalogEntry* rec = nullptr; if (!in.fail()) { CPP11_auto_ptr loc(ItemLocation::read(locId, in)); diff --git a/Alignment/Geners/src/ClassId.cc b/Alignment/Geners/src/ClassId.cc index e706f76e5d37c..1d62012857728 100644 --- a/Alignment/Geners/src/ClassId.cc +++ b/Alignment/Geners/src/ClassId.cc @@ -102,7 +102,7 @@ namespace gs { bool ClassId::validatePrefix(const char* prefix) { // Prefix can not be an empty string - if (prefix == NULL) + if (prefix == nullptr) return false; const unsigned len = strlen(prefix); if (len == 0) diff --git a/Alignment/Geners/src/ContiguousCatalog.cc b/Alignment/Geners/src/ContiguousCatalog.cc index f22cbd53cc9cc..da64e03e5ba02 100644 --- a/Alignment/Geners/src/ContiguousCatalog.cc +++ b/Alignment/Geners/src/ContiguousCatalog.cc @@ -216,7 +216,7 @@ namespace gs { return records_[id - firstId_]; else { - CatalogEntry* ptr = 0; + CatalogEntry* ptr = nullptr; return CPP11_shared_ptr(ptr); } } diff --git a/Alignment/Geners/src/GeneralCatalog.cc b/Alignment/Geners/src/GeneralCatalog.cc index f8bd60e4b5b59..31ff426246156 100644 --- a/Alignment/Geners/src/GeneralCatalog.cc +++ b/Alignment/Geners/src/GeneralCatalog.cc @@ -316,7 +316,7 @@ namespace gs { IdMap::const_iterator it = records_.find(id); if (it == records_.end()) { - CatalogEntry* ptr = 0; + CatalogEntry* ptr = nullptr; return CPP11_shared_ptr(ptr); } else diff --git a/Alignment/Geners/src/ItemLocation.cc b/Alignment/Geners/src/ItemLocation.cc index 4cb8be3c07268..3250107d834a2 100644 --- a/Alignment/Geners/src/ItemLocation.cc +++ b/Alignment/Geners/src/ItemLocation.cc @@ -11,9 +11,9 @@ namespace gs { return false; // If global URI does not exist, local URI must coincide exactly. // If global URI exists, local URI may or may not be defined. - if (URI_.size()) + if (!URI_.empty()) { - if (cachedItemURI_.size() && r.cachedItemURI_.size()) + if (!cachedItemURI_.empty() && !r.cachedItemURI_.empty()) if (cachedItemURI_ != r.cachedItemURI_) return false; } diff --git a/Alignment/Geners/src/MultiFileArchive.cc b/Alignment/Geners/src/MultiFileArchive.cc index 51b6c4ddb4ef0..4046b27a97e04 100644 --- a/Alignment/Geners/src/MultiFileArchive.cc +++ b/Alignment/Geners/src/MultiFileArchive.cc @@ -16,9 +16,9 @@ namespace gs { const unsigned dataFileBufferSize, const unsigned catalogFileBufferSize) : BinaryArchiveBase(basename, mode), - filebuf_(0), - readbuf_(0), - catabuf_(0), + filebuf_(nullptr), + readbuf_(nullptr), + catabuf_(nullptr), annotation_(ann ? std::string(ann) : std::string("")), catalogFileName_(AbsArchive::name() + ".gsbmf"), // binary metafile writeFileURI_("/ / / / / / /\\ \\ \\ \\"), @@ -104,7 +104,7 @@ namespace gs { } catch (std::exception& e) { - setCatalog(0); + setCatalog(nullptr); releaseBuffers(); errorStream() << e.what(); } @@ -115,12 +115,12 @@ namespace gs { if (writeStream_.is_open()) writeStream_.close(); if (separateReadStream_.is_open()) separateReadStream_.close(); if (catStream_.is_open()) catStream_.close(); - catStream_.rdbuf()->pubsetbuf(0, 0); - writeStream_.rdbuf()->pubsetbuf(0, 0); - separateReadStream_.rdbuf()->pubsetbuf(0, 0); - delete [] catabuf_; catabuf_ = 0; - delete [] readbuf_; readbuf_ = 0; - delete [] filebuf_; filebuf_ = 0; + catStream_.rdbuf()->pubsetbuf(nullptr, 0); + writeStream_.rdbuf()->pubsetbuf(nullptr, 0); + separateReadStream_.rdbuf()->pubsetbuf(nullptr, 0); + delete [] catabuf_; catabuf_ = nullptr; + delete [] readbuf_; readbuf_ = nullptr; + delete [] filebuf_; filebuf_ = nullptr; } MultiFileArchive::~MultiFileArchive() @@ -135,7 +135,7 @@ namespace gs { { if (!annotationsMerged_) { - if (annotation_.size()) + if (!annotation_.empty()) catalogAnnotations_.push_back(annotation_); annotationsMerged_ = true; } @@ -218,7 +218,7 @@ namespace gs { if (openmode() & std::ios_base::out) { - if (dynamic_cast(catalog()) == 0) + if (dynamic_cast(catalog()) == nullptr) writeCatalog(); catStream_.flush(); } diff --git a/Alignment/Geners/src/stringArchiveIO.cc b/Alignment/Geners/src/stringArchiveIO.cc index 84ab7d2c7a8f5..610306297ba8c 100644 --- a/Alignment/Geners/src/stringArchiveIO.cc +++ b/Alignment/Geners/src/stringArchiveIO.cc @@ -14,7 +14,7 @@ static bool suffix_matches(const char* filename, const char* suffix) { static const char default_suffix[] = ".gssaz"; assert(filename); - if (suffix == 0) + if (suffix == nullptr) suffix = default_suffix; const std::size_t lenSuffix = strlen(suffix); const std::size_t len = strlen(filename); diff --git a/Alignment/HIPAlignmentAlgorithm/interface/HIPAlignmentAlgorithm.h b/Alignment/HIPAlignmentAlgorithm/interface/HIPAlignmentAlgorithm.h index 7f8abd16c7288..e39b94dd4c5ff 100644 --- a/Alignment/HIPAlignmentAlgorithm/interface/HIPAlignmentAlgorithm.h +++ b/Alignment/HIPAlignmentAlgorithm/interface/HIPAlignmentAlgorithm.h @@ -36,23 +36,23 @@ class HIPAlignmentAlgorithm : public AlignmentAlgorithmBase{ HIPAlignmentAlgorithm(const edm::ParameterSet& cfg); /// Destructor - ~HIPAlignmentAlgorithm(){}; + ~HIPAlignmentAlgorithm() override{}; /// Call at beginning of job void initialize( const edm::EventSetup& setup, AlignableTracker* tracker, AlignableMuon* muon, AlignableExtras* extras, AlignmentParameterStore* store - ); + ) override; /// Call at end of job - void terminate(const edm::EventSetup& setup); + void terminate(const edm::EventSetup& setup) override; /// Called at start of new loop - void startNewLoop(void); + void startNewLoop(void) override; /// Run the algorithm - void run(const edm::EventSetup& setup, const EventInfo& eventInfo); + void run(const edm::EventSetup& setup, const EventInfo& eventInfo) override; private: bool processHit1D( diff --git a/Alignment/HIPAlignmentAlgorithm/interface/HIPUserVariables.h b/Alignment/HIPAlignmentAlgorithm/interface/HIPUserVariables.h index b1da8f8c6496d..e818c4d884b82 100644 --- a/Alignment/HIPAlignmentAlgorithm/interface/HIPUserVariables.h +++ b/Alignment/HIPAlignmentAlgorithm/interface/HIPUserVariables.h @@ -37,9 +37,9 @@ class HIPUserVariables : public AlignmentUserVariables{ {} /** destructor */ - virtual ~HIPUserVariables(){}; + ~HIPUserVariables() override{}; /** clone method (copy constructor) */ - HIPUserVariables* clone(void) const{ return new HIPUserVariables(*this); } + HIPUserVariables* clone(void) const override{ return new HIPUserVariables(*this); } }; diff --git a/Alignment/HIPAlignmentAlgorithm/interface/HIPUserVariablesIORoot.h b/Alignment/HIPAlignmentAlgorithm/interface/HIPUserVariablesIORoot.h index e628f51fbf20c..ea83222a77510 100644 --- a/Alignment/HIPAlignmentAlgorithm/interface/HIPUserVariablesIORoot.h +++ b/Alignment/HIPAlignmentAlgorithm/interface/HIPUserVariablesIORoot.h @@ -23,22 +23,22 @@ class HIPUserVariablesIORoot : public AlignmentIORootBase, public AlignmentUserV private: /** write AlignmentParameters of one Alignable */ - int writeOne(Alignable* ali); + int writeOne(Alignable* ali) override; /** read AlignmentParameters of one Alignable */ - AlignmentUserVariables* readOne(Alignable* ali, int& ierr); + AlignmentUserVariables* readOne(Alignable* ali, int& ierr) override; /** open IO */ - int open(const char* filename, int iteration, bool writemode){ newopen=true; return openRoot(filename, iteration, writemode); } + int open(const char* filename, int iteration, bool writemode) override{ newopen=true; return openRoot(filename, iteration, writemode); } /** close IO */ - int close(void){ return closeRoot(); } + int close(void) override{ return closeRoot(); } // helper functions int findEntry(unsigned int detId, int comp); - void createBranches(void); - void setBranchAddresses(void); + void createBranches(void) override; + void setBranchAddresses(void) override; // data members diff --git a/Alignment/HIPAlignmentAlgorithm/interface/LhcTrackAnalyzer.h b/Alignment/HIPAlignmentAlgorithm/interface/LhcTrackAnalyzer.h index b313e1fa40263..9e293a57c762d 100644 --- a/Alignment/HIPAlignmentAlgorithm/interface/LhcTrackAnalyzer.h +++ b/Alignment/HIPAlignmentAlgorithm/interface/LhcTrackAnalyzer.h @@ -57,12 +57,12 @@ class LhcTrackAnalyzer : public edm::EDAnalyzer { public: explicit LhcTrackAnalyzer(const edm::ParameterSet&); - ~LhcTrackAnalyzer(); + ~LhcTrackAnalyzer() 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 --------------------------- edm::InputTag TrackCollectionTag_; diff --git a/Alignment/HIPAlignmentAlgorithm/plugins/HIPTwoBodyDecayAnalyzer.cc b/Alignment/HIPAlignmentAlgorithm/plugins/HIPTwoBodyDecayAnalyzer.cc index e7d2fae9248a2..da311bbead511 100644 --- a/Alignment/HIPAlignmentAlgorithm/plugins/HIPTwoBodyDecayAnalyzer.cc +++ b/Alignment/HIPAlignmentAlgorithm/plugins/HIPTwoBodyDecayAnalyzer.cc @@ -34,7 +34,7 @@ class HIPTwoBodyDecayAnalyzer : public edm::EDAnalyzer { public: explicit HIPTwoBodyDecayAnalyzer(const edm::ParameterSet&); - ~HIPTwoBodyDecayAnalyzer(); + ~HIPTwoBodyDecayAnalyzer() override; edm::EDGetTokenT alcareco_trackCollToken_; edm::EDGetTokenT refit1_trackCollToken_; @@ -57,9 +57,9 @@ class HIPTwoBodyDecayAnalyzer : public edm::EDAnalyzer { BranchType_unknown_t }; - 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; void bookAllBranches(); bool bookBranch(std::string bname, BranchType btype); diff --git a/Alignment/HIPAlignmentAlgorithm/src/HIPAlignableSpecificParameters.cc b/Alignment/HIPAlignmentAlgorithm/src/HIPAlignableSpecificParameters.cc index 295cdd291e3e1..18d7ca6719f06 100644 --- a/Alignment/HIPAlignmentAlgorithm/src/HIPAlignableSpecificParameters.cc +++ b/Alignment/HIPAlignmentAlgorithm/src/HIPAlignableSpecificParameters.cc @@ -35,7 +35,7 @@ align::ID HIPAlignableSpecificParameters::id()const{ if (aliObj!=nullptr) return align::StructureType HIPAlignableSpecificParameters::objId()const{ if (aliObj!=nullptr) return aliObj->alignableObjectId(); else return align::invalid; } bool HIPAlignableSpecificParameters::matchAlignable(const Alignable* ali)const{ - if (aliObj==(Alignable*)0) return false; + if (aliObj==(Alignable*)nullptr) return false; bool result = (aliObj==ali); if (!result){ // Check deep components of the alignable for this specification for (auto const& alideep : aliObj->deepComponents()){ diff --git a/Alignment/HIPAlignmentAlgorithm/src/HIPAlignmentAlgorithm.cc b/Alignment/HIPAlignmentAlgorithm/src/HIPAlignmentAlgorithm.cc index be5aeb630a3ae..e06cfd4cc90e8 100644 --- a/Alignment/HIPAlignmentAlgorithm/src/HIPAlignmentAlgorithm.cc +++ b/Alignment/HIPAlignmentAlgorithm/src/HIPAlignmentAlgorithm.cc @@ -50,7 +50,7 @@ HIPAlignmentAlgorithm::HIPAlignmentAlgorithm( verbose(cfg.getParameter("verbosity")), theMonitorConfig(cfg), doTrackHitMonitoring(theMonitorConfig.fillTrackMonitoring || theMonitorConfig.fillTrackHitMonitoring), - defaultAlignableSpecs((Alignable*)0), + defaultAlignableSpecs((Alignable*)nullptr), surveyResiduals_(cfg.getUntrackedParameter >("surveyResiduals")), theTrackHitMonitorIORootFile(nullptr), theTrackMonitorTree(nullptr), @@ -345,7 +345,7 @@ void HIPAlignmentAlgorithm::terminate(const edm::EventSetup& iSetup){ edm::LogWarning("Alignment") << "[HIPAlignmentAlgorithm] Terminating"; // calculating survey residuals - if (theLevels.size()>0){ + if (!theLevels.empty()){ edm::LogWarning("Alignment") << "[HIPAlignmentAlgorithm] Using survey constraint"; unsigned int nAlignable = theAlignables.size(); @@ -1114,7 +1114,7 @@ void HIPAlignmentAlgorithm::bookRoot(void){ } // book survey-wise ROOT Tree only if survey is enabled - if (theLevels.size()>0){ + if (!theLevels.empty()){ TString tname=Form("T3_%i", theIteration); theSurveyIORootFile = TFile::Open(ssurveyfile.c_str(), "update"); theSurveyIORootFile->cd(); @@ -1130,7 +1130,7 @@ void HIPAlignmentAlgorithm::bookRoot(void){ // ---------------------------------------------------------------------------- // fill alignable-wise root tree void HIPAlignmentAlgorithm::fillAlignablesMonitor(const edm::EventSetup& iSetup){ - if (theAlignablesMonitorIORootFile==(TFile*)0) return; + if (theAlignablesMonitorIORootFile==(TFile*)nullptr) return; using std::setw; theAlignablesMonitorIORootFile->cd(); diff --git a/Alignment/HIPAlignmentAlgorithm/src/HIPUserVariablesIORoot.cc b/Alignment/HIPAlignmentAlgorithm/src/HIPUserVariablesIORoot.cc index 429fe8162c786..f28c741576175 100644 --- a/Alignment/HIPAlignmentAlgorithm/src/HIPUserVariablesIORoot.cc +++ b/Alignment/HIPAlignmentAlgorithm/src/HIPUserVariablesIORoot.cc @@ -179,7 +179,7 @@ AlignmentUserVariables* HIPUserVariablesIORoot::readOne(Alignable* ali, int& ier } // ierr=-1; - return 0; + return nullptr; } //----------------------------------------------------------------------------- diff --git a/Alignment/LaserAlignment/plugins/LaserAlignment.cc b/Alignment/LaserAlignment/plugins/LaserAlignment.cc index 81dc161e3f54f..dca3a9f38b164 100644 --- a/Alignment/LaserAlignment/plugins/LaserAlignment.cc +++ b/Alignment/LaserAlignment/plugins/LaserAlignment.cc @@ -66,7 +66,7 @@ LaserAlignment::LaserAlignment( edm::ParameterSet const& theConf ) : << "\n=============================================================" << std::endl; // tell about masked modules - if( theMaskTecModules.size() ) { + if( !theMaskTecModules.empty() ) { std::cout << " ===============================================================================================\n" << std::flush; std::cout << " The following " << theMaskTecModules.size() << " TEC modules have been masked out and will not be considered by the TEC algorithm:\n " << std::flush; for( std::vector::iterator moduleIt = theMaskTecModules.begin(); moduleIt != theMaskTecModules.end(); ++moduleIt ) { @@ -75,7 +75,7 @@ LaserAlignment::LaserAlignment( edm::ParameterSet const& theConf ) : std::cout << std::endl << std::flush; std::cout << " ===============================================================================================\n\n" << std::flush; } - if( theMaskAtModules.size() ) { + if( !theMaskAtModules.empty() ) { std::cout << " ===============================================================================================\n" << std::flush; std::cout << " The following " << theMaskAtModules.size() << " AT modules have been masked out and will not be considered by the AT algorithm:\n " << std::flush; for( std::vector::iterator moduleIt = theMaskAtModules.begin(); moduleIt != theMaskAtModules.end(); ++moduleIt ) { @@ -673,7 +673,7 @@ void LaserAlignment::endRunProduce( edm::Run& theRun, const edm::EventSetup& the // this basically sets all the endcap modules to be masked // to their nominal positions (since endcapParameters is overall zero) - if( theMaskTecModules.size() ) { + if( !theMaskTecModules.empty() ) { ApplyEndcapMaskingCorrections( measuredCoordinates, nominalCoordinates, endcapParameters ); } @@ -686,7 +686,7 @@ void LaserAlignment::endRunProduce( edm::Run& theRun, const edm::EventSetup& the // // do this only if there are modules to be masked.. - if( theMaskTecModules.size() ) { + if( !theMaskTecModules.empty() ) { const unsigned int nIterations = 30; for( unsigned int iteration = 0; iteration < nIterations; ++iteration ) { @@ -723,7 +723,7 @@ void LaserAlignment::endRunProduce( edm::Run& theRun, const edm::EventSetup& the // this basically sets all the modules to be masked // to their nominal positions (since alignmentTubeParameters is overall zero) - if( theMaskAtModules.size() ) { + if( !theMaskAtModules.empty() ) { ApplyATMaskingCorrections( measuredCoordinates, nominalCoordinates, alignmentTubeParameters ); } @@ -744,7 +744,7 @@ void LaserAlignment::endRunProduce( edm::Run& theRun, const edm::EventSetup& the // // do this only if there are modules to be masked.. - if( theMaskAtModules.size() ) { + if( !theMaskAtModules.empty() ) { const unsigned int nIterations = 30; for( unsigned int iteration = 0; iteration < nIterations; ++iteration ) { diff --git a/Alignment/LaserAlignment/plugins/LaserAlignmentEventFilter.h b/Alignment/LaserAlignment/plugins/LaserAlignmentEventFilter.h index 83422b348cb00..7337be38787ba 100644 --- a/Alignment/LaserAlignment/plugins/LaserAlignmentEventFilter.h +++ b/Alignment/LaserAlignment/plugins/LaserAlignmentEventFilter.h @@ -9,10 +9,10 @@ class LaserAlignmentEventFilter : public edm::global::EDFilter<> { public: explicit LaserAlignmentEventFilter(const edm::ParameterSet&); - ~LaserAlignmentEventFilter(); + ~LaserAlignmentEventFilter() override; private: - virtual bool filter(edm::StreamID, edm::Event &, edm::EventSetup const&) const override; + bool filter(edm::StreamID, edm::Event &, edm::EventSetup const&) const override; // FED RAW data input collection const edm::EDGetTokenT FED_collection_token; diff --git a/Alignment/LaserAlignment/plugins/LaserAlignmentT0Producer.h b/Alignment/LaserAlignment/plugins/LaserAlignmentT0Producer.h index 3f5d5f207301a..c0052440c235e 100644 --- a/Alignment/LaserAlignment/plugins/LaserAlignmentT0Producer.h +++ b/Alignment/LaserAlignment/plugins/LaserAlignmentT0Producer.h @@ -35,12 +35,12 @@ class LaserAlignmentT0Producer : public edm::EDProducer { public: explicit LaserAlignmentT0Producer( const edm::ParameterSet& ); - ~LaserAlignmentT0Producer(); + ~LaserAlignmentT0Producer() 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 FillDetIds( void ); // container for cfg data diff --git a/Alignment/LaserAlignment/plugins/RawDataConverter.cc b/Alignment/LaserAlignment/plugins/RawDataConverter.cc index 79b5a87cecf7a..a90f771a5c4e4 100644 --- a/Alignment/LaserAlignment/plugins/RawDataConverter.cc +++ b/Alignment/LaserAlignment/plugins/RawDataConverter.cc @@ -20,8 +20,8 @@ /// constructors and destructor /// RawDataConverter::RawDataConverter( const edm::ParameterSet& iConfig ) : - theOutputFile(0), - theOutputTree(0), + theOutputFile(nullptr), + theOutputTree(nullptr), latency(-1), eventnumber(-1), runnumber(-1), diff --git a/Alignment/LaserAlignment/plugins/RawDataConverter.h b/Alignment/LaserAlignment/plugins/RawDataConverter.h index c50353383b789..8e682b0f0e63b 100644 --- a/Alignment/LaserAlignment/plugins/RawDataConverter.h +++ b/Alignment/LaserAlignment/plugins/RawDataConverter.h @@ -11,15 +11,15 @@ class RawDataConverter : public edm::EDAnalyzer { public: explicit RawDataConverter(const edm::ParameterSet&); - ~RawDataConverter(); + ~RawDataConverter() override; private: enum DigiType {ZeroSuppressed, VirginRaw, ProcessedRaw, Unknown}; - virtual void beginJob() ; - virtual void beginRun(edm::Run const &, edm::EventSetup const &) ; - virtual void analyze(const edm::Event&, const edm::EventSetup&); - virtual void endJob() ; + void beginJob() override ; + void beginRun(edm::Run const &, edm::EventSetup const &) override ; + void analyze(const edm::Event&, const edm::EventSetup&) override; + void endJob() override ; void fillDetectorId( void ); void ClearData( void ); diff --git a/Alignment/LaserAlignment/plugins/TkLasBeamFitter.cc b/Alignment/LaserAlignment/plugins/TkLasBeamFitter.cc index 65fefae77cfba..f4e650995508c 100644 --- a/Alignment/LaserAlignment/plugins/TkLasBeamFitter.cc +++ b/Alignment/LaserAlignment/plugins/TkLasBeamFitter.cc @@ -65,12 +65,12 @@ using namespace std; class TkLasBeamFitter : public edm::one::EDProducer { public: explicit TkLasBeamFitter(const edm::ParameterSet &config); - ~TkLasBeamFitter(); + ~TkLasBeamFitter() override; //virtual void beginJob(const edm::EventSetup& /*access deprecated*/) {} - virtual void produce(edm::Event &event, const edm::EventSetup &setup) override; + void produce(edm::Event &event, const edm::EventSetup &setup) override; // virtual void beginRun(edm::Run &run, const edm::EventSetup &setup); - virtual void endRunProduce(edm::Run &run, const edm::EventSetup &setup) override; + void endRunProduce(edm::Run &run, const edm::EventSetup &setup) override; //virtual void endJob() {} private: @@ -167,8 +167,8 @@ double TkLasBeamFitter::gBeamZ0 = 0.0; double TkLasBeamFitter::gBeamSplitterZprime = 0.0; unsigned int TkLasBeamFitter::gHitsAtTecMinus = 0; double TkLasBeamFitter::gBSparam = 0.0; -bool TkLasBeamFitter::gFitBeamSplitters = 0; -bool TkLasBeamFitter::gIsInnerBarrel = 0; +bool TkLasBeamFitter::gFitBeamSplitters = false; +bool TkLasBeamFitter::gIsInnerBarrel = false; // handles Handle laserBeams; @@ -182,12 +182,12 @@ TkLasBeamFitter::TkLasBeamFitter(const edm::ParameterSet &iConfig) : src_(iConfig.getParameter("src")), fitBeamSplitters_(iConfig.getParameter("fitBeamSplitters")), nAtParameters_(iConfig.getParameter("numberOfFittedAtParameters")), - h_bsAngle(0), h_hitX(0), h_hitXTecPlus(0), h_hitXTecMinus(0), - h_hitXAt(0), h_chi2(0), h_chi2ndof(0), h_pull(0), h_res(0), - h_resTecPlus(0), h_resTecMinus(0), h_resAt(0), - h_bsAngleVsBeam(0), h_hitXvsZTecPlus(0), h_hitXvsZTecMinus(0), - h_hitXvsZAt(0), h_resVsZTecPlus(0), h_resVsZTecMinus(0), h_resVsZAt(0), - h_resVsHitTecPlus(0), h_resVsHitTecMinus(0), h_resVsHitAt(0) + h_bsAngle(nullptr), h_hitX(nullptr), h_hitXTecPlus(nullptr), h_hitXTecMinus(nullptr), + h_hitXAt(nullptr), h_chi2(nullptr), h_chi2ndof(nullptr), h_pull(nullptr), h_res(nullptr), + h_resTecPlus(nullptr), h_resTecMinus(nullptr), h_resAt(nullptr), + h_bsAngleVsBeam(nullptr), h_hitXvsZTecPlus(nullptr), h_hitXvsZTecMinus(nullptr), + h_hitXvsZAt(nullptr), h_resVsZTecPlus(nullptr), h_resVsZTecMinus(nullptr), h_resVsZAt(nullptr), + h_resVsHitTecPlus(nullptr), h_resVsHitTecMinus(nullptr), h_resVsHitAt(nullptr) { // declare the products to produce this->produces(); @@ -413,10 +413,10 @@ void TkLasBeamFitter::getLasBeams(TkFittedLasBeam &beam, vector("unsmeared"); diff --git a/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentProducer.h b/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentProducer.h index 513d0558523e2..a183dccfdf6e7 100644 --- a/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentProducer.h +++ b/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentProducer.h @@ -28,12 +28,12 @@ class LaserAlignmentProducer : public edm::one::EDProducer<> { /// constructor explicit LaserAlignmentProducer(const edm::ParameterSet&); /// destructor - ~LaserAlignmentProducer(); + ~LaserAlignmentProducer() override; private: /// produce the HepMCProduct - virtual void produce(edm::Event&, const edm::EventSetup&); + void produce(edm::Event&, const edm::EventSetup&) override; // the event format itself HepMC::GenEvent* theEvent; diff --git a/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentSimulation.cc b/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentSimulation.cc index eeb2deed9d067..6b60165a1d5e1 100644 --- a/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentSimulation.cc +++ b/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentSimulation.cc @@ -49,10 +49,10 @@ LaserAlignmentSimulation::LaserAlignmentSimulation(edm::ParameterSet const& theC LaserAlignmentSimulation::~LaserAlignmentSimulation() { - if ( theMaterialProperties != 0 ) { delete theMaterialProperties; } - if ( theSteppingAction != 0 ) { delete theSteppingAction; } - if ( thePrimaryGenerator != 0 ) { delete thePrimaryGenerator; } - if ( theTimer != 0 ) { delete theTimer; } + if ( theMaterialProperties != nullptr ) { delete theMaterialProperties; } + if ( theSteppingAction != nullptr ) { delete theSteppingAction; } + if ( thePrimaryGenerator != nullptr ) { delete thePrimaryGenerator; } + if ( theTimer != nullptr ) { delete theTimer; } } void LaserAlignmentSimulation::update(const BeginOfRun * myRun) diff --git a/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentSimulation.h b/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentSimulation.h index 94d147097b9b1..2a3dfb814a090 100644 --- a/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentSimulation.h +++ b/Alignment/LaserAlignmentSimulation/plugins/LaserAlignmentSimulation.h @@ -52,23 +52,23 @@ class LaserAlignmentSimulation : public Observer, /// constructor explicit LaserAlignmentSimulation(edm::ParameterSet const & theConf); /// destructor - virtual ~LaserAlignmentSimulation(); + ~LaserAlignmentSimulation() override; /* private: */ /// observer for BeginOfRun - void update(const BeginOfRun * myRun); + void update(const BeginOfRun * myRun) override; /// observer for BeginOfEvent - void update(const BeginOfEvent * myEvent); + void update(const BeginOfEvent * myEvent) override; /// observer for G4Step - void update(const G4Step * myStep); + void update(const G4Step * myStep) override; /// observer for EndOfEvent - void update(const EndOfEvent * myEvent); + void update(const EndOfEvent * myEvent) override; /// observer for EndOfRun - void update(const EndOfRun * myRun); + void update(const EndOfRun * myRun) override; /// observer for BeginOfTrack - void update(const BeginOfTrack * myTrack); + void update(const BeginOfTrack * myTrack) override; /// observer for EndOfTrack - void update(const EndOfTrack * myTrack); + void update(const EndOfTrack * myTrack) override; private: int theDebugLevel; diff --git a/Alignment/LaserAlignmentSimulation/src/LaserBeamsBarrel.cc b/Alignment/LaserAlignmentSimulation/src/LaserBeamsBarrel.cc index 218e6e071aeeb..23529414012ee 100644 --- a/Alignment/LaserAlignmentSimulation/src/LaserBeamsBarrel.cc +++ b/Alignment/LaserAlignmentSimulation/src/LaserBeamsBarrel.cc @@ -19,8 +19,8 @@ #include "G4SystemOfUnits.hh" LaserBeamsBarrel::LaserBeamsBarrel() : - theParticleGun(0), - theDRand48Engine(0) + theParticleGun(nullptr), + theDRand48Engine(nullptr) { G4int nPhotonsGun = 1; G4int nPhotonsBeam = 1; @@ -71,8 +71,8 @@ LaserBeamsBarrel::LaserBeamsBarrel(G4int nPhotonsInGun, G4int nPhotonsInBeam, G4 LaserBeamsBarrel::~LaserBeamsBarrel() { - if ( theParticleGun != 0 ) { delete theParticleGun; } - if ( theDRand48Engine != 0 ) { delete theDRand48Engine; } + if ( theParticleGun != nullptr ) { delete theParticleGun; } + if ( theDRand48Engine != nullptr ) { delete theDRand48Engine; } } void LaserBeamsBarrel::GeneratePrimaries(G4Event * myEvent) diff --git a/Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC1.cc b/Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC1.cc index ec74ee7379017..95723cef7a4f1 100644 --- a/Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC1.cc +++ b/Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC1.cc @@ -19,8 +19,8 @@ #include "G4ParticleGun.hh" LaserBeamsTEC1::LaserBeamsTEC1() : - theParticleGun(0), - theDRand48Engine(0) + theParticleGun(nullptr), + theDRand48Engine(nullptr) { G4int nPhotonsGun = 1; G4int nPhotonsBeam = 1; @@ -70,8 +70,8 @@ LaserBeamsTEC1::LaserBeamsTEC1(G4int nPhotonsInGun, G4int nPhotonsInBeam, G4doub LaserBeamsTEC1::~LaserBeamsTEC1() { - if ( theParticleGun != 0 ) { delete theParticleGun; } - if ( theDRand48Engine != 0 ) { delete theDRand48Engine; } + if ( theParticleGun != nullptr ) { delete theParticleGun; } + if ( theDRand48Engine != nullptr ) { delete theDRand48Engine; } } void LaserBeamsTEC1::GeneratePrimaries(G4Event* myEvent) diff --git a/Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC2.cc b/Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC2.cc index f81426497d0ab..ff29bbbf447e1 100644 --- a/Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC2.cc +++ b/Alignment/LaserAlignmentSimulation/src/LaserBeamsTEC2.cc @@ -19,8 +19,8 @@ #include "G4ParticleGun.hh" LaserBeamsTEC2::LaserBeamsTEC2() : - theParticleGun(0), - theDRand48Engine(0) + theParticleGun(nullptr), + theDRand48Engine(nullptr) { G4int nPhotonsGun = 1; G4int nPhotonsBeam = 1; @@ -70,8 +70,8 @@ LaserBeamsTEC2::LaserBeamsTEC2(G4int nPhotonsInGun, G4int nPhotonsInBeam, G4doub LaserBeamsTEC2::~LaserBeamsTEC2() { - if ( theParticleGun != 0 ) { delete theParticleGun; } - if ( theDRand48Engine != 0 ) { delete theDRand48Engine; } + if ( theParticleGun != nullptr ) { delete theParticleGun; } + if ( theDRand48Engine != nullptr ) { delete theDRand48Engine; } } void LaserBeamsTEC2::GeneratePrimaries(G4Event* myEvent) diff --git a/Alignment/LaserAlignmentSimulation/src/LaserOpticalPhysicsList.cc b/Alignment/LaserAlignmentSimulation/src/LaserOpticalPhysicsList.cc index 9aed738b88a72..854d97c7d61a0 100644 --- a/Alignment/LaserAlignmentSimulation/src/LaserOpticalPhysicsList.cc +++ b/Alignment/LaserAlignmentSimulation/src/LaserOpticalPhysicsList.cc @@ -39,11 +39,11 @@ LaserOpticalPhysicsList::~LaserOpticalPhysicsList() std::cout << " entering destructor ... " << std::endl; std::cout << " deleting the processes ... "; } - if ( theWLSProcess != 0 ) { delete theWLSProcess; } - if ( theBoundaryProcess != 0 ) { delete theBoundaryProcess; } - if ( theRayleighScattering != 0 ) { delete theRayleighScattering; } - if ( theAbsorptionProcess != 0 ) { delete theAbsorptionProcess; } - if ( theScintProcess != 0 ) { delete theScintProcess; } + if ( theWLSProcess != nullptr ) { delete theWLSProcess; } + if ( theBoundaryProcess != nullptr ) { delete theBoundaryProcess; } + if ( theRayleighScattering != nullptr ) { delete theRayleighScattering; } + if ( theAbsorptionProcess != nullptr ) { delete theAbsorptionProcess; } + if ( theScintProcess != nullptr ) { delete theScintProcess; } if (verboseLevel > 0) std::cout << " done " << std::endl; } @@ -73,7 +73,7 @@ void LaserOpticalPhysicsList::ConstructProcess() theAbsorptionProcess->SetVerboseLevel(verboseLevel); theBoundaryProcess->SetVerboseLevel(verboseLevel); - G4ProcessManager * pManager = 0; + G4ProcessManager * pManager = nullptr; pManager = G4OpticalPhoton::OpticalPhoton()->GetProcessManager(); pManager->AddDiscreteProcess(theAbsorptionProcess); diff --git a/Alignment/LaserAlignmentSimulation/src/LaserPrimaryGeneratorAction.cc b/Alignment/LaserAlignmentSimulation/src/LaserPrimaryGeneratorAction.cc index 6d77d93893f81..ca251ea7db840 100644 --- a/Alignment/LaserAlignmentSimulation/src/LaserPrimaryGeneratorAction.cc +++ b/Alignment/LaserAlignmentSimulation/src/LaserPrimaryGeneratorAction.cc @@ -52,9 +52,9 @@ LaserPrimaryGeneratorAction::~LaserPrimaryGeneratorAction() { // {{{ LaserPrimaryGeneratorAction destructor - if ( theLaserBeamsInTEC1 != 0 ) { delete theLaserBeamsInTEC1; } - if ( theLaserBeamsInTEC2 != 0 ) { delete theLaserBeamsInTEC2; } - if ( theLaserBeamsInTECTIBTOBTEC != 0 ) { delete theLaserBeamsInTECTIBTOBTEC; } + if ( theLaserBeamsInTEC1 != nullptr ) { delete theLaserBeamsInTEC1; } + if ( theLaserBeamsInTEC2 != nullptr ) { delete theLaserBeamsInTEC2; } + if ( theLaserBeamsInTECTIBTOBTEC != nullptr ) { delete theLaserBeamsInTECTIBTOBTEC; } // }}} } diff --git a/Alignment/LaserAlignmentSimulation/src/LaserSteppingVerbose.cc b/Alignment/LaserAlignmentSimulation/src/LaserSteppingVerbose.cc index 4ef444fa1cd48..63f3d34111888 100644 --- a/Alignment/LaserAlignmentSimulation/src/LaserSteppingVerbose.cc +++ b/Alignment/LaserAlignmentSimulation/src/LaserSteppingVerbose.cc @@ -52,7 +52,7 @@ void LaserSteppingVerbose::StepInfo() << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " "; - if ( fTrack->GetNextVolume() != 0 ) + if ( fTrack->GetNextVolume() != nullptr ) { G4cout << std::setw(10) << fTrack->GetVolume()->GetName(); } @@ -61,7 +61,7 @@ void LaserSteppingVerbose::StepInfo() G4cout << std::setw(10) << "OutOfWorld"; } - if ( fStep->GetPostStepPoint()->GetProcessDefinedStep() != 0 ) + if ( fStep->GetPostStepPoint()->GetProcessDefinedStep() != nullptr ) { G4cout << " " << std::setw(10) << fStep->GetPostStepPoint()->GetProcessDefinedStep() ->GetProcessName(); @@ -144,7 +144,7 @@ void LaserSteppingVerbose::TrackingStarted() << std::setw( 6) << G4BestUnit(fStep->GetStepLength(),"Length") << std::setw( 6) << G4BestUnit(fTrack->GetTrackLength(),"Length") << " "; - if (fTrack->GetNextVolume() != 0) + if (fTrack->GetNextVolume() != nullptr) { G4cout << std::setw(10) << fTrack->GetVolume()->GetName(); } diff --git a/Alignment/LaserAlignmentSimulation/src/MaterialProperties.cc b/Alignment/LaserAlignmentSimulation/src/MaterialProperties.cc index ec37e4f10cee1..522e819cad4bf 100644 --- a/Alignment/LaserAlignmentSimulation/src/MaterialProperties.cc +++ b/Alignment/LaserAlignmentSimulation/src/MaterialProperties.cc @@ -43,10 +43,10 @@ MaterialProperties::~MaterialProperties() { - if ( theMPT != 0 ) { delete theMPT; } - if ( theTECWafer != 0 ) { delete theTECWafer; } - if ( theTOBWafer != 0 ) { delete theTOBWafer; } - if ( theTIBWafer != 0 ) { delete theTIBWafer; } + if ( theMPT != nullptr ) { delete theMPT; } + if ( theTECWafer != nullptr ) { delete theTECWafer; } + if ( theTOBWafer != nullptr ) { delete theTOBWafer; } + if ( theTIBWafer != nullptr ) { delete theTIBWafer; } } diff --git a/Alignment/LaserDQM/plugins/LaserDQM.cc b/Alignment/LaserDQM/plugins/LaserDQM.cc index 68855deedbf18..d467fd4460acf 100644 --- a/Alignment/LaserDQM/plugins/LaserDQM.cc +++ b/Alignment/LaserDQM/plugins/LaserDQM.cc @@ -25,500 +25,500 @@ LaserDQM::LaserDQM(edm::ParameterSet const& theConf) theDigiProducersList(theConf.getParameter("DigiProducersList")), theDQMFileName(theConf.getUntrackedParameter("DQMFileName","testDQM.root")), theDaqMonitorBEI(), - theMEBeam0Ring4Disc1PosAdcCounts(0), - theMEBeam0Ring4Disc2PosAdcCounts(0), - theMEBeam0Ring4Disc3PosAdcCounts(0), - theMEBeam0Ring4Disc4PosAdcCounts(0), - theMEBeam0Ring4Disc5PosAdcCounts(0), - theMEBeam0Ring4Disc6PosAdcCounts(0), - theMEBeam0Ring4Disc7PosAdcCounts(0), - theMEBeam0Ring4Disc8PosAdcCounts(0), - theMEBeam0Ring4Disc9PosAdcCounts(0), + theMEBeam0Ring4Disc1PosAdcCounts(nullptr), + theMEBeam0Ring4Disc2PosAdcCounts(nullptr), + theMEBeam0Ring4Disc3PosAdcCounts(nullptr), + theMEBeam0Ring4Disc4PosAdcCounts(nullptr), + theMEBeam0Ring4Disc5PosAdcCounts(nullptr), + theMEBeam0Ring4Disc6PosAdcCounts(nullptr), + theMEBeam0Ring4Disc7PosAdcCounts(nullptr), + theMEBeam0Ring4Disc8PosAdcCounts(nullptr), + theMEBeam0Ring4Disc9PosAdcCounts(nullptr), // Adc counts for Beam 1 in Ring 4 - theMEBeam1Ring4Disc1PosAdcCounts(0), - theMEBeam1Ring4Disc2PosAdcCounts(0), - theMEBeam1Ring4Disc3PosAdcCounts(0), - theMEBeam1Ring4Disc4PosAdcCounts(0), - theMEBeam1Ring4Disc5PosAdcCounts(0), - theMEBeam1Ring4Disc6PosAdcCounts(0), - theMEBeam1Ring4Disc7PosAdcCounts(0), - theMEBeam1Ring4Disc8PosAdcCounts(0), - theMEBeam1Ring4Disc9PosAdcCounts(0), + theMEBeam1Ring4Disc1PosAdcCounts(nullptr), + theMEBeam1Ring4Disc2PosAdcCounts(nullptr), + theMEBeam1Ring4Disc3PosAdcCounts(nullptr), + theMEBeam1Ring4Disc4PosAdcCounts(nullptr), + theMEBeam1Ring4Disc5PosAdcCounts(nullptr), + theMEBeam1Ring4Disc6PosAdcCounts(nullptr), + theMEBeam1Ring4Disc7PosAdcCounts(nullptr), + theMEBeam1Ring4Disc8PosAdcCounts(nullptr), + theMEBeam1Ring4Disc9PosAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam1Ring4Disc1PosTEC2TECAdcCounts(0), - theMEBeam1Ring4Disc2PosTEC2TECAdcCounts(0), - theMEBeam1Ring4Disc3PosTEC2TECAdcCounts(0), - theMEBeam1Ring4Disc4PosTEC2TECAdcCounts(0), - theMEBeam1Ring4Disc5PosTEC2TECAdcCounts(0), + theMEBeam1Ring4Disc1PosTEC2TECAdcCounts(nullptr), + theMEBeam1Ring4Disc2PosTEC2TECAdcCounts(nullptr), + theMEBeam1Ring4Disc3PosTEC2TECAdcCounts(nullptr), + theMEBeam1Ring4Disc4PosTEC2TECAdcCounts(nullptr), + theMEBeam1Ring4Disc5PosTEC2TECAdcCounts(nullptr), // Adc counts for Beam 2 in Ring 4 - theMEBeam2Ring4Disc1PosAdcCounts(0), - theMEBeam2Ring4Disc2PosAdcCounts(0), - theMEBeam2Ring4Disc3PosAdcCounts(0), - theMEBeam2Ring4Disc4PosAdcCounts(0), - theMEBeam2Ring4Disc5PosAdcCounts(0), - theMEBeam2Ring4Disc6PosAdcCounts(0), - theMEBeam2Ring4Disc7PosAdcCounts(0), - theMEBeam2Ring4Disc8PosAdcCounts(0), - theMEBeam2Ring4Disc9PosAdcCounts(0), + theMEBeam2Ring4Disc1PosAdcCounts(nullptr), + theMEBeam2Ring4Disc2PosAdcCounts(nullptr), + theMEBeam2Ring4Disc3PosAdcCounts(nullptr), + theMEBeam2Ring4Disc4PosAdcCounts(nullptr), + theMEBeam2Ring4Disc5PosAdcCounts(nullptr), + theMEBeam2Ring4Disc6PosAdcCounts(nullptr), + theMEBeam2Ring4Disc7PosAdcCounts(nullptr), + theMEBeam2Ring4Disc8PosAdcCounts(nullptr), + theMEBeam2Ring4Disc9PosAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam2Ring4Disc1PosTEC2TECAdcCounts(0), - theMEBeam2Ring4Disc2PosTEC2TECAdcCounts(0), - theMEBeam2Ring4Disc3PosTEC2TECAdcCounts(0), - theMEBeam2Ring4Disc4PosTEC2TECAdcCounts(0), - theMEBeam2Ring4Disc5PosTEC2TECAdcCounts(0), + theMEBeam2Ring4Disc1PosTEC2TECAdcCounts(nullptr), + theMEBeam2Ring4Disc2PosTEC2TECAdcCounts(nullptr), + theMEBeam2Ring4Disc3PosTEC2TECAdcCounts(nullptr), + theMEBeam2Ring4Disc4PosTEC2TECAdcCounts(nullptr), + theMEBeam2Ring4Disc5PosTEC2TECAdcCounts(nullptr), // Adc counts for Beam 3 in Ring 4 - theMEBeam3Ring4Disc1PosAdcCounts(0), - theMEBeam3Ring4Disc2PosAdcCounts(0), - theMEBeam3Ring4Disc3PosAdcCounts(0), - theMEBeam3Ring4Disc4PosAdcCounts(0), - theMEBeam3Ring4Disc5PosAdcCounts(0), - theMEBeam3Ring4Disc6PosAdcCounts(0), - theMEBeam3Ring4Disc7PosAdcCounts(0), - theMEBeam3Ring4Disc8PosAdcCounts(0), - theMEBeam3Ring4Disc9PosAdcCounts(0), + theMEBeam3Ring4Disc1PosAdcCounts(nullptr), + theMEBeam3Ring4Disc2PosAdcCounts(nullptr), + theMEBeam3Ring4Disc3PosAdcCounts(nullptr), + theMEBeam3Ring4Disc4PosAdcCounts(nullptr), + theMEBeam3Ring4Disc5PosAdcCounts(nullptr), + theMEBeam3Ring4Disc6PosAdcCounts(nullptr), + theMEBeam3Ring4Disc7PosAdcCounts(nullptr), + theMEBeam3Ring4Disc8PosAdcCounts(nullptr), + theMEBeam3Ring4Disc9PosAdcCounts(nullptr), // Adc counts for Beam 4 in Ring 4 - theMEBeam4Ring4Disc1PosAdcCounts(0), - theMEBeam4Ring4Disc2PosAdcCounts(0), - theMEBeam4Ring4Disc3PosAdcCounts(0), - theMEBeam4Ring4Disc4PosAdcCounts(0), - theMEBeam4Ring4Disc5PosAdcCounts(0), - theMEBeam4Ring4Disc6PosAdcCounts(0), - theMEBeam4Ring4Disc7PosAdcCounts(0), - theMEBeam4Ring4Disc8PosAdcCounts(0), - theMEBeam4Ring4Disc9PosAdcCounts(0), + theMEBeam4Ring4Disc1PosAdcCounts(nullptr), + theMEBeam4Ring4Disc2PosAdcCounts(nullptr), + theMEBeam4Ring4Disc3PosAdcCounts(nullptr), + theMEBeam4Ring4Disc4PosAdcCounts(nullptr), + theMEBeam4Ring4Disc5PosAdcCounts(nullptr), + theMEBeam4Ring4Disc6PosAdcCounts(nullptr), + theMEBeam4Ring4Disc7PosAdcCounts(nullptr), + theMEBeam4Ring4Disc8PosAdcCounts(nullptr), + theMEBeam4Ring4Disc9PosAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam4Ring4Disc1PosTEC2TECAdcCounts(0), - theMEBeam4Ring4Disc2PosTEC2TECAdcCounts(0), - theMEBeam4Ring4Disc3PosTEC2TECAdcCounts(0), - theMEBeam4Ring4Disc4PosTEC2TECAdcCounts(0), - theMEBeam4Ring4Disc5PosTEC2TECAdcCounts(0), + theMEBeam4Ring4Disc1PosTEC2TECAdcCounts(nullptr), + theMEBeam4Ring4Disc2PosTEC2TECAdcCounts(nullptr), + theMEBeam4Ring4Disc3PosTEC2TECAdcCounts(nullptr), + theMEBeam4Ring4Disc4PosTEC2TECAdcCounts(nullptr), + theMEBeam4Ring4Disc5PosTEC2TECAdcCounts(nullptr), // Adc counts for Beam 5 in Ring 4 - theMEBeam5Ring4Disc1PosAdcCounts(0), - theMEBeam5Ring4Disc2PosAdcCounts(0), - theMEBeam5Ring4Disc3PosAdcCounts(0), - theMEBeam5Ring4Disc4PosAdcCounts(0), - theMEBeam5Ring4Disc5PosAdcCounts(0), - theMEBeam5Ring4Disc6PosAdcCounts(0), - theMEBeam5Ring4Disc7PosAdcCounts(0), - theMEBeam5Ring4Disc8PosAdcCounts(0), - theMEBeam5Ring4Disc9PosAdcCounts(0), + theMEBeam5Ring4Disc1PosAdcCounts(nullptr), + theMEBeam5Ring4Disc2PosAdcCounts(nullptr), + theMEBeam5Ring4Disc3PosAdcCounts(nullptr), + theMEBeam5Ring4Disc4PosAdcCounts(nullptr), + theMEBeam5Ring4Disc5PosAdcCounts(nullptr), + theMEBeam5Ring4Disc6PosAdcCounts(nullptr), + theMEBeam5Ring4Disc7PosAdcCounts(nullptr), + theMEBeam5Ring4Disc8PosAdcCounts(nullptr), + theMEBeam5Ring4Disc9PosAdcCounts(nullptr), // Adc counts for Beam 6 in Ring 4 - theMEBeam6Ring4Disc1PosAdcCounts(0), - theMEBeam6Ring4Disc2PosAdcCounts(0), - theMEBeam6Ring4Disc3PosAdcCounts(0), - theMEBeam6Ring4Disc4PosAdcCounts(0), - theMEBeam6Ring4Disc5PosAdcCounts(0), - theMEBeam6Ring4Disc6PosAdcCounts(0), - theMEBeam6Ring4Disc7PosAdcCounts(0), - theMEBeam6Ring4Disc8PosAdcCounts(0), - theMEBeam6Ring4Disc9PosAdcCounts(0), + theMEBeam6Ring4Disc1PosAdcCounts(nullptr), + theMEBeam6Ring4Disc2PosAdcCounts(nullptr), + theMEBeam6Ring4Disc3PosAdcCounts(nullptr), + theMEBeam6Ring4Disc4PosAdcCounts(nullptr), + theMEBeam6Ring4Disc5PosAdcCounts(nullptr), + theMEBeam6Ring4Disc6PosAdcCounts(nullptr), + theMEBeam6Ring4Disc7PosAdcCounts(nullptr), + theMEBeam6Ring4Disc8PosAdcCounts(nullptr), + theMEBeam6Ring4Disc9PosAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam6Ring4Disc1PosTEC2TECAdcCounts(0), - theMEBeam6Ring4Disc2PosTEC2TECAdcCounts(0), - theMEBeam6Ring4Disc3PosTEC2TECAdcCounts(0), - theMEBeam6Ring4Disc4PosTEC2TECAdcCounts(0), - theMEBeam6Ring4Disc5PosTEC2TECAdcCounts(0), + theMEBeam6Ring4Disc1PosTEC2TECAdcCounts(nullptr), + theMEBeam6Ring4Disc2PosTEC2TECAdcCounts(nullptr), + theMEBeam6Ring4Disc3PosTEC2TECAdcCounts(nullptr), + theMEBeam6Ring4Disc4PosTEC2TECAdcCounts(nullptr), + theMEBeam6Ring4Disc5PosTEC2TECAdcCounts(nullptr), // Adc counts for Beam 7 in Ring 4 - theMEBeam7Ring4Disc1PosAdcCounts(0), - theMEBeam7Ring4Disc2PosAdcCounts(0), - theMEBeam7Ring4Disc3PosAdcCounts(0), - theMEBeam7Ring4Disc4PosAdcCounts(0), - theMEBeam7Ring4Disc5PosAdcCounts(0), - theMEBeam7Ring4Disc6PosAdcCounts(0), - theMEBeam7Ring4Disc7PosAdcCounts(0), - theMEBeam7Ring4Disc8PosAdcCounts(0), - theMEBeam7Ring4Disc9PosAdcCounts(0), + theMEBeam7Ring4Disc1PosAdcCounts(nullptr), + theMEBeam7Ring4Disc2PosAdcCounts(nullptr), + theMEBeam7Ring4Disc3PosAdcCounts(nullptr), + theMEBeam7Ring4Disc4PosAdcCounts(nullptr), + theMEBeam7Ring4Disc5PosAdcCounts(nullptr), + theMEBeam7Ring4Disc6PosAdcCounts(nullptr), + theMEBeam7Ring4Disc7PosAdcCounts(nullptr), + theMEBeam7Ring4Disc8PosAdcCounts(nullptr), + theMEBeam7Ring4Disc9PosAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam7Ring4Disc1PosTEC2TECAdcCounts(0), - theMEBeam7Ring4Disc2PosTEC2TECAdcCounts(0), - theMEBeam7Ring4Disc3PosTEC2TECAdcCounts(0), - theMEBeam7Ring4Disc4PosTEC2TECAdcCounts(0), - theMEBeam7Ring4Disc5PosTEC2TECAdcCounts(0), + theMEBeam7Ring4Disc1PosTEC2TECAdcCounts(nullptr), + theMEBeam7Ring4Disc2PosTEC2TECAdcCounts(nullptr), + theMEBeam7Ring4Disc3PosTEC2TECAdcCounts(nullptr), + theMEBeam7Ring4Disc4PosTEC2TECAdcCounts(nullptr), + theMEBeam7Ring4Disc5PosTEC2TECAdcCounts(nullptr), // Adc counts for Beam 0 in Ring 6 - theMEBeam0Ring6Disc1PosAdcCounts(0), - theMEBeam0Ring6Disc2PosAdcCounts(0), - theMEBeam0Ring6Disc3PosAdcCounts(0), - theMEBeam0Ring6Disc4PosAdcCounts(0), - theMEBeam0Ring6Disc5PosAdcCounts(0), - theMEBeam0Ring6Disc6PosAdcCounts(0), - theMEBeam0Ring6Disc7PosAdcCounts(0), - theMEBeam0Ring6Disc8PosAdcCounts(0), - theMEBeam0Ring6Disc9PosAdcCounts(0), + theMEBeam0Ring6Disc1PosAdcCounts(nullptr), + theMEBeam0Ring6Disc2PosAdcCounts(nullptr), + theMEBeam0Ring6Disc3PosAdcCounts(nullptr), + theMEBeam0Ring6Disc4PosAdcCounts(nullptr), + theMEBeam0Ring6Disc5PosAdcCounts(nullptr), + theMEBeam0Ring6Disc6PosAdcCounts(nullptr), + theMEBeam0Ring6Disc7PosAdcCounts(nullptr), + theMEBeam0Ring6Disc8PosAdcCounts(nullptr), + theMEBeam0Ring6Disc9PosAdcCounts(nullptr), // Adc counts for Beam 1 in Ring 6 - theMEBeam1Ring6Disc1PosAdcCounts(0), - theMEBeam1Ring6Disc2PosAdcCounts(0), - theMEBeam1Ring6Disc3PosAdcCounts(0), - theMEBeam1Ring6Disc4PosAdcCounts(0), - theMEBeam1Ring6Disc5PosAdcCounts(0), - theMEBeam1Ring6Disc6PosAdcCounts(0), - theMEBeam1Ring6Disc7PosAdcCounts(0), - theMEBeam1Ring6Disc8PosAdcCounts(0), - theMEBeam1Ring6Disc9PosAdcCounts(0), + theMEBeam1Ring6Disc1PosAdcCounts(nullptr), + theMEBeam1Ring6Disc2PosAdcCounts(nullptr), + theMEBeam1Ring6Disc3PosAdcCounts(nullptr), + theMEBeam1Ring6Disc4PosAdcCounts(nullptr), + theMEBeam1Ring6Disc5PosAdcCounts(nullptr), + theMEBeam1Ring6Disc6PosAdcCounts(nullptr), + theMEBeam1Ring6Disc7PosAdcCounts(nullptr), + theMEBeam1Ring6Disc8PosAdcCounts(nullptr), + theMEBeam1Ring6Disc9PosAdcCounts(nullptr), // Adc counts for Beam 2 in Ring 6 - theMEBeam2Ring6Disc1PosAdcCounts(0), - theMEBeam2Ring6Disc2PosAdcCounts(0), - theMEBeam2Ring6Disc3PosAdcCounts(0), - theMEBeam2Ring6Disc4PosAdcCounts(0), - theMEBeam2Ring6Disc5PosAdcCounts(0), - theMEBeam2Ring6Disc6PosAdcCounts(0), - theMEBeam2Ring6Disc7PosAdcCounts(0), - theMEBeam2Ring6Disc8PosAdcCounts(0), - theMEBeam2Ring6Disc9PosAdcCounts(0), + theMEBeam2Ring6Disc1PosAdcCounts(nullptr), + theMEBeam2Ring6Disc2PosAdcCounts(nullptr), + theMEBeam2Ring6Disc3PosAdcCounts(nullptr), + theMEBeam2Ring6Disc4PosAdcCounts(nullptr), + theMEBeam2Ring6Disc5PosAdcCounts(nullptr), + theMEBeam2Ring6Disc6PosAdcCounts(nullptr), + theMEBeam2Ring6Disc7PosAdcCounts(nullptr), + theMEBeam2Ring6Disc8PosAdcCounts(nullptr), + theMEBeam2Ring6Disc9PosAdcCounts(nullptr), // Adc counts for Beam 3 in Ring 6 - theMEBeam3Ring6Disc1PosAdcCounts(0), - theMEBeam3Ring6Disc2PosAdcCounts(0), - theMEBeam3Ring6Disc3PosAdcCounts(0), - theMEBeam3Ring6Disc4PosAdcCounts(0), - theMEBeam3Ring6Disc5PosAdcCounts(0), - theMEBeam3Ring6Disc6PosAdcCounts(0), - theMEBeam3Ring6Disc7PosAdcCounts(0), - theMEBeam3Ring6Disc8PosAdcCounts(0), - theMEBeam3Ring6Disc9PosAdcCounts(0), + theMEBeam3Ring6Disc1PosAdcCounts(nullptr), + theMEBeam3Ring6Disc2PosAdcCounts(nullptr), + theMEBeam3Ring6Disc3PosAdcCounts(nullptr), + theMEBeam3Ring6Disc4PosAdcCounts(nullptr), + theMEBeam3Ring6Disc5PosAdcCounts(nullptr), + theMEBeam3Ring6Disc6PosAdcCounts(nullptr), + theMEBeam3Ring6Disc7PosAdcCounts(nullptr), + theMEBeam3Ring6Disc8PosAdcCounts(nullptr), + theMEBeam3Ring6Disc9PosAdcCounts(nullptr), // Adc counts for Beam 4 in Ring 6 - theMEBeam4Ring6Disc1PosAdcCounts(0), - theMEBeam4Ring6Disc2PosAdcCounts(0), - theMEBeam4Ring6Disc3PosAdcCounts(0), - theMEBeam4Ring6Disc4PosAdcCounts(0), - theMEBeam4Ring6Disc5PosAdcCounts(0), - theMEBeam4Ring6Disc6PosAdcCounts(0), - theMEBeam4Ring6Disc7PosAdcCounts(0), - theMEBeam4Ring6Disc8PosAdcCounts(0), - theMEBeam4Ring6Disc9PosAdcCounts(0), + theMEBeam4Ring6Disc1PosAdcCounts(nullptr), + theMEBeam4Ring6Disc2PosAdcCounts(nullptr), + theMEBeam4Ring6Disc3PosAdcCounts(nullptr), + theMEBeam4Ring6Disc4PosAdcCounts(nullptr), + theMEBeam4Ring6Disc5PosAdcCounts(nullptr), + theMEBeam4Ring6Disc6PosAdcCounts(nullptr), + theMEBeam4Ring6Disc7PosAdcCounts(nullptr), + theMEBeam4Ring6Disc8PosAdcCounts(nullptr), + theMEBeam4Ring6Disc9PosAdcCounts(nullptr), // Adc counts for Beam 5 in Ring 6 - theMEBeam5Ring6Disc1PosAdcCounts(0), - theMEBeam5Ring6Disc2PosAdcCounts(0), - theMEBeam5Ring6Disc3PosAdcCounts(0), - theMEBeam5Ring6Disc4PosAdcCounts(0), - theMEBeam5Ring6Disc5PosAdcCounts(0), - theMEBeam5Ring6Disc6PosAdcCounts(0), - theMEBeam5Ring6Disc7PosAdcCounts(0), - theMEBeam5Ring6Disc8PosAdcCounts(0), - theMEBeam5Ring6Disc9PosAdcCounts(0), + theMEBeam5Ring6Disc1PosAdcCounts(nullptr), + theMEBeam5Ring6Disc2PosAdcCounts(nullptr), + theMEBeam5Ring6Disc3PosAdcCounts(nullptr), + theMEBeam5Ring6Disc4PosAdcCounts(nullptr), + theMEBeam5Ring6Disc5PosAdcCounts(nullptr), + theMEBeam5Ring6Disc6PosAdcCounts(nullptr), + theMEBeam5Ring6Disc7PosAdcCounts(nullptr), + theMEBeam5Ring6Disc8PosAdcCounts(nullptr), + theMEBeam5Ring6Disc9PosAdcCounts(nullptr), // Adc counts for Beam 6 in Ring 6 - theMEBeam6Ring6Disc1PosAdcCounts(0), - theMEBeam6Ring6Disc2PosAdcCounts(0), - theMEBeam6Ring6Disc3PosAdcCounts(0), - theMEBeam6Ring6Disc4PosAdcCounts(0), - theMEBeam6Ring6Disc5PosAdcCounts(0), - theMEBeam6Ring6Disc6PosAdcCounts(0), - theMEBeam6Ring6Disc7PosAdcCounts(0), - theMEBeam6Ring6Disc8PosAdcCounts(0), - theMEBeam6Ring6Disc9PosAdcCounts(0), + theMEBeam6Ring6Disc1PosAdcCounts(nullptr), + theMEBeam6Ring6Disc2PosAdcCounts(nullptr), + theMEBeam6Ring6Disc3PosAdcCounts(nullptr), + theMEBeam6Ring6Disc4PosAdcCounts(nullptr), + theMEBeam6Ring6Disc5PosAdcCounts(nullptr), + theMEBeam6Ring6Disc6PosAdcCounts(nullptr), + theMEBeam6Ring6Disc7PosAdcCounts(nullptr), + theMEBeam6Ring6Disc8PosAdcCounts(nullptr), + theMEBeam6Ring6Disc9PosAdcCounts(nullptr), // Adc counts for Beam 7 in Ring 6 - theMEBeam7Ring6Disc1PosAdcCounts(0), - theMEBeam7Ring6Disc2PosAdcCounts(0), - theMEBeam7Ring6Disc3PosAdcCounts(0), - theMEBeam7Ring6Disc4PosAdcCounts(0), - theMEBeam7Ring6Disc5PosAdcCounts(0), - theMEBeam7Ring6Disc6PosAdcCounts(0), - theMEBeam7Ring6Disc7PosAdcCounts(0), - theMEBeam7Ring6Disc8PosAdcCounts(0), - theMEBeam7Ring6Disc9PosAdcCounts(0), + theMEBeam7Ring6Disc1PosAdcCounts(nullptr), + theMEBeam7Ring6Disc2PosAdcCounts(nullptr), + theMEBeam7Ring6Disc3PosAdcCounts(nullptr), + theMEBeam7Ring6Disc4PosAdcCounts(nullptr), + theMEBeam7Ring6Disc5PosAdcCounts(nullptr), + theMEBeam7Ring6Disc6PosAdcCounts(nullptr), + theMEBeam7Ring6Disc7PosAdcCounts(nullptr), + theMEBeam7Ring6Disc8PosAdcCounts(nullptr), + theMEBeam7Ring6Disc9PosAdcCounts(nullptr), /* Laser Beams in TEC- */ // Adc counts for Beam 0 in Ring 4 - theMEBeam0Ring4Disc1NegAdcCounts(0), - theMEBeam0Ring4Disc2NegAdcCounts(0), - theMEBeam0Ring4Disc3NegAdcCounts(0), - theMEBeam0Ring4Disc4NegAdcCounts(0), - theMEBeam0Ring4Disc5NegAdcCounts(0), - theMEBeam0Ring4Disc6NegAdcCounts(0), - theMEBeam0Ring4Disc7NegAdcCounts(0), - theMEBeam0Ring4Disc8NegAdcCounts(0), - theMEBeam0Ring4Disc9NegAdcCounts(0), + theMEBeam0Ring4Disc1NegAdcCounts(nullptr), + theMEBeam0Ring4Disc2NegAdcCounts(nullptr), + theMEBeam0Ring4Disc3NegAdcCounts(nullptr), + theMEBeam0Ring4Disc4NegAdcCounts(nullptr), + theMEBeam0Ring4Disc5NegAdcCounts(nullptr), + theMEBeam0Ring4Disc6NegAdcCounts(nullptr), + theMEBeam0Ring4Disc7NegAdcCounts(nullptr), + theMEBeam0Ring4Disc8NegAdcCounts(nullptr), + theMEBeam0Ring4Disc9NegAdcCounts(nullptr), // Adc counts for Beam 1 in Ring 4 - theMEBeam1Ring4Disc1NegAdcCounts(0), - theMEBeam1Ring4Disc2NegAdcCounts(0), - theMEBeam1Ring4Disc3NegAdcCounts(0), - theMEBeam1Ring4Disc4NegAdcCounts(0), - theMEBeam1Ring4Disc5NegAdcCounts(0), - theMEBeam1Ring4Disc6NegAdcCounts(0), - theMEBeam1Ring4Disc7NegAdcCounts(0), - theMEBeam1Ring4Disc8NegAdcCounts(0), - theMEBeam1Ring4Disc9NegAdcCounts(0), + theMEBeam1Ring4Disc1NegAdcCounts(nullptr), + theMEBeam1Ring4Disc2NegAdcCounts(nullptr), + theMEBeam1Ring4Disc3NegAdcCounts(nullptr), + theMEBeam1Ring4Disc4NegAdcCounts(nullptr), + theMEBeam1Ring4Disc5NegAdcCounts(nullptr), + theMEBeam1Ring4Disc6NegAdcCounts(nullptr), + theMEBeam1Ring4Disc7NegAdcCounts(nullptr), + theMEBeam1Ring4Disc8NegAdcCounts(nullptr), + theMEBeam1Ring4Disc9NegAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam1Ring4Disc1NegTEC2TECAdcCounts(0), - theMEBeam1Ring4Disc2NegTEC2TECAdcCounts(0), - theMEBeam1Ring4Disc3NegTEC2TECAdcCounts(0), - theMEBeam1Ring4Disc4NegTEC2TECAdcCounts(0), - theMEBeam1Ring4Disc5NegTEC2TECAdcCounts(0), + theMEBeam1Ring4Disc1NegTEC2TECAdcCounts(nullptr), + theMEBeam1Ring4Disc2NegTEC2TECAdcCounts(nullptr), + theMEBeam1Ring4Disc3NegTEC2TECAdcCounts(nullptr), + theMEBeam1Ring4Disc4NegTEC2TECAdcCounts(nullptr), + theMEBeam1Ring4Disc5NegTEC2TECAdcCounts(nullptr), // Adc counts for Beam 2 in Ring 4 - theMEBeam2Ring4Disc1NegAdcCounts(0), - theMEBeam2Ring4Disc2NegAdcCounts(0), - theMEBeam2Ring4Disc3NegAdcCounts(0), - theMEBeam2Ring4Disc4NegAdcCounts(0), - theMEBeam2Ring4Disc5NegAdcCounts(0), - theMEBeam2Ring4Disc6NegAdcCounts(0), - theMEBeam2Ring4Disc7NegAdcCounts(0), - theMEBeam2Ring4Disc8NegAdcCounts(0), - theMEBeam2Ring4Disc9NegAdcCounts(0), + theMEBeam2Ring4Disc1NegAdcCounts(nullptr), + theMEBeam2Ring4Disc2NegAdcCounts(nullptr), + theMEBeam2Ring4Disc3NegAdcCounts(nullptr), + theMEBeam2Ring4Disc4NegAdcCounts(nullptr), + theMEBeam2Ring4Disc5NegAdcCounts(nullptr), + theMEBeam2Ring4Disc6NegAdcCounts(nullptr), + theMEBeam2Ring4Disc7NegAdcCounts(nullptr), + theMEBeam2Ring4Disc8NegAdcCounts(nullptr), + theMEBeam2Ring4Disc9NegAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam2Ring4Disc1NegTEC2TECAdcCounts(0), - theMEBeam2Ring4Disc2NegTEC2TECAdcCounts(0), - theMEBeam2Ring4Disc3NegTEC2TECAdcCounts(0), - theMEBeam2Ring4Disc4NegTEC2TECAdcCounts(0), - theMEBeam2Ring4Disc5NegTEC2TECAdcCounts(0), + theMEBeam2Ring4Disc1NegTEC2TECAdcCounts(nullptr), + theMEBeam2Ring4Disc2NegTEC2TECAdcCounts(nullptr), + theMEBeam2Ring4Disc3NegTEC2TECAdcCounts(nullptr), + theMEBeam2Ring4Disc4NegTEC2TECAdcCounts(nullptr), + theMEBeam2Ring4Disc5NegTEC2TECAdcCounts(nullptr), // Adc counts for Beam 3 in Ring 4 - theMEBeam3Ring4Disc1NegAdcCounts(0), - theMEBeam3Ring4Disc2NegAdcCounts(0), - theMEBeam3Ring4Disc3NegAdcCounts(0), - theMEBeam3Ring4Disc4NegAdcCounts(0), - theMEBeam3Ring4Disc5NegAdcCounts(0), - theMEBeam3Ring4Disc6NegAdcCounts(0), - theMEBeam3Ring4Disc7NegAdcCounts(0), - theMEBeam3Ring4Disc8NegAdcCounts(0), - theMEBeam3Ring4Disc9NegAdcCounts(0), + theMEBeam3Ring4Disc1NegAdcCounts(nullptr), + theMEBeam3Ring4Disc2NegAdcCounts(nullptr), + theMEBeam3Ring4Disc3NegAdcCounts(nullptr), + theMEBeam3Ring4Disc4NegAdcCounts(nullptr), + theMEBeam3Ring4Disc5NegAdcCounts(nullptr), + theMEBeam3Ring4Disc6NegAdcCounts(nullptr), + theMEBeam3Ring4Disc7NegAdcCounts(nullptr), + theMEBeam3Ring4Disc8NegAdcCounts(nullptr), + theMEBeam3Ring4Disc9NegAdcCounts(nullptr), // Adc counts for Beam 4 in Ring 4 - theMEBeam4Ring4Disc1NegAdcCounts(0), - theMEBeam4Ring4Disc2NegAdcCounts(0), - theMEBeam4Ring4Disc3NegAdcCounts(0), - theMEBeam4Ring4Disc4NegAdcCounts(0), - theMEBeam4Ring4Disc5NegAdcCounts(0), - theMEBeam4Ring4Disc6NegAdcCounts(0), - theMEBeam4Ring4Disc7NegAdcCounts(0), - theMEBeam4Ring4Disc8NegAdcCounts(0), - theMEBeam4Ring4Disc9NegAdcCounts(0), + theMEBeam4Ring4Disc1NegAdcCounts(nullptr), + theMEBeam4Ring4Disc2NegAdcCounts(nullptr), + theMEBeam4Ring4Disc3NegAdcCounts(nullptr), + theMEBeam4Ring4Disc4NegAdcCounts(nullptr), + theMEBeam4Ring4Disc5NegAdcCounts(nullptr), + theMEBeam4Ring4Disc6NegAdcCounts(nullptr), + theMEBeam4Ring4Disc7NegAdcCounts(nullptr), + theMEBeam4Ring4Disc8NegAdcCounts(nullptr), + theMEBeam4Ring4Disc9NegAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam4Ring4Disc1NegTEC2TECAdcCounts(0), - theMEBeam4Ring4Disc2NegTEC2TECAdcCounts(0), - theMEBeam4Ring4Disc3NegTEC2TECAdcCounts(0), - theMEBeam4Ring4Disc4NegTEC2TECAdcCounts(0), - theMEBeam4Ring4Disc5NegTEC2TECAdcCounts(0), + theMEBeam4Ring4Disc1NegTEC2TECAdcCounts(nullptr), + theMEBeam4Ring4Disc2NegTEC2TECAdcCounts(nullptr), + theMEBeam4Ring4Disc3NegTEC2TECAdcCounts(nullptr), + theMEBeam4Ring4Disc4NegTEC2TECAdcCounts(nullptr), + theMEBeam4Ring4Disc5NegTEC2TECAdcCounts(nullptr), // Adc counts for Beam 5 in Ring 4 - theMEBeam5Ring4Disc1NegAdcCounts(0), - theMEBeam5Ring4Disc2NegAdcCounts(0), - theMEBeam5Ring4Disc3NegAdcCounts(0), - theMEBeam5Ring4Disc4NegAdcCounts(0), - theMEBeam5Ring4Disc5NegAdcCounts(0), - theMEBeam5Ring4Disc6NegAdcCounts(0), - theMEBeam5Ring4Disc7NegAdcCounts(0), - theMEBeam5Ring4Disc8NegAdcCounts(0), - theMEBeam5Ring4Disc9NegAdcCounts(0), + theMEBeam5Ring4Disc1NegAdcCounts(nullptr), + theMEBeam5Ring4Disc2NegAdcCounts(nullptr), + theMEBeam5Ring4Disc3NegAdcCounts(nullptr), + theMEBeam5Ring4Disc4NegAdcCounts(nullptr), + theMEBeam5Ring4Disc5NegAdcCounts(nullptr), + theMEBeam5Ring4Disc6NegAdcCounts(nullptr), + theMEBeam5Ring4Disc7NegAdcCounts(nullptr), + theMEBeam5Ring4Disc8NegAdcCounts(nullptr), + theMEBeam5Ring4Disc9NegAdcCounts(nullptr), // Adc counts for Beam 6 in Ring 4 - theMEBeam6Ring4Disc1NegAdcCounts(0), - theMEBeam6Ring4Disc2NegAdcCounts(0), - theMEBeam6Ring4Disc3NegAdcCounts(0), - theMEBeam6Ring4Disc4NegAdcCounts(0), - theMEBeam6Ring4Disc5NegAdcCounts(0), - theMEBeam6Ring4Disc6NegAdcCounts(0), - theMEBeam6Ring4Disc7NegAdcCounts(0), - theMEBeam6Ring4Disc8NegAdcCounts(0), - theMEBeam6Ring4Disc9NegAdcCounts(0), + theMEBeam6Ring4Disc1NegAdcCounts(nullptr), + theMEBeam6Ring4Disc2NegAdcCounts(nullptr), + theMEBeam6Ring4Disc3NegAdcCounts(nullptr), + theMEBeam6Ring4Disc4NegAdcCounts(nullptr), + theMEBeam6Ring4Disc5NegAdcCounts(nullptr), + theMEBeam6Ring4Disc6NegAdcCounts(nullptr), + theMEBeam6Ring4Disc7NegAdcCounts(nullptr), + theMEBeam6Ring4Disc8NegAdcCounts(nullptr), + theMEBeam6Ring4Disc9NegAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam6Ring4Disc1NegTEC2TECAdcCounts(0), - theMEBeam6Ring4Disc2NegTEC2TECAdcCounts(0), - theMEBeam6Ring4Disc3NegTEC2TECAdcCounts(0), - theMEBeam6Ring4Disc4NegTEC2TECAdcCounts(0), - theMEBeam6Ring4Disc5NegTEC2TECAdcCounts(0), + theMEBeam6Ring4Disc1NegTEC2TECAdcCounts(nullptr), + theMEBeam6Ring4Disc2NegTEC2TECAdcCounts(nullptr), + theMEBeam6Ring4Disc3NegTEC2TECAdcCounts(nullptr), + theMEBeam6Ring4Disc4NegTEC2TECAdcCounts(nullptr), + theMEBeam6Ring4Disc5NegTEC2TECAdcCounts(nullptr), // Adc counts for Beam 7 in Ring 4 - theMEBeam7Ring4Disc1NegAdcCounts(0), - theMEBeam7Ring4Disc2NegAdcCounts(0), - theMEBeam7Ring4Disc3NegAdcCounts(0), - theMEBeam7Ring4Disc4NegAdcCounts(0), - theMEBeam7Ring4Disc5NegAdcCounts(0), - theMEBeam7Ring4Disc6NegAdcCounts(0), - theMEBeam7Ring4Disc7NegAdcCounts(0), - theMEBeam7Ring4Disc8NegAdcCounts(0), - theMEBeam7Ring4Disc9NegAdcCounts(0), + theMEBeam7Ring4Disc1NegAdcCounts(nullptr), + theMEBeam7Ring4Disc2NegAdcCounts(nullptr), + theMEBeam7Ring4Disc3NegAdcCounts(nullptr), + theMEBeam7Ring4Disc4NegAdcCounts(nullptr), + theMEBeam7Ring4Disc5NegAdcCounts(nullptr), + theMEBeam7Ring4Disc6NegAdcCounts(nullptr), + theMEBeam7Ring4Disc7NegAdcCounts(nullptr), + theMEBeam7Ring4Disc8NegAdcCounts(nullptr), + theMEBeam7Ring4Disc9NegAdcCounts(nullptr), // plots for TEC2TEC - theMEBeam7Ring4Disc1NegTEC2TECAdcCounts(0), - theMEBeam7Ring4Disc2NegTEC2TECAdcCounts(0), - theMEBeam7Ring4Disc3NegTEC2TECAdcCounts(0), - theMEBeam7Ring4Disc4NegTEC2TECAdcCounts(0), - theMEBeam7Ring4Disc5NegTEC2TECAdcCounts(0), + theMEBeam7Ring4Disc1NegTEC2TECAdcCounts(nullptr), + theMEBeam7Ring4Disc2NegTEC2TECAdcCounts(nullptr), + theMEBeam7Ring4Disc3NegTEC2TECAdcCounts(nullptr), + theMEBeam7Ring4Disc4NegTEC2TECAdcCounts(nullptr), + theMEBeam7Ring4Disc5NegTEC2TECAdcCounts(nullptr), // Adc counts for Beam 0 in Ring 6 - theMEBeam0Ring6Disc1NegAdcCounts(0), - theMEBeam0Ring6Disc2NegAdcCounts(0), - theMEBeam0Ring6Disc3NegAdcCounts(0), - theMEBeam0Ring6Disc4NegAdcCounts(0), - theMEBeam0Ring6Disc5NegAdcCounts(0), - theMEBeam0Ring6Disc6NegAdcCounts(0), - theMEBeam0Ring6Disc7NegAdcCounts(0), - theMEBeam0Ring6Disc8NegAdcCounts(0), - theMEBeam0Ring6Disc9NegAdcCounts(0), + theMEBeam0Ring6Disc1NegAdcCounts(nullptr), + theMEBeam0Ring6Disc2NegAdcCounts(nullptr), + theMEBeam0Ring6Disc3NegAdcCounts(nullptr), + theMEBeam0Ring6Disc4NegAdcCounts(nullptr), + theMEBeam0Ring6Disc5NegAdcCounts(nullptr), + theMEBeam0Ring6Disc6NegAdcCounts(nullptr), + theMEBeam0Ring6Disc7NegAdcCounts(nullptr), + theMEBeam0Ring6Disc8NegAdcCounts(nullptr), + theMEBeam0Ring6Disc9NegAdcCounts(nullptr), // Adc counts for Beam 1 in Ring 6 - theMEBeam1Ring6Disc1NegAdcCounts(0), - theMEBeam1Ring6Disc2NegAdcCounts(0), - theMEBeam1Ring6Disc3NegAdcCounts(0), - theMEBeam1Ring6Disc4NegAdcCounts(0), - theMEBeam1Ring6Disc5NegAdcCounts(0), - theMEBeam1Ring6Disc6NegAdcCounts(0), - theMEBeam1Ring6Disc7NegAdcCounts(0), - theMEBeam1Ring6Disc8NegAdcCounts(0), - theMEBeam1Ring6Disc9NegAdcCounts(0), + theMEBeam1Ring6Disc1NegAdcCounts(nullptr), + theMEBeam1Ring6Disc2NegAdcCounts(nullptr), + theMEBeam1Ring6Disc3NegAdcCounts(nullptr), + theMEBeam1Ring6Disc4NegAdcCounts(nullptr), + theMEBeam1Ring6Disc5NegAdcCounts(nullptr), + theMEBeam1Ring6Disc6NegAdcCounts(nullptr), + theMEBeam1Ring6Disc7NegAdcCounts(nullptr), + theMEBeam1Ring6Disc8NegAdcCounts(nullptr), + theMEBeam1Ring6Disc9NegAdcCounts(nullptr), // Adc counts for Beam 2 in Ring 6 - theMEBeam2Ring6Disc1NegAdcCounts(0), - theMEBeam2Ring6Disc2NegAdcCounts(0), - theMEBeam2Ring6Disc3NegAdcCounts(0), - theMEBeam2Ring6Disc4NegAdcCounts(0), - theMEBeam2Ring6Disc5NegAdcCounts(0), - theMEBeam2Ring6Disc6NegAdcCounts(0), - theMEBeam2Ring6Disc7NegAdcCounts(0), - theMEBeam2Ring6Disc8NegAdcCounts(0), - theMEBeam2Ring6Disc9NegAdcCounts(0), + theMEBeam2Ring6Disc1NegAdcCounts(nullptr), + theMEBeam2Ring6Disc2NegAdcCounts(nullptr), + theMEBeam2Ring6Disc3NegAdcCounts(nullptr), + theMEBeam2Ring6Disc4NegAdcCounts(nullptr), + theMEBeam2Ring6Disc5NegAdcCounts(nullptr), + theMEBeam2Ring6Disc6NegAdcCounts(nullptr), + theMEBeam2Ring6Disc7NegAdcCounts(nullptr), + theMEBeam2Ring6Disc8NegAdcCounts(nullptr), + theMEBeam2Ring6Disc9NegAdcCounts(nullptr), // Adc counts for Beam 3 in Ring 6 - theMEBeam3Ring6Disc1NegAdcCounts(0), - theMEBeam3Ring6Disc2NegAdcCounts(0), - theMEBeam3Ring6Disc3NegAdcCounts(0), - theMEBeam3Ring6Disc4NegAdcCounts(0), - theMEBeam3Ring6Disc5NegAdcCounts(0), - theMEBeam3Ring6Disc6NegAdcCounts(0), - theMEBeam3Ring6Disc7NegAdcCounts(0), - theMEBeam3Ring6Disc8NegAdcCounts(0), - theMEBeam3Ring6Disc9NegAdcCounts(0), + theMEBeam3Ring6Disc1NegAdcCounts(nullptr), + theMEBeam3Ring6Disc2NegAdcCounts(nullptr), + theMEBeam3Ring6Disc3NegAdcCounts(nullptr), + theMEBeam3Ring6Disc4NegAdcCounts(nullptr), + theMEBeam3Ring6Disc5NegAdcCounts(nullptr), + theMEBeam3Ring6Disc6NegAdcCounts(nullptr), + theMEBeam3Ring6Disc7NegAdcCounts(nullptr), + theMEBeam3Ring6Disc8NegAdcCounts(nullptr), + theMEBeam3Ring6Disc9NegAdcCounts(nullptr), // Adc counts for Beam 4 in Ring 6 - theMEBeam4Ring6Disc1NegAdcCounts(0), - theMEBeam4Ring6Disc2NegAdcCounts(0), - theMEBeam4Ring6Disc3NegAdcCounts(0), - theMEBeam4Ring6Disc4NegAdcCounts(0), - theMEBeam4Ring6Disc5NegAdcCounts(0), - theMEBeam4Ring6Disc6NegAdcCounts(0), - theMEBeam4Ring6Disc7NegAdcCounts(0), - theMEBeam4Ring6Disc8NegAdcCounts(0), - theMEBeam4Ring6Disc9NegAdcCounts(0), + theMEBeam4Ring6Disc1NegAdcCounts(nullptr), + theMEBeam4Ring6Disc2NegAdcCounts(nullptr), + theMEBeam4Ring6Disc3NegAdcCounts(nullptr), + theMEBeam4Ring6Disc4NegAdcCounts(nullptr), + theMEBeam4Ring6Disc5NegAdcCounts(nullptr), + theMEBeam4Ring6Disc6NegAdcCounts(nullptr), + theMEBeam4Ring6Disc7NegAdcCounts(nullptr), + theMEBeam4Ring6Disc8NegAdcCounts(nullptr), + theMEBeam4Ring6Disc9NegAdcCounts(nullptr), // Adc counts for Beam 5 in Ring 6 - theMEBeam5Ring6Disc1NegAdcCounts(0), - theMEBeam5Ring6Disc2NegAdcCounts(0), - theMEBeam5Ring6Disc3NegAdcCounts(0), - theMEBeam5Ring6Disc4NegAdcCounts(0), - theMEBeam5Ring6Disc5NegAdcCounts(0), - theMEBeam5Ring6Disc6NegAdcCounts(0), - theMEBeam5Ring6Disc7NegAdcCounts(0), - theMEBeam5Ring6Disc8NegAdcCounts(0), - theMEBeam5Ring6Disc9NegAdcCounts(0), + theMEBeam5Ring6Disc1NegAdcCounts(nullptr), + theMEBeam5Ring6Disc2NegAdcCounts(nullptr), + theMEBeam5Ring6Disc3NegAdcCounts(nullptr), + theMEBeam5Ring6Disc4NegAdcCounts(nullptr), + theMEBeam5Ring6Disc5NegAdcCounts(nullptr), + theMEBeam5Ring6Disc6NegAdcCounts(nullptr), + theMEBeam5Ring6Disc7NegAdcCounts(nullptr), + theMEBeam5Ring6Disc8NegAdcCounts(nullptr), + theMEBeam5Ring6Disc9NegAdcCounts(nullptr), // Adc counts for Beam 6 in Ring 6 - theMEBeam6Ring6Disc1NegAdcCounts(0), - theMEBeam6Ring6Disc2NegAdcCounts(0), - theMEBeam6Ring6Disc3NegAdcCounts(0), - theMEBeam6Ring6Disc4NegAdcCounts(0), - theMEBeam6Ring6Disc5NegAdcCounts(0), - theMEBeam6Ring6Disc6NegAdcCounts(0), - theMEBeam6Ring6Disc7NegAdcCounts(0), - theMEBeam6Ring6Disc8NegAdcCounts(0), - theMEBeam6Ring6Disc9NegAdcCounts(0), + theMEBeam6Ring6Disc1NegAdcCounts(nullptr), + theMEBeam6Ring6Disc2NegAdcCounts(nullptr), + theMEBeam6Ring6Disc3NegAdcCounts(nullptr), + theMEBeam6Ring6Disc4NegAdcCounts(nullptr), + theMEBeam6Ring6Disc5NegAdcCounts(nullptr), + theMEBeam6Ring6Disc6NegAdcCounts(nullptr), + theMEBeam6Ring6Disc7NegAdcCounts(nullptr), + theMEBeam6Ring6Disc8NegAdcCounts(nullptr), + theMEBeam6Ring6Disc9NegAdcCounts(nullptr), // Adc counts for Beam 7 in Ring 6 - theMEBeam7Ring6Disc1NegAdcCounts(0), - theMEBeam7Ring6Disc2NegAdcCounts(0), - theMEBeam7Ring6Disc3NegAdcCounts(0), - theMEBeam7Ring6Disc4NegAdcCounts(0), - theMEBeam7Ring6Disc5NegAdcCounts(0), - theMEBeam7Ring6Disc6NegAdcCounts(0), - theMEBeam7Ring6Disc7NegAdcCounts(0), - theMEBeam7Ring6Disc8NegAdcCounts(0), - theMEBeam7Ring6Disc9NegAdcCounts(0), + theMEBeam7Ring6Disc1NegAdcCounts(nullptr), + theMEBeam7Ring6Disc2NegAdcCounts(nullptr), + theMEBeam7Ring6Disc3NegAdcCounts(nullptr), + theMEBeam7Ring6Disc4NegAdcCounts(nullptr), + theMEBeam7Ring6Disc5NegAdcCounts(nullptr), + theMEBeam7Ring6Disc6NegAdcCounts(nullptr), + theMEBeam7Ring6Disc7NegAdcCounts(nullptr), + theMEBeam7Ring6Disc8NegAdcCounts(nullptr), + theMEBeam7Ring6Disc9NegAdcCounts(nullptr), // TOB Beams // Adc counts for Beam 0 - theMEBeam0TOBPosition1AdcCounts(0), - theMEBeam0TOBPosition2AdcCounts(0), - theMEBeam0TOBPosition3AdcCounts(0), - theMEBeam0TOBPosition4AdcCounts(0), - theMEBeam0TOBPosition5AdcCounts(0), - theMEBeam0TOBPosition6AdcCounts(0), + theMEBeam0TOBPosition1AdcCounts(nullptr), + theMEBeam0TOBPosition2AdcCounts(nullptr), + theMEBeam0TOBPosition3AdcCounts(nullptr), + theMEBeam0TOBPosition4AdcCounts(nullptr), + theMEBeam0TOBPosition5AdcCounts(nullptr), + theMEBeam0TOBPosition6AdcCounts(nullptr), // Adc counts for Beam 1 - theMEBeam1TOBPosition1AdcCounts(0), - theMEBeam1TOBPosition2AdcCounts(0), - theMEBeam1TOBPosition3AdcCounts(0), - theMEBeam1TOBPosition4AdcCounts(0), - theMEBeam1TOBPosition5AdcCounts(0), - theMEBeam1TOBPosition6AdcCounts(0), + theMEBeam1TOBPosition1AdcCounts(nullptr), + theMEBeam1TOBPosition2AdcCounts(nullptr), + theMEBeam1TOBPosition3AdcCounts(nullptr), + theMEBeam1TOBPosition4AdcCounts(nullptr), + theMEBeam1TOBPosition5AdcCounts(nullptr), + theMEBeam1TOBPosition6AdcCounts(nullptr), // Adc counts for Beam 2 - theMEBeam2TOBPosition1AdcCounts(0), - theMEBeam2TOBPosition2AdcCounts(0), - theMEBeam2TOBPosition3AdcCounts(0), - theMEBeam2TOBPosition4AdcCounts(0), - theMEBeam2TOBPosition5AdcCounts(0), - theMEBeam2TOBPosition6AdcCounts(0), + theMEBeam2TOBPosition1AdcCounts(nullptr), + theMEBeam2TOBPosition2AdcCounts(nullptr), + theMEBeam2TOBPosition3AdcCounts(nullptr), + theMEBeam2TOBPosition4AdcCounts(nullptr), + theMEBeam2TOBPosition5AdcCounts(nullptr), + theMEBeam2TOBPosition6AdcCounts(nullptr), // Adc counts for Beam 3 - theMEBeam3TOBPosition1AdcCounts(0), - theMEBeam3TOBPosition2AdcCounts(0), - theMEBeam3TOBPosition3AdcCounts(0), - theMEBeam3TOBPosition4AdcCounts(0), - theMEBeam3TOBPosition5AdcCounts(0), - theMEBeam3TOBPosition6AdcCounts(0), + theMEBeam3TOBPosition1AdcCounts(nullptr), + theMEBeam3TOBPosition2AdcCounts(nullptr), + theMEBeam3TOBPosition3AdcCounts(nullptr), + theMEBeam3TOBPosition4AdcCounts(nullptr), + theMEBeam3TOBPosition5AdcCounts(nullptr), + theMEBeam3TOBPosition6AdcCounts(nullptr), // Adc counts for Beam 4 - theMEBeam4TOBPosition1AdcCounts(0), - theMEBeam4TOBPosition2AdcCounts(0), - theMEBeam4TOBPosition3AdcCounts(0), - theMEBeam4TOBPosition4AdcCounts(0), - theMEBeam4TOBPosition5AdcCounts(0), - theMEBeam4TOBPosition6AdcCounts(0), + theMEBeam4TOBPosition1AdcCounts(nullptr), + theMEBeam4TOBPosition2AdcCounts(nullptr), + theMEBeam4TOBPosition3AdcCounts(nullptr), + theMEBeam4TOBPosition4AdcCounts(nullptr), + theMEBeam4TOBPosition5AdcCounts(nullptr), + theMEBeam4TOBPosition6AdcCounts(nullptr), // Adc counts for Beam 5 - theMEBeam5TOBPosition1AdcCounts(0), - theMEBeam5TOBPosition2AdcCounts(0), - theMEBeam5TOBPosition3AdcCounts(0), - theMEBeam5TOBPosition4AdcCounts(0), - theMEBeam5TOBPosition5AdcCounts(0), - theMEBeam5TOBPosition6AdcCounts(0), + theMEBeam5TOBPosition1AdcCounts(nullptr), + theMEBeam5TOBPosition2AdcCounts(nullptr), + theMEBeam5TOBPosition3AdcCounts(nullptr), + theMEBeam5TOBPosition4AdcCounts(nullptr), + theMEBeam5TOBPosition5AdcCounts(nullptr), + theMEBeam5TOBPosition6AdcCounts(nullptr), // Adc counts for Beam 6 - theMEBeam6TOBPosition1AdcCounts(0), - theMEBeam6TOBPosition2AdcCounts(0), - theMEBeam6TOBPosition3AdcCounts(0), - theMEBeam6TOBPosition4AdcCounts(0), - theMEBeam6TOBPosition5AdcCounts(0), - theMEBeam6TOBPosition6AdcCounts(0), + theMEBeam6TOBPosition1AdcCounts(nullptr), + theMEBeam6TOBPosition2AdcCounts(nullptr), + theMEBeam6TOBPosition3AdcCounts(nullptr), + theMEBeam6TOBPosition4AdcCounts(nullptr), + theMEBeam6TOBPosition5AdcCounts(nullptr), + theMEBeam6TOBPosition6AdcCounts(nullptr), // Adc counts for Beam 7 - theMEBeam7TOBPosition1AdcCounts(0), - theMEBeam7TOBPosition2AdcCounts(0), - theMEBeam7TOBPosition3AdcCounts(0), - theMEBeam7TOBPosition4AdcCounts(0), - theMEBeam7TOBPosition5AdcCounts(0), - theMEBeam7TOBPosition6AdcCounts(0), + theMEBeam7TOBPosition1AdcCounts(nullptr), + theMEBeam7TOBPosition2AdcCounts(nullptr), + theMEBeam7TOBPosition3AdcCounts(nullptr), + theMEBeam7TOBPosition4AdcCounts(nullptr), + theMEBeam7TOBPosition5AdcCounts(nullptr), + theMEBeam7TOBPosition6AdcCounts(nullptr), // TIB Beams // Adc counts for Beam 0 - theMEBeam0TIBPosition1AdcCounts(0), - theMEBeam0TIBPosition2AdcCounts(0), - theMEBeam0TIBPosition3AdcCounts(0), - theMEBeam0TIBPosition4AdcCounts(0), - theMEBeam0TIBPosition5AdcCounts(0), - theMEBeam0TIBPosition6AdcCounts(0), + theMEBeam0TIBPosition1AdcCounts(nullptr), + theMEBeam0TIBPosition2AdcCounts(nullptr), + theMEBeam0TIBPosition3AdcCounts(nullptr), + theMEBeam0TIBPosition4AdcCounts(nullptr), + theMEBeam0TIBPosition5AdcCounts(nullptr), + theMEBeam0TIBPosition6AdcCounts(nullptr), // Adc counts for Beam 1 - theMEBeam1TIBPosition1AdcCounts(0), - theMEBeam1TIBPosition2AdcCounts(0), - theMEBeam1TIBPosition3AdcCounts(0), - theMEBeam1TIBPosition4AdcCounts(0), - theMEBeam1TIBPosition5AdcCounts(0), - theMEBeam1TIBPosition6AdcCounts(0), + theMEBeam1TIBPosition1AdcCounts(nullptr), + theMEBeam1TIBPosition2AdcCounts(nullptr), + theMEBeam1TIBPosition3AdcCounts(nullptr), + theMEBeam1TIBPosition4AdcCounts(nullptr), + theMEBeam1TIBPosition5AdcCounts(nullptr), + theMEBeam1TIBPosition6AdcCounts(nullptr), // Adc counts for Beam 2 - theMEBeam2TIBPosition1AdcCounts(0), - theMEBeam2TIBPosition2AdcCounts(0), - theMEBeam2TIBPosition3AdcCounts(0), - theMEBeam2TIBPosition4AdcCounts(0), - theMEBeam2TIBPosition5AdcCounts(0), - theMEBeam2TIBPosition6AdcCounts(0), + theMEBeam2TIBPosition1AdcCounts(nullptr), + theMEBeam2TIBPosition2AdcCounts(nullptr), + theMEBeam2TIBPosition3AdcCounts(nullptr), + theMEBeam2TIBPosition4AdcCounts(nullptr), + theMEBeam2TIBPosition5AdcCounts(nullptr), + theMEBeam2TIBPosition6AdcCounts(nullptr), // Adc counts for Beam 3 - theMEBeam3TIBPosition1AdcCounts(0), - theMEBeam3TIBPosition2AdcCounts(0), - theMEBeam3TIBPosition3AdcCounts(0), - theMEBeam3TIBPosition4AdcCounts(0), - theMEBeam3TIBPosition5AdcCounts(0), - theMEBeam3TIBPosition6AdcCounts(0), + theMEBeam3TIBPosition1AdcCounts(nullptr), + theMEBeam3TIBPosition2AdcCounts(nullptr), + theMEBeam3TIBPosition3AdcCounts(nullptr), + theMEBeam3TIBPosition4AdcCounts(nullptr), + theMEBeam3TIBPosition5AdcCounts(nullptr), + theMEBeam3TIBPosition6AdcCounts(nullptr), // Adc counts for Beam 4 - theMEBeam4TIBPosition1AdcCounts(0), - theMEBeam4TIBPosition2AdcCounts(0), - theMEBeam4TIBPosition3AdcCounts(0), - theMEBeam4TIBPosition4AdcCounts(0), - theMEBeam4TIBPosition5AdcCounts(0), - theMEBeam4TIBPosition6AdcCounts(0), + theMEBeam4TIBPosition1AdcCounts(nullptr), + theMEBeam4TIBPosition2AdcCounts(nullptr), + theMEBeam4TIBPosition3AdcCounts(nullptr), + theMEBeam4TIBPosition4AdcCounts(nullptr), + theMEBeam4TIBPosition5AdcCounts(nullptr), + theMEBeam4TIBPosition6AdcCounts(nullptr), // Adc counts for Beam 5 - theMEBeam5TIBPosition1AdcCounts(0), - theMEBeam5TIBPosition2AdcCounts(0), - theMEBeam5TIBPosition3AdcCounts(0), - theMEBeam5TIBPosition4AdcCounts(0), - theMEBeam5TIBPosition5AdcCounts(0), - theMEBeam5TIBPosition6AdcCounts(0), + theMEBeam5TIBPosition1AdcCounts(nullptr), + theMEBeam5TIBPosition2AdcCounts(nullptr), + theMEBeam5TIBPosition3AdcCounts(nullptr), + theMEBeam5TIBPosition4AdcCounts(nullptr), + theMEBeam5TIBPosition5AdcCounts(nullptr), + theMEBeam5TIBPosition6AdcCounts(nullptr), // Adc counts for Beam 6 - theMEBeam6TIBPosition1AdcCounts(0), - theMEBeam6TIBPosition2AdcCounts(0), - theMEBeam6TIBPosition3AdcCounts(0), - theMEBeam6TIBPosition4AdcCounts(0), - theMEBeam6TIBPosition5AdcCounts(0), - theMEBeam6TIBPosition6AdcCounts(0), + theMEBeam6TIBPosition1AdcCounts(nullptr), + theMEBeam6TIBPosition2AdcCounts(nullptr), + theMEBeam6TIBPosition3AdcCounts(nullptr), + theMEBeam6TIBPosition4AdcCounts(nullptr), + theMEBeam6TIBPosition5AdcCounts(nullptr), + theMEBeam6TIBPosition6AdcCounts(nullptr), // Adc counts for Beam 7 - theMEBeam7TIBPosition1AdcCounts(0), - theMEBeam7TIBPosition2AdcCounts(0), - theMEBeam7TIBPosition3AdcCounts(0), - theMEBeam7TIBPosition4AdcCounts(0), - theMEBeam7TIBPosition5AdcCounts(0), - theMEBeam7TIBPosition6AdcCounts(0) + theMEBeam7TIBPosition1AdcCounts(nullptr), + theMEBeam7TIBPosition2AdcCounts(nullptr), + theMEBeam7TIBPosition3AdcCounts(nullptr), + theMEBeam7TIBPosition4AdcCounts(nullptr), + theMEBeam7TIBPosition5AdcCounts(nullptr), + theMEBeam7TIBPosition6AdcCounts(nullptr) { // load the configuration from the ParameterSet edm::LogInfo("LaserDQM") << "===========================================================" @@ -553,7 +553,7 @@ void LaserDQM::beginJob() void LaserDQM::endJob(void) { - theDaqMonitorBEI->save(theDQMFileName.c_str()); + theDaqMonitorBEI->save(theDQMFileName); } void LaserDQM::fillAdcCounts(MonitorElement * theMonitor, diff --git a/Alignment/LaserDQM/plugins/LaserDQM.h b/Alignment/LaserDQM/plugins/LaserDQM.h index 1e34508d96e49..9cc064d52ac2e 100644 --- a/Alignment/LaserDQM/plugins/LaserDQM.h +++ b/Alignment/LaserDQM/plugins/LaserDQM.h @@ -27,14 +27,14 @@ class LaserDQM : public edm::EDAnalyzer /// constructor explicit LaserDQM(edm::ParameterSet const& theConf); /// destructor - ~LaserDQM(); + ~LaserDQM() override; /// this method will do the user analysis - virtual void analyze(edm::Event const& theEvent, edm::EventSetup const& theSetup); + void analyze(edm::Event const& theEvent, edm::EventSetup const& theSetup) override; /// begin job - virtual void beginJob(); + void beginJob() override; /// end job - virtual void endJob(void); + void endJob(void) override; private: /// fill adc counts from the laser beam into a monitor histogram diff --git a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariables.h b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariables.h index 66c9261b96532..2cee1d6236870 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariables.h +++ b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariables.h @@ -24,9 +24,9 @@ class MillePedeVariables : public AlignmentUserVariables { /** constructor */ MillePedeVariables(unsigned int nParams, unsigned int label, const std::string& name); /** destructor */ - virtual ~MillePedeVariables() = default; + ~MillePedeVariables() override = default; /** clone method (using copy constructor) */ - virtual MillePedeVariables* clone() const { return new MillePedeVariables(*this);} + MillePedeVariables* clone() const override { return new MillePedeVariables(*this);} /// set default values for all data concerning nParam (false if nParam out of range) bool setAllDefault(unsigned int nParam); diff --git a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariablesIORoot.h b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariablesIORoot.h index 9d94d886fc694..d5b0cd44d0cf4 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariablesIORoot.h +++ b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeVariablesIORoot.h @@ -31,7 +31,7 @@ class MillePedeVariablesIORoot : public AlignmentIORootBase, public AlignmentUse { public: MillePedeVariablesIORoot(); - virtual ~MillePedeVariablesIORoot() {} + ~MillePedeVariablesIORoot() override {} /** write user variables */ void writeMillePedeVariables(const std::vector &alivec, const char *filename, @@ -44,23 +44,23 @@ class MillePedeVariablesIORoot : public AlignmentIORootBase, public AlignmentUse protected: /** write MillePedeVariables attached to AlignmentParameters of one Alignable */ - virtual int writeOne(Alignable *ali); // inherited from AlignmentUserVariablesIO + int writeOne(Alignable *ali) override; // inherited from AlignmentUserVariablesIO /** read MillePedeVariables belonging to one Alignable */ - virtual AlignmentUserVariables* readOne(Alignable *ali, int &ierr); + AlignmentUserVariables* readOne(Alignable *ali, int &ierr) override; // previous inherited from AlignmentUserVariablesIO /** open IO */ // inherited from AlignmentUserVariablesIO - virtual int open(const char *filename, int iteration, bool writemode) + int open(const char *filename, int iteration, bool writemode) override { return this->openRoot(filename, iteration, writemode);} /** close IO */ - virtual int close() {return this->closeRoot();} // inherited from AlignmentUserVariablesIO + int close() override {return this->closeRoot();} // inherited from AlignmentUserVariablesIO /// create root branches - virtual void createBranches(); // inherited from AlignmentIORootBase + void createBranches() override; // inherited from AlignmentIORootBase /// set root branche addresses - virtual void setBranchAddresses(); // inherited from AlignmentIORootBase + void setBranchAddresses() override; // inherited from AlignmentIORootBase private: // variables for ROOT tree diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc index 548638e95caee..4b274e787c5d5 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc @@ -216,12 +216,12 @@ void MillePedeAlignmentAlgorithm::initialize(const edm::EventSetup &setup, RunRangeSelectionVPSet); std::string labelerPlugin = "PedeLabeler"; - if (RunRangeSelectionVPSet.size()>0) { + if (!RunRangeSelectionVPSet.empty()) { labelerPlugin = "RunRangeDependentPedeLabeler"; if (pedeLabelerCfg.exists("plugin")) { std::string labelerPluginCfg = pedeLabelerCfg.getParameter("plugin"); if ((labelerPluginCfg!="PedeLabeler" && labelerPluginCfg!="RunRangeDependentPedeLabeler") || - pedeLabelerCfg.getUntrackedParameter("parameterInstances").size()>0) { + !pedeLabelerCfg.getUntrackedParameter("parameterInstances").empty()) { throw cms::Exception("BadConfig") << "MillePedeAlignmentAlgorithm::initialize" << "both RunRangeSelection and generic labeler specified in config file. " @@ -294,7 +294,7 @@ void MillePedeAlignmentAlgorithm::initialize(const edm::EventSetup &setup, << "modes running mille."; } const std::string moniFile(theConfig.getUntrackedParameter("monitorFile")); - if (moniFile.size()) theMonitor = std::make_unique(tTopo, (theDir + moniFile).c_str()); + if (!moniFile.empty()) theMonitor = std::make_unique(tTopo, (theDir + moniFile).c_str()); // Get trajectory factory. In case nothing found, FrameWork will throw... const edm::ParameterSet fctCfg(theConfig.getParameter("TrajectoryFactory")); @@ -454,7 +454,7 @@ void MillePedeAlignmentAlgorithm::terminate() std::vector MillePedeAlignmentAlgorithm::getExistingFormattedFiles(const std::vector& plainFiles, const std::string& theDir) { std::vector files; for (const auto& plainFile: plainFiles) { - std::string theInputFileName = plainFile; + const std::string& theInputFileName = plainFile; int theNumber = 0; while (true) { // Create a formatted version of the filename, with growing numbers @@ -482,7 +482,7 @@ std::vector MillePedeAlignmentAlgorithm::getExistingFormattedFiles( } } // warning if unformatted (-> theNumber stays at 0) does not exist - if (theNumber == 0 && (files.size() == 0 || files.back() != plainFile)) { + if (theNumber == 0 && (files.empty() || files.back() != plainFile)) { edm::LogWarning("Alignment") << "The input file '" << plainFile << "' does not exist."; } @@ -539,7 +539,7 @@ MillePedeAlignmentAlgorithm::addReferenceTrajectory(const edm::EventSetup &setup // GblTrajectory? - if (refTrajPtr->gblInput().size() > 0) { + if (!refTrajPtr->gblInput().empty()) { // by construction: number of GblPoints == number of recHits or == zero !!! unsigned int iHit = 0; unsigned int numPointsWithMeas = 0; @@ -622,7 +622,7 @@ MillePedeAlignmentAlgorithm::addHitCount(const std::vector // Loop on all hit information in the input arrays and count valid y-hits: unsigned int nHitY = 0; for (unsigned int iHit = 0; iHit < validHitVecY.size(); ++iHit) { - Alignable *ali = (parVec[iHit] ? parVec[iHit]->alignable() : 0); + Alignable *ali = (parVec[iHit] ? parVec[iHit]->alignable() : nullptr); // Loop upwards on hierarchy of alignables to add hits to all levels // that are currently aligned. If only a non-selected alignable was hit, // (i.e. flagXY == 0 in addReferenceTrajectory(..)), there is no loop at all... @@ -773,7 +773,7 @@ int MillePedeAlignmentAlgorithm::addMeasurementData(const edm::EventSetup &setup unsigned int iHit, AlignmentParameters *¶ms) { - params = 0; + params = nullptr; theFloatBufferX.clear(); theFloatBufferY.clear(); theIntBuffer.clear(); @@ -810,7 +810,7 @@ int MillePedeAlignmentAlgorithm::addGlobalData(const edm::EventSetup &setup, con const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iHit, GblPoint &gblPoint) { - AlignmentParameters* params = 0; + AlignmentParameters* params = nullptr; std::vector theDoubleBufferX, theDoubleBufferY; theDoubleBufferX.clear(); theDoubleBufferY.clear(); @@ -1081,7 +1081,7 @@ bool MillePedeAlignmentAlgorithm::readFromPede(const edm::ParameterSet &mprespse if (okRead && allEmpty) { if (numMatch) { // as many alignables with result as trying to align edm::LogInfo("Alignment") << "@SUB=MillePedeAlignmentAlgorithm::readFromPede" << out.str(); - } else if (alis.size()) { // dead module do not get hits and no pede result + } else if (!alis.empty()) { // dead module do not get hits and no pede result edm::LogWarning("Alignment") << "@SUB=MillePedeAlignmentAlgorithm::readFromPede" << out.str(); } else { // serious problem: no result read - and not all modules can be dead... edm::LogError("Alignment") << "@SUB=MillePedeAlignmentAlgorithm::readFromPede" << out.str(); @@ -1263,7 +1263,7 @@ bool MillePedeAlignmentAlgorithm::addHits(const std::vector &alis, iAli != alis.end() && iUser != mpVars.end(); ++iAli, ++iUser) { MillePedeVariables *mpVarNew = dynamic_cast(*iUser); AlignmentParameters *ps = (*iAli)->alignmentParameters(); - MillePedeVariables *mpVarOld = (ps ? dynamic_cast(ps->userVariables()) : 0); + MillePedeVariables *mpVarOld = (ps ? dynamic_cast(ps->userVariables()) : nullptr); if (!mpVarNew || !mpVarOld || mpVarOld->size() != mpVarNew->size()) { allOk = false; continue; // FIXME error etc.? @@ -1602,7 +1602,7 @@ void MillePedeAlignmentAlgorithm::addLasBeam(const EventInfo &eventInfo, const TkFittedLasBeam &lasBeam, const std::vector &tsoses) { - AlignmentParameters *dummyPtr = 0; // for globalDerivativesHierarchy() + AlignmentParameters *dummyPtr = nullptr; // for globalDerivativesHierarchy() std::vector lasLocalDerivsX; // buffer for local derivatives const unsigned int beamLabel = thePedeLabels->lasBeamLabel(lasBeam.getBeamId());// for global par diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h index b4e36784626f0..8c122c41e0acd 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h @@ -57,36 +57,36 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase MillePedeAlignmentAlgorithm(const edm::ParameterSet &cfg); /// Destructor - virtual ~MillePedeAlignmentAlgorithm(); + ~MillePedeAlignmentAlgorithm() override; /// Called at beginning of job - virtual void initialize(const edm::EventSetup &setup, + void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store) override; /// Returns whether MP supports calibrations - virtual bool supportsCalibrations() override; + bool supportsCalibrations() override; /// Pass integrated calibrations to Millepede (they are not owned by Millepede!) - virtual bool addCalibrations(const std::vector &iCals) override; + bool addCalibrations(const std::vector &iCals) override; virtual bool storeThresholds(const int & nRecords,const AlignPCLThresholds::threshold_map & thresholdMap); /// Called at end of job - virtual void terminate(const edm::EventSetup& iSetup) override; + void terminate(const edm::EventSetup& iSetup) override; /// Called at end of job - virtual void terminate() override; + void terminate() override; /// Returns whether MP should process events in the current configuration - virtual bool processesEvents() override; + bool processesEvents() override; /// Returns whether MP produced results to be stored - virtual bool storeAlignments() override; + bool storeAlignments() override; /// Run the algorithm on trajectories and tracks - virtual void run(const edm::EventSetup &setup, const EventInfo &eventInfo) override; + void run(const edm::EventSetup &setup, const EventInfo &eventInfo) override; /// called at begin of run - virtual void beginRun(const edm::Run& run, + void beginRun(const edm::Run& run, const edm::EventSetup& setup, bool changed) override; @@ -97,13 +97,13 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase const edm::EventSetup&); //override; // This one will be called since it matches the interface of the base class - virtual void endRun(const EndRunInfo &runInfo, const edm::EventSetup &setup) override; + void endRun(const EndRunInfo &runInfo, const edm::EventSetup &setup) override; /// called at begin of luminosity block (resets Mille binary in mille mode) - virtual void beginLuminosityBlock(const edm::EventSetup&) override; + void beginLuminosityBlock(const edm::EventSetup&) override; /// called at end of luminosity block - virtual void endLuminosityBlock(const edm::EventSetup&) override; + void endLuminosityBlock(const edm::EventSetup&) override; /* virtual void beginLuminosityBlock(const edm::EventSetup &setup) {} */ @@ -111,7 +111,7 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase /// Called in order to pass parameters to alignables for a specific run /// range in case the algorithm supports run range dependent alignment. - virtual bool setParametersForRunRange(const RunRange &runrange) override; + bool setParametersForRunRange(const RunRange &runrange) override; private: enum MeasurementDirection {kLocalX = 0, kLocalY}; diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h index d2d082b478bb8..5059d863e4295 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h @@ -47,14 +47,14 @@ class MillePedeDQMModule : public DQMEDHarvester { public: //==================================================================== MillePedeDQMModule(const edm::ParameterSet&); - virtual ~MillePedeDQMModule(); + ~MillePedeDQMModule() override; - virtual void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; + void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //========================= PRIVATE METHODS ================================== private: //=================================================================== - virtual void beginRun(const edm::Run&, const edm::EventSetup&) override; + void beginRun(const edm::Run&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker&); diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileConverter.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileConverter.h index 9613820ca2393..26226e8245305 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileConverter.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileConverter.h @@ -29,13 +29,13 @@ class MillePedeFileConverter : public edm::one::EDProducer { public: explicit MillePedeFileConverter(const edm::ParameterSet&); - ~MillePedeFileConverter(); + ~MillePedeFileConverter() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void produce(edm::Event&, const edm::EventSetup&) override {} - virtual void endLuminosityBlockProduce(edm::LuminosityBlock&, - const edm::EventSetup&) override final; + void produce(edm::Event&, const edm::EventSetup&) override {} + void endLuminosityBlockProduce(edm::LuminosityBlock&, + const edm::EventSetup&) final; const std::string inputDir_; const std::string inputFileName_; diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.cc b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.cc index 5b50f5c530a69..b0a77324727d9 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.cc @@ -72,7 +72,7 @@ void MillePedeFileExtractor::writeGzipped(const FileBlob& blob, // - zlib and gzip compression differ -> get uncompressed blob first auto uncompressedBlob = blob.getUncompressedBlob(); gzFile fp = gzopen(fileName.c_str(), "wb"); - if (fp == NULL) { + if (fp == nullptr) { edm::LogError("MillePedeFileActions") << "Problem while opening gzipped file '" << fileName << "'."; } diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.h index 405f6d0983c6e..39d9f5b942f84 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.h @@ -32,15 +32,15 @@ class MillePedeFileExtractor : public edm::one::EDAnalyzer { public: explicit MillePedeFileExtractor(const edm::ParameterSet&); - ~MillePedeFileExtractor(); + ~MillePedeFileExtractor() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - virtual void beginLuminosityBlock(const edm::LuminosityBlock&, + void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override {} - virtual void endLuminosityBlock(const edm::LuminosityBlock&, + void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override {} + void analyze(const edm::Event&, const edm::EventSetup&) override {} bool enoughBinaries() { return (nBinaries_ >= maxNumberOfBinaries_) && hasBinaryNumberLimit(); } diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MomentumDependentPedeLabeler.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/MomentumDependentPedeLabeler.h index 6e7193025c6d5..8daa2b21ad8ff 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MomentumDependentPedeLabeler.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MomentumDependentPedeLabeler.h @@ -30,43 +30,43 @@ class MomentumDependentPedeLabeler : public PedeLabelerBase MomentumDependentPedeLabeler(const PedeLabelerBase::TopLevelAlignables& alignables, const edm::ParameterSet& config); /** non-virtual destructor: do not inherit from this class **/ - ~MomentumDependentPedeLabeler(); + ~MomentumDependentPedeLabeler() override; /// uniqueId of Alignable, 0 if alignable not known /// between this ID and the next there is enough 'space' to add parameter /// numbers 0...nPar-1 to make unique IDs for the labels of active parameters - unsigned int alignableLabel(Alignable *alignable) const; + unsigned int alignableLabel(Alignable *alignable) const override; /// uniqueId of Alignable for a given parameter index and instance, /// 0 if alignable not known between this ID and the next there is enough /// 'space' to add parameter numbers 0...nPar-1 to make unique IDs for the /// labels of active parameters unsigned int alignableLabelFromParamAndInstance(Alignable *alignable, unsigned int param, - unsigned int instance) const; - unsigned int lasBeamLabel(unsigned int lasBeamId) const; + unsigned int instance) const override; + unsigned int lasBeamLabel(unsigned int lasBeamId) const override; /// returns the label for a given alignable parameter number combination - unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const; + unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override; /// returns the label for a given alignable parameter number combination /// in case the parameters are split into v unsigned int parameterLabel(Alignable *alignable, unsigned int parNum, const AlignmentAlgorithmBase::EventInfo &eventInfo, - const TrajectoryStateOnSurface &tsos) const; + const TrajectoryStateOnSurface &tsos) const override; /// returns true if the alignable has parameters that are split into various bins - bool hasSplitParameters(Alignable *alignable) const; + bool hasSplitParameters(Alignable *alignable) const override; /// returns the number of instances for a given parameter - unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const; - unsigned int maxNumberOfParameterInstances() const { return theMaxNumberOfParameterInstances; } + unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const override; + unsigned int maxNumberOfParameterInstances() const override { return theMaxNumberOfParameterInstances; } /// parameter number, 0 <= .. < theMaxNumParam, belonging to unique parameter label - unsigned int paramNumFromLabel(unsigned int paramLabel) const; + unsigned int paramNumFromLabel(unsigned int paramLabel) const override; /// alignable label from parameter label (works also for alignable label...) - unsigned int alignableLabelFromLabel(unsigned int label) const; + unsigned int alignableLabelFromLabel(unsigned int label) const override; /// Alignable from alignable or parameter label, /// null if no alignable (but error only if not las beam, either!) - Alignable* alignableFromLabel(unsigned int label) const; + Alignable* alignableFromLabel(unsigned int label) const override; /// las beam id from las beam or parameter label /// zero and error if not a valid las beam label - unsigned int lasBeamIdFromLabel(unsigned int label) const; + unsigned int lasBeamIdFromLabel(unsigned int label) const override; private: typedef std::map AlignableToIdMap; diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/PedeLabeler.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/PedeLabeler.h index 001cbbcd441c9..e9181d7b45f26 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/PedeLabeler.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/PedeLabeler.h @@ -30,37 +30,37 @@ class PedeLabeler : public PedeLabelerBase PedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables, const edm::ParameterSet &config); /// destructor - ~PedeLabeler(); + ~PedeLabeler() override; /// uniqueId of Alignable, 0 if alignable not known /// between this ID and the next there is enough 'space' to add parameter /// numbers 0...nPar-1 to make unique IDs for the labels of active parameters - unsigned int alignableLabel(Alignable *alignable) const; + unsigned int alignableLabel(Alignable *alignable) const override; unsigned int alignableLabelFromParamAndInstance(Alignable *alignable, unsigned int param, - unsigned int instance) const; - unsigned int lasBeamLabel(unsigned int lasBeamId) const; - unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const; + unsigned int instance) const override; + unsigned int lasBeamLabel(unsigned int lasBeamId) const override; + unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override; unsigned int parameterLabel(Alignable *alignable, unsigned int parNum, const AlignmentAlgorithmBase::EventInfo &eventInfo, - const TrajectoryStateOnSurface &tsos) const { + const TrajectoryStateOnSurface &tsos) const override { return parameterLabel(alignableLabel(alignable), parNum); } - bool hasSplitParameters(Alignable *alignable) const { return false; } + bool hasSplitParameters(Alignable *alignable) const override { return false; } unsigned int numberOfParameterInstances(Alignable *alignable, - int param=-1) const { return 1; } - unsigned int maxNumberOfParameterInstances() const { return 1; } + int param=-1) const override { return 1; } + unsigned int maxNumberOfParameterInstances() const override { return 1; } /// parameter number, 0 <= .. < theMaxNumParam, belonging to unique parameter label - unsigned int paramNumFromLabel(unsigned int paramLabel) const; + unsigned int paramNumFromLabel(unsigned int paramLabel) const override; /// alignable label from parameter label (works also for alignable label...) - unsigned int alignableLabelFromLabel(unsigned int label) const; + unsigned int alignableLabelFromLabel(unsigned int label) const override; /// Alignable from alignable or parameter label, /// null if no alignable (but error only if not las beam, either!) - Alignable* alignableFromLabel(unsigned int label) const; + Alignable* alignableFromLabel(unsigned int label) const override; /// las beam id from las beam or parameter label /// zero and error if not a valid las beam label - unsigned int lasBeamIdFromLabel(unsigned int label) const; + unsigned int lasBeamIdFromLabel(unsigned int label) const override; private: typedef std::map AlignableToIdMap; diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/RunRangeDependentPedeLabeler.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/RunRangeDependentPedeLabeler.h index 134e72cfe4109..2031ca901c914 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/RunRangeDependentPedeLabeler.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/RunRangeDependentPedeLabeler.h @@ -36,44 +36,44 @@ class RunRangeDependentPedeLabeler : public PedeLabelerBase RunRangeDependentPedeLabeler(const PedeLabelerBase::TopLevelAlignables& alignables, const edm::ParameterSet& config); /** non-virtual destructor: do not inherit from this class **/ - ~RunRangeDependentPedeLabeler(); + ~RunRangeDependentPedeLabeler() override; /// uniqueId of Alignable, 0 if alignable not known /// between this ID and the next there is enough 'space' to add parameter /// numbers 0...nPar-1 to make unique IDs for the labels of active parameters - unsigned int alignableLabel(Alignable *alignable) const; + unsigned int alignableLabel(Alignable *alignable) const override; /// uniqueId of Alignable for a given parameter index and instance, /// 0 if alignable not known between this ID and the next there is enough /// 'space' to add parameter numbers 0...nPar-1 to make unique IDs for the /// labels of active parameters unsigned int alignableLabelFromParamAndInstance(Alignable *alignable, unsigned int param, - unsigned int instance) const; - unsigned int lasBeamLabel(unsigned int lasBeamId) const; + unsigned int instance) const override; + unsigned int lasBeamLabel(unsigned int lasBeamId) const override; /// returns the label for a given alignable parameter number combination - unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const; + unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override; /// returns the label for a given alignable parameter number combination /// in case the parameters are split into v unsigned int parameterLabel(Alignable *alignable, unsigned int parNum, const AlignmentAlgorithmBase::EventInfo &eventInfo, - const TrajectoryStateOnSurface &tsos) const; + const TrajectoryStateOnSurface &tsos) const override; /// returns true if the alignable has parameters that are split into various bins - bool hasSplitParameters(Alignable *alignable) const; + bool hasSplitParameters(Alignable *alignable) const override; /// returns the number of instances for a given parameter - unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const; - unsigned int maxNumberOfParameterInstances() const { return theMaxNumberOfParameterInstances; } + unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const override; + unsigned int maxNumberOfParameterInstances() const override { return theMaxNumberOfParameterInstances; } /// parameter number, 0 <= .. < theMaxNumParam, belonging to unique parameter label - unsigned int paramNumFromLabel(unsigned int paramLabel) const; + unsigned int paramNumFromLabel(unsigned int paramLabel) const override; /// alignable label from parameter label (works also for alignable label...) - unsigned int alignableLabelFromLabel(unsigned int label) const; + unsigned int alignableLabelFromLabel(unsigned int label) const override; /// Alignable from alignable or parameter label, /// null if no alignable (but error only if not las beam, either!) - Alignable* alignableFromLabel(unsigned int label) const; + Alignable* alignableFromLabel(unsigned int label) const override; /// las beam id from las beam or parameter label /// zero and error if not a valid las beam label - unsigned int lasBeamIdFromLabel(unsigned int label) const; - const RunRange& runRangeFromLabel(unsigned int label) const; + unsigned int lasBeamIdFromLabel(unsigned int label) const override; + const RunRange& runRangeFromLabel(unsigned int label) const override; private: diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/ZMuMuMassConstraintParameterFinder.cc b/Alignment/MillePedeAlignmentAlgorithm/plugins/ZMuMuMassConstraintParameterFinder.cc index e4d655d1fbb5b..d2e8cf53744b0 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/ZMuMuMassConstraintParameterFinder.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/ZMuMuMassConstraintParameterFinder.cc @@ -50,7 +50,7 @@ class ZMuMuMassConstraintParameterFinder : public edm::one::EDAnalyzer { public: explicit ZMuMuMassConstraintParameterFinder(const edm::ParameterSet&); - ~ZMuMuMassConstraintParameterFinder(); + ~ZMuMuMassConstraintParameterFinder() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); @@ -75,7 +75,7 @@ class ZMuMuMassConstraintParameterFinder : const double maxMassPair_; }; - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; // ----------member data --------------------------- edm::EDGetTokenT genParticlesToken_; diff --git a/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeVariablesIORoot.cc b/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeVariablesIORoot.cc index 96d1cf2770210..8b83f2085180d 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeVariablesIORoot.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeVariablesIORoot.cc @@ -132,7 +132,7 @@ AlignmentUserVariables* MillePedeVariablesIORoot::readOne(Alignable *ali, int &i << "No index for id/type = (" << ali->id() << "/" << ali->alignableObjectId() << ") found!"; ierr = 1; - return 0; + return nullptr; } MillePedeVariables *mpVar = new MillePedeVariables(myNumPar, myLabel, myName); diff --git a/Alignment/MillePedeAlignmentAlgorithm/src/PedeLabelerBase.cc b/Alignment/MillePedeAlignmentAlgorithm/src/PedeLabelerBase.cc index e61e17a13a8e2..6b9682f40927c 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/src/PedeLabelerBase.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/src/PedeLabelerBase.cc @@ -53,7 +53,7 @@ PedeLabelerBase::calibrationParamFromLabel(unsigned int label) const } // Return that nothing fits: - return std::pair(0,0); + return std::pair(nullptr,0); } //___________________________________________________________________________ diff --git a/Alignment/MillePedeAlignmentAlgorithm/src/PedeReader.cc b/Alignment/MillePedeAlignmentAlgorithm/src/PedeReader.cc index 6c01f07f5697a..55ec93373a618 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/src/PedeReader.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/src/PedeReader.cc @@ -166,7 +166,7 @@ Alignable* PedeReader::setParameter(unsigned int paramLabel, if (alignable) { AlignmentParameters *params = this->checkAliParams(alignable, setUserVars); MillePedeVariables *userParams = // static cast ensured by previous checkAliParams - (setUserVars ? static_cast(params->userVariables()) : 0); + (setUserVars ? static_cast(params->userVariables()) : nullptr); // if (userParams && userParams->label() != myLabels.alignableLabelFromLabel(paramLabel)) { if (userParams && userParams->label() != myLabels.alignableLabel(alignable)) { edm::LogError("Alignment") << "@SUB=PedeReader::setParameter" diff --git a/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteererWeakModeConstraints.cc b/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteererWeakModeConstraints.cc index bc164c057b71b..c6ebd7d168687 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteererWeakModeConstraints.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteererWeakModeConstraints.cc @@ -118,7 +118,7 @@ PedeSteererWeakModeConstraints::PedeSteererWeakModeConstraints(AlignableTracker //of provided parameter is right. auto sysdeformation = this->verifyDeformationName(name,coefficients); - if(deadmodules_.size() == 0) { //fill the list of dead modules only once + if(deadmodules_.empty()) { //fill the list of dead modules only once edm::LogInfo("Alignment") << "@SUB=PedeSteererWeakModeConstraints" << "Load list of dead modules (size = " << dm.size()<< ")."; for(const auto& it: dm) deadmodules_.push_back(it); @@ -243,7 +243,7 @@ PedeSteererWeakModeConstraints::createAlignablesDataStructure() } } - if( usedinconstraint.size() > 0){ + if( !usedinconstraint.empty()){ iC.HLSsubdets_.push_back(std::make_pair(iHLS.first, usedinconstraint)); } else { edm::LogInfo("Alignment") << "@SUB=PedeSteererWeakModeConstraints" @@ -254,7 +254,7 @@ PedeSteererWeakModeConstraints::createAlignablesDataStructure() << "," << iHLS.first->globalPosition().z() << ") selected. Skip constraint"; } - if(aliDaughts.size() == 0) { + if(aliDaughts.empty()) { edm::LogWarning("Alignment") << "@SUB=PedeSteererWeakModeConstraints::createAlignablesDataStructure" << "No active sub-alignables found for " << alignableObjectId_.idToString(iHLS.first->alignableObjectId()) @@ -476,7 +476,7 @@ PedeSteererWeakModeConstraints::writeOutput(const std::list 0) { + if(!output.empty()) { const double constr = sum_xi_x0 * it.coefficients_.front(); (*ofile) << "Constraint " << std::scientific << constr << std::endl; for(const auto& ioutput: output) { @@ -804,7 +804,7 @@ PedeSteererWeakModeConstraints::verifyDeformationName(const std::string &name, << " variable have to be provided for the " << name << " constraint."; } - if(coefficients.size() == 0) { + if(coefficients.empty()) { throw cms::Exception("BadConfig") << "[PedeSteererWeakModeConstraints]" << " At least one coefficient has to be specified."; } diff --git a/Alignment/MuonAlignment/interface/AlignableCSCEndcap.h b/Alignment/MuonAlignment/interface/AlignableCSCEndcap.h index 89215906cbf50..31b4f71cb4745 100644 --- a/Alignment/MuonAlignment/interface/AlignableCSCEndcap.h +++ b/Alignment/MuonAlignment/interface/AlignableCSCEndcap.h @@ -34,9 +34,9 @@ class AlignableCSCEndcap : public AlignableComposite AlignableCSCEndcap( const std::vector& cscStations ); - ~AlignableCSCEndcap(); + ~AlignableCSCEndcap() override; - virtual std::vector components() const + std::vector components() const override { std::vector result; @@ -58,13 +58,13 @@ class AlignableCSCEndcap : public AlignableComposite friend std::ostream& operator << ( std::ostream&, const AlignableCSCEndcap& ); /// Recursive printout of the muon End Cap structure - void dump( void ) const; + void dump( void ) const override; // Get alignments sorted by DetId - Alignments* alignments() const; + Alignments* alignments() const override; // Get alignment errors sorted by DetId - AlignmentErrorsExtended* alignmentErrors() const; + AlignmentErrorsExtended* alignmentErrors() const override; diff --git a/Alignment/MuonAlignment/interface/AlignableCSCRing.h b/Alignment/MuonAlignment/interface/AlignableCSCRing.h index a83c1f0dbf84a..5f5e71058906a 100644 --- a/Alignment/MuonAlignment/interface/AlignableCSCRing.h +++ b/Alignment/MuonAlignment/interface/AlignableCSCRing.h @@ -34,9 +34,9 @@ class AlignableCSCRing : public AlignableComposite AlignableCSCRing( const std::vector& cscChambers ); - ~AlignableCSCRing(); + ~AlignableCSCRing() override; - virtual std::vector components() const + std::vector components() const override { std::vector result; @@ -60,7 +60,7 @@ class AlignableCSCRing : public AlignableComposite friend std::ostream& operator << ( std::ostream&, const AlignableCSCRing& ); /// Recursive printout of the muon CSC Ring structure - void dump( void ) const; + void dump( void ) const override; diff --git a/Alignment/MuonAlignment/interface/AlignableCSCStation.h b/Alignment/MuonAlignment/interface/AlignableCSCStation.h index 1f5ba517517c1..0a650e1237946 100644 --- a/Alignment/MuonAlignment/interface/AlignableCSCStation.h +++ b/Alignment/MuonAlignment/interface/AlignableCSCStation.h @@ -34,9 +34,9 @@ class AlignableCSCStation : public AlignableComposite AlignableCSCStation( const std::vector& cscRings ); - ~AlignableCSCStation(); + ~AlignableCSCStation() override; - virtual std::vector components() const + std::vector components() const override { std::vector result; @@ -60,7 +60,7 @@ class AlignableCSCStation : public AlignableComposite friend std::ostream& operator << ( std::ostream&, const AlignableCSCStation& ); /// Recursive printout of the muon CSC Station structure - void dump( void ) const; + void dump( void ) const override; diff --git a/Alignment/MuonAlignment/interface/AlignableDTBarrel.h b/Alignment/MuonAlignment/interface/AlignableDTBarrel.h index e2cf1ec0a48cd..8969505d25f20 100644 --- a/Alignment/MuonAlignment/interface/AlignableDTBarrel.h +++ b/Alignment/MuonAlignment/interface/AlignableDTBarrel.h @@ -34,9 +34,9 @@ class AlignableDTBarrel : public AlignableComposite AlignableDTBarrel( const std::vector& dtWheels ); - ~AlignableDTBarrel(); + ~AlignableDTBarrel() override; - virtual std::vector components() const + std::vector components() const override { std::vector result; @@ -58,14 +58,14 @@ class AlignableDTBarrel : public AlignableComposite friend std::ostream& operator << ( std::ostream&, const AlignableDTBarrel& ); /// Recursive printout of the muon Barrel structure - void dump( void ) const; + void dump( void ) const override; // Get alignments sorted by DetId - Alignments* alignments() const; + Alignments* alignments() const override; // Get alignment errors sorted by DetId - AlignmentErrorsExtended* alignmentErrors() const; + AlignmentErrorsExtended* alignmentErrors() const override; diff --git a/Alignment/MuonAlignment/interface/AlignableDTStation.h b/Alignment/MuonAlignment/interface/AlignableDTStation.h index f8da61419f5d7..6fecf803d58ec 100644 --- a/Alignment/MuonAlignment/interface/AlignableDTStation.h +++ b/Alignment/MuonAlignment/interface/AlignableDTStation.h @@ -33,9 +33,9 @@ class AlignableDTStation : public AlignableComposite AlignableDTStation( const std::vector& dtChambers ); - ~AlignableDTStation(); + ~AlignableDTStation() override; - virtual std::vector components() const + std::vector components() const override { std::vector result; @@ -57,7 +57,7 @@ class AlignableDTStation : public AlignableComposite friend std::ostream& operator << ( std::ostream&, const AlignableDTStation& ); /// Recursive printout of the muon DT Station structure - void dump( void ) const; + void dump( void ) const override; private: diff --git a/Alignment/MuonAlignment/interface/AlignableDTWheel.h b/Alignment/MuonAlignment/interface/AlignableDTWheel.h index 151c9b5505957..dec30c1ea216b 100644 --- a/Alignment/MuonAlignment/interface/AlignableDTWheel.h +++ b/Alignment/MuonAlignment/interface/AlignableDTWheel.h @@ -33,9 +33,9 @@ class AlignableDTWheel : public AlignableComposite AlignableDTWheel( const std::vector& dtStations ); - ~AlignableDTWheel(); + ~AlignableDTWheel() override; - virtual std::vector components() const + std::vector components() const override { std::vector result; @@ -57,7 +57,7 @@ class AlignableDTWheel : public AlignableComposite friend std::ostream& operator << ( std::ostream&, const AlignableDTWheel& ); /// Recursive printout of the muon DT wheel structure - void dump( void ) const; + void dump( void ) const override; private: diff --git a/Alignment/MuonAlignment/interface/AlignableMuon.h b/Alignment/MuonAlignment/interface/AlignableMuon.h index 32a407dbd1a3a..b4bc3deb39d2a 100644 --- a/Alignment/MuonAlignment/interface/AlignableMuon.h +++ b/Alignment/MuonAlignment/interface/AlignableMuon.h @@ -43,17 +43,17 @@ class AlignableMuon: public AlignableComposite AlignableMuon( const DTGeometry* , const CSCGeometry* ); /// Destructor - ~AlignableMuon(); + ~AlignableMuon() override; /// Updater using DTGeometry and CSCGeometry. /// The given geometries have to match the current ones. void update(const DTGeometry* , const CSCGeometry*); /// Return all components - virtual align::Alignables components() const { return theMuonComponents; } + align::Alignables components() const override { return theMuonComponents; } /// Alignable tracker has no mother - virtual Alignable* mother() { return 0; } + virtual Alignable* mother() { return nullptr; } /// Methods to return specific of components align::Alignables DTLayers(); @@ -96,10 +96,10 @@ class AlignableMuon: public AlignableComposite AlignableSurface computeSurface(); /// Get alignments sorted by DetId - Alignments* alignments() const; + Alignments* alignments() const override; /// Get alignment errors sorted by DetId - AlignmentErrorsExtended* alignmentErrors() const; + AlignmentErrorsExtended* alignmentErrors() const override; diff --git a/Alignment/MuonAlignment/interface/MuonAlignmentInputDB.h b/Alignment/MuonAlignment/interface/MuonAlignmentInputDB.h index 48ab44d260cb9..938ee5320b30d 100644 --- a/Alignment/MuonAlignment/interface/MuonAlignmentInputDB.h +++ b/Alignment/MuonAlignment/interface/MuonAlignmentInputDB.h @@ -30,7 +30,7 @@ class MuonAlignmentInputDB: public MuonAlignmentInputMethod { public: MuonAlignmentInputDB(); MuonAlignmentInputDB(std::string dtLabel, std::string cscLabel, bool getAPEs); - virtual ~MuonAlignmentInputDB(); + ~MuonAlignmentInputDB() override; // ---------- const member functions --------------------- @@ -38,7 +38,7 @@ class MuonAlignmentInputDB: public MuonAlignmentInputMethod { // ---------- member functions --------------------------- - virtual AlignableMuon *newAlignableMuon(const edm::EventSetup &iSetup) const; + AlignableMuon *newAlignableMuon(const edm::EventSetup &iSetup) const override; private: MuonAlignmentInputDB(const MuonAlignmentInputDB&); // stop default diff --git a/Alignment/MuonAlignment/interface/MuonAlignmentInputMethod.h b/Alignment/MuonAlignment/interface/MuonAlignmentInputMethod.h index e3419265c8b11..9fed1045c07f3 100644 --- a/Alignment/MuonAlignment/interface/MuonAlignmentInputMethod.h +++ b/Alignment/MuonAlignment/interface/MuonAlignmentInputMethod.h @@ -49,9 +49,9 @@ class MuonAlignmentInputMethod { std::shared_ptr idealCSCGeometry(const edm::EventSetup &iSetup) const; private: - MuonAlignmentInputMethod(const MuonAlignmentInputMethod&); // stop default + MuonAlignmentInputMethod(const MuonAlignmentInputMethod&) = delete; // stop default - const MuonAlignmentInputMethod& operator=(const MuonAlignmentInputMethod&); // stop default + const MuonAlignmentInputMethod& operator=(const MuonAlignmentInputMethod&) = delete; // stop default // ---------- member data -------------------------------- }; diff --git a/Alignment/MuonAlignment/interface/MuonAlignmentInputSurveyDB.h b/Alignment/MuonAlignment/interface/MuonAlignmentInputSurveyDB.h index 66108b9457da3..dc5147db619dc 100644 --- a/Alignment/MuonAlignment/interface/MuonAlignmentInputSurveyDB.h +++ b/Alignment/MuonAlignment/interface/MuonAlignmentInputSurveyDB.h @@ -32,7 +32,7 @@ class MuonAlignmentInputSurveyDB: public MuonAlignmentInputMethod { public: MuonAlignmentInputSurveyDB(); MuonAlignmentInputSurveyDB(std::string dtLabel, std::string cscLabel); - virtual ~MuonAlignmentInputSurveyDB(); + ~MuonAlignmentInputSurveyDB() override; // ---------- const member functions --------------------- @@ -40,12 +40,12 @@ class MuonAlignmentInputSurveyDB: public MuonAlignmentInputMethod { // ---------- member functions --------------------------- - virtual AlignableMuon *newAlignableMuon(const edm::EventSetup &iSetup) const; + AlignableMuon *newAlignableMuon(const edm::EventSetup &iSetup) const override; private: - MuonAlignmentInputSurveyDB(const MuonAlignmentInputSurveyDB&); // stop default + MuonAlignmentInputSurveyDB(const MuonAlignmentInputSurveyDB&) = delete; // stop default - const MuonAlignmentInputSurveyDB& operator=(const MuonAlignmentInputSurveyDB&); // stop default + const MuonAlignmentInputSurveyDB& operator=(const MuonAlignmentInputSurveyDB&) = delete; // stop default void addSurveyInfo_(Alignable* ali, unsigned int* theSurveyIndex, diff --git a/Alignment/MuonAlignment/interface/MuonAlignmentInputXML.h b/Alignment/MuonAlignment/interface/MuonAlignmentInputXML.h index d56a5e05fd8ef..b0f9e575e7ee2 100644 --- a/Alignment/MuonAlignment/interface/MuonAlignmentInputXML.h +++ b/Alignment/MuonAlignment/interface/MuonAlignmentInputXML.h @@ -34,7 +34,7 @@ class MuonAlignmentInputXML: public MuonAlignmentInputMethod { public: MuonAlignmentInputXML(const std::string& fileName); - virtual ~MuonAlignmentInputXML(); + ~MuonAlignmentInputXML() override; // ---------- const member functions --------------------- @@ -42,12 +42,12 @@ class MuonAlignmentInputXML: public MuonAlignmentInputMethod { // ---------- member functions --------------------------- - virtual AlignableMuon *newAlignableMuon(const edm::EventSetup &iSetup) const; + AlignableMuon *newAlignableMuon(const edm::EventSetup &iSetup) const override; private: - MuonAlignmentInputXML(const MuonAlignmentInputXML&); // stop default + MuonAlignmentInputXML(const MuonAlignmentInputXML&) = delete; // stop default - const MuonAlignmentInputXML& operator=(const MuonAlignmentInputXML&); // stop default + const MuonAlignmentInputXML& operator=(const MuonAlignmentInputXML&) = delete; // stop default void recursiveGetId(std::map &alignableNavigator, const align::Alignables &alignables) const; diff --git a/Alignment/MuonAlignment/interface/MuonAlignmentOutputXML.h b/Alignment/MuonAlignment/interface/MuonAlignmentOutputXML.h index abd6074148104..5d25c4d83f3ad 100644 --- a/Alignment/MuonAlignment/interface/MuonAlignmentOutputXML.h +++ b/Alignment/MuonAlignment/interface/MuonAlignmentOutputXML.h @@ -47,9 +47,9 @@ class MuonAlignmentOutputXML { void write(AlignableMuon *alignableMuon, const edm::EventSetup &iSetup) const; private: - MuonAlignmentOutputXML(const MuonAlignmentOutputXML&); // stop default + MuonAlignmentOutputXML(const MuonAlignmentOutputXML&) = delete; // stop default - const MuonAlignmentOutputXML& operator=(const MuonAlignmentOutputXML&); // stop default + const MuonAlignmentOutputXML& operator=(const MuonAlignmentOutputXML&) = delete; // stop default void writeComponents(align::Alignables &alignables, align::Alignables &ideals, diff --git a/Alignment/MuonAlignment/interface/MuonScenarioBuilder.h b/Alignment/MuonAlignment/interface/MuonScenarioBuilder.h index cc5892d816977..c022f2dae32e5 100755 --- a/Alignment/MuonAlignment/interface/MuonScenarioBuilder.h +++ b/Alignment/MuonAlignment/interface/MuonScenarioBuilder.h @@ -27,10 +27,10 @@ class MuonScenarioBuilder : public MisalignmentScenarioBuilder explicit MuonScenarioBuilder( Alignable* alignable ); /// Destructor - ~MuonScenarioBuilder() {}; + ~MuonScenarioBuilder() override {}; /// Apply misalignment scenario to the Muon - void applyScenario( const edm::ParameterSet& scenario ); + void applyScenario( const edm::ParameterSet& scenario ) override; /// This special method allows to move a DTsector by a same amount void moveDTSectors( const edm::ParameterSet& scenario ); diff --git a/Alignment/MuonAlignment/plugins/MuonGeometryArrange.cc b/Alignment/MuonAlignment/plugins/MuonGeometryArrange.cc index bd5d9772b413f..2dbb3893b74ee 100644 --- a/Alignment/MuonAlignment/plugins/MuonGeometryArrange.cc +++ b/Alignment/MuonAlignment/plugins/MuonGeometryArrange.cc @@ -45,8 +45,8 @@ MuonGeometryArrange::MuonGeometryArrange(const edm::ParameterSet& cfg) : _levelStrings(cfg.getUntrackedParameter >("levels")), _writeToDB(false), _commonMuonLevel(align::invalid), firstEvent_(true) { - referenceMuon=0x0; - currentMuon=0x0; + referenceMuon=nullptr; + currentMuon=nullptr; // Input is XML _inputXMLCurrent = cfg.getUntrackedParameter ("inputXMLCurrent"); _inputXMLReference = cfg.getUntrackedParameter ("inputXMLReference"); @@ -166,8 +166,8 @@ void MuonGeometryArrange::endHist(){ int minI, maxI; minV=99999999.; maxV=-minV; minI=9999999; maxI=-minI; - TGraph* grx=0x0; - TH2F* dxh=0x0; + TGraph* grx=nullptr; + TH2F* dxh=nullptr; // for position plots: for(i=0; i=maxV || smi>=sma || sizeI<=1 || xp==0x0 || yp==0x0) return; + if(minV>=maxV || smi>=sma || sizeI<=1 || xp==nullptr || yp==nullptr) return; // out of bounds, bail float diff=maxV-minV; float over=.05*diff; @@ -489,8 +489,8 @@ void MuonGeometryArrange::compare(Alignable* refAli, Alignable* curAli, Alignable* curAliCopy2){ // First sanity - if(refAli==0x0){return;} - if(curAli==0x0){return;} + if(refAli==nullptr){return;} + if(curAli==nullptr){return;} const std::vector& refComp = refAli->components(); const std::vector& curComp = curAli->components(); @@ -508,8 +508,8 @@ void MuonGeometryArrange::compare(Alignable* refAli, Alignable* curAli, void MuonGeometryArrange::compareGeometries(Alignable* refAli, Alignable* curAli, Alignable* curCopy){ // First sanity - if(refAli==0x0){return;} - if(curAli==0x0){return;} + if(refAli==nullptr){return;} + if(curAli==nullptr){return;} // Is this the Ring we want to align? If so it will contain the // chambers specified in the configuration file if(!isMother(refAli)) return; // Not the desired alignable object @@ -876,7 +876,7 @@ void MuonGeometryArrange::fillTree(Alignable *refAli, const AlgebraicVector& dif ////////////////////////////////////////////////// bool MuonGeometryArrange::isMother(Alignable* ali){ // Is this the mother ring? - if(ali==0x0) return false; // elementary sanity + if(ali==nullptr) return false; // elementary sanity const std::vector& aliComp = ali->components(); int size=aliComp.size(); @@ -891,7 +891,7 @@ bool MuonGeometryArrange::isMother(Alignable* ali){ bool MuonGeometryArrange::checkChosen(Alignable* ali){ // Check whether the item passed satisfies the criteria given. - if(ali==0x0) return false; // elementary sanity + if(ali==nullptr) return false; // elementary sanity // Is this in the CSC section? If not, bail. Later may extend. if(ali->geomDetId().det()!=DetId::Muon || ali->geomDetId().subdetId()!=MuonSubdetId::CSC) return false; @@ -928,7 +928,7 @@ bool MuonGeometryArrange::passChosen( Alignable* ali ){ // The fact that it has layers as sub components, or the fact that it is // the first item with a non-zero ID breakdown? Pick the latter. // - if(ali==0x0) return false; + if(ali==nullptr) return false; if(checkChosen(ali)) return true; // If this is one of the desired // CSC chambers, accept it const std::vector& aliComp = ali->components(); diff --git a/Alignment/MuonAlignment/plugins/MuonGeometryArrange.h b/Alignment/MuonAlignment/plugins/MuonGeometryArrange.h index 64a8056be4b74..6b1e96291278b 100644 --- a/Alignment/MuonAlignment/plugins/MuonGeometryArrange.h +++ b/Alignment/MuonAlignment/plugins/MuonGeometryArrange.h @@ -49,12 +49,12 @@ public edm::EDAnalyzer ); /// Read from DB and print survey info. - virtual void beginJob(); + void beginJob() override; - virtual void analyze( + void analyze( const edm::Event&, const edm::EventSetup& - ); + ) override; // virtual void endJob(void); private: diff --git a/Alignment/MuonAlignment/plugins/MuonGeometryDBConverter.cc b/Alignment/MuonAlignment/plugins/MuonGeometryDBConverter.cc index 242baf542b904..05994890f2e03 100644 --- a/Alignment/MuonAlignment/plugins/MuonGeometryDBConverter.cc +++ b/Alignment/MuonAlignment/plugins/MuonGeometryDBConverter.cc @@ -43,14 +43,14 @@ class MuonGeometryDBConverter : public edm::one::EDAnalyzer<> { public: explicit MuonGeometryDBConverter(const edm::ParameterSet&); - ~MuonGeometryDBConverter(); + ~MuonGeometryDBConverter() override; static void fillDescriptions(edm::ConfigurationDescriptions&); void beginJob() override {}; void endJob() override {}; private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; bool m_done; std::string m_input, m_output; @@ -143,7 +143,7 @@ MuonGeometryDBConverter::~MuonGeometryDBConverter() { } void MuonGeometryDBConverter::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) { if (!m_done) { - MuonAlignment *muonAlignment = NULL; + MuonAlignment *muonAlignment = nullptr; if (m_input == std::string("ideal")) { MuonAlignmentInputMethod inputMethod; diff --git a/Alignment/MuonAlignment/plugins/MuonGeometrySVGTemplate.cc b/Alignment/MuonAlignment/plugins/MuonGeometrySVGTemplate.cc index 43d5c69c5a36b..444b484b37b33 100644 --- a/Alignment/MuonAlignment/plugins/MuonGeometrySVGTemplate.cc +++ b/Alignment/MuonAlignment/plugins/MuonGeometrySVGTemplate.cc @@ -47,10 +47,10 @@ class MuonGeometrySVGTemplate : public edm::EDAnalyzer { public: explicit MuonGeometrySVGTemplate(const edm::ParameterSet &iConfig); - ~MuonGeometrySVGTemplate(); + ~MuonGeometrySVGTemplate() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup &iConfig) override; + void analyze(const edm::Event&, const edm::EventSetup &iConfig) override; std::string m_wheelTemplateName; // std::string m_disk1TemplateName; diff --git a/Alignment/MuonAlignment/plugins/MuonGeometrySanityCheck.cc b/Alignment/MuonAlignment/plugins/MuonGeometrySanityCheck.cc index ae4c50d6e8340..14e0e75c1f965 100644 --- a/Alignment/MuonAlignment/plugins/MuonGeometrySanityCheck.cc +++ b/Alignment/MuonAlignment/plugins/MuonGeometrySanityCheck.cc @@ -95,10 +95,10 @@ class MuonGeometrySanityCheckPoint { class MuonGeometrySanityCheck : public edm::EDAnalyzer { public: explicit MuonGeometrySanityCheck(const edm::ParameterSet &iConfig); - ~MuonGeometrySanityCheck(); + ~MuonGeometrySanityCheck() override; private: - virtual void analyze(const edm::Event&, const edm::EventSetup &iConfig) override; + void analyze(const edm::Event&, const edm::EventSetup &iConfig) override; std::string printout; double tolerance; @@ -448,15 +448,15 @@ MuonGeometrySanityCheckPoint::MuonGeometrySanityCheckPoint(const edm::ParameterS const std::map::const_iterator frameIter = frames.find(frameName); if (frameName == std::string("global")) { frame = kGlobal; - customFrame = NULL; + customFrame = nullptr; } else if (frameName == std::string("local")) { frame = kLocal; - customFrame = NULL; + customFrame = nullptr; } else if (frameName == std::string("chamber")) { frame = kChamber; - customFrame = NULL; + customFrame = nullptr; } else if (frameIter != frames.end()) { frame = kCustom; @@ -474,7 +474,7 @@ MuonGeometrySanityCheckPoint::MuonGeometrySanityCheckPoint(const edm::ParameterS displacement = GlobalPoint(point[0], point[1], point[2]); const edm::Entry *entry = iConfig.retrieveUnknown("expectation"); - if (entry != NULL) { + if (entry != nullptr) { has_expectation = true; point = iConfig.getParameter >("expectation"); @@ -489,7 +489,7 @@ MuonGeometrySanityCheckPoint::MuonGeometrySanityCheckPoint(const edm::ParameterS } entry = iConfig.retrieveUnknown("name"); - if (entry != NULL) { + if (entry != nullptr) { name = iConfig.getParameter("name"); } else { @@ -497,20 +497,20 @@ MuonGeometrySanityCheckPoint::MuonGeometrySanityCheckPoint(const edm::ParameterS } entry = iConfig.retrieveUnknown("outputFrame"); - if (entry != NULL) { + if (entry != nullptr) { frameName = iConfig.getParameter("outputFrame"); const std::map::const_iterator frameIter = frames.find(frameName); if (frameName == std::string("global")) { outputFrame = kGlobal; - outputCustomFrame = NULL; + outputCustomFrame = nullptr; } else if (frameName == std::string("local")) { outputFrame = kLocal; - outputCustomFrame = NULL; + outputCustomFrame = nullptr; } else if (frameName == std::string("chamber")) { outputFrame = kChamber; - outputCustomFrame = NULL; + outputCustomFrame = nullptr; } else if (frameIter != frames.end()) { outputFrame = kCustom; @@ -522,7 +522,7 @@ MuonGeometrySanityCheckPoint::MuonGeometrySanityCheckPoint(const edm::ParameterS } else { outputFrame = kGlobal; - outputCustomFrame = NULL; + outputCustomFrame = nullptr; } } diff --git a/Alignment/MuonAlignment/src/AlignableMuon.cc b/Alignment/MuonAlignment/src/AlignableMuon.cc index 6855b0d0a6812..1fd67ac406317 100644 --- a/Alignment/MuonAlignment/src/AlignableMuon.cc +++ b/Alignment/MuonAlignment/src/AlignableMuon.cc @@ -238,7 +238,7 @@ void AlignableMuon::buildCSCEndcap(const CSCGeometry* pCSC, bool update) if (!update) { // Not all stations have 4 rings: only add the rings that exist (have chambers associated with them) - if (tmpCSCChambersInRing.size() > 0) { + if (!tmpCSCChambersInRing.empty()) { // Store the alignable CSC chambers theCSCChambers.insert(theCSCChambers.end(), diff --git a/Alignment/MuonAlignment/src/MuonAlignment.cc b/Alignment/MuonAlignment/src/MuonAlignment.cc index 7e46c450eb304..e0537fc4d1a32 100644 --- a/Alignment/MuonAlignment/src/MuonAlignment.cc +++ b/Alignment/MuonAlignment/src/MuonAlignment.cc @@ -38,8 +38,8 @@ void MuonAlignment::init() theDTSurveyErrorRecordName = "DTSurveyErrorExtendedRcd"; theCSCSurveyRecordName = "CSCSurveyRcd"; theCSCSurveyErrorRecordName = "CSCSurveyErrorExtendedRcd"; - theAlignableMuon = NULL; - theAlignableNavigator = NULL; + theAlignableMuon = nullptr; + theAlignableNavigator = nullptr; } MuonAlignment::MuonAlignment( const edm::EventSetup& iSetup ) @@ -182,7 +182,7 @@ void MuonAlignment::fillGapsInSurvey(double shiftErr, double angleErr) { for (std::map, Alignable*>::const_iterator iter = alignableStructureMap.begin(); iter != alignableStructureMap.end(); ++iter) { - if (iter->second->survey() == NULL) { + if (iter->second->survey() == nullptr) { align::ErrorMatrix matrix6x6 = ROOT::Math::SMatrixIdentity(); matrix6x6(0,0) = shiftErr; matrix6x6(1,1) = shiftErr; @@ -198,10 +198,10 @@ void MuonAlignment::fillGapsInSurvey(double shiftErr, double angleErr) { //____________________________________________________________________________________ // void MuonAlignment::recursiveCopySurveyToAlignment(Alignable *alignable) { - if (alignable->survey() != NULL) { + if (alignable->survey() != nullptr) { const SurveyDet *survey = alignable->survey(); - align::PositionType pos = survey->position(); + const align::PositionType& pos = survey->position(); align::RotationType rot = survey->rotation(); align::PositionType oldpos = alignable->globalPosition(); diff --git a/Alignment/MuonAlignment/src/MuonAlignmentInputXML.cc b/Alignment/MuonAlignment/src/MuonAlignmentInputXML.cc index ba17f76c974c5..943be0078bce5 100644 --- a/Alignment/MuonAlignment/src/MuonAlignmentInputXML.cc +++ b/Alignment/MuonAlignment/src/MuonAlignmentInputXML.cc @@ -306,7 +306,7 @@ AlignableMuon *MuonAlignmentInputXML::newAlignableMuon(const edm::EventSetup& iS DOMNodeList *children = collection->getChildNodes(); DOMAttr *node_name = collection->getAttributeNode(str_name); - if (node_name == NULL) { + if (node_name == nullptr) { throw cms::Exception("XMLException") << " requires a name attribute" << std::endl; } char *ascii_name = XMLString::transcode(node_name->getValue()); @@ -319,7 +319,7 @@ AlignableMuon *MuonAlignmentInputXML::newAlignableMuon(const edm::EventSetup& iS if (node->getNodeType() == DOMNode::ELEMENT_NODE) { Alignable *ali = getNode(alignableNavigator, (DOMElement*)(node), alignableObjectId); - if (ali == NULL) { + if (ali == nullptr) { throw cms::Exception("XMLException") << " must contain only alignables" << std::endl; } @@ -346,14 +346,14 @@ AlignableMuon *MuonAlignmentInputXML::newAlignableMuon(const edm::EventSetup& iS if (node->getNodeType() == DOMNode::ELEMENT_NODE) { Alignable *ali = getNode(alignableNavigator, (DOMElement*)(node), alignableObjectId); - if (ali != NULL) { + if (ali != nullptr) { aliset[ali] = true; nodesToRemove.push_back(node); } // end if this node is an alignable else if (XMLString::equals(node->getNodeName(), str_collection)) { DOMAttr *node_name = ((DOMElement*)(node))->getAttributeNode(str_name); - if (node_name == NULL) { + if (node_name == nullptr) { throw cms::Exception("XMLException") << " requires a name attribute" << std::endl; } char *ascii_name = XMLString::transcode(node_name->getValue()); @@ -453,7 +453,7 @@ Alignable *MuonAlignmentInputXML::getNode(std::map &al else if (XMLString::equals(node->getNodeName(), str_CSCRing)) return getCSCnode(align::AlignableCSCRing, alignableNavigator, node, alignableObjectId); else if (XMLString::equals(node->getNodeName(), str_CSCChamber)) return getCSCnode(align::AlignableCSCChamber, alignableNavigator, node, alignableObjectId); else if (XMLString::equals(node->getNodeName(), str_CSCLayer)) return getCSCnode(align::AlignableDetUnit, alignableNavigator, node, alignableObjectId); - else return NULL; + else return nullptr; } Alignable *MuonAlignmentInputXML::getDTnode(align::StructureType structureType, @@ -462,7 +462,7 @@ Alignable *MuonAlignmentInputXML::getDTnode(align::StructureType structureType, unsigned int rawId = 0; DOMAttr *node_rawId = node->getAttributeNode(str_rawId); - if (node_rawId != NULL) { + if (node_rawId != nullptr) { try { rawId = XMLString::parseInt(node_rawId->getValue()); } @@ -476,7 +476,7 @@ Alignable *MuonAlignmentInputXML::getDTnode(align::StructureType structureType, if (structureType != align::AlignableDTBarrel) { DOMAttr *node_wheel = node->getAttributeNode(str_wheel); - if (node_wheel == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"wheel\" attribute" << std::endl; + if (node_wheel == nullptr) throw cms::Exception("XMLException") << "DT node is missing required \"wheel\" attribute" << std::endl; try { wheel = XMLString::parseInt(node_wheel->getValue()); } @@ -486,7 +486,7 @@ Alignable *MuonAlignmentInputXML::getDTnode(align::StructureType structureType, if (structureType != align::AlignableDTWheel) { DOMAttr *node_station = node->getAttributeNode(str_station); - if (node_station == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"station\" attribute" << std::endl; + if (node_station == nullptr) throw cms::Exception("XMLException") << "DT node is missing required \"station\" attribute" << std::endl; try { station = XMLString::parseInt(node_station->getValue()); } @@ -496,7 +496,7 @@ Alignable *MuonAlignmentInputXML::getDTnode(align::StructureType structureType, if (structureType != align::AlignableDTStation) { DOMAttr *node_sector = node->getAttributeNode(str_sector); - if (node_sector == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"sector\" attribute" << std::endl; + if (node_sector == nullptr) throw cms::Exception("XMLException") << "DT node is missing required \"sector\" attribute" << std::endl; try { sector = XMLString::parseInt(node_sector->getValue()); } @@ -506,7 +506,7 @@ Alignable *MuonAlignmentInputXML::getDTnode(align::StructureType structureType, if (structureType != align::AlignableDTChamber) { DOMAttr *node_superlayer = node->getAttributeNode(str_superlayer); - if (node_superlayer == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"superlayer\" attribute" << std::endl; + if (node_superlayer == nullptr) throw cms::Exception("XMLException") << "DT node is missing required \"superlayer\" attribute" << std::endl; try { superlayer = XMLString::parseInt(node_superlayer->getValue()); } @@ -516,7 +516,7 @@ Alignable *MuonAlignmentInputXML::getDTnode(align::StructureType structureType, if (structureType != align::AlignableDTSuperLayer) { DOMAttr *node_layer = node->getAttributeNode(str_layer); - if (node_layer == NULL) throw cms::Exception("XMLException") << "DT node is missing required \"layer\" attribute" << std::endl; + if (node_layer == nullptr) throw cms::Exception("XMLException") << "DT node is missing required \"layer\" attribute" << std::endl; try { layer = XMLString::parseInt(node_layer->getValue()); } @@ -535,12 +535,12 @@ Alignable *MuonAlignmentInputXML::getDTnode(align::StructureType structureType, } // end if it's specified by wheel, station, sector, superlayer, layer Alignable *ali = alignableNavigator[rawId]; - if (ali == NULL) throw cms::Exception("XMLException") << "rawId \"" << rawId << "\" is not recognized" << std::endl; + if (ali == nullptr) throw cms::Exception("XMLException") << "rawId \"" << rawId << "\" is not recognized" << std::endl; while (ali->alignableObjectId() != structureType) { ali = ali->mother(); - if (ali == NULL) { + if (ali == nullptr) { throw cms::Exception("XMLException") << "rawId \"" << rawId << "\" is not a " << alignableObjectId.idToString(structureType) << std::endl; @@ -555,7 +555,7 @@ Alignable *MuonAlignmentInputXML::getCSCnode(align::StructureType structureType, unsigned int rawId; DOMAttr *node_rawId = node->getAttributeNode(str_rawId); - if (node_rawId != NULL) { + if (node_rawId != nullptr) { try { rawId = XMLString::parseInt(node_rawId->getValue()); } @@ -568,7 +568,7 @@ Alignable *MuonAlignmentInputXML::getCSCnode(align::StructureType structureType, endcap = station = ring = chamber = layer = 1; DOMAttr *node_endcap = node->getAttributeNode(str_endcap); - if (node_endcap == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"endcap\" attribute" << std::endl; + if (node_endcap == nullptr) throw cms::Exception("XMLException") << "CSC node is missing required \"endcap\" attribute" << std::endl; try { endcap = XMLString::parseInt(node_endcap->getValue()); } @@ -579,7 +579,7 @@ Alignable *MuonAlignmentInputXML::getCSCnode(align::StructureType structureType, if (structureType != align::AlignableCSCEndcap) { DOMAttr *node_station = node->getAttributeNode(str_station); - if (node_station == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"station\" attribute" << std::endl; + if (node_station == nullptr) throw cms::Exception("XMLException") << "CSC node is missing required \"station\" attribute" << std::endl; try { station = XMLString::parseInt(node_station->getValue()); } @@ -589,7 +589,7 @@ Alignable *MuonAlignmentInputXML::getCSCnode(align::StructureType structureType, if (structureType != align::AlignableCSCStation) { DOMAttr *node_ring = node->getAttributeNode(str_ring); - if (node_ring == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"ring\" attribute" << std::endl; + if (node_ring == nullptr) throw cms::Exception("XMLException") << "CSC node is missing required \"ring\" attribute" << std::endl; try { ring = XMLString::parseInt(node_ring->getValue()); } @@ -599,7 +599,7 @@ Alignable *MuonAlignmentInputXML::getCSCnode(align::StructureType structureType, if (structureType != align::AlignableCSCRing) { DOMAttr *node_chamber = node->getAttributeNode(str_chamber); - if (node_chamber == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"chamber\" attribute" << std::endl; + if (node_chamber == nullptr) throw cms::Exception("XMLException") << "CSC node is missing required \"chamber\" attribute" << std::endl; try { chamber = XMLString::parseInt(node_chamber->getValue()); } @@ -609,7 +609,7 @@ Alignable *MuonAlignmentInputXML::getCSCnode(align::StructureType structureType, if (structureType != align::AlignableCSCChamber) { DOMAttr *node_layer = node->getAttributeNode(str_layer); - if (node_layer == NULL) throw cms::Exception("XMLException") << "CSC node is missing required \"layer\" attribute" << std::endl; + if (node_layer == nullptr) throw cms::Exception("XMLException") << "CSC node is missing required \"layer\" attribute" << std::endl; try { layer = XMLString::parseInt(node_layer->getValue()); } @@ -627,12 +627,12 @@ Alignable *MuonAlignmentInputXML::getCSCnode(align::StructureType structureType, } // end if it's specified by endcap, station, ring, chamber, layer Alignable *ali = alignableNavigator[rawId]; - if (ali == NULL) throw cms::Exception("XMLException") << "rawId \"" << rawId << "\" is not recognized" << std::endl; + if (ali == nullptr) throw cms::Exception("XMLException") << "rawId \"" << rawId << "\" is not recognized" << std::endl; while (ali->alignableObjectId() != structureType) { ali = ali->mother(); - if (ali == NULL) { + if (ali == nullptr) { throw cms::Exception("XMLException") << "rawId \"" << rawId << "\" is not a " << alignableObjectId.idToString(structureType) << std::endl; @@ -720,7 +720,7 @@ double MuonAlignmentInputXML::parseDouble(const XMLCh *str, const char *attribut void MuonAlignmentInputXML::do_setposition(const XERCES_CPP_NAMESPACE::DOMElement *node, std::map &aliset, std::map &alitoideal) const { DOMAttr *node_relativeto = node->getAttributeNode(str_relativeto); - if (node_relativeto == NULL) throw cms::Exception("XMLException") << " is missing required \"relativeto\" attribute" << std::endl; + if (node_relativeto == nullptr) throw cms::Exception("XMLException") << " is missing required \"relativeto\" attribute" << std::endl; int relativeto = 0; if (XMLString::equals(node_relativeto->getValue(), str_none)) { @@ -749,14 +749,14 @@ void MuonAlignmentInputXML::do_setposition(const XERCES_CPP_NAMESPACE::DOMElemen if (relativeto == 0) {} else if (relativeto == 1) { - align::PositionType idealPosition = ideal->globalPosition(); + const align::PositionType& idealPosition = ideal->globalPosition(); align::RotationType idealRotation = ideal->globalRotation(); oldpos = align::PositionType(idealRotation * (oldpos.basicVector() - idealPosition.basicVector())); oldrot = oldrot * idealRotation.transposed(); } - else if (relativeto == 2 && ali->mother() != NULL) { + else if (relativeto == 2 && ali->mother() != nullptr) { align::PositionType globalPosition = ali->mother()->globalPosition(); align::RotationType globalRotation = ali->mother()->globalRotation(); @@ -783,9 +783,9 @@ void MuonAlignmentInputXML::do_setposition(const XERCES_CPP_NAMESPACE::DOMElemen DOMAttr *node_y = node->getAttributeNode(str_y); DOMAttr *node_z = node->getAttributeNode(str_z); - if (node_x != NULL) x = parseDouble(node_x->getValue(), "x"); - if (node_y != NULL) y = parseDouble(node_y->getValue(), "y"); - if (node_z != NULL) z = parseDouble(node_z->getValue(), "z"); + if (node_x != nullptr) x = parseDouble(node_x->getValue(), "x"); + if (node_y != nullptr) y = parseDouble(node_y->getValue(), "y"); + if (node_z != nullptr) z = parseDouble(node_z->getValue(), "z"); align::PositionType pos(x, y, z); DOMAttr *node_phix = node->getAttributeNode(str_phix); @@ -796,15 +796,15 @@ void MuonAlignmentInputXML::do_setposition(const XERCES_CPP_NAMESPACE::DOMElemen DOMAttr *node_gamma = node->getAttributeNode(str_gamma); align::RotationType rot; - bool phixyz = (node_phix != NULL || node_phiy != NULL || node_phiz != NULL); - bool alphabetagamma = (node_alpha != NULL || node_beta != NULL || node_gamma != NULL); + bool phixyz = (node_phix != nullptr || node_phiy != nullptr || node_phiz != nullptr); + bool alphabetagamma = (node_alpha != nullptr || node_beta != nullptr || node_gamma != nullptr); if (phixyz && alphabetagamma) throw cms::Exception("XMLException") << " must either have phix, phiy, and phiz or alpha, beta, and gamma, but not both" << std::endl; if (!phixyz && !alphabetagamma) alphabetagamma = true; if (phixyz) { - if (node_phix != NULL) phix = parseDouble(node_phix->getValue(), "phix"); - if (node_phiy != NULL) phiy = parseDouble(node_phiy->getValue(), "phiy"); - if (node_phiz != NULL) phiz = parseDouble(node_phiz->getValue(), "phiz"); + if (node_phix != nullptr) phix = parseDouble(node_phix->getValue(), "phix"); + if (node_phiy != nullptr) phiy = parseDouble(node_phiy->getValue(), "phiy"); + if (node_phiz != nullptr) phiz = parseDouble(node_phiz->getValue(), "phiz"); // the angle convention originally used in alignment, also known as "non-standard Euler angles with a Z-Y-X convention" // this also gets the sign convention right @@ -822,9 +822,9 @@ void MuonAlignmentInputXML::do_setposition(const XERCES_CPP_NAMESPACE::DOMElemen } else if (alphabetagamma) { - if (node_alpha != NULL) alpha = parseDouble(node_alpha->getValue(), "alpha"); - if (node_beta != NULL) beta = parseDouble(node_beta->getValue(), "beta"); - if (node_gamma != NULL) gamma = parseDouble(node_gamma->getValue(), "gamma"); + if (node_alpha != nullptr) alpha = parseDouble(node_alpha->getValue(), "alpha"); + if (node_beta != nullptr) beta = parseDouble(node_beta->getValue(), "beta"); + if (node_gamma != nullptr) gamma = parseDouble(node_gamma->getValue(), "gamma"); // standard Euler angles (how they're internally stored in the database) align::EulerAngles eulerAngles(3); @@ -844,7 +844,7 @@ void MuonAlignmentInputXML::do_setposition(const XERCES_CPP_NAMESPACE::DOMElemen Alignable *ali = aliiter->first; Alignable *ideal = alitoideal[ali]; - align::PositionType idealPosition = ideal->globalPosition(); + const align::PositionType& idealPosition = ideal->globalPosition(); align::RotationType idealRotation = ideal->globalRotation(); align::PositionType newpos = align::PositionType(idealRotation.transposed() * pos.basicVector() + idealPosition.basicVector()); align::RotationType newrot = rot * idealRotation; @@ -856,8 +856,8 @@ void MuonAlignmentInputXML::do_setposition(const XERCES_CPP_NAMESPACE::DOMElemen Alignable *ali = aliiter->first; Alignable *container = ali->mother(); - if (container != NULL) { - align::PositionType globalPosition = container->globalPosition(); + if (container != nullptr) { + const align::PositionType& globalPosition = container->globalPosition(); align::RotationType globalRotation = container->globalRotation(); align::PositionType newpos = align::PositionType(globalRotation.transposed() * pos.basicVector() + globalPosition.basicVector()); align::RotationType newrot = rot * globalRotation; @@ -905,7 +905,7 @@ void MuonAlignmentInputXML::set_one_position(Alignable *ali, const align::Positi matrix6x6 *= 1000.; // initial assumption: infinitely weak constraint const SurveyDet *survey = ali->survey(); - if (survey != NULL) { + if (survey != nullptr) { matrix6x6 = survey->errors(); // save the constraint information } ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6)); @@ -934,27 +934,27 @@ void MuonAlignmentInputXML::do_setape(const XERCES_CPP_NAMESPACE::DOMElement *no DOMAttr *node_bc = node->getAttributeNode(str_bc); DOMAttr *node_cc = node->getAttributeNode(str_cc); - if (node_xx == NULL) throw cms::Exception("XMLException") << " is missing required \"xx\" attribute" << std::endl; - if (node_xy == NULL) throw cms::Exception("XMLException") << " is missing required \"xy\" attribute" << std::endl; - if (node_xz == NULL) throw cms::Exception("XMLException") << " is missing required \"xz\" attribute" << std::endl; - if (node_xa == NULL) throw cms::Exception("XMLException") << " is missing required \"xa\" attribute" << std::endl; - if (node_xb == NULL) throw cms::Exception("XMLException") << " is missing required \"xb\" attribute" << std::endl; - if (node_xc == NULL) throw cms::Exception("XMLException") << " is missing required \"xc\" attribute" << std::endl; - if (node_yy == NULL) throw cms::Exception("XMLException") << " is missing required \"yy\" attribute" << std::endl; - if (node_yz == NULL) throw cms::Exception("XMLException") << " is missing required \"yz\" attribute" << std::endl; - if (node_ya == NULL) throw cms::Exception("XMLException") << " is missing required \"ya\" attribute" << std::endl; - if (node_yb == NULL) throw cms::Exception("XMLException") << " is missing required \"yb\" attribute" << std::endl; - if (node_yc == NULL) throw cms::Exception("XMLException") << " is missing required \"yc\" attribute" << std::endl; - if (node_zz == NULL) throw cms::Exception("XMLException") << " is missing required \"zz\" attribute" << std::endl; - if (node_za == NULL) throw cms::Exception("XMLException") << " is missing required \"za\" attribute" << std::endl; - if (node_zb == NULL) throw cms::Exception("XMLException") << " is missing required \"zb\" attribute" << std::endl; - if (node_zc == NULL) throw cms::Exception("XMLException") << " is missing required \"zc\" attribute" << std::endl; - if (node_aa == NULL) throw cms::Exception("XMLException") << " is missing required \"aa\" attribute" << std::endl; - if (node_ab == NULL) throw cms::Exception("XMLException") << " is missing required \"ab\" attribute" << std::endl; - if (node_ac == NULL) throw cms::Exception("XMLException") << " is missing required \"ac\" attribute" << std::endl; - if (node_bb == NULL) throw cms::Exception("XMLException") << " is missing required \"bb\" attribute" << std::endl; - if (node_bc == NULL) throw cms::Exception("XMLException") << " is missing required \"bc\" attribute" << std::endl; - if (node_cc == NULL) throw cms::Exception("XMLException") << " is missing required \"cc\" attribute" << std::endl; + if (node_xx == nullptr) throw cms::Exception("XMLException") << " is missing required \"xx\" attribute" << std::endl; + if (node_xy == nullptr) throw cms::Exception("XMLException") << " is missing required \"xy\" attribute" << std::endl; + if (node_xz == nullptr) throw cms::Exception("XMLException") << " is missing required \"xz\" attribute" << std::endl; + if (node_xa == nullptr) throw cms::Exception("XMLException") << " is missing required \"xa\" attribute" << std::endl; + if (node_xb == nullptr) throw cms::Exception("XMLException") << " is missing required \"xb\" attribute" << std::endl; + if (node_xc == nullptr) throw cms::Exception("XMLException") << " is missing required \"xc\" attribute" << std::endl; + if (node_yy == nullptr) throw cms::Exception("XMLException") << " is missing required \"yy\" attribute" << std::endl; + if (node_yz == nullptr) throw cms::Exception("XMLException") << " is missing required \"yz\" attribute" << std::endl; + if (node_ya == nullptr) throw cms::Exception("XMLException") << " is missing required \"ya\" attribute" << std::endl; + if (node_yb == nullptr) throw cms::Exception("XMLException") << " is missing required \"yb\" attribute" << std::endl; + if (node_yc == nullptr) throw cms::Exception("XMLException") << " is missing required \"yc\" attribute" << std::endl; + if (node_zz == nullptr) throw cms::Exception("XMLException") << " is missing required \"zz\" attribute" << std::endl; + if (node_za == nullptr) throw cms::Exception("XMLException") << " is missing required \"za\" attribute" << std::endl; + if (node_zb == nullptr) throw cms::Exception("XMLException") << " is missing required \"zb\" attribute" << std::endl; + if (node_zc == nullptr) throw cms::Exception("XMLException") << " is missing required \"zc\" attribute" << std::endl; + if (node_aa == nullptr) throw cms::Exception("XMLException") << " is missing required \"aa\" attribute" << std::endl; + if (node_ab == nullptr) throw cms::Exception("XMLException") << " is missing required \"ab\" attribute" << std::endl; + if (node_ac == nullptr) throw cms::Exception("XMLException") << " is missing required \"ac\" attribute" << std::endl; + if (node_bb == nullptr) throw cms::Exception("XMLException") << " is missing required \"bb\" attribute" << std::endl; + if (node_bc == nullptr) throw cms::Exception("XMLException") << " is missing required \"bc\" attribute" << std::endl; + if (node_cc == nullptr) throw cms::Exception("XMLException") << " is missing required \"cc\" attribute" << std::endl; align::ErrorMatrix matrix6x6; matrix6x6(0,0) = parseDouble(node_xx->getValue(), "xx"); @@ -1008,27 +1008,27 @@ void MuonAlignmentInputXML::do_setsurveyerr(const XERCES_CPP_NAMESPACE::DOMEleme DOMAttr *node_bc = node->getAttributeNode(str_bc); DOMAttr *node_cc = node->getAttributeNode(str_cc); - if (node_xx == NULL) throw cms::Exception("XMLException") << " is missing required \"xx\" attribute" << std::endl; - if (node_xy == NULL) throw cms::Exception("XMLException") << " is missing required \"xy\" attribute" << std::endl; - if (node_xz == NULL) throw cms::Exception("XMLException") << " is missing required \"xz\" attribute" << std::endl; - if (node_xa == NULL) throw cms::Exception("XMLException") << " is missing required \"xa\" attribute" << std::endl; - if (node_xb == NULL) throw cms::Exception("XMLException") << " is missing required \"xb\" attribute" << std::endl; - if (node_xc == NULL) throw cms::Exception("XMLException") << " is missing required \"xc\" attribute" << std::endl; - if (node_yy == NULL) throw cms::Exception("XMLException") << " is missing required \"yy\" attribute" << std::endl; - if (node_yz == NULL) throw cms::Exception("XMLException") << " is missing required \"yz\" attribute" << std::endl; - if (node_ya == NULL) throw cms::Exception("XMLException") << " is missing required \"ya\" attribute" << std::endl; - if (node_yb == NULL) throw cms::Exception("XMLException") << " is missing required \"yb\" attribute" << std::endl; - if (node_yc == NULL) throw cms::Exception("XMLException") << " is missing required \"yc\" attribute" << std::endl; - if (node_zz == NULL) throw cms::Exception("XMLException") << " is missing required \"zz\" attribute" << std::endl; - if (node_za == NULL) throw cms::Exception("XMLException") << " is missing required \"za\" attribute" << std::endl; - if (node_zb == NULL) throw cms::Exception("XMLException") << " is missing required \"zb\" attribute" << std::endl; - if (node_zc == NULL) throw cms::Exception("XMLException") << " is missing required \"zc\" attribute" << std::endl; - if (node_aa == NULL) throw cms::Exception("XMLException") << " is missing required \"aa\" attribute" << std::endl; - if (node_ab == NULL) throw cms::Exception("XMLException") << " is missing required \"ab\" attribute" << std::endl; - if (node_ac == NULL) throw cms::Exception("XMLException") << " is missing required \"ac\" attribute" << std::endl; - if (node_bb == NULL) throw cms::Exception("XMLException") << " is missing required \"bb\" attribute" << std::endl; - if (node_bc == NULL) throw cms::Exception("XMLException") << " is missing required \"bc\" attribute" << std::endl; - if (node_cc == NULL) throw cms::Exception("XMLException") << " is missing required \"cc\" attribute" << std::endl; + if (node_xx == nullptr) throw cms::Exception("XMLException") << " is missing required \"xx\" attribute" << std::endl; + if (node_xy == nullptr) throw cms::Exception("XMLException") << " is missing required \"xy\" attribute" << std::endl; + if (node_xz == nullptr) throw cms::Exception("XMLException") << " is missing required \"xz\" attribute" << std::endl; + if (node_xa == nullptr) throw cms::Exception("XMLException") << " is missing required \"xa\" attribute" << std::endl; + if (node_xb == nullptr) throw cms::Exception("XMLException") << " is missing required \"xb\" attribute" << std::endl; + if (node_xc == nullptr) throw cms::Exception("XMLException") << " is missing required \"xc\" attribute" << std::endl; + if (node_yy == nullptr) throw cms::Exception("XMLException") << " is missing required \"yy\" attribute" << std::endl; + if (node_yz == nullptr) throw cms::Exception("XMLException") << " is missing required \"yz\" attribute" << std::endl; + if (node_ya == nullptr) throw cms::Exception("XMLException") << " is missing required \"ya\" attribute" << std::endl; + if (node_yb == nullptr) throw cms::Exception("XMLException") << " is missing required \"yb\" attribute" << std::endl; + if (node_yc == nullptr) throw cms::Exception("XMLException") << " is missing required \"yc\" attribute" << std::endl; + if (node_zz == nullptr) throw cms::Exception("XMLException") << " is missing required \"zz\" attribute" << std::endl; + if (node_za == nullptr) throw cms::Exception("XMLException") << " is missing required \"za\" attribute" << std::endl; + if (node_zb == nullptr) throw cms::Exception("XMLException") << " is missing required \"zb\" attribute" << std::endl; + if (node_zc == nullptr) throw cms::Exception("XMLException") << " is missing required \"zc\" attribute" << std::endl; + if (node_aa == nullptr) throw cms::Exception("XMLException") << " is missing required \"aa\" attribute" << std::endl; + if (node_ab == nullptr) throw cms::Exception("XMLException") << " is missing required \"ab\" attribute" << std::endl; + if (node_ac == nullptr) throw cms::Exception("XMLException") << " is missing required \"ac\" attribute" << std::endl; + if (node_bb == nullptr) throw cms::Exception("XMLException") << " is missing required \"bb\" attribute" << std::endl; + if (node_bc == nullptr) throw cms::Exception("XMLException") << " is missing required \"bc\" attribute" << std::endl; + if (node_cc == nullptr) throw cms::Exception("XMLException") << " is missing required \"cc\" attribute" << std::endl; align::ErrorMatrix matrix6x6; matrix6x6(0,0) = parseDouble(node_xx->getValue(), "xx"); @@ -1063,9 +1063,9 @@ void MuonAlignmentInputXML::do_moveglobal(const XERCES_CPP_NAMESPACE::DOMElement DOMAttr *node_x = node->getAttributeNode(str_x); DOMAttr *node_y = node->getAttributeNode(str_y); DOMAttr *node_z = node->getAttributeNode(str_z); - if (node_x == NULL) throw cms::Exception("XMLException") << " is missing required \"x\" attribute" << std::endl; - if (node_y == NULL) throw cms::Exception("XMLException") << " is missing required \"y\" attribute" << std::endl; - if (node_z == NULL) throw cms::Exception("XMLException") << " is missing required \"z\" attribute" << std::endl; + if (node_x == nullptr) throw cms::Exception("XMLException") << " is missing required \"x\" attribute" << std::endl; + if (node_y == nullptr) throw cms::Exception("XMLException") << " is missing required \"y\" attribute" << std::endl; + if (node_z == nullptr) throw cms::Exception("XMLException") << " is missing required \"z\" attribute" << std::endl; double x = parseDouble(node_x->getValue(), "x"); double y = parseDouble(node_y->getValue(), "y"); @@ -1081,7 +1081,7 @@ void MuonAlignmentInputXML::do_moveglobal(const XERCES_CPP_NAMESPACE::DOMElement matrix6x6 *= 1000.; // initial assumption: infinitely weak constraint const SurveyDet *survey = ali->survey(); - if (survey != NULL) { + if (survey != nullptr) { matrix6x6 = survey->errors(); // save the constraint information } ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6)); @@ -1092,9 +1092,9 @@ void MuonAlignmentInputXML::do_movelocal(const XERCES_CPP_NAMESPACE::DOMElement DOMAttr *node_x = node->getAttributeNode(str_x); DOMAttr *node_y = node->getAttributeNode(str_y); DOMAttr *node_z = node->getAttributeNode(str_z); - if (node_x == NULL) throw cms::Exception("XMLException") << " is missing required \"x\" attribute" << std::endl; - if (node_y == NULL) throw cms::Exception("XMLException") << " is missing required \"y\" attribute" << std::endl; - if (node_z == NULL) throw cms::Exception("XMLException") << " is missing required \"z\" attribute" << std::endl; + if (node_x == nullptr) throw cms::Exception("XMLException") << " is missing required \"x\" attribute" << std::endl; + if (node_y == nullptr) throw cms::Exception("XMLException") << " is missing required \"y\" attribute" << std::endl; + if (node_z == nullptr) throw cms::Exception("XMLException") << " is missing required \"z\" attribute" << std::endl; double x = parseDouble(node_x->getValue(), "x"); double y = parseDouble(node_y->getValue(), "y"); @@ -1111,7 +1111,7 @@ void MuonAlignmentInputXML::do_movelocal(const XERCES_CPP_NAMESPACE::DOMElement matrix6x6 *= 1000.; // initial assumption: infinitely weak constraint const SurveyDet *survey = ali->survey(); - if (survey != NULL) { + if (survey != nullptr) { matrix6x6 = survey->errors(); // save the constraint information } ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6)); @@ -1123,10 +1123,10 @@ void MuonAlignmentInputXML::do_rotatelocal(const XERCES_CPP_NAMESPACE::DOMElemen DOMAttr *node_axisy = node->getAttributeNode(str_axisy); DOMAttr *node_axisz = node->getAttributeNode(str_axisz); DOMAttr *node_angle = node->getAttributeNode(str_angle); - if (node_axisx == NULL) throw cms::Exception("XMLException") << " is missing required \"axisx\" attribute" << std::endl; - if (node_axisy == NULL) throw cms::Exception("XMLException") << " is missing required \"axisy\" attribute" << std::endl; - if (node_axisz == NULL) throw cms::Exception("XMLException") << " is missing required \"axisz\" attribute" << std::endl; - if (node_angle == NULL) throw cms::Exception("XMLException") << " is missing required \"angle\" attribute" << std::endl; + if (node_axisx == nullptr) throw cms::Exception("XMLException") << " is missing required \"axisx\" attribute" << std::endl; + if (node_axisy == nullptr) throw cms::Exception("XMLException") << " is missing required \"axisy\" attribute" << std::endl; + if (node_axisz == nullptr) throw cms::Exception("XMLException") << " is missing required \"axisz\" attribute" << std::endl; + if (node_angle == nullptr) throw cms::Exception("XMLException") << " is missing required \"angle\" attribute" << std::endl; double x = parseDouble(node_axisx->getValue(), "x"); double y = parseDouble(node_axisy->getValue(), "y"); @@ -1143,7 +1143,7 @@ void MuonAlignmentInputXML::do_rotatelocal(const XERCES_CPP_NAMESPACE::DOMElemen matrix6x6 *= 1000.; // initial assumption: infinitely weak constraint const SurveyDet *survey = ali->survey(); - if (survey != NULL) { + if (survey != nullptr) { matrix6x6 = survey->errors(); // save the constraint information } ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6)); @@ -1153,11 +1153,11 @@ void MuonAlignmentInputXML::do_rotatelocal(const XERCES_CPP_NAMESPACE::DOMElemen void MuonAlignmentInputXML::do_rotatebeamline(const XERCES_CPP_NAMESPACE::DOMElement *node, std::map &aliset, std::map &alitoideal) const { DOMAttr *node_rphi = node->getAttributeNode(str_rphi); DOMAttr *node_phi = node->getAttributeNode(str_phi); - if (node_rphi == NULL && node_phi == NULL) throw cms::Exception("XMLException") << " is missing required \"*phi\" attribute" << std::endl; - if (node_rphi != NULL && node_phi != NULL) throw cms::Exception("XMLException") << " can't have both an \"rphi\" and a \"phi\" attribute" << std::endl; + if (node_rphi == nullptr && node_phi == nullptr) throw cms::Exception("XMLException") << " is missing required \"*phi\" attribute" << std::endl; + if (node_rphi != nullptr && node_phi != nullptr) throw cms::Exception("XMLException") << " can't have both an \"rphi\" and a \"phi\" attribute" << std::endl; double value; - if (node_rphi != NULL) { + if (node_rphi != nullptr) { value = parseDouble(node_rphi->getValue(), "rphi"); } else { @@ -1172,7 +1172,7 @@ void MuonAlignmentInputXML::do_rotatebeamline(const XERCES_CPP_NAMESPACE::DOMEle double radius = pos.perp(); double phi0 = pos.phi(); double deltaphi = value; - if (node_rphi != NULL) deltaphi = value / radius; + if (node_rphi != nullptr) deltaphi = value / radius; ali->rotateAroundGlobalZ(deltaphi); ali->move(align::GlobalVector(radius * (cos(phi0 + deltaphi) - cos(phi0)), @@ -1183,7 +1183,7 @@ void MuonAlignmentInputXML::do_rotatebeamline(const XERCES_CPP_NAMESPACE::DOMEle matrix6x6 *= 1000.; // initial assumption: infinitely weak constraint const SurveyDet *survey = ali->survey(); - if (survey != NULL) { + if (survey != nullptr) { matrix6x6 = survey->errors(); // save the constraint information } ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6)); @@ -1195,10 +1195,10 @@ void MuonAlignmentInputXML::do_rotateglobalaxis(const XERCES_CPP_NAMESPACE::DOME DOMAttr *node_y = node->getAttributeNode(str_y); DOMAttr *node_z = node->getAttributeNode(str_z); DOMAttr *node_angle = node->getAttributeNode(str_angle); - if (node_x == NULL) throw cms::Exception("XMLException") << " is missing required \"x\" attribute" << std::endl; - if (node_y == NULL) throw cms::Exception("XMLException") << " is missing required \"y\" attribute" << std::endl; - if (node_z == NULL) throw cms::Exception("XMLException") << " is missing required \"z\" attribute" << std::endl; - if (node_angle == NULL) throw cms::Exception("XMLException") << " is missing required \"angle\" attribute" << std::endl; + if (node_x == nullptr) throw cms::Exception("XMLException") << " is missing required \"x\" attribute" << std::endl; + if (node_y == nullptr) throw cms::Exception("XMLException") << " is missing required \"y\" attribute" << std::endl; + if (node_z == nullptr) throw cms::Exception("XMLException") << " is missing required \"z\" attribute" << std::endl; + if (node_angle == nullptr) throw cms::Exception("XMLException") << " is missing required \"angle\" attribute" << std::endl; double x = parseDouble(node_x->getValue(), "x"); double y = parseDouble(node_y->getValue(), "y"); @@ -1232,7 +1232,7 @@ void MuonAlignmentInputXML::do_rotateglobalaxis(const XERCES_CPP_NAMESPACE::DOME matrix6x6 *= 1000.; // initial assumption: infinitely weak constraint const SurveyDet *survey = ali->survey(); - if (survey != NULL) { + if (survey != nullptr) { matrix6x6 = survey->errors(); // save the constraint information } ali->setSurvey(new SurveyDet(ali->surface(), matrix6x6)); diff --git a/Alignment/MuonAlignment/src/MuonAlignmentOutputXML.cc b/Alignment/MuonAlignment/src/MuonAlignmentOutputXML.cc index 267f380ee77b1..7964af5c3df89 100644 --- a/Alignment/MuonAlignment/src/MuonAlignmentOutputXML.cc +++ b/Alignment/MuonAlignment/src/MuonAlignmentOutputXML.cc @@ -162,7 +162,7 @@ void MuonAlignmentOutputXML::writeComponents(align::Alignables &alignables, const AlignableObjectId& objectIdProvider) const { align::Alignables::const_iterator ideal = ideals.begin(); for (align::Alignables::const_iterator alignable = alignables.begin(); alignable != alignables.end(); ++alignable) { - if (m_survey && (*alignable)->survey() == NULL) { + if (m_survey && (*alignable)->survey() == nullptr) { throw cms::Exception("Alignment") << "SurveyDets must all be defined when writing to XML" << std::endl; } // now I can assume it's okay everywhere @@ -280,7 +280,7 @@ void MuonAlignmentOutputXML::writeComponents(align::Alignables &alignables, str_relativeto = std::string("ideal"); - bool csc_debug=0; + bool csc_debug=false; if (csc_debug && !DT) { CSCDetId id(rawId); if(id.endcap()==1 && id.station()==1 && id.ring()==1 && id.chamber()==33 ){ @@ -302,7 +302,7 @@ void MuonAlignmentOutputXML::writeComponents(align::Alignables &alignables, } } - else if (m_relativeto == 2 && (*alignable)->mother() != NULL) { + else if (m_relativeto == 2 && (*alignable)->mother() != nullptr) { align::PositionType globalPosition = (*alignable)->mother()->globalPosition(); align::RotationType globalRotation = (*alignable)->mother()->globalRotation(); diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h index 5ea3649752b11..28f1aa1b7aefd 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h @@ -19,10 +19,10 @@ class MuonCSCChamberResidual: public MuonHitsChamberResidual // for CSC, the residual is chamber local x, projected by the strip measurement direction // for CSC, the resslope is dresx/dz, or tan(phi_y) - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double); + void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double) override; // dummy method - virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) {} + void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) override {} }; #endif // Alignment_MuonAlignmentAlgorithms_MuonCSCChamberResidual_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h index 899457614b8d0..999a4b6212971 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h @@ -20,10 +20,10 @@ class MuonDT13ChamberResidual: public MuonHitsChamberResidual // for DT13, the residual is chamber local x // for DT13, the resslope is dresx/dz, or tan(phi_y) - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double); + void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double) override; // dummy method - virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) {} + void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) override {} }; #endif // Alignment_MuonAlignmentAlgorithms_MuonDT13ChamberResidual_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h index 0a63dfcd93de6..caa9edd8176a5 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h @@ -18,10 +18,10 @@ class MuonDT2ChamberResidual: public MuonHitsChamberResidual // for DT2, the residual is chamber local y // for DT2, the resslope is dresy/dz, or tan(phi_x) - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double); + void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double) override; // dummy method - virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) {} + void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) override {} }; #endif // Alignment_MuonAlignmentAlgorithms_MuonDT2ChamberResidual_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals1DOFFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals1DOFFitter.h index 8cd66a31e25b0..38972f40de463 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals1DOFFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals1DOFFitter.h @@ -26,22 +26,22 @@ class MuonResiduals1DOFFitter: public MuonResidualsFitter { MuonResiduals1DOFFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment=true): MuonResidualsFitter(residualsModel, minHits, useResiduals, weightAlignment) {} - int type() const { return MuonResidualsFitter::k1DOF; } + int type() const override { return MuonResidualsFitter::k1DOF; } - int npar() { + int npar() override { if (residualsModel() == kPureGaussian || residualsModel() == kGaussPowerTails) return kNPar - 1; else if (residualsModel() == kPowerLawTails) return kNPar; else if (residualsModel() == kROOTVoigt) return kNPar; else assert(false); } - int ndata() { return kNData; } + int ndata() override { return kNData; } - double sumofweights(); - bool fit(Alignable *ali); - double plot(std::string name, TFileDirectory *dir, Alignable *ali); + double sumofweights() override; + bool fit(Alignable *ali) override; + double plot(std::string name, TFileDirectory *dir, Alignable *ali) override; protected: - void inform(TMinuit *tMinuit); + void inform(TMinuit *tMinuit) override; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonResiduals1DOFFitter_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals5DOFFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals5DOFFitter.h index d06d4bffb1038..ff8109164d73e 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals5DOFFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals5DOFFitter.h @@ -52,28 +52,28 @@ class MuonResiduals5DOFFitter: public MuonResidualsFitter }; MuonResiduals5DOFFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment=true): MuonResidualsFitter(residualsModel, minHits, useResiduals, weightAlignment) {} - virtual ~MuonResiduals5DOFFitter(){} + ~MuonResiduals5DOFFitter() override{} - int type() const { return MuonResidualsFitter::k5DOF; } + int type() const override { return MuonResidualsFitter::k5DOF; } - int npar() { + int npar() override { if (residualsModel() == kPureGaussian || residualsModel() == kPureGaussian2D || residualsModel() == kGaussPowerTails) return kNPar - 2; else if (residualsModel() == kPowerLawTails) return kNPar; else if (residualsModel() == kROOTVoigt) return kNPar; else assert(false); } - int ndata() { return kNData; } + int ndata() override { return kNData; } - double sumofweights(); - bool fit(Alignable *ali); - double plot(std::string name, TFileDirectory *dir, Alignable *ali); + double sumofweights() override; + bool fit(Alignable *ali) override; + double plot(std::string name, TFileDirectory *dir, Alignable *ali) override; - void correctBField(); + void correctBField() override; TTree * readNtuple(std::string fname, unsigned int wheel, unsigned int station, unsigned int sector, unsigned int preselected = 1); protected: - void inform(TMinuit *tMinuit); + void inform(TMinuit *tMinuit) override; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonResiduals5DOFFitter_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFFitter.h index dc7a9b20c09e5..225501d255f0e 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFFitter.h @@ -60,28 +60,28 @@ class MuonResiduals6DOFFitter: public MuonResidualsFitter }; MuonResiduals6DOFFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment=true): MuonResidualsFitter(residualsModel, minHits, useResiduals, weightAlignment) {} - virtual ~MuonResiduals6DOFFitter() {} + ~MuonResiduals6DOFFitter() override {} - int type() const { return MuonResidualsFitter::k6DOF; } + int type() const override { return MuonResidualsFitter::k6DOF; } - int npar() { + int npar() override { if (residualsModel() == kPureGaussian || residualsModel() == kPureGaussian2D || residualsModel() == kGaussPowerTails) return kNPar - 4; else if (residualsModel() == kPowerLawTails) return kNPar; else if (residualsModel() == kROOTVoigt) return kNPar; else assert(false); } - int ndata() { return kNData; } + int ndata() override { return kNData; } - double sumofweights(); - bool fit(Alignable *ali); - double plot(std::string name, TFileDirectory *dir, Alignable *ali); + double sumofweights() override; + bool fit(Alignable *ali) override; + double plot(std::string name, TFileDirectory *dir, Alignable *ali) override; - void correctBField(); + void correctBField() override; TTree * readNtuple(std::string fname, unsigned int wheel, unsigned int station, unsigned int sector, unsigned int preselected = 1); protected: - void inform(TMinuit *tMinuit); + void inform(TMinuit *tMinuit) override; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonResiduals6DOFFitter_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFrphiFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFrphiFitter.h index 3336e79d3b81c..1521a5e781785 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFrphiFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFrphiFitter.h @@ -56,29 +56,29 @@ class MuonResiduals6DOFrphiFitter: public MuonResidualsFitter MuonResidualsFitter(residualsModel, minHits, useResiduals, weightAlignment) {} #endif - virtual ~MuonResiduals6DOFrphiFitter() {} + ~MuonResiduals6DOFrphiFitter() override {} - int type() const { return MuonResidualsFitter::k6DOFrphi; } + int type() const override { return MuonResidualsFitter::k6DOFrphi; } - int npar() + int npar() override { if (residualsModel() == kPureGaussian || residualsModel() == kPureGaussian2D || residualsModel() == kGaussPowerTails) return kNPar - 2; else if (residualsModel() == kPowerLawTails) return kNPar; else if (residualsModel() == kROOTVoigt) return kNPar; else assert(false); } - int ndata() { return kNData; } + int ndata() override { return kNData; } - double sumofweights(); - bool fit(Alignable *ali); - double plot(std::string name, TFileDirectory *dir, Alignable *ali); + double sumofweights() override; + bool fit(Alignable *ali) override; + double plot(std::string name, TFileDirectory *dir, Alignable *ali) override; - void correctBField(); + void correctBField() override; TTree * readNtuple(std::string fname, unsigned int endcap, unsigned int station, unsigned int ring, unsigned int chamber, unsigned int preselected = 1); protected: - void inform(TMinuit *tMinuit); + void inform(TMinuit *tMinuit) override; private: //const CSCGeometry *m_cscGeometry; diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsAngleFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsAngleFitter.h index e99ed700f2793..50b89acf071cc 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsAngleFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsAngleFitter.h @@ -29,22 +29,22 @@ class MuonResidualsAngleFitter: public MuonResidualsFitter { MuonResidualsAngleFitter(int residualsModel, int minHitsPerRegion, int useResiduals, bool weightAlignment=true): MuonResidualsFitter(residualsModel, minHitsPerRegion, useResiduals, weightAlignment) {} - int type() const { return MuonResidualsFitter::kAngleFitter; } + int type() const override { return MuonResidualsFitter::kAngleFitter; } - int npar() { + int npar() override { if (residualsModel() == kPureGaussian || residualsModel() == kGaussPowerTails) return kNPar - 1; else if (residualsModel() == kPowerLawTails) return kNPar; else if (residualsModel() == kROOTVoigt) return kNPar; else assert(false); } - int ndata() { return kNData; } + int ndata() override { return kNData; } - bool fit(Alignable *ali); - double sumofweights() { return numResiduals(); } - double plot(std::string name, TFileDirectory *dir, Alignable *ali); + bool fit(Alignable *ali) override; + double sumofweights() override { return numResiduals(); } + double plot(std::string name, TFileDirectory *dir, Alignable *ali) override; protected: - void inform(TMinuit *tMinuit); + void inform(TMinuit *tMinuit) override; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonResidualsAngleFitter_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsBfieldAngleFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsBfieldAngleFitter.h index 94142da0176c3..c0a2b233a53d1 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsBfieldAngleFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsBfieldAngleFitter.h @@ -30,22 +30,22 @@ class MuonResidualsBfieldAngleFitter: public MuonResidualsFitter { MuonResidualsBfieldAngleFitter(int residualsModel, int minHitsPerRegion, int useResiduals, bool weightAlignment=true): MuonResidualsFitter(residualsModel, minHitsPerRegion, useResiduals, weightAlignment) {} - int type() const { return MuonResidualsFitter::kAngleBfieldFitter; } + int type() const override { return MuonResidualsFitter::kAngleBfieldFitter; } - int npar() { + int npar() override { if (residualsModel() == kPureGaussian || residualsModel() == kGaussPowerTails) return kNPar - 1; else if (residualsModel() == kPowerLawTails) return kNPar; else if (residualsModel() == kROOTVoigt) return kNPar; else assert(false); } - int ndata() { return kNData; } + int ndata() override { return kNData; } - bool fit(Alignable *ali); - double sumofweights() { return numResiduals(); } - double plot(std::string name, TFileDirectory *dir, Alignable *ali); + bool fit(Alignable *ali) override; + double sumofweights() override { return numResiduals(); } + double plot(std::string name, TFileDirectory *dir, Alignable *ali) override; protected: - void inform(TMinuit *tMinuit); + void inform(TMinuit *tMinuit) override; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonResidualsBfieldAngleFitter_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsPositionFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsPositionFitter.h index af619de0157eb..7053160aa7bce 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsPositionFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsPositionFitter.h @@ -31,22 +31,22 @@ class MuonResidualsPositionFitter: public MuonResidualsFitter { MuonResidualsPositionFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment=true): MuonResidualsFitter(residualsModel, minHits, useResiduals, weightAlignment) {} - int type() const { return MuonResidualsFitter::kPositionFitter; } + int type() const override { return MuonResidualsFitter::kPositionFitter; } - int npar() { + int npar() override { if (residualsModel() == kPureGaussian || residualsModel() == kGaussPowerTails) return kNPar - 1; else if (residualsModel() == kPowerLawTails) return kNPar; else if (residualsModel() == kROOTVoigt) return kNPar; else assert(false); } - int ndata() { return kNData; } + int ndata() override { return kNData; } - bool fit(Alignable *ali); - double sumofweights() { return numResiduals(); } - double plot(std::string name, TFileDirectory *dir, Alignable *ali); + bool fit(Alignable *ali) override; + double sumofweights() override { return numResiduals(); } + double plot(std::string name, TFileDirectory *dir, Alignable *ali) override; protected: - void inform(TMinuit *tMinuit); + void inform(TMinuit *tMinuit) override; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonResidualsPositionFitter_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsTwoBin.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsTwoBin.h index 40905e9a06535..f103df5d8ff6d 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsTwoBin.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsTwoBin.h @@ -16,8 +16,8 @@ class MuonResidualsTwoBin { public: MuonResidualsTwoBin(bool twoBin, MuonResidualsFitter *pos, MuonResidualsFitter *neg): m_twoBin(twoBin), m_pos(pos), m_neg(neg) {}; ~MuonResidualsTwoBin() { - if (m_pos != NULL) delete m_pos; - if (m_neg != NULL) delete m_neg; + if (m_pos != nullptr) delete m_pos; + if (m_neg != nullptr) delete m_neg; }; int residualsModel() const { assert(m_pos->residualsModel() == m_neg->residualsModel()); return m_pos->residualsModel(); }; diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h index a05ebf0afb4e0..fda3bb7d2a759 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h @@ -17,11 +17,11 @@ class MuonTrackCSCChamberResidual: public MuonChamberResidual DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double) = 0; + void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double) override = 0; // for CSC, the residual is chamber local x, projected by the strip measurement direction // for CSC, the resslope is dresx/dz, or tan(phi_y) - virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *); + void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) override; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonTrackCSCChamberResidual_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h index 1dc45dcacf124..a9d1ed54d1125 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h @@ -17,11 +17,11 @@ class MuonTrackDT13ChamberResidual: public MuonChamberResidual DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double) = 0; + void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double) override = 0; // for DT13, the residual is chamber local x // for DT13, the resslope is dresx/dz, or tan(phi_y) - virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *); + void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) override; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonTrackDT13ChamberResidual_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h index 970f17689d296..3c01fba5eee2e 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h @@ -17,11 +17,11 @@ class MuonTrackDT2ChamberResidual: public MuonChamberResidual DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double) = 0; + void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double) override = 0; // for DT2, the residual is chamber local y // for DT2, the resslope is dresy/dz, or tan(phi_x) - virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *); + void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) override; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonTrackDT2ChamberResidual_H diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/CSCAlignmentCorrections.cc b/Alignment/MuonAlignmentAlgorithms/plugins/CSCAlignmentCorrections.cc index c1f744b2c403f..db18ccaf43e7c 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/CSCAlignmentCorrections.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/CSCAlignmentCorrections.cc @@ -75,7 +75,7 @@ void CSCAlignmentCorrections::applyAlignment(AlignableNavigator *alignableNaviga // get the alignable (or two alignables if in ME1/1) const DetId id(m_id[i]); Alignable *alignable = alignableNavigator->alignableFromDetId(id).alignable(); - Alignable *also = NULL; + Alignable *also = nullptr; if (combineME11 && m_id[i].station() == 1 && m_id[i].ring() == 1) { CSCDetId alsoid(m_id[i].endcap(), 1, 4, m_id[i].chamber(), 0); const DetId alsoid2(alsoid); @@ -112,7 +112,7 @@ void CSCAlignmentCorrections::applyAlignment(AlignableNavigator *alignableNaviga alignable->setAlignmentParameters(parnew); alignmentParameterStore->applyParameters(alignable); alignable->alignmentParameters()->setValid(true); - if (also != NULL) { + if (also != nullptr) { AlignmentParameters *parnew2 = also->alignmentParameters()->cloneFromSelected(params, cov); also->setAlignmentParameters(parnew2); alignmentParameterStore->applyParameters(also); diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/CSCChamberFitter.cc b/Alignment/MuonAlignmentAlgorithms/plugins/CSCChamberFitter.cc index 5f0558ff37321..2b7051d10d2cd 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/CSCChamberFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/CSCChamberFitter.cc @@ -13,7 +13,7 @@ const double infinity = 0.1; // this is huge because all alignments are angles CSCChamberFitter::CSCChamberFitter(const edm::ParameterSet &iConfig, std::vector &residualsConstraints) { m_name = iConfig.getParameter("name"); m_alignables = iConfig.getParameter >("alignables"); - if (m_alignables.size() == 0) { + if (m_alignables.empty()) { throw cms::Exception("BadConfig") << "Fitter " << m_name << " has no alignables!" << std::endl; } @@ -296,7 +296,7 @@ bool CSCChamberFitter::fit(std::vector &corrections) c } } TMatrixDEigen tmatrixdeigen(tmatrix); - TMatrixD basis = tmatrixdeigen.GetEigenVectors(); + const TMatrixD& basis = tmatrixdeigen.GetEigenVectors(); TMatrixD invbasis = tmatrixdeigen.GetEigenVectors(); invbasis.Invert(); TMatrixD diagonalized = invbasis * (tmatrix * basis); @@ -332,7 +332,7 @@ void CSCChamberFitter::radiusCorrection(AlignableNavigator *alignableNavigator, double num_total = 0.; for (std::vector::const_iterator constraint = m_constraints.begin(); constraint != m_constraints.end(); ++constraint) { CSCPairResidualsConstraint *residualsConstraint = dynamic_cast(*constraint); - if (residualsConstraint != NULL) { + if (residualsConstraint != nullptr) { if (residualsConstraint->valid()) { sum_phipos_residuals += residualsConstraint->value(); @@ -351,11 +351,11 @@ void CSCChamberFitter::radiusCorrection(AlignableNavigator *alignableNavigator, for (std::vector::const_iterator constraint = m_constraints.begin(); constraint != m_constraints.end(); ++constraint) { CSCPairResidualsConstraint *residualsConstraint = dynamic_cast(*constraint); - if (residualsConstraint != NULL) { + if (residualsConstraint != nullptr) { const DetId id(residualsConstraint->id_i()); Alignable *alignable = alignableNavigator->alignableFromDetId(id).alignable(); - Alignable *also = NULL; + Alignable *also = nullptr; if (combineME11 && residualsConstraint->id_i().station() == 1 && residualsConstraint->id_i().ring() == 1) { CSCDetId alsoid(residualsConstraint->id_i().endcap(), 1, 4, residualsConstraint->id_i().chamber(), 0); const DetId alsoid2(alsoid); @@ -372,7 +372,7 @@ void CSCChamberFitter::radiusCorrection(AlignableNavigator *alignableNavigator, alignable->setAlignmentParameters(parnew); alignmentParameterStore->applyParameters(alignable); alignable->alignmentParameters()->setValid(true); - if (also != NULL) { + if (also != nullptr) { AlignmentParameters *parnew2 = also->alignmentParameters()->cloneFromSelected(params, cov); also->setAlignmentParameters(parnew2); alignmentParameterStore->applyParameters(also); diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsAlignmentAlgorithm.cc b/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsAlignmentAlgorithm.cc index 77102485d4c95..16a645a467dee 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsAlignmentAlgorithm.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsAlignmentAlgorithm.cc @@ -44,11 +44,11 @@ CSCOverlapsAlignmentAlgorithm::CSCOverlapsAlignmentAlgorithm(const edm::Paramete m_propagatorName = iConfig.getParameter("TrackTransformer").getParameter("Propagator"); } else { - m_trackTransformer = NULL; + m_trackTransformer = nullptr; m_propagatorName = std::string(""); } - m_propagatorPointer = NULL; + m_propagatorPointer = nullptr; if (m_makeHistograms) { edm::Service tFileService; @@ -137,47 +137,47 @@ CSCOverlapsAlignmentAlgorithm::CSCOverlapsAlignmentAlgorithm(const edm::Paramete m_RPhipos_mem4 = tFileService->make("RPhipos_mem4", "Positions: ME-4", 144, -M_PI, M_PI, 21, 0., 700.); } else { - m_histP10 = NULL; - m_histP100 = NULL; - m_histP1000 = NULL; - m_hitsPerChamber = NULL; - m_fiducial_ME11 = NULL; - m_fiducial_ME12 = NULL; - m_fiducial_MEx1 = NULL; - m_fiducial_MEx2 = NULL; - m_slope = NULL; - m_slope_MEp4 = NULL; - m_slope_MEp3 = NULL; - m_slope_MEp2 = NULL; - m_slope_MEp1 = NULL; - m_slope_MEm1 = NULL; - m_slope_MEm2 = NULL; - m_slope_MEm3 = NULL; - m_slope_MEm4 = NULL; - m_slopeResiduals = NULL; - m_slopeResiduals_weighted = NULL; - m_slopeResiduals_normalized = NULL; - m_offsetResiduals = NULL; - m_offsetResiduals_weighted = NULL; - m_offsetResiduals_normalized = NULL; - m_drdz = NULL; - m_occupancy = NULL; - m_XYpos_mep1 = NULL; - m_XYpos_mep2 = NULL; - m_XYpos_mep3 = NULL; - m_XYpos_mep4 = NULL; - m_XYpos_mem1 = NULL; - m_XYpos_mem2 = NULL; - m_XYpos_mem3 = NULL; - m_XYpos_mem4 = NULL; - m_RPhipos_mep1 = NULL; - m_RPhipos_mep2 = NULL; - m_RPhipos_mep3 = NULL; - m_RPhipos_mep4 = NULL; - m_RPhipos_mem1 = NULL; - m_RPhipos_mem2 = NULL; - m_RPhipos_mem3 = NULL; - m_RPhipos_mem4 = NULL; + m_histP10 = nullptr; + m_histP100 = nullptr; + m_histP1000 = nullptr; + m_hitsPerChamber = nullptr; + m_fiducial_ME11 = nullptr; + m_fiducial_ME12 = nullptr; + m_fiducial_MEx1 = nullptr; + m_fiducial_MEx2 = nullptr; + m_slope = nullptr; + m_slope_MEp4 = nullptr; + m_slope_MEp3 = nullptr; + m_slope_MEp2 = nullptr; + m_slope_MEp1 = nullptr; + m_slope_MEm1 = nullptr; + m_slope_MEm2 = nullptr; + m_slope_MEm3 = nullptr; + m_slope_MEm4 = nullptr; + m_slopeResiduals = nullptr; + m_slopeResiduals_weighted = nullptr; + m_slopeResiduals_normalized = nullptr; + m_offsetResiduals = nullptr; + m_offsetResiduals_weighted = nullptr; + m_offsetResiduals_normalized = nullptr; + m_drdz = nullptr; + m_occupancy = nullptr; + m_XYpos_mep1 = nullptr; + m_XYpos_mep2 = nullptr; + m_XYpos_mep3 = nullptr; + m_XYpos_mep4 = nullptr; + m_XYpos_mem1 = nullptr; + m_XYpos_mem2 = nullptr; + m_XYpos_mem3 = nullptr; + m_XYpos_mem4 = nullptr; + m_RPhipos_mep1 = nullptr; + m_RPhipos_mep2 = nullptr; + m_RPhipos_mep3 = nullptr; + m_RPhipos_mep4 = nullptr; + m_RPhipos_mem1 = nullptr; + m_RPhipos_mem2 = nullptr; + m_RPhipos_mem3 = nullptr; + m_RPhipos_mem4 = nullptr; } } @@ -187,7 +187,7 @@ void CSCOverlapsAlignmentAlgorithm::initialize(const edm::EventSetup& iSetup, Al m_alignmentParameterStore = alignmentParameterStore; m_alignables = m_alignmentParameterStore->alignables(); - if (alignableTracker == NULL) m_alignableNavigator = new AlignableNavigator(alignableMuon); + if (alignableTracker == nullptr) m_alignableNavigator = new AlignableNavigator(alignableMuon); else m_alignableNavigator = new AlignableNavigator(alignableTracker, alignableMuon); for (std::vector::const_iterator alignable = m_alignables.begin(); alignable != m_alignables.end(); ++alignable) { @@ -209,7 +209,7 @@ void CSCOverlapsAlignmentAlgorithm::initialize(const edm::EventSetup& iSetup, Al (*residualsConstraint)->setZplane(&*cscGeometry); } - if (m_readTemporaryFiles.size() != 0) { + if (!m_readTemporaryFiles.empty()) { std::vector input; for (std::vector::const_iterator fileName = m_readTemporaryFiles.begin(); fileName != m_readTemporaryFiles.end(); ++fileName) { input.push_back(new std::ifstream(fileName->c_str())); @@ -241,7 +241,7 @@ void CSCOverlapsAlignmentAlgorithm::run(const edm::EventSetup& iSetup, const Eve edm::ESHandle transientTrackBuilder; iSetup.get().get("TransientTrackBuilder", transientTrackBuilder); - if (m_trackTransformer != NULL) m_trackTransformer->setServices(iSetup); + if (m_trackTransformer != nullptr) m_trackTransformer->setServices(iSetup); const ConstTrajTrackPairCollection &trajtracks = eventInfo.trajTrackPairs(); for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end(); ++trajtrack) { diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsAlignmentAlgorithm.h b/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsAlignmentAlgorithm.h index f96c7f59dd669..58d21b49c09ef 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsAlignmentAlgorithm.h +++ b/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsAlignmentAlgorithm.h @@ -61,13 +61,13 @@ class CSCOverlapsAlignmentAlgorithm : public AlignmentAlgorithmBase { public: CSCOverlapsAlignmentAlgorithm(const edm::ParameterSet& iConfig); - ~CSCOverlapsAlignmentAlgorithm(); + ~CSCOverlapsAlignmentAlgorithm() override; void initialize(const edm::EventSetup& iSetup, AlignableTracker* alignableTracker, AlignableMuon* alignableMuon, - AlignableExtras* alignableExtras, AlignmentParameterStore* alignmentParameterStore); - void run(const edm::EventSetup& iSetup, const EventInfo &eventInfo); + AlignableExtras* alignableExtras, AlignmentParameterStore* alignmentParameterStore) override; + void run(const edm::EventSetup& iSetup, const EventInfo &eventInfo) override; - void terminate(const edm::EventSetup& iSetup); + void terminate(const edm::EventSetup& iSetup) override; // having to make read-only accessors for all of these would be ridiculous, so they're public TH1F *m_hitsPerChamber; diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsBeamSplashCut.cc b/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsBeamSplashCut.cc index e77ba8e3e0702..31dc1f2968ef0 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsBeamSplashCut.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsBeamSplashCut.cc @@ -40,12 +40,12 @@ class CSCOverlapsBeamSplashCut : public edm::EDFilter { public: explicit CSCOverlapsBeamSplashCut(const edm::ParameterSet&); - ~CSCOverlapsBeamSplashCut(); + ~CSCOverlapsBeamSplashCut() 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::InputTag m_src; diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsTrackPreparation.cc b/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsTrackPreparation.cc index 9f87c09a66db8..d23406dc5da61 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsTrackPreparation.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/CSCOverlapsTrackPreparation.cc @@ -62,14 +62,14 @@ class CSCOverlapsTrackPreparation : public edm::EDProducer { public: explicit CSCOverlapsTrackPreparation(const edm::ParameterSet&); - ~CSCOverlapsTrackPreparation(); + ~CSCOverlapsTrackPreparation() override; private: enum {kNothing, kSimpleFit, kAllButOne, kExtrapolate}; - 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 --------------------------- edm::InputTag m_src; @@ -166,7 +166,7 @@ CSCOverlapsTrackPreparation::produce(edm::Event& iEvent, const edm::EventSetup& assert(transHits.size() == TSOSes.size()); // build the trajectory - if (clonedHits.size() > 0) { + if (!clonedHits.empty()) { PTrajectoryStateOnDet const PTraj = trajectoryStateTransform::persistentState(*(TSOSes.begin()), clonedHits.begin()->geographicalId().rawId()); TrajectorySeed trajectorySeed(PTraj, clonedHits, alongMomentum); Trajectory trajectory(trajectorySeed, alongMomentum); diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/CSCPairResidualsConstraint.cc b/Alignment/MuonAlignmentAlgorithms/plugins/CSCPairResidualsConstraint.cc index d4882333de67b..686b61a190e12 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/CSCPairResidualsConstraint.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/CSCPairResidualsConstraint.cc @@ -59,9 +59,9 @@ void CSCPairResidualsConstraint::configure(CSCOverlapsAlignmentAlgorithm *parent m_radial = tFileService->make(name3.str().c_str(), title.str().c_str(), 700, 0., 700.); } else { - m_slopeResiduals = NULL; - m_offsetResiduals = NULL; - m_radial = NULL; + m_slopeResiduals = nullptr; + m_offsetResiduals = nullptr; + m_radial = nullptr; } } diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/CSCPairResidualsConstraint.h b/Alignment/MuonAlignmentAlgorithms/plugins/CSCPairResidualsConstraint.h index 34665befbce7b..2872663db71ed 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/CSCPairResidualsConstraint.h +++ b/Alignment/MuonAlignmentAlgorithms/plugins/CSCPairResidualsConstraint.h @@ -30,9 +30,9 @@ class CSCPairResidualsConstraint : public CSCPairConstraint { : CSCPairConstraint(i, j, 0., 0.) , m_identifier(identifier), m_id_i(id_i), m_id_j(id_j) , m_sum1(0.), m_sumx(0.), m_sumy(0.), m_sumxx(0.), m_sumyy(0.), m_sumxy(0.), m_sumN(0) - , m_Zplane(1000.), m_iZ1(1000.), m_iZ6(1000.), m_jZ1(1000.), m_jZ6(1000.), m_cscGeometry(NULL), m_propagator(NULL) + , m_Zplane(1000.), m_iZ1(1000.), m_iZ6(1000.), m_jZ1(1000.), m_jZ6(1000.), m_cscGeometry(nullptr), m_propagator(nullptr) {}; - virtual ~CSCPairResidualsConstraint() {}; + ~CSCPairResidualsConstraint() override {}; enum { kModePhiy, @@ -41,11 +41,11 @@ class CSCPairResidualsConstraint : public CSCPairConstraint { kModeRadius }; - double value() const; - double error() const; + double value() const override; + double error() const override; CSCDetId id_i() const { return m_id_i; }; CSCDetId id_j() const { return m_id_j; }; - bool valid() const; + bool valid() const override; double radius(bool is_i) const { return m_cscGeometry->idToDet((is_i ? m_id_i : m_id_j))->surface().position().perp(); }; void configure(CSCOverlapsAlignmentAlgorithm *parent); diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc index e05a8f8e9d35b..849b7f83f5777 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc @@ -76,7 +76,7 @@ class MuonAlignmentFromReference : public AlignmentAlgorithmBase public: MuonAlignmentFromReference(const edm::ParameterSet& cfg); - virtual ~MuonAlignmentFromReference(); + ~MuonAlignmentFromReference() override; void initialize(const edm::EventSetup& iSetup, AlignableTracker* alignableTracker, @@ -231,7 +231,7 @@ class MuonAlignmentFromReference : public AlignmentAlgorithmBase tfile.ls(); } - m_ttree = NULL; + m_ttree = nullptr; if (m_createNtuple) bookNtuple(); m_counter_events = 0; @@ -313,7 +313,7 @@ void MuonAlignmentFromReference::initialize(const edm::EventSetup& iSetup, AlignableExtras* extras, AlignmentParameterStore* alignmentParameterStore) { - if (alignableMuon == NULL) + if (alignableMuon == nullptr) throw cms::Exception("MuonAlignmentFromReference") << "doMuon must be set to True" << std::endl; m_alignableNavigator = new AlignableNavigator(alignableMuon); @@ -422,7 +422,7 @@ void MuonAlignmentFromReference::initialize(const edm::EventSetup& iSetup, std::vector all_DT_chambers = alignableMuon->DTChambers(); std::vector all_CSC_chambers = alignableMuon->CSCChambers(); std::vector reference; - if (m_reference.size()) parseReference(reference, all_DT_chambers, all_CSC_chambers); + if (!m_reference.empty()) parseReference(reference, all_DT_chambers, all_CSC_chambers); alignmentParameterStore->setAlignmentPositionError(all_DT_chambers, 100000000., 0.); alignmentParameterStore->setAlignmentPositionError(all_CSC_chambers, 100000000., 0.); @@ -451,7 +451,7 @@ void MuonAlignmentFromReference::run(const edm::EventSetup& iSetup, const EventI { if (m_debug) std::cout << "JUST BEFORE LOOP OVER trajTrackPairs" << std::endl; // const ConstTrajTrackPairCollection &trajtracks = eventInfo.trajTrackPairs_; // trajTrackPairs_ now private - const ConstTrajTrackPairCollection trajtracks = eventInfo.trajTrackPairs(); + const ConstTrajTrackPairCollection& trajtracks = eventInfo.trajTrackPairs(); for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end(); ++trajtrack) { @@ -550,7 +550,7 @@ void MuonAlignmentFromReference::processMuonResidualsFromTrack(MuonResidualsFrom MuonChamberResidual *dt2 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT2); m_counter_station123++; - if (dt13 != NULL && dt2 != NULL) + if (dt13 != nullptr && dt2 != nullptr) { m_counter_station123valid++; if (dt13->numHits() >= m_minDT13Hits) @@ -613,7 +613,7 @@ void MuonAlignmentFromReference::processMuonResidualsFromTrack(MuonResidualsFrom MuonChamberResidual *dt13 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT13); m_counter_station4++; - if (dt13 != NULL) + if (dt13 != nullptr) { m_counter_station4valid++; if (dt13->numHits() >= m_minDT13Hits) @@ -664,7 +664,7 @@ void MuonAlignmentFromReference::processMuonResidualsFromTrack(MuonResidualsFrom { MuonChamberResidual *csc = mrft.chamberResidual(*chamberId, MuonChamberResidual::kCSC); m_counter_csc++; - if (csc != NULL) + if (csc != nullptr) { m_counter_cscvalid++; if (csc->numHits() >= m_minCSCHits) @@ -751,7 +751,7 @@ void MuonAlignmentFromReference::terminate(const edm::EventSetup& iSetup) TStopwatch stop_watch; // collect temporary files - if (m_readTemporaryFiles.size() != 0) + if (!m_readTemporaryFiles.empty()) { stop_watch.Start(); readTmpFiles(); @@ -1439,7 +1439,7 @@ void MuonAlignmentFromReference::readTmpFiles() FILE *file; int size; file = fopen( (*fileName).c_str(), "r"); - if (file == NULL) + if (file == nullptr) throw cms::Exception("MuonAlignmentFromReference") << "file \"" << *fileName << "\" can't be opened (doesn't exist?)" << std::endl; fread(&size, sizeof(int), 1, file); diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentPreFilter.cc b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentPreFilter.cc index df36ec3e2942f..142beae27f983 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentPreFilter.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentPreFilter.cc @@ -32,12 +32,12 @@ class MuonAlignmentPreFilter : public edm::EDFilter { public: explicit MuonAlignmentPreFilter(const edm::ParameterSet&); - ~MuonAlignmentPreFilter() {} + ~MuonAlignmentPreFilter() 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/Alignment/MuonAlignmentAlgorithms/plugins/MuonMillepedeAlgorithm.h b/Alignment/MuonAlignmentAlgorithms/plugins/MuonMillepedeAlgorithm.h index 0fc080fc7f795..bc45074cbb6b7 100755 --- a/Alignment/MuonAlignmentAlgorithms/plugins/MuonMillepedeAlgorithm.h +++ b/Alignment/MuonAlignmentAlgorithms/plugins/MuonMillepedeAlgorithm.h @@ -26,21 +26,21 @@ class MuonMillepedeAlgorithm : public AlignmentAlgorithmBase MuonMillepedeAlgorithm(const edm::ParameterSet& cfg); /// Destructor - ~MuonMillepedeAlgorithm() {}; + ~MuonMillepedeAlgorithm() override {}; /// Call at beginning of job void initialize( const edm::EventSetup& setup, AlignableTracker* tracker, AlignableMuon* muon, AlignableExtras* extras, - AlignmentParameterStore* store); + AlignmentParameterStore* store) override; /// Call at end of job - void terminate(const edm::EventSetup& setup); + void terminate(const edm::EventSetup& setup) override; /// Run the algorithm - void run(const edm::EventSetup& setup, const EventInfo &eventInfo); + void run(const edm::EventSetup& setup, const EventInfo &eventInfo) override; void updateInfo(const AlgebraicMatrix&, const AlgebraicMatrix&, const AlgebraicMatrix&, std::string); diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/MuonMillepedeTrackRefitter.h b/Alignment/MuonAlignmentAlgorithms/plugins/MuonMillepedeTrackRefitter.h index 2bb612279da71..a57742df879dd 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/MuonMillepedeTrackRefitter.h +++ b/Alignment/MuonAlignmentAlgorithms/plugins/MuonMillepedeTrackRefitter.h @@ -47,11 +47,11 @@ class MuonMillepedeTrackRefitter: public edm::EDProducer { MuonMillepedeTrackRefitter(const edm::ParameterSet& pset); /// Destructor - virtual ~MuonMillepedeTrackRefitter(); + ~MuonMillepedeTrackRefitter() override; // Operations - virtual void produce(edm::Event & event, const edm::EventSetup& eventSetup); + void produce(edm::Event & event, const edm::EventSetup& eventSetup) override; protected: diff --git a/Alignment/MuonAlignmentAlgorithms/src/DTMuonLocalAlignment.cc b/Alignment/MuonAlignmentAlgorithms/src/DTMuonLocalAlignment.cc index b9d5590a391f1..0a9d7161897db 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/DTMuonLocalAlignment.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/DTMuonLocalAlignment.cc @@ -5,7 +5,7 @@ DTMuonLocalAlignment::DTMuonLocalAlignment() : - tali(0), f(0) + tali(nullptr), f(nullptr) {} DTMuonLocalAlignment::~DTMuonLocalAlignment(){} diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals1DOFFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals1DOFFitter.cc index acca679604303..315a7e0d26ab8 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals1DOFFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals1DOFFitter.cc @@ -147,7 +147,7 @@ double MuonResiduals1DOFFitter::plot(std::string name, TFileDirectory *dir, Alig TH1F *hist_residual_raw = dir->make(name_residual_raw.str().c_str(), "", 100, min_residual, max_residual); name_residual << "_fit"; - TF1 *fit_residual = NULL; + TF1 *fit_residual = nullptr; if (residualsModel() == kPureGaussian) { fit_residual = new TF1(name_residual.str().c_str(), MuonResidualsFitter_pureGaussian_TF1, min_residual, max_residual, 3); fit_residual->SetParameters(MuonResiduals1DOFFitter_sum_of_weights * (max_residual - min_residual)/100., 10.*value(kAlign), 10.*value(kSigma)); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals5DOFFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals5DOFFitter.cc index 9796627e24a2d..0717523d1785b 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals5DOFFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals5DOFFitter.cc @@ -318,8 +318,8 @@ double MuonResiduals5DOFFitter::plot(std::string name, TFileDirectory *dir, Alig name_residual_trackdydz += "_fit"; name_resslope_trackdydz += "_fit"; - TF1 *fit_residual = NULL; - TF1 *fit_resslope = NULL; + TF1 *fit_residual = nullptr; + TF1 *fit_resslope = nullptr; if (residualsModel() == kPureGaussian || residualsModel() == kPureGaussian2D) { fit_residual = new TF1(name_residual.c_str(), MuonResidualsFitter_pureGaussian_TF1, min_residual, max_residual, 3); fit_residual->SetParameters(sum_of_weights * (max_residual - min_residual)/bins_residual, 10.*value(kAlignX), 10.*value(kResidSigma)); @@ -506,7 +506,7 @@ TTree * MuonResiduals5DOFFitter::readNtuple(std::string fname, unsigned int whee // Create new temporary file TFile *tmpf = new TFile("small_tree_fit.root","recreate"); - assert(tmpf!=0); + assert(tmpf!=nullptr); // filter the tree (temporarily lives in the new file) TTree *tt = t->CopyTree(Form("is_dt && ring_wheel==%d && station==%d && sector==%d && select==%d", wheel, station, sector, (bool)preselected)); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals6DOFFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals6DOFFitter.cc index 6a4b3a6484275..a56e9cb806045 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals6DOFFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals6DOFFitter.cc @@ -484,10 +484,10 @@ double MuonResiduals6DOFFitter::plot(std::string name, TFileDirectory *dir, Alig name_dxdz_trackdydz += "_fit"; name_dydz_trackdydz += "_fit"; - TF1 *fit_x = NULL; - TF1 *fit_y = NULL; - TF1 *fit_dxdz = NULL; - TF1 *fit_dydz = NULL; + TF1 *fit_x = nullptr; + TF1 *fit_y = nullptr; + TF1 *fit_dxdz = nullptr; + TF1 *fit_dydz = nullptr; if (residualsModel() == kPureGaussian || residualsModel() == kPureGaussian2D) { fit_x = new TF1(name_x.c_str(), MuonResidualsFitter_pureGaussian_TF1, min_x, max_x, 3); fit_x->SetParameters(sum_of_weights * (max_x - min_x)/bins, 10.*value(kAlignX), 10.*value(kResidXSigma)); @@ -800,7 +800,7 @@ TTree * MuonResiduals6DOFFitter::readNtuple(std::string fname, unsigned int whee // Create new temporary file TFile *tmpf = new TFile("small_tree_fit.root","recreate"); - assert(tmpf!=0); + assert(tmpf!=nullptr); // filter the tree (temporarily lives in the new file) TTree *tt = t->CopyTree(Form("is_dt && ring_wheel==%d && station==%d && sector==%d && select==%d", wheel, station, sector, (bool)preselected)); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals6DOFrphiFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals6DOFrphiFitter.cc index 91e336e62876b..a76d2decd6f6d 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals6DOFrphiFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResiduals6DOFrphiFitter.cc @@ -353,8 +353,8 @@ double MuonResiduals6DOFrphiFitter::plot(std::string name, TFileDirectory *dir, name_residual_trackdydz += "_fit"; name_resslope_trackdydz += "_fit"; - TF1 *fit_residual = NULL; - TF1 *fit_resslope = NULL; + TF1 *fit_residual = nullptr; + TF1 *fit_resslope = nullptr; if (residualsModel() == kPureGaussian || residualsModel() == kPureGaussian2D) { fit_residual = new TF1(name_residual.c_str(), MuonResidualsFitter_pureGaussian_TF1, min_residual, max_residual, 3); fit_residual->SetParameters(sum_of_weights * (max_residual - min_residual)/bins_residual, 10.*value(kAlignX), 10.*value(kResidSigma)); @@ -541,7 +541,7 @@ TTree * MuonResiduals6DOFrphiFitter::readNtuple(std::string fname, unsigned int // Create new temporary file TFile *tmpf = new TFile("small_tree_fit.root","recreate"); - assert(tmpf!=0); + assert(tmpf!=nullptr); // filter the tree (temporarily lives in the new file) TTree *tt = t->CopyTree(Form("!is_dt && is_plus==%d && ring_wheel==%d && station==%d && sector==%d && select==%d", 2-endcap, station, ring, chamber, (bool)preselected)); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsAngleFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsAngleFitter.cc index b643e16fbc8b7..b7d96e9c62a51 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsAngleFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsAngleFitter.cc @@ -127,7 +127,7 @@ double MuonResidualsAngleFitter::plot(std::string name, TFileDirectory *dir, Ali double scale_factor = double(numResiduals()) * (100. - -100.)/100; // (max - min)/nbins - TF1 *narrowed_fit = NULL; + TF1 *narrowed_fit = nullptr; if (residualsModel() == kPureGaussian) { narrowed_fit = new TF1(narrowed_name.str().c_str(), MuonResidualsFitter_pureGaussian_TF1, -100., 100., 3); narrowed_fit->SetParameters(scale_factor, value(kAngle) * 1000., value(kSigma) * 1000.); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsBfieldAngleFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsBfieldAngleFitter.cc index 72377407e5efb..6f752fb1d4034 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsBfieldAngleFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsBfieldAngleFitter.cc @@ -131,7 +131,7 @@ double MuonResidualsBfieldAngleFitter::plot(std::string name, TFileDirectory *di double scale_factor = double(numResiduals()) * (100. - -100.)/100; // (max - min)/nbins - TF1 *narrowed_fit = NULL; + TF1 *narrowed_fit = nullptr; if (residualsModel() == kPureGaussian) { narrowed_fit = new TF1(narrowed_name.str().c_str(), MuonResidualsFitter_pureGaussian_TF1, -100., 100., 3); narrowed_fit->SetParameters(scale_factor, value(kAngle) * 1000., value(kSigma) * 1000.); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc index 20351dfdd1495..3f08eb4e950b4 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc @@ -189,7 +189,7 @@ MuonResidualsFitter::~MuonResidualsFitter() void MuonResidualsFitter::fix(int parNum, bool dofix) { assert(0 <= parNum && parNum < npar()); - if (m_fixed.size() == 0) m_fixed.resize(npar(), false); + if (m_fixed.empty()) m_fixed.resize(npar(), false); m_fixed[parNum] = dofix; } @@ -197,7 +197,7 @@ void MuonResidualsFitter::fix(int parNum, bool dofix) bool MuonResidualsFitter::fixed(int parNum) { assert(0 <= parNum && parNum < npar()); - if (m_fixed.size() == 0) return false; + if (m_fixed.empty()) return false; else return m_fixed[parNum]; } @@ -535,7 +535,7 @@ void MuonResidualsFitter::computeHistogramRangeAndBinning(int which, int &nbins, //double probabilities[n_quantiles] = {0.02275, 0.25, 0.75, 0.97725}; // "2 normal sigma" double quantiles[n_quantiles]; std::sort(data, data + n); - TMath::Quantiles(n, n_quantiles, data, quantiles, probabilities, true, NULL, 7); + TMath::Quantiles(n, n_quantiles, data, quantiles, probabilities, true, nullptr, 7); delete [] data; double iqr = quantiles[4] - quantiles[2]; @@ -876,7 +876,7 @@ void MuonResidualsFitter::eraseNotSelectedResiduals() { // it should probably be faster then doing erase size_t n_ok = (size_t) std::count(m_residuals_ok.begin(), m_residuals_ok.end(), true); - std::vector tmp(n_ok, 0); + std::vector tmp(n_ok, nullptr); std::cout << "residuals sizes: all=" << m_residuals.size()<<" good="< +#include MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, @@ -97,9 +97,9 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, TrajectoryMeasurement trajMeasurement = *iTrajMeasurement; TrajectoryStateOnSurface tsos = m_tsoscomb(trajMeasurement.forwardPredictedState(), trajMeasurement.backwardPredictedState()); - TrajectoryStateOnSurface tsosF = trajMeasurement.forwardPredictedState(); - TrajectoryStateOnSurface tsosB = trajMeasurement.backwardPredictedState(); - TrajectoryStateOnSurface tsosU = trajMeasurement.updatedState(); + const TrajectoryStateOnSurface& tsosF = trajMeasurement.forwardPredictedState(); + const TrajectoryStateOnSurface& tsosB = trajMeasurement.backwardPredictedState(); + const TrajectoryStateOnSurface& tsosU = trajMeasurement.updatedState(); if (m_debug) std::cout << " TrajectoryMeasurement TSOS validity: " << tsos.isValid() << std::endl; if ( tsos.isValid() ) { double tsosGlobalPositionR = sqrt( tsos.globalPosition().x()*tsos.globalPosition().x() + tsos.globalPosition().y()*tsos.globalPosition().y() ); @@ -589,7 +589,7 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, DTRecSegment4DRef segmentDT = segMatch->dtSegmentRef; const DTRecSegment4D* segment = segmentDT.get(); - if (segment == 0) continue; + if (segment == nullptr) continue; if ( segment->hasPhi() && fabs(chamberMatch->x - segMatch->x) > maxResidual ) continue; if ( segment->hasZed() && fabs(chamberMatch->y - segMatch->y) > maxResidual ) continue; @@ -691,18 +691,18 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, MuonChamberResidual * MuonResidualsFromTrack::chamberResidual(DetId chamberId, int type) { if (type == MuonChamberResidual::kDT13) { - if (m_dt13.find(chamberId) == m_dt13.end()) return NULL; + if (m_dt13.find(chamberId) == m_dt13.end()) return nullptr; return m_dt13[chamberId]; } else if (type == MuonChamberResidual::kDT2) { - if (m_dt2.find(chamberId) == m_dt2.end()) return NULL; + if (m_dt2.find(chamberId) == m_dt2.end()) return nullptr; return m_dt2[chamberId]; } else if (type == MuonChamberResidual::kCSC) { - if (m_csc.find(chamberId) == m_csc.end()) return NULL; + if (m_csc.find(chamberId) == m_csc.end()) return nullptr; return m_csc[chamberId]; } - else return NULL; + else return nullptr; } void MuonResidualsFromTrack::addTrkCovMatrix(DetId chamberId, TrajectoryStateOnSurface &tsos) diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsPositionFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsPositionFitter.cc index 484dad79cd3d5..4d8ee0694029a 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsPositionFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsPositionFitter.cc @@ -138,7 +138,7 @@ double MuonResidualsPositionFitter::plot(std::string name, TFileDirectory *dir, double scale_factor = double(numResiduals()) * (100. - -100.)/100; // (max - min)/nbins - TF1 *narrowed_fit = NULL; + TF1 *narrowed_fit = nullptr; if (residualsModel() == kPureGaussian) { narrowed_fit = new TF1(narrowed_name.str().c_str(), MuonResidualsFitter_pureGaussian_TF1, -100., 100., 3); narrowed_fit->SetParameters(scale_factor, value(kPosition) * 10., value(kSigma) * 10.); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackCSCChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackCSCChamberResidual.cc index 86466f31d1998..7fcf287e995ed 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackCSCChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackCSCChamberResidual.cc @@ -21,7 +21,7 @@ void MuonTrackCSCChamberResidual::setSegmentResidual(const reco::MuonChamberMatc CSCDetId id(trk->id.rawId()); CSCSegmentRef segmentCSC = seg->cscSegmentRef; - if (segmentCSC.get() != 0) + if (segmentCSC.get() != nullptr) { const CSCSegment* segment = segmentCSC.get(); m_numHits = segment->nRecHits(); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT13ChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT13ChamberResidual.cc index 0dd4a60a09325..58970db1ac289 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT13ChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT13ChamberResidual.cc @@ -19,7 +19,7 @@ MuonTrackDT13ChamberResidual::MuonTrackDT13ChamberResidual(edm::ESHandledtSegmentRef; - if (segmentDT.get() != 0) + if (segmentDT.get() != nullptr) { const DTRecSegment4D* segment = segmentDT.get(); assert(segment->hasPhi()); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT2ChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT2ChamberResidual.cc index f0ffe3e410ed5..25f7628b9ee8e 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT2ChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT2ChamberResidual.cc @@ -17,7 +17,7 @@ MuonTrackDT2ChamberResidual::MuonTrackDT2ChamberResidual(edm::ESHandledtSegmentRef; - if (segmentDT.get() != 0) + if (segmentDT.get() != nullptr) { const DTRecSegment4D* segment = segmentDT.get(); assert(segment->hasZed()); diff --git a/Alignment/MuonAlignmentAlgorithms/src/ReadPGInfo.cc b/Alignment/MuonAlignmentAlgorithms/src/ReadPGInfo.cc index be60ad158a1d9..4dcaf7220dcbb 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/ReadPGInfo.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/ReadPGInfo.cc @@ -785,14 +785,14 @@ char * ReadPGInfo::getId(int wheel, int station, int sector) { if(wheel == position[counter][0] && sector == position[counter][1] && station == position[counter][2]) return chambers[counter]; } - return NULL; + return nullptr; } TMatrixD ReadPGInfo::giveR(int wheel, int station, int sector) { TMatrixD *empty = new TMatrixD(0,0); char *id = getId(wheel, station, sector); - if(id == NULL) return *empty; + if(id == nullptr) return *empty; TDirectoryFile *myDir = (TDirectoryFile *)rootFile->Get(id); TDirectoryFile *myR = (TDirectoryFile *)myDir->Get("R"); TMatrixD *R = (TMatrixD *)myR->Get("matrix"); @@ -824,11 +824,11 @@ TMatrixD ReadPGInfo::giveQCCal(int wheel, int station, int sector) { TMatrixD ReadPGInfo::giveQC(int wheel, int station, int sector) { TMatrixD *empty = new TMatrixD(0,0); char *id = getId(wheel, station, sector); - if(id == NULL) return *empty; + if(id == nullptr) return *empty; TDirectoryFile *myDir = (TDirectoryFile *)rootFile->Get(id); TDirectoryFile *myQC = (TDirectoryFile *)myDir->Get("QCW"); TMatrixD *QC; - if(myQC == NULL) { + if(myQC == nullptr) { QC = new TMatrixD(0,0); } else { QC = (TMatrixD *)myQC->Get("matrix"); @@ -840,7 +840,7 @@ TMatrixD ReadPGInfo::giveQC(int wheel, int station, int sector) { TMatrixD ReadPGInfo::giveSurvey(int wheel, int station, int sector) { TMatrixD *empty = new TMatrixD(0,0); char *id = getId(wheel, station, sector); - if(id == NULL) return *empty; + if(id == nullptr) return *empty; TDirectoryFile *myDir = (TDirectoryFile *)rootFile->Get(id); TDirectoryFile *mySur = (TDirectoryFile *)myDir->Get("Survey"); TMatrixD *Survey = (TMatrixD *)mySur->Get("matrix_layer"); diff --git a/Alignment/OfflineValidation/plugins/CosmicSplitterValidation.cc b/Alignment/OfflineValidation/plugins/CosmicSplitterValidation.cc index 1147f8ea5e153..1b0da8a82c0b8 100644 --- a/Alignment/OfflineValidation/plugins/CosmicSplitterValidation.cc +++ b/Alignment/OfflineValidation/plugins/CosmicSplitterValidation.cc @@ -62,13 +62,13 @@ class CosmicSplitterValidation : public edm::EDAnalyzer { public: explicit CosmicSplitterValidation(const edm::ParameterSet&); - ~CosmicSplitterValidation(); + ~CosmicSplitterValidation() override; private: - virtual void beginJob() override; - virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override; - virtual void endJob() override ; + void beginJob() override; + void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override; + void endJob() override ; bool is_gold_muon(const edm::Event& e); @@ -212,7 +212,7 @@ CosmicSplitterValidation::CosmicSplitterValidation(const edm::ParameterSet& iCon twoTracksCtr(0), goldenPlusTwoTracksCtr(0), _passesTracksPlusMuonsCuts(0), - splitterTree_(0), + splitterTree_(nullptr), runNumber_(0), eventNumber_(0), luminosityBlock_(0), dcaX1_spl_(0), dcaY1_spl_(0), dcaZ1_spl_(0), dcaX2_spl_(0), dcaY2_spl_(0), dcaZ2_spl_(0), @@ -391,8 +391,8 @@ void CosmicSplitterValidation::analyze(const edm::Event& iEvent, const edm::Even reco::Track track1 = tracks->at(0); reco::Track track2 = tracks->at(1); - math::XYZPoint dca1 = track1.referencePoint(); - math::XYZPoint dca2 = track2.referencePoint(); + const math::XYZPoint& dca1 = track1.referencePoint(); + const math::XYZPoint& dca2 = track2.referencePoint(); // looping through the hits for track 1 int Nrechits1 =0; @@ -472,7 +472,7 @@ void CosmicSplitterValidation::analyze(const edm::Event& iEvent, const edm::Even // original tracks calculations reco::Track origTrack = originalTracks->at(0); - math::XYZPoint dca_org = origTrack.referencePoint(); + const math::XYZPoint& dca_org = origTrack.referencePoint(); // looping through the hits for the original track int Nrechitsorg =0; diff --git a/Alignment/OfflineValidation/plugins/EopTreeWriter.cc b/Alignment/OfflineValidation/plugins/EopTreeWriter.cc index d28a2a30292dc..5df9b66fecca4 100644 --- a/Alignment/OfflineValidation/plugins/EopTreeWriter.cc +++ b/Alignment/OfflineValidation/plugins/EopTreeWriter.cc @@ -68,13 +68,13 @@ class EopTreeWriter : public edm::EDAnalyzer { public: explicit EopTreeWriter(const edm::ParameterSet&); - ~EopTreeWriter(); + ~EopTreeWriter() 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 ; double getDistInCM(double eta1, double phi1, double eta2, double phi2); @@ -189,7 +189,7 @@ EopTreeWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) parameters_.useMuon = false; if(pixelInAlca) - if(isoPixelTracks->size()==0) return; + if(isoPixelTracks->empty()) return; for(reco::TrackCollection::const_iterator track = tracks->begin();track!=tracks->end();++track){ @@ -249,7 +249,7 @@ EopTreeWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { ////////////////////// FIND ECAL CLUSTER ENERGY // R-scheme of ECAL CLUSTERIZATION - GlobalPoint posH = geo->getPosition((*ehit).detid()); + const GlobalPoint& posH = geo->getPosition((*ehit).detid()); double phihit = posH.phi(); double etahit = posH.eta(); @@ -291,7 +291,7 @@ EopTreeWriter::beginJob() void EopTreeWriter::endJob() { - delete treeMemPtr_; treeMemPtr_ = 0; + delete treeMemPtr_; treeMemPtr_ = nullptr; } diff --git a/Alignment/OfflineValidation/plugins/MuonAlignmentAnalyzer.cc b/Alignment/OfflineValidation/plugins/MuonAlignmentAnalyzer.cc index c1f014ee2089e..b0dc4a66d3677 100644 --- a/Alignment/OfflineValidation/plugins/MuonAlignmentAnalyzer.cc +++ b/Alignment/OfflineValidation/plugins/MuonAlignmentAnalyzer.cc @@ -48,85 +48,85 @@ /// Constructor MuonAlignmentAnalyzer::MuonAlignmentAnalyzer(const edm::ParameterSet& pset): - hGBNmuons(0), - hSANmuons(0), - hSimNmuons(0), - hGBNmuons_Barrel(0), - hSANmuons_Barrel(0), - hSimNmuons_Barrel(0), - hGBNmuons_Endcap(0), - hSANmuons_Endcap(0), - hSimNmuons_Endcap(0), - hGBNhits(0), - hGBNhits_Barrel(0), - hGBNhits_Endcap(0), - hSANhits(0), - hSANhits_Barrel(0), - hSANhits_Endcap(0), - hGBChi2(0), - hSAChi2(0), - hGBChi2_Barrel(0), - hSAChi2_Barrel(0), - hGBChi2_Endcap(0), - hSAChi2_Endcap(0), - hGBInvM(0), - hSAInvM(0), - hSimInvM(0), - hGBInvM_Barrel(0), - hSAInvM_Barrel(0), - hSimInvM_Barrel(0), - hGBInvM_Endcap(0), - hSAInvM_Endcap(0), - hSimInvM_Endcap(0), - hGBInvM_Overlap(0), - hSAInvM_Overlap(0), - hSimInvM_Overlap(0), - hSAPTRec(0), - hGBPTRec(0), - hSimPT(0), - hSAPTRec_Barrel(0), - hGBPTRec_Barrel(0), - hSimPT_Barrel(0), - hSAPTRec_Endcap(0), - hGBPTRec_Endcap(0), - hSimPT_Endcap(0), - hGBPTvsEta(0), - hGBPTvsPhi(0), - hSAPTvsEta(0), - hSAPTvsPhi(0), - hSimPTvsEta(0), - hSimPTvsPhi(0), - hSimPhivsEta(0), - hSAPhivsEta(0), - hGBPhivsEta(0), - hSAPTres(0), - hSAinvPTres(0), - hGBPTres(0), - hGBinvPTres(0), - hSAPTres_Barrel(0), - hSAPTres_Endcap(0), - hGBPTres_Barrel(0), - hGBPTres_Endcap(0), - hSAPTDiff(0), - hGBPTDiff(0), - hSAPTDiffvsEta(0), - hSAPTDiffvsPhi(0), - hGBPTDiffvsEta(0), - hGBPTDiffvsPhi(0), - hGBinvPTvsEta(0), - hGBinvPTvsPhi(0), - hSAinvPTvsEta(0), - hSAinvPTvsPhi(0), - hSAinvPTvsNhits(0), - hGBinvPTvsNhits(0), - hResidualLocalXDT(0), - hResidualLocalPhiDT(0), - hResidualLocalThetaDT(0), - hResidualLocalYDT(0), - hResidualLocalXCSC(0), - hResidualLocalPhiCSC(0), - hResidualLocalThetaCSC(0), - hResidualLocalYCSC(0), + hGBNmuons(nullptr), + hSANmuons(nullptr), + hSimNmuons(nullptr), + hGBNmuons_Barrel(nullptr), + hSANmuons_Barrel(nullptr), + hSimNmuons_Barrel(nullptr), + hGBNmuons_Endcap(nullptr), + hSANmuons_Endcap(nullptr), + hSimNmuons_Endcap(nullptr), + hGBNhits(nullptr), + hGBNhits_Barrel(nullptr), + hGBNhits_Endcap(nullptr), + hSANhits(nullptr), + hSANhits_Barrel(nullptr), + hSANhits_Endcap(nullptr), + hGBChi2(nullptr), + hSAChi2(nullptr), + hGBChi2_Barrel(nullptr), + hSAChi2_Barrel(nullptr), + hGBChi2_Endcap(nullptr), + hSAChi2_Endcap(nullptr), + hGBInvM(nullptr), + hSAInvM(nullptr), + hSimInvM(nullptr), + hGBInvM_Barrel(nullptr), + hSAInvM_Barrel(nullptr), + hSimInvM_Barrel(nullptr), + hGBInvM_Endcap(nullptr), + hSAInvM_Endcap(nullptr), + hSimInvM_Endcap(nullptr), + hGBInvM_Overlap(nullptr), + hSAInvM_Overlap(nullptr), + hSimInvM_Overlap(nullptr), + hSAPTRec(nullptr), + hGBPTRec(nullptr), + hSimPT(nullptr), + hSAPTRec_Barrel(nullptr), + hGBPTRec_Barrel(nullptr), + hSimPT_Barrel(nullptr), + hSAPTRec_Endcap(nullptr), + hGBPTRec_Endcap(nullptr), + hSimPT_Endcap(nullptr), + hGBPTvsEta(nullptr), + hGBPTvsPhi(nullptr), + hSAPTvsEta(nullptr), + hSAPTvsPhi(nullptr), + hSimPTvsEta(nullptr), + hSimPTvsPhi(nullptr), + hSimPhivsEta(nullptr), + hSAPhivsEta(nullptr), + hGBPhivsEta(nullptr), + hSAPTres(nullptr), + hSAinvPTres(nullptr), + hGBPTres(nullptr), + hGBinvPTres(nullptr), + hSAPTres_Barrel(nullptr), + hSAPTres_Endcap(nullptr), + hGBPTres_Barrel(nullptr), + hGBPTres_Endcap(nullptr), + hSAPTDiff(nullptr), + hGBPTDiff(nullptr), + hSAPTDiffvsEta(nullptr), + hSAPTDiffvsPhi(nullptr), + hGBPTDiffvsEta(nullptr), + hGBPTDiffvsPhi(nullptr), + hGBinvPTvsEta(nullptr), + hGBinvPTvsPhi(nullptr), + hSAinvPTvsEta(nullptr), + hSAinvPTvsPhi(nullptr), + hSAinvPTvsNhits(nullptr), + hGBinvPTvsNhits(nullptr), + hResidualLocalXDT(nullptr), + hResidualLocalPhiDT(nullptr), + hResidualLocalThetaDT(nullptr), + hResidualLocalYDT(nullptr), + hResidualLocalXCSC(nullptr), + hResidualLocalPhiCSC(nullptr), + hResidualLocalThetaCSC(nullptr), + hResidualLocalYCSC(nullptr), hResidualLocalXDT_W(5), hResidualLocalPhiDT_W(5), @@ -141,14 +141,14 @@ MuonAlignmentAnalyzer::MuonAlignmentAnalyzer(const edm::ParameterSet& pset): hResidualLocalThetaDT_MB(20), hResidualLocalYDT_MB(20), - hResidualGlobalRPhiDT(0), - hResidualGlobalPhiDT(0), - hResidualGlobalThetaDT(0), - hResidualGlobalZDT(0), - hResidualGlobalRPhiCSC(0), - hResidualGlobalPhiCSC(0), - hResidualGlobalThetaCSC(0), - hResidualGlobalRCSC(0), + hResidualGlobalRPhiDT(nullptr), + hResidualGlobalPhiDT(nullptr), + hResidualGlobalThetaDT(nullptr), + hResidualGlobalZDT(nullptr), + hResidualGlobalRPhiCSC(nullptr), + hResidualGlobalPhiCSC(nullptr), + hResidualGlobalThetaCSC(nullptr), + hResidualGlobalRCSC(nullptr), hResidualGlobalRPhiDT_W(5), hResidualGlobalPhiDT_W(5), @@ -163,38 +163,38 @@ MuonAlignmentAnalyzer::MuonAlignmentAnalyzer(const edm::ParameterSet& pset): hResidualGlobalThetaDT_MB(20), hResidualGlobalZDT_MB(20), - hprofLocalPositionCSC(0), - hprofLocalAngleCSC(0), - hprofLocalPositionRmsCSC(0), - hprofLocalAngleRmsCSC(0), - hprofGlobalPositionCSC(0), - hprofGlobalAngleCSC(0), - hprofGlobalPositionRmsCSC(0), - hprofGlobalAngleRmsCSC(0), - hprofLocalPositionDT(0), - hprofLocalAngleDT(0), - hprofLocalPositionRmsDT(0), - hprofLocalAngleRmsDT(0), - hprofGlobalPositionDT(0), - hprofGlobalAngleDT(0), - hprofGlobalPositionRmsDT(0), - hprofGlobalAngleRmsDT(0), - hprofLocalXDT(0), - hprofLocalPhiDT(0), - hprofLocalThetaDT(0), - hprofLocalYDT(0), - hprofLocalXCSC(0), - hprofLocalPhiCSC(0), - hprofLocalThetaCSC(0), - hprofLocalYCSC(0), - hprofGlobalRPhiDT(0), - hprofGlobalPhiDT(0), - hprofGlobalThetaDT(0), - hprofGlobalZDT(0), - hprofGlobalRPhiCSC(0), - hprofGlobalPhiCSC(0), - hprofGlobalThetaCSC(0), - hprofGlobalRCSC(0) + hprofLocalPositionCSC(nullptr), + hprofLocalAngleCSC(nullptr), + hprofLocalPositionRmsCSC(nullptr), + hprofLocalAngleRmsCSC(nullptr), + hprofGlobalPositionCSC(nullptr), + hprofGlobalAngleCSC(nullptr), + hprofGlobalPositionRmsCSC(nullptr), + hprofGlobalAngleRmsCSC(nullptr), + hprofLocalPositionDT(nullptr), + hprofLocalAngleDT(nullptr), + hprofLocalPositionRmsDT(nullptr), + hprofLocalAngleRmsDT(nullptr), + hprofGlobalPositionDT(nullptr), + hprofGlobalAngleDT(nullptr), + hprofGlobalPositionRmsDT(nullptr), + hprofGlobalAngleRmsDT(nullptr), + hprofLocalXDT(nullptr), + hprofLocalPhiDT(nullptr), + hprofLocalThetaDT(nullptr), + hprofLocalYDT(nullptr), + hprofLocalXCSC(nullptr), + hprofLocalPhiCSC(nullptr), + hprofLocalThetaCSC(nullptr), + hprofLocalYCSC(nullptr), + hprofGlobalRPhiDT(nullptr), + hprofGlobalPhiDT(nullptr), + hprofGlobalThetaDT(nullptr), + hprofGlobalZDT(nullptr), + hprofGlobalRPhiCSC(nullptr), + hprofGlobalPhiCSC(nullptr), + hprofGlobalThetaCSC(nullptr), + hprofGlobalRCSC(nullptr) { theSTAMuonTag = pset.getParameter("StandAloneTrackCollectionTag"); theGLBMuonTag = pset.getParameter("GlobalMuonTrackCollectionTag"); @@ -1559,7 +1559,7 @@ void MuonAlignmentAnalyzer::analyze(const edm::Event & event, const edm::EventSe double candDeltaR= -999.0, dR; int iCand=0; - if(simPar[0].size()>0){ + if(!simPar[0].empty()){ for(unsigned int iSim = 0; iSim 0){ + if(!simPar[0].empty()){ for(unsigned int iSim = 0; iSim (&geomDet->surface()); const Cylinder* cDest = dynamic_cast(&geomDet->surface()); - if(pDest != 0 || cDest != 0) { //Donde antes iba el try + if(pDest != nullptr || cDest != nullptr) { //Donde antes iba el try TrajectoryStateOnSurface destiny = thePropagator->propagate(*(innerTSOS.freeState()), geomDet->surface()); diff --git a/Alignment/OfflineValidation/plugins/MuonAlignmentAnalyzer.h b/Alignment/OfflineValidation/plugins/MuonAlignmentAnalyzer.h index a7f09397356f6..dcb94f6934451 100644 --- a/Alignment/OfflineValidation/plugins/MuonAlignmentAnalyzer.h +++ b/Alignment/OfflineValidation/plugins/MuonAlignmentAnalyzer.h @@ -43,14 +43,14 @@ class MuonAlignmentAnalyzer: public edm::EDAnalyzer { MuonAlignmentAnalyzer(const edm::ParameterSet& pset); /// Destructor - virtual ~MuonAlignmentAnalyzer(); + ~MuonAlignmentAnalyzer() 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/Alignment/OfflineValidation/plugins/ResidualRefitting.cc b/Alignment/OfflineValidation/plugins/ResidualRefitting.cc index 5977215cac55c..d289bbaf6463e 100755 --- a/Alignment/OfflineValidation/plugins/ResidualRefitting.cc +++ b/Alignment/OfflineValidation/plugins/ResidualRefitting.cc @@ -62,10 +62,10 @@ ResidualRefitting::ResidualRefitting( const edm::ParameterSet & cfg ) : muonsNoTOBLayer5_ ( cfg.getParameter("muonsNoTOBLayer5" ) ), muonsNoTOBLayer6_ ( cfg.getParameter("muonsNoTOBLayer6" ) ),*/ debug_ ( cfg.getUntrackedParameter("doDebug" ) ), - outputFile_(0), - outputTree_(0), - outputBranch_(0), - theField(0) + outputFile_(nullptr), + outputTree_(nullptr), + outputBranch_(nullptr), + theField(nullptr) { eventInfo_.evtNum_ = 0; eventInfo_.evtNum_ = 0; diff --git a/Alignment/OfflineValidation/plugins/ResidualRefitting.h b/Alignment/OfflineValidation/plugins/ResidualRefitting.h index 716f4200275e6..8151520cbc396 100644 --- a/Alignment/OfflineValidation/plugins/ResidualRefitting.h +++ b/Alignment/OfflineValidation/plugins/ResidualRefitting.h @@ -282,11 +282,11 @@ class ResidualRefitting : public edm::EDAnalyzer{ // explicit ResidualRefitting( const edm::ParameterSet & ); - ~ResidualRefitting(); + ~ResidualRefitting() 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 ; //Zero Storage void zero_storage(); void zero_muon(ResidualRefitting::storage_muon* str); diff --git a/Alignment/OfflineValidation/plugins/TkAlStyle.cc b/Alignment/OfflineValidation/plugins/TkAlStyle.cc index aa92c0bc6341b..beaa191059cc9 100644 --- a/Alignment/OfflineValidation/plugins/TkAlStyle.cc +++ b/Alignment/OfflineValidation/plugins/TkAlStyle.cc @@ -115,7 +115,7 @@ class TkAlStyle { position += "top"; if( !( position.Contains("left") || position.Contains("right") ) ) position += "right"; - TLegend* leg = 0; + TLegend* leg = nullptr; if( position.Contains("top") && position.Contains("right") ) { leg = legendTR(nEntries,relWidth); } else if( position.Contains("top") && position.Contains("left") ) { @@ -159,7 +159,7 @@ class TkAlStyle { position += "top"; if( !( position.Contains("left") || position.Contains("right") ) ) position += "right"; - TPaveText* label = 0; + TPaveText* label = nullptr; if( position.Contains("top") && position.Contains("right") ) { label = labelTR(nEntries,relWidth); } else if( position.Contains("top") && position.Contains("left") ) { diff --git a/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc b/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc index 559b9c0423457..f241b6d167d75 100644 --- a/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc +++ b/Alignment/OfflineValidation/plugins/TrackerOfflineValidation.cc @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -79,7 +79,7 @@ class TrackerOfflineValidation : public edm::EDAnalyzer { public: explicit TrackerOfflineValidation(const edm::ParameterSet&); - ~TrackerOfflineValidation(); + ~TrackerOfflineValidation() override; enum HistogramType { XResidual, NormXResidual, YResidual, /*NormYResidual, */ @@ -142,9 +142,9 @@ class TrackerOfflineValidation : public edm::EDAnalyzer { struct DirectoryWrapper{ DirectoryWrapper(const DirectoryWrapper& upDir,const std::string& newDir, const std::string& basedir,bool useDqmMode) - : tfd(0), + : tfd(nullptr), dqmMode(useDqmMode), - theDbe(0) { + theDbe(nullptr) { if (newDir.length()!=0){ if(upDir.directoryString.length()!=0)directoryString=upDir.directoryString+"/"+newDir; else directoryString = newDir; @@ -163,9 +163,9 @@ class TrackerOfflineValidation : public edm::EDAnalyzer { } DirectoryWrapper(const std::string& newDir,const std::string& basedir,bool useDqmMode) - : tfd(0), + : tfd(nullptr), dqmMode(useDqmMode), - theDbe(0) { + theDbe(nullptr) { if (!dqmMode){ edm::Service fs; if (newDir.length()==0){ @@ -201,8 +201,8 @@ class TrackerOfflineValidation : public edm::EDAnalyzer { // // ------------- private member function ------------- // - 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; virtual void checkBookHists(const edm::EventSetup& setup); @@ -339,7 +339,7 @@ template <> TH1* TrackerOfflineValidation::DirectoryWrapper::make(cons theDbe->setCurrentFolder(directoryString); //DQM profile requires y-bins for construction... using TProfile creator by hand... TProfile *tmpProfile=new TProfile(name,title,nBinX,xBins); - tmpProfile->SetDirectory(0); + tmpProfile->SetDirectory(nullptr); return theDbe->bookProfile(name,tmpProfile)->getTH1(); } else{return tfd->make(name,title,nBinX,xBins);} @@ -350,7 +350,7 @@ template <> TH1* TrackerOfflineValidation::DirectoryWrapper::make(cons theDbe->setCurrentFolder(directoryString); //DQM profile requires y-bins for construction... using TProfile creator by hand... TProfile *tmpProfile=new TProfile(name,title,nBinX,minBinX,maxBinX); - tmpProfile->SetDirectory(0); + tmpProfile->SetDirectory(nullptr); return theDbe->bookProfile(name,tmpProfile)->getTH1(); } else{return tfd->make(name,title,nBinX,minBinX,maxBinX);} @@ -377,7 +377,7 @@ template <> TH1* TrackerOfflineValidation::DirectoryWrapper::make(const ch // constructors and destructor // TrackerOfflineValidation::TrackerOfflineValidation(const edm::ParameterSet& iConfig) - : parSet_(iConfig), bareTkGeomPtr_(0), lCoorHistOn_(parSet_.getParameter("localCoorHistosOn")), + : parSet_(iConfig), bareTkGeomPtr_(nullptr), lCoorHistOn_(parSet_.getParameter("localCoorHistosOn")), moduleLevelHistsTransient_(parSet_.getParameter("moduleLevelHistsTransient")), moduleLevelProfiles_(parSet_.getParameter("moduleLevelProfiles")), stripYResiduals_(parSet_.getParameter("stripYResiduals")), @@ -1269,7 +1269,7 @@ TrackerOfflineValidation::endJob() this->fillTree(*tree, *treeMemPtr, mTobResiduals_); this->fillTree(*tree, *treeMemPtr, mTecResiduals_); - delete treeMemPtr; treeMemPtr = 0; + delete treeMemPtr; treeMemPtr = nullptr; } @@ -1573,7 +1573,7 @@ TrackerOfflineValidation::setUpTreeMembers(const std::mapfirst; treeMem.moduleId = detId_; treeMem.subDetId = detId_.subdetId(); - treeMem.isDoubleSide =0; + treeMem.isDoubleSide =false; if(treeMem.subDetId == PixelSubdetector::PixelBarrel){ unsigned int whichHalfBarrel(1), rawId(detId_.rawId()); //DetId does not know about halfBarrels is PXB ... @@ -1852,8 +1852,8 @@ TrackerOfflineValidation::getMedian(const TH1* histo) const } median = TMath::Median(nbins, x, y); - delete[] x; x = 0; - delete [] y; y = 0; + delete[] x; x = nullptr; + delete [] y; y = nullptr; return median; diff --git a/Alignment/OfflineValidation/plugins/TrackerOfflineValidationSummary.cc b/Alignment/OfflineValidation/plugins/TrackerOfflineValidationSummary.cc index 6a5249b1be29d..990a616b7ba7c 100644 --- a/Alignment/OfflineValidation/plugins/TrackerOfflineValidationSummary.cc +++ b/Alignment/OfflineValidation/plugins/TrackerOfflineValidationSummary.cc @@ -62,7 +62,7 @@ class TrackerOfflineValidationSummary : public edm::EDAnalyzer { public: explicit TrackerOfflineValidationSummary(const edm::ParameterSet&); - ~TrackerOfflineValidationSummary(); + ~TrackerOfflineValidationSummary() override; private: @@ -97,8 +97,8 @@ class TrackerOfflineValidationSummary : public edm::EDAnalyzer { HarvestingHistos harvestingHistos; }; - virtual void analyze(const edm::Event& evt, const edm::EventSetup&) override; - virtual void endJob() override ; + void analyze(const edm::Event& evt, const edm::EventSetup&) override; + void endJob() override ; void fillTree(TTree& tree, std::map& moduleHist, TkOffTreeVariables& treeMem, const TrackerGeometry& tkgeom, @@ -153,7 +153,7 @@ class TrackerOfflineValidationSummary : public edm::EDAnalyzer { // TrackerOfflineValidationSummary::TrackerOfflineValidationSummary(const edm::ParameterSet& iConfig): parSet_(iConfig), moduleDirectory_(parSet_.getParameter("moduleDirectoryInOutput")), - useFit_(parSet_.getParameter("useFit")), dbe_(0), moduleMapsInitialized(false), lastSetup_(nullptr) + useFit_(parSet_.getParameter("useFit")), dbe_(nullptr), moduleMapsInitialized(false), lastSetup_(nullptr) { //now do what ever initialization is needed dbe_ = edm::Service().operator->(); @@ -243,9 +243,9 @@ TrackerOfflineValidationSummary::endJob() // of the module-based histograms from TrackerOfflineValidation this->collateHarvestingHists(*tree); - delete tree; tree = 0; - delete treeMemPtr; treeMemPtr = 0; - delete substructureName; substructureName = 0; + delete tree; tree = nullptr; + delete treeMemPtr; treeMemPtr = nullptr; + delete substructureName; substructureName = nullptr; } @@ -648,8 +648,8 @@ TrackerOfflineValidationSummary::getMedian(const TH1 *histo) const } median = TMath::Median(nbins, x, y); - delete[] x; x = 0; - delete [] y; y = 0; + delete[] x; x = nullptr; + delete [] y; y = nullptr; return median; } @@ -666,8 +666,8 @@ TrackerOfflineValidationSummary::collateHarvestingHists(TTree& tree) void TrackerOfflineValidationSummary::applyHarvestingHierarchy(TTree& tree) { - TkOffTreeVariables *treeMemPtr = 0; - std::map *substructureName = 0; + TkOffTreeVariables *treeMemPtr = nullptr; + std::map *substructureName = nullptr; tree.SetBranchAddress("TkOffTreeVariables", &treeMemPtr); tree.SetBranchAddress("SubstructureName", &substructureName); @@ -754,8 +754,8 @@ TrackerOfflineValidationSummary::getBinning(const std::string& binningPSetName, void TrackerOfflineValidationSummary::fillHarvestingHists(TTree& tree) { - TkOffTreeVariables *treeMemPtr = 0; - std::map *substructureName = 0; + TkOffTreeVariables *treeMemPtr = nullptr; + std::map *substructureName = nullptr; tree.SetBranchAddress("TkOffTreeVariables", &treeMemPtr); tree.SetBranchAddress("SubstructureName", &substructureName); diff --git a/Alignment/OfflineValidation/plugins/Tracker_OldtoNewConverter.cc b/Alignment/OfflineValidation/plugins/Tracker_OldtoNewConverter.cc index 90418f62354cf..a189cc196b99e 100644 --- a/Alignment/OfflineValidation/plugins/Tracker_OldtoNewConverter.cc +++ b/Alignment/OfflineValidation/plugins/Tracker_OldtoNewConverter.cc @@ -40,13 +40,13 @@ class Tracker_OldtoNewConverter : public edm::EDAnalyzer { public: explicit Tracker_OldtoNewConverter(const edm::ParameterSet&); - ~Tracker_OldtoNewConverter(); + ~Tracker_OldtoNewConverter() override; private: - virtual void beginJob() override; - virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override; - virtual void endJob() override ; + void beginJob() override; + void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override; + void endJob() override ; void createMap(); void addBranches(); @@ -87,7 +87,7 @@ class Tracker_OldtoNewConverter : public edm::EDAnalyzer { // constructors and destructor // Tracker_OldtoNewConverter::Tracker_OldtoNewConverter(const edm::ParameterSet& iConfig) : - m_inputTFile(0), m_outputTFile(0), m_inputTree(0), m_outputTree(0), + m_inputTFile(nullptr), m_outputTFile(nullptr), m_inputTree(nullptr), m_outputTree(nullptr), rawid_i(0), rawid_f(0), x_i(0.), y_i(0.), z_i(0.), a_i(0.), b_i(0.), c_i(0.), x_f(0.), y_f(0.), z_f(0.), a_f(0.), b_f(0.), c_f(0.) diff --git a/Alignment/OfflineValidation/plugins/ValidationMisalignedTracker.cc b/Alignment/OfflineValidation/plugins/ValidationMisalignedTracker.cc index 09cfc02450318..c7aa6509d6f4b 100644 --- a/Alignment/OfflineValidation/plugins/ValidationMisalignedTracker.cc +++ b/Alignment/OfflineValidation/plugins/ValidationMisalignedTracker.cc @@ -227,8 +227,8 @@ ValidationMisalignedTracker::~ValidationMisalignedTracker() // Closing the file deletes the tree. file_->Close(); - tree_eff=0; - tree_fake=0; + tree_eff=nullptr; + tree_fake=nullptr; } @@ -472,7 +472,7 @@ ValidationMisalignedTracker::analyze(const edm::Event& iEvent, const edm::EventS if(simRecColl.find(tp) != simRecColl.end()){ rt = simRecColl[tp]; - if (rt.size()!=0) { + if (!rt.empty()) { edm::RefToBase t = rt.begin()->first; ats++; @@ -727,7 +727,7 @@ ValidationMisalignedTracker::analyze(const edm::Event& iEvent, const edm::EventS //Compute fake rate vs eta if(recSimColl.find(track) != recSimColl.end()){ tp = recSimColl[track]; - if (tp.size()!=0) { + if (!tp.empty()) { edm::LogVerbatim("TrackValidator") << "reco::Track #" << rT << " with pt=" << track->pt() << " associated with quality:" << tp.begin()->second <<"\n"; diff --git a/Alignment/OfflineValidation/plugins/ValidationMisalignedTracker.h b/Alignment/OfflineValidation/plugins/ValidationMisalignedTracker.h index 629b7087d6115..e6fed1c496150 100644 --- a/Alignment/OfflineValidation/plugins/ValidationMisalignedTracker.h +++ b/Alignment/OfflineValidation/plugins/ValidationMisalignedTracker.h @@ -33,12 +33,12 @@ class ValidationMisalignedTracker : public edm::EDAnalyzer { public: explicit ValidationMisalignedTracker(const edm::ParameterSet&); - ~ValidationMisalignedTracker(); + ~ValidationMisalignedTracker() 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; // ----------member data --------------------------- diff --git a/Alignment/OfflineValidation/src/TrackerValidationVariables.cc b/Alignment/OfflineValidation/src/TrackerValidationVariables.cc index 21339964944c3..214bf20a6e473 100644 --- a/Alignment/OfflineValidation/src/TrackerValidationVariables.cc +++ b/Alignment/OfflineValidation/src/TrackerValidationVariables.cc @@ -146,7 +146,7 @@ void TrackerValidationVariables::fillHitQuantities(reco::Track const & track, st resYprimeErr = hitStruct.resErrY; const RectangularPlaneBounds *rectangularBound = dynamic_cast(&bound); - if (rectangularBound!=NULL) { + if (rectangularBound!=nullptr) { hitStruct.inside = rectangularBound->inside(lPTrk); length = rectangularBound->length(); width = rectangularBound->width(); @@ -295,7 +295,7 @@ TrackerValidationVariables::fillHitQuantities(const Trajectory* trajectory, std: resYprimeErr = resYErr; const RectangularPlaneBounds *rectangularBound = dynamic_cast(&bound); - if (rectangularBound!=NULL) { + if (rectangularBound!=nullptr) { hitStruct.inside = rectangularBound->inside(lPTrk); length = rectangularBound->length(); width = rectangularBound->width(); @@ -317,7 +317,7 @@ TrackerValidationVariables::fillHitQuantities(const Trajectory* trajectory, std: resYprimeErr = resYErr; const RectangularPlaneBounds *rectangularBound = dynamic_cast(&bound); - if (rectangularBound!=NULL) { + if (rectangularBound!=nullptr) { hitStruct.inside = rectangularBound->inside(lPTrk); length = rectangularBound->length(); width = rectangularBound->width(); @@ -385,7 +385,7 @@ TrackerValidationVariables::fillHitQuantities(const Trajectory* trajectory, std: const TrapezoidalPlaneBounds *trapezoidalBound = dynamic_cast < const TrapezoidalPlaneBounds * >(& bound); - if (trapezoidalBound!=NULL) { + if (trapezoidalBound!=nullptr) { hitStruct.inside = trapezoidalBound->inside(lPTrk); length = trapezoidalBound->length(); width = trapezoidalBound->width(); diff --git a/Alignment/ReferenceTrajectories/interface/BeamSpotGeomDet.h b/Alignment/ReferenceTrajectories/interface/BeamSpotGeomDet.h index 3783660561a80..08a243aaf47f8 100644 --- a/Alignment/ReferenceTrajectories/interface/BeamSpotGeomDet.h +++ b/Alignment/ReferenceTrajectories/interface/BeamSpotGeomDet.h @@ -29,13 +29,13 @@ class BeamSpotGeomDet : public GeomDet { setDetId(AlignableBeamSpot::detId()); } - virtual ~BeamSpotGeomDet() { } + ~BeamSpotGeomDet() override { } - virtual SubDetector subDetector() const { + SubDetector subDetector() const override { return GeomDetEnumerators::invalidDet; } - virtual std::vector< const GeomDet*> components() const { + std::vector< const GeomDet*> components() const override { return std::vector< const GeomDet*>(); } }; diff --git a/Alignment/ReferenceTrajectories/interface/BeamSpotTransientTrackingRecHit.h b/Alignment/ReferenceTrajectories/interface/BeamSpotTransientTrackingRecHit.h index 2da2eaf1d0762..1f260501634fe 100644 --- a/Alignment/ReferenceTrajectories/interface/BeamSpotTransientTrackingRecHit.h +++ b/Alignment/ReferenceTrajectories/interface/BeamSpotTransientTrackingRecHit.h @@ -40,27 +40,27 @@ class BeamSpotTransientTrackingRecHit final : public TValidTrackingRecHit { 0.0, std::pow(beamSpot.sigmaZ(), 2)); } - virtual ~BeamSpotTransientTrackingRecHit() {} + ~BeamSpotTransientTrackingRecHit() override {} - virtual LocalPoint localPosition() const { return localPosition_; } - virtual LocalError localPositionError() const { return localError_; } + LocalPoint localPosition() const override { return localPosition_; } + LocalError localPositionError() const override { return localError_; } - virtual AlgebraicVector parameters() const; - virtual AlgebraicSymMatrix parametersError() const; - virtual int dimension() const { return 1; } + AlgebraicVector parameters() const override; + AlgebraicSymMatrix parametersError() const override; + int dimension() const override { return 1; } - virtual const TrackingRecHit * hit() const { return nullptr; } - virtual TrackingRecHit * cloneHit() const { return nullptr;} + const TrackingRecHit * hit() const override { return nullptr; } + TrackingRecHit * cloneHit() const override { return nullptr;} - virtual std::vector recHits() const { + std::vector recHits() const override { return std::vector(); } - virtual std::vector recHits() { + std::vector recHits() override { return std::vector(); } - virtual AlgebraicMatrix projectionMatrix() const { + AlgebraicMatrix projectionMatrix() const override { return theProjectionMatrix; } @@ -78,7 +78,7 @@ class BeamSpotTransientTrackingRecHit final : public TValidTrackingRecHit { // hide the clone method for ReferenceCounted. Warning: this method is still // accessible via the bas class TrackingRecHit interface! - virtual BeamSpotTransientTrackingRecHit * clone() const { + BeamSpotTransientTrackingRecHit * clone() const override { return new BeamSpotTransientTrackingRecHit(*this); } diff --git a/Alignment/ReferenceTrajectories/interface/BzeroReferenceTrajectory.h b/Alignment/ReferenceTrajectories/interface/BzeroReferenceTrajectory.h index ae9bf4a24f2ff..6658e0f6d84a9 100644 --- a/Alignment/ReferenceTrajectories/interface/BzeroReferenceTrajectory.h +++ b/Alignment/ReferenceTrajectories/interface/BzeroReferenceTrajectory.h @@ -49,9 +49,9 @@ class BzeroReferenceTrajectory : public ReferenceTrajectory const reco::BeamSpot& beamSpot, const ReferenceTrajectoryBase::Config& config); - virtual ~BzeroReferenceTrajectory() {} + ~BzeroReferenceTrajectory() override {} - virtual BzeroReferenceTrajectory* clone() const + BzeroReferenceTrajectory* clone() const override { return new BzeroReferenceTrajectory(*this); } private: diff --git a/Alignment/ReferenceTrajectories/interface/DualBzeroReferenceTrajectory.h b/Alignment/ReferenceTrajectories/interface/DualBzeroReferenceTrajectory.h index 4a128291eeca5..63d40e1048d0c 100644 --- a/Alignment/ReferenceTrajectories/interface/DualBzeroReferenceTrajectory.h +++ b/Alignment/ReferenceTrajectories/interface/DualBzeroReferenceTrajectory.h @@ -49,9 +49,9 @@ class DualBzeroReferenceTrajectory : public DualReferenceTrajectory const reco::BeamSpot& beamSpot, const ReferenceTrajectoryBase::Config& config); - virtual ~DualBzeroReferenceTrajectory() {} + ~DualBzeroReferenceTrajectory() override {} - virtual DualBzeroReferenceTrajectory* clone() const { return new DualBzeroReferenceTrajectory(*this); } + DualBzeroReferenceTrajectory* clone() const override { return new DualBzeroReferenceTrajectory(*this); } protected: using DualReferenceTrajectory::construct; @@ -64,7 +64,7 @@ class DualBzeroReferenceTrajectory : public DualReferenceTrajectory bool useBeamSpot, const reco::BeamSpot &beamSpot) const; - virtual AlgebraicVector extractParameters(const TrajectoryStateOnSurface &referenceTsos) const; + AlgebraicVector extractParameters(const TrajectoryStateOnSurface &referenceTsos) const override; double theMomentumEstimate; diff --git a/Alignment/ReferenceTrajectories/interface/DualReferenceTrajectory.h b/Alignment/ReferenceTrajectories/interface/DualReferenceTrajectory.h index 25a6bcb0c7db0..3e44898f51fd3 100644 --- a/Alignment/ReferenceTrajectories/interface/DualReferenceTrajectory.h +++ b/Alignment/ReferenceTrajectories/interface/DualReferenceTrajectory.h @@ -46,9 +46,9 @@ class DualReferenceTrajectory : public ReferenceTrajectoryBase const reco::BeamSpot& beamSpot, const ReferenceTrajectoryBase::Config& config); - virtual ~DualReferenceTrajectory() {} + ~DualReferenceTrajectory() override {} - virtual DualReferenceTrajectory* clone() const { return new DualReferenceTrajectory(*this); } + DualReferenceTrajectory* clone() const override { return new DualReferenceTrajectory(*this); } protected: diff --git a/Alignment/ReferenceTrajectories/interface/ReferenceTrajectory.h b/Alignment/ReferenceTrajectories/interface/ReferenceTrajectory.h index 084ea2397430f..bf73a5b573cf7 100644 --- a/Alignment/ReferenceTrajectories/interface/ReferenceTrajectory.h +++ b/Alignment/ReferenceTrajectories/interface/ReferenceTrajectory.h @@ -70,9 +70,9 @@ class ReferenceTrajectory : public ReferenceTrajectoryBase const reco::BeamSpot& beamSpot, const ReferenceTrajectoryBase::Config& config); - virtual ~ReferenceTrajectory() {} + ~ReferenceTrajectory() override {} - virtual ReferenceTrajectory* clone() const { return new ReferenceTrajectory(*this); } + ReferenceTrajectory* clone() const override { return new ReferenceTrajectory(*this); } protected: diff --git a/Alignment/ReferenceTrajectories/interface/ReferenceTrajectoryBase.h b/Alignment/ReferenceTrajectories/interface/ReferenceTrajectoryBase.h index 70404f81ee844..b32c820bb1936 100644 --- a/Alignment/ReferenceTrajectories/interface/ReferenceTrajectoryBase.h +++ b/Alignment/ReferenceTrajectories/interface/ReferenceTrajectoryBase.h @@ -133,7 +133,7 @@ class ReferenceTrajectoryBase : public ReferenceCounted bool allowZeroMaterial{false}; }; - virtual ~ReferenceTrajectoryBase() {} + ~ReferenceTrajectoryBase() override {} bool isValid() { return theValidityFlag; } diff --git a/Alignment/ReferenceTrajectories/interface/TwoBodyDecayTrajectory.h b/Alignment/ReferenceTrajectories/interface/TwoBodyDecayTrajectory.h index 9de99d562db98..1e31f1325ddc8 100644 --- a/Alignment/ReferenceTrajectories/interface/TwoBodyDecayTrajectory.h +++ b/Alignment/ReferenceTrajectories/interface/TwoBodyDecayTrajectory.h @@ -27,9 +27,9 @@ class TwoBodyDecayTrajectory : public ReferenceTrajectoryBase TwoBodyDecayTrajectory( void ); - ~TwoBodyDecayTrajectory( void ) {} + ~TwoBodyDecayTrajectory( void ) override {} - virtual TwoBodyDecayTrajectory* clone( void ) const + TwoBodyDecayTrajectory* clone( void ) const override { return new TwoBodyDecayTrajectory( *this ); } /**Number of RecHits belonging to the first and second track. diff --git a/Alignment/ReferenceTrajectories/plugins/BzeroReferenceTrajectoryFactory.h b/Alignment/ReferenceTrajectories/plugins/BzeroReferenceTrajectoryFactory.h index af2516c97c6ad..cd6009ec9d7d6 100644 --- a/Alignment/ReferenceTrajectories/plugins/BzeroReferenceTrajectoryFactory.h +++ b/Alignment/ReferenceTrajectories/plugins/BzeroReferenceTrajectoryFactory.h @@ -15,19 +15,19 @@ class BzeroReferenceTrajectoryFactory : public TrajectoryFactoryBase { public: BzeroReferenceTrajectoryFactory(const edm::ParameterSet &config); - virtual ~BzeroReferenceTrajectoryFactory(); + ~BzeroReferenceTrajectoryFactory() override; /// Produce the reference trajectories. - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, - const reco::BeamSpot &beamSpot) const; + const reco::BeamSpot &beamSpot) const override; - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const ExternalPredictionCollection &external, - const reco::BeamSpot &beamSpot) const; + const reco::BeamSpot &beamSpot) const override; - virtual BzeroReferenceTrajectoryFactory* clone() const { return new BzeroReferenceTrajectoryFactory( *this ); } + BzeroReferenceTrajectoryFactory* clone() const override { return new BzeroReferenceTrajectoryFactory( *this ); } private: diff --git a/Alignment/ReferenceTrajectories/plugins/CombinedTrajectoryFactory.cc b/Alignment/ReferenceTrajectories/plugins/CombinedTrajectoryFactory.cc index 91eed54b893d7..a59a7730f0dea 100644 --- a/Alignment/ReferenceTrajectories/plugins/CombinedTrajectoryFactory.cc +++ b/Alignment/ReferenceTrajectories/plugins/CombinedTrajectoryFactory.cc @@ -28,18 +28,18 @@ class CombinedTrajectoryFactory : public TrajectoryFactoryBase public: CombinedTrajectoryFactory(const edm::ParameterSet &config); - virtual ~CombinedTrajectoryFactory(); + ~CombinedTrajectoryFactory() override; - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override; - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const ExternalPredictionCollection &external, const reco::BeamSpot &beamSpot) const override; - virtual CombinedTrajectoryFactory* clone() const override { return new CombinedTrajectoryFactory(*this); } + CombinedTrajectoryFactory* clone() const override { return new CombinedTrajectoryFactory(*this); } private: diff --git a/Alignment/ReferenceTrajectories/plugins/DualBzeroTrajectoryFactory.cc b/Alignment/ReferenceTrajectories/plugins/DualBzeroTrajectoryFactory.cc index b70db4320f238..34878fbe6e21d 100644 --- a/Alignment/ReferenceTrajectories/plugins/DualBzeroTrajectoryFactory.cc +++ b/Alignment/ReferenceTrajectories/plugins/DualBzeroTrajectoryFactory.cc @@ -19,19 +19,19 @@ class DualBzeroTrajectoryFactory : public TrajectoryFactoryBase { public: DualBzeroTrajectoryFactory(const edm::ParameterSet &config); - virtual ~DualBzeroTrajectoryFactory(); + ~DualBzeroTrajectoryFactory() override; /// Produce the reference trajectories. - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override; - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const ExternalPredictionCollection &external, const reco::BeamSpot &beamSpot) const override; - virtual DualBzeroTrajectoryFactory* clone() const override { return new DualBzeroTrajectoryFactory(*this); } + DualBzeroTrajectoryFactory* clone() const override { return new DualBzeroTrajectoryFactory(*this); } protected: struct DualBzeroTrajectoryInput diff --git a/Alignment/ReferenceTrajectories/plugins/DualTrajectoryFactory.cc b/Alignment/ReferenceTrajectories/plugins/DualTrajectoryFactory.cc index 69f73bb451f88..7a252a85cc1de 100644 --- a/Alignment/ReferenceTrajectories/plugins/DualTrajectoryFactory.cc +++ b/Alignment/ReferenceTrajectories/plugins/DualTrajectoryFactory.cc @@ -19,19 +19,19 @@ class DualTrajectoryFactory : public TrajectoryFactoryBase { public: DualTrajectoryFactory(const edm::ParameterSet &config); - virtual ~DualTrajectoryFactory(); + ~DualTrajectoryFactory() override; /// Produce the reference trajectories. - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override; - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const ExternalPredictionCollection &external, const reco::BeamSpot &beamSpot) const override; - virtual DualTrajectoryFactory* clone() const override { return new DualTrajectoryFactory(*this); } + DualTrajectoryFactory* clone() const override { return new DualTrajectoryFactory(*this); } protected: struct DualTrajectoryInput diff --git a/Alignment/ReferenceTrajectories/plugins/ReferenceTrajectoryFactory.cc b/Alignment/ReferenceTrajectories/plugins/ReferenceTrajectoryFactory.cc index a7fd8eab73025..36cb2bfd66a77 100644 --- a/Alignment/ReferenceTrajectories/plugins/ReferenceTrajectoryFactory.cc +++ b/Alignment/ReferenceTrajectories/plugins/ReferenceTrajectoryFactory.cc @@ -21,19 +21,19 @@ class ReferenceTrajectoryFactory : public TrajectoryFactoryBase { public: ReferenceTrajectoryFactory(const edm::ParameterSet &config); - virtual ~ReferenceTrajectoryFactory(); + ~ReferenceTrajectoryFactory() override; /// Produce the reference trajectories. - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override; - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const ExternalPredictionCollection &external, const reco::BeamSpot &beamSpot) const override; - virtual ReferenceTrajectoryFactory* clone() const override { return new ReferenceTrajectoryFactory(*this); } + ReferenceTrajectoryFactory* clone() const override { return new ReferenceTrajectoryFactory(*this); } protected: ReferenceTrajectoryFactory(const ReferenceTrajectoryFactory &other); @@ -52,7 +52,7 @@ ReferenceTrajectoryFactory::ReferenceTrajectoryFactory( const edm::ParameterSet TrajectoryFactoryBase( config ), theMass(config.getParameter("ParticleMass")), theUseBzeroIfFieldOff(config.getParameter("UseBzeroIfFieldOff")), - theBzeroFactory(0) + theBzeroFactory(nullptr) { edm::LogInfo("Alignment") << "@SUB=ReferenceTrajectoryFactory" << "mass: " << theMass @@ -64,7 +64,7 @@ ReferenceTrajectoryFactory::ReferenceTrajectoryFactory(const ReferenceTrajectory TrajectoryFactoryBase(other), theMass(other.theMass), theUseBzeroIfFieldOff(other.theUseBzeroIfFieldOff), - theBzeroFactory(0) // copy data members, but no double pointing to same Bzero factory... + theBzeroFactory(nullptr) // copy data members, but no double pointing to same Bzero factory... { } diff --git a/Alignment/ReferenceTrajectories/plugins/TwoBodyDecayTrajectoryFactory.cc b/Alignment/ReferenceTrajectories/plugins/TwoBodyDecayTrajectoryFactory.cc index 1272f1368b9d8..92237570a40a2 100644 --- a/Alignment/ReferenceTrajectories/plugins/TwoBodyDecayTrajectoryFactory.cc +++ b/Alignment/ReferenceTrajectories/plugins/TwoBodyDecayTrajectoryFactory.cc @@ -36,19 +36,19 @@ class TwoBodyDecayTrajectoryFactory : public TrajectoryFactoryBase typedef TwoBodyDecayTrajectory::ConstRecHitCollection ConstRecHitCollection; TwoBodyDecayTrajectoryFactory(const edm::ParameterSet &config); - ~TwoBodyDecayTrajectoryFactory(); + ~TwoBodyDecayTrajectoryFactory() override; /// Produce the trajectories. - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const reco::BeamSpot &beamSpot) const override; - virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, + const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, const ConstTrajTrackPairCollection &tracks, const ExternalPredictionCollection &external, const reco::BeamSpot &beamSpot) const override; - virtual TwoBodyDecayTrajectoryFactory* clone() const override { return new TwoBodyDecayTrajectoryFactory(*this); } + TwoBodyDecayTrajectoryFactory* clone() const override { return new TwoBodyDecayTrajectoryFactory(*this); } protected: const ReferenceTrajectoryCollection constructTrajectories(const ConstTrajTrackPairCollection &tracks, diff --git a/Alignment/ReferenceTrajectories/src/ReferenceTrajectory.cc b/Alignment/ReferenceTrajectories/src/ReferenceTrajectory.cc index 3b77215c05d40..e0596b6f9dd71 100644 --- a/Alignment/ReferenceTrajectories/src/ReferenceTrajectory.cc +++ b/Alignment/ReferenceTrajectories/src/ReferenceTrajectory.cc @@ -364,7 +364,7 @@ ReferenceTrajectory::createUpdator(MaterialEffects materialEffects, double mass) return new CombinedMaterialEffectsUpdator(mass); } - return 0; + return nullptr; } //__________________________________________________________________________________ @@ -430,7 +430,7 @@ void ReferenceTrajectory::fillMeasurementAndError(const TransientTrackingRecHit: // hit uncertainty estimate! // FIXME FIXME CLONE - auto newHitPtr = hitPtr; + const auto& newHitPtr = hitPtr; // TransientTrackingRecHit::ConstRecHitPointer newHitPtr(hitPtr->canImproveWithTrack() ? // hitPtr->clone(updatedTsos) : hitPtr); diff --git a/Alignment/SurveyAnalysis/interface/SurveyAlignmentPoints.h b/Alignment/SurveyAnalysis/interface/SurveyAlignmentPoints.h index 360c3501dc3cf..d518466b41af5 100644 --- a/Alignment/SurveyAnalysis/interface/SurveyAlignmentPoints.h +++ b/Alignment/SurveyAnalysis/interface/SurveyAlignmentPoints.h @@ -29,9 +29,9 @@ class SurveyAlignmentPoints: protected: /// Find the alignment parameters for all sensors. - virtual void findAlignPars( + void findAlignPars( bool bias = false // true for biased residuals - ); + ) override; }; #endif diff --git a/Alignment/SurveyAnalysis/interface/SurveyAlignmentSensor.h b/Alignment/SurveyAnalysis/interface/SurveyAlignmentSensor.h index 118a17a39c264..9b61f30707f67 100644 --- a/Alignment/SurveyAnalysis/interface/SurveyAlignmentSensor.h +++ b/Alignment/SurveyAnalysis/interface/SurveyAlignmentSensor.h @@ -29,9 +29,9 @@ class SurveyAlignmentSensor: protected: /// Find the alignment parameters for all sensors. - virtual void findAlignPars( + void findAlignPars( bool bias = false // true for biased residuals - ); + ) override; }; #endif diff --git a/Alignment/SurveyAnalysis/interface/SurveyInputBase.h b/Alignment/SurveyAnalysis/interface/SurveyInputBase.h index 0333a82c35515..35f0f780e5f86 100644 --- a/Alignment/SurveyAnalysis/interface/SurveyInputBase.h +++ b/Alignment/SurveyAnalysis/interface/SurveyInputBase.h @@ -19,16 +19,16 @@ class SurveyInputBase: { public: - virtual ~SurveyInputBase(); + ~SurveyInputBase() override; /// Read data from input. - virtual void beginJob() { theFirstEvent = true; } + void beginJob() override { theFirstEvent = true; } /// Do nothing for each event. - virtual void analyze( + void analyze( const edm::Event&, const edm::EventSetup& - ) = 0; + ) override = 0; /// Get alignable detector as read from input. inline static Alignable* detector(); diff --git a/Alignment/SurveyAnalysis/interface/SurveyParameters.h b/Alignment/SurveyAnalysis/interface/SurveyParameters.h index 194b34e245e84..fd302b30aed25 100644 --- a/Alignment/SurveyAnalysis/interface/SurveyParameters.h +++ b/Alignment/SurveyAnalysis/interface/SurveyParameters.h @@ -28,32 +28,32 @@ class SurveyParameters: ); /// apply not implemented - virtual void apply(); - virtual int type() const; + void apply() override; + int type() const override; /// Cloning not implemented. - virtual AlignmentParameters* clone( + AlignmentParameters* clone( const AlgebraicVector&, const AlgebraicSymMatrix& - ) const; + ) const override; /// Cloning not implemented. - virtual AlignmentParameters* cloneFromSelected( + AlignmentParameters* cloneFromSelected( const AlgebraicVector&, const AlgebraicSymMatrix& - ) const; + ) const override; /// Derivatives not implemented. - virtual AlgebraicMatrix derivatives( + AlgebraicMatrix derivatives( const TrajectoryStateOnSurface&, const AlignableDetOrUnitPtr& - ) const; + ) const override; /// Derivatives not implemented. - virtual AlgebraicMatrix selectedDerivatives( + AlgebraicMatrix selectedDerivatives( const TrajectoryStateOnSurface&, const AlignableDetOrUnitPtr& - ) const; + ) const override; }; diff --git a/Alignment/SurveyAnalysis/plugins/CreateSurveyRcds.h b/Alignment/SurveyAnalysis/plugins/CreateSurveyRcds.h index cb8f23513aea7..0bff3ee74f866 100644 --- a/Alignment/SurveyAnalysis/plugins/CreateSurveyRcds.h +++ b/Alignment/SurveyAnalysis/plugins/CreateSurveyRcds.h @@ -27,10 +27,10 @@ class CreateSurveyRcds: const edm::ParameterSet& ); - virtual void analyze( + void analyze( const edm::Event&, const edm::EventSetup& - ); + ) override; private: diff --git a/Alignment/SurveyAnalysis/plugins/DTSurveyConvert.h b/Alignment/SurveyAnalysis/plugins/DTSurveyConvert.h index 74bcd26c687f6..f91bcbad56b9a 100644 --- a/Alignment/SurveyAnalysis/plugins/DTSurveyConvert.h +++ b/Alignment/SurveyAnalysis/plugins/DTSurveyConvert.h @@ -29,7 +29,7 @@ class DTSurveyConvert : public edm::EDAnalyzer explicit DTSurveyConvert(const edm::ParameterSet&); private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; std::vector wheelList; std::string nameWheel_m2; std::string nameWheel_m1; diff --git a/Alignment/SurveyAnalysis/plugins/SurveyAlignmentAlgorithm.h b/Alignment/SurveyAnalysis/plugins/SurveyAlignmentAlgorithm.h index 6dacfc77ec10d..08b952498753d 100644 --- a/Alignment/SurveyAnalysis/plugins/SurveyAlignmentAlgorithm.h +++ b/Alignment/SurveyAnalysis/plugins/SurveyAlignmentAlgorithm.h @@ -28,22 +28,22 @@ class SurveyAlignmentAlgorithm : public AlignmentAlgorithmBase ); /// call at start of job - virtual void initialize( + void initialize( const edm::EventSetup&, AlignableTracker*, AlignableMuon*, AlignableExtras*, AlignmentParameterStore* - ); + ) override; /// call at end of job - virtual void terminate(const edm::EventSetup& iSetup) {} + void terminate(const edm::EventSetup& iSetup) override {} /// run for every event - virtual void run( + void run( const edm::EventSetup&, const AlignmentAlgorithmBase::EventInfo & - ) {} + ) override {} private: diff --git a/Alignment/SurveyAnalysis/plugins/SurveyDBUploader.cc b/Alignment/SurveyAnalysis/plugins/SurveyDBUploader.cc index 8b20e17a15967..01c68eef0d532 100644 --- a/Alignment/SurveyAnalysis/plugins/SurveyDBUploader.cc +++ b/Alignment/SurveyAnalysis/plugins/SurveyDBUploader.cc @@ -12,8 +12,8 @@ SurveyDBUploader::SurveyDBUploader(const edm::ParameterSet& cfg): theValueRcd( cfg.getParameter("valueRcd") ), theErrorExtendedRcd( cfg.getParameter("errorRcd") ), - theValues(0), - theErrors(0) + theValues(nullptr), + theErrors(nullptr) { } diff --git a/Alignment/SurveyAnalysis/plugins/SurveyDBUploader.h b/Alignment/SurveyAnalysis/plugins/SurveyDBUploader.h index 52715c23cc125..448dddf7ace84 100644 --- a/Alignment/SurveyAnalysis/plugins/SurveyDBUploader.h +++ b/Alignment/SurveyAnalysis/plugins/SurveyDBUploader.h @@ -37,13 +37,13 @@ class SurveyDBUploader: const edm::ParameterSet& ); - virtual void analyze( + void analyze( const edm::Event&, const edm::EventSetup& - ) {} + ) override {} /// Upload to DB - virtual void endJob(); + void endJob() override; private: diff --git a/Alignment/SurveyAnalysis/plugins/SurveyDataConverter.h b/Alignment/SurveyAnalysis/plugins/SurveyDataConverter.h index d667a3cd051bf..163c9460ce445 100644 --- a/Alignment/SurveyAnalysis/plugins/SurveyDataConverter.h +++ b/Alignment/SurveyAnalysis/plugins/SurveyDataConverter.h @@ -33,8 +33,8 @@ class SurveyDataConverter : public edm::EDAnalyzer public: explicit SurveyDataConverter(const edm::ParameterSet& iConfig); - virtual void analyze( const edm::Event& iEvent, const edm::EventSetup& iSetup); - virtual void endJob() {}; + void analyze( const edm::Event& iEvent, const edm::EventSetup& iSetup) override; + void endJob() override {}; private: diff --git a/Alignment/SurveyAnalysis/plugins/SurveyInputCSCfromPins.cc b/Alignment/SurveyAnalysis/plugins/SurveyInputCSCfromPins.cc index 39dc79f06ff16..c85808173167a 100644 --- a/Alignment/SurveyAnalysis/plugins/SurveyInputCSCfromPins.cc +++ b/Alignment/SurveyAnalysis/plugins/SurveyInputCSCfromPins.cc @@ -280,12 +280,12 @@ void SurveyInputCSCfromPins::analyze(const edm::Event&, const edm::EventSetup& i void SurveyInputCSCfromPins::fillAllRecords(Alignable *ali) { - if (ali->survey() == 0) { + if (ali->survey() == nullptr) { AlignableCSCChamber *ali_AlignableCSCChamber = dynamic_cast(ali); AlignableCSCStation *ali_AlignableCSCStation = dynamic_cast(ali); - if (ali_AlignableCSCChamber != 0) { + if (ali_AlignableCSCChamber != nullptr) { CSCDetId detid(ali->geomDetId()); if (abs(detid.station()) == 1 && (detid.ring() == 1 || detid.ring() == 4)) { align::ErrorMatrix error = ROOT::Math::SMatrixIdentity(); @@ -325,7 +325,7 @@ void SurveyInputCSCfromPins::fillAllRecords(Alignable *ali) { } } - else if (ali_AlignableCSCStation != 0) { + else if (ali_AlignableCSCStation != nullptr) { align::ErrorMatrix error = ROOT::Math::SMatrixIdentity(); error(0,0) = m_stationErrorX; error(1,1) = m_stationErrorY; diff --git a/Alignment/SurveyAnalysis/plugins/SurveyInputCSCfromPins.h b/Alignment/SurveyAnalysis/plugins/SurveyInputCSCfromPins.h index 1b223ac1fe5d8..920f582cc568a 100644 --- a/Alignment/SurveyAnalysis/plugins/SurveyInputCSCfromPins.h +++ b/Alignment/SurveyAnalysis/plugins/SurveyInputCSCfromPins.h @@ -20,7 +20,7 @@ class SurveyInputCSCfromPins: SurveyInputCSCfromPins(const edm::ParameterSet&); /// Read ideal tracker geometry from DB - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: diff --git a/Alignment/SurveyAnalysis/plugins/SurveyInputTrackerFromDB.h b/Alignment/SurveyAnalysis/plugins/SurveyInputTrackerFromDB.h index 21e05a201fd52..924cd661dc32d 100644 --- a/Alignment/SurveyAnalysis/plugins/SurveyInputTrackerFromDB.h +++ b/Alignment/SurveyAnalysis/plugins/SurveyInputTrackerFromDB.h @@ -27,10 +27,10 @@ class SurveyInputTrackerFromDB: ); /// Read ideal tracker geometry from DB - virtual void analyze( + void analyze( const edm::Event&, const edm::EventSetup& - ); + ) override; private: diff --git a/Alignment/SurveyAnalysis/plugins/SurveyMisalignmentInput.h b/Alignment/SurveyAnalysis/plugins/SurveyMisalignmentInput.h index cbd7366bfcfd7..83d95d100fa78 100644 --- a/Alignment/SurveyAnalysis/plugins/SurveyMisalignmentInput.h +++ b/Alignment/SurveyAnalysis/plugins/SurveyMisalignmentInput.h @@ -28,10 +28,10 @@ class SurveyMisalignmentInput: ); /// Read ideal tracker geometry from DB - virtual void analyze( + void analyze( const edm::Event&, const edm::EventSetup& - ); + ) override; private: diff --git a/Alignment/SurveyAnalysis/src/DTSurvey.cc b/Alignment/SurveyAnalysis/src/DTSurvey.cc index 1ba54ca3faf3b..6d59ca8a37da8 100644 --- a/Alignment/SurveyAnalysis/src/DTSurvey.cc +++ b/Alignment/SurveyAnalysis/src/DTSurvey.cc @@ -10,7 +10,7 @@ #include DTSurvey::DTSurvey(const std::string& Wheel, const std::string& Chambers, int n) - : chambers(0) { + : chambers(nullptr) { nameOfWheelInfoFile = Wheel; nameOfChamberInfoFile = Chambers; diff --git a/Alignment/SurveyAnalysis/src/SurveyInputBase.cc b/Alignment/SurveyAnalysis/src/SurveyInputBase.cc index 4cf09e91cb934..79cd2b42972cb 100644 --- a/Alignment/SurveyAnalysis/src/SurveyInputBase.cc +++ b/Alignment/SurveyAnalysis/src/SurveyInputBase.cc @@ -2,18 +2,18 @@ #include "Alignment/SurveyAnalysis/interface/SurveyInputBase.h" -Alignable* SurveyInputBase::theDetector(0); +Alignable* SurveyInputBase::theDetector(nullptr); SurveyInputBase::~SurveyInputBase() { delete theDetector; - theDetector = 0; + theDetector = nullptr; } void SurveyInputBase::addComponent(Alignable* comp) { - if (0 == theDetector) + if (nullptr == theDetector) theDetector = comp; else theDetector->addComponent(comp); diff --git a/Alignment/SurveyAnalysis/src/SurveyParameters.cc b/Alignment/SurveyAnalysis/src/SurveyParameters.cc index 3a832c306f4cb..9183d10fa89e4 100644 --- a/Alignment/SurveyAnalysis/src/SurveyParameters.cc +++ b/Alignment/SurveyAnalysis/src/SurveyParameters.cc @@ -25,7 +25,7 @@ AlignmentParameters* SurveyParameters::clone(const AlgebraicVector&, { throw cms::Exception("BadInheritance") << "SurveyParameters::clone(): Not implemented."; - return 0; + return nullptr; } AlignmentParameters* SurveyParameters::cloneFromSelected(const AlgebraicVector&, @@ -34,7 +34,7 @@ AlignmentParameters* SurveyParameters::cloneFromSelected(const AlgebraicVector&, throw cms::Exception("BadInheritance") << "SurveyParameters::cloneFromSelected(): Not implemented."; - return 0; + return nullptr; } AlgebraicMatrix SurveyParameters::derivatives(const TrajectoryStateOnSurface&, diff --git a/Alignment/TrackerAlignment/interface/AlignableSiStripDet.h b/Alignment/TrackerAlignment/interface/AlignableSiStripDet.h index 653af917412a4..bc884a5c1a670 100644 --- a/Alignment/TrackerAlignment/interface/AlignableSiStripDet.h +++ b/Alignment/TrackerAlignment/interface/AlignableSiStripDet.h @@ -25,10 +25,10 @@ class AlignableSiStripDet: public AlignableDet { /// Constructor AlignableSiStripDet(const GluedGeomDet *geomDet); /// reduntantly make destructor virtual - virtual ~AlignableSiStripDet(); + ~AlignableSiStripDet() override; /// first consistify with component detunits, then call method from AlignableDet - virtual Alignments* alignments() const; + Alignments* alignments() const override; private: /// make alignments consistent with daughters diff --git a/Alignment/TrackerAlignment/interface/AlignableTracker.h b/Alignment/TrackerAlignment/interface/AlignableTracker.h index 0d60aea336b9d..156fcf414a0c2 100644 --- a/Alignment/TrackerAlignment/interface/AlignableTracker.h +++ b/Alignment/TrackerAlignment/interface/AlignableTracker.h @@ -24,7 +24,7 @@ class AlignableTracker : public AlignableComposite { public: AlignableTracker(const TrackerGeometry*, const TrackerTopology*); - virtual ~AlignableTracker() { /* TODO: delete all tracker-alignables? */ }; + ~AlignableTracker() override { /* TODO: delete all tracker-alignables? */ }; /// Return alignables of subdet and hierarchy level determined by name /// as defined in tracker part of Alignment/CommonAlignment/StructureType.h @@ -156,10 +156,10 @@ class AlignableTracker : public AlignableComposite { /// Return alignments, sorted by DetId - Alignments* alignments() const; + Alignments* alignments() const override; /// Return alignment errors, sorted by DetId - AlignmentErrorsExtended* alignmentErrors() const; + AlignmentErrorsExtended* alignmentErrors() const override; /// Return tracker topology used to build AlignableTracker const TrackerTopology* trackerTopology() const { return tTopo_;} diff --git a/Alignment/TrackerAlignment/interface/TrackerAlignableIndexer.h b/Alignment/TrackerAlignment/interface/TrackerAlignableIndexer.h index 69f50299bf8b9..42bd62a2b0fa7 100644 --- a/Alignment/TrackerAlignment/interface/TrackerAlignableIndexer.h +++ b/Alignment/TrackerAlignment/interface/TrackerAlignableIndexer.h @@ -31,7 +31,7 @@ class TrackerAlignableIndexer : public AlignableIndexer TrackerAlignableIndexer& operator=(const TrackerAlignableIndexer&) = default; TrackerAlignableIndexer(TrackerAlignableIndexer&&) = default; TrackerAlignableIndexer& operator=(TrackerAlignableIndexer&&) = default; - virtual ~TrackerAlignableIndexer() = default; + ~TrackerAlignableIndexer() override = default; private: const align::TrackerNameSpace tns_; diff --git a/Alignment/TrackerAlignment/interface/TrackerScenarioBuilder.h b/Alignment/TrackerAlignment/interface/TrackerScenarioBuilder.h index 692f9a2e393b1..4df23b7a0cdb8 100644 --- a/Alignment/TrackerAlignment/interface/TrackerScenarioBuilder.h +++ b/Alignment/TrackerAlignment/interface/TrackerScenarioBuilder.h @@ -30,14 +30,14 @@ class TrackerScenarioBuilder : public MisalignmentScenarioBuilder explicit TrackerScenarioBuilder( AlignableTracker* alignable ); /// Destructor - ~TrackerScenarioBuilder() {}; + ~TrackerScenarioBuilder() override {}; /// Apply misalignment scenario to the tracker - void applyScenario( const edm::ParameterSet& scenario ); + void applyScenario( const edm::ParameterSet& scenario ) override; /// does this still make sense? - virtual bool isTopLevel_(const std::string& parameterSetName) const; + bool isTopLevel_(const std::string& parameterSetName) const override; /// True if hierarchy level 'sub' could be part of hierarchy level 'large'. - virtual bool possiblyPartOf(const std::string &sub, const std::string &large) const; + bool possiblyPartOf(const std::string &sub, const std::string &large) const override; private: std::string stripOffModule(const align::StructureType& type) const; diff --git a/Alignment/TrackerAlignment/plugins/AlignmentPrescaler.cc b/Alignment/TrackerAlignment/plugins/AlignmentPrescaler.cc index 16c373e93b18f..7af092489973c 100644 --- a/Alignment/TrackerAlignment/plugins/AlignmentPrescaler.cc +++ b/Alignment/TrackerAlignment/plugins/AlignmentPrescaler.cc @@ -47,10 +47,10 @@ void AlignmentPrescaler::beginJob(){ fpresc_=new TFile(prescfilename_.c_str(),"READ"); tpresc_=(TTree*)fpresc_->Get(presctreename_.c_str()); tpresc_->BuildIndex("DetId"); - tpresc_->SetBranchStatus("*",0); - tpresc_->SetBranchStatus("DetId",1); - tpresc_->SetBranchStatus("PrescaleFactor",1); - tpresc_->SetBranchStatus("PrescaleFactorOverlap",1); + tpresc_->SetBranchStatus("*",false); + tpresc_->SetBranchStatus("DetId",true); + tpresc_->SetBranchStatus("PrescaleFactor",true); + tpresc_->SetBranchStatus("PrescaleFactorOverlap",true); cout<<" Branches activated "<(hit); - if(stripHit1D!=0){ + if(stripHit1D!=nullptr){ SiStripRecHit1D::ClusterRef stripclust(stripHit1D->cluster()); tmpflag=InValMap[stripclust]; tmpflag.SetDetId(hit->geographicalId()); @@ -146,7 +146,7 @@ void AlignmentPrescaler::produce(edm::Event &iEvent, const edm::EventSetup &iSet } else if (stripType==2) { //const SiStripRecHit2D* stripHit2D = dynamic_cast(hit); - if(stripHit2D!=0){ + if(stripHit2D!=nullptr){ SiStripRecHit2D::ClusterRef stripclust(stripHit2D->cluster()); tmpflag=InValMap[stripclust]; tmpflag.SetDetId(hit->geographicalId()); @@ -160,7 +160,7 @@ void AlignmentPrescaler::produce(edm::Event &iEvent, const edm::EventSetup &iSet }//end if is a strip hit else{ // const SiPixelRecHit* pixelhit= dynamic_cast(hit); - if(pixelhit!=0){ + if(pixelhit!=nullptr){ //npxlhits++; SiPixelClusterRefNew pixclust(pixelhit->cluster()); tmpflag=InValMap[pixclust]; diff --git a/Alignment/TrackerAlignment/plugins/AlignmentPrescaler.h b/Alignment/TrackerAlignment/plugins/AlignmentPrescaler.h index 84dcf2f8804d2..9494683f9200b 100644 --- a/Alignment/TrackerAlignment/plugins/AlignmentPrescaler.h +++ b/Alignment/TrackerAlignment/plugins/AlignmentPrescaler.h @@ -24,10 +24,10 @@ class AlignmentPrescaler : public edm::EDProducer{ public: AlignmentPrescaler(const edm::ParameterSet &iConfig); - ~AlignmentPrescaler(); - void beginJob(); - void endJob(); - virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) ; + ~AlignmentPrescaler() override; + void beginJob() override; + void endJob() override; + void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override ; private: edm::InputTag src_;//tracks in input diff --git a/Alignment/TrackerAlignment/plugins/CosmicRateAnalyzer.cc b/Alignment/TrackerAlignment/plugins/CosmicRateAnalyzer.cc index eb2d00b5d9ad0..4cd6d67f72ec8 100644 --- a/Alignment/TrackerAlignment/plugins/CosmicRateAnalyzer.cc +++ b/Alignment/TrackerAlignment/plugins/CosmicRateAnalyzer.cc @@ -79,18 +79,18 @@ Implementation : Documentation for running this tool is described in twiki : class CosmicRateAnalyzer : public edm::one::EDAnalyzer { public: explicit CosmicRateAnalyzer(const edm::ParameterSet&); - ~CosmicRateAnalyzer(); + ~CosmicRateAnalyzer() 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; + void beginRun(edm::Run const&, edm::EventSetup const&) override; + void endRun(edm::Run const&, edm::EventSetup const&) override; static double stampToReal(edm::Timestamp time) { return time.unixTime() + time.microsecondOffset()*1e-6; @@ -239,7 +239,7 @@ CosmicRateAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSe edm::ESHandle apvlat; iSetup.get().get(apvlat); - if (tracks->size()>0) v_ntrk.push_back(tracks->size()); + if (!tracks->empty()) v_ntrk.push_back(tracks->size()); ntrk = 0; for(TrackCollection::const_iterator itTrack1 = tracks->begin(); itTrack1 != tracks->end(); ++itTrack1) diff --git a/Alignment/TrackerAlignment/plugins/CreateTrackerAlignmentRcds.cc b/Alignment/TrackerAlignment/plugins/CreateTrackerAlignmentRcds.cc index 3ad94c5885ec3..31bd3616ec974 100644 --- a/Alignment/TrackerAlignment/plugins/CreateTrackerAlignmentRcds.cc +++ b/Alignment/TrackerAlignment/plugins/CreateTrackerAlignmentRcds.cc @@ -70,7 +70,7 @@ class CreateIdealTkAlRecords : public edm::one::EDAnalyzer<> { public: explicit CreateIdealTkAlRecords(const edm::ParameterSet&); - ~CreateIdealTkAlRecords(); + ~CreateIdealTkAlRecords() override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); static std::string toString(const GeomDetEnumerators::SubDetector&); @@ -79,7 +79,7 @@ class CreateIdealTkAlRecords : public edm::one::EDAnalyzer<> { toSubDetectors(const std::vector& subs); private: - virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + void analyze(const edm::Event&, const edm::EventSetup&) override; void clearAlignmentInfos(); std::unique_ptr retrieveGeometry(const edm::EventSetup&); void addAlignmentInfo(const GeomDet&); diff --git a/Alignment/TrackerAlignment/plugins/MisalignedTrackerESProducer.cc b/Alignment/TrackerAlignment/plugins/MisalignedTrackerESProducer.cc index 2bf97ae2820aa..45ed97f834e9d 100644 --- a/Alignment/TrackerAlignment/plugins/MisalignedTrackerESProducer.cc +++ b/Alignment/TrackerAlignment/plugins/MisalignedTrackerESProducer.cc @@ -42,7 +42,7 @@ class MisalignedTrackerESProducer: public edm::ESProducer MisalignedTrackerESProducer(const edm::ParameterSet & p); /// Destructor - virtual ~MisalignedTrackerESProducer(); + ~MisalignedTrackerESProducer() override; /// Produce the misaligned tracker geometry and store it std::shared_ptr produce(const TrackerDigiGeometryRecord& iRecord); diff --git a/Alignment/TrackerAlignment/plugins/TkAlCaOverlapTagger.cc b/Alignment/TrackerAlignment/plugins/TkAlCaOverlapTagger.cc index c6a74b8a71ccf..0e4f797dec37e 100644 --- a/Alignment/TrackerAlignment/plugins/TkAlCaOverlapTagger.cc +++ b/Alignment/TrackerAlignment/plugins/TkAlCaOverlapTagger.cc @@ -30,7 +30,7 @@ class TkAlCaOverlapTagger : public edm::EDProducer { public: TkAlCaOverlapTagger(const edm::ParameterSet &iConfig); - ~TkAlCaOverlapTagger(); + ~TkAlCaOverlapTagger() override; void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override; private: @@ -92,13 +92,13 @@ void TkAlCaOverlapTagger::produce(edm::Event &iEvent, const edm::EventSetup &iSe int hitcnt=-1; //loop over traj meas - const TrajectoryMeasurement* previousTM(0); + const TrajectoryMeasurement* previousTM(nullptr); DetId previousId(0); for(std::vector::const_iterator itTrajMeas = tmColl.begin(); itTrajMeas!=tmColl.end(); ++itTrajMeas){ hitcnt++; - if ( previousTM!=0 ) { + if ( previousTM!=nullptr ) { // std::cout<<"Checking TrajMeas ("<recHit()->isValid()){ //std::cout<<"Previous RecHit invalid !"<::const_iterator itmCompare =itTrajMeas-1;itmCompare >= tmColl.begin() && itmCompare > itTrajMeas - 4;--itmCompare){ DetId compareId = itmCompare->recHit()->geographicalId(); if ( subDet != compareId.subdetId() || layer != layerFromId(compareId, tTopo)) break; @@ -141,10 +141,10 @@ void TkAlCaOverlapTagger::produce(edm::Event &iEvent, const edm::EventSetup &iSe const SiStripRecHit1D* transstriphit1D = dynamic_cast(hit); // if (type == typeid(SiStripRecHit1D)) { - if(transstriphit1D!=0){ + if(transstriphit1D!=nullptr){ // const SiStripRecHit1D* striphit=dynamic_cast(hit); const SiStripRecHit1D* striphit=transstriphit1D; - if(striphit!=0){ + if(striphit!=nullptr){ SiStripRecHit1D::ClusterRef stripclust(striphit->cluster()); if(stripclust.id()==stripclusters.id()){//ensure that the stripclust is really present in the original cluster collection!!! @@ -158,11 +158,11 @@ void TkAlCaOverlapTagger::produce(edm::Event &iEvent, const edm::EventSetup &iSe edm::LogError("TkAlCaOverlapTagger")<<"ERROR in : Dynamic cast of Strip RecHit failed! TypeId of the RecHit: "<(hit); const SiStripRecHit2D* striphit=transstriphit2D; - if(striphit!=0){ + if(striphit!=nullptr){ SiStripRecHit2D::ClusterRef stripclust(striphit->cluster()); if(stripclust.id()==stripclusters.id()){//ensure that the stripclust is really present in the original cluster collection!!! @@ -187,7 +187,7 @@ void TkAlCaOverlapTagger::produce(edm::Event &iEvent, const edm::EventSetup &iSe }//end if hit in Strips else {//pixel hit const SiPixelRecHit* transpixelhit = dynamic_cast(hit); - if(transpixelhit!=0){ + if(transpixelhit!=nullptr){ const SiPixelRecHit* pixelhit=transpixelhit; SiPixelClusterRefNew pixclust(pixelhit->cluster()); diff --git a/Alignment/TrackerAlignment/plugins/TkAlCaSkimTreeMerger.cc b/Alignment/TrackerAlignment/plugins/TkAlCaSkimTreeMerger.cc index 6c4db5efd43f4..dc415fecdb5be 100644 --- a/Alignment/TrackerAlignment/plugins/TkAlCaSkimTreeMerger.cc +++ b/Alignment/TrackerAlignment/plugins/TkAlCaSkimTreeMerger.cc @@ -26,7 +26,7 @@ class TkAlCaSkimTreeMerger : public edm::EDAnalyzer{ public: TkAlCaSkimTreeMerger(const edm::ParameterSet &iConfig); - ~TkAlCaSkimTreeMerger(); + ~TkAlCaSkimTreeMerger() override; void beginJob() override; void endJob() override; void analyze(const edm::Event&, const edm::EventSetup&) override; @@ -75,9 +75,9 @@ TkAlCaSkimTreeMerger::TkAlCaSkimTreeMerger(const edm::ParameterSet &iConfig) : maxTEChits_=maxhitsSet_.getParameter("TECmaxhits"); //anything you want to do for initializing std::cout<<"\n\n*** MAX N HITS = "<SetBranchAddress("Nhits", &nhits_ch); ch_->SetBranchAddress("Noverlaps",&noverlaps_ch); - ch_->SetBranchStatus("SubDet",0); - ch_->SetBranchStatus("Layer",0); - ch_->SetBranchStatus("is2D",0); - ch_->SetBranchStatus("isStereo",0); - ch_->SetBranchStatus("posX",0); - ch_->SetBranchStatus("posY",0); - ch_->SetBranchStatus("posZ",0); - ch_->SetBranchStatus("posR",0); - ch_->SetBranchStatus("posEta",0); - ch_->SetBranchStatus("posPhi",0);//now only id, nhits and noverlaps are on... + ch_->SetBranchStatus("SubDet",false); + ch_->SetBranchStatus("Layer",false); + ch_->SetBranchStatus("is2D",false); + ch_->SetBranchStatus("isStereo",false); + ch_->SetBranchStatus("posX",false); + ch_->SetBranchStatus("posY",false); + ch_->SetBranchStatus("posZ",false); + ch_->SetBranchStatus("posR",false); + ch_->SetBranchStatus("posEta",false); + ch_->SetBranchStatus("posPhi",false);//now only id, nhits and noverlaps are on... int totnhits(0),totnoverlaps(0); diff --git a/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.cc b/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.cc index 2c8e96d2ed562..07ceda4bbb86e 100644 --- a/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.cc +++ b/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.cc @@ -39,7 +39,7 @@ // made some variables constant, removed obviously dead code and comments TrackerSystematicMisalignments::TrackerSystematicMisalignments(const edm::ParameterSet& cfg) - : theAlignableTracker(0) + : theAlignableTracker(nullptr) { // use existing geometry m_fromDBGeom = cfg.getUntrackedParameter< bool > ("fromDBGeom"); diff --git a/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.h b/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.h index f6c12cdbc83f2..91eb58754b821 100644 --- a/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.h +++ b/Alignment/TrackerAlignment/plugins/TrackerSystematicMisalignments.h @@ -32,9 +32,9 @@ public edm::EDAnalyzer ); /// Read ideal tracker geometry from DB - virtual void beginJob(); + void beginJob() override; - virtual void analyze(const edm::Event&, const edm::EventSetup&); + void analyze(const edm::Event&, const edm::EventSetup&) override; private: diff --git a/Alignment/TrackerAlignment/plugins/TrackerTreeGenerator.cc b/Alignment/TrackerAlignment/plugins/TrackerTreeGenerator.cc index d39c95d643278..83bfd0e1166fd 100644 --- a/Alignment/TrackerAlignment/plugins/TrackerTreeGenerator.cc +++ b/Alignment/TrackerAlignment/plugins/TrackerTreeGenerator.cc @@ -65,12 +65,12 @@ class TrackerTreeGenerator : public edm::one::EDAnalyzer { public: explicit TrackerTreeGenerator(const edm::ParameterSet&); - ~TrackerTreeGenerator() = default; + ~TrackerTreeGenerator() override = default; 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/Alignment/TrackerAlignment/src/AlignableTrackerBuilder.cc b/Alignment/TrackerAlignment/src/AlignableTrackerBuilder.cc index 366f70fe878be..22331a669f605 100644 --- a/Alignment/TrackerAlignment/src/AlignableTrackerBuilder.cc +++ b/Alignment/TrackerAlignment/src/AlignableTrackerBuilder.cc @@ -224,7 +224,7 @@ ::buildStripDetectorAlignable(const GeomDet* geomDet, int subdetId, // 2D- or 'pure' 1D-module if (!detId.glued()) { - if (geomDet->components().size()) { + if (!geomDet->components().empty()) { // 2D-module, convert it to GluedGeomDet const GluedGeomDet* gluedGeomDet = dynamic_cast(geomDet); if (!gluedGeomDet) {