153def gFexByteStreamToolCfg(flags, name, *, writeBS=False, multiSlice=False):
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]
158 if writeBS:
159
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"
172
173
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 =""
186 else:
187
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 =""
200
201
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"
214
215
216 if multiSlice:
217
218 tool.gFexRhoSliceContainerWriteKey ="L1_gFexRhoRoIOutOfTime"
219 tool.gFexSRJetSliceContainerWriteKey ="L1_gFexSRJetRoIOutOfTime"
220 tool.gFexLRJetSliceContainerWriteKey ="L1_gFexLRJetRoIOutOfTime"
221
222 tool.gScalarEJwojSliceContainerWriteKey ="L1_gScalarEJwojOutOfTime"
223 tool.gMETComponentsJwojSliceContainerWriteKey ="L1_gMETComponentsJwojOutOfTime"
224 tool.gMHTComponentsJwojSliceContainerWriteKey ="L1_gMHTComponentsJwojOutOfTime"
225 tool.gMSTComponentsJwojSliceContainerWriteKey ="L1_gMSTComponentsJwojOutOfTime"
226
227 tool.gEspressoSliceContainerWriteKey ="L1_gEspressoOutOfTime"
228
229 tool.gMETComponentsNoiseCutSliceContainerWriteKey="L1_gMETComponentsNoiseCutOutOfTime"
230 tool.gScalarENoiseCutSliceContainerWriteKey ="L1_gScalarENoiseCutOutOfTime"
231
232 tool.gMETComponentsRmsSliceContainerWriteKey ="L1_gMETComponentsRmsOutOfTime"
233 tool.gScalarERmsSliceContainerWriteKey ="L1_gScalarERmsOutOfTime"
234
235
236
237
238 if flags.Output.HISTFileName != '' or flags.Trigger.doHLT:
239 if flags.Trigger.doHLT:
240 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
242 topDir = "EXPERT"
243 else:
244
245 from AthenaMonitoring import AthMonitorCfgHelper
246 helper = AthMonitorCfgHelper(flags, 'HLTFramework')
247 monTool = helper.addGroup(None, f'{name}MonTool', f'/HLT/HLTFramework/L1BSConverters/{name}')
248 topDir = None
249 acc.merge(helper.result())
250
251 monTool.defineHistogram('gfexDecoderErrorTitle,gfexDecoderErrorLocation;errors', path=topDir, type='TH2I',
252 title='gFEX TOB Decoder Errors;Type;Location',
253 xlabels=["UNKNOWN"],
254 ylabels=["UNKNOWN"],
255 opt=['kCanRebin'],merge="merge")
256 tool.MonTool = monTool
257
258
259 acc.setPrivateTools(tool)
260 return acc
261
262