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]
97 tool.jJRoIContainerWriteKey =
""
98 tool.jLJRoIContainerWriteKey =
""
99 tool.jTauRoIContainerWriteKey=
""
100 tool.jEMRoIContainerWriteKey =
""
101 tool.jTERoIContainerWriteKey =
""
102 tool.jXERoIContainerWriteKey =
""
105 tool.jJRoIContainerWriteKey =
"L1_jFexSRJetxRoI" if xTOBs
else "L1_jFexSRJetRoI"
106 tool.jLJRoIContainerWriteKey =
"L1_jFexLRJetxRoI" if xTOBs
else "L1_jFexLRJetRoI"
107 tool.jTauRoIContainerWriteKey=
"L1_jFexTauxRoI" if xTOBs
else "L1_jFexTauRoI"
108 tool.jEMRoIContainerWriteKey =
"L1_jFexFwdElxRoI" if xTOBs
else "L1_jFexFwdElRoI"
109 tool.jTERoIContainerWriteKey =
"L1_jFexSumETxRoI" if xTOBs
else "L1_jFexSumETRoI"
110 tool.jXERoIContainerWriteKey =
"L1_jFexMETxRoI" if xTOBs
else "L1_jFexMETRoI"
112 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
113 if flags.Trigger.doHLT:
114 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
119 from AthenaMonitoring
import AthMonitorCfgHelper
120 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
121 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
123 acc.merge(helper.result())
125 monTool.defineHistogram(
'jfexDecoderErrorTitle,jfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
126 title=
'jFEX TOB Decoder Errors;Type;Location',
129 opt=[
'kCanRebin'],merge=
"merge")
130 tool.MonTool = monTool
132 acc.setPrivateTools(tool)
137 acc = ComponentAccumulator()
138 tool = CompFactory.gFexByteStreamTool(name)
139 gfex_roi_moduleids = [0x3000]
140 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_ROI, moduleid))
for moduleid
in gfex_roi_moduleids]
145 tool.gFexRhoOutputContainerWriteKey =
""
146 tool.gFexSRJetOutputContainerWriteKey =
""
147 tool.gFexLRJetOutputContainerWriteKey =
""
148 tool.gScalarEJwojOutputContainerWriteKey =
""
149 tool.gEspressoOutputContainerWriteKey =
""
150 tool.gRistrettoOutputContainerWriteKey =
""
151 tool.gMETComponentsJwojOutputContainerWriteKey =
""
152 tool.gMHTComponentsJwojOutputContainerWriteKey =
""
153 tool.gMSTComponentsJwojOutputContainerWriteKey =
""
154 tool.gMETComponentsNoiseCutOutputContainerWriteKey =
""
155 tool.gMETComponentsRmsOutputContainerWriteKey =
""
156 tool.gScalarENoiseCutOutputContainerWriteKey =
""
157 tool.gScalarERmsOutputContainerWriteKey =
""
163 tool.gFexRhoOutputContainerWriteKey =
"L1_gFexRhoRoI" if TOBs
else ""
164 tool.gFexSRJetOutputContainerWriteKey =
"L1_gFexSRJetRoI" if TOBs
else ""
165 tool.gFexLRJetOutputContainerWriteKey =
"L1_gFexLRJetRoI" if TOBs
else ""
166 tool.gScalarEJwojOutputContainerWriteKey =
"L1_gScalarEJwoj" if TOBs
else ""
167 tool.gEspressoOutputContainerWriteKey =
"L1_gEspresso"
168 tool.gRistrettoOutputContainerWriteKey =
"L1_gRistretto"
169 tool.gMETComponentsJwojOutputContainerWriteKey =
"L1_gMETComponentsJwoj" if TOBs
else ""
170 tool.gMHTComponentsJwojOutputContainerWriteKey =
"L1_gMHTComponentsJwoj" if TOBs
else ""
171 tool.gMSTComponentsJwojOutputContainerWriteKey =
"L1_gMSTComponentsJwoj" if TOBs
else ""
172 tool.gMETComponentsNoiseCutOutputContainerWriteKey =
"L1_gMETComponentsNoiseCut" if TOBs
else ""
173 tool.gMETComponentsRmsOutputContainerWriteKey =
"L1_gMETComponentsRms" if TOBs
else ""
174 tool.gScalarENoiseCutOutputContainerWriteKey =
"L1_gScalarENoiseCut" if TOBs
else ""
175 tool.gScalarERmsOutputContainerWriteKey =
"L1_gScalarERms" if TOBs
else ""
180 tool.gFexRhoSliceContainerWriteKey =
"L1_gFexRhoRoIOutOfTime"
181 tool.gFexSRJetSliceContainerWriteKey =
"L1_gFexSRJetRoIOutOfTime"
182 tool.gFexLRJetSliceContainerWriteKey =
"L1_gFexLRJetRoIOutOfTime"
184 tool.gScalarEJwojSliceContainerWriteKey =
"L1_gScalarEJwojOutOfTime"
185 tool.gMETComponentsJwojSliceContainerWriteKey =
"L1_gMETComponentsJwojOutOfTime"
186 tool.gMHTComponentsJwojSliceContainerWriteKey =
"L1_gMHTComponentsJwojOutOfTime"
187 tool.gMSTComponentsJwojSliceContainerWriteKey =
"L1_gMSTComponentsJwojOutOfTime"
189 tool.gEspressoSliceContainerWriteKey =
"L1_gEspressoOutOfTime"
191 tool.gRistrettoSliceContainerWriteKey =
"L1_gRistrettoOutOfTime"
193 tool.gMETComponentsNoiseCutSliceContainerWriteKey=
"L1_gMETComponentsNoiseCutOutOfTime"
194 tool.gScalarENoiseCutSliceContainerWriteKey =
"L1_gScalarENoiseCutOutOfTime"
196 tool.gMETComponentsRmsSliceContainerWriteKey =
"L1_gMETComponentsRmsOutOfTime"
197 tool.gScalarERmsSliceContainerWriteKey =
"L1_gScalarERmsOutOfTime"
202 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
203 if flags.Trigger.doHLT:
204 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
209 from AthenaMonitoring
import AthMonitorCfgHelper
210 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
211 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
213 acc.merge(helper.result())
215 monTool.defineHistogram(
'gfexDecoderErrorTitle,gfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
216 title=
'gFEX TOB Decoder Errors;Type;Location',
219 opt=[
'kCanRebin'],merge=
"merge")
220 tool.MonTool = monTool
223 acc.setPrivateTools(tool)
228 acc = ComponentAccumulator()
229 tool = CompFactory.jFexInputByteStreamTool(name)
230 jfex_roi_moduleids = [0x2000,0x2010,0x2020,0x2030,0x2040,0x2050]
231 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, moduleid))
for moduleid
in jfex_roi_moduleids]
236 tool.jTowersReadKey =
"L1_jFexDataTowers"
238 tool.jTowersWriteKey =
""
241 tool.jTowersReadKey =
""
243 tool.jTowersWriteKey =
"L1_jFexDataTowers"
245 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
246 if flags.Trigger.doHLT:
247 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
252 from AthenaMonitoring
import AthMonitorCfgHelper
253 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
254 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
256 acc.merge(helper.result())
258 monTool.defineHistogram(
'jfexDecoderErrorTitle,jfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
259 title=
'jFEX InputData Decoder Errors;Type;Location',
262 opt=[
'kCanRebin'],merge=
"merge")
263 tool.MonTool = monTool
266 acc.setPrivateTools(tool)
271 acc = ComponentAccumulator()
272 tool = CompFactory.gFexInputByteStreamTool(name)
273 gfex_roi_moduleids = [0x3000]
274 tool.ROBIDs = [int(SourceIdentifier(SubDetector.TDAQ_CALO_FEAT_EXTRACT_DAQ, moduleid))
for moduleid
in gfex_roi_moduleids]
278 tool.gTowersReadKey =
"L1_gFexDataTowers"
280 tool.gTowersWriteKey =
""
283 tool.gTowersReadKey =
""
285 tool.gTowersWriteKey =
"L1_gFexDataTowers"
287 if flags.Output.HISTFileName !=
'' or flags.Trigger.doHLT:
288 if flags.Trigger.doHLT:
289 from AthenaMonitoringKernel.GenericMonitoringTool
import GenericMonitoringTool
294 from AthenaMonitoring
import AthMonitorCfgHelper
295 helper = AthMonitorCfgHelper(flags,
'HLTFramework')
296 monTool = helper.addGroup(
None, f
'{name}MonTool', f
'/HLT/HLTFramework/L1BSConverters/{name}')
298 acc.merge(helper.result())
300 monTool.defineHistogram(
'gfexDecoderErrorTitle,gfexDecoderErrorLocation;errors', path=topDir, type=
'TH2I',
301 title=
'gFEX InputData Decoder Errors;Type;Location',
304 opt=[
'kCanRebin'],merge=
"merge")
305 tool.MonTool = monTool
307 acc.setPrivateTools(tool)