ATLAS Offline Software
LArMonitoringConfig.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 def LArMonitoringConfig(inputFlags):
6 
7  from AthenaMonitoring.DQConfigFlags import DQDataType
8  from LArMonitoring.LArCollisionTimeMonAlg import LArCollisionTimeMonConfig
9  from LArMonitoring.LArAffectedRegionsAlg import LArAffectedRegionsConfig
10  from LArMonitoring.LArDigitMonAlg import LArDigitMonConfig
11  from LArMonitoring.LArRODMonAlg import LArRODMonConfig
12  from LArMonitoring.LArNoisyROMonAlg import LArNoisyROMonConfig
13  from LArMonitoring.LArFEBMonAlg import LArFEBMonConfig
14  from LArMonitoring.LArHVCorrMonAlg import LArHVCorrMonConfig
15  from LArMonitoring.LArCoverageAlg import LArCoverageConfig
16  from LArMonitoring.LArNoiseCorrelationMonAlg import LArNoiseCorrelationMonConfig
17  #FIXME: not working yet
18  #from LArMonitoring.LArSuperCellMonAlg import LArSuperCellMonConfig
19  from LArMonitoring.RecoPT_Phase1NewConfig import LArDTMonitoringConfig
20 
21  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
22  acc = ComponentAccumulator()
23 
24  # algos which can run in ESD but not AOD:
25  if inputFlags.DQ.Environment != 'AOD':
26  if inputFlags.DQ.DataType is not DQDataType.Cosmics:
27  from LumiBlockComps.BunchCrossingCondAlgConfig import BunchCrossingCondAlgCfg
28  acc.merge(BunchCrossingCondAlgCfg(inputFlags))
29  acc.merge(LArCollisionTimeMonConfig(inputFlags))
30  if not inputFlags.Input.isMC:
31  acc.merge(LArNoisyROMonConfig(inputFlags))
32  if 'online' not in inputFlags.DQ.Environment:
33  acc.merge(LArAffectedRegionsConfig(inputFlags))
34  acc.merge(LArHVCorrMonConfig(inputFlags))
35 
36 
37  # and others on RAW data only
38  if inputFlags.DQ.Environment in ('online', 'tier0', 'tier0Raw'):
39  if not inputFlags.Input.isMC:
40  acc.merge(LArFEBMonConfig(inputFlags))
41  acc.merge(LArDigitMonConfig(inputFlags))
42  from LArConfiguration.LArConfigFlags import RawChannelSource
43  if inputFlags.LAr.RawChannelSource != RawChannelSource.Calculated:
44  acc.merge(LArRODMonConfig(inputFlags))
45  acc.merge(LArCoverageConfig(inputFlags))
46  acc.merge(LArNoiseCorrelationMonConfig(inputFlags))
47  from AthenaConfiguration.Enums import LHCPeriod
48  if inputFlags.GeoModel.Run > LHCPeriod.Run2:
49  #FIXME: not working yet
50  #acc.merge(LArSuperCellMonConfig(inputFlags))
51  acc.merge(LArDTMonitoringConfig(inputFlags,''))
52 
53  return acc
54 
55 
56 
57 if __name__=='__main__':
58 
59  from AthenaConfiguration.AllConfigFlags import initConfigFlags
61  from AthenaCommon.Logging import log
62  from AthenaCommon.Constants import DEBUG
63  log.setLevel(DEBUG)
64 
65 
66  from AthenaConfiguration.TestDefaults import defaultTestFiles
67  flags.Input.Files = defaultTestFiles.RAW_RUN2
68 
69  flags.Output.HISTFileName = 'LArMonitoringOutput.root'
70  flags.DQ.enableLumiAccess = True
71  flags.DQ.useTrigger = True
72  flags.lock()
73 
74  from CaloRec.CaloRecoConfig import CaloRecoCfg
75  cfg=CaloRecoCfg(flags)
76 
77  #from CaloD3PDMaker.CaloD3PDConfig import CaloD3PDCfg,CaloD3PDAlg
78  #cfg.merge(CaloD3PDCfg(flags, filename=flags.Output.HISTFileName, streamname='CombinedMonitoring'))
79 
80  acc = LArMonitoringConfig(flags)
81  cfg.merge(acc)
82 
83  cfg.printConfig()
84 
85  flags.dump()
86  f=open("LArMonitoring.pkl","wb")
87  cfg.store(f)
88  f.close()
89 
90  #cfg.run(100)
LArHVCorrMonAlg.LArHVCorrMonConfig
def LArHVCorrMonConfig(flags)
Definition: LArHVCorrMonAlg.py:5
python.CaloRecoConfig.CaloRecoCfg
def CaloRecoCfg(flags, clustersname=None)
Definition: CaloRecoConfig.py:9
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
LArFEBMonAlg.LArFEBMonConfig
def LArFEBMonConfig(flags, cellDebug=False, dspDebug=False)
Definition: LArFEBMonAlg.py:4
LArDigitMonAlg.LArDigitMonConfig
def LArDigitMonConfig(flags)
Definition: LArDigitMonAlg.py:5
LArRODMonAlg.LArRODMonConfig
def LArRODMonConfig(flags, cellDebug=False, dspDebug=False)
Definition: LArRODMonAlg.py:5
python.BunchCrossingCondAlgConfig.BunchCrossingCondAlgCfg
def BunchCrossingCondAlgCfg(flags)
Definition: BunchCrossingCondAlgConfig.py:8
python.LArMonitoringConfig.LArMonitoringConfig
def LArMonitoringConfig(inputFlags)
Definition: LArMonitoringConfig.py:5
LArCoverageAlg.LArCoverageConfig
def LArCoverageConfig(flags)
Definition: LArCoverageAlg.py:11
Constants
some useful constants -------------------------------------------------—
LArNoiseCorrelationMonAlg.LArNoiseCorrelationMonConfig
def LArNoiseCorrelationMonConfig(flags)
Definition: LArNoiseCorrelationMonAlg.py:4
LArAffectedRegionsAlg.LArAffectedRegionsConfig
def LArAffectedRegionsConfig(flags)
Definition: LArAffectedRegionsAlg.py:5
LArNoisyROMonAlg.LArNoisyROMonConfig
def LArNoisyROMonConfig(flags, inKey="", NoisyFEBDefStr="(>30 chan with Q>4000)", MNBTightFEBDefStr="", MNBTight_PsVetoFEBDefStr="", MNBLooseFEBDefStr="")
Definition: LArNoisyROMonAlg.py:5
LArCollisionTimeMonAlg.LArCollisionTimeMonConfig
def LArCollisionTimeMonConfig(flags)
Definition: LArCollisionTimeMonAlg.py:6
Trk::open
@ open
Definition: BinningType.h:40
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
RecoPT_Phase1NewConfig.LArDTMonitoringConfig
def LArDTMonitoringConfig(flags, STREAM)
Definition: RecoPT_Phase1NewConfig.py:6