Skip to content
Snippets Groups Projects
Commit f5617318 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

AtlasGeometryCommon: cmake cleanup

- remove `atlas_depends_on_subdirs`
- update link dependencies
- replace `atlas_install_headers` with interface library or remove it
  entirely if headers not used outside package
- enable flake8 where applicable
parent c1b84f44
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!35370AtlasGeometryCommon: cmake cleanup
################################################################################
# Package: BeamPipeGeoModel
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( BeamPipeGeoModel )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Database/RDBAccessSvc
DetectorDescription/GeoModel/GeoModelUtilities
PRIVATE
Control/SGTools
Control/StoreGate
Control/AthenaKernel
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( BeamPipeGeoModelLib
src/*.cxx
PUBLIC_HEADERS BeamPipeGeoModel
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelUtilities StoreGateLib
PRIVATE_LINK_LIBRARIES SGTools AthenaKernel GaudiKernel RDBAccessSvcLib )
LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities
PRIVATE_LINK_LIBRARIES GaudiKernel GeoModelInterfaces RDBAccessSvcLib SGTools StoreGateLib )
atlas_add_component( BeamPipeGeoModel
src/components/*.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelUtilities SGTools StoreGateLib GaudiKernel BeamPipeGeoModelLib )
LINK_LIBRARIES BeamPipeGeoModelLib )
# Test(s) in the package:
atlas_add_test( BeamPipeGMConfig_test
SCRIPT test/BeamPipeGMConfig_test.py
PROPERTIES TIMEOUT 300 )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_scripts( test/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_scripts( test/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
#!/usr/bin/env python
"""Run tests on BeamPipeGeoModel configuration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
"""
if __name__ == "__main__":
from AthenaCommon.Configurable import Configurable
......@@ -16,7 +16,6 @@ if __name__ == "__main__":
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.lock()
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
acc = BeamPipeGeometryCfg(ConfigFlags)
f=open('BeamPipeGeometryCfg.pkl','wb')
......
################################################################################
# Package: CavernInfraGeoModel
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( CavernInfraGeoModel )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaKernel
Database/RDBAccessSvc
DetectorDescription/GeoModel/GeoModelUtilities
PRIVATE
Control/StoreGate
DetectorDescription/GeoModel/GeoModelInterfaces
GaudiKernel )
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
find_package( Eigen )
find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
find_package( GeoModelCore )
# Component(s) in the package:
atlas_add_library( CavernInfraGeoModelLib
CavernInfraGeoModel/*.h
INTERFACE
PUBLIC_HEADERS CavernInfraGeoModel
INCLUDE_DIRS ${GEOMODELCORE_INCLUDE_DIRS}
LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel )
atlas_add_component( CavernInfraGeoModel
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelUtilities StoreGateLib SGtests GaudiKernel RDBAccessSvcLib )
# Install files from the package:
atlas_install_headers( CavernInfraGeoModel )
LINK_LIBRARIES CavernInfraGeoModelLib GaudiKernel GeoModelInterfaces GeoModelUtilities RDBAccessSvcLib StoreGateLib )
################################################################################
# Package: GeoModelEnvelopes
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( GeoModelEnvelopes )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaKernel
DetectorDescription/GeoModel/GeoModelUtilities
PRIVATE
Control/SGTools
Control/StoreGate
DetectorDescription/GeoModel/GeoModelInterfaces
GaudiKernel )
# External dependencies:
find_package( GeoModelCore )
# Component(s) in the package:
atlas_add_component( GeoModelEnvelopes
src/*.cxx
src/components/*.cxx
LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} GeoModelUtilities SGTools StoreGateLib GaudiKernel )
# Install files from the package:
atlas_install_headers( GeoModelEnvelopes )
LINK_LIBRARIES ${GEOMODELCORE_LIBRARIES} AthenaKernel GaudiKernel GeoModelInterfaces GeoModelUtilities SGTools StoreGateLib )
################################################################################
# Package: Interpreters
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( Interpreters )
# Install files from the package:
atlas_install_scripts( share/physh share/totalphysh share/athenash.py )
################################################################################
# Package: SubDetectorEnvelopes
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( SubDetectorEnvelopes )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
DetectorDescription/AtlasDetDescr
GaudiKernel
PRIVATE
Control/AthenaBaseComps
Database/RDBAccessSvc
DetectorDescription/GeoModel/GeoModelInterfaces )
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
find_package( CLHEP )
find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
# Component(s) in the package:
atlas_add_library( SubDetectorEnvelopesLib
INTERFACE
PUBLIC_HEADERS SubDetectorEnvelopes
LINK_LIBRARIES GaudiKernel AtlasDetDescr )
# Component(s) in the package:
atlas_add_component( SubDetectorEnvelopes
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${CLHEP_LIBRARIES} AtlasDetDescr GaudiKernel AthenaBaseComps RDBAccessSvcLib GeoModelInterfaces )
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaBaseComps GeoModelInterfaces RDBAccessSvcLib SubDetectorEnvelopesLib )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
"""
SubDetectorEnvelopes configurations for AtlasGeometryCommon
Elmar Ritsch, 27/09/2013
"""
from AthenaCommon.CfgGetter import getPrivateTool,getPrivateToolClone,getPublicTool,getPublicToolClone,\
getService,getServiceClone,getAlgorithm,getAlgorithmClone
from AthenaCommon.Constants import * # FATAL,ERROR etc.
from AthenaCommon.SystemOfUnits import *
from AthenaCommon.DetFlags import DetFlags
def getEnvelopeDefSvc(name="AtlasGeometry_EnvelopeDefSvc", **kwargs):
kwargs.setdefault("DBInDetNode" , 'InDetEnvelope' )
kwargs.setdefault("DBBeamPipeNode" , 'BeamPipeEnvelope' )
......@@ -273,7 +266,6 @@ def EnvelopeDefSvc(flags, **kwargs):
Cavern.addRZ( 0.0 , 26046.0 ) #
# the outer dimesions differ between collision and cosmics jobs
from AthenaCommon.BeamFlags import jobproperties
if flags.Beam.Type != 'cosmics':
# -> for collision jobs the 'cavern' envelope is much smaller
Cavern.addRZ( 0.0 , 500000.0 ) # z= +500m
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
"""
Configuration database for SubDetectorEnvelopes
Elmar Ritsch, 27/09/2013
"""
from AthenaCommon.CfgGetter import addTool, addToolClone, addService, addAlgorithm, \
addTypesToExcludeIfDefaultValue, addNamesToExcludeIfDefaultValue, addFullNamesToExcludeIfDefaultValue, \
addPropertiesToExcludeIfDefault, \
addTypesToSkipIfNotAvailable, addNamesToSkipIfNotAvailable, addFullNamesToSkipIfNotAvailable, \
addTypesOnlyToSkip
from AthenaCommon.Constants import * # FATAL,ERROR etc.
import AthenaCommon.SystemOfUnits as Units
from AthenaCommon.CfgGetter import addService
# Common tools, services and algorithms used by jobs:
addService("SubDetectorEnvelopes.SubDetectorEnvelopesConfig.getEnvelopeDefSvc", "AtlasGeometry_EnvelopeDefSvc")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment