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