8def eFexByteStreamToolCfg(flags, name, *, writeBS=False, TOBs=True, xTOBs=False, multiSlice=False, decodeInputs=False):
9 acc = ComponentAccumulator()
11 tool = CompFactory.eFexByteStreamTool(name)
17 tool.eEMContainerReadKeys += [
"L1_eEMRoI"]
18 tool.eTAUContainerReadKeys += [
"L1_eTauRoI"]
20 tool.eEMContainerReadKeys += [
"L1_eEMxRoI"]
21 tool.eTAUContainerReadKeys += [
"L1_eTauxRoI"]
22 tool.eEMContainerWriteKey =
""
23 tool.eTAUContainerWriteKey =
""
24 efex_roi_moduleids = [0x1000,0x1100]
25 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid))
for moduleid
in efex_roi_moduleids]
29 if TOBs
or xTOBs
or multiSlice:
30 efex_roi_moduleids = [0x1000,0x1100]
31 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid))
for moduleid
in efex_roi_moduleids]
33 tool.eEMContainerWriteKey =
"L1_eEMRoI"
34 tool.eTAUContainerWriteKey =
"L1_eTauRoI"
36 tool.eEMxContainerWriteKey =
"L1_eEMxRoI"
37 tool.eTAUxContainerWriteKey =
"L1_eTauxRoI"
39 tool.eEMSliceContainerWriteKey =
"L1_eEMxRoIOutOfTime"
40 tool.eTAUSliceContainerWriteKey =
"L1_eTauxRoIOutOfTime"
43 inputId = int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, 0x1000))
44 for shelf
in range(0,2):
45 for module
in range(0,12):
46 efex_raw_ids += [inputId + shelf*0x100 + module*0x010 ]
47 tool.ROBIDs += efex_raw_ids
48 tool.eTowerContainerWriteKey =
"L1_eFexDataTowers"
50 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
51 if flags.Trigger.doHLT:
52 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
55 monTool.defineHistogram(
'efexDecoderErrorTitle,efexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
56 title=
'Decoder Errors;Title;Location',
57 xbins=1,xmin=0,xmax=1,
58 ybins=1,ymin=0,ymax=1,
59 opt=[
'kCanRebin'],merge=
"merge")
60 tool.MonTool = monTool
64 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig
import L1CaloMonitorCfgHelper
65 helper = L1CaloMonitorCfgHelper(flags,
None,name)
69 helper.defineHistogram(
'efexDecoderErrorTitle,efexDecoderErrorLocation;h_efex_errors', type=
'TH2I',
70 path=
"Developer/ByteStreamDecoders",
71 fillGroup = f
'{name}MonTool',
72 title=
'eFEX Decoder Errors;Title;Location',
73 xbins=1,xmin=0,xmax=1,
74 ybins=1,ymin=0,ymax=1,
75 opt=[
'kCanRebin',
'kAlwaysCreate'],merge=
"merge")
76 helper.defineHistogram(
'lbn,decoderError;h_efex_errors_vs_lbn', type=
'TH2I',
77 path=
"Expert/ByteStreamDecoders",
78 hanConfig={
"algorithm":
"Histogram_Empty",
"description":
"Should be empty. Please report any errors to eFEX software experts."},
79 fillGroup = f
'{name}MonTool',
80 title=
'eFEX Decoder Errors;LB;Error',
81 xbins=1,xmin=0,xmax=1,
82 ybins=1,ymin=0,ymax=1,
83 opt=[
'kAddBinsDynamically',
'kCanRebin',
'kAlwaysCreate'],merge=
"merge")
84 tool.MonTool = helper.fillGroups[f
'{name}MonTool']
85 acc.merge(helper.result())
88 acc.setPrivateTools(tool)
93 acc = ComponentAccumulator()
94 tool = CompFactory.jFexRoiByteStreamTool(name)
95 tool.ConvertExtendedTOBs = xTOBs
96 jfex_roi_moduleids = [0x2000]
97 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid))
for moduleid
in jfex_roi_moduleids]
100 tool.jJRoIContainerReadKey =
"L1_jFexSRJetxRoI" if xTOBs
else "L1_jFexSRJetRoI"
101 tool.jLJRoIContainerReadKey =
"L1_jFexLRJetxRoI" if xTOBs
else "L1_jFexLRJetRoI"
102 tool.jTauRoIContainerReadKey =
"L1_jFexTauxRoI" if xTOBs
else "L1_jFexTauRoI"
103 tool.jEMRoIContainerReadKey =
"L1_jFexFwdElxRoI" if xTOBs
else "L1_jFexFwdElRoI"
104 tool.jTERoIContainerReadKey =
"L1_jFexSumETxRoI" if xTOBs
else "L1_jFexSumETRoI"
105 tool.jXERoIContainerReadKey =
"L1_jFexMETxRoI" if xTOBs
else "L1_jFexMETRoI"
107 tool.jJRoIContainerWriteKey =
""
108 tool.jLJRoIContainerWriteKey =
""
109 tool.jTauRoIContainerWriteKey=
""
110 tool.jEMRoIContainerWriteKey =
""
111 tool.jTERoIContainerWriteKey =
""
112 tool.jXERoIContainerWriteKey =
""
115 tool.jJRoIContainerReadKey =
""
116 tool.jLJRoIContainerReadKey =
""
117 tool.jTauRoIContainerReadKey =
""
118 tool.jEMRoIContainerReadKey =
""
119 tool.jTERoIContainerReadKey =
""
120 tool.jXERoIContainerReadKey =
""
122 tool.jJRoIContainerWriteKey =
"L1_jFexSRJetxRoI" if xTOBs
else "L1_jFexSRJetRoI"
123 tool.jLJRoIContainerWriteKey =
"L1_jFexLRJetxRoI" if xTOBs
else "L1_jFexLRJetRoI"
124 tool.jTauRoIContainerWriteKey=
"L1_jFexTauxRoI" if xTOBs
else "L1_jFexTauRoI"
125 tool.jEMRoIContainerWriteKey =
"L1_jFexFwdElxRoI" if xTOBs
else "L1_jFexFwdElRoI"
126 tool.jTERoIContainerWriteKey =
"L1_jFexSumETxRoI" if xTOBs
else "L1_jFexSumETRoI"
127 tool.jXERoIContainerWriteKey =
"L1_jFexMETxRoI" if xTOBs
else "L1_jFexMETRoI"
129 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
130 if flags.Trigger.doHLT:
131 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
136 from AthenaMonitoring
import AthMonitorCfgHelper
137 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
138 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
140 acc.merge(helper.result())
142 monTool.defineHistogram(
'jfexDecoderErrorTitle,jfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
143 title=
'jFEX TOB Decoder Errors;Type;Location',
146 opt=[
'kCanRebin'],merge=
"merge")
147 tool.MonTool = monTool
149 acc.setPrivateTools(tool)
154 acc = ComponentAccumulator()
155 tool = CompFactory.gFexByteStreamTool(name)
156 gfex_roi_moduleids = [0x3000]
157 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid))
for moduleid
in gfex_roi_moduleids]
160 tool.gFexRhoOutputContainerReadKey =
"L1_gFexRhoRoI"
161 tool.gFexSRJetOutputContainerReadKey =
"L1_gFexSRJetRoI"
162 tool.gFexLRJetOutputContainerReadKey =
"L1_gFexLRJetRoI"
163 tool.gScalarEJwojOutputContainerReadKey =
"L1_gScalarEJwoj"
164 tool.gEspressoOutputContainerReadKey =
"L1_gEspresso"
165 tool.gMETComponentsJwojOutputContainerReadKey =
"L1_gMETComponentsJwoj"
166 tool.gMHTComponentsJwojOutputContainerReadKey =
"L1_gMHTComponentsJwoj"
167 tool.gMSTComponentsJwojOutputContainerReadKey =
"L1_gMSTComponentsJwoj"
168 tool.gMETComponentsNoiseCutOutputContainerReadKey =
"L1_gMETComponentsNoiseCut"
169 tool.gMETComponentsRmsOutputContainerReadKey =
"L1_gMETComponentsRms"
170 tool.gScalarENoiseCutOutputContainerReadKey =
"L1_gScalarENoiseCut"
171 tool.gScalarERmsOutputContainerReadKey =
"L1_gScalarERms"
174 tool.gFexRhoOutputContainerWriteKey =
""
175 tool.gFexSRJetOutputContainerWriteKey =
""
176 tool.gFexLRJetOutputContainerWriteKey =
""
177 tool.gScalarEJwojOutputContainerWriteKey =
""
178 tool.gEspressoOutputContainerWriteKey =
""
179 tool.gMETComponentsJwojOutputContainerWriteKey =
""
180 tool.gMHTComponentsJwojOutputContainerWriteKey =
""
181 tool.gMSTComponentsJwojOutputContainerWriteKey =
""
182 tool.gMETComponentsNoiseCutOutputContainerWriteKey =
""
183 tool.gMETComponentsRmsOutputContainerWriteKey =
""
184 tool.gScalarENoiseCutOutputContainerWriteKey =
""
185 tool.gScalarERmsOutputContainerWriteKey =
""
188 tool.gFexRhoOutputContainerReadKey =
""
189 tool.gFexSRJetOutputContainerReadKey =
""
190 tool.gFexLRJetOutputContainerReadKey =
""
191 tool.gScalarEJwojOutputContainerReadKey =
""
192 tool.gEspressoOutputContainerReadKey =
""
193 tool.gMETComponentsJwojOutputContainerReadKey =
""
194 tool.gMHTComponentsJwojOutputContainerReadKey =
""
195 tool.gMSTComponentsJwojOutputContainerReadKey =
""
196 tool.gMETComponentsNoiseCutOutputContainerReadKey =
""
197 tool.gMETComponentsRmsOutputContainerReadKey =
""
198 tool.gScalarENoiseCutOutputContainerReadKey =
""
199 tool.gScalarERmsOutputContainerReadKey =
""
202 tool.gFexRhoOutputContainerWriteKey =
"L1_gFexRhoRoI"
203 tool.gFexSRJetOutputContainerWriteKey =
"L1_gFexSRJetRoI"
204 tool.gFexLRJetOutputContainerWriteKey =
"L1_gFexLRJetRoI"
205 tool.gScalarEJwojOutputContainerWriteKey =
"L1_gScalarEJwoj"
206 tool.gEspressoOutputContainerWriteKey =
"L1_gEspresso"
207 tool.gMETComponentsJwojOutputContainerWriteKey =
"L1_gMETComponentsJwoj"
208 tool.gMHTComponentsJwojOutputContainerWriteKey =
"L1_gMHTComponentsJwoj"
209 tool.gMSTComponentsJwojOutputContainerWriteKey =
"L1_gMSTComponentsJwoj"
210 tool.gMETComponentsNoiseCutOutputContainerWriteKey =
"L1_gMETComponentsNoiseCut"
211 tool.gMETComponentsRmsOutputContainerWriteKey =
"L1_gMETComponentsRms"
212 tool.gScalarENoiseCutOutputContainerWriteKey =
"L1_gScalarENoiseCut"
213 tool.gScalarERmsOutputContainerWriteKey =
"L1_gScalarERms"
218 tool.gFexRhoSliceContainerWriteKey =
"L1_gFexRhoRoIOutOfTime"
219 tool.gFexSRJetSliceContainerWriteKey =
"L1_gFexSRJetRoIOutOfTime"
220 tool.gFexLRJetSliceContainerWriteKey =
"L1_gFexLRJetRoIOutOfTime"
222 tool.gScalarEJwojSliceContainerWriteKey =
"L1_gScalarEJwojOutOfTime"
223 tool.gMETComponentsJwojSliceContainerWriteKey =
"L1_gMETComponentsJwojOutOfTime"
224 tool.gMHTComponentsJwojSliceContainerWriteKey =
"L1_gMHTComponentsJwojOutOfTime"
225 tool.gMSTComponentsJwojSliceContainerWriteKey =
"L1_gMSTComponentsJwojOutOfTime"
227 tool.gEspressoSliceContainerWriteKey =
"L1_gEspressoOutOfTime"
229 tool.gMETComponentsNoiseCutSliceContainerWriteKey=
"L1_gMETComponentsNoiseCutOutOfTime"
230 tool.gScalarENoiseCutSliceContainerWriteKey =
"L1_gScalarENoiseCutOutOfTime"
232 tool.gMETComponentsRmsSliceContainerWriteKey =
"L1_gMETComponentsRmsOutOfTime"
233 tool.gScalarERmsSliceContainerWriteKey =
"L1_gScalarERmsOutOfTime"
238 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
239 if flags.Trigger.doHLT:
240 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
245 from AthenaMonitoring
import AthMonitorCfgHelper
246 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
247 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
249 acc.merge(helper.result())
251 monTool.defineHistogram(
'gfexDecoderErrorTitle,gfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
252 title=
'gFEX TOB Decoder Errors;Type;Location',
255 opt=[
'kCanRebin'],merge=
"merge")
256 tool.MonTool = monTool
259 acc.setPrivateTools(tool)
264 acc = ComponentAccumulator()
265 tool = CompFactory.jFexInputByteStreamTool(name)
266 jfex_roi_moduleids = [0x2000,0x2010,0x2020,0x2030,0x2040,0x2050]
267 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, moduleid))
for moduleid
in jfex_roi_moduleids]
272 tool.jTowersReadKey =
"L1_jFexDataTowers"
274 tool.jTowersWriteKey =
""
277 tool.jTowersReadKey =
""
279 tool.jTowersWriteKey =
"L1_jFexDataTowers"
281 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
282 if flags.Trigger.doHLT:
283 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
288 from AthenaMonitoring
import AthMonitorCfgHelper
289 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
290 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
292 acc.merge(helper.result())
294 monTool.defineHistogram(
'jfexDecoderErrorTitle,jfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
295 title=
'jFEX InputData Decoder Errors;Type;Location',
298 opt=[
'kCanRebin'],merge=
"merge")
299 tool.MonTool = monTool
302 acc.setPrivateTools(tool)
307 acc = ComponentAccumulator()
308 tool = CompFactory.gFexInputByteStreamTool(name)
309 gfex_roi_moduleids = [0x3000]
310 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, moduleid))
for moduleid
in gfex_roi_moduleids]
314 tool.gTowersReadKey =
"L1_gFexDataTowers"
316 tool.gTowersWriteKey =
""
319 tool.gTowersReadKey =
""
321 tool.gTowersWriteKey =
"L1_gFexDataTowers"
323 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
324 if flags.Trigger.doHLT:
325 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
330 from AthenaMonitoring
import AthMonitorCfgHelper
331 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
332 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
334 acc.merge(helper.result())
336 monTool.defineHistogram(
'gfexDecoderErrorTitle,gfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
337 title=
'gFEX InputData Decoder Errors;Type;Location',
340 opt=[
'kCanRebin'],merge=
"merge")
341 tool.MonTool = monTool
343 acc.setPrivateTools(tool)