From b4bcbdde8c84780ddf7301dbb50e1da4ba34f895 Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Mon, 8 Apr 2019 09:23:10 +0200 Subject: [PATCH] TrigInDetEvent: Fix gcc9 warnings. In C++11, implicit declarations of copy and assignment are deprecated if the class has a user defined destructor or copy or assignment. gcc9 now warns about this by default. Adjust to avoid the warning. --- .../TrigInDetEvent/TrigInDetTrack.h | 7 +++++- .../TrigInDetEvent/TrigSiSpacePointBase.h | 8 +++---- .../TrigInDetEvent/TrigSpacePointCounts.h | 7 ++---- .../TrigInDetEvent/TrigTrackCounts.h | 4 ++-- .../TrigInDetEvent/TrigTrtHitCounts.h | 4 ++-- .../TrigInDetEvent/TrigVertexCounts.h | 4 ++-- .../TrigInDetEvent/src/TrigInDetTrack.cxx | 24 ++++++++++++++++++- .../src/TrigSpacePointCounts.cxx | 17 +------------ .../TrigInDetEvent/src/TrigTrackCounts.cxx | 7 +----- .../TrigInDetEvent/src/TrigTrtHitCounts.cxx | 7 +----- .../TrigInDetEvent/src/TrigVertexCounts.cxx | 7 +----- 11 files changed, 45 insertions(+), 51 deletions(-) diff --git a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigInDetTrack.h b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigInDetTrack.h index 13f0be9efce..c90debefb1b 100755 --- a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigInDetTrack.h +++ b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigInDetTrack.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGINDETTRACK_H @@ -106,7 +106,12 @@ class TrigInDetTrack { m_NSCT_SpacePoints=0; m_HitPattern=0; } + + TrigInDetTrack (const TrigInDetTrack&) = delete; + TrigInDetTrack& operator= (const TrigInDetTrack&) = delete; + TrigInDetTrack (TrigInDetTrack&& other); + /** Destructor */ ~TrigInDetTrack() { if(m_param) delete m_param; diff --git a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigSiSpacePointBase.h b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigSiSpacePointBase.h index 8af7f1a1457..fb5da9fb2a8 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigSiSpacePointBase.h +++ b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigSiSpacePointBase.h @@ -1,9 +1,9 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ -#ifndef __TRIGSISPACEPOINTBASE_H__ -#define __TRIGSISPACEPOINTBASE_H__ +#ifndef TRIGINDETEVENT_TRIGSISPACEPOINTBASE_H +#define TRIGINDETEVENT_TRIGSISPACEPOINTBASE_H #include <cmath> #include "TrkSpacePoint/SpacePoint.h" @@ -45,7 +45,7 @@ public: } // Destructor - virtual ~TrigSiSpacePointBase() {}; + virtual ~TrigSiSpacePointBase() = default; // Methods to set data members void r( const double r ) {m_r = r; } diff --git a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigSpacePointCounts.h b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigSpacePointCounts.h index c990570e246..f858348aa99 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigSpacePointCounts.h +++ b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigSpacePointCounts.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGINDETEVENT_SPACEPOINTCOUNTER_H @@ -43,11 +43,8 @@ class TrigSpacePointCounts { unsigned int sctSpEndcapA, std::vector<Identifier>&& droppedSctModules); - /** Copy Constructor */ - TrigSpacePointCounts(const TrigSpacePointCounts& trigSpacePointCounts); - /** Destructor */ - ~TrigSpacePointCounts(void); + ~TrigSpacePointCounts(void) = default; const TrigHisto2D& pixelClusEndcapC(void) const; diff --git a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigTrackCounts.h b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigTrackCounts.h index dc6a44b5fa8..9db888234c2 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigTrackCounts.h +++ b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigTrackCounts.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGINDETEVENT_TRIGTRACKCOUNTS_H @@ -29,7 +29,7 @@ public: TrigHisto2D&& eta_phi); /** Destructor */ - ~TrigTrackCounts(); + ~TrigTrackCounts() = default; const TrigHisto2D& z0_pt(void) const; diff --git a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigTrtHitCounts.h b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigTrtHitCounts.h index 298001cf4f4..1d1dd59370f 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigTrtHitCounts.h +++ b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigTrtHitCounts.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGINDETEVENT_TRTHITCOUNTER_H @@ -32,7 +32,7 @@ class TrigTrtHitCounts { TrigHisto1D&& endcapA); /** Destructor */ - ~TrigTrtHitCounts(void); + ~TrigTrtHitCounts(void) = default; /** Return a histogram of time over threshold for endcap C pixel clusters */ const TrigHisto1D& endcapC(void) const; diff --git a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigVertexCounts.h b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigVertexCounts.h index 9a8cd71af72..5610aebbf88 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigVertexCounts.h +++ b/Trigger/TrigEvent/TrigInDetEvent/TrigInDetEvent/TrigVertexCounts.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #ifndef TRIGINDETEVENT_TRIGVERTEXCOUNTS_H @@ -27,7 +27,7 @@ public: std::vector<float>&& vtxTrkPtSqSum); /** Destructor */ - ~TrigVertexCounts(); + ~TrigVertexCounts() = default; const std::vector<unsigned int>& vtxNtrks(void) const { return m_vtxNtrks; } const std::vector<float>& vtxTrkPtSqSum(void) const { return m_vtxTrkPtSqSum; } diff --git a/Trigger/TrigEvent/TrigInDetEvent/src/TrigInDetTrack.cxx b/Trigger/TrigEvent/TrigInDetEvent/src/TrigInDetTrack.cxx index cff5d626754..a272b9802de 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/src/TrigInDetTrack.cxx +++ b/Trigger/TrigEvent/TrigInDetEvent/src/TrigInDetTrack.cxx @@ -1,9 +1,31 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "TrigInDetEvent/TrigInDetTrack.h" +TrigInDetTrack::TrigInDetTrack (TrigInDetTrack&& other) + : m_algId (other.m_algId), + m_param (other.m_param), + m_endParam (other.m_endParam), + m_chi2 (other.m_chi2), + m_NStrawHits (other.m_NStrawHits), + m_NStraw (other.m_NStraw), + m_NStrawTime (other.m_NStrawTime), + m_NTRHits (other.m_NTRHits), + m_NPixelSpacePoints (other.m_NPixelSpacePoints), + m_NSCT_SpacePoints (other.m_NSCT_SpacePoints), + m_HitPattern (other.m_HitPattern), + m_siSpacePoints (other.m_siSpacePoints), + m_trtDriftCircles (other.m_trtDriftCircles), + m_rdoList (std::move (other.m_rdoList)) +{ + other.m_param = nullptr; + other.m_endParam = nullptr; + other.m_siSpacePoints = nullptr; + other.m_trtDriftCircles = nullptr; +} + void TrigInDetTrack::fillSiHitInfo() { eraseRdoList(); diff --git a/Trigger/TrigEvent/TrigInDetEvent/src/TrigSpacePointCounts.cxx b/Trigger/TrigEvent/TrigInDetEvent/src/TrigSpacePointCounts.cxx index b48e864c7de..e1ccd1fb144 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/src/TrigSpacePointCounts.cxx +++ b/Trigger/TrigEvent/TrigInDetEvent/src/TrigSpacePointCounts.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "TrigInDetEvent/TrigSpacePointCounts.h" @@ -60,21 +60,6 @@ TrigSpacePointCounts::TrigSpacePointCounts(TrigHisto2D&& pixelClusEndcapC, //--------------------------------------------------------------- -TrigSpacePointCounts::TrigSpacePointCounts(const TrigSpacePointCounts& trigSpacePointCounts) { - m_pixelClusEndcapC = trigSpacePointCounts.m_pixelClusEndcapC; - m_pixelClusBarrel = trigSpacePointCounts.m_pixelClusBarrel; - m_pixelClusEndcapA = trigSpacePointCounts.m_pixelClusEndcapA; - m_sctSpEndcapC = trigSpacePointCounts.m_sctSpEndcapC; - m_sctSpBarrel = trigSpacePointCounts.m_sctSpBarrel; - m_sctSpEndcapA = trigSpacePointCounts.m_sctSpEndcapA; -} - -//--------------------------------------------------------------- - -TrigSpacePointCounts::~TrigSpacePointCounts(void) { -} - -//--------------------------------------------------------------- const TrigHisto2D& TrigSpacePointCounts::pixelClusEndcapC(void) const { return m_pixelClusEndcapC; diff --git a/Trigger/TrigEvent/TrigInDetEvent/src/TrigTrackCounts.cxx b/Trigger/TrigEvent/TrigInDetEvent/src/TrigTrackCounts.cxx index 192bb40b1ee..fad767678ee 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/src/TrigTrackCounts.cxx +++ b/Trigger/TrigEvent/TrigInDetEvent/src/TrigTrackCounts.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "TrigInDetEvent/TrigTrackCounts.h" @@ -30,11 +30,6 @@ TrigTrackCounts::TrigTrackCounts(TrigHisto2D&& z0_pt, //--------------------------------------------------------------- -TrigTrackCounts::~TrigTrackCounts() { -} - -//--------------------------------------------------------------- - const TrigHisto2D& TrigTrackCounts::z0_pt(void) const { return m_z0_pt; } diff --git a/Trigger/TrigEvent/TrigInDetEvent/src/TrigTrtHitCounts.cxx b/Trigger/TrigEvent/TrigInDetEvent/src/TrigTrtHitCounts.cxx index 7aacfbae972..1b354868d80 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/src/TrigTrtHitCounts.cxx +++ b/Trigger/TrigEvent/TrigInDetEvent/src/TrigTrtHitCounts.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "TrigInDetEvent/TrigTrtHitCounts.h" @@ -35,11 +35,6 @@ TrigTrtHitCounts::TrigTrtHitCounts(TrigHisto1D&& endcapC, //--------------------------------------------------------------- -TrigTrtHitCounts::~TrigTrtHitCounts() { -} - -//--------------------------------------------------------------- - const TrigHisto1D& TrigTrtHitCounts::endcapC(void) const { return m_endcapC; } diff --git a/Trigger/TrigEvent/TrigInDetEvent/src/TrigVertexCounts.cxx b/Trigger/TrigEvent/TrigInDetEvent/src/TrigVertexCounts.cxx index bb5680d3e31..e16a36d174e 100644 --- a/Trigger/TrigEvent/TrigInDetEvent/src/TrigVertexCounts.cxx +++ b/Trigger/TrigEvent/TrigInDetEvent/src/TrigVertexCounts.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "TrigInDetEvent/TrigVertexCounts.h" @@ -28,8 +28,3 @@ TrigVertexCounts::TrigVertexCounts(std::vector<unsigned int>&& vtxNtrks, } //--------------------------------------------------------------- - -TrigVertexCounts::~TrigVertexCounts() { -} - -//--------------------------------------------------------------- -- GitLab