From 5da5d8796496a7e7f7629b3c8ce01f8b1cf9e69c Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Fri, 16 Dec 2016 19:51:08 +0100 Subject: [PATCH] 'Making const some methods of PixelToTPIDTool.' (PixelToTPIDTool-01-00-12) * Tagging PixelToTPIDTool-01-00-12. * Making const some methods of PixelToTPIDTool. 2016-12-14 scott snyder <snyder@bnl.gov> * Tagging as PixelToTPIDTool-01-00-11. * endreq -> endmsg. --- .../PixelToTPIDTool/PixelToTPIDTool.h | 14 +++++++------- .../PixelToTPIDTool/src/PixelToTPIDTool.cxx | 16 ++++++++-------- .../PixelToTPIDTool/src/PixeldEdxAODFix.cxx | 8 ++++---- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/InnerDetector/InDetRecTools/PixelToTPIDTool/PixelToTPIDTool/PixelToTPIDTool.h b/InnerDetector/InDetRecTools/PixelToTPIDTool/PixelToTPIDTool/PixelToTPIDTool.h index a04167b1b1a..872e5a16bf8 100644 --- a/InnerDetector/InDetRecTools/PixelToTPIDTool/PixelToTPIDTool/PixelToTPIDTool.h +++ b/InnerDetector/InDetRecTools/PixelToTPIDTool/PixelToTPIDTool/PixelToTPIDTool.h @@ -44,22 +44,22 @@ namespace InDet virtual ~PixelToTPIDTool (); /** standard Athena-Algorithm method */ - virtual StatusCode initialize(); + virtual StatusCode initialize() override; /** standard Athena-Algorithm method */ - virtual StatusCode finalize (); + virtual StatusCode finalize () override; /** dE/dx to be returned */ - float dEdx(const Trk::Track& track); + virtual float dEdx(const Trk::Track& track) override; /** Number of hits selected for dE/dx track measurement */ - int numberOfUsedHitsdEdx(); + virtual int numberOfUsedHitsdEdx() override; /** Number of IBL hits with at least one hit in overflow used for Track dEdx measurement */ - int numberOfUsedIBLOverflowHits(); + virtual int numberOfUsedIBLOverflowHits() override; - std::vector<float> getLikelihoods(double dedx, double p, int nGoodPixels); - float getMass(double dedx, double p, int nGoodPixels); + virtual std::vector<float> getLikelihoods(double dedx, double p, int nGoodPixels) const override; + virtual float getMass(double dedx, double p, int nGoodPixels) const override; private: ServiceHandle<IBLParameterSvc> m_IBLParameterSvc; diff --git a/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixelToTPIDTool.cxx b/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixelToTPIDTool.cxx index 026c7cab7b5..fbbf03b24c1 100644 --- a/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixelToTPIDTool.cxx +++ b/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixelToTPIDTool.cxx @@ -106,7 +106,7 @@ StatusCode InDet::PixelToTPIDTool::initialize() else { std::string file_name = PathResolver::find_file (m_filename, "DATAPATH"); if (file_name.size()==0) { - msg(MSG::FATAL) << "Could not find dEdx calibration file" << m_filename << endreq; + msg(MSG::FATAL) << "Could not find dEdx calibration file" << m_filename << endmsg; return StatusCode::FAILURE; } m_mydedx=new dEdxID(file_name.c_str()); @@ -193,10 +193,10 @@ float InDet::PixelToTPIDTool::dEdx(const Trk::Track& track) if (measurement && !(*tsosIter)->type(Trk::TrackStateOnSurface::Outlier)) { if (!(*tsosIter)->trackParameters()) { if (m_slimwarn<10){ - msg(MSG::WARNING) << "No track parameters available for a state of type measurement, returning -1" << endreq; - msg(MSG::WARNING) << "Don't run this tool on slimmed tracks!" << endreq; + msg(MSG::WARNING) << "No track parameters available for a state of type measurement, returning -1" << endmsg; + msg(MSG::WARNING) << "Don't run this tool on slimmed tracks!" << endmsg; m_slimwarn++; - if (m_slimwarn==10) msg(MSG::WARNING) << "(last message!)" << endreq; + if (m_slimwarn==10) msg(MSG::WARNING) << "(last message!)" << endmsg; } return -1; } @@ -222,7 +222,7 @@ float InDet::PixelToTPIDTool::dEdx(const Trk::Track& track) /* const Trk::CovarianceMatrix &measerr=pixclus->localErrorMatrix().covariance(); const Trk::MeasuredTrackParameters *measpar=dynamic_cast<const Trk::MeasuredTrackParameters *>((*tsosIter)->trackParameters()); if (!measpar) { - msg(MSG::DEBUG) << "No measured track parameters available, returning -1" << endreq; + msg(MSG::DEBUG) << "No measured track parameters available, returning -1" << endmsg; return -1; } const Trk::CovarianceMatrix &trackerr=measpar->localErrorMatrix().covariance(); @@ -408,7 +408,7 @@ StatusCode InDet::PixelToTPIDTool::update( IOVSVC_CALLBACK_ARGS_P(I,keys) ) { } } else { - // m_log << MSG::ERROR << "Problem reading condDB object." << endreq; + // m_log << MSG::ERROR << "Problem reading condDB object." << endmsg; ATH_MSG_ERROR ("Problem reading condDB object. -"); return StatusCode::FAILURE; } @@ -417,7 +417,7 @@ StatusCode InDet::PixelToTPIDTool::update( IOVSVC_CALLBACK_ARGS_P(I,keys) ) { } -std::vector<float> InDet::PixelToTPIDTool::getLikelihoods(double dedx2, double p2, int nGoodPixels){ +std::vector<float> InDet::PixelToTPIDTool::getLikelihoods(double dedx2, double p2, int nGoodPixels) const { double dedx=dedx2; double p=p2/1000; std::vector<float> vhypo; @@ -436,7 +436,7 @@ std::vector<float> InDet::PixelToTPIDTool::getLikelihoods(double dedx2, double p } //to change -float InDet::PixelToTPIDTool::getMass(double dedx, double p, int nGoodPixels){ +float InDet::PixelToTPIDTool::getMass(double dedx, double p, int nGoodPixels) const { if (dedx<m_mindedxformass) return 0.13957; return m_mydedx->getMass(dedx,p/1000,nGoodPixels); //return m_mydedx->getMass(dedx/m_conversionfactor,p/1000,nGoodPixels); diff --git a/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixeldEdxAODFix.cxx b/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixeldEdxAODFix.cxx index 1b846c175b5..b2b12a635e9 100644 --- a/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixeldEdxAODFix.cxx +++ b/InnerDetector/InDetRecTools/PixelToTPIDTool/src/PixeldEdxAODFix.cxx @@ -25,12 +25,12 @@ PixeldEdxAODFix::~PixeldEdxAODFix() { } StatusCode PixeldEdxAODFix::initialize() { - msg(MSG::INFO) << "PixeldEdxAODFix::initialize()" << endreq; + msg(MSG::INFO) << "PixeldEdxAODFix::initialize()" << endmsg; if ( m_summarytool.retrieve().isFailure() ) { - msg(MSG:: FATAL) << m_summarytool.propertyName() << ": Failed to retrieve tool " << m_summarytool.type() << endreq; + msg(MSG:: FATAL) << m_summarytool.propertyName() << ": Failed to retrieve tool " << m_summarytool.type() << endmsg; return StatusCode::FAILURE; } else { - msg(MSG::INFO) << m_summarytool.propertyName() << ": Retrieved tool " << m_summarytool.type() << endreq; + msg(MSG::INFO) << m_summarytool.propertyName() << ": Retrieved tool " << m_summarytool.type() << endmsg; } return StatusCode::SUCCESS; @@ -42,7 +42,7 @@ StatusCode PixeldEdxAODFix::execute() { const Rec::TrackParticleContainer *tpcontainer=0; StatusCode sc=evtStore()->retrieve(tpcontainer,m_tpcontainernames[i]); if (sc.isFailure()){ - msg(MSG::WARNING) << "Could not retrieve " << m_tpcontainernames[i] << endreq; + msg(MSG::WARNING) << "Could not retrieve " << m_tpcontainernames[i] << endmsg; return sc; } -- GitLab