ATLAS Offline Software
TrigMinBiasMonitoringMT.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 """
6 @brief configuration for the min bias monitoring
7 """
8 from TrigMinBiasMonitoring.TrigMBTSMonitoringMT import TrigMBTS
9 from TrigMinBiasMonitoring.TrigSPTRKMonitoringMT import TrigSPTRK
10 from TrigMinBiasMonitoring.TrigMinBiasEffMonitoring import TrigMinBiasEff
11 from TrigMinBiasMonitoring.TrigAFPSidHypoMonitoring import TrigAFPSidHypoMonitoring
12 from TrigMinBiasMonitoring.TrigFwdAFPMonitoring import TrigFwdAFPAllMonitoringCfg
13 from TrigMinBiasMonitoring.TrigFwdZDCMonitoring import TrigFwdZDCMonitoringAlg
14 from TrigMinBiasMonitoring.TrigHIMonitoringMT import TrigHIMonCfg
15 from TrigMinBiasMonitoring.TrigTRTMonitoring import TrigTRTMonCfg
16 
17 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
18 from AthenaConfiguration.Enums import BeamType
19 from AthenaMonitoring.DQConfigFlags import DQDataType
20 
21 def TrigMinBias(flags):
22  acc = ComponentAccumulator()
23  acc.merge(TrigMBTS(flags))
24  if flags.Beam.Type is not BeamType.Cosmics:
25  acc.merge(TrigSPTRK(flags))
26  acc.merge(TrigMinBiasEff(flags))
27  acc.merge(TrigAFPSidHypoMonitoring(flags))
28  acc.merge(TrigFwdAFPAllMonitoringCfg(flags))
29  if flags.DQ.DataType is DQDataType.HeavyIon:
30  acc.merge(TrigFwdZDCMonitoringAlg(flags))
31  acc.merge(TrigHIMonCfg(flags))
32  acc.merge(TrigTRTMonCfg(flags))
33  return acc
34 
35 
36 if __name__ == "__main__":
37  from AthenaConfiguration.AllConfigFlags import initConfigFlags
38 
39  flags = initConfigFlags()
40  flags.DQ.Environment = "AOD"
41  flags.Output.HISTFileName = 'TestMinBiasMonitorOutput.root'
42  from AthenaConfiguration.TestDefaults import defaultTestFiles
43 
44  flags.Input.Files = defaultTestFiles.AOD_RUN3_DATA
45  flags.Exec.MaxEvents = -1
46  # flags.Common.doExpressProcessing=True # enable for express stream data processing
47  flags.fillFromArgs()
48  flags.lock()
49 
50  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
51  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
52  cfg = MainServicesCfg(flags)
53 
54  cfg.merge(PoolReadCfg(flags))
55  cfg.merge(TrigMinBias(flags))
56 
57  with open("cfg.pkl", "wb") as f:
58  cfg.store(f)
59 
60  status = cfg.run()
61  if status.isFailure():
62  import sys
63  sys.exit(-1)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
TrigFwdZDCMonitoring.TrigFwdZDCMonitoringAlg
def TrigFwdZDCMonitoringAlg(configFlags)
Definition: TrigFwdZDCMonitoring.py:6
TrigAFPSidHypoMonitoring
Definition: TrigAFPSidHypoMonitoring.py:1
TrigMinBiasMonitoringMT.TrigMinBias
def TrigMinBias(flags)
Definition: TrigMinBiasMonitoringMT.py:21
TrigSPTRKMonitoringMT.TrigSPTRK
def TrigSPTRK(configFlags, highGranularity=False)
Definition: TrigSPTRKMonitoringMT.py:16
TrigFwdAFPMonitoring.TrigFwdAFPAllMonitoringCfg
def TrigFwdAFPAllMonitoringCfg(flags)
Definition: TrigFwdAFPMonitoring.py:101
TrigMinBiasEffMonitoring.TrigMinBiasEff
def TrigMinBiasEff(flags)
Definition: TrigMinBiasEffMonitoring.py:79
TrigMBTSMonitoringMT.TrigMBTS
def TrigMBTS(configFlags)
Definition: TrigMBTSMonitoringMT.py:16
TrigHIMonitoringMT.TrigHIMonCfg
def TrigHIMonCfg(flags)
Definition: TrigHIMonitoringMT.py:39
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
Trk::open
@ open
Definition: BinningType.h:40
TrigTRTMonitoring.TrigTRTMonCfg
def TrigTRTMonCfg(flags)
Definition: TrigTRTMonitoring.py:14
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69