8 Component Accumulator based configuration of Trigger Cost Service and associated Auditor
10 from AthenaConfiguration.ComponentFactory
import CompFactory
11 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
12 from AthenaCommon.Logging
import logging
13 log = logging.getLogger(
'TrigCostMonitorSetup')
17 if flags.Trigger.CostMonitoring.doCostMonitoring:
18 costSvc = CompFactory.TrigCostSvc(
19 MonitorAllEvents = flags.Trigger.CostMonitoring.monitorAllEvents,
22 acc.addService(costSvc)
23 acc.addAuditor(CompFactory.TrigCostAuditor())
24 acc.setAppProperty(
"AuditAlgorithms",
True)
26 costSupervisorAlg = CompFactory.TrigCostSupervisorAlg()
27 costSupervisorAlg.TrigCostSvc = costSvc
28 acc.addEventAlgo(costSupervisorAlg)
30 log.info(
'Enabling online trigger cost monitoring')
32 log.info(
'Will NOT schedule online trigger cost monitoring')
40 Component Accumulator based configuration of Trigger Cost Finalize Alg
42 from TrigEDMConfig.TriggerEDM
import recordable
43 from AthenaConfiguration.ComponentFactory
import CompFactory
44 from AthenaCommon.Logging
import logging
45 log = logging.getLogger(
'TrigCostMonitorSetup')
47 if flags.Trigger.CostMonitoring.doCostMonitoring:
48 costFinalizeAlg = CompFactory.TrigCostFinalizeAlg()
49 costFinalizeAlg.CostWriteHandleKey =
recordable(flags.Trigger.CostMonitoring.outputCollection)
51 log.debug(
'Enabling finalize of online trigger cost monitoring')
52 return costFinalizeAlg
54 log.debug(
'Cost monitoring is not enabled - TrigCostFinalizeAlg will not be included')