3"""Define methods to construct configured TileHid2ReSrcIDCondAlg conditions algorithm"""
5from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6from AthenaConfiguration.ComponentFactory
import CompFactory
7from IOVDbSvc.IOVDbSvcConfig
import addFolders
11 """Return component accumulator with configured TileHid2ReSrcIDCondAlg conditions algorithm"""
13 forHLT = kwargs.get(
'ForHLT',
False)
14 hid2RESrcID =
'TileHid2RESrcIDHLT' if forHLT
else 'TileHid2RESrcID'
15 kwargs.setdefault(
'TileHid2RESrcID', hid2RESrcID)
16 kwargs.setdefault(
'name', f
'{hid2RESrcID}CondAlg')
18 acc = ComponentAccumulator()
20 from TileGeoModel.TileGMConfig
import TileGMCfg
21 acc.merge( TileGMCfg(flags) )
26 if flags.IOVDb.DatabaseInstance ==
'COMP200':
28 kwargs[
'FullTileMode'] = 1
29 elif flags.Input.isMC:
30 rodFolder =
'/TILE/OFL02/STATUS/ROD'
32 acc.merge(addFolders(flags, rodFolder,
'TILE_OFL', tag=
'TileOfl02StatusRod-RUN3-00', className=
'CondAttrListCollection'))
34 rodFolder =
'/TILE/ONL01/STATUS/ROD'
35 acc.merge(addFolders(flags, rodFolder,
'TILE', className=
'CondAttrListCollection'))
38 TileCondProxyCoolInt = CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerInt>")
40 kwargs[
'RODStatusProxy'] = rodStatusProxy
42 elif source ==
'FILE':
43 TileCondProxyFileInt = CompFactory.getComp(
"TileCondProxyFile<TileCalibDrawerInt>")
45 kwargs[
'RODStatusProxy'] = rodStatusProxy
47 TileHid2ReSrcIDCondAlg = CompFactory.TileHid2RESrcIDCondAlg
48 acc.addCondAlgo( TileHid2ReSrcIDCondAlg(**kwargs) )
54if __name__ ==
"__main__":
56 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
57 from AthenaConfiguration.TestDefaults
import defaultGeometryTags, defaultTestFiles
58 from AthenaCommon.Logging
import log
64 flags = initConfigFlags()
65 flags.Input.Files = defaultTestFiles.RAW_RUN2
66 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
70 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
71 cfg = MainServicesCfg(flags)
73 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
74 cfg.merge( ByteStreamReadCfg(flags) )
78 cfg.printConfig(withDetails =
True, summariseProps =
True)
79 cfg.store( open(
'TileHid2ReSrcIDCondAlg.pkl',
'wb') )
85 sys.exit(
not sc.isSuccess())
TileHid2RESrcIDCondAlgCfg(flags, source='COOL', **kwargs)