8def TileMuIDCondAlgCfg(flags, **kwargs):
9 """Return component accumulator with configured Tile MuID conditions algorithm
10
11 Arguments:
12 flags -- Athena configuration flags
13 Keyword arguments:
14 Source -- source of Tile MuID conditions (COOL, FILE). Defaults to COOL.
15 TileMuID -- name of Tile MuID conditions object. Defaults to TileMuID.
16 """
17
18 acc = ComponentAccumulator()
19
20 source = kwargs.get('Source', 'COOL')
21 muID = kwargs.get('TileMuID', 'TileMuID')
22
23 name = muID + 'CondAlg'
24
25 if source == 'COOL':
26
27
28 from TileConditions.TileFolders import TileFolders
29 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
30
31 muIDFolder = folders.addSplitMC('/TILE/ONL01/MUID', '/TILE/ONL01/MUID')
32
33 TileCondProxyCoolFlt=CompFactory.getComp("TileCondProxyCool<TileCalibDrawerFlt>")
35
36 from IOVDbSvc.IOVDbSvcConfig import addFolderList
37 acc.merge( addFolderList(flags, folders.get()) )
38
39 elif source == 'FILE':
40
41 TileCondProxyFileFlt=CompFactory.getComp("TileCondProxyFile<TileCalibDrawerFlt>")
43 else:
44 raise(Exception("Invalid source: %s" % source))
45
46 TileCalibFltCondAlg=CompFactory.getComp("TileCalibCondAlg<TileCalibDrawerFlt>")
48 ConditionsProxy = muIDProxy,
49 TileCalibData = muID)
50
51 acc.addCondAlgo(muIDCondAlg)
52
53 return acc
54
55