diff --git a/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py b/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py index ea98ef8a0979b6d594a8e32da9881f4cd8d6a6e6..20f9aec6e030665f118198b800d9a53fac0b77ad 100644 --- a/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py +++ b/Calorimeter/CaloRec/python/CaloTopoClusterConfig.py @@ -112,21 +112,33 @@ if __name__=="__main__": ConfigFlags.Input.isMC = False ConfigFlags.Input.Files = ["myESD.pool.root"] + ConfigFlags.Output.ESDFileName="esdOut.pool.root" ConfigFlags.lock() - cfg=ComponentAccumulator() - + from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg + #cfg=ComponentAccumulator() + cfg=MainServicesSerialCfg() cfg.merge(PoolReadCfg(ConfigFlags)) + theKey="CaloCalTopoClustersNew" + topoAcc,topoAlg=CaloTopoClusterCfg(ConfigFlags) - topoAlg.ClustersOutputName="CaloCalTopoClustersNew" + topoAlg.ClustersOutputName=theKey cfg.merge(topoAcc) - cfg.addEventAlgo(topoAlg) - + cfg.addEventAlgo(topoAlg,sequenceName="AthAlgSeq") + + from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg + cfg.merge(OutputStreamCfg(ConfigFlags,"ESD", ItemList=["xAOD::CaloClusterContainer#"+theKey, + "xAOD::CaloClusterAuxContainer#"+theKey+"Aux.", + "CaloClusterCellLinkContainer#"+theKey+"_links"])) + + + cfg.getService("StoreGateSvc").Dump=True - f=open("CaloTopoCluster.pkl","w") - cfg.store(f) - f.close() + cfg.run() + #f=open("CaloTopoCluster.pkl","w") + #cfg.store(f) + #f.close() diff --git a/Control/AthenaConfiguration/python/AllConfigFlags.py b/Control/AthenaConfiguration/python/AllConfigFlags.py index 940a9f1b1da9f122a3ffcabd1631faae4c01ab32..dfc51a02bef69f5b1dc001de37734240852b4325 100644 --- a/Control/AthenaConfiguration/python/AllConfigFlags.py +++ b/Control/AthenaConfiguration/python/AllConfigFlags.py @@ -27,8 +27,13 @@ def _createCfgFlags(): acf.addFlag('Output.doESD', False) # produce ESD containers - acf.addFlag('Output.writeESD', False) # configure ESD output writing - + + acf.addFlag('Output.HITFileName','myHIT.pool.root') + acf.addFlag('Output.RDOFileName','myROD.pool.root') + acf.addFlag('Output.ESDFileName','myESD.pool.root') + acf.addFlag('Output.AODFileName','myAOD.pool.root') + + #Geo Model Flags: acf.addFlag('GeoModel.Layout', 'atlas') # replaces global.GeoLayout acf.addFlag("GeoModel.AtlasVersion", lambda prevFlags : GetFileMD(prevFlags.Input.Files).get("Geometry","ATLAS-R2-2016-01-00-01")) # diff --git a/Control/AthenaConfiguration/python/UnifyProperties.py b/Control/AthenaConfiguration/python/UnifyProperties.py index 35e8f5508eacbaf44c341ea463ec01d7bc5e7f3e..a3c289bf875504b4d0df04fc71952587290f5087 100644 --- a/Control/AthenaConfiguration/python/UnifyProperties.py +++ b/Control/AthenaConfiguration/python/UnifyProperties.py @@ -40,6 +40,7 @@ _propsToUnify={"GeoModelSvc.DetectorTools":unifySet, "PoolSvc.ReadCatalog":unifySet, "ProxyProviderSvc.ProviderNames":unifySet, "TagInfoMgr.ExtraTagValuePairs":unifySetOfPairs, + "AthenaOutputStream.ItemList":unifySet, } diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamConfig.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamConfig.py new file mode 100644 index 0000000000000000000000000000000000000000..64d8fcaf38d516178cf60bcb5a4ed560e9f0d234 --- /dev/null +++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamConfig.py @@ -0,0 +1,43 @@ +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + +from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator, ConfigurationError +from AthenaCommon.Logging import logging + +def OutputStreamCfg(configFlags, streamName, ItemList=[] ): + from OutputStreamAthenaPoolConf import MakeEventStreamInfo + from AthenaServices.AthenaServicesConf import AthenaOutputStream + from AthenaServices.AthenaServicesConf import AthenaOutputStreamTool + + flagName="Output.%sFileName" % streamName + if configFlags.hasFlag(flagName): + fileName=configFlags._get(flagName) + else: + fileName="my%s.pool.root" % streamName + msg = logging.getLogger('OutputStreamCfg') + msg.info("No file name predefined for stream %s. Using %s" % (streamName, fileName)) + + if fileName in configFlags.Input.Files: + raise ConfigurationError("Same name for input and output file %s" % fileName) + + + outputAlgName="OutputStream"+streamName + + result=ComponentAccumulator(sequenceName="AthOutSeq") + # define athena output stream + writingTool = AthenaOutputStreamTool( streamName + "Tool" ) + streamInfoTool = MakeEventStreamInfo( streamName + "_MakeEventStreamInfo" ) + streamInfoTool.Key = streamName + outputStream = AthenaOutputStream( + outputAlgName, + WritingTool = writingTool, + ItemList = [ "xAOD::EventInfo#*" ]+ItemList, + OutputFile = fileName, + HelperTools = [ streamInfoTool ], + ) + #outputStream.MetadataStore = svcMgr.MetaDataStore + #outputStream.MetadataItemList = [ "EventStreamInfo#" + streamName, "IOVMetaDataContainer#*" ] + + + result.addEventAlgo(outputStream) + return result +