diff --git a/Control/CxxUtils/CxxUtils/CachedUniquePtr.h b/Control/CxxUtils/CxxUtils/CachedUniquePtr.h index 563a9e0b9b931cc92ddd8f92952a2ac76c6361bf..07995bc39e90f5c31f3d2376ab86a92db2db1ce3 100644 --- a/Control/CxxUtils/CxxUtils/CachedUniquePtr.h +++ b/Control/CxxUtils/CxxUtils/CachedUniquePtr.h @@ -62,11 +62,11 @@ public: /// Move constructor. - CachedUniquePtrT (CachedUniquePtrT&& other); + CachedUniquePtrT (CachedUniquePtrT&& other) noexcept; /// Move. - CachedUniquePtrT& operator= (CachedUniquePtrT&& other); + CachedUniquePtrT& operator= (CachedUniquePtrT&& other) noexcept; // Destructor. @@ -80,7 +80,7 @@ public: /// Store a new value to the element. /// Not compatible with other concurrent access. - void store (std::unique_ptr<T> elt); + void store (std::unique_ptr<T> elt) noexcept; /// Return the current value of the element. @@ -101,7 +101,7 @@ public: /// Transfer ownership from the element: return the current value as a /// unique_ptr, leaving the element null. - std::unique_ptr<T> release(); + std::unique_ptr<T> release() noexcept; private: diff --git a/Control/CxxUtils/CxxUtils/CachedUniquePtr.icc b/Control/CxxUtils/CxxUtils/CachedUniquePtr.icc index 2cd51041935aff088aaeaab7855b29a1e8b308d7..76905935062ba3521fbd057ba5da27bd25e46a74 100644 --- a/Control/CxxUtils/CxxUtils/CachedUniquePtr.icc +++ b/Control/CxxUtils/CxxUtils/CachedUniquePtr.icc @@ -41,7 +41,7 @@ CachedUniquePtrT<T>::CachedUniquePtrT (std::unique_ptr<T> elt) */ template <class T> inline -CachedUniquePtrT<T>::CachedUniquePtrT (CachedUniquePtrT&& other) +CachedUniquePtrT<T>::CachedUniquePtrT (CachedUniquePtrT&& other) noexcept : m_ptr (other.release().release()) { } @@ -53,7 +53,7 @@ CachedUniquePtrT<T>::CachedUniquePtrT (CachedUniquePtrT&& other) template <class T> inline CachedUniquePtrT<T>& -CachedUniquePtrT<T>::operator= (CachedUniquePtrT&& other) +CachedUniquePtrT<T>::operator= (CachedUniquePtrT&& other) noexcept { if (this != &other) { store (other.release()); @@ -104,7 +104,7 @@ T* CachedUniquePtrT<T>::set (std::unique_ptr<T> elt) const */ template <class T> inline -void CachedUniquePtrT<T>::store (std::unique_ptr<T> elt) +void CachedUniquePtrT<T>::store (std::unique_ptr<T> elt) noexcept { T* old = m_ptr.exchange (elt.release()); delete old; @@ -165,7 +165,7 @@ CachedUniquePtrT<T>::operator bool() const template <class T> inline std::unique_ptr<T> -CachedUniquePtrT<T>::release() +CachedUniquePtrT<T>::release() noexcept { T* old = m_ptr.exchange (nullptr); return std::unique_ptr<T> (old); diff --git a/Control/CxxUtils/Root/StringUtils.cxx b/Control/CxxUtils/Root/StringUtils.cxx index d23fec7f904ccfa3f6a04ccd75500804082a5e6b..fc8f1600fe94f25c178ae0a62a4517186e62dead 100644 --- a/Control/CxxUtils/Root/StringUtils.cxx +++ b/Control/CxxUtils/Root/StringUtils.cxx @@ -705,7 +705,7 @@ namespace CxxUtils { case '$': { // find the end of the math block - size_t endpos = latex.find("$",nextpos+1); + size_t endpos = latex.find('$',nextpos+1); if(endpos == std::string::npos){ // it's unterminated, break retval += latex.substr(pos); diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx index 90defcc086eee98cf0661acb3847e9c6f68b8cd5..af5fe82fe80f55db6cac9b0d35b2a15238d5920c 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.cxx @@ -169,7 +169,7 @@ StatusCode Muon::ProjectionMMClusterBuilderTool::doFineScan(std::vector<int>& fl } StatusCode Muon::ProjectionMMClusterBuilderTool::doPositionCalculation(std::vector<double>& v_posxc, - const std::vector<double>& v_cor,const std::vector<int> idx_selected, double& xmean, double& xmeanErr,double& qtot,const std::vector<Muon::MMPrepData>& prdsOfLayer)const { + const std::vector<double>& v_cor,const std::vector<int>& idx_selected, double& xmean, double& xmeanErr,double& qtot,const std::vector<Muon::MMPrepData>& prdsOfLayer)const { //determine cluster charge qtot=0; for(const auto& idx:idx_selected) qtot+=prdsOfLayer.at(idx).charge(); diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h index b46faee9d68ac74c50e517bdea5b2ae323731279..817023efc8d2b9a9e96200832e74cff1bead2e06 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/ProjectionMMClusterBuilderTool.h @@ -57,7 +57,7 @@ namespace Muon StatusCode calculateCorrection(const std::vector<Muon::MMPrepData> &prdsOfLayer,std::vector<double>& v_posxc,std::vector<double>& v_cor) const ; StatusCode doFineScan(std::vector<int>& flag,const std::vector<double>& v_posxc, const std::vector<double>& v_cor, std::vector<int>& idx_selected) const ; - StatusCode doPositionCalculation(std::vector<double>& v_posxc, const std::vector<double>& v_cor, const std::vector<int> idx_selected,double& xmean, double& xmeanErr, double & qtot,const std::vector<Muon::MMPrepData>& prdsOfLayer) const; + StatusCode doPositionCalculation(std::vector<double>& v_posxc, const std::vector<double>& v_cor, const std::vector<int>& idx_selected,double& xmean, double& xmeanErr, double & qtot,const std::vector<Muon::MMPrepData>& prdsOfLayer) const; StatusCode writeNewPrd(std::vector<std::unique_ptr<Muon::MMPrepData>>& clustersVect,double xmean, double xerr,double qtot,const std::vector<int>& idx_selected,const std::vector<Muon::MMPrepData>& prdsOfLayer) const ; diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx index de315539cee5b52d707990ca8f9c5b519e577c3f..c87d3499a5459a7edbb2b2d1ae06b93140fdd3fd 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/MMClusterization/src/UTPCMMClusterBuilderTool.cxx @@ -83,7 +83,7 @@ StatusCode Muon::UTPCMMClusterBuilderTool::getClusters(std::vector<Muon::MMPrepD std::vector<double> stripsLocalPosX; stripsLocalPosX.reserve(MMprdsOfLayer.size()); - for( auto MMprd: MMprdsOfLayer){ + for( const auto& MMprd: MMprdsOfLayer){ Identifier id_prd=MMprd.identify(); int gasGap=m_idHelperSvc->mmIdHelper().gasGap(id_prd); stripsLocalPosX.push_back(((gasGap%2==0 && m_digiHasNegativeAngles) ? -1:1)*MMprd.localPosition().x()); //flip local positions for even gas gaps to reduce hough space to positiv angles diff --git a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/SimpleSTgcClusterBuilderTool.cxx b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/SimpleSTgcClusterBuilderTool.cxx index f9662875fa74f54114c292be13e2f39a5e5c5100..394196382587def505f8b14aca4632dd13b9b690 100644 --- a/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/SimpleSTgcClusterBuilderTool.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonDataPrep/STgcClusterization/src/SimpleSTgcClusterBuilderTool.cxx @@ -87,7 +87,7 @@ StatusCode Muon::SimpleSTgcClusterBuilderTool::getClusters(std::vector<Muon::sTg double maxCharge = -1.0; double totalCharge = 0.0; - for ( auto it : cluster ) { + for ( const auto& it : cluster ) { rdoList.push_back(it.identify()); elementsCharge.push_back(it.charge()); elementsChannel.push_back(m_idHelperSvc->stgcIdHelper().channel(it.identify())); @@ -119,7 +119,7 @@ StatusCode Muon::SimpleSTgcClusterBuilderTool::getClusters(std::vector<Muon::sTg ATH_MSG_DEBUG("Cluster size: " << cluster.size()); if ( cluster.size() > 1 ) { double weight = 0.0; - for ( auto it : cluster ) { + for ( const auto& it : cluster ) { isStrip ? weight = it.charge() : weight = 1.0; ATH_MSG_DEBUG("isStrip: " << isStrip << " weight: " << weight); //sigmaSq += weight*(it.localPosition().x()-weightedPosX)*(it.localPosition().x()-weightedPosX); @@ -239,7 +239,7 @@ void SimpleSTgcClusterBuilderTool::dumpStrips( std::vector<Muon::sTgcPrepData>& { ATH_MSG_INFO("====> Dumping all strips: "); - for ( auto it : stripsVect ) { + for ( const auto& it : stripsVect ) { Identifier stripId = it.identify(); ATH_MSG_INFO("Strip identifier: " << m_idHelperSvc->stgcIdHelper().show_to_string(stripId) ); } diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/CscPrepData.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/CscPrepData.h index ffe4cf0e98bbb24cc83027f9c10bbfd80cb10b71..55a10a2f1e05d3253fc1bb1984ff24518386ddeb 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/CscPrepData.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/CscPrepData.h @@ -47,10 +47,10 @@ class CscPrepData : public MuonCluster friend class Muon::CscPrepDataContainerCnv_p1; CscPrepData(); - CscPrepData(const CscPrepData &); - CscPrepData(CscPrepData &&); - CscPrepData &operator=(const CscPrepData &); - CscPrepData &operator=(CscPrepData &&); + CscPrepData(const CscPrepData &) = default; + CscPrepData(CscPrepData &&) noexcept = default; + CscPrepData &operator=(const CscPrepData &) = default; + CscPrepData &operator=(CscPrepData &&) noexcept = default; /** @brief Full constructor. diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h index 6885247a8910ce7be992b4ad078acdad99433c20..cb6d391505986890ba8e0b2cfd41dc6ea8bb1243 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MMPrepData.h @@ -35,9 +35,9 @@ namespace Muon MMPrepData(); MMPrepData(const MMPrepData &); - MMPrepData(MMPrepData &&); + MMPrepData(MMPrepData &&) noexcept = default; MMPrepData &operator=(const MMPrepData &); - MMPrepData &operator=(MMPrepData &&); + MMPrepData &operator=(MMPrepData &&) noexcept = default; /** @brief Constructor. diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MdtPrepData.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MdtPrepData.h index 26d62e71b82c38e4716b8a9f13270f0acc266b3e..2e458ad338d672cc0f8fe5ffcc0326a381b23137 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MdtPrepData.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MdtPrepData.h @@ -47,9 +47,9 @@ public: MdtPrepData(); MdtPrepData(const MdtPrepData &); - MdtPrepData(MdtPrepData &&); + MdtPrepData(MdtPrepData &&) noexcept; MdtPrepData &operator=(const MdtPrepData &); - MdtPrepData &operator=(MdtPrepData &&); + MdtPrepData &operator=(MdtPrepData &&) noexcept; /** Constructor with parameters: this class owns the pointers passed (except the MuonDetectorElement) @param id Identifier of the tube which generated DriftCircle, diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h index d669d75b36872601c4676075fbef8193cac68d05..49b71c891d261171c8513d94b8f05b934240d306 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h @@ -43,9 +43,9 @@ namespace Muon For use by POOL only - do not use! */ MuonCluster(); MuonCluster(const MuonCluster &); - MuonCluster(MuonCluster &&); + MuonCluster(MuonCluster &&) noexcept = default; MuonCluster &operator=(const MuonCluster &); - MuonCluster &operator=(MuonCluster &&); + MuonCluster &operator=(MuonCluster &&) noexcept = default; /** @brief Full constructor. @param RDOId The channel identifier of the central measurement of the cluster. diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/RpcPrepData.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/RpcPrepData.h index 247c628ad7860b0ab11b81fcdbe3674ae9ca32b9..472e4520a8765687654eeaf3ca13caf5e222b1f7 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/RpcPrepData.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/RpcPrepData.h @@ -47,9 +47,9 @@ public: RpcPrepData(); RpcPrepData(const RpcPrepData &); - RpcPrepData(RpcPrepData &&); + RpcPrepData(RpcPrepData &&) noexcept = default; RpcPrepData &operator=(const RpcPrepData &); - RpcPrepData &operator=(RpcPrepData &&); + RpcPrepData &operator=(RpcPrepData &&) noexcept = default; /** @brief Constructor. diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/TgcPrepData.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/TgcPrepData.h index 86f302e41e53ddc1c53a57c3fbc1170dfbbce851..8865d65997d5a849b60b6d7ed7f8f2ffe1695d4f 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/TgcPrepData.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/TgcPrepData.h @@ -41,9 +41,9 @@ namespace Muon TgcPrepData(); TgcPrepData(const TgcPrepData &); - TgcPrepData(TgcPrepData &&); + TgcPrepData(TgcPrepData &&) noexcept = default; TgcPrepData &operator=(const TgcPrepData &); - TgcPrepData &operator=(TgcPrepData &&); + TgcPrepData &operator=(TgcPrepData &&) noexcept = default; /** @brief Full constructor. @param RDOId The identifier of the central strip of the cluster diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/sTgcPrepData.h b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/sTgcPrepData.h index dfbeb36007bb9a7731f72b0458e357ccddc0a93f..06235949288245da06118ac47a7d4c8f61841418 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/sTgcPrepData.h +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/sTgcPrepData.h @@ -32,9 +32,9 @@ namespace Muon sTgcPrepData(); sTgcPrepData(const sTgcPrepData &); - sTgcPrepData(sTgcPrepData &&); + sTgcPrepData(sTgcPrepData &&) noexcept = default; sTgcPrepData &operator=(const sTgcPrepData &); - sTgcPrepData &operator=(sTgcPrepData &&); + sTgcPrepData &operator=(sTgcPrepData &&) noexcept = default; /** @brief Constructor. diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/CscPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/CscPrepData.cxx index bb103b49527f8875f6f3df223bb31e7770e7b6d7..9ace84f2c77273bf199c132acc91087b854218b8 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/CscPrepData.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/CscPrepData.cxx @@ -53,53 +53,6 @@ namespace Muon m_timeStatus(CscTimeStatusUndefined) { } - //copy constructor: - CscPrepData::CscPrepData(const CscPrepData& RIO): - MuonCluster(RIO), - m_detEl( RIO.m_detEl ), - m_charge( RIO.m_charge ), - m_time ( RIO.m_time ), - m_status( RIO.m_status ), - m_timeStatus( RIO.m_timeStatus ) - { } - - CscPrepData::CscPrepData(CscPrepData&& RIO): - MuonCluster(std::move(RIO)), - m_detEl( RIO.m_detEl ), - m_charge( RIO.m_charge ), - m_time ( RIO.m_time ), - m_status( RIO.m_status ), - m_timeStatus( RIO.m_timeStatus ) - { } - - //assignment operator - CscPrepData& CscPrepData::operator=(const CscPrepData& RIO) - { - if (&RIO !=this) - { - MuonCluster::operator=(RIO); - m_detEl = RIO.m_detEl ; - m_charge = RIO.m_charge; - m_time = RIO.m_time; - m_status = RIO.m_status; - m_timeStatus = RIO.m_timeStatus; - } - return *this; - } - - CscPrepData& CscPrepData::operator=(CscPrepData&& RIO) - { - if (&RIO !=this) - { - MuonCluster::operator=(std::move(RIO)); - m_detEl = RIO.m_detEl ; - m_charge = RIO.m_charge; - m_time = RIO.m_time; - m_status = RIO.m_status; - m_timeStatus = RIO.m_timeStatus; - } - return *this; - } MsgStream& CscPrepData::dump( MsgStream& stream) const { diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx index 3ec8ad300d1f08baa32e56f02cd3ff7c613cdc84..7b0eb2f188d55d8ff142e17ad372518aa392b41e 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MMPrepData.cxx @@ -139,23 +139,6 @@ namespace Muon m_author(RIO.m_author) { } - //move constructor: - MMPrepData::MMPrepData(MMPrepData&& RIO): - MuonCluster(std::move(RIO)), - m_detEl( RIO.m_detEl ), - m_time(RIO.m_time), - m_charge(RIO.m_charge), - m_driftDist(RIO.m_driftDist), - m_angle(RIO.m_angle), - m_chisqProb(RIO.m_chisqProb), - m_stripNumbers(RIO.m_stripNumbers), - m_stripTimes(RIO.m_stripTimes), - m_stripCharges(RIO.m_stripCharges), - m_stripDriftDist(RIO.m_stripDriftDist), - m_stripDriftErrors(RIO.m_stripDriftErrors), - m_author(RIO.m_author) - { } - /// set the micro-tpc quantities void MMPrepData::setMicroTPC(float angle, float chisqProb) { @@ -214,28 +197,6 @@ namespace Muon } - MMPrepData& - MMPrepData::operator=(MMPrepData&& RIO) - { - if (&RIO !=this) - { - MuonCluster::operator=(std::move(RIO)); - m_detEl = RIO.m_detEl ; - m_time = RIO.m_time ; - m_charge = RIO.m_charge ; - m_driftDist = RIO.m_driftDist; - m_angle = RIO.m_angle; - m_chisqProb = RIO.m_chisqProb; - m_stripNumbers = RIO.m_stripNumbers; - m_stripTimes = RIO.m_stripTimes; - m_stripCharges = RIO.m_stripCharges; - m_stripDriftDist = RIO.m_stripDriftDist; - m_stripDriftErrors = RIO.m_stripDriftErrors; - m_author = RIO.m_author; - } - return *this; - - } MsgStream& MMPrepData::dump( MsgStream& stream) const diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MdtPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MdtPrepData.cxx index 49d337caf2a51d946f2c59de9d8f45c832c7740e..4a1a69cde877831efd3395ed7252e538f62513d1 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MdtPrepData.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MdtPrepData.cxx @@ -96,7 +96,7 @@ MdtPrepData::MdtPrepData(const MdtPrepData & RIO) {} //Move constructor: -MdtPrepData::MdtPrepData(MdtPrepData && RIO) +MdtPrepData::MdtPrepData(MdtPrepData && RIO) noexcept : PrepRawData( std::move(RIO) ), m_detEl(RIO.m_detEl), @@ -122,7 +122,7 @@ MdtPrepData& MdtPrepData::operator=(const MdtPrepData& RIO) } //assignment operator -MdtPrepData& MdtPrepData::operator=(MdtPrepData&& RIO) +MdtPrepData& MdtPrepData::operator=(MdtPrepData&& RIO) noexcept { if (&RIO !=this) { diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx index 31f74e8bc5ad973975fef0308a2a0b13b3e57019..165c78f095b07d3384185ba0e1878fc82f10dcc6 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx @@ -51,11 +51,6 @@ namespace Muon if (RIO.m_globalPosition) m_globalPosition.store(std::make_unique<const Amg::Vector3D>(*RIO.m_globalPosition)); } - MuonCluster::MuonCluster(MuonCluster&& RIO): - PrepRawData(std::move(RIO)) - { - m_globalPosition = std::move(RIO.m_globalPosition); - } //assignment operator MuonCluster& MuonCluster::operator=(const MuonCluster& RIO) @@ -69,16 +64,6 @@ namespace Muon return *this; } - MuonCluster& MuonCluster::operator=(MuonCluster&& RIO) - { - if (&RIO !=this) - { - Trk::PrepRawData::operator=(std::move(RIO)); - m_globalPosition = std::move(RIO.m_globalPosition); - } - return *this; - } - MsgStream& MuonCluster::dump( MsgStream& stream) const { stream << MSG::INFO<<"MuonCluster {"<<std::endl; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/RpcPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/RpcPrepData.cxx index 495cbf5d0905df2aac8fb4faf25144ea0e802302..71fd043fae8806e457097b0a6e35eb3d827aacac 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/RpcPrepData.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/RpcPrepData.cxx @@ -78,14 +78,6 @@ RpcPrepData::RpcPrepData(const RpcPrepData& RIO): m_ambiguityFlag(RIO.m_ambiguityFlag) { } -// move constructor: -RpcPrepData::RpcPrepData(RpcPrepData&& RIO): - MuonCluster(std::move(RIO)), - m_detEl( RIO.m_detEl ), - m_time( RIO.m_time ), - m_triggerInfo(RIO.m_triggerInfo), - m_ambiguityFlag(RIO.m_ambiguityFlag) -{ } //assignment operator RpcPrepData& @@ -103,21 +95,6 @@ RpcPrepData::operator=(const RpcPrepData& RIO) } -//move operator -RpcPrepData& -RpcPrepData::operator=(RpcPrepData&& RIO) -{ - if (&RIO !=this) - { - MuonCluster::operator=(std::move(RIO)); - m_detEl = RIO.m_detEl ; - m_time = RIO.m_time; - m_triggerInfo = RIO.m_triggerInfo; - m_ambiguityFlag =RIO.m_ambiguityFlag; - } - return *this; - -} MsgStream& RpcPrepData::dump( MsgStream& stream) const diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/TgcPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/TgcPrepData.cxx index 7b64d07dc11cc7d1e118153a5520c94371fa6572..ec0f33e133d456086eba7a031e2261e354dde1e8 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/TgcPrepData.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/TgcPrepData.cxx @@ -49,13 +49,6 @@ TgcPrepData::TgcPrepData(const TgcPrepData& RIO): m_bcBitMap(RIO.m_bcBitMap) { } -//move constructor: -TgcPrepData::TgcPrepData(TgcPrepData&& RIO): - MuonCluster(std::move(RIO)), - m_detEl( RIO.m_detEl ), - m_bcBitMap(RIO.m_bcBitMap) -{ } - //assignment operator TgcPrepData& TgcPrepData::operator=(const TgcPrepData& RIO) { @@ -68,18 +61,6 @@ TgcPrepData& TgcPrepData::operator=(const TgcPrepData& RIO) return *this; } -//move operator -TgcPrepData& TgcPrepData::operator=(TgcPrepData&& RIO) -{ - if (&RIO !=this) - { - MuonCluster::operator=(std::move(RIO)); - m_detEl = RIO.m_detEl ; - m_bcBitMap = RIO.m_bcBitMap; - } - return *this; -} - uint16_t TgcPrepData::getBcBitMap() const { return m_bcBitMap; diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/sTgcPrepData.cxx b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/sTgcPrepData.cxx index ce3bdc34daa9eedd83538158c7b5be5439f1f82a..23138e941b30a6d400d29a9856fd31ce7c99506e 100755 --- a/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/sTgcPrepData.cxx +++ b/MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/sTgcPrepData.cxx @@ -80,17 +80,6 @@ namespace Muon m_stripCharges(RIO.m_stripCharges) { } - //move constructor: - sTgcPrepData::sTgcPrepData(sTgcPrepData&& RIO): - MuonCluster(std::move(RIO)), - m_detEl( RIO.m_detEl ), - m_charge( RIO.m_charge ), - m_time(RIO.m_time), - m_bcBitMap( RIO.m_bcBitMap ), - m_stripNumbers(RIO.m_stripNumbers), - m_stripTimes(RIO.m_stripTimes), - m_stripCharges(RIO.m_stripCharges) - { } //assignment operator sTgcPrepData& @@ -108,22 +97,6 @@ namespace Muon } - //move operator - sTgcPrepData& - sTgcPrepData::operator=(sTgcPrepData&& RIO) - { - if (&RIO !=this) - { - MuonCluster::operator=(std::move(RIO)); - m_detEl = RIO.m_detEl ; - m_charge = RIO.m_charge; - m_time = RIO.m_time; - m_bcBitMap = RIO.m_bcBitMap; - } - return *this; - - } - MsgStream& sTgcPrepData::dump( MsgStream& stream) const { diff --git a/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawData.h b/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawData.h index cc3fcde5513b96b5c3be948db5c71c00f2640d08..d2a9e09a6489c9f88a0b594c0ac8945958ea0acd 100755 --- a/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawData.h +++ b/Tracking/TrkEvent/TrkPrepRawData/TrkPrepRawData/PrepRawData.h @@ -64,9 +64,9 @@ public: /** public because of DataPool*/ PrepRawData(); PrepRawData(const PrepRawData&); - PrepRawData(PrepRawData&&); + PrepRawData(PrepRawData&&) noexcept; PrepRawData& operator=(const PrepRawData&); - PrepRawData& operator=(PrepRawData&&); + PrepRawData& operator=(PrepRawData&&) noexcept; /** Full Constructor (with references) @param clusId Identifier of the tube, strip etc which has produced this diff --git a/Tracking/TrkEvent/TrkPrepRawData/src/PrepRawData.cxx b/Tracking/TrkEvent/TrkPrepRawData/src/PrepRawData.cxx old mode 100755 new mode 100644 index 0d4e8b2b1c0b8861a042e92d40a6b51330adccc5..51d49832b7d56d983b7872f550f69877338b8037 --- a/Tracking/TrkEvent/TrkPrepRawData/src/PrepRawData.cxx +++ b/Tracking/TrkEvent/TrkPrepRawData/src/PrepRawData.cxx @@ -112,7 +112,7 @@ namespace Trk{ // move constructor: PrepRawData::PrepRawData( PrepRawData && RIO - ): + ) noexcept: m_clusId(RIO.m_clusId), m_localPos( RIO.m_localPos ), m_rdoList(std::move(RIO.m_rdoList)), @@ -138,9 +138,9 @@ namespace Trk{ return *this; } - PrepRawData& PrepRawData::operator=(PrepRawData&& RIO){ + PrepRawData& PrepRawData::operator=(PrepRawData&& RIO) noexcept{ if (&RIO !=this) { - m_clusId = std::move(RIO.m_clusId); + m_clusId = RIO.m_clusId; m_rdoList = std::move(RIO.m_rdoList); m_localPos = std::move(RIO.m_localPos); delete m_localCovariance;