ATLAS Offline Software
Loading...
Searching...
No Matches
OutputConditionsAlgConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.ComponentFactory import CompFactory
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4
5def 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
14 # create outputStream tool with given filename and pass to myOCA
15 condstream=CompFactory.AthenaOutputStreamTool(name+"Tool",
16 OutputFile=outputFile,
17 PoolContainerPrefix="ConditionsContainer",
18 TopLevelContainerName="<type>",
19 SubLevelBranchName="<key>"
20 )
21 kwargs.setdefault("StreamName",condstream)
22 oca=CompFactory.OutputConditionsAlg(name,**kwargs)
23 result.addEventAlgo(oca)
24
25 return result
OutputConditionsAlgCfg(flags, name="OutputConditionsAlg", outputFile='condobjs.root', **kwargs)