ATLAS Offline Software
DecisionHandlingConfig.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 #
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
7 
8 EnableFilterMonitoring = False # Can be changed in a precommand/preExec
9 
10 def setupFilterMonitoring( flags, filterAlg ):
11  if not EnableFilterMonitoring or not hasattr(filterAlg, "Input"):
12  return
13 
14  monTool = GenericMonitoringTool(flags, 'MonTool')
15 
16  inputKeys = [str(i) for i in filterAlg.Input]
17 
18  monTool.HistPath="HLTFramework/Filters"
19  monTool.defineHistogram( 'name,stat;'+filterAlg.getName(), path='EXPERT', type='TH2I',
20  title='Input activity fraction;;presence',
21  xbins=len(inputKeys), xmin=0, xmax=len(inputKeys)+2, xlabels=['exec', 'anyvalid']+inputKeys,
22  ybins=2, ymin=-0.5, ymax=1.5, ylabels=['no', 'yes'] )
23 
24  filterAlg.MonTool = monTool
25 
26 
27 def TriggerSummaryAlg( flags, name ):
28  monTool = GenericMonitoringTool(flags, 'MonTool', HistPath='HLTFramework/'+name)
29  monTool.defineHistogram('TIME_SinceEventStart', path='EXPERT', type='TH1F',
30  title='Time since beginning of event processing;time [ms]',
31  xbins=100, xmin=0, xmax=3.5e3 )
32 
33  alg = CompFactory.TriggerSummaryAlg( name,
34  MonTool = monTool )
35  return alg
36 
37 
38 def ComboHypoCfg( name ):
39  acc = ComponentAccumulator()
40  acc.addEventAlgo( CompFactory.ComboHypo(name) )
41  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.DecisionHandlingConfig.TriggerSummaryAlg
def TriggerSummaryAlg(flags, name)
Definition: DecisionHandlingConfig.py:27
python.DecisionHandlingConfig.setupFilterMonitoring
def setupFilterMonitoring(flags, filterAlg)
Definition: DecisionHandlingConfig.py:10
GenericMonitoringTool
Definition: GenericMonitoringTool.py:1
str
Definition: BTagTrackIpAccessor.cxx:11
python.DecisionHandlingConfig.ComboHypoCfg
def ComboHypoCfg(name)
Definition: DecisionHandlingConfig.py:38