8def eFexByteStreamToolCfg(flags, name, *, writeBS=False, TOBs=True, xTOBs=False, multiSlice=False, decodeInputs=False):
9 acc = ComponentAccumulator()
11 tool = CompFactory.eFexByteStreamTool(name)
17 tool.eEMContainerWriteKey =
""
18 tool.eTAUContainerWriteKey =
""
19 efex_roi_moduleids = [0x1000,0x1100]
20 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid))
for moduleid
in efex_roi_moduleids]
24 if TOBs
or xTOBs
or multiSlice:
25 efex_roi_moduleids = [0x1000,0x1100]
26 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid))
for moduleid
in efex_roi_moduleids]
28 tool.eEMContainerWriteKey =
"L1_eEMRoI"
29 tool.eTAUContainerWriteKey =
"L1_eTauRoI"
31 tool.eEMxContainerWriteKey =
"L1_eEMxRoI"
32 tool.eTAUxContainerWriteKey =
"L1_eTauxRoI"
34 tool.eEMSliceContainerWriteKey =
"L1_eEMxRoIOutOfTime"
35 tool.eTAUSliceContainerWriteKey =
"L1_eTauxRoIOutOfTime"
38 inputId = int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, 0x1000))
39 for shelf
in range(0,2):
40 for module
in range(0,12):
41 efex_raw_ids += [inputId + shelf*0x100 + module*0x010 ]
42 tool.ROBIDs += efex_raw_ids
43 tool.eTowerContainerWriteKey =
"L1_eFexDataTowers"
45 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
46 if flags.Trigger.doHLT:
47 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
50 monTool.defineHistogram(
'efexDecoderErrorTitle,efexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
51 title=
'Decoder Errors;Title;Location',
52 xbins=1,xmin=0,xmax=1,
53 ybins=1,ymin=0,ymax=1,
54 opt=[
'kCanRebin'],merge=
"merge")
55 tool.MonTool = monTool
59 from TrigT1CaloMonitoring.LVL1CaloMonitoringConfig
import L1CaloMonitorCfgHelper
60 helper = L1CaloMonitorCfgHelper(flags,
None,name)
64 helper.defineHistogram(
'efexDecoderErrorTitle,efexDecoderErrorLocation;h_efex_errors', type=
'TH2I',
65 path=
"Developer/ByteStreamDecoders",
66 fillGroup = f
'{name}MonTool',
67 title=
'eFEX Decoder Errors;Title;Location',
68 xbins=1,xmin=0,xmax=1,
69 ybins=1,ymin=0,ymax=1,
70 opt=[
'kCanRebin',
'kAlwaysCreate'],merge=
"merge")
71 helper.defineHistogram(
'lbn,decoderError;h_efex_errors_vs_lbn', type=
'TH2I',
72 path=
"Expert/ByteStreamDecoders",
73 hanConfig={
"algorithm":
"Histogram_Empty",
"description":
"Should be empty. Please report any errors to eFEX software experts."},
74 fillGroup = f
'{name}MonTool',
75 title=
'eFEX Decoder Errors;LB;Error',
76 xbins=1,xmin=0,xmax=1,
77 ybins=1,ymin=0,ymax=1,
78 opt=[
'kAddBinsDynamically',
'kCanRebin',
'kAlwaysCreate'],merge=
"merge")
79 tool.MonTool = helper.fillGroups[f
'{name}MonTool']
80 acc.merge(helper.result())
83 acc.setPrivateTools(tool)
88 acc = ComponentAccumulator()
89 tool = CompFactory.jFexRoiByteStreamTool(name)
90 tool.ConvertExtendedTOBs = xTOBs
91 jfex_roi_moduleids = [0x2000]
92 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid))
for moduleid
in jfex_roi_moduleids]
95 tool.jJRoIContainerReadKey =
"L1_jFexSRJetxRoI" if xTOBs
else "L1_jFexSRJetRoI"
96 tool.jLJRoIContainerReadKey =
"L1_jFexLRJetxRoI" if xTOBs
else "L1_jFexLRJetRoI"
97 tool.jTauRoIContainerReadKey =
"L1_jFexTauxRoI" if xTOBs
else "L1_jFexTauRoI"
98 tool.jEMRoIContainerReadKey =
"L1_jFexFwdElxRoI" if xTOBs
else "L1_jFexFwdElRoI"
99 tool.jTERoIContainerReadKey =
"L1_jFexSumETxRoI" if xTOBs
else "L1_jFexSumETRoI"
100 tool.jXERoIContainerReadKey =
"L1_jFexMETxRoI" if xTOBs
else "L1_jFexMETRoI"
102 tool.jJRoIContainerWriteKey =
""
103 tool.jLJRoIContainerWriteKey =
""
104 tool.jTauRoIContainerWriteKey=
""
105 tool.jEMRoIContainerWriteKey =
""
106 tool.jTERoIContainerWriteKey =
""
107 tool.jXERoIContainerWriteKey =
""
110 tool.jJRoIContainerReadKey =
""
111 tool.jLJRoIContainerReadKey =
""
112 tool.jTauRoIContainerReadKey =
""
113 tool.jEMRoIContainerReadKey =
""
114 tool.jTERoIContainerReadKey =
""
115 tool.jXERoIContainerReadKey =
""
117 tool.jJRoIContainerWriteKey =
"L1_jFexSRJetxRoI" if xTOBs
else "L1_jFexSRJetRoI"
118 tool.jLJRoIContainerWriteKey =
"L1_jFexLRJetxRoI" if xTOBs
else "L1_jFexLRJetRoI"
119 tool.jTauRoIContainerWriteKey=
"L1_jFexTauxRoI" if xTOBs
else "L1_jFexTauRoI"
120 tool.jEMRoIContainerWriteKey =
"L1_jFexFwdElxRoI" if xTOBs
else "L1_jFexFwdElRoI"
121 tool.jTERoIContainerWriteKey =
"L1_jFexSumETxRoI" if xTOBs
else "L1_jFexSumETRoI"
122 tool.jXERoIContainerWriteKey =
"L1_jFexMETxRoI" if xTOBs
else "L1_jFexMETRoI"
124 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
125 if flags.Trigger.doHLT:
126 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
131 from AthenaMonitoring
import AthMonitorCfgHelper
132 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
133 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
135 acc.merge(helper.result())
137 monTool.defineHistogram(
'jfexDecoderErrorTitle,jfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
138 title=
'jFEX TOB Decoder Errors;Type;Location',
141 opt=[
'kCanRebin'],merge=
"merge")
142 tool.MonTool = monTool
144 acc.setPrivateTools(tool)
149 acc = ComponentAccumulator()
150 tool = CompFactory.gFexByteStreamTool(name)
151 gfex_roi_moduleids = [0x3000]
152 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid))
for moduleid
in gfex_roi_moduleids]
155 tool.gFexRhoOutputContainerReadKey =
"L1_gFexRhoRoI"
156 tool.gFexSRJetOutputContainerReadKey =
"L1_gFexSRJetRoI"
157 tool.gFexLRJetOutputContainerReadKey =
"L1_gFexLRJetRoI"
158 tool.gScalarEJwojOutputContainerReadKey =
"L1_gScalarEJwoj"
159 tool.gEspressoOutputContainerReadKey =
"L1_gEspresso"
160 tool.gRistrettoOutputContainerReadKey =
"L1_gRistretto"
161 tool.gMETComponentsJwojOutputContainerReadKey =
"L1_gMETComponentsJwoj"
162 tool.gMHTComponentsJwojOutputContainerReadKey =
"L1_gMHTComponentsJwoj"
163 tool.gMSTComponentsJwojOutputContainerReadKey =
"L1_gMSTComponentsJwoj"
164 tool.gMETComponentsNoiseCutOutputContainerReadKey =
"L1_gMETComponentsNoiseCut"
165 tool.gMETComponentsRmsOutputContainerReadKey =
"L1_gMETComponentsRms"
166 tool.gScalarENoiseCutOutputContainerReadKey =
"L1_gScalarENoiseCut"
167 tool.gScalarERmsOutputContainerReadKey =
"L1_gScalarERms"
170 tool.gFexRhoOutputContainerWriteKey =
""
171 tool.gFexSRJetOutputContainerWriteKey =
""
172 tool.gFexLRJetOutputContainerWriteKey =
""
173 tool.gScalarEJwojOutputContainerWriteKey =
""
174 tool.gEspressoOutputContainerWriteKey =
""
175 tool.gRistrettoOutputContainerWriteKey =
""
176 tool.gMETComponentsJwojOutputContainerWriteKey =
""
177 tool.gMHTComponentsJwojOutputContainerWriteKey =
""
178 tool.gMSTComponentsJwojOutputContainerWriteKey =
""
179 tool.gMETComponentsNoiseCutOutputContainerWriteKey =
""
180 tool.gMETComponentsRmsOutputContainerWriteKey =
""
181 tool.gScalarENoiseCutOutputContainerWriteKey =
""
182 tool.gScalarERmsOutputContainerWriteKey =
""
185 tool.gFexRhoOutputContainerReadKey =
""
186 tool.gFexSRJetOutputContainerReadKey =
""
187 tool.gFexLRJetOutputContainerReadKey =
""
188 tool.gScalarEJwojOutputContainerReadKey =
""
189 tool.gEspressoOutputContainerReadKey =
""
190 tool.gRistrettoOutputContainerReadKey =
""
191 tool.gMETComponentsJwojOutputContainerReadKey =
""
192 tool.gMHTComponentsJwojOutputContainerReadKey =
""
193 tool.gMSTComponentsJwojOutputContainerReadKey =
""
194 tool.gMETComponentsNoiseCutOutputContainerReadKey =
""
195 tool.gMETComponentsRmsOutputContainerReadKey =
""
196 tool.gScalarENoiseCutOutputContainerReadKey =
""
197 tool.gScalarERmsOutputContainerReadKey =
""
202 tool.gFexRhoOutputContainerWriteKey =
"L1_gFexRhoRoI" if TOBs
else ""
203 tool.gFexSRJetOutputContainerWriteKey =
"L1_gFexSRJetRoI" if TOBs
else ""
204 tool.gFexLRJetOutputContainerWriteKey =
"L1_gFexLRJetRoI" if TOBs
else ""
205 tool.gScalarEJwojOutputContainerWriteKey =
"L1_gScalarEJwoj" if TOBs
else ""
206 tool.gEspressoOutputContainerWriteKey =
"L1_gEspresso"
207 tool.gRistrettoOutputContainerWriteKey =
"L1_gRistretto"
208 tool.gMETComponentsJwojOutputContainerWriteKey =
"L1_gMETComponentsJwoj" if TOBs
else ""
209 tool.gMHTComponentsJwojOutputContainerWriteKey =
"L1_gMHTComponentsJwoj" if TOBs
else ""
210 tool.gMSTComponentsJwojOutputContainerWriteKey =
"L1_gMSTComponentsJwoj" if TOBs
else ""
211 tool.gMETComponentsNoiseCutOutputContainerWriteKey =
"L1_gMETComponentsNoiseCut" if TOBs
else ""
212 tool.gMETComponentsRmsOutputContainerWriteKey =
"L1_gMETComponentsRms" if TOBs
else ""
213 tool.gScalarENoiseCutOutputContainerWriteKey =
"L1_gScalarENoiseCut" if TOBs
else ""
214 tool.gScalarERmsOutputContainerWriteKey =
"L1_gScalarERms" if TOBs
else ""
219 tool.gFexRhoSliceContainerWriteKey =
"L1_gFexRhoRoIOutOfTime"
220 tool.gFexSRJetSliceContainerWriteKey =
"L1_gFexSRJetRoIOutOfTime"
221 tool.gFexLRJetSliceContainerWriteKey =
"L1_gFexLRJetRoIOutOfTime"
223 tool.gScalarEJwojSliceContainerWriteKey =
"L1_gScalarEJwojOutOfTime"
224 tool.gMETComponentsJwojSliceContainerWriteKey =
"L1_gMETComponentsJwojOutOfTime"
225 tool.gMHTComponentsJwojSliceContainerWriteKey =
"L1_gMHTComponentsJwojOutOfTime"
226 tool.gMSTComponentsJwojSliceContainerWriteKey =
"L1_gMSTComponentsJwojOutOfTime"
228 tool.gEspressoSliceContainerWriteKey =
"L1_gEspressoOutOfTime"
230 tool.gRistrettoSliceContainerWriteKey =
"L1_gRistrettoOutOfTime"
232 tool.gMETComponentsNoiseCutSliceContainerWriteKey=
"L1_gMETComponentsNoiseCutOutOfTime"
233 tool.gScalarENoiseCutSliceContainerWriteKey =
"L1_gScalarENoiseCutOutOfTime"
235 tool.gMETComponentsRmsSliceContainerWriteKey =
"L1_gMETComponentsRmsOutOfTime"
236 tool.gScalarERmsSliceContainerWriteKey =
"L1_gScalarERmsOutOfTime"
241 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
242 if flags.Trigger.doHLT:
243 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
248 from AthenaMonitoring
import AthMonitorCfgHelper
249 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
250 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
252 acc.merge(helper.result())
254 monTool.defineHistogram(
'gfexDecoderErrorTitle,gfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
255 title=
'gFEX TOB Decoder Errors;Type;Location',
258 opt=[
'kCanRebin'],merge=
"merge")
259 tool.MonTool = monTool
262 acc.setPrivateTools(tool)
267 acc = ComponentAccumulator()
268 tool = CompFactory.jFexInputByteStreamTool(name)
269 jfex_roi_moduleids = [0x2000,0x2010,0x2020,0x2030,0x2040,0x2050]
270 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, moduleid))
for moduleid
in jfex_roi_moduleids]
275 tool.jTowersReadKey =
"L1_jFexDataTowers"
277 tool.jTowersWriteKey =
""
280 tool.jTowersReadKey =
""
282 tool.jTowersWriteKey =
"L1_jFexDataTowers"
284 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
285 if flags.Trigger.doHLT:
286 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
291 from AthenaMonitoring
import AthMonitorCfgHelper
292 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
293 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
295 acc.merge(helper.result())
297 monTool.defineHistogram(
'jfexDecoderErrorTitle,jfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
298 title=
'jFEX InputData Decoder Errors;Type;Location',
301 opt=[
'kCanRebin'],merge=
"merge")
302 tool.MonTool = monTool
305 acc.setPrivateTools(tool)