ATLAS Offline Software
Loading...
Searching...
No Matches
python.TileBadChannelsConfig Namespace Reference

Functions

 TileBadChannelsCondAlgCfg (flags, **kwargs)
 TileBadChanToolCfg (flags, **kwargs)

Variables

list _validSources = ['COOL','FILE']
 flags = initConfigFlags()
 Files
 acc = ComponentAccumulator()
 badChanTool = acc.popToolsAndMerge( TileBadChanToolCfg(flags) )
 withDetails
 True
 summariseProps

Detailed Description

Define methods to construct configured Tile bad channels

Function Documentation

◆ TileBadChannelsCondAlgCfg()

python.TileBadChannelsConfig.TileBadChannelsCondAlgCfg ( flags,
** kwargs )
Return component accumulator with configured Tile bad channels conditions algorithm

Arguments:
    flags:  -- Athena configuration flags
Keyword arguments:
    Source: -- source of Tile bad channels (COOL, FILE). Defaults to COOL.
    TileBadChannels -- name of Tile bad channels object. Defaults to TileBadChannels.

Definition at line 10 of file TileBadChannelsConfig.py.

10def TileBadChannelsCondAlgCfg(flags, **kwargs):
11 """Return component accumulator with configured Tile bad channels conditions algorithm
12
13 Arguments:
14 flags: -- Athena configuration flags
15 Keyword arguments:
16 Source: -- source of Tile bad channels (COOL, FILE). Defaults to COOL.
17 TileBadChannels -- name of Tile bad channels object. Defaults to TileBadChannels.
18 """
19
20 acc = ComponentAccumulator()
21
22 source = kwargs.get('Source', 'COOL')
23 badChannels = kwargs.get('TileBadChannels', 'TileBadChannels')
24
25 if source not in _validSources:
26 raise(Exception("Invalid source: %s" % source))
27
28 name = badChannels + 'CondAlg'
29
30 if source == 'COOL':
31 # Connect COOL Tile conditions proxies to the algorithm (default)
32
33 from TileConditions.TileFolders import TileFolders
34 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
35
36 TileCondProxyCoolBch=CompFactory.getComp("TileCondProxyCool<TileCalibDrawerBch>")
37
38 if flags.Tile.useOnlineChannelStatus:
39 onlineFolder = folders.addSplitMC('/TILE/ONL01/STATUS/ADC', '/TILE/ONL01/STATUS/ADC')
40 onlineBadChannelsProxy = TileCondProxyCoolBch('TileCondProxyCool_OnlBch', Source = onlineFolder)
41 else:
42 onlineBadChannelsProxy = None
43
44 if flags.IOVDb.DatabaseInstance == 'CONDBR2':
45 if not flags.Common.isOnline:
46 oflineFolder = folders.add('/TILE/OFL02/STATUS/ADC', 'TILE_OFL')
47 offlineBadChannelsProxy = TileCondProxyCoolBch('TileCondProxyCool_OflBch', Source = oflineFolder)
48 else:
49 offlineBadChannelsProxy = None
50 else:
51 oflineFolder = folders.addSplitOnline('/TILE/OFL01/STATUS/ADC', '/TILE/OFL02/STATUS/ADC')
52 offlineBadChannelsProxy = TileCondProxyCoolBch('TileCondProxyCool_OflBch', Source = oflineFolder)
53
54 from IOVDbSvc.IOVDbSvcConfig import addFolderList
55 acc.merge( addFolderList(flags, folders.get()) )
56
57 else:
58 # Connect FILE Tile conditions proxies to the algorithm
59 TileCondProxyFileBch=CompFactory.getComp("TileCondProxyFile<TileCalibDrawerBch>")
60 if flags.Tile.useOnlineChannelStatus:
61 onlineBadChannelsProxy = TileCondProxyFileBch('TileCondProxyFile_OnlBch', Source = 'TileDefault.onlBch')
62 else:
63 onlineBadChannelsProxy = None
64 offlineBadChannelsProxy = TileCondProxyFileBch('TileCondProxyFile_OflBch', Source = 'TileDefault.oflBch')
65
66
67 TileCondIdTransforms=CompFactory.TileCondIdTransforms
68 TileBadChannelsCondAlg=CompFactory.TileBadChannelsCondAlg
69 badChannelsCondAlg = TileBadChannelsCondAlg( name = name,
70 OnlBchProxy = onlineBadChannelsProxy,
71 OflBchProxy = offlineBadChannelsProxy,
72 TileCondIdTransforms = TileCondIdTransforms(),
73 TileBadChannels = badChannels)
74
75 acc.addCondAlgo(badChannelsCondAlg)
76
77 from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
78 acc.merge( TileCablingSvcCfg(flags) )
79
80 return acc
81
82
Condition algorithm to prepare TileBadChannels and put it into condition store.

