6 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
9 if flags.LArCalib.isSC:
11 from LArCabling.LArCablingConfig
import LArOnOffIdMappingSCCfg
15 from LArCabling.LArCablingConfig
import LArOnOffIdMappingCfg
20 if dbname
in (
"LAR",
"LAR_ONL"):
21 folder=
"/LAR/BadChannels/BadChannels"
23 folder=
"/LAR/BadChannelsOfl/BadChannels"
25 if flags.LArCalib.isSC:
29 if not tag.startswith(
"LAR"):
30 if not tag.startswith(
"-"): tag=
"-"+tag
31 tag=
"".
join(folder.split(
"/"))+tag
35 result.merge(
addFolders(flags,folder,dbname,tag=tag,
36 className=
"CondAttrListCollection"))
37 theLArBadChannelCondAlgo=CompFactory.LArBadChannelCondAlg(ReadKey=folder)
38 if flags.LArCalib.isSC:
39 theLArBadChannelCondAlgo.CablingKey=
"LArOnOffIdMapSC"
40 theLArBadChannelCondAlgo.isSC=
True
42 result.addCondAlgo(theLArBadChannelCondAlgo)
45 if (
not flags.LArCalib.isSC):
46 from LArBadChannelTool.LArBadFebsConfig
import LArKnownBadFebCfg
49 theLArBadChannels2Ascii=CompFactory.LArBadChannel2Ascii(SkipDisconnected=
True)
50 theLArBadChannels2Ascii.FileName=OutputFile
51 theLArBadChannels2Ascii.WithMissing=
False if (summaryfile==
"" and not flags.LArCalib.isSC)
else True
52 theLArBadChannels2Ascii.ExecutiveSummaryFile=summaryfile
53 theLArBadChannels2Ascii.BFKey=
"LArKnownBadFEBs"
54 if (flags.LArCalib.isSC):
55 theLArBadChannels2Ascii.LArOnOffIdMapKey=
"LArOnOffIdMapSC"
56 theLArBadChannels2Ascii.SuperCell=
True
57 result.addEventAlgo(theLArBadChannels2Ascii)