Commit 9e7e71bb authored by Walter Lampl's avatar Walter Lampl Committed by Edward Moyse
Browse files

NewConfig: Move to ComponentFactory

parent adcde71d
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
from AthenaConfiguration.ComponentFactory import CompFactory
def BeamPipeGeometryCfg(flags):
result=GeoModelCfg(flags)
from BeamPipeGeoModel.BeamPipeGeoModelConf import BeamPipeDetectorTool
BeamPipeDetectorTool=CompFactory.BeamPipeDetectorTool
result.getPrimary().DetectorTools += [ BeamPipeDetectorTool() ]
return result
......@@ -6,8 +6,9 @@ Elmar Ritsch, 27/09/2013
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from SubDetectorEnvelopes.SubDetectorEnvelopesConf import DetDescrDBEnvelopeSvc
DetDescrDBEnvelopeSvc=CompFactory.DetDescrDBEnvelopeSvc
def EnvelopeDefSvcCfg(ConfigFlags, name="AtlasGeometry_EnvelopeDefSvc", **kwargs):
result = ComponentAccumulator()
......
......@@ -3,6 +3,7 @@
"""Define method to construct configured private Calo bad channels tool"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
def CaloBadChanToolCfg(flags, **kwargs):
"""Return component accumulator with configured private Calo bad channels tool
......@@ -22,7 +23,7 @@ def CaloBadChanToolCfg(flags, **kwargs):
badChannelsTool = acc.popToolsAndMerge( TileBadChanToolCfg(flags) )
kwargs['TileBadChanTool'] = badChannelsTool
from CaloBadChannelTool.CaloBadChannelToolConf import CaloBadChanTool
CaloBadChanTool=CompFactory.CaloBadChanTool
acc.setPrivateTools(CaloBadChanTool(**kwargs))
return acc
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from DetDescrCnvSvc.DetDescrCnvSvcConfig import DetDescrCnvSvcCfg
from IOVDbSvc.IOVDbSvcConfig import addFolders
def CaloCellPedestalCorrCfg(configFlags):
from CaloCellCorrection.CaloCellCorrectionConf import CaloCellPedestalCorr
CaloCellPedestalCorr=CompFactory.CaloCellPedestalCorr
result=DetDescrCnvSvcCfg(configFlags)
isMC=configFlags.Input.isMC
......@@ -57,7 +58,7 @@ def CaloCellNeighborsAverageCorrCfg(flags):
from TileGeoModel.TileGMConfig import TileGMCfg
acc.merge(TileGMCfg(flags))
from CaloCellCorrection.CaloCellCorrectionConf import CaloCellNeighborsAverageCorr
CaloCellNeighborsAverageCorr=CompFactory.CaloCellNeighborsAverageCorr
caloCellNeighborsAverageCorrection = CaloCellNeighborsAverageCorr(testMode = False)
acc.setPrivateTools( caloCellNeighborsAverageCorrection )
......@@ -65,7 +66,7 @@ def CaloCellNeighborsAverageCorrCfg(flags):
def CaloCellTimeCorrCfg(configFlags):
from CaloCellCorrection.CaloCellCorrectionConf import CaloCellTimeCorrTool
CaloCellTimeCorrTool=CompFactory.CaloCellTimeCorrTool
result=ComponentAccumulator()
folder= "/LAR/TimeCorrectionOfl/CellTimeOffset"
result.merge(addFolders(configFlags,[folder,], "LAR_OFL", className="AthenaAttributeList"))
......@@ -74,7 +75,7 @@ def CaloCellTimeCorrCfg(configFlags):
def CaloEnergyRescalerCfg(configFlags):
from CaloCellCorrection.CaloCellCorrectionConf import CaloCellEnergyRescaler
CaloCellEnergyRescaler=CompFactory.CaloCellEnergyRescaler
result=ComponentAccumulator()
folder="/LAR/CellCorrOfl/EnergyCorr"
result.merge(addFolders(configFlags,[folder,], "LAR_OFL", className="AthenaAttributeList"))
......
......@@ -5,13 +5,14 @@
# Purpose: Configure CaloBCIDAvgAlg.
from __future__ import print_function
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
def CaloBCIDAvgAlgCfg (flags):
from IOVDbSvc.IOVDbSvcConfig import addFolderList
from CaloRec.CaloRecConf import CaloBCIDAvgAlg
CaloBCIDAvgAlg=CompFactory.CaloBCIDAvgAlg
result = ComponentAccumulator()
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
#from LArCellRec.LArCellRecConf import LArCellBuilderFromLArRawChannelTool
from CaloRec.CaloRecConf import CaloCellMaker, CaloCellContainerFinalizerTool
from AthenaConfiguration.ComponentFactory import CompFactory
#LArCellBuilderFromLArRawChannelTool=CompFactory.LArCellBuilderFromLArRawChannelTool
CaloCellMaker, CaloCellContainerFinalizerTool =CompFactory.getComps("CaloCellMaker","CaloCellContainerFinalizerTool",)
from LArCellRec.LArCellBuilderConfig import LArCellBuilderCfg,LArCellCorrectorCfg
from TileRecUtils.TileCellBuilderConfig import TileCellBuilderCfg
from CaloCellCorrection.CaloCellCorrectionConfig import CaloCellPedestalCorrCfg, CaloCellNeighborsAverageCorrCfg, CaloCellTimeCorrCfg, CaloEnergyRescalerCfg
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
def CaloRecoCfg(configFlags):
......@@ -51,10 +52,10 @@ if __name__=="__main__":
acc.merge(CaloRecoCfg(ConfigFlags))
from CaloRec.CaloRecConf import CaloCellDumper
CaloCellDumper=CompFactory.CaloCellDumper
acc.addEventAlgo(CaloCellDumper())
from xAODCaloEventCnv.xAODCaloEventCnvConf import ClusterDumper
ClusterDumper=CompFactory.ClusterDumper
acc.addEventAlgo(ClusterDumper("TopoDumper",ContainerName="CaloCalTopoClusters",FileName="TopoCluster.txt"))
f=open("CaloRec.pkl","wb")
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaCommon.SystemOfUnits import MeV
def caloTopoCoolFolderCfg(configFlags):
......@@ -26,8 +27,8 @@ def caloTopoCoolFolderCfg(configFlags):
return result
def getTopoClusterLocalCalibTools(configFlags):
from CaloUtils.CaloUtilsConf import CaloLCClassificationTool, CaloLCWeightTool, CaloLCOutOfClusterTool, CaloLCDeadMaterialTool
from CaloClusterCorrection.CaloClusterCorrectionConf import CaloClusterLocalCalib
CaloLCClassificationTool, CaloLCWeightTool, CaloLCOutOfClusterTool, CaloLCDeadMaterialTool=CompFactory.getComps("CaloLCClassificationTool","CaloLCWeightTool","CaloLCOutOfClusterTool","CaloLCDeadMaterialTool",)
CaloClusterLocalCalib=CompFactory.CaloClusterLocalCalib
# Local cell weights
LCClassify = CaloLCClassificationTool("LCClassify")
LCClassify.ClassificationKey = "EMFracClassify"
......@@ -93,7 +94,7 @@ def getTopoClusterLocalCalibTools(configFlags):
return lccalibtools
def getTopoMoments(configFlags):
from CaloRec.CaloRecConf import CaloClusterMomentsMaker
CaloClusterMomentsMaker=CompFactory.CaloClusterMomentsMaker
TopoMoments = CaloClusterMomentsMaker ("TopoMoments")
TopoMoments.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
from AthenaCommon.SystemOfUnits import deg
......@@ -143,7 +144,7 @@ def getTopoMoments(configFlags):
# only add HV related moments if it is offline.
# from IOVDbSvc.CondDB import conddb
# if not conddb.isOnline:
from LArCellRec.LArCellRecConf import LArHVFraction
LArHVFraction=CompFactory.LArHVFraction
if configFlags.Input.isMC:
TopoMoments.LArHVFraction=LArHVFraction(HVScaleCorrKey="LArHVScaleCorr")
else:
......@@ -156,9 +157,9 @@ def getTopoMoments(configFlags):
# a.k.a. DigiTruth
def getTopoTruthMoments(configFlags):
from CaloRec.CaloRecConf import CaloClusterMomentsMaker_DigiHSTruth
CaloClusterMomentsMaker_DigiHSTruth=CompFactory.CaloClusterMomentsMaker_DigiHSTruth
TopoMoments_Truth = CaloClusterMomentsMaker_DigiHSTruth ("TopoMoments_Truth")
from LArCellRec.LArCellRecConf import LArHVFraction
LArHVFraction=CompFactory.LArHVFraction
TopoMoments_Truth.LArHVFraction=LArHVFraction(HVScaleCorrKey="LArHVScaleCorr")
TopoMoments_Truth.WeightingOfNegClusters = configFlags.Calo.TopoCluster.doTreatEnergyCutAsAbsolute
from AthenaCommon.SystemOfUnits import deg
......@@ -197,7 +198,7 @@ def getTopoTruthMoments(configFlags):
return TopoMoments_Truth
def getTopoCalibMoments(configFlags):
from CaloCalibHitRec.CaloCalibHitRecConf import CaloCalibClusterMomentsMaker2
CaloCalibClusterMomentsMaker2=CompFactory.CaloCalibClusterMomentsMaker2
TopoCalibMoments = CaloCalibClusterMomentsMaker2 ("TopoCalibMoments")
TopoCalibMoments.MomentsNames = ["ENG_CALIB_TOT"
,"ENG_CALIB_OUT_L"
......@@ -249,7 +250,7 @@ def CaloTopoClusterCfg(configFlags,cellsname="AllCalo",clustersname="",doLCCalib
# Schedule electronic noise cond alg (needed for LC weights)
result.merge(CaloNoiseCondAlgCfg(configFlags,"electronicNoise"))
from CaloRec.CaloRecConf import CaloTopoClusterMaker, CaloTopoClusterSplitter, CaloClusterMaker, CaloClusterSnapshot
CaloTopoClusterMaker, CaloTopoClusterSplitter, CaloClusterMaker, CaloClusterSnapshot=CompFactory.getComps("CaloTopoClusterMaker","CaloTopoClusterSplitter","CaloClusterMaker","CaloClusterSnapshot",)
result.merge(LArGMCfg(configFlags))
......@@ -334,7 +335,7 @@ def CaloTopoClusterCfg(configFlags,cellsname="AllCalo",clustersname="",doLCCalib
from CaloBadChannelTool.CaloBadChanToolConfig import CaloBadChanToolCfg
caloBadChanTool = result.popToolsAndMerge( CaloBadChanToolCfg(configFlags) )
from CaloClusterCorrection.CaloClusterCorrectionConf import CaloClusterBadChannelList
CaloClusterBadChannelList=CompFactory.CaloClusterBadChannelList
BadChannelListCorr = CaloClusterBadChannelList(badChannelTool = caloBadChanTool)
CaloTopoCluster.ClusterCorrectionTools += [BadChannelListCorr]
......@@ -389,12 +390,12 @@ if __name__=="__main__":
# "CaloClusterCellLinkContainer#"+theKey+"_links"
]))
from AthenaServices.AthenaServicesConf import ThinningSvc, ThinningOutputTool
ThinningSvc, ThinningOutputTool=CompFactory.getComps("ThinningSvc","ThinningOutputTool",)
cfg.addService(ThinningSvc())
tot = ThinningOutputTool("Thin_xAOD",ThinningSvc = cfg.getService("ThinningSvc"))
cfg.getEventAlgo("OutputStreamxAOD").HelperTools += [tot]
from ThinningUtils.ThinningUtilsConf import ThinNegativeEnergyCaloClustersAlg
ThinNegativeEnergyCaloClustersAlg=CompFactory.ThinNegativeEnergyCaloClustersAlg
theNegativeEnergyCaloClustersThinner = ThinNegativeEnergyCaloClustersAlg(
"ThinNegativeEnergyCaloClustersAlg",
CaloClustersKey=theKey,
......
......@@ -7,6 +7,7 @@
from __future__ import print_function
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
......@@ -43,9 +44,9 @@ def CaloEstimatedGainToolCfg (configFlags):
result.merge (LArADC2MeVCondAlgCfg (configFlags))
adc2mev = result.getCondAlgo ('LArADC2MeVCondAlg')
from TileConditions.TileConditionsConf import TileCondIdTransforms
TileCondIdTransforms=CompFactory.TileCondIdTransforms
from CaloTools.CaloToolsConf import CaloEstimatedGainTool
CaloEstimatedGainTool=CompFactory.CaloEstimatedGainTool
tool = CaloEstimatedGainTool ('CaloEstimatedGainTool',
ADC2MeVKey = adc2mev.LArADC2MeVKey,
TileCondIdTransforms = TileCondIdTransforms(),
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
from IOVDbSvc.IOVDbSvcConfig import addFolders
from CaloTools.CaloToolsConf import CaloNoiseCondAlg
CaloNoiseCondAlg=CompFactory.CaloNoiseCondAlg
from AthenaCommon.Logging import logging
def CaloNoiseCondAlgCfg(configFlags,noisetype="totalNoise"):
......
......@@ -3,6 +3,7 @@
# self test of ComponentAccumulator
from __future__ import print_function
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.Deduplication import DeduplicationFailed
from AthenaConfiguration.AthConfigFlags import AthConfigFlags
......@@ -324,7 +325,7 @@ class TestComponentAccumulatorAccessors( unittest.TestCase ):
class TestDeduplication( unittest.TestCase ):
def runTest( self ):
from IOVDbSvc.IOVDbSvcConf import IOVDbSvc #Test de-duplicating folder-list
IOVDbSvc=CompFactory.IOVDbSvc #Test de-duplicating folder-list
result1=ComponentAccumulator()
result1.addService(IOVDbSvc(Folders=["/foo"]))
result1.wasMerged()
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaCommon.AlgSequence import AthSequencer
......@@ -67,8 +68,8 @@ def MainServicesThreadedCfg(cfgFlags):
#Set up incident firing:
from AthenaServices.AthenaServicesConf import AthIncFirerAlg
from GaudiCoreSvc.GaudiCoreSvcConf import IncidentProcAlg
AthIncFirerAlg=CompFactory.AthIncFirerAlg
IncidentProcAlg=CompFactory.IncidentProcAlg
cfg.addEventAlgo(AthIncFirerAlg("BeginIncFiringAlg",FireSerial=False,Incidents=['BeginEvent']),sequenceName='AthBeginSeq')
cfg.addEventAlgo(IncidentProcAlg('IncidentProcAlg1'),sequenceName='AthBeginSeq')
......@@ -77,16 +78,16 @@ def MainServicesThreadedCfg(cfgFlags):
cfg.addEventAlgo(IncidentProcAlg('IncidentProcAlg2'),sequenceName="AthEndSeq")
#Basic services:
from CLIDComps.CLIDCompsConf import ClassIDSvc
ClassIDSvc=CompFactory.ClassIDSvc
cfg.addService(ClassIDSvc(CLIDDBFiles= ['clid.db',"Gaudi_clid.db" ]))
from StoreGate.StoreGateConf import StoreGateSvc
StoreGateSvc=CompFactory.StoreGateSvc
cfg.addService(StoreGateSvc())
cfg.addService(StoreGateSvc("DetectorStore"))
cfg.addService(StoreGateSvc("HistoryStore"))
cfg.addService( StoreGateSvc("ConditionStore") )
from AthenaServices.AthenaServicesConf import CoreDumpSvc
CoreDumpSvc=CompFactory.CoreDumpSvc
#438 is the logical or of FATAL_ON_QUIT, FATAL_ON_INT, FATAL_DUMP_SIG, FATAL_DUMP_STACK, FATAL_DUMP_CONTEXT, FATAL_AUTO_EXIT
#as defiend in Control/AthenaServices/src/SetFatalHandler.h
cfg.addService(CoreDumpSvc(FatalHandler = 438))
......@@ -98,8 +99,8 @@ def MainServicesThreadedCfg(cfgFlags):
if cfgFlags.Concurrency.NumThreads>0:
# Migrated code from AtlasThreadedJob.py
from GaudiCoreSvc.GaudiCoreSvcConf import MessageSvc
from GaudiSvc.GaudiSvcConf import StatusCodeSvc, AuditorSvc
MessageSvc=CompFactory.MessageSvc
StatusCodeSvc, AuditorSvc=CompFactory.getComps("StatusCodeSvc","AuditorSvc",)
msgsvc = MessageSvc()
msgsvc.defaultLimit = 0
......@@ -113,18 +114,18 @@ def MainServicesThreadedCfg(cfgFlags):
cfg.addService(scsvc)
cfg.setAppProperty('StatusCodeCheck',False)
from StoreGate.StoreGateConf import SG__HiveMgrSvc
SG__HiveMgrSvc=CompFactory.SG__HiveMgrSvc
hivesvc = SG__HiveMgrSvc("EventDataSvc")
hivesvc.NSlots = cfgFlags.Concurrency.NumConcurrentEvents
cfg.addService( hivesvc )
from GaudiHive.GaudiHiveConf import AlgResourcePool
AlgResourcePool=CompFactory.AlgResourcePool
from AthenaCommon.Constants import INFO
arp=AlgResourcePool( OutputLevel = INFO )
arp.TopAlg=["AthMasterSeq"] #this should enable control flow
cfg.addService( arp )
from GaudiHive.GaudiHiveConf import AvalancheSchedulerSvc
AvalancheSchedulerSvc=CompFactory.AvalancheSchedulerSvc
scheduler = AvalancheSchedulerSvc()
scheduler.CheckDependencies = cfgFlags.Scheduler.CheckDependencies
scheduler.ShowDataDependencies = cfgFlags.Scheduler.ShowDataDeps
......@@ -133,7 +134,7 @@ def MainServicesThreadedCfg(cfgFlags):
scheduler.ThreadPoolSize = cfgFlags.Concurrency.NumThreads
cfg.addService(scheduler)
from SGComps.SGCompsConf import SGInputLoader
SGInputLoader=CompFactory.SGInputLoader
# FailIfNoProxy=False makes it a warning, not an error, if unmet data
# dependencies are not found in the store. It should probably be changed
# to True eventually.
......@@ -141,7 +142,7 @@ def MainServicesThreadedCfg(cfgFlags):
cfg.addEventAlgo( inputloader, "AthAlgSeq" )
scheduler.DataLoaderAlg = inputloader.getName()
from AthenaServices.AthenaServicesConf import AthenaHiveEventLoopMgr
AthenaHiveEventLoopMgr=CompFactory.AthenaHiveEventLoopMgr
elmgr = AthenaHiveEventLoopMgr()
elmgr.WhiteboardSvc = "EventDataSvc"
......@@ -149,7 +150,7 @@ def MainServicesThreadedCfg(cfgFlags):
cfg.addService( elmgr )
# enable timeline recording
from GaudiHive.GaudiHiveConf import TimelineSvc
TimelineSvc=CompFactory.TimelineSvc
cfg.addService( TimelineSvc( RecordTimeline = True, Partial = False ) )
#
......@@ -157,7 +158,7 @@ def MainServicesThreadedCfg(cfgFlags):
#
auditorsvc = AuditorSvc()
from SGComps.SGCompsConf import SGCommitAuditor
SGCommitAuditor=CompFactory.SGCommitAuditor
auditorsvc += SGCommitAuditor()
cfg.addService( auditorsvc )
cfg.setAppProperty("AuditAlgorithms", True)
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
def HelloWorldCfg():
result=ComponentAccumulator()
from AthExHelloWorld.AthExHelloWorldConf import HelloAlg
HelloAlg=CompFactory.HelloAlg
HelloWorld=HelloAlg("HelloWorld")
HelloWorld.OutputLevel = 0
......@@ -47,7 +48,7 @@ def HelloWorldCfg():
# ... and some more:
HelloWorld.MyMatrix += [ [ 7, 8, 9 ] ]
from AthExHelloWorld.AthExHelloWorldConf import HelloTool
HelloTool=CompFactory.HelloTool
ht=HelloTool( "HelloTool" )
HelloWorld.MyPrivateHelloTool = ht #HelloTool( "HelloTool" )
HelloWorld.MyPrivateHelloTool.MyMessage = "A Private Message!"
......
......@@ -3,12 +3,11 @@
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from RngComps.RngCompsConf import (
AtDSFMTGenSvc,
AtRanluxGenSvc,
AtRndmGenSvc,
AthRNGSvc,
)
from AthenaConfiguration.ComponentFactory import CompFactory
AtDSFMTGenSvc,AtRanluxGenSvc,AtRndmGenSvc,AthRNGSvc=\
CompFactory.getComps("AtDSFMTGenSvc","AtRanluxGenSvc","AtRndmGenSvc","AthRNGSvc")
# Translate between names in AthRNGSvc and elsewhere
AthEngines = {
......
......@@ -4,6 +4,7 @@ Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
def AddressRemappingCfg(renameMaps=[]):
......@@ -12,7 +13,7 @@ def AddressRemappingCfg(renameMaps=[]):
AddressRemappingSvc and other needed services
"""
from SGComps.SGCompsConf import AddressRemappingSvc, ProxyProviderSvc
AddressRemappingSvc, ProxyProviderSvc=CompFactory.getComps("AddressRemappingSvc","ProxyProviderSvc",)
acc = ComponentAccumulator()
svc = AddressRemappingSvc()
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.ComponentFactory import CompFactory
def PoolReadCfg(configFlags):
"""
......@@ -13,13 +14,13 @@ def PoolReadCfg(configFlags):
result=ComponentAccumulator()
from PoolSvc.PoolSvcConf import PoolSvc
from SGComps.SGCompsConf import ProxyProviderSvc
from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc
from EventSelectorAthenaPool.EventSelectorAthenaPoolConf import AthenaPoolAddressProviderSvc, EventSelectorAthenaPool, DoubleEventSelectorAthenaPool
from GaudiSvc.GaudiSvcConf import EvtPersistencySvc
PoolSvc=CompFactory.PoolSvc
ProxyProviderSvc=CompFactory.ProxyProviderSvc
AthenaPoolCnvSvc=CompFactory.AthenaPoolCnvSvc
AthenaPoolAddressProviderSvc, EventSelectorAthenaPool, DoubleEventSelectorAthenaPool=CompFactory.getComps("AthenaPoolAddressProviderSvc","EventSelectorAthenaPool","DoubleEventSelectorAthenaPool",)
EvtPersistencySvc=CompFactory.EvtPersistencySvc
from StoreGate.StoreGateConf import StoreGateSvc
StoreGateSvc=CompFactory.StoreGateSvc
result.addService(PoolSvc(MaxFilesOpen=0))
apcs=AthenaPoolCnvSvc()
......
......@@ -3,7 +3,8 @@
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
"""
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc
from AthenaConfiguration.ComponentFactory import CompFactory
AthenaPoolCnvSvc=CompFactory.AthenaPoolCnvSvc
def PoolWriteCfg(configFlags, **kwargs):
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator, ConfigurationError
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaCommon.Logging import logging
def OutputStreamCfg(configFlags, streamName, ItemList=[], disableEventTag=False ):
from OutputStreamAthenaPool.OutputStreamAthenaPoolConf import MakeEventStreamInfo
from AthenaServices.AthenaServicesConf import AthenaOutputStream
from AthenaServices.AthenaServicesConf import AthenaOutputStreamTool
from StoreGate.StoreGateConf import StoreGateSvc
MakeEventStreamInfo=CompFactory.MakeEventStreamInfo
AthenaOutputStream=CompFactory.AthenaOutputStream
AthenaOutputStreamTool=CompFactory.AthenaOutputStreamTool
StoreGateSvc=CompFactory.StoreGateSvc
flagName="Output.%sFileName" % streamName
if configFlags.hasFlag(flagName):
......@@ -44,25 +45,25 @@ def OutputStreamCfg(configFlags, streamName, ItemList=[], disableEventTag=False
key = "SimpleTag"
outputStream.WritingTool.AttributeListKey=key
# build eventinfo attribute list
from .OutputStreamAthenaPoolConf import EventInfoAttListTool, EventInfoTagBuilder
EventInfoAttListTool, EventInfoTagBuilder=CompFactory.getComps("EventInfoAttListTool","EventInfoTagBuilder",)
result.addPublicTool(EventInfoAttListTool())
tagBuilder = EventInfoTagBuilder(AttributeList=key)
result.addEventAlgo(tagBuilder)
# For xAOD output
if streamName=="xAOD":
from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatSvc
xAODMaker__EventFormatSvc=CompFactory.xAODMaker__EventFormatSvc
# Simplifies naming
result.addService(xAODMaker__EventFormatSvc())
outputStream.MetadataItemList.append( "xAOD::EventFormat#EventFormat" )
from xAODMetaDataCnv.xAODMetaDataCnvConf import xAODMaker__FileMetaDataMarkUpTool
xAODMaker__FileMetaDataMarkUpTool=CompFactory.xAODMaker__FileMetaDataMarkUpTool
streamMarkUpTool = xAODMaker__FileMetaDataMarkUpTool( streamName + "_FileMetaDataMarkUpTool" )
streamMarkUpTool.Key = streamName
outputStream.HelperTools += [ streamMarkUpTool ]
outputStream.WritingTool.SubLevelBranchName = "<key>"
from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc
AthenaPoolCnvSvc=CompFactory.AthenaPoolCnvSvc
poolcnvsvc = AthenaPoolCnvSvc()
result.addService(poolcnvsvc)
poolcnvsvc.PoolAttributes += [ "DatabaseName = '" + fileName + "'; COMPRESSION_LEVEL = '5'" ]
......
......@@ -7,6 +7,7 @@
from __future__ import print_function
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
......@@ -25,7 +26,7 @@ def BunchGroupCondAlgCfg (configFlags):
result.merge (addFolders (configFlags, folder, 'TRIGGER', tag='HEAD',
className='AthenaAttributeList'))
from CoolLumiUtilities.CoolLumiUtilitiesConf import BunchGroupCondAlg
BunchGroupCondAlg=CompFactory.BunchGroupCondAlg
alg = BunchGroupCondAlg (name,
BunchGroupFolderInputKey = folder,
BunchGroupOutputKey = 'BunchGroupCondData')
......
......@@ -7,6 +7,7 @@
from __future__ import print_function
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
......@@ -34,7 +35,7 @@ def BunchLumisCondAlgCfg (configFlags):
result.merge (FillParamsCondAlgCfg(configFlags))
fpalg = result.getCondAlgo ('FillParamsCondAlg')
from CoolLumiUtilities.CoolLumiUtilitiesConf import BunchLumisCondAlg
BunchLumisCondAlg=CompFactory.BunchLumisCondAlg
alg = BunchLumisCondAlg (name,
BunchLumisFolderInputKey = folder,
FillParamsInputKey = fpalg.FillParamsOutputKey,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment