4 from EventDisplaysOnline.EventDisplaysOnlineHelpers
import GetBFields, WaitForPartition, GetUniqueJobID, GetRunNumber
6 if not flags.OnlineEventDisplays.OfflineTest:
7 from AthenaConfiguration.AutoConfigOnlineRecoFlags
import autoConfigOnlineRecoFlags
12 flags.OnlineEventDisplays.TriggerStreams = [
'MinBias',
'express',
'ZeroBias',
'CosmicCalo',
'IDCosmic',
'CosmicMuons',
'Background',
'Standby',
'L1Calo',
'Main']
13 if flags.OnlineEventDisplays.BeamSplashMode:
14 flags.OnlineEventDisplays.TriggerStreams = [
'MinBias']
17 flags.OnlineEventDisplays.OutputDirectory =
"/atlas/EventDisplayEvents/"
19 if flags.OnlineEventDisplays.OfflineTest:
20 flags.OnlineEventDisplays.OutputDirectory =
"."
33 flags.OnlineEventDisplays.PartitionName=
'ATLAS'
35 if flags.OnlineEventDisplays.HIMode:
36 flags.OnlineEventDisplays.MaxEvents=200
37 flags.OnlineEventDisplays.ProjectTag=
'data24_hi'
38 flags.OnlineEventDisplays.PublicStreams=[
'HardProbes']
39 if flags.OnlineEventDisplays.CosmicMode:
40 flags.OnlineEventDisplays.MaxEvents=200
41 flags.OnlineEventDisplays.ProjectTag=
'data24_cos'
42 flags.OnlineEventDisplays.PublicStreams=[
'']
43 if flags.OnlineEventDisplays.BeamSplashMode:
44 flags.OnlineEventDisplays.MaxEvents=-1
45 flags.OnlineEventDisplays.ProjectTag=
'data24_13p6TeV'
46 flags.OnlineEventDisplays.PublicStreams=[
'']
48 flags.OnlineEventDisplays.MaxEvents=50
49 flags.OnlineEventDisplays.ProjectTag=
'data24_13p6TeV'
50 flags.OnlineEventDisplays.PublicStreams=[
'Main']
53 if not flags.OnlineEventDisplays.OfflineTest:
56 if not flags.OnlineEventDisplays.OfflineTest:
58 IPC_timeout =
int(os.environ[
'TDAQ_IPC_TIMEOUT'])
59 print(
" IPC_timeout Envrionment Variable = %d" %IPC_timeout)
62 flags.IOVDb.DatabaseInstance =
"CONDBR2"
63 if flags.OnlineEventDisplays.OfflineTest:
64 flags.IOVDb.GlobalTag =
'CONDBR2-BLKPA-2024-03'
66 flags.IOVDb.GlobalTag =
'CONDBR2-HLTP-2024-02'
69 flags.GeoModel.AtlasVersion =
'ATLAS-R3S-2021-03-02-00'
71 if flags.OnlineEventDisplays.HIMode:
72 flags.Beam.BunchSpacing = 100
74 flags.Trigger.triggerConfig=
'DB'
79 if flags.OnlineEventDisplays.PartitionName !=
'ATLAS' or flags.OnlineEventDisplays.OfflineTest:
80 flags.Exec.MaxEvents = 5
81 flags.Output.ESDFileName = flags.OnlineEventDisplays.OutputDirectory +
"ESD-%s-%s.pool.root" % (jobId[3], jobId[4])
83 flags.Exec.MaxEvents = 20000
84 flags.Output.ESDFileName =
"ESD-%s-%s.pool.root" % (jobId[3], jobId[4])
86 flags.Output.doWriteESD =
True
87 flags.Output.doJiveXML =
False
89 if flags.OnlineEventDisplays.OfflineTest:
90 flags.Input.Files = [
'/eos/home-m/myexley/sharedWithATLASauthors/data24_13p6TeV.00482485.physics_Main.daq.RAW._lb0111._SFO-13._0002.data']
92 flags.Input.Files = []
94 flags.Reco.EnableTrigger =
False
95 flags.Detector.GeometryForward =
False
96 flags.Detector.EnableFwdRegion =
False
97 flags.LAr.doHVCorr =
False
99 if flags.OnlineEventDisplays.BeamSplashMode:
100 flags.Reco.EnableJet=
False
101 flags.Reco.EnableMet=
False
102 flags.Reco.EnableTau=
False
103 flags.Reco.EnablePFlow=
False
104 flags.Reco.EnableBTagging=
False
105 flags.Reco.EnableEgamma=
False
106 flags.Reco.EnableCombinedMuon=
False
109 flags.Exec.OutputLevel = INFO
110 flags.Concurrency.NumThreads = 0
112 flags.Common.isOnline =
not flags.OnlineEventDisplays.OfflineTest
114 if flags.OnlineEventDisplays.PartitionName ==
'ATLAS' and not flags.OnlineEventDisplays.OfflineTest:
116 run_number =
GetRunNumber(flags.OnlineEventDisplays.PartitionName)
117 flags.Input.OverrideRunNumber =
True
118 flags.Input.RunNumbers = [run_number]
122 flags.BField.override =
True
123 flags.BField.solenoidOn = solenoidOn
124 flags.BField.barrelToroidOn = toroidOn
125 flags.BField.endcapToroidOn = toroidOn
128 if (flags.OnlineEventDisplays.PartitionName ==
'GMTestPartition' or flags.OnlineEventDisplays.PartitionName ==
'GMTestPartitionT9'):
129 flags.Input.OverrideRunNumber =
True
130 flags.Input.RunNumbers = [454188]
131 flags.Input.LumiBlockNumbers = [1]
132 flags.Input.ProjectName = flags.OnlineEventDisplays.ProjectTag
134 from AthenaConfiguration.Enums
import BeamType
135 if not flags.OnlineEventDisplays.OfflineTest:
136 if flags.OnlineEventDisplays.CosmicMode:
137 flags.Beam.Type = BeamType.Cosmics
139 flags.Beam.Type = BeamType.Collisions
144 from RecJobTransforms.RecoSteering
import RecoSteering
147 from IOVDbSvc.IOVDbSvcConfig
import addOverride
148 if not flags.OnlineEventDisplays.OfflineTest:
149 cfg.merge(
addOverride(flags,
"/TRT/Onl/Calib/PID_NN",
"TRTCalibPID_NN_v2", db=
""))
152 if not flags.OnlineEventDisplays.OfflineTest:
153 from EventDisplaysOnline.ByteStreamConfig
import ByteStreamCfg
156 from EventDisplaysOnline.OnlineEventDisplaysSvcConfig
import OnlineEventDisplaysSvcCfg
159 from JiveXML.OnlineStreamToFileConfig
import OnlineStreamToFileCfg
162 streamToServerTool =
None
163 if not flags.OnlineEventDisplays.OfflineTest:
164 from JiveXML.OnlineStreamToServerConfig
import OnlineStreamToServerCfg
167 from JiveXML.JiveXMLConfig
import AlgoJiveXMLCfg
169 StreamToFileTool = streamToFileTool,
170 StreamToServerTool = streamToServerTool,
171 OnlineMode =
not flags.OnlineEventDisplays.OfflineTest))
175 from AthenaServices.OutputStreamSequencerSvcConfig
import OutputStreamSequencerSvcCfg
177 from OutputStreamAthenaPool.OutputStreamConfig
import outputStreamName
180 from VP1AlgsEventProd.VP1AlgsEventProdConfig
import VP1AlgsEventProdCfg
184 if flags.OnlineEventDisplays.BeamSplashMode:
185 cfg.getEventAlgo(
"MuonSegmentMaker").doStgcSegments=
False
186 cfg.getEventAlgo(
"MuonSegmentMaker").doMMSegments=
False
187 cfg.getEventAlgo(
"MuonSegmentMaker_NCB").doStgcSegments=
False
188 cfg.getEventAlgo(
"MuonSegmentMaker_NCB").doMMSegments=
False
189 cfg.dropEventAlgo(
"QuadNSW_MuonSegmentCnvAlg")
191 cfg.getService(
"PoolSvc").WriteCatalog =
"xmlcatalog_file:PoolFileCatalog_%s_%s.xml" % (jobId[3], jobId[4])
197 cfg.getService(
"PoolSvc").ReadCatalog += [
"xmlcatalog_file:/det/dqm/GlobalMonitoring/PoolFileCatalog_M7/PoolFileCatalog.xml"]
200 with open(
"OnlineEventDisplays.pkl",
"wb")
as f: