ATLAS Offline Software
OutputConditionsAlgConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.ComponentFactory import CompFactory
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 
5 def OutputConditionsAlgCfg(flags, name="OutputConditionsAlg",outputFile='condobjs.root', **kwargs):
6 
7  result = ComponentAccumulator(sequence = CompFactory.AthSequencer("AthOutSeq", StopOverride=True))
8 
9  from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
10  result.merge(PoolWriteCfg(flags))
11 
12  kwargs.setdefault("WriteIOV",True)
13  oca=CompFactory.OutputConditionsAlg(name,**kwargs)
14 
15 
16  # create outputStream tool with given filename and pass to myOCA
17  condstream=CompFactory.AthenaOutputStreamTool(name+"Tool")
18 
19  #To be fixed: OutputConditionsAlgo works with a string-name of a public tool
20  oca.StreamName=name+"Tool"
21  condstream.OutputFile=outputFile
22  condstream.PoolContainerPrefix="ConditionsContainer"
23  condstream.TopLevelContainerName = "<type>"
24  condstream.SubLevelBranchName = "<key>"
25  result.addPublicTool(condstream)
26 
27  result.addEventAlgo(oca)
28 
29  return result
python.PoolWriteConfig.PoolWriteCfg
def PoolWriteCfg(flags)
Definition: PoolWriteConfig.py:41
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
OutputConditionsAlgConfig.OutputConditionsAlgCfg
def OutputConditionsAlgCfg(flags, name="OutputConditionsAlg", outputFile='condobjs.root', **kwargs)
Definition: OutputConditionsAlgConfig.py:5