◆ TileBadChanToolCfg()

python.TileBadChannelsConfig.TileBadChanToolCfg ( flags,
** kwargs )
Return component accumulator with configured private Tile bad channel tool
    Arguments:
    flags:  -- Athena configuration flags
Keyword arguments:
    Source: -- source of Tile bad channels (COOL, FILE). Defaults to COOL.
    TileBadChannels -- name of Tile bad channels object. Defaults to TileBadChannels.

Definition at line 83 of file TileBadChannelsConfig.py.

83def TileBadChanToolCfg(flags, **kwargs):
84 """Return component accumulator with configured private Tile bad channel tool
85 Arguments:
86 flags: -- Athena configuration flags
87 Keyword arguments:
88 Source: -- source of Tile bad channels (COOL, FILE). Defaults to COOL.
89 TileBadChannels -- name of Tile bad channels object. Defaults to TileBadChannels.
90 """
91
92 acc = ComponentAccumulator()
93
94 kwargs.setdefault('Source', 'COOL')
95 kwargs.setdefault('TileBadChannels', 'TileBadChannels')
96
97 badChannels = kwargs['TileBadChannels']
98 name = 'TileBadChanTool'
99
100 from TileGeoModel.TileGMConfig import TileGMCfg
101 acc.merge( TileGMCfg(flags) )
102
103 from TileConditions.TileBadChannelsConfig import TileBadChannelsCondAlgCfg
104 acc.merge( TileBadChannelsCondAlgCfg(flags, **kwargs) )
105
106 TileBadChanTool=CompFactory.TileBadChanTool
107 acc.setPrivateTools( TileBadChanTool(name, TileBadChannels = badChannels) )
108
109 return acc
110
111
The tool to get Tile channel and ADC status.

Variable Documentation

◆ _validSources

list python.TileBadChannelsConfig._validSources = ['COOL','FILE']
protected

Definition at line 8 of file TileBadChannelsConfig.py.

◆ acc

python.TileBadChannelsConfig.acc = ComponentAccumulator()

Definition at line 126 of file TileBadChannelsConfig.py.

◆ badChanTool

python.TileBadChannelsConfig.badChanTool = acc.popToolsAndMerge( TileBadChanToolCfg(flags) )

Definition at line 128 of file TileBadChannelsConfig.py.

◆ Files

python.TileBadChannelsConfig.Files

Definition at line 123 of file TileBadChannelsConfig.py.

◆ flags

python.TileBadChannelsConfig.flags = initConfigFlags()

Definition at line 122 of file TileBadChannelsConfig.py.

◆ summariseProps

python.TileBadChannelsConfig.summariseProps

Definition at line 131 of file TileBadChannelsConfig.py.

◆ True

python.TileBadChannelsConfig.True

Definition at line 131 of file TileBadChannelsConfig.py.

◆ withDetails

python.TileBadChannelsConfig.withDetails

Definition at line 131 of file TileBadChannelsConfig.py.