Skip to content
Snippets Groups Projects
Commit 153342db authored by John Chapman's avatar John Chapman
Browse files

Add ComponentAccumulator configuration for BeamPipeDetectorTool and accompanying test

parent 38b05548
No related branches found
No related tags found
No related merge requests found
......@@ -34,3 +34,10 @@ atlas_add_component( BeamPipeGeoModel
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${CORAL_LIBRARIES} ${GEOMODEL_LIBRARIES} GeoModelUtilities SGTools StoreGateLib GaudiKernel BeamPipeGeoModelLib )
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 )
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
def BeamPipeGeometryCfg(flags):
result,gms=GeoModelCfg(flags)
from BeamPipeGeoModel.BeamPipeGeoModelConf import BeamPipeDetectorTool
gms.DetectorTools += [ BeamPipeDetectorTool() ]
result.addService(gms)
return result
#!/usr/bin/env python
"""Run tests on BeamPipeGeoModel configuration
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
"""
if __name__ == "__main__":
from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior=1
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.TestDefaults import defaultTestFiles
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.Detector.SimulatePixel = False
ConfigFlags.Detector.SimulateSCT = False
ConfigFlags.Detector.SimulateTRT = False
ConfigFlags.GeoModel.Align.Dynamic = False
ConfigFlags.lock()
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from BeamPipeGeoModel.BeamPipeGMConfig import BeamPipeGeometryCfg
acc = BeamPipeGeometryCfg(ConfigFlags)
f=open('BeamPipeGeometryCfg.pkl','w')
acc.store(f)
f.close()
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