3 """Define methods to construct configured Tile conditions tools for tests"""
7 """Test Tile conditions tools configuration and return component accumulator"""
9 from AthenaCommon.Logging
import logging
10 msg = logging.getLogger(
'TileCondToolsTestCfg')
12 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
15 from .TileEMScaleConfig
import TileCondToolEmscaleCfg
19 from .TileEMScaleConfig
import TileExpertToolEmscaleCfg
21 msg.info(emScaleExpertTool)
23 from .TileBadChannelsConfig
import TileBadChanToolCfg
27 from .TileMuIDConfig
import TileCondToolMuIDCfg
31 from .TileIntegratorConfig
import TileCondToolIntegratorCfg
33 msg.info(integratorTool)
35 from .TileTimingConfig
import TileCondToolTimingCfg
39 from .TileTimingConfig
import TileCondToolOnlineTimingCfg
41 msg.info(onlineTimingTool)
43 from .TileOFCConfig
import TileCondToolOfcCoolCfg
47 from .TileSampleNoiseConfig
import TileCondToolNoiseSampleCfg
48 if flags.Common.isOnline:
52 TileSampleNoise =
'TileSampleNoise',
53 TileOnlineSampleNoise =
'TileOnlineSampleNoise')
55 sampleNoiseTool = acc.popToolsAndMerge( accSampleNoise )
56 msg.info(sampleNoiseTool)
58 if flags.IOVDb.DatabaseInstance ==
'CONDBR2':
59 from .TileTMDBConfig
import TileCondToolTMDBCfg
63 from .TileDSPThresholdConfig
import TileCondToolDspThresholdCfg
67 if not (flags.IOVDb.DatabaseInstance ==
'CONDBR2' and flags.Common.isOnline):
68 from .TilePulseShapeConfig
import TileCondToolPulseShapeCfg
70 msg.info(pulseShapeTool)
72 from .TilePulseShapeConfig
import TileCondToolMuRcvPulseShapeCfg
74 msg.info(muRcvPulseShapeTool)
76 from .TileAutoCorrelationConfig
import TileCondToolAutoCrCfg
78 msg.info(autoCorrelationTool)
80 from .TileOFCConfig
import TileCondToolOfcCfg
85 if not (flags.Input.isMC
or flags.Common.isOnline):
86 from TileConditions.TileDCSConfig
import TileDCSToolCfg
93 if __name__ ==
"__main__":
95 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
96 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
97 from AthenaConfiguration.TestDefaults
import defaultTestFiles
98 from AthenaCommon.Logging
import log
105 flags.Input.Files = defaultTestFiles.RAW_RUN2
111 acc.printConfig(withDetails =
True, summariseProps =
True)
112 print(acc.getService(
'IOVDbSvc'))
113 acc.store(
open(
'TileCondTools.pkl',
'wb') )