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