2 from AthenaConfiguration.ComponentFactory
import CompFactory
3 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
4 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
5 from Campaigns.Utils
import Campaign
7 from pathlib
import Path
12 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
15 from LArCabling.LArCablingConfig
import LArOnOffIdMappingCfg, LArCalibIdMappingCfg
20 LArConditionsTestAlg=CompFactory.LArConditionsTestAlg()
21 LArConditionsTestAlg.OutputLevel = 2
22 LArConditionsTestAlg.TestCondObjs =
True
23 LArConditionsTestAlg.ApplyCorrections =
True
24 if (flags.LArCondTest.Step==2):
26 LArConditionsTestAlg.ReadCondObjs =
True
27 LArConditionsTestAlg.WriteCondObjs =
False
28 LArConditionsTestAlg.WriteCorrections =
False
31 LArConditionsTestAlg.ReadCondObjs =
False
32 LArConditionsTestAlg.WriteCondObjs =
True
33 LArConditionsTestAlg.WriteCorrections =
True
34 result.addEventAlgo(LArConditionsTestAlg)
36 if (flags.LArCondTest.Step==1):
38 from RegistrationServices.OutputConditionsAlgConfig
import OutputConditionsAlgCfg
40 outputFile=
"LarCondTestNoReg.root",
41 ObjectList=[
"LArRampMC#/LArCalorimeter/LArTests/LArRampsSingleGroup",
42 "LArRampMC#/LArCalorimeter/LArTests/LArRampsSubDetectorGrouping",
43 "LArRampMC#/LArCalorimeter/LArTests/LArRampsFeedThroughGrouping" ],
49 elif (flags.LArCondTest.Step==2):
51 from EventSelectorAthenaPool.CondProxyProviderConfig
import CondProxyProviderCfg
58 if __name__ ==
"__main__":
59 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
60 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
62 flags.addFlag(
"LArCondTest.Step",1)
64 flags.GeoModel.AtlasVersion=defaultGeometryTags.RUN3
66 flags.IOVDb.GlobalTag=
"OFLCOND-CSC-00-01-00"
67 flags.Input.TypedCollections=[]
68 flags.Input.MCCampaign=Campaign.Unknown
74 msgsvc=cfg.getService(
"MessageSvc")
75 msgsvc.debugLimit=100000
77 msgsvc.Format=
'% F%18W%S%7W%R%T %0W%M'
79 poolSvc=cfg.getService(
"PoolSvc")
80 poolSvc.WriteCatalog=f
"file:Catalog{flags.LArCondTest.Step}.xml"
83 catalogFile = Path(f
"Catalog{flags.LArCondTest.Step}.xml")
84 if catalogFile.exists():
87 sys.exit(cfg.run(1).isFailure())