ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_ConditionsServicesConfig.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2from AthenaConfiguration.AccumulatorCache import AccumulatorCache
3from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4from AthenaConfiguration.ComponentFactory import CompFactory
5from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
6
7
8@AccumulatorCache
9def TRT_CalDbToolCfg(flags, name="TRT_CalDbTool", **kwags):
10 """Return a ComponentAccumulator for TRT_CalDbTool"""
11 from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
12 acc = ComponentAccumulator()
13
14 acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/RT", "/TRT/Calib/RT", className="TRTCond::RtRelationMultChanContainer"))
15 acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/T0", "/TRT/Calib/T0", className='TRTCond::StrawT0MultChanContainer'))
16 acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/errors2d", "/TRT/Calib/errors2d", className="TRTCond::RtRelationMultChanContainer"))
17 acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/slopes", "/TRT/Calib/slopes", className='TRTCond::RtRelationMultChanContainer'))
18
19 acc.setPrivateTools(CompFactory.TRT_CalDbTool(name, **kwags))
20 return acc
21
22
23def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", **kwargs):
24 """Return a ComponentAccumulator for TRT_StrawStatusSummaryTool"""
25 acc = ComponentAccumulator()
26
27 if flags.GeoModel.Align.LegacyConditionsAccess: # revert to old style CondHandle in case of simulation
28 # Dead/Noisy Straw Lists not used!
29 # Argon straw list
30 acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Cond/StatusHT", "/TRT/Cond/StatusHT"))
31 else:
32 # Dead/Noisy Straw Lists
33 from TRT_ConditionsAlgs.TRT_ConditionsAlgsConfig import TRTStrawStatusCondAlgCfg
34 acc.merge(TRTStrawStatusCondAlgCfg(flags))
35
36
37 kwargs.setdefault("isGEANT4", flags.GeoModel.Align.LegacyConditionsAccess)
38
39 acc.setPrivateTools(CompFactory.TRT_StrawStatusSummaryTool(name, **kwargs))
40 return acc
41
42
43def TRT_StrawNeighbourSvcCfg(flags, name="TRT_StrawNeighbourSvc", **kwargs):
44 acc = ComponentAccumulator()
45 acc.addService(CompFactory.TRT_StrawNeighbourSvc(name, **kwargs), primary=True)
46 return acc
47
48
49def TRT_MCCalDbToolCfg(flags, name="TRT_CalDbTool2", **kwargs):
50 """Return a ComponentAccumulator for TRT_CalDbTool configured for MC in case of data overlay."""
51 acc = ComponentAccumulator()
52 acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/MC/RT", "/TRT/Calib/MC/RT", className="TRTCond::RtRelationMultChanContainer"))
53 acc.merge(addFoldersSplitOnline(flags, "TRT", "/TRT/Onl/Calib/MC/T0", "/TRT/Calib/MC/T0", className='TRTCond::StrawT0MultChanContainer'))
54
55 kwargs.setdefault("RtFolderName", "/TRT/Calib/MC/RT")
56 kwargs.setdefault("T0FolderName", "/TRT/Calib/MC/T0")
57 acc.setPrivateTools(acc.popToolsAndMerge(TRT_CalDbToolCfg(flags, name, **kwargs)))
58
59 return acc
TRT_CalDbToolCfg(flags, name="TRT_CalDbTool", **kwags)
TRT_MCCalDbToolCfg(flags, name="TRT_CalDbTool2", **kwargs)
TRT_StrawNeighbourSvcCfg(flags, name="TRT_StrawNeighbourSvc", **kwargs)
TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", **kwargs)