7 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
8 from AthenaConfiguration.ComponentFactory
import CompFactory
9 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
15 from LArRecUtils.LArRecUtilsConfig
import LArMCSymCondAlgCfg
16 result.merge (LArMCSymCondAlgCfg (flags))
18 if flags.Input.isMC
is False:
22 if flags.Common.isOnline:
23 result.merge(
addFolderList(flags, ((
'/LAR/LArPileup/LArPileupShape<key>LArShape32</key>',
'LAR_ONL',
'LArShape32MC'),
24 (
'/LAR/LArPileup/LArPileupAverage',
'LAR_ONL',
'LArMinBiasAverageMC')) ))
26 result.merge(
addFolderList(flags, ((
'/LAR/ElecCalibOfl/LArPileupShape<key>LArShape32</key>',
'LAR_OFL',
'LArShape32MC'),
27 (
'/LAR/ElecCalibOfl/LArPileupAverage',
'LAR_OFL',
'LArMinBiasAverageMC')) ))
29 LArMinBiasAverageSymAlg=CompFactory.getComp(
"LArSymConditionsAlg<LArMinBiasAverageMC,LArMinBiasAverageSym>")
30 result.addCondAlgo(
LArMinBiasAverageSymAlg(
"LArPileUpAvgSymCondAlg",ReadKey=
"LArPileupAverage",WriteKey=
"LArPileupAverageSym"))
32 LArShapeSymAlg=CompFactory.getComp(
"LArSymConditionsAlg<LArShape32MC,LArShape32Sym>")
33 result.addCondAlgo(
LArShapeSymAlg(
"LArPileUpShapeSymCondAlg",ReadKey=
"LArShape32",WriteKey=
"LArShape32Sym"))
35 ShapeKey =
'LArShape32Sym'
37 from LArConfiguration.LArElecCalibDBConfig
import LArElecCalibDBCfg
38 result.merge (LArElecCalibDBCfg (flags, [
'OFC']))
40 from LArRecUtils.LArADC2MeVCondAlgConfig
import LArADC2MeVCondAlgCfg
41 from LArRecUtils.LArRecUtilsConfig
import LArOFCCondAlgCfg, LArAutoCorrTotalCondAlgCfg
43 result.merge (LArADC2MeVCondAlgCfg (flags))
44 result.merge (LArOFCCondAlgCfg (flags))
45 result.merge (LArAutoCorrTotalCondAlgCfg (flags))
47 result.merge(
addFolderList(flags, ((
'/LAR/ElecCalibMC/Shape',
'LAR_OFL',
'LArShape32MC'),
48 (
'/LAR/ElecCalibMC/LArPileupAverage',
'LAR_OFL',
'LArMinBiasAverageMC')) ))
50 LArMinBiasAverageSymAlg=CompFactory.getComp(
"LArSymConditionsAlg<LArMinBiasAverageMC,LArMinBiasAverageSym>")
51 result.addCondAlgo(
LArMinBiasAverageSymAlg(
"LArPileUpAvgSymCondAlg",ReadKey=
"LArPileupAverage",WriteKey=
"LArPileupAverageSym"))
53 ShapeKey =
'LArShapeSym'
56 CaloBCIDCoeffsCondAlg = CompFactory.CaloBCIDCoeffsCondAlg
57 alg = CaloBCIDCoeffsCondAlg (
'CaloBCIDCoeffsCondAlg',
58 MCSymKey =
'LArMCSym',
61 MinBiasAvgKey =
'LArPileupAverageSym',
62 OutputCoeffsKey =
'CaloBCIDCoeffs')
63 result.addCondAlgo (alg)
68 if __name__ ==
"__main__":
69 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
70 from AthenaConfiguration.TestDefaults
import defaultGeometryTags, defaultTestFiles
72 only = [
'CaloBCIDCoeffsCondAlg',
73 'LArPileUpAvgSymCondAlg',
74 'LArPileUpShapeSymCondAlg']
78 flags1.Input.Files = defaultTestFiles.RAW_RUN2
79 flags1.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
81 acc1 = CaloBCIDCoeffsCondAlgCfg (flags1)
82 acc1.printConfig(summariseProps=
True, onlyComponents=only)
83 print (
'IOVDbSvc:', acc1.getService(
'IOVDbSvc').Folders)
88 flags2.Input.Files = defaultTestFiles.ESD
89 flags2.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
91 acc2 = CaloBCIDCoeffsCondAlgCfg (flags2)
92 acc2.printConfig(summariseProps=
True, onlyComponents=only)
93 print (
'IOVDbSvc:', acc2.getService(
'IOVDbSvc').Folders)