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 AthenaCommon.Logging import logging
11 
12 __log = logging.getLogger('TriggerConfig')
13 
14 
15 def __isCombo(alg):
16  return hasattr( alg, "MultiplicitiesMap" )
17 
18 def __stepNumber(stepName):
19  """extract step number frmo strings like Step2... -> 2"""
20  return int(stepName.split('_')[0].replace("Step",""))
21 
22 
23 def collectHypos( steps ):
24  """
25  Method iterating over the CF and picking all the Hypothesis algorithms
26 
27  Returned is a map with the step name and list of all instances of hypos in that step.
28  Input is top HLT sequencer.
29  """
30  __log.info("Collecting hypos from steps")
31  hypos = defaultdict( list )
32 
33  for stepSeq in steps.Members:
34  if not isSequence( stepSeq ):
35  continue
36 
37  if "filter" in stepSeq.getName():
38  __log.debug("Skipping filtering steps %s", stepSeq.getName() )
39  continue
40 
41  __log.debug( "collecting hypos from step %s", stepSeq.getName() )
42  for seq,algs in flatAlgorithmSequences(stepSeq).items():
43  for alg in sorted(algs, key=lambda t: str(t.getName())):
44  if isSequence( alg ):
45  continue
46  # will replace by function once dependencies are sorted
47  if hasattr(alg, 'HypoInputDecisions'):
48  __log.debug("found hypo %s in %s", alg.getName(), stepSeq.getName())
49  if __isCombo( alg ) and len(alg.ComboHypoTools):
50  __log.debug( " with %d comboHypoTools: %s", len(alg.ComboHypoTools), ' '.join(map(str, [tool.getName() for tool in alg.ComboHypoTools])))
51  hypos[stepSeq.getName()].append( alg )
52  else:
53  __log.verbose("Not a hypo %s", alg.getName())
54 
55  return hypos
56 
57 def __decisionsFromHypo( hypo ):
58  """ return all chains served by this hypo and the keys of produced decision object """
59  from TrigCompositeUtils.TrigCompositeUtils import isLegId
60  __log.debug("Hypo type %s is combo %r", hypo.getName(), __isCombo(hypo))
61  if __isCombo(hypo):
62  return [key for key in list(hypo.MultiplicitiesMap.keys()) if not isLegId(key)], hypo.HypoOutputDecisions
63  else: # regular hypos
64  return [ t.getName() for t in hypo.HypoTools if not isLegId(t.getName())], [str(hypo.HypoOutputDecisions)]
65 
66 
67 def collectViewMakers( steps ):
68  """ collect all view maker algorithms in the configuration """
69  makers = [] # map with name, instance and encompasing recoSequence
70  for stepSeq in getSequenceChildren( steps ):
71  for recoSeq in getSequenceChildren( stepSeq ):
72  if not isSequence( recoSeq ):
73  continue
74  algsInSeq = flatAlgorithmSequences( recoSeq )
75  for seq,algs in algsInSeq.items():
76  for alg in algs:
77  if "EventViewCreator" in alg.getFullJobOptName(): # TODO base it on checking types of write handles once available
78  if alg not in makers:
79  makers.append(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 "filter" 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 
433  from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamEncoderCfg
434  acc.merge(L1TriggerByteStreamEncoderCfg(flags))
435 
436  writingAcc = ByteStreamWriteCfg(flags, type_names=writingOutputs, extra_inputs=writingInputs)
437  writingAcc.addEventAlgo(hltResultMakerAlg)
438  writingAcc.addEventAlgo(decmaker)
439  acc.merge(writingAcc)
440 
441  else:
442  from TrigServices.TrigServicesConfig import TrigServicesCfg
443  onlineServicesAcc = TrigServicesCfg(flags)
444  hltEventLoopMgr = onlineServicesAcc.getPrimary()
445  hltEventLoopMgr.ResultMaker.StreamTagMaker = stmaker
446  hltEventLoopMgr.ResultMaker.MakerTools = [serialiser, bitsmaker]
447  onlineServicesAcc.getEventAlgo('SGInputLoader').Load.add(
448  ('ByteStreamMetadataContainer', 'InputMetaDataStore+ByteStreamMetadata'))
449  acc.merge(onlineServicesAcc)
450  return acc
451 
452 
454  # Get the list of output collections from TriggerEDM
455  acc = ComponentAccumulator()
456 
457  from TrigEDMConfig.TriggerEDM import getTriggerEDMList
458 
459  # Produce trigger bits
460  bitsmaker = CompFactory.TriggerBitsMakerTool()
461  decmaker = CompFactory.TrigDec.TrigDecisionMakerMT("TrigDecMakerMT", BitsMakerTool = bitsmaker)
462  acc.addEventAlgo( decmaker )
463 
464  # Export trigger metadata during the trigger execution when running with POOL output.
465  from .TriggerRecoConfig import TriggerMetadataWriterCfg
466  metadataAcc, metadataOutputs = TriggerMetadataWriterCfg(flags)
467  acc.merge( metadataAcc )
468 
469  # Produce xAOD L1 RoIs from RoIBResult
470  from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import RoIBResultToxAODCfg
471  xRoIBResultAcc, xRoIBResultOutputs = RoIBResultToxAODCfg(flags)
472  acc.merge(xRoIBResultAcc)
473  # Ensure outputs are produced before streamAlg runs
474 
475 
476  # Create OutputStream
477  for doit, outputType, edmSet in [( flags.Output.doWriteRDO, 'RDO', flags.Trigger.ESDEDMSet), # not a mistake, RDO content is meant to be as ESD
478  ( flags.Output.doWriteESD, 'ESD', flags.Trigger.ESDEDMSet),
479  ( flags.Output.doWriteAOD, 'AOD', flags.Trigger.AODEDMSet)]:
480  if not doit: continue
481 
482  edmList = getTriggerEDMList(flags, key=edmSet)
483 
484  # Build the output ItemList
485  itemsToRecord = []
486  for edmType, edmKeys in edmList.items():
487  itemsToRecord.extend([edmType+'#'+collKey for collKey in edmKeys])
488 
489  # Add EventInfo
490  itemsToRecord.append('xAOD::EventInfo#EventInfo')
491  itemsToRecord.append('xAOD::EventAuxInfo#EventInfoAux.')
492 
493 
494  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg, outputStreamName
495  acc.merge(OutputStreamCfg(flags, outputType, ItemList=itemsToRecord,
496  disableEventTag=True, takeItemsFromInput=(outputType == 'RDO')))
497  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
498  acc.merge(SetupMetaDataForStreamCfg(flags, outputType,
499  createMetadata=[MetadataCategory.TriggerMenuMetaData]))
500 
501  alg = acc.getEventAlgo(outputStreamName(outputType))
502  # Ensure OutputStream runs after TrigDecisionMakerMT and xAODMenuWriter
503  alg.ExtraInputs |= {
504  ("xAOD::TrigDecision", str(decmaker.TrigDecisionKey)),
505  ("xAOD::TrigConfKeys", metadataOutputs)} | set(xRoIBResultOutputs)
506 
507  return acc
508 
509 
510 def triggerMergeViewsCfg( flags, viewMakers ):
511  """Configure the view merging algorithm"""
512 
513  from TrigEDMConfig.TriggerEDMDefs import InViews
514  from TrigEDMConfig.TriggerEDM import getRawTriggerEDMList
515 
516  acc = ComponentAccumulator()
517  mergingTool = CompFactory.HLTEDMCreator("ViewsMergingTool")
518  alg = CompFactory.HLTEDMCreatorAlg("EDMCreatorAlg",
519  OutputTools = [mergingTool])
520 
521  # configure views merging
522  needMerging = [x for x in getRawTriggerEDMList(flags) if len(x) >= 4 and
523  any(isinstance(v, InViews) for v in x[3])]
524  __log.info("These collections need merging: %s", " ".join([ c[0] for c in needMerging ]))
525 
526  for coll in needMerging:
527  collType, collName = coll[0].split("#")
528  collType = collType.split(":")[-1]
529  possibleViews = [ str(v) for v in coll[3] if isinstance(v, InViews) ]
530  for viewsColl in possibleViews:
531  attrView = getattr(mergingTool, collType+"Views", [])
532  attrInView = getattr(mergingTool, collType+"InViews", [])
533  attrName = getattr(mergingTool, collType, [])
534  attrView.append( viewsColl )
535  attrInView.append( collName )
536  attrName.append( collName )
537 
538  setattr(mergingTool, collType+"Views", attrView )
539  setattr(mergingTool, collType+"InViews", attrInView )
540  setattr(mergingTool, collType, attrName )
541  producer = [ maker for maker in viewMakers if maker.Views == viewsColl ]
542  if len(producer) == 0:
543  __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)
544  continue
545  if len(producer) > 1:
546  for pr in producer[1:]:
547  if pr != producer[0]:
548  __log.error("Several View making algorithms produce the same output collection %s: %s", viewsColl, ' '.join([p.getName() for p in producer ]))
549  continue
550 
551  acc.addEventAlgo(alg)
552  return acc
553 
554 
555 def triggerEDMGapFillerCfg( flags, edmSet, decObj=[], decObjHypoOut=[], extraInputs=[], extraOutputs=[] ):
556  """Configure the EDM gap filler"""
557 
558  from TrigEDMConfig.TriggerEDMDefs import Alias
559  from TrigEDMConfig.TriggerEDM import getRawTriggerEDMList
560 
561  # Ignore the following collections in the GapFiller. List of regular expressions
562  # that are fully matched against the EDM entry ("type#key").
563  ignore = [
564  # GapFiller always creates Aux stores unless it doesn't end in a ., then there are extra decorations that need declaring
565  ".*AuxContainer#.*", ".*AuxInfo#.*",
566  ]
567  if flags.Trigger.doHLT:
568  # Online, these collections will be created after the EDMCreator runs
569  ignore += ["xAOD::TrigCompositeContainer#HLTNav_Summary_OnlineSlimmed",
570  "xAOD::TrigCompositeContainer#HLT_RuntimeMetadata"]
571 
572  acc = ComponentAccumulator()
573  tool = CompFactory.HLTEDMCreator(f"GapFiller{'' if edmSet==['BS'] else '_'+'_'.join(edmSet)}")
574  alg = CompFactory.HLTEDMCreatorAlg("EDMCreatorAlg",
575  OutputTools = [tool])
576  alg.ExtraInputs = set(extraInputs)
577  alg.ExtraOutputs = set(extraOutputs)
578  alg.ExtraOutputs.add(("xAOD::TrigConfKeys","TrigConfKeysOnline")) # declare keys which are always produced
579 
580  # adding the following extra outputs, which can come out of old data but need to eliminate
581  # remaining dependencies on them (e.g. FwdAFPHLTPFlowJetMonitoringAlg)
582  # TODO: Remove dependent algs on these non-existent objects
583  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMTopoJets_subjesIS' ))
584  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMTopoJets_subjesgscIS_ftf' ))
585  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMTopoJets_subresjesgscIS_ftf' ))
586  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMTopoJets_subjesIS_fastftag'))
587  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMPFlowJets_subjesgscIS_ftf' ))
588  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMPFlowJets_subjesIS_ftf'))
589  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt4EMPFlowJets_subresjesgscIS_ftf' ))
590  alg.ExtraOutputs.add(('xAOD::JetContainer','HLT_AntiKt10LCTopoJets_subjes'))
591  alg.ExtraOutputs.add(('xAOD::CaloClusterContainer','HLT_TopoCaloClustersLCFS'))
592 
593 
594  tool.RenounceOutputs = flags.Trigger.doHLT # if running trigger in HLT then renounce outputs to prevent dependencies on this tool/alg
595 
596  if len(edmSet) != 0:
597  groupedByType = defaultdict( list )
598  re_ignore = [re.compile(x) for x in ignore]
599 
600  # scan the EDM
601  for el in getRawTriggerEDMList(flags):
602  if not any([ outputType in el[1].split() for outputType in edmSet ]):
603  continue
604  if any(ign.fullmatch(el[0]) for ign in re_ignore):
605  # aux container or aux info .. need to see if we have decorations to declare
606  collType, collName = el[0].split("#")
607  if collName[-1] != ".":
608  collType = collType.replace("AuxInfo","Info").replace("AuxContainer","Container")
609  __log.debug("GapFiller will create EDM decorations on type '%s' of '%s'", collType, collName)
610  collNameList = collName.split(".") # first will be the collection name with Aux. added
611  collName = (collNameList[0] + ".").replace("Aux.",".")
612  for decorName in collNameList[1:]:
613  alg.ExtraOutputs.add((collType,"StoreGateSvc+"+collName+decorName))
614  continue
615  collType, collName = el[0].split("#")
616  if len(el) >= 4: # see if there is an alias
617  aliases = [ str(a) for a in el[3] if isinstance(a, Alias) ]
618  if len(aliases) == 1:
619  __log.debug("GapFiller configuration found an aliased type '%s' for '%s'", aliases[0], collType)
620  collType = aliases[0]
621  elif len(aliases) > 1:
622  __log.error("GapFiller configuration found inconsistent '%s' (too many aliases?)", aliases)
623 
624  groupedByType[collType].append( collName )
625 
626  for collType, collNameList in groupedByType.items():
627  propName = collType.split(":")[-1]
628  if hasattr( tool, propName ):
629  setattr( tool, propName, collNameList )
630  __log.debug("GapFiller will create EDM collection type '%s' for '%s'", collType, collNameList)
631  else:
632  __log.debug("EDM collections of type %s are not going to be added to StoreGate, if not created by the HLT", collType )
633 
634  if decObj or decObjHypoOut:
635  __log.debug("GapFiller is ensuring the creation of all the decision object collections")
636  __log.debug("'%s'", decObj)
637  # Gap filler is also used to perform re-mapping of the HypoAlg outputs which is a sub-set of decObj
638  tool.FixLinks = list(decObjHypoOut)
639  # Append and hence confirm all TrigComposite collections
640  tool.TrigCompositeContainer += list(decObj)
641 
642  acc.addEventAlgo(alg, primary=True)
643  return acc
644 
645 
646 def triggerRunCfg( flags, menu=None ):
647  """
648  top of the trigger config (for real triggering online or on MC)
649  Returns: ca only
650  """
651  acc = ComponentAccumulator()
652 
653  # L1ConfigSvc needed for HLTSeeding
654  from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg
655 
656  acc.merge( L1ConfigSvcCfg(flags) )
657 
658  acc.addSequence( seqOR( "HLTTop") )
659 
660  # HLTPreSeq only used for CostMon so far, skip if CostMon disabled
661  if flags.Trigger.CostMonitoring.doCostMonitoring:
662  acc.addSequence( parOR("HLTPreSeq"), parentName="HLTTop" )
663 
664  from TrigCostMonitor.TrigCostMonitorConfig import TrigCostMonitorCfg
665  acc.merge( TrigCostMonitorCfg( flags ), sequenceName="HLTPreSeq" )
666 
667 
668  acc.addSequence( parOR("HLTBeginSeq"), parentName="HLTTop" )
669  # bit of a hack as for "legacy" type JO a seq name for cache creators has to be given,
670  # in newJO realm the seqName will be removed as a comp fragment shoudl be unaware of where it will be attached
671 
672  if flags.Trigger.doCFEmulationTest:
673  from TriggerMenuMT.CFtest.EmuStepProcessingConfig import emulateHLTSeedingCfg
674  hltSeedingAcc = emulateHLTSeedingCfg(flags)
675  else:
676  acc.merge( triggerIDCCacheCreatorsCfg( flags, seqName="AthAlgSeq" ), sequenceName="HLTBeginSeq" )
677 
678  if flags.Trigger.doRuntimeNaviVal: # Validate we can parse the menu with the standalone chain parser
679  acc.addEventAlgo( CompFactory.TrigChainNameParserChecker(), sequenceName="HLTBeginSeq" )
680 
681  from HLTSeeding.HLTSeedingConfig import HLTSeedingCfg
682  hltSeedingAcc = HLTSeedingCfg( flags )
683 
684  from AthenaConfiguration.Enums import LHCPeriod
685  if flags.GeoModel.Run > LHCPeriod.Run3:
686  from InDetConfig.TrackRecoConfig import SiDetectorElementStatusCfg
687  acc.merge(SiDetectorElementStatusCfg( flags), sequenceName="HLTBeginSeq")
688 
689  # TODO, once moved to newJO the algorithm can be added to hltSeedingAcc and merging will be sufficient here
690  acc.merge( hltSeedingAcc, sequenceName="HLTBeginSeq" )
691 
692  # detour to the menu here, (missing now, instead a temporary hack)
693  if menu:
694  menuAcc = menu( flags )
695  HLTSteps = menuAcc.getSequence( "HLTAllSteps" )
696  __log.info( "Configured menu with %d steps", len(HLTSteps.Members))
697  acc.merge( menuAcc, sequenceName="HLTTop")
698 
699  # collect hypothesis algorithms from all sequence
700  hypos = collectHypos( HLTSteps )
701  filters = collectFilters( HLTSteps )
702  acc.addSequence( parOR("HLTEndSeq"), parentName="HLTTop" )
703  acc.addSequence( seqAND("HLTFinalizeSeq"), parentName="HLTEndSeq" )
704 
705  nfilters = sum(len(v) for v in filters.values())
706  nhypos = sum(len(v) for v in hypos.values())
707  __log.info( "Algorithms counting: Number of Filter algorithms: %d - Number of Hypo algoirthms: %d", nfilters , nhypos)
708 
709  summaryAcc, summaryAlg = triggerSummaryCfg( flags, hypos )
710  acc.merge( summaryAcc, sequenceName="HLTFinalizeSeq" )
711  if flags.Trigger.doCFEmulationTest:
712  summaryAlg.Prescaler=CompFactory.PrescalingEmulationTool()
713  acc.addEventAlgo( summaryAlg, sequenceName="HLTFinalizeSeq" )
714  acc.merge( triggerEndOfEventCfg(flags), sequenceName="HLTFinalizeSeq" )
715 
716  #once menu is included we should configure monitoring here as below
717  hltSeedingAlg = hltSeedingAcc.getEventAlgo("HLTSeeding")
718 
719  monitoringAcc, monitoringAlg = triggerMonitoringCfg( flags, hypos, filters, hltSeedingAlg )
720  acc.merge( monitoringAcc, sequenceName="HLTEndSeq" )
721  acc.addEventAlgo( monitoringAlg, sequenceName="HLTEndSeq" )
722 
723  decObj, decObjHypoOut = collectDecisionObjects( hypos, filters, hltSeedingAlg, summaryAlg )
724 
725 
726  # configure components need to normalise output before writing out
727  viewMakers = collectViewMakers( HLTSteps )
728 
729  # Add HLT Navigation to EDM list
730  # TODO: DO NOT directly modify TriggerHLTListRun3
731  from TrigEDMConfig.TriggerEDMRun3 import TriggerHLTListRun3, addHLTNavigationToEDMList
732  __log.info( "Number of EDM items before adding navigation: %d", len(TriggerHLTListRun3))
733  addHLTNavigationToEDMList(flags, TriggerHLTListRun3, decObj, decObjHypoOut)
734  __log.info( "Number of EDM items after adding navigation: %d", len(TriggerHLTListRun3))
735 
736  # Add Extra to EDM list
737  # TODO: DO NOT directly modify TriggerHLTListRun3
738  if flags.Trigger.ExtraEDMList:
739  from TrigEDMConfig.TriggerEDM import _addExtraCollectionsToEDMList
740  __log.info( "Adding extra collections to EDM: %s", str(flags.Trigger.ExtraEDMList))
741  _addExtraCollectionsToEDMList(TriggerHLTListRun3, flags.Trigger.ExtraEDMList)
742 
743  # Configure output writing
744  outputAcc, edmSet = triggerOutputCfg( flags, hypos )
745  acc.merge( outputAcc, sequenceName="HLTTop" )
746 
747  # Cost monitoring should be finished between acceptedEventTopSeq and EDMCreator
748  from TrigCostMonitor.TrigCostMonitorConfig import TrigCostMonitorFinalizeCfg
749  costFinalizeAlg = TrigCostMonitorFinalizeCfg(flags)
750  if costFinalizeAlg: # None if Cost Monitoring is turned off
751  acc.addEventAlgo(costFinalizeAlg, sequenceName="HLTFinalizeSeq" )
752 
753  if edmSet:
754  # The order is important: 1) view merging, 2) gap filling
755  acc.merge( triggerMergeViewsCfg(flags, viewMakers), sequenceName="HLTFinalizeSeq" )
756  # For BS output, the EDM gap-filling is done in Reco. Online we only ensure a
757  # consistent set of decision objects (TrigCompositeContainer):
758  acc.merge( triggerEDMGapFillerCfg(flags, [edmSet] if edmSet!='BS' else [],
759  decObj, decObjHypoOut), sequenceName="HLTFinalizeSeq" )
760 
761  if flags.Trigger.doOnlineNavigationCompactification:
762  from TrigNavSlimmingMT.TrigNavSlimmingMTConfig import getTrigNavSlimmingMTOnlineConfig
763  onlineSlimAlg = getTrigNavSlimmingMTOnlineConfig(flags)
764  acc.addEventAlgo( onlineSlimAlg, sequenceName="HLTFinalizeSeq" )
765 
766  # Cleanup menu config to allow garbage collection (ATR-28855)
767  from TriggerMenuMT.HLT.Config.Utility.HLTMenuConfig import HLTMenuConfig
768  HLTMenuConfig.destroy()
769 
770  return acc
771 
772 
773 def triggerIDCCacheCreatorsCfg(flags, seqName = None):
774  """
775  Configures IDC cache loading
776  Returns: CA
777  """
778  acc = ComponentAccumulator(seqName)
779 
780  if flags.Trigger.doMuon:
781  from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheCfg
782  acc.merge( MuonCacheCfg(flags), sequenceName = seqName )
783 
784  from MuonConfig.MuonRdoDecodeConfig import MuonPrdCacheCfg
785  acc.merge( MuonPrdCacheCfg(flags), sequenceName = seqName )
786 
787  if flags.Trigger.doID:
788  from TrigInDetConfig.TrigInDetConfig import InDetIDCCacheCreatorCfg
789  acc.merge( InDetIDCCacheCreatorCfg(flags), sequenceName = seqName )
790 
791  if flags.Trigger.useActsTracking:
792  from TrigInDetConfig.TrigInDetConfig import ActsIDCCacheCreatorCfg
793  acc.merge( ActsIDCCacheCreatorCfg(flags), sequenceName = seqName )
794 
795  return acc
796 
797 
799  from TriggerMenuMT.HLT.Config.Utility.HLTMenuConfig import HLTMenuConfig
800 
801  acceptedEventChainDicts = [cd for cd in HLTMenuConfig.dictsList() \
802  if 'Calib' in cd['signatures'] \
803  and 'acceptedevts' in cd['chainParts'][0]['purpose']]
804 
805  acc = ComponentAccumulator()
806 
807  # If no relevant chains or just not desired, can shortcut and return empty CA
808  if not (flags.Trigger.enableEndOfEventProcessing and acceptedEventChainDicts):
809  return acc
810 
811  # Add end-of-event sequences executed conditionally on the DecisionSummaryMakerAlg filter status
812  endOfEventRoIMaker = CompFactory.EndOfEventROIConfirmerAlg('EndOfEventROIConfirmerAlg')
813  acc.addEventAlgo( endOfEventRoIMaker )
814  acc.addSequence( parOR("acceptedEventTopSeq") )
815  acc.getSequence("acceptedEventTopSeq").IgnoreFilterPassed=True
816 
817  # Define the alg configuration by purpose
818  def EndOfEventSeqCfg(flags, prescaleChain, purposes):
819  acc = ComponentAccumulator()
820  seqLabel = prescaleChain.replace('HLT_acceptedevts','')
821  seqName = 'acceptedEventSeq'+seqLabel
822  acc.addSequence( seqAND(seqName) )
823 
824  endOfEventFilterAlg = CompFactory.EndOfEventFilterAlg('EndOfEventFilterAlg'+seqLabel, ChainName=prescaleChain)
825  acc.addEventAlgo(endOfEventFilterAlg, sequenceName=seqName)
826  # The LAr Noise Burst end-of-event sequence
827  if 'larnoiseburst' in purposes:
828  # Add stream filter to EndOfEventFilterAlg
829  # Only accept events going to streams that already do full calo reco
830  # CosmicCalo explicitly requested [ATR-26096]
831  endOfEventFilterAlg.StreamFilter = ['Main','VBFDelayed','TLA','DarkJetPEBTLA','FTagPEBTLA','CosmicCalo']
832 
833  from TriggerMenuMT.HLT.CalibCosmicMon.CalibChainConfiguration import getLArNoiseBurstRecoCfg
834  acc.merge(getLArNoiseBurstRecoCfg(flags), sequenceName=seqName)
835  elif any(purpose.startswith("met") for purpose in purposes):
836  from TriggerMenuMT.HLT.MET.EndOfEvent import getMETRecoSequences
837  metcfg, rois, streams = getMETRecoSequences(flags, purposes)
838  endOfEventFilterAlg.StreamFilter = streams
839  endOfEventRoIMaker.RoIs = [x for x in rois if x not in endOfEventRoIMaker.RoIs]
840  acc.merge(metcfg, sequenceName=seqName)
841 
842  return acc
843 
844 
845  for acceptedEventChainDict in acceptedEventChainDicts:
846  # Common config for each chain
847  prescaleChain = acceptedEventChainDict['chainName']
848  # Now add chain-specific end-of-event sequences executed conditionally on the prescale
849  purposes = acceptedEventChainDict['chainParts'][0]['purpose']
850 
851  acc.merge(EndOfEventSeqCfg(flags, prescaleChain, purposes), sequenceName="acceptedEventTopSeq")
852 
853  return acc
854 
855 def triggerPostRunCfg(flags):
856  """
857  Configures components needed for processing trigger information in RAW/ESD step
858  Returns: ca only
859  """
860  acc = ComponentAccumulator()
861  # configure in order BS decodnig, EDM gap filling, insertion of trigger metadata to ESD
862 
863  return acc
864 
865 
866 if __name__ == "__main__":
867  from AthenaConfiguration.AllConfigFlags import initConfigFlags
868 
869  flags = initConfigFlags()
870  flags.Trigger.forceEnableAllChains = True
871  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",]
872  from AthenaConfiguration.TestDefaults import defaultGeometryTags
873  flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
874  flags.lock()
875 
876  def testMenu(flags):
877  menuCA = ComponentAccumulator()
878  menuCA.addSequence( seqAND("HLTAllSteps") )
879  return menuCA
880 
881  acc = triggerRunCfg( flags, menu = testMenu )
882 
883  f=open("TriggerRunConf.pkl","wb")
884  acc.store(f)
885  f.close()
python.TriggerConfig.triggerMonitoringCfg
def triggerMonitoringCfg(flags, hypos, filters, hltSeeding)
Definition: TriggerConfig.py:228
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:307
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:15
python.TriggerConfig.triggerSummaryCfg
def triggerSummaryCfg(flags, hypos)
Definition: TriggerConfig.py:171
python.CFElements.flatAlgorithmSequences
def flatAlgorithmSequences(start)
Definition: CFElements.py:166
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:798
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
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:23
python.TriggerConfig.__stepNumber
def __stepNumber(stepName)
Definition: TriggerConfig.py:18
python.TrigCompositeUtils.isLegId
def isLegId(chainName)
Definition: DecisionHandling/python/TrigCompositeUtils.py:18
python.TriggerEDM.getRun3BSList
def getRun3BSList(flags, keys)
Definition: TriggerEDM.py:293
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, keepProvenanceTagsRegEx=None, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:16
python.TriggerConfig.triggerEDMGapFillerCfg
def triggerEDMGapFillerCfg(flags, edmSet, decObj=[], decObjHypoOut=[], extraInputs=[], extraOutputs=[])
Definition: TriggerConfig.py:555
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
python.ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
AnalysisTriggerAlgsConfig.RoIBResultToxAODCfg
def RoIBResultToxAODCfg(flags)
Definition: AnalysisTriggerAlgsConfig.py:9
python.TriggerConfig.triggerMergeViewsCfg
def triggerMergeViewsCfg(flags, viewMakers)
Definition: TriggerConfig.py:510
python.TriggerConfig.triggerPostRunCfg
def triggerPostRunCfg(flags)
Definition: TriggerConfig.py:855
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:551
python.TriggerConfig.__decisionsFromHypo
def __decisionsFromHypo(hypo)
Definition: TriggerConfig.py:57
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
python.CFElements.seqAND
def seqAND(name, subs=[])
Definition: CFElements.py:25
python.JetAnalysisCommon.parOR
parOR
Definition: JetAnalysisCommon.py:271
MuonRdoDecodeConfig.MuonPrdCacheCfg
def MuonPrdCacheCfg(flags)
This configuration function creates the IdentifiableCaches for PRD.
Definition: MuonRdoDecodeConfig.py:25
python.ByteStreamConfig.ByteStreamWriteCfg
def ByteStreamWriteCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:100
python.CFElements.seqOR
def seqOR(name, subs=[])
Definition: CFElements.py:33
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.TriggerEDM._addExtraCollectionsToEDMList
def _addExtraCollectionsToEDMList(edmList, extraList)
Definition: TriggerEDM.py:73
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:300
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:646
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:67
TrigNavSlimmingMTConfig.getTrigNavSlimmingMTOnlineConfig
def getTrigNavSlimmingMTOnlineConfig(flags)
Definition: TrigNavSlimmingMTConfig.py:21
python.TrigConfigSvcCfg.L1PrescaleCondAlgCfg
def L1PrescaleCondAlgCfg(flags)
Definition: TrigConfigSvcCfg.py:278
python.TrigConfigSvcCfg.L1ConfigSvcCfg
def L1ConfigSvcCfg(flags)
Definition: TrigConfigSvcCfg.py:203
Trk::open
@ open
Definition: BinningType.h:40
python.TriggerConfig.triggerPOOLOutputCfg
def triggerPOOLOutputCfg(flags)
Definition: TriggerConfig.py:453
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
str
Definition: BTagTrackIpAccessor.cxx:11
python.CFElements.isSequence
def isSequence(obj)
Definition: CFElements.py:72
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:44
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:876
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
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:773