Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kazuya Mochizuki
athena
Commits
9e7e71bb
Commit
9e7e71bb
authored
Dec 17, 2019
by
Walter Lampl
Committed by
Edward Moyse
Dec 17, 2019
Browse files
NewConfig: Move to ComponentFactory
parent
adcde71d
Changes
248
Hide whitespace changes
Inline
Side-by-side
AtlasGeometryCommon/BeamPipeGeoModel/python/BeamPipeGMConfig.py
View file @
9e7e71bb
# 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
BeamPipe
GeoModel.BeamPipeGeoModelConf
import
BeamPipeDetectorTool
BeamPipe
DetectorTool
=
CompFactory
.
BeamPipeDetectorTool
result
.
getPrimary
().
DetectorTools
+=
[
BeamPipeDetectorTool
()
]
return
result
AtlasGeometryCommon/SubDetectorEnvelopes/python/SubDetectorEnvelopesConfigNew.py
View file @
9e7e71bb
...
...
@@ -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
()
...
...
Calorimeter/CaloBadChannelTool/python/CaloBadChanToolConfig.py
View file @
9e7e71bb
...
...
@@ -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
CaloBadChan
nel
Tool
.CaloBadChannelToolConf
import
CaloBadChanTool
CaloBadChanTool
=
CompFactory
.
CaloBadChanTool
acc
.
setPrivateTools
(
CaloBadChanTool
(
**
kwargs
))
return
acc
...
...
Calorimeter/CaloCellCorrection/python/CaloCellCorrectionConfig.py
View file @
9e7e71bb
# 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
CaloCell
Correction.CaloCellCorrectionConf
import
CaloCellPedestalCorr
CaloCell
PedestalCorr
=
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
CaloCell
Correction.CaloCellCorrectionConf
import
CaloCellNeighborsAverageCorr
CaloCell
NeighborsAverageCorr
=
CompFactory
.
CaloCellNeighborsAverageCorr
caloCellNeighborsAverageCorrection
=
CaloCellNeighborsAverageCorr
(
testMode
=
False
)
acc
.
setPrivateTools
(
caloCellNeighborsAverageCorrection
)
...
...
@@ -65,7 +66,7 @@ def CaloCellNeighborsAverageCorrCfg(flags):
def
CaloCellTimeCorrCfg
(
configFlags
):
from
CaloCell
Correction.CaloCellCorrectionConf
import
CaloCellTimeCorrTool
CaloCell
TimeCorrTool
=
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
CaloCell
Correction.CaloCellCorrectionConf
import
CaloCellEnergyRescaler
CaloCell
EnergyRescaler
=
CompFactory
.
CaloCellEnergyRescaler
result
=
ComponentAccumulator
()
folder
=
"/LAR/CellCorrOfl/EnergyCorr"
result
.
merge
(
addFolders
(
configFlags
,[
folder
,],
"LAR_OFL"
,
className
=
"AthenaAttributeList"
))
...
...
Calorimeter/CaloRec/python/CaloBCIDAvgAlgConfig.py
View file @
9e7e71bb
...
...
@@ -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
()
...
...
Calorimeter/CaloRec/python/CaloCellMakerConfig.py
View file @
9e7e71bb
# 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
...
...
Calorimeter/CaloRec/python/CaloRecoConfig.py
View file @
9e7e71bb
# 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"
)
...
...
Calorimeter/CaloRec/python/CaloTopoClusterConfig.py
View file @
9e7e71bb
# 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
CaloCluster
Correction.CaloClusterCorrectionConf
import
CaloClusterLocalCalib
CaloLCClassificationTool
,
CaloLCWeightTool
,
CaloLCOutOfClusterTool
,
CaloLCDeadMaterialTool
=
CompFactory
.
getComps
(
"CaloLCClassificationTool"
,
"CaloLCWeightTool"
,
"CaloLCOutOfClusterTool"
,
"CaloLCDeadMaterialTool"
,)
CaloCluster
LocalCalib
=
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
CaloCalib
HitRec.CaloCalibHitRecConf
import
CaloCalibClusterMomentsMaker2
CaloCalib
ClusterMomentsMaker2
=
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
CaloCluster
Correction.CaloClusterCorrectionConf
import
CaloClusterBadChannelList
CaloCluster
BadChannelList
=
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
,
...
...
Calorimeter/CaloTools/python/CaloEstimatedGainToolConfig.py
View file @
9e7e71bb
...
...
@@ -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
TileCond
itions.TileConditionsConf
import
TileCondIdTransforms
TileCond
IdTransforms
=
CompFactory
.
TileCondIdTransforms
from
CaloTools.Calo
Tool
s
Co
nf
import
CaloEstimatedGainTool
CaloEstimatedGain
Tool
=
Co
mpFactory
.
CaloEstimatedGainTool
tool
=
CaloEstimatedGainTool
(
'CaloEstimatedGainTool'
,
ADC2MeVKey
=
adc2mev
.
LArADC2MeVKey
,
TileCondIdTransforms
=
TileCondIdTransforms
(),
...
...
Calorimeter/CaloTools/python/CaloNoiseCondAlgConfig.py
View file @
9e7e71bb
# 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"
):
...
...
Control/AthenaConfiguration/python/ComponentAccumulatorTest.py
View file @
9e7e71bb
...
...
@@ -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
()
...
...
Control/AthenaConfiguration/python/MainServicesConfig.py
View file @
9e7e71bb
# 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
StoreGate
Svc
=
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.GaudiCor
eSvcCo
nf
import
MessageSvc
from
GaudiSvc.Gaudi
SvcCo
nf
import
StatusCodeSvc
,
AuditorSvc
Messag
eSvc
=
Co
mpFactory
.
MessageSvc
StatusCodeSvc
,
Auditor
Svc
=
Co
mpFactory
.
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
Athena
Services.AthenaServicesConf
import
AthenaHiveEventLoopMgr
Athena
HiveEventLoopMgr
=
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
)
...
...
Control/AthenaExamples/AthExHelloWorld/python/HelloWorldConfig.py
View file @
9e7e71bb
# 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!"
...
...
Control/RngComps/python/RandomServices.py
View file @
9e7e71bb
...
...
@@ -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
=
{
...
...
Control/SGComps/python/AddressRemappingConfig.py
View file @
9e7e71bb
...
...
@@ -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
()
...
...
Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolReadConfig.py
View file @
9e7e71bb
# 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.
PoolSvcCo
nf
import
PoolSvc
f
ro
m
SGComps.SGCompsConf
import
ProxyProviderSvc
from
AthenaPoolCnvSvc
.AthenaPoolCnvSvcConf
import
AthenaPoolCnvSvc
from
EventSelectorAthenaPool.EventSelectorAthenaPoolConf
import
AthenaPoolAddressProviderSvc
,
EventSelectorAthenaPool
,
DoubleEventSelectorAthenaPool
from
GaudiSvc.Gaudi
SvcCo
nf
import
EvtPersistencySvc
PoolSvc
=
Co
mpFactory
.
PoolSvc
P
ro
xyProviderSvc
=
CompFactory
.
ProxyProviderSvc
AthenaPoolCnvSvc
=
CompFactory
.
AthenaPoolCnvSvc
AthenaPoolAddressProviderSvc
,
EventSelectorAthenaPool
,
DoubleEventSelectorAthenaPool
=
CompFactory
.
getComps
(
"AthenaPoolAddressProviderSvc"
,
"EventSelectorAthenaPool"
,
"DoubleEventSelectorAthenaPool"
,)
EvtPersistency
Svc
=
Co
mpFactory
.
EvtPersistencySvc
from
StoreGate
.StoreGateConf
import
StoreGateSvc
StoreGate
Svc
=
CompFactory
.
StoreGateSvc
result
.
addService
(
PoolSvc
(
MaxFilesOpen
=
0
))
apcs
=
AthenaPoolCnvSvc
()
...
...
Database/AthenaPOOL/AthenaPoolCnvSvc/python/PoolWriteConfig.py
View file @
9e7e71bb
...
...
@@ -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
):
...
...
Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamConfig.py
View file @
9e7e71bb
# 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
Athena
Services.AthenaServicesConf
import
AthenaOutputStream
from
Athena
Services.AthenaServicesConf
import
AthenaOutputStreamTool
from
StoreGate
.StoreGateConf
import
StoreGateSvc
MakeEventStreamInfo
=
CompFactory
.
MakeEventStreamInfo
Athena
OutputStream
=
CompFactory
.
AthenaOutputStream
Athena
OutputStreamTool
=
CompFactory
.
AthenaOutputStreamTool
StoreGate
Svc
=
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'"
]
...
...
Database/CoolLumiUtilities/python/BunchGroupCondAlgConfig.py
View file @
9e7e71bb
...
...
@@ -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'
)
...
...
Database/CoolLumiUtilities/python/BunchLumisCondAlgConfig.py
View file @
9e7e71bb
...
...
@@ -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
,
...
...
Prev
1
2
3
4
5
…
13
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment