ATLAS Offline Software
TRT_ConditionsServicesConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 from AthenaConfiguration.AccumulatorCache import AccumulatorCache
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
6 
7 
8 @AccumulatorCache
9 def 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 
23 def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", forceLegacyAccess=False, **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 or forceLegacyAccess)
38 
39  acc.setPrivateTools(CompFactory.TRT_StrawStatusSummaryTool(name, **kwargs))
40  return acc
41 
42 def TRT_StrawNeighbourSvcCfg(flags, name="TRT_StrawNeighbourSvc", **kwargs):
43  acc = ComponentAccumulator()
44  acc.addService(CompFactory.TRT_StrawNeighbourSvc(name, **kwargs), primary=True)
45  return acc
46 
47 
48 def TRT_MCCalDbToolCfg(flags, name="TRT_CalDbTool2", **kwargs):
49  """Return a ComponentAccumulator for TRT_CalDbTool configured for MC in case of data overlay."""
50  # TODO: conditions (DataOverlay)
51  kwargs.setdefault("RtFolderName", "/TRT/Calib/MC/RT")
52  kwargs.setdefault("T0FolderName", "/TRT/Calib/MC/T0")
53  return TRT_CalDbToolCfg(flags, name, **kwargs)
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.TRT_ConditionsServicesConfig.TRT_MCCalDbToolCfg
def TRT_MCCalDbToolCfg(flags, name="TRT_CalDbTool2", **kwargs)
Definition: TRT_ConditionsServicesConfig.py:48
python.TRT_ConditionsServicesConfig.TRT_StrawStatusSummaryToolCfg
def TRT_StrawStatusSummaryToolCfg(flags, name="TRT_StrawStatusSummaryTool", forceLegacyAccess=False, **kwargs)
Definition: TRT_ConditionsServicesConfig.py:23
python.IOVDbSvcConfig.addFoldersSplitOnline
def addFoldersSplitOnline(flags, detDb, onlineFolders, offlineFolders, className=None, extensible=False, addMCString='_OFL', splitMC=False, tag=None, forceDb=None, modifiers='')
Definition: IOVDbSvcConfig.py:153
python.TRT_ConditionsAlgsConfig.TRTStrawStatusCondAlgCfg
def TRTStrawStatusCondAlgCfg(flags, name="TRTStrawStatusCondAlg", **kwargs)
Definition: TRT_ConditionsAlgsConfig.py:29
python.TRT_ConditionsServicesConfig.TRT_StrawNeighbourSvcCfg
def TRT_StrawNeighbourSvcCfg(flags, name="TRT_StrawNeighbourSvc", **kwargs)
Definition: TRT_ConditionsServicesConfig.py:42
python.TRT_ConditionsServicesConfig.TRT_CalDbToolCfg
def TRT_CalDbToolCfg(flags, name="TRT_CalDbTool", **kwags)
Definition: TRT_ConditionsServicesConfig.py:9