148def gFexByteStreamToolCfg(flags, name, *, writeBS=False, multiSlice=False):
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.gMETComponentsJwojOutputContainerReadKey ="L1_gMETComponentsJwoj"
161 tool.gMHTComponentsJwojOutputContainerReadKey ="L1_gMHTComponentsJwoj"
162 tool.gMSTComponentsJwojOutputContainerReadKey ="L1_gMSTComponentsJwoj"
163 tool.gMETComponentsNoiseCutOutputContainerReadKey ="L1_gMETComponentsNoiseCut"
164 tool.gMETComponentsRmsOutputContainerReadKey ="L1_gMETComponentsRms"
165 tool.gScalarENoiseCutOutputContainerReadKey ="L1_gScalarENoiseCut"
166 tool.gScalarERmsOutputContainerReadKey ="L1_gScalarERms"
167
168
169 tool.gFexRhoOutputContainerWriteKey =""
170 tool.gFexSRJetOutputContainerWriteKey =""
171 tool.gFexLRJetOutputContainerWriteKey =""
172 tool.gScalarEJwojOutputContainerWriteKey =""
173 tool.gEspressoOutputContainerWriteKey =""
174 tool.gMETComponentsJwojOutputContainerWriteKey =""
175 tool.gMHTComponentsJwojOutputContainerWriteKey =""
176 tool.gMSTComponentsJwojOutputContainerWriteKey =""
177 tool.gMETComponentsNoiseCutOutputContainerWriteKey =""
178 tool.gMETComponentsRmsOutputContainerWriteKey =""
179 tool.gScalarENoiseCutOutputContainerWriteKey =""
180 tool.gScalarERmsOutputContainerWriteKey =""
181 else:
182
183 tool.gFexRhoOutputContainerReadKey =""
184 tool.gFexSRJetOutputContainerReadKey =""
185 tool.gFexLRJetOutputContainerReadKey =""
186 tool.gScalarEJwojOutputContainerReadKey =""
187 tool.gEspressoOutputContainerReadKey =""
188 tool.gMETComponentsJwojOutputContainerReadKey =""
189 tool.gMHTComponentsJwojOutputContainerReadKey =""
190 tool.gMSTComponentsJwojOutputContainerReadKey =""
191 tool.gMETComponentsNoiseCutOutputContainerReadKey =""
192 tool.gMETComponentsRmsOutputContainerReadKey =""
193 tool.gScalarENoiseCutOutputContainerReadKey =""
194 tool.gScalarERmsOutputContainerReadKey =""
195
196
197 tool.gFexRhoOutputContainerWriteKey ="L1_gFexRhoRoI"
198 tool.gFexSRJetOutputContainerWriteKey ="L1_gFexSRJetRoI"
199 tool.gFexLRJetOutputContainerWriteKey ="L1_gFexLRJetRoI"
200 tool.gScalarEJwojOutputContainerWriteKey ="L1_gScalarEJwoj"
201 tool.gEspressoOutputContainerWriteKey ="L1_gEspresso"
202 tool.gMETComponentsJwojOutputContainerWriteKey ="L1_gMETComponentsJwoj"
203 tool.gMHTComponentsJwojOutputContainerWriteKey ="L1_gMHTComponentsJwoj"
204 tool.gMSTComponentsJwojOutputContainerWriteKey ="L1_gMSTComponentsJwoj"
205 tool.gMETComponentsNoiseCutOutputContainerWriteKey ="L1_gMETComponentsNoiseCut"
206 tool.gMETComponentsRmsOutputContainerWriteKey ="L1_gMETComponentsRms"
207 tool.gScalarENoiseCutOutputContainerWriteKey ="L1_gScalarENoiseCut"
208 tool.gScalarERmsOutputContainerWriteKey ="L1_gScalarERms"
209
210
211 if multiSlice:
212
213 tool.gFexRhoSliceContainerWriteKey ="L1_gFexRhoRoIOutOfTime"
214 tool.gFexSRJetSliceContainerWriteKey ="L1_gFexSRJetRoIOutOfTime"
215 tool.gFexLRJetSliceContainerWriteKey ="L1_gFexLRJetRoIOutOfTime"
216
217 tool.gScalarEJwojSliceContainerWriteKey ="L1_gScalarEJwojOutOfTime"
218 tool.gMETComponentsJwojSliceContainerWriteKey ="L1_gMETComponentsJwojOutOfTime"
219 tool.gMHTComponentsJwojSliceContainerWriteKey ="L1_gMHTComponentsJwojOutOfTime"
220 tool.gMSTComponentsJwojSliceContainerWriteKey ="L1_gMSTComponentsJwojOutOfTime"
221
222 tool.gEspressoSliceContainerWriteKey ="L1_gEspressoOutOfTime"
223
224 tool.gMETComponentsNoiseCutSliceContainerWriteKey="L1_gMETComponentsNoiseCutOutOfTime"
225 tool.gScalarENoiseCutSliceContainerWriteKey ="L1_gScalarENoiseCutOutOfTime"
226
227 tool.gMETComponentsRmsSliceContainerWriteKey ="L1_gMETComponentsRmsOutOfTime"
228 tool.gScalarERmsSliceContainerWriteKey ="L1_gScalarERmsOutOfTime"
229
230
231
232
233 if flags.Output.HISTFileName != '' or flags.Trigger.doHLT:
234 if flags.Trigger.doHLT:
235 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
237 topDir = "EXPERT"
238 else:
239
240 from AthenaMonitoring import AthMonitorCfgHelper
241 helper = AthMonitorCfgHelper(flags, 'HLTFramework')
242 monTool = helper.addGroup(None, f'{name}MonTool', f'/HLT/HLTFramework/L1BSConverters/{name}')
243 topDir = None
244 acc.merge(helper.result())
245
246 monTool.defineHistogram('gfexDecoderErrorTitle,gfexDecoderErrorLocation;errors', path=topDir, type='TH2I',
247 title='gFEX TOB Decoder Errors;Type;Location',
248 xlabels=["UNKNOWN"],
249 ylabels=["UNKNOWN"],
250 opt=['kCanRebin'],merge="merge")
251 tool.MonTool = monTool
252
253
254 acc.setPrivateTools(tool)
255 return acc
256
257