ATLAS Offline Software
TriggerHistSvcConfig.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 from AthenaCommon.Logging import logging
6 log = logging.getLogger('TriggerHistSvcConfig')
7 
8 def setTHistSvcOutput(outputList):
9  """Build the Output list of the THistSvc ensuring minimum set of output files"""
10 
11  if not any('EXPERT' in o for o in outputList):
12  outputList += ["EXPERT DATAFILE='expert-monitoring.root' OPT='RECREATE'"]
13 
14  return
15 
16 
18  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
19  from AthenaConfiguration.ComponentFactory import CompFactory
20 
21  acc = ComponentAccumulator()
22 
23  if flags.Trigger.Online.useOnlineTHistSvc:
24  log.info("Configuring online TrigMonTHistSvc")
25  histSvc = CompFactory.TrigMonTHistSvc("THistSvc") # no outputs in online
26  else:
27  log.info("Configuring offline THistSvc")
28  output = []
29  if flags.Trigger.L1MuonSim.WriteNSWDebugNtuple:
30  output += ["NSWL1Simulation DATAFILE='NSWL1Simulation.root' OPT='RECREATE'"]
31 
32  # add default outputs
33  setTHistSvcOutput(output)
34  histSvc = CompFactory.THistSvc("THistSvc", Output = output)
35 
36  acc.addService( histSvc )
37  return acc
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TriggerHistSvcConfig.setTHistSvcOutput
def setTHistSvcOutput(outputList)
Definition: TriggerHistSvcConfig.py:8
python.TriggerHistSvcConfig.TriggerHistSvcConfig
def TriggerHistSvcConfig(flags)
Definition: TriggerHistSvcConfig.py:17