diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ByteStreamErrorsTestAlgConfig.py b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ByteStreamErrorsTestAlgConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..931ba6945007d2605bcdd3b697931e92fc108440 --- /dev/null +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/python/SCT_ByteStreamErrorsTestAlgConfig.py @@ -0,0 +1,44 @@ +"""Define method to configure and test SCT_ByteStreamErrorsTestAlg + +Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +""" +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator +from AthenaConfiguration.ComponentFactory import CompFactory + +def SCT_ByteStreamErrorsTestAlgCfg(flags, name="SCT_ByteStreamErrorsTestAlg", **kwargs): + """Return a configured SCT_ByteStreamErrorsTestAlg""" + acc = ComponentAccumulator() + from InDetConfig.InDetRecToolConfig import SCT_ByteStreamErrorsToolCfg + kwargs.setdefault("ByteStreamErrorsTool", acc.popToolsAndMerge(SCT_ByteStreamErrorsToolCfg(flags))) + acc.addEventAlgo(CompFactory.SCT_ByteStreamErrorsTestAlg(**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.Files = ["./myESD.pool.root"] + ConfigFlags.Input.ProjectName = "data17_13TeV" # q431 input + ConfigFlags.Input.RunNumber = 330470 # q431 input + ConfigFlags.IOVDb.GlobalTag = "CONDBR2-BLKPA-2018-03" # q431 setup + ConfigFlags.GeoModel.AtlasVersion = "ATLAS-R2-2016-01-00-01" # q431 setup + ConfigFlags.Detector.GeometrySCT = True + ConfigFlags.lock() + + from AthenaConfiguration.MainServicesConfig import MainServicesCfg + cfg = MainServicesCfg(ConfigFlags) + + from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + cfg.merge(PoolReadCfg(ConfigFlags)) + + algkwargs = {} + algkwargs["OutputLevel"] = INFO + cfg.merge(SCT_ByteStreamErrorsTestAlgCfg(ConfigFlags, **algkwargs)) + + cfg.run(maxEvents=20)