11 """Return component accumulator with configured Tile EM scale conditions algorithm
14 flags -- Athena configuration flags
16 Source -- source of EM scale conditions (COOL, FILE). Defaults to COOL.
17 TileEMScale -- name of Tile EM scale conditions object. Defaults to TileEMScale.
21 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg
25 source = kwargs.get(
'Source',
'COOL')
26 emScale = kwargs.get(
'TileEMScale',
'TileEMScale')
28 if source
not in _validSources:
29 raise(Exception(
"Invalid source: %s" % source))
31 name = emScale +
'CondAlg'
32 onlCacheUnit =
"Invalid"
36 from TileConditions.TileFolders
import TileFolders
37 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
39 if not flags.Input.isMC:
40 onlCacheUnit =
'OnlineMegaElectronVolts'
42 oflLasLinFolder = folders.addSplitOnline(
'/TILE/ONL01/CALIB/LAS/LIN',
'/TILE/OFL02/CALIB/LAS/LIN')
43 oflCesFolder = folders.addSplitOnline(
'/TILE/ONL01/CALIB/CES',
'/TILE/OFL02/CALIB/CES')
44 oflEmsFolder = folders.addSplitOnline(
'/TILE/ONL01/CALIB/EMS',
'/TILE/OFL02/CALIB/EMS')
46 onlCisLinFolder = folders.addSplitMC(
'/TILE/ONL01/CALIB/CIS/LIN',
'/TILE/OFL02/CALIB/CIS/FIT/LIN')
47 onlLasLinFolder = folders.addSplitMC(
'/TILE/ONL01/CALIB/LAS/LIN',
'/TILE/OFL02/CALIB/LAS/LIN')
48 onlCesFolder = folders.addSplitMC(
'/TILE/ONL01/CALIB/CES',
'/TILE/OFL02/CALIB/CES')
49 onlEmsFolder = folders.addSplitMC(
'/TILE/ONL01/CALIB/EMS',
'/TILE/OFL02/CALIB/EMS')
52 if flags.IOVDb.DatabaseInstance ==
'CONDBR2':
53 oflCisLinFolder = folders.addSplitOnline(
'/TILE/ONL01/CALIB/CIS/LIN',
'/TILE/OFL02/CALIB/CIS/LIN')
54 oflCisNlnFolder = folders.addSplitOnline(
'/TILE/ONL01/CALIB/CIS/NLN',
'/TILE/OFL02/CALIB/CIS/NLN')
55 oflLasNlnFolder = folders.addSplitOnline(
'/TILE/ONL01/CALIB/LAS/NLN',
'/TILE/OFL02/CALIB/LAS/NLN')
56 if not flags.Common.isOnline:
57 oflLasFibFolder = folders.add(
'/TILE/OFL02/CALIB/LAS/FIBER',
'TILE_OFL')
59 oflLasFibFolder =
None
61 oflCisLinFolder = folders.addSplitOnline(
'/TILE/ONL01/CALIB/CIS/LIN',
'/TILE/OFL02/CALIB/CIS/FIT/LIN')
62 oflCisNlnFolder = folders.addSplitOnline(
'/TILE/OFL01/CALIB/CIS/FIT/NLN',
'/TILE/OFL02/CALIB/CIS/FIT/NLN')
63 oflLasNlnFolder = folders.addSplitOnline(
'/TILE/OFL01/CALIB/LAS/NLN',
'/TILE/OFL02/CALIB/LAS/NLN')
64 oflLasFibFolder = folders.addSplitOnline(
'/TILE/OFL01/CALIB/LAS/FIBER',
'/TILE/OFL02/CALIB/LAS/FIBER')
66 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
69 TileCondProxyCoolFlt = CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerFlt>")
70 if not oflLasFibFolder:
88 TileCondProxyFileFlt = CompFactory.getComp(
"TileCondProxyFile<TileCalibDrawerFlt>")
89 oflCisLinProxy =
TileCondProxyFileFlt(
'TileCondProxyFile_OflCisLin', Source =
'TileDefault.cisFitLin')
90 oflCisNlnProxy =
TileCondProxyFileFlt(
'TileCondProxyFile_OflCisNln', Source =
'TileDefault.cisFitNln')
91 oflLasLinProxy =
TileCondProxyFileFlt(
'TileCondProxyFile_OflLasLin', Source =
'TileDefault.lasLin')
92 oflLasNlnProxy =
TileCondProxyFileFlt(
'TileCondProxyFile_OflLasNln', Source =
'TileDefault.lasNln')
93 oflLasFibProxy =
TileCondProxyFileFlt(
'TileCondProxyFile_OflLasFib', Source =
'TileDefault.lasFib')
96 onlCisProxy =
TileCondProxyFileFlt(
'TileCondProxyFile_OflCisLin', Source =
'TileDefault.cisFitLin')
102 TileEMScaleCondAlg=CompFactory.TileEMScaleCondAlg
104 OnlCacheUnit = onlCacheUnit,
105 OflCisLinProxy = oflCisLinProxy,
106 OflCisNlnProxy = oflCisNlnProxy,
107 OflLasLinProxy = oflLasLinProxy,
108 OflLasNlnProxy = oflLasNlnProxy,
109 OflLasFibProxy = oflLasFibProxy,
110 OflCesProxy = oflCesProxy,
111 OflEmsProxy = oflEmsProxy,
112 OnlCisProxy = onlCisProxy,
113 OnlLasProxy = onlLasProxy,
114 OnlCesProxy = onlCesProxy,
115 OnlEmsProxy = onlEmsProxy,
116 TileEMScale = emScale)
120 acc.addCondAlgo(emScaleCondAlg)