ATLAS Offline Software
Loading...
Searching...
No Matches
CTPMonitoringConfig.py
Go to the documentation of this file.
2# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3#
4
6 # local printing
7 import logging
8 local_logger = logging.getLogger('AthenaMonitoringCfg')
9 info = local_logger.info
10 info('In CTPMonitoringConfig')
11
12 '''Function to call CTP DQ monitoring algorithms'''
13 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
14 result = ComponentAccumulator()
15 #get these for Data only
16 if not flags.Input.isMC:
17 info('CTPMonitoringConfig: attempting to add DATA COOL folders')
18 from IOVDbSvc.IOVDbSvcConfig import addFolders
19 if not flags.Common.isOnline:
20 result.merge(addFolders(flags,'/LHC/DCS/FILLSTATE','DCS_OFL',className='CondAttrListCollection'))
21
22 result.merge(addFolders(flags,'/TDAQ/RunCtrl/DataTakingMode','TDAQ',className='AthenaAttributeList'))
23 info('CTPMonitoringConfig: added DATA COOL folders')
24
25 # add CTP and MUCTPI data to ByteStreamAddressProviderSvc
26 if flags.DQ.Environment in ('online', 'tier0', 'tier0Raw'):
27 #info('In CTPMonitoringConfig DQ.Environment: %s', flags.DQ.Environment )
28 from TriggerJobOpts.TriggerByteStreamConfig import ByteStreamReadCfg
29 result.merge(ByteStreamReadCfg(flags, [
30 "MuCTPI_RDO/MUCTPI_RDO",
31 "CTP_RDO/CTP_RDO",
32 #"MuCTPI_RIO/MUCTPI_RIO",
33 "CTP_RIO/CTP_RIO"
34 ]))
35 info('In CTPMonitoringConfig added ByteStreamReadCfg MUCTPI_RDO,CTP_RDO,CTP_RIO' )
36
37 # If we're not putting trigger objects in event store, can't monitor them
38 if not flags.Trigger.Online.isPartition:
39 if not flags.DQ.triggerDataAvailable:
40 return result
41
42 #isData = not flags.Input.isMC
43 # monitoring algorithm configs
44 # only when input is RAW
45 #if flags.DQ.Environment in ('online', 'tier0', 'tier0Raw'):
46
47
49
50 #info('before results_merge CTPMonitoringConfig')
51
52 if flags.DQ.Environment not in ( 'AOD', 'DAOD_PHYS', 'tier0ESD'): #, 'tier0Raw' ):
53 from TrigT1CTMonitoring.BSMonitoringAlgorithm import BSMonitoringConfig
54 result.merge(BSMonitoringConfig(flags))
55 info('CTPMonitoringConfig: requested: result.merge(BSMonitoringConfig(flags))')
56 info('after results_merge CTPMonitoringConfig')
57 return result
58
59if __name__=='__main__':
60 from AthenaConfiguration.AllConfigFlags import initConfigFlags
61 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
62
63 flags = initConfigFlags()
64 from AthenaConfiguration.TestDefaults import defaultGeometryTags
65 flags.GeoModel.AtlasVersion=defaultGeometryTags.RUN3
66 flags.Scheduler.CheckDependencies = True
67 flags.Scheduler.ShowDataDeps = True
68 flags.Scheduler.ShowDataFlow = True
69 flags.Scheduler.ShowControlFlow = True
70 flags.Scheduler.EnableVerboseViews = True
71 flags.Detector.GeometryZDC=False
72 flags.Detector.GeometryAFP=False
73 flags.Detector.GeometryALFA=False
74 flags.Detector.GeometryLucid=False
75 flags.Detector.GeometryMDT=False
76 flags.Detector.GeometryMM=False
77 flags.Detector.GeometryMuon=False
78 flags.Trigger.decodeHLT=False
79 flags.Trigger.enableL1MuonPhase1=False
80 flags.Trigger.L1.doMuon=True
81 flags.Trigger.L1.doCalo=False
82 flags.Trigger.L1.doTopo=True
83 flags.Trigger.L1.doCTP=True
84 flags.Reco.EnableCombinedMuon=True
85 #flags.Reco.EnableTrigger = False
86 # This does not work in this context
87 # run = flags.GeoModel.Run
88 # The EDM Version should be auto configured, but is not working at the moment, so is set by hand
89
90 flags.Output.AODFileName="AOD.pool.root"
91 flags.Output.HISTFileName="HIST.root"
92 flags.Output.doWriteAOD=True
93
94 flags.fillFromArgs()
95 flags.lock()
96 # Next line is for debugging
97# flags.dump()
98
99 acc=MainServicesCfg(flags)
100 acc.merge( CTPMonitoringConfig(flags) )
101
102 status = acc.run()
103 if status.isFailure():
104 import sys
105 sys.exit(-1)