From 5d6cf346dc1e1b483c12f6c874071533dcc10008 Mon Sep 17 00:00:00 2001 From: mmusich Date: Sun, 25 Aug 2024 12:00:54 +0200 Subject: [PATCH] better automatic handling of default 2026 geometry --- .../python/GeometryDD4hepExtended2026DefaultReco_cff.py | 4 +++- .../Geometry/python/GeometryDD4hepExtended2026Default_cff.py | 4 +++- .../Geometry/python/GeometryExtended2026DefaultReco_cff.py | 4 +++- .../Geometry/python/GeometryExtended2026Default_cff.py | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Configuration/Geometry/python/GeometryDD4hepExtended2026DefaultReco_cff.py b/Configuration/Geometry/python/GeometryDD4hepExtended2026DefaultReco_cff.py index b72dc7405148f..c7bfaec544dd1 100644 --- a/Configuration/Geometry/python/GeometryDD4hepExtended2026DefaultReco_cff.py +++ b/Configuration/Geometry/python/GeometryDD4hepExtended2026DefaultReco_cff.py @@ -1,3 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Geometry.defaultPhase2ConditionsEra_cff import DEFAULT_VERSION -from Configuration.Geometry.GeometryDD4hepExtended2026D110Reco_cff import * +reco_dd4hep_geometry_import_stmt = f"from Configuration.Geometry.GeometryDD4hepExtended{DEFAULT_VERSION}Reco_cff import *" +exec(reco_dd4hep_geometry_import_stmt) diff --git a/Configuration/Geometry/python/GeometryDD4hepExtended2026Default_cff.py b/Configuration/Geometry/python/GeometryDD4hepExtended2026Default_cff.py index 6600d3ddd2b6e..6edff18cef641 100644 --- a/Configuration/Geometry/python/GeometryDD4hepExtended2026Default_cff.py +++ b/Configuration/Geometry/python/GeometryDD4hepExtended2026Default_cff.py @@ -1,3 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Geometry.defaultPhase2ConditionsEra_cff import DEFAULT_VERSION -from Configuration.Geometry.GeometryDD4hepExtended2026D110_cff import * +dd4hep_geometry_import_stmt = f"from Configuration.Geometry.GeometryDD4hepExtended{DEFAULT_VERSION}_cff import *" +exec(dd4hep_geometry_import_stmt) diff --git a/Configuration/Geometry/python/GeometryExtended2026DefaultReco_cff.py b/Configuration/Geometry/python/GeometryExtended2026DefaultReco_cff.py index 176c3f8d63020..b757a900c5960 100644 --- a/Configuration/Geometry/python/GeometryExtended2026DefaultReco_cff.py +++ b/Configuration/Geometry/python/GeometryExtended2026DefaultReco_cff.py @@ -1,3 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Geometry.defaultPhase2ConditionsEra_cff import DEFAULT_VERSION -from Configuration.Geometry.GeometryExtended2026D110Reco_cff import * +reco_geometry_import_stmt = f"from Configuration.Geometry.GeometryExtended{DEFAULT_VERSION}Reco_cff import *" +exec(reco_geometry_import_stmt) diff --git a/Configuration/Geometry/python/GeometryExtended2026Default_cff.py b/Configuration/Geometry/python/GeometryExtended2026Default_cff.py index 8f26a0828bfc6..cfb9f0a23fd6a 100644 --- a/Configuration/Geometry/python/GeometryExtended2026Default_cff.py +++ b/Configuration/Geometry/python/GeometryExtended2026Default_cff.py @@ -1,3 +1,5 @@ import FWCore.ParameterSet.Config as cms +from Configuration.Geometry.defaultPhase2ConditionsEra_cff import DEFAULT_VERSION -from Configuration.Geometry.GeometryExtended2026D110_cff import * +geometry_import_stmt = f"from Configuration.Geometry.GeometryExtended{DEFAULT_VERSION}_cff import *" +exec(geometry_import_stmt)