Skip to content
Snippets Groups Projects
Commit e7d9071f authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'online-ED-r22' into 'master'

Update online Event Displays configuration for rel22

Closes ATLASRECTS-5496

See merge request atlas/athena!34926
parents 4b157c02 6ab7c2a4
No related branches found
No related tags found
No related merge requests found
...@@ -21,4 +21,4 @@ def getEventInfo (aKey): ...@@ -21,4 +21,4 @@ def getEventInfo (aKey):
athena> print e.event_ID().event_number() athena> print e.event_ID().event_number()
""" """
return PyK.retrieve(PyK.GNS.EventInfo,aKey) return PyK.retrieve('xAOD::EventInfo',aKey)
...@@ -311,6 +311,17 @@ from AthenaCommon.GlobalFlags import globalflags ...@@ -311,6 +311,17 @@ from AthenaCommon.GlobalFlags import globalflags
#globalflags.DatabaseInstance = "CONDBR2" #globalflags.DatabaseInstance = "CONDBR2"
globalflags.DatabaseInstance.set_Value_and_Lock("CONDBR2") globalflags.DatabaseInstance.set_Value_and_Lock("CONDBR2")
from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault
LuminosityCondAlgOnlineDefault()
from LumiBlockComps.LumiBlockMuWriterDefault import LumiBlockMuWriterDefault
LumiBlockMuWriterDefault()
from AthenaCommon.AppMgr import ToolSvc
from AthenaCommon import CfgMgr
if not hasattr(ToolSvc, "LumiBlockMuTool"):
ToolSvc += CfgMgr.LumiBlockMuTool("LumiBlockMuTool")
## Another Problem with LAR offline databases ## Another Problem with LAR offline databases
from LArConditionsCommon.LArCondFlags import larCondFlags from LArConditionsCommon.LArCondFlags import larCondFlags
#larCondFlags.SingleVersion.set_Value_and_Lock(True) #larCondFlags.SingleVersion.set_Value_and_Lock(True)
......
...@@ -25,60 +25,7 @@ if isOnline and useEmon: ...@@ -25,60 +25,7 @@ if isOnline and useEmon:
#ToolSvc.InDetCosmicsEventPhaseTool.GlobalOffset = 0 #ToolSvc.InDetCosmicsEventPhaseTool.GlobalOffset = 0
ToolSvc.InDetPixelClusterOnTrackTool.ErrorStrategy=1 # Added 13 Jul 2020 from ATLASRECTS-5544
###
### Fix problem in PixelConditionsTools
### From Fares Djama
### " the RUN2 pixel tags have been copied from RUN1,
### while we have a new detector, the IBL.
### We need to add a new IOV to our tags in the online.
### I guess that's the same for all other condb folders"
###
#
# This part is only for online (SMWANG : Nov 17th 2015)
#
#from IOVDbSvc.CondDB import conddb
#
#if not conddb.folderRequested("PIXEL/PixReco"):
# conddb.addFolder('PIXEL','/PIXEL/PixReco')
#if not conddb.folderRequested("PIXEL/PixCalib"):
# conddb.addFolder('PIXEL','/PIXEL/PixCalib')
#conddb.blockFolder("/PIXEL/PixCalib")
#conddb.blockFolder("/PIXEL/PixReco")
#
#conddb.addFolderWithTag("/det/indet/M8/AtlasProduction-20.1.0.1/NewHLT.db;dbname=CONDBR2","/PIXEL/PixReco","PixReco-HLT-RUN12-000-01",force=True)
#conddb.addFolderWithTag("/det/indet/M8/AtlasProduction-20.1.0.1/NewHLT.db;dbname=CONDBR2","/PIXEL/PixCalib","PixReco-HLT-RUN12-000-01",force=True)
#
# Need to get this part to work online and offline !!! (SMWANG : Nov 17th 2015)
#
if (isOnline and not isOfflineTest):
from IOVDbSvc.CondDB import conddb
if not conddb.folderRequested("PIXEL/PixReco"):
conddb.addFolder('PIXEL','/PIXEL/PixReco')
if not conddb.folderRequested("PIXEL/PixCalib"):
conddb.addFolder('PIXEL','/PIXEL/PixCalib')
conddb.blockFolder("/PIXEL/PixCalib")
conddb.blockFolder("/PIXEL/PixReco")
conddb.addFolderWithTag("/det/indet/M8/AtlasProduction-20.1.0.1/NewHLT.db;dbname=CONDBR2","/PIXEL/PixReco","PixReco-HLT-RUN12-000-01",force=True)
conddb.addFolderWithTag("/det/indet/M8/AtlasProduction-20.1.0.1/NewHLT.db;dbname=CONDBR2","/PIXEL/PixCalib","PixReco-HLT-RUN12-000-01",force=True)
if (isOnline and isOfflineTest):
from IOVDbSvc.CondDB import conddb
if not conddb.folderRequested("PIXEL/PixReco"):
conddb.addFolder('PIXEL','/PIXEL/PixReco')
if not conddb.folderRequested("PIXEL/PixCalib"):
conddb.addFolder('PIXEL','/PIXEL/PixCalib')
conddb.blockFolder("/PIXEL/PixCalib")
conddb.blockFolder("/PIXEL/PixReco")
conddb.addFolderWithTag("/afs/cern.ch/work/s/smwang/public/DQM/InDet_online_db/NewHLT.db;dbname=CONDBR2","/PIXEL/PixReco","PixReco-HLT-RUN12-000-01",force=True)
conddb.addFolderWithTag("/afs/cern.ch/work/s/smwang/public/DQM/InDet_online_db/NewHLT.db;dbname=CONDBR2","/PIXEL/PixCalib","PixReco-HLT-RUN12-000-01",force=True)
# ----------------------------- Printout # ----------------------------- Printout
......
...@@ -33,9 +33,6 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ): ...@@ -33,9 +33,6 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
self.StreamToFileTool = None self.StreamToFileTool = None
self.StreamToServerTool = None self.StreamToServerTool = None
self.VP1EventProducer = None self.VP1EventProducer = None
self.TrigBSExtraction = None
self.TrigDecMaker = None
self.TrigDecTool = None
self.run = 0 self.run = 0
self.event = 0 self.event = 0
...@@ -74,33 +71,19 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ): ...@@ -74,33 +71,19 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
if not (self.StreamToFileTool and self.StreamToServerTool and self.VP1EventProducer): if not (self.StreamToFileTool and self.StreamToServerTool and self.VP1EventProducer):
self.getJobOptions() self.getJobOptions()
if not self.TrigDecTool:
try:
self.TrigBSExtraction = PyAthena.py_alg('TrigBSExtraction')
self.TrigDecMaker = PyAthena.py_alg('TrigDecMaker')
self.TrigDecTool = PyAthena.py_tool('Trig::TrigDecisionTool/TrigDecisionTool', iface='Trig::TrigDecisionTool')
self.msg.info("TrigDecTool: %s" % self.TrigDecTool)
except Exception as err:
self.msg.warning("Coult not retrieve TrigDecisionTool: %s" % err)
try: try:
eventInfo = PyEventTools.getEventInfo('') eventInfo = PyEventTools.getEventInfo('EventInfo')
except LookupError as err: except LookupError as err:
self.msg.error("Could not retrieve EventInfo: %s" % err) self.msg.error("Could not retrieve EventInfo: %s" % err)
return StatusCode.Recoverable return StatusCode.Recoverable
try: try:
# Read event info # Read event info
eventID = eventInfo.event_ID() self.run = eventInfo.runNumber()
self.run = eventID.run_number() self.event = eventInfo.eventNumber()
self.event = eventID.event_number()
# Retrieve trigger info # Retrieve trigger info
triggerInfo = eventInfo.trigger_info() streamTags = eventInfo.streamTags()
if triggerInfo:
streamTags = triggerInfo.streamTags()
else:
streamTags = []
except Exception as err: except Exception as err:
self.msg.error("Exception occured while reading event/trigger info: %s" % err) self.msg.error("Exception occured while reading event/trigger info: %s" % err)
return StatusCode.Recoverable return StatusCode.Recoverable
...@@ -119,32 +102,18 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ): ...@@ -119,32 +102,18 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
if tag.type() == 'physics' and tag.name(): if tag.type() == 'physics' and tag.name():
streams += [tag.type()+'_'+tag.name()] streams += [tag.type()+'_'+tag.name()]
# Add special streams to the list (JetTriggers, Public) # Add special streams to the list Public
try:
if self.TrigDecTool:
self.TrigBSExtraction.execute()
self.TrigDecMaker.execute()
if self.TrigDecTool.isPassed('L1_J5') or self.TrigDecTool.isPassed('L1_J10') or self.TrigDecTool.isPassed('L1_J15'):
streams += ['JetTriggers']
#if self.TrigDecTool.isPassed('L1_MBTS_1_1'):
# streams += ['MinBias']
#if self.TrigDecTool.isPassed('L1_MU0') or self.TrigDecTool.isPassed('L1_MU6') or self.TrigDecTool.isPassed('L1_MU10'):
# streams += ['Muons']
except Exception as err:
self.msg.error("Exception occured while using TrigDecTool: %s" % err)
try: try:
for stream in streams: for stream in streams:
if stream in self.public: if stream in self.public:
ready4physics = ISInfoAny() ready4physics = ISInfoAny()
self.dict.getValue('RunParams.Ready4Physics', ready4physics) self.dict.getValue('RunParams.Ready4Physics', ready4physics)
print ("Ready for physics: %s " % ready4physics.get()) print("Ready for physics: %s " % ready4physics.get())
runparams = ISObject(self.partition, 'RunParams.RunParams','RunParams') runparams = ISObject(self.partition, 'RunParams.RunParams','RunParams')
runparams.checkout() runparams.checkout()
physicsReady = ISObject(self.partition, 'RunParams.Ready4Physics','Ready4PhysicsInfo') physicsReady = ISObject(self.partition, 'RunParams.Ready4Physics','Ready4PhysicsInfo')
physicsReady.checkout() physicsReady.checkout()
print ("Ready for physics: %r" % (physicsReady.ready4physics)) print("Ready for physics: %r" % (physicsReady.ready4physics))
#if ready4physics.get() and physicsReady.ready4physics and runparams.T0_project_tag in self.projecttags: #if ready4physics.get() and physicsReady.ready4physics and runparams.T0_project_tag in self.projecttags:
if physicsReady.ready4physics and runparams.T0_project_tag in self.projecttags: if physicsReady.ready4physics and runparams.T0_project_tag in self.projecttags:
streams += ['Public'] streams += ['Public']
...@@ -197,7 +166,7 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ): ...@@ -197,7 +166,7 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
self.StreamToFileTool.getProperty('FileNamePrefix').setValue("%s/JiveXML" % self.directory) self.StreamToFileTool.getProperty('FileNamePrefix').setValue("%s/JiveXML" % self.directory)
# And also for the VP1 event producer algorithm # And also for the VP1 event producer algorithm
self.VP1EventProducer.getProperty('DestinationDirectory').setValue(self.directory) #self.VP1EventProducer.getProperty('DestinationDirectory').setValue(self.directory) # lshi June 22 2020
except Exception as err: except Exception as err:
self.msg.error("Exception occured while setting job options: %s" % err) self.msg.error("Exception occured while setting job options: %s" % err)
return StatusCode.Failure return StatusCode.Failure
...@@ -222,7 +191,7 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ): ...@@ -222,7 +191,7 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
self.msg.verbose("Received incident %s from %s" % (incident.type(), incident.source())) self.msg.verbose("Received incident %s from %s" % (incident.type(), incident.source()))
# Event and trigger info present, decide stream # Event and trigger info present, decide stream
if incident.type() == 'BeginEvent' and incident.source() == 'AthenaEventLoopMgr': if incident.type() == 'BeginEvent' and incident.source() == 'BeginIncFiringAlg':
self.beginEvent() self.beginEvent()
# VP1 writes its file at EndEvent, so we can do cleanup at StoreCleared # VP1 writes its file at EndEvent, so we can do cleanup at StoreCleared
......
...@@ -32,8 +32,7 @@ useAtlantisEmon = False ...@@ -32,8 +32,7 @@ useAtlantisEmon = False
## ------------------------------------------- flags set in: RecExOnline_emonsvc.py (from RecExOnline_jobOptions.py) ## ------------------------------------------- flags set in: RecExOnline_emonsvc.py (from RecExOnline_jobOptions.py)
partitionName = 'ATLAS' partitionName = 'ATLAS'
#Current test partition looping through 2015 data if you want to test when no run is ongoing. #partitionName = 'GMTestPartition' #Test partition serving events from a raw data file if you want to test when no run is ongoing.
#partitionName = 'GMTestPartition_lshi_tdaq6'
publishName = 'EventDisplays' publishName = 'EventDisplays'
if (partitionName == 'ATLAS'): if (partitionName == 'ATLAS'):
...@@ -51,12 +50,12 @@ pickleconfigfile = './ami_recotrf.pickle' ...@@ -51,12 +50,12 @@ pickleconfigfile = './ami_recotrf.pickle'
DataSource = 'data' DataSource = 'data'
InputFormat = 'bytestream' InputFormat = 'bytestream'
fileName = './0.data' fileName = './0.data'
beamType = 'collisions'
#beamType = 'cosmics' #beamType = 'cosmics'
#beamType = 'collisions'
#COND tag and GEO are needed for running over a test partition online #COND tag and GEO are needed for running over a test partition online
#Previous COND tag #Previous COND tag
ConditionsTag = 'CONDBR2-HLTP-2017-03' #Removed 07/04 ConditionsTag = 'CONDBR2-HLTP-2018-01'
#Swapped to this following AMI tag for current reco. Swap back if not in release #Swapped to this following AMI tag for current reco. Swap back if not in release
#ConditionsTag = 'CONDBR2-ES1PA-2016-01' #Different #ConditionsTag = 'CONDBR2-ES1PA-2016-01' #Different
#Current DetDesc #Current DetDesc
...@@ -125,9 +124,9 @@ jobproperties.CaloCellFlags.doLArHVCorr=False ...@@ -125,9 +124,9 @@ jobproperties.CaloCellFlags.doLArHVCorr=False
jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr.set_Value_and_Lock(False) jobproperties.CaloCellFlags.doPileupOffsetBCIDCorr.set_Value_and_Lock(False)
jobproperties.CaloCellFlags.doLArCreateMissingCells=False jobproperties.CaloCellFlags.doLArCreateMissingCells=False
#Work around to stop crash in pixel cluster splitting #Work around to stop crash in pixel cluster splitting (Updated by lshi 23 July 2020, ATLASRECTS-5496)
from InDetRecExample.InDetJobProperties import InDetFlags#All OK from InDetRecExample.InDetJobProperties import InDetFlags#All OK
InDetFlags.doInnerDetectorCommissioning.set_Value_and_Lock(True) InDetFlags.doPixelClusterSplitting.set_Value_and_Lock(False)
from JetRec.JetRecFlags import jetFlags from JetRec.JetRecFlags import jetFlags
jetFlags.useTracks.set_Value_and_Lock(False) jetFlags.useTracks.set_Value_and_Lock(False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment