5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
7 from AthenaConfiguration.Enums
import Format
11 @file TileAtlantisConfig.py
12 @brief Python configuration of Atlantis algorithm for Tile for the Run III
17 ''' Function to get Tile digits container to be used in Atlantis.'''
19 tileDigitsContainer =
"TileDigitsCnt"
21 if flags.Input.Format
is Format.POOL:
22 if "TileDigitsCnt" in flags.Input.Collections:
23 tileDigitsContainer =
"TileDigitsCnt"
24 elif "TileDigitsFlt" in flags.Input.Collections:
25 tileDigitsContainer =
"TileDigitsFlt"
27 return tileDigitsContainer
31 ''' Function to get Tile raw channel container to be used in Atlantis.'''
33 tileRawChannelContainer =
""
35 if flags.Input.Format
is Format.BS
and flags.Tile.readDigits:
37 tileRawChannelContainer =
'TileRawChannelOpt2'
38 elif flags.Tile.doOptATLAS:
39 tileRawChannelContainer =
'TileRawChannelFixed'
40 elif flags.Tile.doFitCOOL:
41 tileRawChannelContainer =
'TileRawChannelFitCool'
42 elif flags.Tile.doFit:
43 tileRawChannelContainer =
'TileRawChannelFit'
45 if "TileRawChannelOpt2" in flags.Input.Collections:
46 tileRawChannelContainer =
'TileRawChannelOpt2'
47 elif "TileRawChannelFitCool" in flags.Input.Collections:
48 tileRawChannelContainer =
'TileRawChannelFitCool'
49 elif "TileRawChannelFit" in flags.Input.Collections:
50 tileRawChannelContainer =
'TileRawChannelFit'
51 elif "TileRawChannelCnt" in flags.Input.Collections:
52 tileRawChannelContainer =
'TileRawChannelCnt'
54 return tileRawChannelContainer
58 CaloClusterContainer='TileTopoCluster', **kwargs):
60 Function to configure AlgoJiveXML algorithm for Tile.
63 TileDigitsContainer -- name of Tile digits container (default: None).
64 In the case of None it will be autoconfigured.
65 In the case of empty string it will not be used.
66 TileRawChannelContainer -- name of Tile raw channel container (default: None).
67 In the case of None it will be autoconfigured.
68 In the case of empty string it will not be used.
69 CaloClusterContainer -- name of Calo cluster container (default: TileTopoCluster).
70 In the case of empty string it will not be used.
73 if TileDigitsContainer
is None:
76 digitsContainer = TileDigitsContainer
78 if TileRawChannelContainer
is None:
81 rawChannelContainer = TileRawChannelContainer
83 useDigits = digitsContainer !=
""
84 useRawChannels = rawChannelContainer !=
""
85 useClusters = CaloClusterContainer !=
""
87 from AthenaCommon.Logging
import logging
88 msg = logging.getLogger(
'TileAlgoJiveXMLCfg')
91 msg.info(f
'Use TileDigitsContainer [{digitsContainer}]')
93 msg.info(
'TileDigitsContainer is not configured => no use of digits')
96 msg.info(f
'Use TileRawChannelContainer [{rawChannelContainer}] for detailed information')
98 msg.info(
'TileRawChannelContainer is not configured => no detailed cell information')
101 msg.info(f
'Use CaloClusterContainer [{CaloClusterContainer}]')
103 msg.info(
'CaloClusterContainer is not configured => no clusters information')
107 from TileGeoModel.TileGMConfig
import TileGMCfg
110 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
113 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg
116 from TileConditions.TileInfoLoaderConfig
import TileInfoLoaderCfg
119 from TileConditions.TileBadChannelsConfig
import TileBadChannelsCondAlgCfg
122 from TileConditions.TileEMScaleConfig
import TileEMScaleCondAlgCfg
125 from TileConditions.TileTimingConfig
import TileTimingCondAlgCfg
129 from TileMonitoring.TileTopoClusterConfig
import TileTopoClusterCfg
132 dataRetrieverTools = [
133 CompFactory.JiveXML.CaloTileRetriever(
134 name=
"TileRetriever",
135 TileDigitsContainer=digitsContainer,
136 TileRawChannelContainer=rawChannelContainer,
137 DoTileCellDetails=useRawChannels,
138 DoTileDigit=useDigits,
144 dataRetrieverTools += [
145 CompFactory.JiveXML.CaloMBTSRetriever(
146 name=
"MBTSRetriever",
147 TileDigitsContainer=digitsContainer,
148 TileRawChannelContainer=rawChannelContainer,
149 DoMBTSDigits=useDigits,
150 DoMBTSCellDetails=useRawChannels,
156 dataRetrieverTools += [
157 CompFactory.JiveXML.CaloClusterRetriever(
158 name=
"TileClusterRetriever",
159 FavouriteClusterCollection=
"TileTopoCluster",
160 OtherClusterCollections=[
"TileTopoCluster"]
164 for dataRetrieverTool
in dataRetrieverTools:
165 acc.addPublicTool(dataRetrieverTool)
167 kwargs.setdefault(
"AtlasRelease", os.environ.get(
"AtlasVersion",
"Unknown"))
168 kwargs.setdefault(
"WriteToFile",
True)
169 kwargs.setdefault(
"OnlineMode",
False)
170 kwargs.setdefault(
"StreamToServerTool",
None)
172 kwargs.setdefault(
"WriteGeometry",
False)
173 kwargs.setdefault(
"DataRetrieverTools", dataRetrieverTools)
175 AlgoJiveXML = CompFactory.JiveXML.AlgoJiveXML
176 acc.addEventAlgo(AlgoJiveXML(name=
"AlgoJiveXML", **kwargs), primary=
True)
181 if __name__ ==
'__main__':
184 from AthenaCommon.Logging
import log
189 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
190 from AthenaConfiguration.TestDefaults
import defaultTestFiles
192 flags.Input.Files = defaultTestFiles.ESD
193 flags.Exec.MaxEvents = 3
198 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
199 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
205 cfg.printConfig(withDetails=
True, summariseProps=
True)
212 sys.exit(
not sc.isSuccess())