From f2ac78fc41280bd69692d3a22dde42a449716951 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Sun, 18 Oct 2020 18:39:36 +0200
Subject: [PATCH] TrkTrackSummaryTool: cmake cleanup, enable flake8

---
 .../TrkTrackSummaryTool/CMakeLists.txt        | 33 ++-----------------
 .../python/AtlasTrackSummaryTool.py           | 11 ++-----
 2 files changed, 5 insertions(+), 39 deletions(-)

diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/CMakeLists.txt b/Tracking/TrkTools/TrkTrackSummaryTool/CMakeLists.txt
index 2ab5a9a0922..f7c99f2a718 100644
--- a/Tracking/TrkTools/TrkTrackSummaryTool/CMakeLists.txt
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/CMakeLists.txt
@@ -1,40 +1,13 @@
-################################################################################
-# Package: TrkTrackSummaryTool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrkTrackSummaryTool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthContainers
-                          GaudiKernel
-                          Tracking/TrkEvent/TrkParameters
-                          Tracking/TrkEvent/TrkTrackSummary
-                          Tracking/TrkTools/TrkToolInterfaces
-                          InnerDetector/InDetRecTools/TRT_ElectronPidTools
-			  Control/CxxUtils
-                          PRIVATE
-                          DetectorDescription/AtlasDetDescr
-                          DetectorDescription/Identifier
-                          Tracking/TrkDetDescr/TrkDetElementBase
-                          Tracking/TrkDetDescr/TrkGeometry
-                          Tracking/TrkEvent/TrkCompetingRIOsOnTrack
-                          Tracking/TrkEvent/TrkEventPrimitives
-                          Tracking/TrkEvent/TrkMeasurementBase
-                          Tracking/TrkEvent/TrkRIO_OnTrack
-                          Tracking/TrkEvent/TrkTrack )
-
 # Component(s) in the package:
 atlas_add_component( TrkTrackSummaryTool
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps AthContainers GaudiKernel TrkParameters TrkTrackSummary TrkToolInterfaces AtlasDetDescr 
-		     Identifier TrkDetElementBase TrkGeometry TrkCompetingRIOsOnTrack TrkEventPrimitives TrkMeasurementBase TrkRIO_OnTrack TrkTrack CxxUtils
-                     TRT_ElectronPidToolsLib )
+                     LINK_LIBRARIES AthenaBaseComps GaudiKernel TrkParameters TrkTrackSummary TrkToolInterfaces AtlasDetDescr Identifier TrkDetElementBase TrkGeometry TrkCompetingRIOsOnTrack TrkEventPrimitives TrkMeasurementBase TrkRIO_OnTrack TrkTrack TRT_ElectronPidToolsLib )
 
 # Install files from the package:
-atlas_install_headers( TrkTrackSummaryTool )
-atlas_install_python_modules( python/*.py )
-
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Tracking/TrkTools/TrkTrackSummaryTool/python/AtlasTrackSummaryTool.py b/Tracking/TrkTools/TrkTrackSummaryTool/python/AtlasTrackSummaryTool.py
index a85426e275d..6c9f2b092f6 100755
--- a/Tracking/TrkTools/TrkTrackSummaryTool/python/AtlasTrackSummaryTool.py
+++ b/Tracking/TrkTools/TrkTrackSummaryTool/python/AtlasTrackSummaryTool.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 ######################################################
 # AtlasTrackSummaryTool module
@@ -7,12 +7,6 @@
 #
 ######################################################
 
-# import the include statement
-from AthenaCommon.Include import Include, IncludeError, include
-
-# import the ToolSvc
-from AthenaCommon.AppMgr import ToolSvc
-
 # import detflags
 from AthenaCommon.DetFlags import DetFlags
 
@@ -92,8 +86,7 @@ class AtlasTrackSummaryTool( Trk__TrackSummaryTool ):
         # Configurable version of TrkTrackSummaryTool
         #
         from TrkTrackSummaryTool.TrkTrackSummaryToolConf import Trk__TrackSummaryTool
-        AtlasTrackSummaryTool = Trk__TrackSummaryTool(
-                                                     )
+
         # call the base class constructor
         Trk__TrackSummaryTool.__init__(self, name = name,
                                              InDetSummaryHelperTool = AtlasTrackSummaryHelperTool,
-- 
GitLab