10 """Return component accumulator with configured Tile OFC conditions algorithm
13 flags -- Athena configuration flags
15 Source -- source of Tile OFC conditions (COOL, FILE). Defaults to COOL.
16 TileOfc -- name of Tile OFC conditions object starts with. Defaults to TileOfc.
17 OfcType -- type of Tile OFC. Defaults to OF2. Possible OFC types: OF1, OF2.
22 runType = flags.Tile.RunType
24 source = kwargs.get(
'Source',
'COOL')
25 ofc = kwargs.get(
'TileOfc',
'TileOfc')
26 ofcType = kwargs.get(
'OfcType',
'OF2')
28 ofcType = ofcType.upper()
29 if ofcType
not in [
'OF1',
'OF2']:
30 raise(Exception(
"Invalid Tile OFC type: %s" % ofcType))
32 name = ofc +
'CondAlg'
37 from TileConditions.TileFolders
import TileFolders
38 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
40 ofcType = ofcType +
'/' + runType.getCommonType().value
42 runNumber = flags.Input.RunNumbers[0]
43 runSplitOnline = 314449
44 if flags.IOVDb.DatabaseInstance ==
'CONDBR2' and runType
is TileRunType.PHY
and runNumber > runSplitOnline:
45 ofcFolder = folders.addSplitOnline(
'/TILE/ONL01/FILTER/' + ofcType,
'/TILE/OFL02/FILTER/' + ofcType)
47 ofcFolder = folders.addSplitMC(
'/TILE/ONL01/FILTER/' + ofcType,
'/TILE/ONL01/FILTER/' + ofcType)
49 TileCondProxyCoolOfc=CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerOfc>")
52 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
56 raise(Exception(
"Invalid source: %s" % source))
58 TileCalibOfcCondAlg=CompFactory.getComp(
"TileCalibCondAlg<TileCalibDrawerOfc>")
59 ofcCondAlg =
TileCalibOfcCondAlg( name = name, ConditionsProxy = ofcProxy, TileCalibData = ofc)
61 acc.addCondAlgo(ofcCondAlg)