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