10 """Return component accumulator with configured Tile timing conditions algorithm
13 flags -- Athena configuration flags
15 Source -- source of Tile timing conditions (COOL, FILE). Defaults to COOL.
16 TileTiming -- name of Tile timing conditions object. Defaults to TileTiming.
17 ForceOnline -- flag to use online timing in offline. Defaults to False.
22 source = kwargs.get(
'Source',
'COOL')
23 timing = kwargs.get(
'TileTiming',
'TileTiming')
24 forceOnline = kwargs.get(
'ForceOnline',
False)
26 runType = flags.Tile.RunType
27 timingType = runType.getTimingType().value
29 name = timing +
'CondAlg'
34 from TileConditions.TileFolders
import TileFolders
35 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
37 if flags.IOVDb.DatabaseInstance ==
'CONDBR2':
38 onlineTimingFolder =
'/TILE/ONL01/TIME/CHANNELOFFSET/' + timingType
40 if timingType ==
'GAP/LAS':
41 raise(Exception(
"No Tile GAP/LAS timing in DB: %s" % flags.IOVDb.DatabaseInstance))
43 onlineTimingFolder =
'/TILE/OFL01/TIME/CHANNELOFFSET/' + timingType
46 timingFolder = folders.add(onlineTimingFolder,
'TILE')
48 timingFolder = folders.addSplitOnline(onlineTimingFolder,
'/TILE/OFL02/TIME/CHANNELOFFSET/' + timingType)
50 TileCondProxyCoolFlt=CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerFlt>")
53 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
56 elif source ==
'FILE':
58 fileExtention = {
'PHY' :
'tcphy',
'LAS' :
'tclas',
'CIS' :
'tccis'}
60 TileCondProxyFileFlt=CompFactory.getComp(
"TileCondProxyFile<TileCalibDrawerFlt>")
62 Source =
'TileDefault.' + fileExtention[timingType])
64 raise(Exception(
"Invalid source: %s" % source))
66 TileTimingCondAlg = CompFactory.getComp(
"TileCondAlg<TileTiming,TileCalibDrawerFlt>")
68 ConditionsProxy = timingProxy,
69 TileCondData = timing)
71 acc.addCondAlgo(timingCondAlg)