Skip to content
Snippets Groups Projects
Commit ddb73679 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge branch 'master-parameters' into 'master'

Add SCT_ConditionsParameterTestAlgConfig.py to run SCT_ConditionsParameterTestAlg in the new job configuration. (ATLASRECTS-5799)

See merge request atlas/athena!38793
parents 8b43f001 a193a81a
No related branches found
No related tags found
No related merge requests found
...@@ -99,6 +99,9 @@ atlas_add_test( TestMajorityNewConf ...@@ -99,6 +99,9 @@ atlas_add_test( TestMajorityNewConf
atlas_add_test( TestMonReadNewConf atlas_add_test( TestMonReadNewConf
SCRIPT python -m SCT_ConditionsAlgorithms.SCT_MonitorConditionsTestAlgConfig SCRIPT python -m SCT_ConditionsAlgorithms.SCT_MonitorConditionsTestAlgConfig
PROPERTIES TIMEOUT 600 ) PROPERTIES TIMEOUT 600 )
atlas_add_test( TestParametersNewConf
SCRIPT python -m SCT_ConditionsAlgorithms.SCT_ConditionsParameterTestAlgConfig
PROPERTIES TIMEOUT 600 )
atlas_add_test( TestRodVetoNewConf atlas_add_test( TestRodVetoNewConf
SCRIPT python -m SCT_ConditionsAlgorithms.SCT_RODVetoTestAlgConfig SCRIPT python -m SCT_ConditionsAlgorithms.SCT_RODVetoTestAlgConfig
PROPERTIES TIMEOUT 600 ) PROPERTIES TIMEOUT 600 )
......
"""Define method to configure and test SCT_ConditionsParameterTestAlg
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
def SCT_ConditionsParameterTestAlgCfg(flags, name="SCT_ConditionsParameterTestAlg", **kwargs):
"""Return a configured SCT_ConditionsParameterTestAlg"""
acc = ComponentAccumulator()
from SCT_ConditionsTools.SCT_ConditionsParameterConfig import SCT_ConditionsParameterCfg
kwargs.setdefault("SCT_ConditionsParameterTool", acc.popToolsAndMerge(SCT_ConditionsParameterCfg(flags)))
acc.addEventAlgo(CompFactory.SCT_ConditionsParameterTestAlg(**kwargs))
return acc
if __name__=="__main__":
from AthenaCommon.Logging import log
from AthenaCommon.Constants import INFO
log.setLevel(INFO)
from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior=1
from AthenaConfiguration.AllConfigFlags import ConfigFlags
ConfigFlags.Input.isMC = False
ConfigFlags.Input.ProjectName = "data12_8TeV"
ConfigFlags.Input.RunNumber = 215643
ConfigFlags.addFlag("Input.InitialTimeStamp", 1354748400) # LB 469 of run 215643, 2012-12-05 @ 11:00pm (UTC)
ConfigFlags.IOVDb.GlobalTag = "COMCOND-BLKPA-RUN1-09"
ConfigFlags.IOVDb.DatabaseInstance = "COMP200"
ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R1-2012-03-00-00"
ConfigFlags.Detector.GeometrySCT = True
ConfigFlags.lock()
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
cfg = MainServicesCfg(ConfigFlags)
from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
cfg.merge(McEventSelectorCfg(ConfigFlags))
cfg.merge(SCT_ConditionsParameterTestAlgCfg(ConfigFlags))
cfg.run(maxEvents=20)
"""Define methods to configure SCT_ConditionsParameter
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from IOVDbSvc.IOVDbSvcConfig import addFolders
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
from InDetConfig.InDetRecToolConfig import SCT_CablingToolCfg
def SCT_ConditionsParameterCfg(flags, name="SCT_ConditionsParameter", **kwargs):
"""Configure necessary condition folder, condition algorithm
for SCT_ConditionsParameterTool and return it.
"""
acc = ComponentAccumulator()
# For SCT_ID used in SCT_CablingTool
acc.merge(GeoModelCfg(flags))
# Condition folder
folder = "/SCT/DAQ/Configuration/Chip"
dbInstance = "SCT"
acc.merge(addFolders(flags, folder, dbInstance, className="CondAttrListVec"))
# Condition algorithm
alg = CompFactory.SCT_ConditionsParameterCondAlg(name=name+"CondAlg",
ReadKey=folder,
SCT_CablingTool=acc.popToolsAndMerge(SCT_CablingToolCfg(flags)))
acc.addCondAlgo(alg)
# Condition tool
acc.setPrivateTools(CompFactory.SCT_ConditionsParameterTool(name=name+"Tool"))
return acc
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