Skip to content
Snippets Groups Projects
Verified Commit e5b36682 authored by Tadej Novak's avatar Tadej Novak
Browse files

Make Digitization flags dynamic

parent f4c63d06
No related branches found
No related tags found
No related merge requests found
Showing
with 15 additions and 24 deletions
......@@ -83,6 +83,12 @@ def _createCfgFlags():
return createSimConfigFlags()
_addFlagsCategory (acf, "Sim", __simulation, 'G4AtlasApps' )
#Digitization Flags:
def __digitization():
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
return createDigitizationCfgFlags()
_addFlagsCategory(acf, "Digitization", __digitization, 'Digitization' )
#Overlay Flags:
def __overlay():
from OverlayConfiguration.OverlayConfigFlags import createOverlayConfigFlags
......
......@@ -15,6 +15,15 @@ except ImportError:
if havesim:
ConfigFlags._loadDynaFlags("Sim")
# Don't fail just because Digitization isn't present in this build.
haveDigi = True
try:
import Digitization # noqa: F401
except ImportError:
haveDigi = False
if haveDigi:
ConfigFlags._loadDynaFlags("Digitization")
# Don't fail just because OverlayConfiguration isn't present in this build.
haveOverlay = True
try:
......
......@@ -11,8 +11,6 @@ from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
from OverlayCommonAlgs.OverlayConfigFlags import createOverlayCfgFlags
from OverlayCommonAlgs.OverlayCopyAlgsConfig import CopyMcEventCollectionCfg
# Global test config
......@@ -21,8 +19,6 @@ nThreads = 1
# Configure
Configurable.configurableRun3Behavior = True
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.join(createOverlayCfgFlags())
ConfigFlags.Input.Files = defaultTestFiles.RDO_BKG
ConfigFlags.Input.SecondaryFiles = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
......
......@@ -12,14 +12,12 @@ from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
from BCM_Digitization.BCM_DigitizationConfigNew import BCM_DigitizationCfg
# Set up logging and new style config
log.setLevel(DEBUG)
Configurable.configurableRun3Behavior = True
# Configure
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
ConfigFlags.GeoModel.Align.Dynamic = False
......
......@@ -22,13 +22,11 @@ from PixelDigitization.PixelDigitizationConfigNew import (
PixelDigitizationSplitNoMergePUToolCfg, PixelDigitizationOverlayToolCfg, PixelRangeCfg,
PixelDigitizationHSCfg, PixelDigitizationPUCfg, PixelDigitizationOverlayCfg,
)
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
# Set up logging and new style config
log.setLevel(DEBUG)
Configurable.configurableRun3Behavior = True
# Configure
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.GeoModel.Align.Dynamic = False
......
......@@ -13,13 +13,11 @@ from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
from SCT_Digitization.SCT_DigitizationConfigNew import SCT_DigitizationHSCfg
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
# Set up logging and new style config
log.setLevel(DEBUG)
Configurable.configurableRun3Behavior = True
# Configure
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.GeoModel.Align.Dynamic = False
......
......@@ -14,13 +14,11 @@ from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AtlasGeoModel.InDetGMConfig import InDetGeometryCfg
from TRT_Digitization.TRT_DigitizationConfigNew import TRT_DigitizationHSCfg
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
# Set up logging and new style config
log.setLevel(DEBUG)
Configurable.configurableRun3Behavior = True
# Configure
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.GeoModel.Align.Dynamic = False
......
......@@ -11,7 +11,6 @@ from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesThreadedCfg
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
from OverlayCommonAlgs.OverlayCopyAlgsConfig import CopyMcEventCollectionCfg
from InDetOverlay.SCTOverlayConfig import SCTOverlayCfg
......@@ -21,7 +20,6 @@ nThreads = 1
# Configure
Configurable.configurableRun3Behavior = True
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.Input.Files = defaultTestFiles.RDO_BKG
ConfigFlags.Input.SecondaryFiles = defaultTestFiles.HITS
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
......
......@@ -10,7 +10,6 @@ from AthenaCommon.Configurable import Configurable
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from CSC_Digitization.CSC_DigitizationConfigNew import CSC_DigitBuilderCfg
......@@ -21,7 +20,6 @@ Configurable.configurableRun3Behavior = True
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.lock()
# Function tests
# Construct our accumulator to run
......
......@@ -11,7 +11,6 @@ from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
# MDT imports
from MDT_Digitization.MDT_DigitizationConfigNew import MDT_DigitizerCfg
# Set up logging and new style config
......@@ -21,7 +20,6 @@ Configurable.configurableRun3Behavior = True
ConfigFlags.Input.Files = defaultTestFiles.HITS_SPECIAL
ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.lock()
# Construct our accumulator to run
acc = MainServicesSerialCfg()
......
......@@ -11,7 +11,6 @@ from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
# RPC imports
from RPC_Digitization.RPC_DigitizationConfigNew import (
RPC_RangeToolCfg, RPC_DigitizationToolCfg, RPC_DigitizerCfg,
......@@ -25,7 +24,6 @@ Configurable.configurableRun3Behavior = True
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.lock()
# Construct our accumulator to run
acc = MainServicesSerialCfg()
......
......@@ -10,7 +10,6 @@ from AthenaCommon.Configurable import Configurable
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
# TGC imports
from TGC_Digitization.TGC_DigitizationConfigNew import (
......@@ -25,7 +24,6 @@ Configurable.configurableRun3Behavior = True
ConfigFlags.Input.Files = defaultTestFiles.HITS
ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.lock()
# Construct our accumulator to run
acc = MainServicesSerialCfg()
......
......@@ -11,7 +11,6 @@ from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
from AthenaConfiguration.TestDefaults import defaultTestFiles
from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags
from BCM_Digitization.BCM_DigitizationConfigNew import BCM_DigitizationCfg
from SCT_Digitization.SCT_DigitizationConfigNew import SCT_DigitizationHSCfg
from TRT_Digitization.TRT_DigitizationConfigNew import TRT_DigitizationHSCfg
......@@ -27,7 +26,6 @@ from LArDigitization.LArDigitizationConfigNew import LArDigitMakerCfg
log.setLevel(DEBUG)
Configurable.configurableRun3Behavior = True
# Configure
ConfigFlags.join(createDigitizationCfgFlags())
ConfigFlags.Input.Files = defaultTestFiles.HITS_SPECIAL
ConfigFlags.Output.RDOFileName = "myRDO.pool.root"
ConfigFlags.IOVDb.GlobalTag = "OFLCOND-MC16-SDR-16"
......
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