Skip to content
Snippets Groups Projects
Commit 9ad8d15a authored by Melissa Yexley's avatar Melissa Yexley
Browse files

fixes trying to change properties in sStreamToFileTool

parent dfa17bf9
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory from AthenaConfiguration.ComponentFactory import CompFactory
from EventDisplaysOnline.EventDisplaysOnlineHelpers import GetRunType, GetBFields, WaitForPartition from EventDisplaysOnline.EventDisplaysOnlineHelpers import GetRunType, GetBFields, WaitForPartition
from AthenaCommon.Constants import INFO, DEBUG, ERROR, WARNING from AthenaCommon.Constants import INFO, DEBUG
isHIMode = False #TODO isHIMode = False #TODO
#TODO isBeamSplashMode = False #TODO isBeamSplashMode = False
...@@ -108,6 +108,7 @@ if partitionName == 'ATLAS' and not testWithoutPartition and not isOfflineTest: ...@@ -108,6 +108,7 @@ if partitionName == 'ATLAS' and not testWithoutPartition and not isOfflineTest:
from ispy import ISObject, IPCPartition from ispy import ISObject, IPCPartition
RunParams = ISObject(IPCPartition(partitionName), 'RunParams.RunParams', 'RunParams') RunParams = ISObject(IPCPartition(partitionName), 'RunParams.RunParams', 'RunParams')
RunParams.checkout() RunParams.checkout()
flags.Input.OverrideRunNumber = True
flags.Input.RunNumbers = [RunParams.run_number] flags.Input.RunNumbers = [RunParams.run_number]
# Get the B field # Get the B field
...@@ -118,7 +119,8 @@ if partitionName == 'ATLAS' and not testWithoutPartition and not isOfflineTest: ...@@ -118,7 +119,8 @@ if partitionName == 'ATLAS' and not testWithoutPartition and not isOfflineTest:
flags.BField.endcapToroidOn = toroidOn flags.BField.endcapToroidOn = toroidOn
# GM test partition needs to be given the below info # GM test partition needs to be given the below info
if (partitionName == 'GMTestPartition' or partitionName == 'GMTestPartitionT9') or testWithoutPartition:# or isOfflineTest: if (partitionName == 'GMTestPartition' or partitionName == 'GMTestPartitionT9') or testWithoutPartition:
flags.Input.OverrideRunNumber = True
flags.Input.RunNumbers = [412343] flags.Input.RunNumbers = [412343]
flags.Input.LumiBlockNumbers = [1] flags.Input.LumiBlockNumbers = [1]
flags.Input.ProjectName = projectName flags.Input.ProjectName = projectName
...@@ -184,7 +186,7 @@ def StreamToFileToolCfg(flags,**kwargs): ...@@ -184,7 +186,7 @@ def StreamToFileToolCfg(flags,**kwargs):
the_tool = CompFactory.JiveXML.StreamToFileTool(**kwargs) the_tool = CompFactory.JiveXML.StreamToFileTool(**kwargs)
result.setPrivateTools(the_tool) result.setPrivateTools(the_tool)
return result return result
acc.popToolsAndMerge(StreamToFileToolCfg(flags)) streamToFileTool = acc.popToolsAndMerge(StreamToFileToolCfg(flags))
if not isOfflineTest: if not isOfflineTest:
def StreamToServerToolCfg(flags, name="StreamToServerTool",**kwargs): def StreamToServerToolCfg(flags, name="StreamToServerTool",**kwargs):
...@@ -202,15 +204,16 @@ from JiveXML.JiveXMLConfig import AlgoJiveXMLCfg ...@@ -202,15 +204,16 @@ from JiveXML.JiveXMLConfig import AlgoJiveXMLCfg
acc.merge(AlgoJiveXMLCfg(flags)) acc.merge(AlgoJiveXMLCfg(flags))
from EventDisplaysOnline.OnlineEventDisplaysSvc import OnlineEventDisplaysSvc from EventDisplaysOnline.OnlineEventDisplaysSvc import OnlineEventDisplaysSvc
acc.addService(OnlineEventDisplaysSvc( svc = OnlineEventDisplaysSvc(
name = "OnlineEventDisplaysSvc", name = "OnlineEventDisplaysSvc",
OutputLevel = DEBUG, # Verbosity OutputLevel = DEBUG, # Verbosity
MaxEvents = maxEvents, # Number of events to keep per stream MaxEvents = maxEvents, # Number of events to keep per stream
OutputDirectory = outputDirectory, # Base directory for streams OutputDirectory = outputDirectory, # Base directory for streams
ProjectTags = projectTags, # Project tags that are allowed to be made public ProjectTags = projectTags, # Project tags that are allowed to be made public
Public = publicStreams, # These streams go into public stream when Ready4Physics Public = publicStreams, # These streams go into public stream when Ready4Physics
StreamToFileTool = streamToFileTool,
), create=True) )
acc.addService(svc, create=True)
# This creates an ESD file per event which is renamed and moved to the desired output # This creates an ESD file per event which is renamed and moved to the desired output
# dir in the VP1 Event Prod alg # dir in the VP1 Event Prod alg
......
...@@ -10,7 +10,7 @@ __author__ = "Eric Jansen <eric.jansen@cern.ch>" ...@@ -10,7 +10,7 @@ __author__ = "Eric Jansen <eric.jansen@cern.ch>"
import os, grp, stat, random import os, grp, stat, random
from ipc import IPCPartition from ipc import IPCPartition
from ispy import ISInfoDictionary, ISInfoAny, ISObject from ispy import ISInfoDictionary
from AthenaPython import PyAthena from AthenaPython import PyAthena
from AthenaPython.PyAthena import StatusCode from AthenaPython.PyAthena import StatusCode
from PyAnalysisCore import PyEventTools from PyAnalysisCore import PyEventTools
...@@ -28,7 +28,7 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ): ...@@ -28,7 +28,7 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
self.zpgid = None self.zpgid = None
self.partition = None self.partition = None
self.StreamToFileTool = None self.StreamToFileTool = kw.get('StreamToFileTool')
self.StreamToServerTool = None self.StreamToServerTool = None
self.VP1EventProducer = None self.VP1EventProducer = None
...@@ -46,7 +46,13 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ): ...@@ -46,7 +46,13 @@ class OnlineEventDisplaysSvc( PyAthena.Svc ):
self.partition = IPCPartition('ATLAS') self.partition = IPCPartition('ATLAS')
self.dict = ISInfoDictionary(self.partition) self.dict = ISInfoDictionary(self.partition)
self.zpgid = grp.getgrnam("zp").gr_gid try:
self.zpgid = grp.getgrnam("zp").gr_gid
except:
# If running on private machine, zp group might not exist.
# Just set to the likely value
self.zpgid = 1307
return StatusCode.Success return StatusCode.Success
def finalize(self): def finalize(self):
......
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