From 995f3423710dd972e98dd1b0b67c0186761b1970 Mon Sep 17 00:00:00 2001 From: Vakho Tsulaia <vakhtang.tsulaia@cern.ch> Date: Tue, 7 Jul 2020 05:26:45 +0200 Subject: [PATCH] Code cleanup 1. Cleaned CMakeLists.txt in several LArGeoModel packages by dropping atlas_depends_on_subdirs(), and dropping redundant dependencies on BOOST and CORAL 2. Dropped redundant GeoModelUtilities/LArCustomShape.h --- .../GeoModelUtilities/LArCustomShape.h | 74 ------------------- .../LArGeoModel/LArGeoAlgsNV/CMakeLists.txt | 27 +------ .../LArGeoAlgsNV/src/LArDetectorFactory.cxx | 2 - .../LArGeoModel/LArGeoBarrel/CMakeLists.txt | 16 +--- .../LArGeoModel/LArGeoCode/CMakeLists.txt | 13 +--- .../LArGeoModel/LArGeoEndcap/CMakeLists.txt | 22 +----- .../LArGeoModel/LArGeoFcal/CMakeLists.txt | 16 +--- .../LArGeoModel/LArGeoHec/CMakeLists.txt | 15 +--- .../LArReadoutGeometry/CMakeLists.txt | 18 +---- 9 files changed, 13 insertions(+), 190 deletions(-) delete mode 100755 DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/LArCustomShape.h diff --git a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/LArCustomShape.h b/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/LArCustomShape.h deleted file mode 100755 index e062f908943..00000000000 --- a/DetectorDescription/GeoModel/GeoModelUtilities/GeoModelUtilities/LArCustomShape.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef LArCustomShape_h -#define LArCustomShape_h - -#include <string> - -#include "GeoModelKernel/GeoShape.h" - -// Forward declaration -class GeoShapeAction; - -class LArCustomShape : public GeoShape -{ - public: - - // The custom shape has only one property: a string that contains - // the name of the particular shape. In the GeoModel->Geant4 - // conversion, this name will be matched against a list of custom - // classes that inherit from G4VSolid to get the correct custom - // solid. - LArCustomShape(const std::string& shapeName); - - // Returns the volume of the shape, for mass inventory - virtual double volume() const; - - // Returns the shape type, as a string. - virtual const std::string& type() const; - - // Returns the shape type, as a coded integer. - virtual ShapeType typeID() const; - - // For type identification. - static const std::string& getClassType(); - - // For type identification. - static const ShapeType getClassTypeID(); - - // Return the shape name, supplied in the constructor. - virtual const std::string& name() const; - - // Executes a GeoShapeAction - virtual void exec(GeoShapeAction* action) const; - - protected: - virtual ~LArCustomShape(); - - private: - - // Prohibited operations. - LArCustomShape(const LArCustomShape &right); - const LArCustomShape & operator=(const LArCustomShape &right); - - // General GeoModel shape attributes. - static const std::string classType; - static const ShapeType classTypeID; - - // Properties of the custom shape. - const std::string m_shapeName; -}; - -inline const std::string& LArCustomShape::getClassType() -{ - return classType; -} - -inline const ShapeType LArCustomShape::getClassTypeID() -{ - return classTypeID; -} - -#endif diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt index 4d5bc4fbe50..b377202b33f 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/CMakeLists.txt @@ -5,30 +5,7 @@ # Declare the package name: atlas_subdir( LArGeoAlgsNV ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - DetectorDescription/GeoModel/GeoModelUtilities - LArCalorimeter/LArGeoModel/LArReadoutGeometry - PRIVATE - Control/AthenaKernel - Control/SGTools - Control/StoreGate - Database/RDBAccessSvc - DetectorDescription/DetDescrCond/DetDescrConditions - DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoPrimitives - GaudiKernel - LArCalorimeter/LArGeoModel/LArGeoBarrel - LArCalorimeter/LArGeoModel/LArGeoCode - LArCalorimeter/LArGeoModel/LArGeoEndcap - LArCalorimeter/LArGeoModel/LArGeoRAL - LArCalorimeter/LArGeoModel/LArGeoTBBarrel - LArCalorimeter/LArGeoModel/LArHV ) - # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) -find_package( CLHEP ) -find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) find_package( GeoModelCore ) @@ -36,8 +13,8 @@ find_package( GeoModelCore ) atlas_add_component( LArGeoAlgsNV src/*.cxx src/components/*.cxx - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} ${GEOMODELCORE_LIBRARIES} ${EIGEN_LIBRARIES} GeoModelUtilities LArReadoutGeometry SGTools StoreGateLib SGtests DetDescrConditions GaudiKernel LArGeoBarrel LArGeoCode LArGeoEndcap LArGeoRAL LArGeoTBBarrel LArHV RDBAccessSvcLib ) + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} + LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} ${EIGEN_LIBRARIES} GeoModelUtilities LArReadoutGeometry SGTools StoreGateLib SGtests DetDescrConditions GaudiKernel LArGeoBarrel LArGeoCode LArGeoEndcap LArGeoRAL LArGeoTBBarrel LArHV RDBAccessSvcLib ) # Install files from the package: atlas_install_python_modules( python/*.py ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx index 146b27b9fe8..c71f6e368c5 100755 --- a/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx +++ b/LArCalorimeter/LArGeoModel/LArGeoAlgsNV/src/LArDetectorFactory.cxx @@ -19,8 +19,6 @@ #include "GeoModelKernel/GeoDefinitions.h" #include "GaudiKernel/SystemOfUnits.h" -#include "CLHEP/Geometry/Transform3D.h" - #include "LArGeoCode/LArMaterialManager.h" #include "GeoModelInterfaces/StoredMaterialManager.h" #include "GeoModelUtilities/GeoDBUtils.h" diff --git a/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt index 9eebf3f4d9f..605a2256750 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoBarrel/CMakeLists.txt @@ -5,20 +5,7 @@ # Declare the package name: atlas_subdir( LArGeoBarrel ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - LArCalorimeter/LArGeoModel/LArGeoCode - PRIVATE - Control/StoreGate - Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelUtilities - GaudiKernel - LArCalorimeter/LArGeoModel/LArReadoutGeometry ) - # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) -find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) find_package( GeoModelCore ) @@ -27,7 +14,6 @@ atlas_add_library( LArGeoBarrel src/*.cxx PUBLIC_HEADERS LArGeoBarrel INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} LArGeoCode StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} GeoModelUtilities GaudiKernel LArReadoutGeometry RDBAccessSvcLib ) + PRIVATE_LINK_LIBRARIES GeoModelUtilities GaudiKernel LArReadoutGeometry RDBAccessSvcLib ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt index 5bf5a124e0c..9c90099e749 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoCode/CMakeLists.txt @@ -5,23 +5,14 @@ # Declare the package name: atlas_subdir( LArGeoCode ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Control/StoreGate - Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelInterfaces - GaudiKernel ) - # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) -find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( GeoModelCore ) # Component(s) in the package: atlas_add_library( LArGeoCode src/*.cxx PUBLIC_HEADERS LArGeoCode - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS} LINK_LIBRARIES StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GaudiKernel GeoModelInterfaces RDBAccessSvcLib ) + PRIVATE_LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GaudiKernel GeoModelInterfaces RDBAccessSvcLib ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt index da3a35cf179..bd34b62ceef 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoEndcap/CMakeLists.txt @@ -5,25 +5,7 @@ # Declare the package name: atlas_subdir( LArGeoEndcap ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/StoreGate - Database/RDBAccessSvc - LArCalorimeter/LArGeoModel/LArGeoFcal - LArCalorimeter/LArGeoModel/LArGeoHec - PRIVATE - Calorimeter/CaloDetDescr - Calorimeter/CaloIdentifier - DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelUtilities - DetectorDescription/GeoModel/GeoSpecialShapes - GaudiKernel - LArCalorimeter/LArGeoModel/LArGeoCode - LArCalorimeter/LArGeoModel/LArGeoMiniFcal ) - # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) -find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) find_package( GeoModelCore ) @@ -31,7 +13,7 @@ find_package( GeoModelCore ) atlas_add_library( LArGeoEndcap src/*.cxx PUBLIC_HEADERS LArGeoEndcap - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} LArGeoFcal LArGeoHec StoreGateLib SGtests CaloDetDescrLib + INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} + LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} LArGeoFcal LArGeoHec StoreGateLib SGtests CaloDetDescrLib PRIVATE_LINK_LIBRARIES CaloIdentifier GeoModelUtilities GeoSpecialShapes GaudiKernel LArGeoCode LArGeoMiniFcal RDBAccessSvcLib ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt index 3b5bc155b63..c201654de36 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoFcal/CMakeLists.txt @@ -5,19 +5,7 @@ # Declare the package name: atlas_subdir( LArGeoFcal ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Database/RDBAccessSvc - PRIVATE - Control/StoreGate - DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelUtilities - GaudiKernel - LArCalorimeter/LArGeoModel/LArReadoutGeometry ) - # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) -find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) find_package( GeoModelCore ) @@ -27,8 +15,8 @@ find_package( GeoModelCore ) atlas_add_library( LArGeoFcal src/*.cxx PUBLIC_HEADERS LArGeoFcal - INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} + INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS} PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} StoreGateLib SGtests + LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} StoreGateLib SGtests PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} GeoModelUtilities GaudiKernel LArReadoutGeometry RDBAccessSvcLib ) diff --git a/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt index 9dd517c3127..998da7a407b 100644 --- a/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArGeoHec/CMakeLists.txt @@ -5,18 +5,7 @@ # Declare the package name: atlas_subdir( LArGeoHec ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Control/AthenaKernel - Control/StoreGate - Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelUtilities - GaudiKernel ) - # External dependencies: -find_package( Boost COMPONENTS filesystem thread system ) -find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) find_package( GeoModelCore ) @@ -24,7 +13,7 @@ find_package( GeoModelCore ) atlas_add_library( LArGeoHec src/*.cxx PUBLIC_HEADERS LArGeoHec - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} ${GEOMODELCORE_INCLUDE_DIRS} LINK_LIBRARIES StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel RDBAccessSvcLib ) + PRIVATE_LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel RDBAccessSvcLib ) diff --git a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt index 1e89f66fb92..65e1a56fc48 100644 --- a/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt +++ b/LArCalorimeter/LArGeoModel/LArReadoutGeometry/CMakeLists.txt @@ -5,23 +5,9 @@ # Declare the package name: atlas_subdir( LArReadoutGeometry ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Control/AthenaKernel - DetectorDescription/GeoPrimitives - DetectorDescription/Identifier - LArCalorimeter/LArGeoModel/LArHV - PRIVATE - Control/StoreGate - Database/RDBAccessSvc - DetectorDescription/GeoModel/GeoModelInterfaces - DetectorDescription/GeoModel/GeoModelUtilities - GaudiKernel ) - # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) find_package( CLHEP ) -find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess ) find_package( Eigen ) find_package( GeoModelCore ) @@ -30,8 +16,8 @@ atlas_add_library( LArReadoutGeometry src/*.cxx PUBLIC_HEADERS LArReadoutGeometry INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS} - PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} + PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS} LINK_LIBRARIES ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoPrimitives Identifier LArHV StoreGateLib SGtests - PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelUtilities GaudiKernel RDBAccessSvcLib GeoModelInterfaces ) + PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} GeoModelUtilities GaudiKernel RDBAccessSvcLib GeoModelInterfaces ) -- GitLab