3 """Define methods to construct configured TileHid2ReSrcIDCondAlg conditions algorithm"""
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from IOVDbSvc.IOVDbSvcConfig
import addFolders
10 """Configure TileHid2ReSrcIDCondAlg conditions algorithm"""
12 hid2RESrcID =
'TileHid2RESrcIDHLT' if ForHLT
else 'TileHid2RESrcID'
13 hid2RESrcIDCondAlg = f
'{hid2RESrcID}CondAlg'
14 from AthenaCommon.AlgSequence
import AthSequencer
16 if hasattr(condSequence, hid2RESrcIDCondAlg):
19 from TileByteStream.TileByteStreamConf
import TileHid2RESrcIDCondAlg
20 condSequence +=
TileHid2RESrcIDCondAlg(name=hid2RESrcIDCondAlg, ForHLT=ForHLT, TileHid2RESrcID=hid2RESrcID, **kwargs)
25 """Return component accumulator with configured TileHid2ReSrcIDCondAlg conditions algorithm"""
27 forHLT = kwargs.get(
'ForHLT',
False)
28 hid2RESrcID =
'TileHid2RESrcIDHLT' if forHLT
else 'TileHid2RESrcID'
29 kwargs.setdefault(
'TileHid2RESrcID', hid2RESrcID)
30 kwargs.setdefault(
'name', f
'{hid2RESrcID}CondAlg')
34 from TileGeoModel.TileGMConfig
import TileGMCfg
40 if flags.IOVDb.DatabaseInstance ==
'COMP200':
42 kwargs[
'FullTileMode'] = 1
43 elif flags.Input.isMC:
44 rodFolder =
'/TILE/OFL02/STATUS/ROD'
46 acc.merge(
addFolders(flags, rodFolder,
'TILE_OFL', tag=
'TileOfl02StatusRod-RUN3-00', className=
'CondAttrListCollection'))
48 rodFolder =
'/TILE/ONL01/STATUS/ROD'
49 acc.merge(
addFolders(flags, rodFolder,
'TILE', className=
'CondAttrListCollection'))
52 TileCondProxyCoolInt = CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerInt>")
54 kwargs[
'RODStatusProxy'] = rodStatusProxy
56 elif source ==
'FILE':
57 TileCondProxyFileInt = CompFactory.getComp(
"TileCondProxyFile<TileCalibDrawerInt>")
59 kwargs[
'RODStatusProxy'] = rodStatusProxy
61 TileHid2ReSrcIDCondAlg = CompFactory.TileHid2RESrcIDCondAlg
62 acc.addCondAlgo( TileHid2ReSrcIDCondAlg(**kwargs) )
68 if __name__ ==
"__main__":
70 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
71 from AthenaConfiguration.TestDefaults
import defaultGeometryTags, defaultTestFiles
72 from AthenaCommon.Logging
import log
79 flags.Input.Files = defaultTestFiles.RAW_RUN2
80 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN2
84 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
87 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
92 cfg.printConfig(withDetails =
True, summariseProps =
True)
93 cfg.store(
open(
'TileHid2ReSrcIDCondAlg.pkl',
'wb') )
99 sys.exit(
not sc.isSuccess())