ATLAS Offline Software
TriggerConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2 
3 import re
4 import GaudiConfig2
5 from collections import defaultdict
6 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
7 from AthenaConfiguration.ComponentFactory import CompFactory
8 from AthenaConfiguration.Enums import Format, MetadataCategory
9 from AthenaCommon.CFElements import seqAND, seqOR, parOR, flatAlgorithmSequences, getSequenceChildren, isSequence
10 from TriggerMenuMT.HLT.Config.ControlFlow.MenuComponentsNaming import CFNaming
11 from AthenaCommon.Logging import logging
12 
13 __log = logging.getLogger('TriggerConfig')
14 
15 
16 def __isCombo(alg):
17  return hasattr( alg, "MultiplicitiesMap" )
18 
19 def __stepNumber(stepName):
20  """extract step number frmo strings like Step2... -> 2"""
21  return int(stepName.split('_')[0].replace("Step",""))
22 
23 
24 def collectHypos( steps ):
25  """
26  Method iterating over the CF and picking all the Hypothesis algorithms
27 
28  Returned is a map with the step name and list of all instances of hypos in that step.
29  Input is top HLT sequencer.
30  """
31  __log.info("Collecting hypos from steps")
32  hypos = defaultdict( list )
33 
34  for stepSeq in steps.Members:
35  if not isSequence( stepSeq ):
36  continue
37 
38  if CFNaming.FILTER_POSTFIX in stepSeq.getName():
39  __log.debug("Skipping filtering steps %s", stepSeq.getName() )
40  continue
41 
42  __log.debug( "collecting hypos from step %s", stepSeq.getName() )
43  for seq,algs in flatAlgorithmSequences(stepSeq).items():
44  for alg in sorted(algs, key=lambda t: str(t.getName())):
45  if isSequence( alg ):
46  continue
47  # will replace by function once dependencies are sorted
48  if hasattr(alg, 'HypoInputDecisions'):
49  __log.debug("found hypo %s in %s", alg.getName(), stepSeq.getName())
50  if __isCombo( alg ) and len(alg.ComboHypoTools):
51  __log.debug( " with %d comboHypoTools: %s", len(alg.ComboHypoTools), ' '.join(map(str, [tool.getName() for tool in alg.ComboHypoTools])))
52  hypos[stepSeq.getName()].append( alg )
53  else:
54  __log.verbose("Not a hypo %s", alg.getName())
55 
56  return hypos
57 
58 def __decisionsFromHypo( hypo ):
59  """ return all chains served by this hypo and the keys of produced decision object """
60  from TrigCompositeUtils.TrigCompositeUtils import isLegId
61  __log.debug("Hypo type %s is combo %r", hypo.getName(), __isCombo(hypo))
62  if __isCombo(hypo):
63  return [key for key in list(hypo.MultiplicitiesMap.keys()) if not isLegId(key)], hypo.HypoOutputDecisions
64  else: # regular hypos
65  return [ t.getName() for t in hypo.HypoTools if not isLegId(t.getName())], [str(hypo.HypoOutputDecisions)]
66 
67 
68 def collectViewMakers( steps ):
69  """ collect all EventViewCreatorAlgorithm algorithms in the configuration """
70  makers = set() # map with name, instance and encompasing recoSequence
71  for stepSeq in getSequenceChildren( steps ):
72  for recoSeq in getSequenceChildren( stepSeq ):
73  if not isSequence( recoSeq ):
74  continue
75  algsInSeq = flatAlgorithmSequences( recoSeq )
76  for seq,algs in algsInSeq.items():
77  for alg in algs:
78  if "Views" in alg._properties:
79  makers.add(alg)
80  __log.debug("Found ViewMakers: %s", ' '.join([ maker.getName() for maker in makers ]))
81  return makers
82 
83 
84 
85 def collectFilters( steps ):
86  """
87  Similarly to collectHypos but works for filter algorithms
88 
89  The logic is simpler as all filters are grouped in step filter sequences
90  Returns map: step name -> list of all filters of that step
91  """
92  __log.info("Collecting filters")
93  filters = defaultdict( list )
94 
95  for stepSeq in steps.Members:
96  if CFNaming.FILTER_POSTFIX in stepSeq.getName():
97  filters[stepSeq.getName()] = stepSeq.Members
98  __log.debug("Found Filters in Step %s : %s", stepSeq.getName(), stepSeq.Members)
99 
100  return filters
101 
102 
104  decisionObjects = set()
105  decisionObjects.update([ str(d.Decisions) for d in hltSeeding.RoIBRoIUnpackers + hltSeeding.xAODRoIUnpackers ])
106  decisionObjects.update([ str(d.DecisionsProbe) for d in hltSeeding.RoIBRoIUnpackers + hltSeeding.xAODRoIUnpackers ])
107  from HLTSeeding.HLTSeedingConfig import mapThresholdToL1DecisionCollection
108  decisionObjects.add( mapThresholdToL1DecisionCollection("FSNOSEED") ) # Include also Full Scan
109  decisionObjects.discard('') # Unpackers which do not use the PROBE container have an empty string for their WriteHandleKey
110  decisionObjects.discard('StoreGateSvc+') # Unpackers which do not use the PROBE container have an empty string for their WriteHandleKey
111  __log.info("Collecting %i decision objects from HLTSeeding instance", len(decisionObjects))
112  return decisionObjects
113 
114 def collectHypoDecisionObjects(hypos, inputs = True, outputs = True):
115  decisionObjects = set()
116  for step, stepHypos in sorted(hypos.items()):
117  for hypoAlg in stepHypos:
118  __log.debug( "Hypo %s with input %s and output %s ",
119  hypoAlg.getName(), hypoAlg.HypoInputDecisions, hypoAlg.HypoOutputDecisions )
120  if isinstance( hypoAlg.HypoInputDecisions, GaudiConfig2.semantics._ListHelper):
121  if inputs:
122  [ decisionObjects.add( str(d) ) for d in hypoAlg.HypoInputDecisions ]
123  if outputs:
124  [ decisionObjects.add( str(d) ) for d in hypoAlg.HypoOutputDecisions ]
125  else:
126  if inputs:
127  decisionObjects.add( str(hypoAlg.HypoInputDecisions) )
128  if outputs:
129  decisionObjects.add( str(hypoAlg.HypoOutputDecisions) )
130  __log.info("Collecting %i decision objects from hypos", len(decisionObjects))
131  return sorted(decisionObjects)
132 
133 def collectFilterDecisionObjects(filters, inputs = True, outputs = True):
134  decisionObjects = set()
135  for step, stepFilters in filters.items():
136  for filt in stepFilters:
137  if inputs and hasattr( filt, "Input" ):
138  decisionObjects.update( str(i) for i in filt.Input )
139  if outputs and hasattr( filt, "Output" ):
140  decisionObjects.update( str(o) for o in filt.Output )
141  __log.info("Collecting %i decision objects from filters", len(decisionObjects))
142  return decisionObjects
143 
145  decisionObjects = set()
146  decisionObjects.add( str(hltSummary.DecisionsSummaryKey) )
147  __log.info("Collecting %i decision objects from hltSummary", len(decisionObjects))
148  return decisionObjects
149 
150 def collectDecisionObjects( hypos, filters, hltSeeding, hltSummary ):
151  """
152  Returns the set of all decision objects of HLT
153  """
154  decObjL1 = collectHLTSeedingDecisionObjects(hltSeeding)
155  decObjHypo = collectHypoDecisionObjects(hypos, inputs = True, outputs = True)
156  decObjFilter = collectFilterDecisionObjects(filters, inputs = True, outputs = True)
157  # InputMaker are not needed explicitly as the Filter Outputs = InputMaker Inputs
158  # and InputMaker Outputs = Hypo Inputs
159  # Therefore we implicitly collect all navigaiton I/O of all InputMakers
160  decObjSummary = collectHLTSummaryDecisionObjects(hltSummary)
161  decisionObjects = set()
162  decisionObjects.update(decObjL1)
163  decisionObjects.update(decObjHypo)
164  decisionObjects.update(decObjFilter)
165  decisionObjects.update(decObjSummary)
166  __log.info( "Number of decision objects found in HLT CF %d of which %d are the outputs of hypos",
167  len(decisionObjects), len(decObjHypo) )
168  __log.debug( decisionObjects )
169  return list(sorted(decisionObjects)), decObjHypo
170 
171 def triggerSummaryCfg(flags, hypos):
172  """
173  Configures an algorithm(s) that should be run after the selection process
174  Returns: ca, algorithm
175  """
176  acc = ComponentAccumulator()
177  from TrigOutputHandling.TrigOutputHandlingConfig import DecisionSummaryMakerAlgCfg
178  decisionSummaryAlg = DecisionSummaryMakerAlgCfg(flags)
179  chainToLastCollection = {} # keys are chain names, values are lists of collections
180 
181  # sort steps according to the step number i.e. strings Step1 Step2 ... Step10 Step11 rather than
182  # alphabetic order Step10 Step11 Step1 Step2
183  for stepName, stepHypos in sorted( hypos.items(), key=lambda x : __stepNumber(x[0]) ):
184  # While filling the chainToLastCollection dict we will replace the content intentionally
185  # i.e. the chain has typically multiple steps and we want the collections from the last one
186  # In a step the chain is handled by hypo or hypo followed by the combo,
187  # in second case we want out of the later.
188  # For that we process first ComboHypo and then regular Hypos
189  # (TODO, review this whn config is symmetrised by addition of ComboHypos always)
190  orderedStepHypos = sorted(stepHypos, key=lambda hypo: not __isCombo(hypo))
191 
192  chainToCollectionInStep = {}
193  for hypo in orderedStepHypos:
194  hypoChains, hypoOutputKeys = __decisionsFromHypo( hypo )
195  for chain in hypoChains:
196  if chain not in chainToCollectionInStep:
197  chainToCollectionInStep[chain] = hypoOutputKeys
198  chainToLastCollection.update( chainToCollectionInStep )
199 
200  from TriggerMenuMT.HLT.Config.Utility.HLTMenuConfig import HLTMenuConfig
201  from HLTSeeding.HLTSeedingConfig import mapThresholdToL1DecisionCollection
202  if len(HLTMenuConfig.dicts()) == 0:
203  __log.warning("No HLT menu, chains w/o algorithms are not handled")
204  else:
205  for chainName, chainDict in HLTMenuConfig.dicts().items():
206  if chainName not in chainToLastCollection:
207  __log.debug("The chain %s is not mentioned in any step", chainName)
208  # TODO once sequences available in the menu we need to crosscheck it here
209  assert len(chainDict['chainParts']) == 1, "Chains w/o the steps can not have multiple parts in chainDict, it makes no sense: %s"%chainName
210  chainToLastCollection[chainName] = [ mapThresholdToL1DecisionCollection( chainDict['chainParts'][0]['L1threshold'] ) ]
211 
212  for c, cont in chainToLastCollection.items():
213  __log.debug("Final decision of chain %s will be read from %d %s", c, len(cont), str(cont))
214  # Flatten all the collections preserving the order
215  collectionsWithFinalDecisions = []
216  for chain, collections in chainToLastCollection.items():
217  for c in collections:
218  if c not in collectionsWithFinalDecisions:
219  collectionsWithFinalDecisions.append(c)
220  __log.debug("Final keys %s", collectionsWithFinalDecisions)
221  decisionSummaryAlg.FinalDecisionKeys = collectionsWithFinalDecisions
222  decisionSummaryAlg.FinalStepDecisions = dict(chainToLastCollection)
223  decisionSummaryAlg.DecisionsSummaryKey = "HLTNav_Summary" # Output
224  decisionSummaryAlg.SetFilterStatus = flags.Trigger.writeBS
225  return acc, decisionSummaryAlg
226 
227 
228 def triggerMonitoringCfg(flags, hypos, filters, hltSeeding):
229  """
230  Configures components needed for monitoring chains
231  """
232  acc = ComponentAccumulator()
233  TrigSignatureMoni, DecisionCollectorTool=CompFactory.getComps("TrigSignatureMoni","DecisionCollectorTool",)
234  mon = TrigSignatureMoni()
235  mon.L1Decisions = "HLTSeedingSummary"
236  mon.FinalDecisionKey = "HLTNav_Summary" # Input
237  if len(hypos) == 0:
238  __log.warning("Menu is not configured")
239  return acc, mon
240 
241  # lambda sort because we have strings Step1 Step2 ... Step10 Step11 and python sorts that
242  # to Step10 Step11 Step1 Step2
243  stepCounter = 1
244  for stepName, stepHypos in sorted( hypos.items(), key=lambda x : __stepNumber(x[0])):
245  assert __stepNumber(stepName) == stepCounter, "There are steps that have no hypos, decisions counting is not going to work"
246  stepCounter += 1
247  stepDecisionKeys = []
248  stepFeatureDecisionKeys = []
249  for hypo in stepHypos:
250  hypoChains, hypoOutputKeys = __decisionsFromHypo( hypo )
251  if __isCombo(hypo):
252  stepDecisionKeys.extend( hypoOutputKeys )
253  else:
254  stepFeatureDecisionKeys.extend( hypoOutputKeys )
255 
256  dcEventTool = DecisionCollectorTool( "EventDecisionCollector" + stepName, Decisions=list(dict.fromkeys(stepDecisionKeys)))
257  dcFeatureTool = DecisionCollectorTool( "FeatureDecisionCollector" + stepName, Decisions=list(dict.fromkeys(stepFeatureDecisionKeys)))
258  __log.debug( "The step monitoring decisions in %s %s", dcEventTool.getName(), dcEventTool.Decisions)
259  __log.debug( "The step monitoring decisions in %s %s", dcFeatureTool.getName(), dcFeatureTool.Decisions)
260  mon.DecisionCollectorTools += [ dcEventTool ]
261  mon.FeatureCollectorTools += [ dcFeatureTool ]
262 
263  # Configure additional chain error monitoring for athenaHLT/online:
264  if flags.Trigger.Online.isPartition:
265  from TrigServices.TrigServicesConfig import TrigServicesCfg
266  onlineServicesAcc = TrigServicesCfg(flags)
267  hltEventLoopMgr = onlineServicesAcc.getPrimary()
268 
269  hltEventLoopMgr.TrigErrorMonTool.AlgToChainTool = CompFactory.TrigCompositeUtils.AlgToChainTool()
270  hltEventLoopMgr.TrigErrorMonTool.MonTool.defineHistogram(
271  'ErrorChainName,ErrorCode', path='EXPERT', type='TH2I',
272  title='Error StatusCodes per chain;Chain name;StatusCode',
273  xbins=1, xmin=0, xmax=1, ybins=1, ymin=0, ymax=1)
274 
275  acc.merge(onlineServicesAcc)
276 
277  mon.L1Decisions = hltSeeding.HLTSeedingSummaryKey
278 
279  if flags.Trigger.doValidationMonitoring:
280  from DecisionHandling.DecisionHandlingConfig import setupFilterMonitoring
281  for algs in filters.values():
282  for alg in algs:
283  setupFilterMonitoring( flags, alg )
284 
285  return acc, mon
286 
287 
288 
289 def triggerOutputCfg(flags, hypos):
290  # Following cases are considered:
291  # 1) Running in partition or athenaHLT - configure BS output written by the HLT framework
292  # 2) Running offline athena and writing BS - configure BS output written by OutputStream alg
293  # 3) Running offline athena with POOL output - configure POOL output written by OutputStream alg
294  onlineWriteBS = False
295  offlineWriteBS = False
296  writePOOL = False
297 
298  if flags.Trigger.writeBS:
299  if flags.Trigger.Online.isPartition:
300  onlineWriteBS = True
301  else:
302  offlineWriteBS = True
303  if flags.Output.doWriteRDO or flags.Output.doWriteESD or flags.Output.doWriteAOD:
304  writePOOL = True
305 
306  # Consistency checks
307  if offlineWriteBS and not flags.Output.doWriteBS:
308  __log.error('flags.Trigger.writeBS is True but flags.Output.doWriteBS is False')
309  return None, ''
310  if writePOOL and onlineWriteBS:
311  __log.error("POOL HLT output writing is configured online")
312  return None, ''
313  if writePOOL and offlineWriteBS:
314  __log.error("Writing HLT output to both BS and POOL in one job is not supported at the moment")
315  return None, ''
316 
317  # Determine EDM set name
318  edmSet = ''
319  if writePOOL:
320  edmSet = flags.Trigger.AODEDMSet if flags.Output.doWriteAOD else flags.Trigger.ESDEDMSet
321  elif onlineWriteBS or offlineWriteBS:
322  edmSet = 'BS'
323 
324  # Create the configuration
325  if onlineWriteBS:
326  __log.info("Configuring online ByteStream HLT output")
327  acc = triggerBSOutputCfg(flags, hypos)
328  elif offlineWriteBS:
329  __log.info("Configuring offline ByteStream HLT output")
330  acc = triggerBSOutputCfg(flags, hypos, offline=True)
331  elif writePOOL:
332  __log.info("Configuring POOL HLT output")
333  acc = triggerPOOLOutputCfg(flags)
334  else:
335  __log.info("No HLT output writing is configured")
336  acc = ComponentAccumulator()
337 
338  return acc, edmSet
339 
340 
341 def triggerBSOutputCfg(flags, hypos, offline=False):
342  """
343  Returns CA with algorithms and/or tools required to do the serialisation
344 
345  decObj - list of all navigation objects
346  decObjHypoOut - list of decisions produced by hypos
347  hypos - the {stepName: hypoList} dictionary with all hypo algorithms - used to find the PEB decision keys
348  offline - if true CA contains algorithms that need to be merged to output stream sequence,
349  if false the CA contains a tool that needs to be added to HltEventLoopMgr
350  """
351  from TrigEDMConfig import DataScoutingInfo
352  from TrigEDMConfig.TriggerEDM import getRun3BSList
353  from TrigEDMConfig.TriggerEDMDefs import allowTruncation
354  from TrigOutputHandling.TrigOutputHandlingConfig import TriggerEDMSerialiserToolCfg, StreamTagMakerToolCfg, TriggerBitsMakerToolCfg
355 
356  # Get list of all output collections for ByteStream (including DataScouting)
357  collectionsToBS = getRun3BSList(flags, ["BS"] + DataScoutingInfo.getAllDataScoutingIdentifiers())
358 
359  # Tool serialising EDM objects to fill the HLT result
360  serialiser = TriggerEDMSerialiserToolCfg(flags)
361 
362  for typekey, bsfragments, props in collectionsToBS:
363  # Translate fragment names like BS, CostMonDS to ROB fragment IDs 0 (full result), 1, ... (DS results)
364  moduleIDs = sorted(DataScoutingInfo.getFullHLTResultID() if f == 'BS' else
365  DataScoutingInfo.getDataScoutingResultID(f)
366  for f in bsfragments)
367 
368  __log.debug('adding to serialiser list: %s, modules: %s', typekey, moduleIDs)
369  serialiser.addCollection(typekey, moduleIDs, allowTruncation = allowTruncation in props)
370 
371  # Tools adding stream tags and trigger bits to HLT result
372  stmaker = StreamTagMakerToolCfg()
373  bitsmaker = TriggerBitsMakerToolCfg()
374 
375  # Map hypo decisions producing PEBInfo to StreamTagMakerTool.PEBDecisionKeys
376  PEBKeys = []
377  for hypoList in hypos.values():
378  for hypo in hypoList:
379  if hypo.getFullJobOptName().startswith('PEBInfoWriterAlg/'):
380  PEBKeys.append(str(hypo.HypoOutputDecisions))
381 
382  PEBKeys = sorted(set(PEBKeys))
383  __log.debug('Setting StreamTagMakerTool.PEBDecisionKeys = %s', PEBKeys)
384  stmaker.PEBDecisionKeys = PEBKeys
385 
386  acc = ComponentAccumulator()
387 
388  if offline:
389  # Create HLT result maker and alg
390  from TrigOutputHandling.TrigOutputHandlingConfig import HLTResultMTMakerCfg
391  HLTResultMTMakerAlg=CompFactory.HLTResultMTMakerAlg
392  hltResultMakerTool = HLTResultMTMakerCfg(flags)
393  hltResultMakerTool.StreamTagMaker = stmaker
394  hltResultMakerTool.MakerTools = [bitsmaker, serialiser]
395  hltResultMakerAlg = HLTResultMTMakerAlg()
396  hltResultMakerAlg.ResultMaker = hltResultMakerTool
397 
398  # Provide ByteStreamMetaData from input, required by the result maker tool
399  if flags.Input.Format is Format.BS:
400  from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
401  readBSAcc = ByteStreamReadCfg(flags)
402  readBSAcc.getEventAlgo('SGInputLoader').Load.add(
403  ('ByteStreamMetadataContainer', 'InputMetaDataStore+ByteStreamMetadata'))
404  acc.merge(readBSAcc)
405  else:
406  # No BS metadata (thus no DetectorMask) in POOL files, need to disable the checks using it
407  hltResultMakerAlg.ResultMaker.ExtraROBs = []
408  hltResultMakerAlg.ResultMaker.ExtraSubDets = []
409 
410  # Transfer trigger bits to xTrigDecision which is read by offline BS writing ByteStreamCnvSvc
411  decmaker = CompFactory.getComp("TrigDec::TrigDecisionMakerMT")("TrigDecMakerMT")
412 
413  # Schedule the insertion of L1 prescales into the conditions store
414  # Required for writing L1 trigger bits to xTrigDecision
415  from TrigConfigSvc.TrigConfigSvcCfg import L1PrescaleCondAlgCfg
416  acc.merge(L1PrescaleCondAlgCfg(flags))
417 
418  # Create OutputStream alg
419  from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamWriteCfg
420  writingOutputs = ["HLT::HLTResultMT#HLTResultMT"]
421  writingInputs = [("HLT::HLTResultMT", "HLTResultMT"),
422  ("xAOD::TrigDecision", "xTrigDecision")]
423 
424  # Rewrite LVL1 result if LVL1 simulation is enabled
425  if flags.Trigger.doLVL1:
426  if flags.Trigger.enableL1MuonPhase1 or flags.Trigger.enableL1CaloPhase1:
427  writingOutputs += ['xAOD::TrigCompositeContainer#L1TriggerResult']
428  writingInputs += [('xAOD::TrigCompositeContainer', 'StoreGateSvc+L1TriggerResult')]
429  if flags.Trigger.enableL1CaloLegacy or not flags.Trigger.enableL1MuonPhase1:
430  writingOutputs += ['ROIB::RoIBResult#RoIBResult']
431  writingInputs += [('ROIB::RoIBResult', 'StoreGateSvc+RoIBResult')]
432  if flags.Trigger.CTP.UseEDMxAOD:
433  writingOutputs += ['xAOD::CTPResult#CTPResult']
434  writingInputs += [('xAOD::CTPResult', 'StoreGateSvc+CTPResult')]
435 
436  from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamEncoderCfg
437  acc.merge(L1TriggerByteStreamEncoderCfg(flags))
438 
439  writingAcc = ByteStreamWriteCfg(flags, type_names=writingOutputs, extra_inputs=writingInputs)
440  writingAcc.addEventAlgo(hltResultMakerAlg)
441  writingAcc.addEventAlgo(decmaker)
442  acc.merge(writingAcc)
443 
444  else:
445  from TrigServices.TrigServicesConfig import TrigServicesCfg
446  onlineServicesAcc = TrigServicesCfg(flags)
447  hltEventLoopMgr = onlineServicesAcc.getPrimary()
448  hltEventLoopMgr.ResultMaker.StreamTagMaker = stmaker
449  hltEventLoopMgr.ResultMaker.MakerTools = [serialiser, bitsmaker]
450  onlineServicesAcc.getEventAlgo('SGInputLoader').Load.add(
451  ('ByteStreamMetadataContainer', 'InputMetaDataStore+ByteStreamMetadata'))
452  acc.merge(onlineServicesAcc)
453  return acc
454 
455 
457  # Get the list of output collections from TriggerEDM
458  acc = ComponentAccumulator()
459 
460  from TrigEDMConfig.TriggerEDM import getTriggerEDMList
461 
462  # Produce trigger bits
463  bitsmaker = CompFactory.TriggerBitsMakerTool()
464  decmaker = CompFactory.TrigDec.TrigDecisionMakerMT("TrigDecMakerMT", BitsMakerTool = bitsmaker, UseEDMxAOD=flags.Trigger.CTP.UseEDMxAOD)
465  acc.addEventAlgo( decmaker )
466 
467  # Export trigger metadata during the trigger execution when running with POOL output.
468  from .TriggerRecoConfig import TriggerMetadataWriterCfg
469  metadataAcc, metadataOutputs = TriggerMetadataWriterCfg(flags)
470  acc.merge( metadataAcc )
471 
472  # Produce xAOD L1 RoIs from RoIBResult
473  from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import RoIBResultToxAODCfg
474  xRoIBResultAcc, xRoIBResultOutputs = RoIBResultToxAODCfg(flags)
475  acc.merge(xRoIBResultAcc)
476  # Ensure outputs are produced before streamAlg runs
477 
478 
479  # Create OutputStream
480  for doit, outputType, edmSet in [( flags.Output.doWriteRDO, 'RDO', flags.Trigger.ESDEDMSet), # not a mistake, RDO content is meant to be as ESD
481  ( flags.Output.doWriteESD, 'ESD', flags.Trigger.ESDEDMSet),
482  ( flags.Output.doWriteAOD, 'AOD', flags.Trigger.AODEDMSet)]:
483  if not doit: continue
484 
485  edmList = getTriggerEDMList(flags, key=edmSet)
486 
487  # Build the output ItemList
488  itemsToRecord = []
489  for edmType, edmKeys in edmList.items():
490  itemsToRecord.extend([edmType+'#'+collKey for collKey in edmKeys])
491 
492  # Add EventInfo
493  itemsToRecord.append('xAOD::EventInfo#EventInfo')
494  itemsToRecord.append('xAOD::EventAuxInfo#EventInfoAux.')
495 
496 
497  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg, outputStreamName
498  acc.merge(OutputStreamCfg(flags, outputType, ItemList=itemsToRecord,
499  disableEventTag=True, takeItemsFromInput=(outputType == 'RDO')))
500  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
501  acc.merge(SetupMetaDataForStreamCfg(flags, outputType,
502  createMetadata=[MetadataCategory.TriggerMenuMetaData]))
503 
504  alg = acc.getEventAlgo(outputStreamName(outputType))
505  # Ensure OutputStream runs after TrigDecisionMakerMT and xAODMenuWriter
506  alg.ExtraInputs |= {
507  ("xAOD::TrigDecision", str(decmaker.TrigDecisionKey)),
508  ("xAOD::TrigConfKeys", metadataOutputs)} | set(xRoIBResultOutputs)
509 
510  return acc
511 
512 
513 def triggerMergeViewsCfg( flags, viewMakers ):
514  """Configure the view merging algorithm"""
515 
516  from TrigEDMConfig.TriggerEDMDefs import InViews
517  from TrigEDMConfig.TriggerEDM import getRawTriggerEDMList
518 
519  acc = ComponentAccumulator()
520  mergingTool = CompFactory.HLTEDMCreator("ViewsMergingTool")
521  alg = CompFactory.HLTEDMCreatorAlg("EDMCreatorAlg",
522  OutputTools = [mergingTool])
523 
524  # configure views merging
525  needMerging = [x for x in getRawTriggerEDMList(flags) if len(x) >= 4 and
526  any(isinstance(v, InViews) for v in x[3])]
527  __log.info("These collections need merging: %s", " ".join([ c[0] for c in needMerging ]))
528 
529  for coll in needMerging:
530  collType, collName = coll[0].split("#")
531  collType = collType.split(":")[-1]
532  possibleViews = [ str(v) for v in coll[3] if isinstance(v, InViews) ]
533  for viewsColl in possibleViews:
534  attrView = getattr(mergingTool, collType+"Views", [])
535  attrInView = getattr(mergingTool, collType+"InViews", [])
536  attrName = getattr(mergingTool, collType, [])
537  attrView.append( viewsColl )
538  attrInView.append( collName )
539  attrName.append( collName )
540 
541  setattr(mergingTool, collType+"Views", attrView )
542  setattr(mergingTool, collType+"InViews", attrInView )
543  setattr(mergingTool, collType, attrName )
544  producer = [ maker for maker in viewMakers if maker.Views == viewsColl ]
545  if len(producer) == 0:
546  __log.warning("The producer of %s for %s not in the menu, its outputs won't ever make it out of the HLT", viewsColl, coll)
547  continue
548  if len(producer) > 1:
549  for pr in producer[1:]:
550  if pr != producer[0]:
551  __log.error("Several View making algorithms produce the same output collection %s: %s", viewsColl, ' '.join([p.getName() for p in producer ]))
552  continue
553 
554  acc.addEventAlgo(alg)
555  return acc
556 
557 
558 def triggerEDMGapFillerCfg( flags, edmSet, decObj=[], decObjHypoOut=[], extraInputs=[], extraOutputs=[] ):
559  """Configure the EDM gap filler"""
560 
561  from TrigEDMConfig.TriggerEDMDefs import Alias
562  from TrigEDMConfig.TriggerEDM import getRawTriggerEDMList
563 
564  # Ignore the following collections in the GapFiller. List of regular expressions
565  # that are fully matched against the EDM entry ("type#key").
566  ignore = [
567  # GapFiller always creates Aux stores unless it doesn't end in a ., then there are extra decorations that need declaring
568  ".*AuxContainer#.*", ".*AuxInfo#.*",
569  ]
570  if flags.Trigger.doHLT:
571  # Online, these collections will be created after the EDMCreator runs
572  ignore += ["xAOD::TrigCompositeContainer#HLTNav_Summary_OnlineSlimmed",
573  "xAOD::TrigCompositeContainer#HLT_RuntimeMetadata"]
574 
575  acc = ComponentAccumulator()
576  tool = CompFactory.HLTEDMCreator(f"GapFiller{'' if edmSet==['BS'] else '_'+'_'.join(edmSet)}")
577  alg = CompFactory.HLTEDMCreatorAlg("EDMCreatorAlg",
578  OutputTools = [tool])
579  alg.ExtraInputs = set(extraInputs)
580  alg.ExtraOutputs = set(extraOutputs)
581  alg.ExtraOutputs.add(("xAOD::TrigConfKeys","TrigConfKeysOnline")) # declare keys which are always produced
582 
583  # adding the following extra outputs, which can come out of old data but need to eliminate
584  # remaining dependencies on them (e.g. FwdAFPHLTPFlowJetMonitoringAlg)
585  # TODO: Remove dependent algs on these non-existent objects
586  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMTopoJets_subjesIS' ))
587  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMTopoJets_subjesgscIS_ftf' ))
588  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMTopoJets_subresjesgscIS_ftf' ))
589  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMTopoJets_subjesIS_fastftag'))
590  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMPFlowJets_subjesgscIS_ftf' ))
591  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMPFlowJets_subjesIS_ftf'))
592  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf' ))
593  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt10LCTopoJets_subjes'))
594  alg.ExtraOutputs.add(('xAOD::CaloClusterContainer','HLT_TopoCaloClustersLCFS'))
595 
596 
597  tool.RenounceOutputs = flags.Trigger.doHLT # if running trigger in HLT then renounce outputs to prevent dependencies on this tool/alg
598 
599  if len(edmSet) != 0:
600  groupedByType = defaultdict( list )
601  re_ignore = [re.compile(x) for x in ignore]
602 
603  # scan the EDM
604  for el in getRawTriggerEDMList(flags):
605  if not any([ outputType in el[1].split() for outputType in edmSet ]):
606  continue
607  if any(ign.fullmatch(el[0]) for ign in re_ignore):
608  # aux container or aux info .. need to see if we have decorations to declare
609  collType, collName = el[0].split("#")
610  if collName[-1] != ".":
611  collType = collType.replace("AuxInfo","Info").replace("AuxContainer","Container")
612  __log.debug("GapFiller will create EDM decorations on type '%s' of '%s'", collType, collName)
613  collNameList = collName.split(".") # first will be the collection name with Aux. added
614  collName = (collNameList[0] + ".").replace("Aux.",".")
615  for decorName in collNameList[1:]:
616  alg.ExtraOutputs.add((collType,"StoreGateSvc+"+collName+decorName))
617  continue
618  collType, collName = el[0].split("#")
619  if len(el) >= 4: # see if there is an alias
620  aliases = [ str(a) for a in el[3] if isinstance(a, Alias) ]
621  if len(aliases) == 1:
622  __log.debug("GapFiller configuration found an aliased type '%s' for '%s'", aliases[0], collType)
623  collType = aliases[0]
624  elif len(aliases) > 1:
625  __log.error("GapFiller configuration found inconsistent '%s' (too many aliases?)", aliases)
626 
627  groupedByType[collType].append( collName )
628 
629  for collType, collNameList in groupedByType.items():
630  propName = collType.split(":")[-1]
631  if hasattr( tool, propName ):
632  setattr( tool, propName, collNameList )
633  __log.debug("GapFiller will create EDM collection type '%s' for '%s'", collType, collNameList)
634  else:
635  __log.debug("EDM collections of type %s are not going to be added to StoreGate, if not created by the HLT", collType )
636 
637  if decObj or decObjHypoOut:
638  __log.debug("GapFiller is ensuring the creation of all the decision object collections")
639  __log.debug("'%s'", decObj)
640  # Gap filler is also used to perform re-mapping of the HypoAlg outputs which is a sub-set of decObj
641  tool.FixLinks = list(decObjHypoOut)
642  # Append and hence confirm all TrigComposite collections
643  tool.TrigCompositeContainer += list(decObj)
644 
645  acc.addEventAlgo(alg, primary=True)
646  return acc
647 
648 
649 def triggerRunCfg( flags, menu=None ):
650  """
651  top of the trigger config (for real triggering online or on MC)
652  Returns: ca only
653  """
654  acc = ComponentAccumulator()
655 
656  # L1ConfigSvc needed for HLTSeeding
657  from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg
658 
659  acc.merge( L1ConfigSvcCfg(flags) )
660 
661  acc.addSequence( seqOR( "HLTTop") )
662 
663  # HLTPreSeq only used for CostMon so far, skip if CostMon disabled
664  if flags.Trigger.CostMonitoring.doCostMonitoring:
665  acc.addSequence( parOR("HLTPreSeq"), parentName="HLTTop" )
666 
667  from TrigCostMonitor.TrigCostMonitorConfig import TrigCostMonitorCfg
668  acc.merge( TrigCostMonitorCfg( flags ), sequenceName="HLTPreSeq" )
669 
670 
671  acc.addSequence( parOR("HLTBeginSeq"), parentName="HLTTop" )
672  # bit of a hack as for "legacy" type JO a seq name for cache creators has to be given,
673  # in newJO realm the seqName will be removed as a comp fragment shoudl be unaware of where it will be attached
674 
675  if flags.Trigger.doCFEmulationTest:
676  from TriggerMenuMT.CFtest.EmuStepProcessingConfig import emulateHLTSeedingCfg
677  hltSeedingAcc = emulateHLTSeedingCfg(flags)
678  else:
679  acc.merge( triggerIDCCacheCreatorsCfg( flags, seqName="AthAlgSeq" ), sequenceName="HLTBeginSeq" )
680 
681  if flags.Trigger.doRuntimeNaviVal: # Validate we can parse the menu with the standalone chain parser
682  acc.addEventAlgo( CompFactory.TrigChainNameParserChecker(), sequenceName="HLTBeginSeq" )
683 
684  from HLTSeeding.HLTSeedingConfig import HLTSeedingCfg
685  hltSeedingAcc = HLTSeedingCfg( flags )
686 
687  from AthenaConfiguration.Enums import LHCPeriod
688  if flags.GeoModel.Run > LHCPeriod.Run3:
689  from InDetConfig.TrackRecoConfig import SiDetectorElementStatusCfg
690  acc.merge(SiDetectorElementStatusCfg( flags), sequenceName="HLTBeginSeq")
691 
692  # TODO, once moved to newJO the algorithm can be added to hltSeedingAcc and merging will be sufficient here
693  acc.merge( hltSeedingAcc, sequenceName="HLTBeginSeq" )
694 
695  # detour to the menu here, (missing now, instead a temporary hack)
696  if menu:
697  menuAcc = menu( flags )
698  HLTSteps = menuAcc.getSequence( "HLTAllSteps" )
699  __log.info( "Configured menu with %d steps", len(HLTSteps.Members))
700  acc.merge( menuAcc, sequenceName="HLTTop")
701 
702  # collect hypothesis algorithms from all sequence
703  hypos = collectHypos( HLTSteps )
704  filters = collectFilters( HLTSteps )
705  acc.addSequence( parOR("HLTEndSeq"), parentName="HLTTop" )
706  acc.addSequence( seqAND("HLTFinalizeSeq"), parentName="HLTEndSeq" )
707 
708  nfilters = sum(len(v) for v in filters.values())
709  nhypos = sum(len(v) for v in hypos.values())
710  __log.info( "Algorithms counting: Number of Filter algorithms: %d - Number of Hypo algoirthms: %d", nfilters , nhypos)
711 
712  summaryAcc, summaryAlg = triggerSummaryCfg( flags, hypos )
713  acc.merge( summaryAcc, sequenceName="HLTFinalizeSeq" )
714  if flags.Trigger.doCFEmulationTest:
715  summaryAlg.Prescaler=CompFactory.PrescalingEmulationTool()
716  acc.addEventAlgo( summaryAlg, sequenceName="HLTFinalizeSeq" )
717  acc.merge( triggerEndOfEventCfg(flags), sequenceName="HLTFinalizeSeq" )
718 
719  #once menu is included we should configure monitoring here as below
720  hltSeedingAlg = hltSeedingAcc.getEventAlgo("HLTSeeding")
721 
722  monitoringAcc, monitoringAlg = triggerMonitoringCfg( flags, hypos, filters, hltSeedingAlg )
723  acc.merge( monitoringAcc, sequenceName="HLTEndSeq" )
724  acc.addEventAlgo( monitoringAlg, sequenceName="HLTEndSeq" )
725 
726  decObj, decObjHypoOut = collectDecisionObjects( hypos, filters, hltSeedingAlg, summaryAlg )
727 
728 
729  # configure components need to normalise output before writing out
730  viewMakers = collectViewMakers( HLTSteps )
731 
732  # Add HLT Navigation to EDM list
733  # TODO: DO NOT directly modify TriggerHLTListRun3
734  from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTListRun3, addHLTNavigationToEDMList
735  __log.info( "Number of EDM items before adding navigation: %d", len(TriggerHLTListRun3))
736  addHLTNavigationToEDMList(flags, TriggerHLTListRun3, decObj, decObjHypoOut)
737  __log.info( "Number of EDM items after adding navigation: %d", len(TriggerHLTListRun3))
738 
739  # Add Extra to EDM list
740  # TODO: DO NOT directly modify TriggerHLTListRun3
741  if flags.Trigger.ExtraEDMList:
742  from TrigEDMConfig.TriggerEDM import _addExtraCollectionsToEDMList
743  __log.info( "Adding extra collections to EDM: %s", str(flags.Trigger.ExtraEDMList))
744  _addExtraCollectionsToEDMList(TriggerHLTListRun3, flags.Trigger.ExtraEDMList)
745 
746  # Configure output writing
747  outputAcc, edmSet = triggerOutputCfg( flags, hypos )
748  acc.merge( outputAcc, sequenceName="HLTTop" )
749 
750  # Cost monitoring should be finished between acceptedEventTopSeq and EDMCreator
751  from TrigCostMonitor.TrigCostMonitorConfig import TrigCostMonitorFinalizeCfg
752  costFinalizeAlg = TrigCostMonitorFinalizeCfg(flags)
753  if costFinalizeAlg: # None if Cost Monitoring is turned off
754  acc.addEventAlgo(costFinalizeAlg, sequenceName="HLTFinalizeSeq" )
755 
756  if edmSet:
757  # The order is important: 1) view merging, 2) gap filling
758  acc.merge( triggerMergeViewsCfg(flags, viewMakers), sequenceName="HLTFinalizeSeq" )
759  # For BS output, the EDM gap-filling is done in Reco. Online we only ensure a
760  # consistent set of decision objects (TrigCompositeContainer):
761  acc.merge( triggerEDMGapFillerCfg(flags, [edmSet] if edmSet!='BS' else [],
762  decObj, decObjHypoOut), sequenceName="HLTFinalizeSeq" )
763 
764  if flags.Trigger.doOnlineNavigationCompactification:
765  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import getTrigNavSlimmingMTOnlineConfig
766  onlineSlimAlg = getTrigNavSlimmingMTOnlineConfig(flags)
767  acc.addEventAlgo( onlineSlimAlg, sequenceName="HLTFinalizeSeq" )
768 
769  # Cleanup menu config to allow garbage collection (ATR-28855)
770  from TriggerMenuMT.HLT.Config.Utility.HLTMenuConfig import HLTMenuConfig
771  HLTMenuConfig.destroy()
772 
773  return acc
774 
775 
776 def triggerIDCCacheCreatorsCfg(flags, seqName = None):
777  """
778  Configures IDC cache loading
779  Returns: CA
780  """
781  acc = ComponentAccumulator(seqName)
782 
783  if flags.Trigger.doMuon:
784  from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheCfg
785  acc.merge( MuonCacheCfg(flags), sequenceName = seqName )
786 
787  from MuonConfig.MuonRdoDecodeConfig import MuonPrdCacheCfg
788  acc.merge( MuonPrdCacheCfg(flags), sequenceName = seqName )
789 
790  if flags.Trigger.doID:
791  from TrigInDetConfig.TrigInDetConfig import InDetIDCCacheCreatorCfg
792  acc.merge( InDetIDCCacheCreatorCfg(flags), sequenceName = seqName )
793 
794  if flags.Trigger.useActsTracking:
795  from TrigInDetConfig.TrigInDetConfig import ActsIDCCacheCreatorCfg
796  acc.merge( ActsIDCCacheCreatorCfg(flags), sequenceName = seqName )
797 
798  return acc
799 
800 
802  from TriggerMenuMT.HLT.Config.Utility.HLTMenuConfig import HLTMenuConfig
803 
804  acceptedEventChainDicts = [cd for cd in HLTMenuConfig.dictsList() \
805  if 'Calib' in cd['signatures'] \
806  and 'acceptedevts' in cd['chainParts'][0]['purpose']]
807 
808  acc = ComponentAccumulator()
809 
810  # If no relevant chains or just not desired, can shortcut and return empty CA
811  if not (flags.Trigger.enableEndOfEventProcessing and acceptedEventChainDicts):
812  return acc
813 
814  # Add end-of-event sequences executed conditionally on the DecisionSummaryMakerAlg filter status
815  endOfEventRoIMaker = CompFactory.EndOfEventROIConfirmerAlg('EndOfEventROIConfirmerAlg')
816  acc.addEventAlgo( endOfEventRoIMaker )
817  acc.addSequence( parOR("acceptedEventTopSeq") )
818  acc.getSequence("acceptedEventTopSeq").IgnoreFilterPassed=True
819 
820  # Define the alg configuration by purpose
821  def EndOfEventSeqCfg(flags, prescaleChain, purposes):
822  acc = ComponentAccumulator()
823  seqLabel = prescaleChain.replace('HLT_acceptedevts','')
824  seqName = 'acceptedEventSeq'+seqLabel
825  acc.addSequence( seqAND(seqName) )
826 
827  endOfEventFilterAlg = CompFactory.EndOfEventFilterAlg('EndOfEventFilterAlg'+seqLabel, ChainName=prescaleChain)
828  acc.addEventAlgo(endOfEventFilterAlg, sequenceName=seqName)
829  # The LAr Noise Burst end-of-event sequence
830  if 'larnoiseburst' in purposes:
831  # Add stream filter to EndOfEventFilterAlg
832  # Only accept events going to streams that already do full calo reco
833  # CosmicCalo explicitly requested [ATR-26096]
834  endOfEventFilterAlg.StreamFilter = ['Main','VBFDelayed','TLA','DarkJetPEBTLA','FTagPEBTLA','CosmicCalo']
835 
836  from TriggerMenuMT.HLT.CalibCosmicMon.CalibChainConfiguration import getLArNoiseBurstRecoCfg
837  acc.merge(getLArNoiseBurstRecoCfg(flags), sequenceName=seqName)
838  elif any(purpose.startswith("met") for purpose in purposes):
839  from TriggerMenuMT.HLT.MET.EndOfEvent import getMETRecoSequences
840  metcfg, rois, streams = getMETRecoSequences(flags, purposes)
841  endOfEventFilterAlg.StreamFilter = streams
842  endOfEventRoIMaker.RoIs = [x for x in rois if x not in endOfEventRoIMaker.RoIs]
843  acc.merge(metcfg, sequenceName=seqName)
844 
845  return acc
846 
847 
848  for acceptedEventChainDict in acceptedEventChainDicts:
849  # Common config for each chain
850  prescaleChain = acceptedEventChainDict['chainName']
851  # Now add chain-specific end-of-event sequences executed conditionally on the prescale
852  purposes = acceptedEventChainDict['chainParts'][0]['purpose']
853 
854  acc.merge(EndOfEventSeqCfg(flags, prescaleChain, purposes), sequenceName="acceptedEventTopSeq")
855 
856  return acc
857 
858 def triggerPostRunCfg(flags):
859  """
860  Configures components needed for processing trigger information in RAW/ESD step
861  Returns: ca only
862  """
863  acc = ComponentAccumulator()
864  # configure in order BS decodnig, EDM gap filling, insertion of trigger metadata to ESD
865 
866  return acc
867 
868 
869 if __name__ == "__main__":
870  from AthenaConfiguration.AllConfigFlags import initConfigFlags
871 
872  flags = initConfigFlags()
873  flags.Trigger.forceEnableAllChains = True
874  flags.Input.Files = ["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1_50evt",]
875  from AthenaConfiguration.TestDefaults import defaultGeometryTags
876  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
877  flags.lock()
878 
879  def testMenu(flags):
880  menuCA = ComponentAccumulator()
881  menuCA.addSequence( seqAND("HLTAllSteps") )
882  return menuCA
883 
884  acc = triggerRunCfg( flags, menu = testMenu )
885 
886  f=open("TriggerRunConf.pkl","wb")
887  acc.store(f)
888  f.close()
python.TriggerConfig.triggerMonitoringCfg
def triggerMonitoringCfg(flags, hypos, filters, hltSeeding)
Definition: TriggerConfig.py:228
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=None, MetadataItemList=None, disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, keepProvenanceTagsRegEx=None, AcceptAlgs=None, HelperTools=None)
Definition: OutputStreamConfig.py:13
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename R::value_type > sorted(const R &r, PROJ proj={})
Helper function to create a sorted vector from an unsorted range.
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:310
python.TriggerEDM.getRawTriggerEDMList
def getRawTriggerEDMList(flags, runVersion=-1)
Definition: TriggerEDM.py:128
AthenaPoolExample_WriteCond.outputStreamName
string outputStreamName
Definition: AthenaPoolExample_WriteCond.py:21
python.TriggerConfig.__isCombo
def __isCombo(alg)
Definition: TriggerConfig.py:16
python.TriggerConfig.triggerSummaryCfg
def triggerSummaryCfg(flags, hypos)
Definition: TriggerConfig.py:171
python.CFElements.flatAlgorithmSequences
def flatAlgorithmSequences(start)
Definition: CFElements.py:168
python.TrackRecoConfig.SiDetectorElementStatusCfg
def SiDetectorElementStatusCfg(flags, suffix="")
Definition: TrackRecoConfig.py:188
TrigCostMonitorConfig.TrigCostMonitorFinalizeCfg
def TrigCostMonitorFinalizeCfg(flags, seqName="")
Definition: TrigCostMonitorConfig.py:38
HLTResultMTMakerAlg
Simply calls the result maker tool to create HLTResultMT. The algorithm is meant to be used only offl...
Definition: HLTResultMTMakerAlg.h:15
python.TriggerConfig.triggerEndOfEventCfg
def triggerEndOfEventCfg(flags)
Definition: TriggerConfig.py:801
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:347
python.TriggerConfig.triggerBSOutputCfg
def triggerBSOutputCfg(flags, hypos, offline=False)
Definition: TriggerConfig.py:341
python.TriggerConfig.collectHLTSummaryDecisionObjects
def collectHLTSummaryDecisionObjects(hltSummary)
Definition: TriggerConfig.py:144
python.TriggerConfig.triggerOutputCfg
def triggerOutputCfg(flags, hypos)
Definition: TriggerConfig.py:289
python.TriggerConfig.collectHLTSeedingDecisionObjects
def collectHLTSeedingDecisionObjects(hltSeeding)
Definition: TriggerConfig.py:103
TrigOutputHandlingConfig.HLTResultMTMakerCfg
def HLTResultMTMakerCfg(flags, name="HLTResultMTMaker")
Definition: TrigOutputHandlingConfig.py:6
python.TriggerConfig.collectHypoDecisionObjects
def collectHypoDecisionObjects(hypos, inputs=True, outputs=True)
Definition: TriggerConfig.py:114
EmuStepProcessingConfig.emulateHLTSeedingCfg
def emulateHLTSeedingCfg(flags, seqName=None)
L1 #################################################
Definition: EmuStepProcessingConfig.py:300
python.TriggerConfig.collectHypos
def collectHypos(steps)
Definition: TriggerConfig.py:24
python.TriggerConfig.__stepNumber
def __stepNumber(stepName)
Definition: TriggerConfig.py:19
python.TrigCompositeUtils.isLegId
def isLegId(chainName)
Definition: DecisionHandling/python/TrigCompositeUtils.py:18
python.TriggerEDM.getRun3BSList
def getRun3BSList(flags, keys)
Definition: TriggerEDM.py:293
python.TriggerConfig.triggerEDMGapFillerCfg
def triggerEDMGapFillerCfg(flags, edmSet, decObj=[], decObjHypoOut=[], extraInputs=[], extraOutputs=[])
Definition: TriggerConfig.py:558
python.TriggerEDMRun3.addHLTNavigationToEDMList
def addHLTNavigationToEDMList(flags, edmList, allDecisions, hypoDecisions)
Definition: TriggerEDMRun3.py:1264
python.HLT.MET.EndOfEvent.getMETRecoSequences
def getMETRecoSequences(flags, List[str] purposes)
Definition: EndOfEvent.py:28
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
AnalysisTriggerAlgsConfig.RoIBResultToxAODCfg
def RoIBResultToxAODCfg(flags)
Definition: AnalysisTriggerAlgsConfig.py:9
python.TriggerConfig.triggerMergeViewsCfg
def triggerMergeViewsCfg(flags, viewMakers)
Definition: TriggerConfig.py:513
python.TriggerConfig.triggerPostRunCfg
def triggerPostRunCfg(flags)
Definition: TriggerConfig.py:858
python.TriggerEDM.getTriggerEDMList
def getTriggerEDMList(flags, key, runVersion=-1)
Definition: TriggerEDM.py:166
python.TriggerConfig.collectFilterDecisionObjects
def collectFilterDecisionObjects(filters, inputs=True, outputs=True)
Definition: TriggerConfig.py:133
menu
make the sidebar many part of the config
Definition: hcg.cxx:552
python.TriggerConfig.__decisionsFromHypo
def __decisionsFromHypo(hypo)
Definition: TriggerConfig.py:58
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
python.JetAnalysisCommon.parOR
parOR
Definition: JetAnalysisCommon.py:316
MuonRdoDecodeConfig.MuonPrdCacheCfg
def MuonPrdCacheCfg(flags)
This configuration function creates the IdentifiableCaches for PRD.
Definition: MuonRdoDecodeConfig.py:25
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
python.TriggerEDM._addExtraCollectionsToEDMList
def _addExtraCollectionsToEDMList(edmList, extraList)
Definition: TriggerEDM.py:73
ByteStreamConfig.ByteStreamWriteCfg
def ByteStreamWriteCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:100
python.DecisionHandlingConfig.setupFilterMonitoring
def setupFilterMonitoring(flags, filterAlg)
Definition: DecisionHandlingConfig.py:9
python.TriggerRecoConfig.TriggerMetadataWriterCfg
def TriggerMetadataWriterCfg(flags)
Definition: TriggerRecoConfig.py:132
TrigT1ResultByteStreamConfig.L1TriggerByteStreamEncoderCfg
def L1TriggerByteStreamEncoderCfg(flags)
Definition: TrigT1ResultByteStreamConfig.py:326
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
python.TriggerConfig.triggerRunCfg
def triggerRunCfg(flags, menu=None)
Definition: TriggerConfig.py:649
python.TrigInDetConfig.ActsIDCCacheCreatorCfg
def ActsIDCCacheCreatorCfg(flags)
Definition: TrigInDetConfig.py:41
python.TriggerConfig.collectDecisionObjects
def collectDecisionObjects(hypos, filters, hltSeeding, hltSummary)
Definition: TriggerConfig.py:150
MuonBytestreamDecodeConfig.MuonCacheCfg
def MuonCacheCfg(flags)
This configuration function creates the IdentifiableCaches for RDO.
Definition: MuonBytestreamDecodeConfig.py:17
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
DecisionCollectorTool
Definition: DecisionCollectorTool.h:17
TrigOutputHandlingConfig.TriggerEDMSerialiserToolCfg
def TriggerEDMSerialiserToolCfg(flags, name="Serialiser")
Definition: TrigOutputHandlingConfig.py:51
python.HLT.CalibCosmicMon.CalibChainConfiguration.getLArNoiseBurstRecoCfg
def getLArNoiseBurstRecoCfg(flags)
Definition: CalibChainConfiguration.py:24
python.TrigServicesConfig.TrigServicesCfg
def TrigServicesCfg(flags)
Definition: TrigServicesConfig.py:173
TrigOutputHandlingConfig.StreamTagMakerToolCfg
def StreamTagMakerToolCfg(name="StreamTagMakerTool")
Definition: TrigOutputHandlingConfig.py:109
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:71
python.TriggerConfig.collectViewMakers
def collectViewMakers(steps)
Definition: TriggerConfig.py:68
TrigNavSlimmingMTConfig.getTrigNavSlimmingMTOnlineConfig
def getTrigNavSlimmingMTOnlineConfig(flags)
Definition: TrigNavSlimmingMTConfig.py:21
python.TrigConfigSvcCfg.L1PrescaleCondAlgCfg
def L1PrescaleCondAlgCfg(flags)
Definition: TrigConfigSvcCfg.py:314
python.TrigConfigSvcCfg.L1ConfigSvcCfg
def L1ConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:239
Trk::open
@ open
Definition: BinningType.h:40
python.TriggerConfig.triggerPOOLOutputCfg
def triggerPOOLOutputCfg(flags)
Definition: TriggerConfig.py:456
TrigSignatureMoni
Definition: TrigSignatureMoni.h:38
python.TriggerConfig.collectFilters
def collectFilters(steps)
Definition: TriggerConfig.py:85
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
TrigOutputHandlingConfig.TriggerBitsMakerToolCfg
def TriggerBitsMakerToolCfg(name="TriggerBitsMakerTool")
Definition: TrigOutputHandlingConfig.py:117
python.CFElements.seqAND
def seqAND(name, subs=[], invert=False)
Definition: CFElements.py:27
str
Definition: BTagTrackIpAccessor.cxx:11
python.CFElements.isSequence
def isSequence(obj)
Definition: CFElements.py:74
TrigCostMonitorConfig.TrigCostMonitorCfg
def TrigCostMonitorCfg(flags, seqName="")
Definition: TrigCostMonitorConfig.py:6
HLTSeedingConfig.mapThresholdToL1DecisionCollection
def mapThresholdToL1DecisionCollection(threshold)
Definition: HLTSeedingConfig.py:79
python.CFElements.getSequenceChildren
def getSequenceChildren(comp)
Definition: CFElements.py:48
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
python.TrigInDetConfig.InDetIDCCacheCreatorCfg
def InDetIDCCacheCreatorCfg(flags)
Definition: TrigInDetConfig.py:18
python.TriggerConfig.testMenu
def testMenu(flags)
Definition: TriggerConfig.py:879
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
python.CFElements.seqOR
def seqOR(name, subs=[], invert=False)
Definition: CFElements.py:36
HLTSeedingConfig.HLTSeedingCfg
def HLTSeedingCfg(flags, seqName=None)
Definition: HLTSeedingConfig.py:312
TrigOutputHandlingConfig.DecisionSummaryMakerAlgCfg
def DecisionSummaryMakerAlgCfg(flags, name="DecisionSummaryMakerAlg")
Definition: TrigOutputHandlingConfig.py:124
python.TriggerConfig.triggerIDCCacheCreatorsCfg
def triggerIDCCacheCreatorsCfg(flags, seqName=None)
Definition: TriggerConfig.py:776