10 """Return component accumulator with configured Tile pulse shape conditions algorithm
13 flags -- Athena configuration flags
15 Source -- source of Tile pulse shape conditions (COOL, FILE). Defaults to COOL.
16 TilePulseShape -- name of Tile pulse shape conditions object. Defaults to TilePulseShape.
17 PulseType -- type of Tile pulse shape. Defaults to run type (PED->PHY, BILAS->LAS).
18 Possible Tile pulse shape types:
19 PHY, LAS, CIS, CIS/PULSE100, CIS/PULSE5P2, CIS/LEAK100, CIS/LEAK5P2, MURCV.
24 runType = flags.Tile.RunType
26 source = kwargs.get(
'Source',
'COOL')
27 pulseShape = kwargs.get(
'TilePulseShape',
'TilePulseShape')
28 pulseType = kwargs.get(
'PulseType', runType.getCommonType().value)
30 actualPulseType = {
'CIS' :
'CIS/PULSE100',
31 'CISPULSE100' :
'CIS/PULSE100',
'CISPULSE5P2' :
'CIS/PULSE5P2',
32 'CISLEAK100' :
'CIS/LEAK100',
'CISLEAK5P2' :
'CIS/LEAK5P2'}
34 pulse = actualPulseType.get(pulseType, pulseType)
36 if pulse
not in [
'PHY',
'LAS',
'CIS/PULSE100',
'CIS/PULSE5P2',
'CIS/LEAK100',
'CIS/LEAK5P2',
'MURCV']:
37 raise(Exception(
"Invalid Tile pulse shape type: %s" % pulse))
39 name = pulseShape +
'CondAlg'
44 if pulse
in [
'MURCV']:
45 raise(Exception(
'No Tile pulse shape [%s] in source: %s' % (pulse, source)))
47 from TileConditions.TileFolders
import TileFolders
48 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
50 if flags.IOVDb.DatabaseInstance ==
'CONDBR2':
51 if not flags.Common.isOnline:
52 pulseFolder = folders.add(
'/TILE/OFL02/PULSESHAPE/' + pulse,
'TILE_OFL')
54 raise(Exception(
'No Tile pulse shapes in online CONDBR2'))
56 pulseFolder = folders.addSplitOnline(
'/TILE/OFL01/PULSESHAPE/' + pulse,
'/TILE/OFL02/PULSESHAPE/' + pulse)
58 TileCondProxyCoolFlt=CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerFlt>")
61 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
64 elif source ==
'FILE':
66 fileExtention = {
'PHY' :
'plsPhy',
'LAS' :
'plsLas',
'MURCV' :
'plsMuRcv',
67 'CIS/PULSE100' :
'plsCisPulse100',
'CIS/PULSE5P2' :
'plsCisPulse5p2',
68 'CIS/LEAK100' :
'plsCisLeak100',
'CIS/LEAK5P2' :
'plsCisLeak5p2'}
70 TileCondProxyFileFlt=CompFactory.getComp(
"TileCondProxyFile<TileCalibDrawerFlt>")
72 Source =
'TileDefault.' + fileExtention[pulse])
74 raise(Exception(
"Invalid source: %s" % source))
76 TilePulseShapeCondAlg = CompFactory.getComp(
"TileCondAlg<TilePulse,TileCalibDrawerFlt>")
78 ConditionsProxy = pulseProxy,
79 TileCondData = pulseShape)
81 acc.addCondAlgo(pulseShapeCondAlg)