3 """Define methods to construct configured Tile MuID conditions tool and algorithm"""
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
9 """Return component accumulator with configured Tile MuID conditions algorithm
12 flags -- Athena configuration flags
14 Source -- source of Tile MuID conditions (COOL, FILE). Defaults to COOL.
15 TileMuID -- name of Tile MuID conditions object. Defaults to TileMuID.
20 source = kwargs.get(
'Source',
'COOL')
21 muID = kwargs.get(
'TileMuID',
'TileMuID')
23 name = muID +
'CondAlg'
28 from TileConditions.TileFolders
import TileFolders
29 folders = TileFolders(isMC = flags.Input.isMC, isOnline = flags.Common.isOnline)
31 muIDFolder = folders.addSplitMC(
'/TILE/ONL01/MUID',
'/TILE/ONL01/MUID')
33 TileCondProxyCoolFlt=CompFactory.getComp(
"TileCondProxyCool<TileCalibDrawerFlt>")
36 from IOVDbSvc.IOVDbSvcConfig
import addFolderList
39 elif source ==
'FILE':
41 TileCondProxyFileFlt=CompFactory.getComp(
"TileCondProxyFile<TileCalibDrawerFlt>")
44 raise(Exception(
"Invalid source: %s" % source))
46 TileCalibFltCondAlg=CompFactory.getComp(
"TileCalibCondAlg<TileCalibDrawerFlt>")
48 ConditionsProxy = muIDProxy,
51 acc.addCondAlgo(muIDCondAlg)
57 """Return component accumulator with configured private Tile MuID conditions tool
59 flags -- Athena configuration flags
61 Source -- source of Tile MuID conditions (COOL, FILE). Defaults to COOL.
62 TileMuID -- name of Tile MuID conditions object. Defaults to TileMuID.
67 kwargs.setdefault(
'Source',
'COOL')
68 kwargs.setdefault(
'TileMuID',
'TileMuID')
70 muID = kwargs[
'TileMuID']
71 name =
'TileCondToolMuID'
75 TileCondToolMuID=CompFactory.TileCondToolMuID
81 if __name__ ==
"__main__":
83 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
84 from AthenaConfiguration.TestDefaults
import defaultTestFiles
85 from AthenaCommon.Logging
import log
92 flags.Input.Files = defaultTestFiles.RAW_RUN2
100 acc.printConfig(withDetails =
True, summariseProps =
True)
101 print(acc.getService(
'IOVDbSvc'))
102 acc.store(
open(
'TileMuID.pkl',
'wb') )