diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/CMakeLists.txt b/Database/AthenaPOOL/OutputStreamAthenaPool/CMakeLists.txt index 3c260a8619c927f7f3371bc7a8b5af11a15b734c..3f4529a4a7c98344c04e3c467b570c50cf48601e 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/CMakeLists.txt +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/CMakeLists.txt @@ -1,24 +1,8 @@ -################################################################################ -# Package: OutputStreamAthenaPool -################################################################################ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Declare the package name: atlas_subdir( OutputStreamAthenaPool ) -# Declare the package's dependencies: -atlas_depends_on_subdirs( PRIVATE - Control/AthenaBaseComps - Control/AthenaKernel - Control/SGTools - Control/StoreGate - Database/AthenaPOOL/AthenaPoolCnvSvc - Database/AthenaPOOL/AthenaPoolUtilities - Database/PersistentDataModel - Event/EventInfo - Event/EventInfoUtils - Event/xAOD/xAODEventInfo - GaudiKernel ) - # Component(s) in the package: atlas_add_component( OutputStreamAthenaPool src/MakeEventStreamInfo.cxx @@ -27,12 +11,8 @@ atlas_add_component( OutputStreamAthenaPool src/EventInfoAttListTool.cxx src/EventInfoTagBuilder.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps AthenaKernel - SGTools StoreGateLib SGtests AthenaPoolCnvSvcLib - AthenaPoolUtilities PersistentDataModel EventInfo - xAODEventInfo EventInfoUtils GaudiKernel ) + LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel EventInfo EventInfoUtils GaudiKernel PersistentDataModel StoreGateLib xAODEventInfo ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) - diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/CreateOutputStreams.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/CreateOutputStreams.py index 0434b3db2290afc700c94db4f04791bd1a2c7116..5776f3d1b5f6806f217973e77844daf37b6f5ef9 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/python/CreateOutputStreams.py +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/CreateOutputStreams.py @@ -3,12 +3,10 @@ ## @file OutputStreamAthenaPool.py ## @brief Helper methods to create output streams ## @author Peter van Gemmeren <gemmeren@bnl.gov> -## $Id: OutputStreamAthenaPool.py,v 1.10 2009-04-27 18:19:34 gemmeren Exp $ ############################################################### from __future__ import print_function -from AthenaCommon.AppMgr import theApp from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaServices.AthenaServicesConf import AthenaOutputStream from AthenaServices.AthenaServicesConf import AthenaOutputStreamTool @@ -48,7 +46,7 @@ def createOutputStream( streamName, fileName = "", asAlg = False, noTag = False, # Tell tool to pick it up outputStream.WritingTool.AttributeListKey=key # build eventinfo attribute list - from .OutputStreamAthenaPoolConf import EventInfoAttListTool, EventInfoTagBuilder + from .OutputStreamAthenaPoolConf import EventInfoTagBuilder EventInfoTagBuilder = EventInfoTagBuilder(AttributeList=key, EventInfoKey=eventInfoKey, FilterString=decisionFilter) from AthenaCommon.GlobalFlags import globalflags if globalflags.InputFormat() == 'bytestream': diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py index 7fea06f370e4f8022859615d13887c26ac352aec..6dc8f05cb06f320eb2ffb24a8dee1e697a21007a 100644 --- a/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py @@ -169,7 +169,7 @@ class AugmentedPoolStream( AugmentedStreamBase ): #event-by-event stream from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream self.Stream = AthenaPoolOutputStream( StreamName, FileName, asAlg, noTag=noTag ) - if isVirtual == True: + if isVirtual is True: self.Stream.WriteOnExecute=False self.Stream.WriteOnFinalize=False @@ -264,8 +264,6 @@ class AugmentedByteStream( AugmentedStreamBase ): #General setup from AthenaCommon.AppMgr import theApp svcMgr = theApp.serviceMgr() - from AthenaCommon.AlgSequence import AlgSequence - topSequence = AlgSequence() # BS OutputStream Tool from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamEventStorageOutputSvc,ByteStreamOutputStreamCopyTool @@ -277,10 +275,9 @@ class AugmentedByteStream( AugmentedStreamBase ): outDir+="/" # BS output Svc - from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamEventStorageOutputSvc self.bsOutputSvc=ByteStreamEventStorageOutputSvc("BSESOutputSvc"+StreamName, - OutputDirectory=outDir, - SimpleFileName=FileName ) + OutputDirectory=outDir, + SimpleFileName=FileName ) svcMgr += self.bsOutputSvc # Set BS OutputSvc/InputSvc to BS OutputStream Tool @@ -372,7 +369,7 @@ class AugmentedRootStream( AugmentedStreamBase ): AugmentedStreamBase.__init__( self, StreamName ) # Check if the user specified a tree name or not: - if TreeName == None: + if TreeName is None: TreeName = StreamName # Remember the file and tree names just for bookkeeping: @@ -595,7 +592,7 @@ class MultipleStreamManager: actual stream, or an algorithm. """ # Check if a file name was specified or not: - if FileName == None: + if FileName is None: FileName = StreamName + ".root" # Use the common function for creating the stream: return self.NewStream( StreamName, FileName, type='root', asAlg = asAlg, @@ -647,12 +644,7 @@ class MultipleStreamManager: return self.StreamList[index] def StreamExists(self, StreamName): - try: - index=self.StreamDict[StreamName] - except KeyError: - return False - - return True + return StreamName in self.StreamDict def Print(self): print("**** MultipleStreamManager INFOS ****")