9 """Return component accumulator with configured Tile sample noise conditions algorithm
12 flags -- Athena configuration flags
14 Source -- source of Tile sample noise conditions (COOL, FILE). Defaults to COOL.
15 ForceOnline -- flag to use online sample noise in offline. Defaults to False.
16 TileSampleNoise -- name of Tile sample noise conditions object.
17 Defaults to TileOnlineSampleNoise if ForceOnline else TileSampleNoise.
22 source = kwargs.get(
'Source',
'COOL')
23 sampleNoise = kwargs.get(
'TileSampleNoise',
'TileSampleNoise')
24 forceOnline = kwargs.get(
'ForceOnline',
False)
26 name = sampleNoise +
'CondAlg'
31 from TileConditions.TileFolders
import TileFolders
32 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
34 if flags.IOVDb.DatabaseInstance ==
'CONDBR2':
35 onlineSampleNoiseFolder =
'/TILE/ONL01/NOISE/SAMPLE'
37 onlineSampleNoiseFolder =
'/TILE/OFL01/NOISE/SAMPLE'
40 sampleNoiseFolder = folders.add(onlineSampleNoiseFolder,
'TILE')
42 sampleNoiseFolder = folders.addSplitOnline(onlineSampleNoiseFolder,
'/TILE/OFL02/NOISE/SAMPLE')
44 TileCondProxyCoolFlt=CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerFlt>")
45 sampleNoiseProxy =
TileCondProxyCoolFlt(
'TileCondProxyCool_NoiseSample', Source = sampleNoiseFolder)
47 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
50 elif source ==
'FILE':
52 TileCondProxyFileFlt=CompFactory.getComp(
"TileCondProxyFile<TileCalibDrawerFlt>")
53 sampleNoiseProxy =
TileCondProxyFileFlt(
'TileCondProxyFile_NoiseSample', Source =
'TileDefault.ped')
56 raise(Exception(
"Invalid source: %s" % source))
58 TileSampleNoiseCondAlg = CompFactory.getComp(
"TileCondAlg<TileSampleNoise,TileCalibDrawerFlt>")
60 ConditionsProxy = sampleNoiseProxy,
61 TileCondData = sampleNoise)
63 acc.addCondAlgo(sampleNoiseCondAlg)