3 from AthenaConfiguration.ComponentFactory
import CompFactory
4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from IOVDbSvc.IOVDbSvcConfig
import IOVDbSvcCfg, addFolders
6 LArOnOffMappingAlg, LArFebRodMappingAlg, LArCalibLineMappingAlg,LArLATOMEMappingAlg=CompFactory.getComps(
"LArOnOffMappingAlg",
"LArFebRodMappingAlg",
"LArCalibLineMappingAlg",
"LArLATOMEMappingAlg")
14 tagsperFolder={
"/LAR/Identifier/OnOffIdMap":
"LARIdentifierOnOffIdMap-012",
15 "/LAR/Identifier/FebRodMap":
"LARIdentifierFebRodMap-005",
16 "/LAR/Identifier/CalibIdMap":
"LARIdentifierCalibIdMap-012",
19 if configFlags.Input.isMC:
21 if folder
in tagsperFolder:
22 ft=tagsperFolder[folder]
23 folderwithtag=folder+
"<tag>"+ft+
"</tag>"
31 result.addCondAlgo(algo(ReadKey=folder),primary=
True)
33 result.addCondAlgo(algo(name=algName, ReadKey=folder),primary=
True)
34 result.merge(
addFolders(configFlags,folderwithtag,className=
"AthenaAttributeList",detDb=db))
43 tagsperFolder={
"/LAR/IdentifierSC/LatomeMapping":
"LARIdentifierSCLatomeMapping-UPD1-00"
46 if configFlags.Input.isMC:
48 if folder
in tagsperFolder:
49 ft=tagsperFolder[folder]
50 folderwithtag=folder+
"<tag>"+ft+
"</tag>"
57 result.addCondAlgo(algo(ReadKey=folder,WriteKey=outkey),primary=
True)
58 result.merge(
addFolders(configFlags,folderwithtag,className=
"CondAttrListCollection",detDb=db))
63 return _larCablingCfg(configFlags,LArOnOffMappingAlg,
"/LAR/Identifier/OnOffIdMap")
68 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
70 if configFlags.Input.isMC:
71 result.merge(
_larCablingCfg(configFlags,LArOnOffMappingAlg,
"/LAR/IdentifierOfl/OnOffIdMap_SC",
"LArOnOffMappingAlgSC"))
72 from IOVDbSvc.IOVDbSvcConfig
import addOverride
73 result.merge(
addOverride(configFlags,
"/LAR/IdentifierOfl/OnOffIdMap_SC",
"LARIdentifierOflOnOffIdMap_SC-000"))
75 result.merge(
_larCablingCfg(configFlags,LArOnOffMappingAlg,
"/LAR/Identifier/OnOffIdMap_SC",
"LArOnOffMappingAlgSC"))
76 result.getCondAlgo(
"LArOnOffMappingAlgSC").WriteKey =
"LArOnOffIdMapSC"
77 result.getCondAlgo(
"LArOnOffMappingAlgSC").isSuperCell =
True
81 return _larCablingCfg(configFlags,LArFebRodMappingAlg,
"/LAR/Identifier/FebRodMap")
84 return _larCablingCfg(configFlags,LArCalibLineMappingAlg,
"/LAR/Identifier/CalibIdMap")
88 if not configFlags.Input.isMC:
89 result.merge(
_larCablingCfg(configFlags,LArCalibLineMappingAlg,
"/LAR/Identifier/CalibIdMap_SC",
"LArCalibLineMappingAlgSC"))
90 result.getCondAlgo(
"LArCalibLineMappingAlgSC").WriteKey=
"LArCalibIdMapSC"
91 result.getCondAlgo(
"LArCalibLineMappingAlgSC").isSuperCell=
True
92 result.getCondAlgo(
"LArCalibLineMappingAlgSC").MaxCL=16
96 if not configFlags.Input.isMC:
97 return _larLatomeCfg(configFlags,LArLATOMEMappingAlg,
"/LAR/Identifier/LatomeMapping",
"LArLATOMEMap")
100 """Return ComponentAccumulator configured with Identifier Map in POOL/COOL"""
108 if __name__ ==
"__main__":
109 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
110 from AthenaConfiguration.TestDefaults
import defaultTestFiles
113 flags.Input.Files = defaultTestFiles.RAW_RUN2
119 acc.store(
open(
"test.pkl",
"wb" ) )