11 """Return component accumulator with configured Tile bad channels conditions algorithm
14 flags: -- Athena configuration flags
16 Source: -- source of Tile bad channels (COOL, FILE). Defaults to COOL.
17 TileBadChannels -- name of Tile bad channels object. Defaults to TileBadChannels.
22 source = kwargs.get(
'Source',
'COOL')
23 badChannels = kwargs.get(
'TileBadChannels',
'TileBadChannels')
25 if source
not in _validSources:
26 raise(Exception(
"Invalid source: %s" % source))
28 name = badChannels +
'CondAlg'
33 from TileConditions.TileFolders
import TileFolders
34 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
36 TileCondProxyCoolBch=CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerBch>")
38 if flags.Tile.useOnlineChannelStatus:
39 onlineFolder = folders.addSplitMC(
'/TILE/ONL01/STATUS/ADC',
'/TILE/ONL01/STATUS/ADC')
42 onlineBadChannelsProxy =
None
44 if flags.IOVDb.DatabaseInstance ==
'CONDBR2':
45 if not flags.Common.isOnline:
46 oflineFolder = folders.add(
'/TILE/OFL02/STATUS/ADC',
'TILE_OFL')
47 offlineBadChannelsProxy =
TileCondProxyCoolBch(
'TileCondProxyCool_OflBch', Source = oflineFolder)
49 offlineBadChannelsProxy =
None
51 oflineFolder = folders.addSplitOnline(
'/TILE/OFL01/STATUS/ADC',
'/TILE/OFL02/STATUS/ADC')
52 offlineBadChannelsProxy =
TileCondProxyCoolBch(
'TileCondProxyCool_OflBch', Source = oflineFolder)
54 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
59 TileCondProxyFileBch=CompFactory.getComp(
"TileCondProxyFile<TileCalibDrawerBch>")
60 if flags.Tile.useOnlineChannelStatus:
61 onlineBadChannelsProxy =
TileCondProxyFileBch(
'TileCondProxyFile_OnlBch', Source =
'TileDefault.onlBch')
63 onlineBadChannelsProxy =
None
64 offlineBadChannelsProxy =
TileCondProxyFileBch(
'TileCondProxyFile_OflBch', Source =
'TileDefault.oflBch')
67 TileCondIdTransforms=CompFactory.TileCondIdTransforms
68 TileBadChannelsCondAlg=CompFactory.TileBadChannelsCondAlg
70 OnlBchProxy = onlineBadChannelsProxy,
71 OflBchProxy = offlineBadChannelsProxy,
73 TileBadChannels = badChannels)
75 acc.addCondAlgo(badChannelsCondAlg)
77 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg