9 """Return component accumulator with configured Tile auto correlation conditions algorithm
12 flags -- Athena configuration flags
14 Source -- source of Tile auto correlation conditions (COOL, FILE). Defaults to COOL.
15 TileAutoCorrelation -- name of Tile auto correlation conditions object. Defaults to TileAutoCorrelaton.
20 source = kwargs.get(
'Source',
'COOL')
21 autoCorrelation = kwargs.get(
'TileAutoCorrelation',
'TileAutoCorrelation')
23 name = autoCorrelation +
'CondAlg'
28 from TileConditions.TileFolders
import TileFolders
29 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
31 if flags.IOVDb.DatabaseInstance ==
'CONDBR2':
32 if not flags.Common.isOnline:
33 autoCorrelationFolder = folders.add(
'/TILE/OFL02/NOISE/AUTOCR',
'TILE_OFL')
35 raise(Exception(
"No online auto correlation folder in CONDBR2 DB"))
37 autoCorrelationFolder = folders.addSplitOnline(
'/TILE/OFL01/NOISE/AUTOCR',
'/TILE/OFL02/NOISE/AUTOCR')
39 TileCondProxyCoolFlt=CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerFlt>")
40 autoCorrelationProxy =
TileCondProxyCoolFlt(
'TileCondProxyCool_NoiseAutoCr', Source = autoCorrelationFolder)
42 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
45 elif source ==
'FILE':
47 TileCondProxyFileFlt=CompFactory.getComp(
"TileCondProxyFile<TileCalibDrawerFlt>")
48 autoCorrelationProxy =
TileCondProxyFileFlt(
'TileCondProxyFile_NoiseAutoCr', Source =
'TileDefault.acr')
51 raise(Exception(
"Invalid source: %s" % source))
53 TileCalibFltCondAlg=CompFactory.getComp(
"TileCalibCondAlg<TileCalibDrawerFlt>")
55 ConditionsProxy = autoCorrelationProxy,
56 TileCalibData = autoCorrelation)
58 acc.addCondAlgo(autoCorrelationCondAlg)