From d21fb025086348db724faa70517735f28a103815 Mon Sep 17 00:00:00 2001 From: Frank Winklmeier <fwinkl@cern> Date: Mon, 2 Nov 2020 14:26:47 +0100 Subject: [PATCH] EventShapes: cmake cleanup, enable flake8 --- .../EventShapeAthenaPool/CMakeLists.txt | 12 +------- .../EventShapeEvent/CMakeLists.txt | 20 ++----------- .../EventShapeInterface/CMakeLists.txt | 12 +------- .../EventShapeTPCnv/CMakeLists.txt | 23 +++----------- .../EventShapeTools/CMakeLists.txt | 30 ++++--------------- .../python/EventDensityConfig.py | 4 +-- 6 files changed, 17 insertions(+), 84 deletions(-) diff --git a/Reconstruction/EventShapes/EventShapeAthenaPool/CMakeLists.txt b/Reconstruction/EventShapes/EventShapeAthenaPool/CMakeLists.txt index 7b4b9ab462c4..b94764adda21 100644 --- a/Reconstruction/EventShapes/EventShapeAthenaPool/CMakeLists.txt +++ b/Reconstruction/EventShapes/EventShapeAthenaPool/CMakeLists.txt @@ -1,18 +1,8 @@ -################################################################################ -# Package: EventShapeAthenaPool -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( EventShapeAthenaPool ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Database/AthenaPOOL/AthenaPoolUtilities - PRIVATE - Database/AthenaPOOL/AthenaPoolCnvSvc - Reconstruction/EventShapes/EventShapeEvent - Reconstruction/EventShapes/EventShapeTPCnv ) - # Component(s) in the package: atlas_add_poolcnv_library( EventShapeAthenaPoolPoolCnv src/*.cxx diff --git a/Reconstruction/EventShapes/EventShapeEvent/CMakeLists.txt b/Reconstruction/EventShapes/EventShapeEvent/CMakeLists.txt index b209d3b47a3c..3e95d7a4ac04 100644 --- a/Reconstruction/EventShapes/EventShapeEvent/CMakeLists.txt +++ b/Reconstruction/EventShapes/EventShapeEvent/CMakeLists.txt @@ -1,33 +1,19 @@ -################################################################################ -# Package: EventShapeEvent -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( EventShapeEvent ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - Control/AthContainers - Event/EventKernel - Event/NavFourMom ) - # External dependencies: find_package( FastJet ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) # Component(s) in the package: atlas_add_library( EventShapeEvent src/*.cxx PUBLIC_HEADERS EventShapeEvent INCLUDE_DIRS ${FASTJET_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${FASTJET_LIBRARIES} AthContainers EventKernel NavFourMom - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ) + LINK_LIBRARIES ${FASTJET_LIBRARIES} AthContainers AthenaKernel EventKernel NavFourMom ) atlas_add_dictionary( EventShapesDict EventShapeEvent/EventShapeEventDict.h EventShapeEvent/selection.xml - INCLUDE_DIRS ${FASTJET_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${FASTJET_LIBRARIES} ${ROOT_LIBRARIES} AthContainers EventKernel NavFourMom EventShapeEvent ) - + LINK_LIBRARIES EventShapeEvent ) diff --git a/Reconstruction/EventShapes/EventShapeInterface/CMakeLists.txt b/Reconstruction/EventShapes/EventShapeInterface/CMakeLists.txt index 962097a9ff24..71acec5e7b80 100644 --- a/Reconstruction/EventShapes/EventShapeInterface/CMakeLists.txt +++ b/Reconstruction/EventShapes/EventShapeInterface/CMakeLists.txt @@ -1,18 +1,8 @@ -# $Id: CMakeLists.txt 777094 2016-10-07 12:33:15Z krasznaa $ -################################################################################ -# Package: EventShapeInterface -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( EventShapeInterface ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( - PUBLIC - Control/AthToolSupport/AsgTools - Event/xAOD/xAODBase - Event/xAOD/xAODEventShape ) - # Component(s) in the package: atlas_add_library( EventShapeInterface EventShapeInterface/*.h diff --git a/Reconstruction/EventShapes/EventShapeTPCnv/CMakeLists.txt b/Reconstruction/EventShapes/EventShapeTPCnv/CMakeLists.txt index 26565a83dcdd..ced949a4a6b7 100644 --- a/Reconstruction/EventShapes/EventShapeTPCnv/CMakeLists.txt +++ b/Reconstruction/EventShapes/EventShapeTPCnv/CMakeLists.txt @@ -1,31 +1,16 @@ -################################################################################ -# Package: EventShapeTPCnv -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( EventShapeTPCnv ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Database/AthenaPOOL/AthenaPoolCnvSvc - Reconstruction/EventShapes/EventShapeEvent - PRIVATE - Control/DataModelAthenaPool ) - -# External dependencies: -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) - # Component(s) in the package: atlas_add_library( EventShapeTPCnv src/*.cxx PUBLIC_HEADERS EventShapeTPCnv - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES EventShapeEvent AthenaPoolCnvSvcLib DataModelAthenaPoolLib - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ) + LINK_LIBRARIES EventShapeEvent AthenaPoolCnvSvcLib + PRIVATE_LINK_LIBRARIES DataModelAthenaPoolLib ) atlas_add_dictionary( EventShapeTPCnvDict EventShapeTPCnv/EventShapeTPCnvDict.h EventShapeTPCnv/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib EventShapeEvent DataModelAthenaPoolLib EventShapeTPCnv ) - + LINK_LIBRARIES EventShapeTPCnv ) diff --git a/Reconstruction/EventShapes/EventShapeTools/CMakeLists.txt b/Reconstruction/EventShapes/EventShapeTools/CMakeLists.txt index 58f04dff084d..c49f4e6be5b4 100644 --- a/Reconstruction/EventShapes/EventShapeTools/CMakeLists.txt +++ b/Reconstruction/EventShapes/EventShapeTools/CMakeLists.txt @@ -1,25 +1,10 @@ -################################################################################ -# Package: EventShapeTools -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( EventShapeTools ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthToolSupport/AsgTools - GaudiKernel - Reconstruction/EventShapes/EventShapeInterface - Reconstruction/Jet/JetEDM - Reconstruction/Jet/JetRec - Reconstruction/Jet/JetInterface - PRIVATE - Control/AthenaBaseComps - Event/xAOD/xAODEventShape ) - # External dependencies: find_package( FastJet ) -find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread ) # Component(s) in the package: atlas_add_library( EventShapeToolsLib @@ -27,21 +12,18 @@ atlas_add_library( EventShapeToolsLib src/*.cxx PUBLIC_HEADERS EventShapeTools INCLUDE_DIRS ${FASTJET_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} - LINK_LIBRARIES ${FASTJET_LIBRARIES} AsgTools GaudiKernel EventShapeInterface JetRecLib JetInterface - PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODEventShape JetEDM ) + LINK_LIBRARIES ${FASTJET_LIBRARIES} AsgTools EventShapeInterface JetRecLib JetInterface xAODEventShape + PRIVATE_LINK_LIBRARIES AthenaBaseComps JetEDM ) atlas_add_component( EventShapeTools src/components/*.cxx - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${FASTJET_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${FASTJET_LIBRARIES} AsgTools GaudiKernel EventShapeInterface JetInterface AthenaBaseComps xAODEventShape EventShapeToolsLib ) + LINK_LIBRARIES EventShapeToolsLib ) atlas_add_dictionary( EventShapeToolsDict EventShapeTools/EventShapeToolsDict.h EventShapeTools/selection.xml - INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${FASTJET_INCLUDE_DIRS} - LINK_LIBRARIES ${ROOT_LIBRARIES} ${FASTJET_LIBRARIES} AsgTools GaudiKernel EventShapeInterface JetInterface AthenaBaseComps xAODEventShape EventShapeToolsLib ) + LINK_LIBRARIES EventShapeToolsLib ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Reconstruction/EventShapes/EventShapeTools/python/EventDensityConfig.py b/Reconstruction/EventShapes/EventShapeTools/python/EventDensityConfig.py index a0a10af87f28..fee0c901f343 100644 --- a/Reconstruction/EventShapes/EventShapeTools/python/EventDensityConfig.py +++ b/Reconstruction/EventShapes/EventShapeTools/python/EventDensityConfig.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 from EventShapeTools.EventShapeToolsConf import EventDensityTool, EventShapeCopier, EventDensityAthAlg import logging @@ -43,7 +43,7 @@ def configEventShapeCopierAlg( input ): ## EventDensity Alg for Athena def EventDensityAlg(name, EventDensityTool=None, **args): - edLogger.warning("When instantiating "+name+" : call of EventDensityAlg is deprecated") + edLogger.warning("When instantiating %s : call of EventDensityAlg is deprecated", name) edLogger.warning(" please use EventDensityAthAlg (from EventShapeTools.EventShapeToolsConf import EventDensityAthAlg) ") alg = EventDensityAthAlg(name,EventDensityTool=EventDensityTool, **args) return alg -- GitLab