ATLAS Offline Software
SCT_RawDataByteStreamCnvConfig.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory import CompFactory
7 from SCT_Cabling.SCT_CablingConfig import SCT_CablingToolCfg
8 from SCT_ConditionsTools.SCT_ConditionsToolsConfig import SCT_ConfigurationConditionsToolCfg
9 from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
10 
11 
12 def SCT_RodDecoderCfg(flags, prefix="InDet", suffix="", **kwargs):
13  acc = ComponentAccumulator()
14  acc.merge(SCT_ReadoutGeometryCfg(flags))
15  kwargs.setdefault("SCT_CablingTool", acc.popToolsAndMerge(SCT_CablingToolCfg(flags)))
16  kwargs.setdefault("ConfigTool", acc.popToolsAndMerge(SCT_ConfigurationConditionsToolCfg(flags)))
17  acc.setPrivateTools(CompFactory.SCT_RodDecoder(name=prefix+"SCTRodDecoder"+suffix,
18  **kwargs))
19  return acc
20 
21 
22 def SCTRawDataProviderToolCfg(flags, prefix="InDet", suffix="", **kwargs):
23  acc = ComponentAccumulator()
24  kwargs.setdefault("Decoder", acc.popToolsAndMerge(SCT_RodDecoderCfg(flags, prefix=prefix, suffix=suffix)))
25  acc.setPrivateTools(CompFactory.SCTRawDataProviderTool(name=prefix+"SCTRawDataProviderTool"+suffix,
26  **kwargs))
27  return acc
28 
29 
30 def SCTRawDataProviderCfg(flags, prefix="InDet", suffix="", **kwargs):
31  """ Configures the main algorithm for SCT raw data decoding """
32  acc = ComponentAccumulator()
33  kwargs.setdefault("ProviderTool", acc.popToolsAndMerge(SCTRawDataProviderToolCfg(flags, prefix, suffix)))
34  acc.addEventAlgo(CompFactory.SCTRawDataProvider(name=prefix+"SCTRawDataProvider"+suffix,
35  **kwargs))
36  return acc
37 
38 
39 
40 def TrigSCTRawDataProviderCfg(flags, suffix, RoIs):
41  """ Configures the SCT raw data decoding with trigger args """
42 
43  from RegionSelector.RegSelToolConfig import regSelTool_SCT_Cfg
44 
45  regSelAcc = regSelTool_SCT_Cfg(flags)
46  regSelTools = regSelAcc.popPrivateTools()
47  trigargs = {
48  'prefix' : 'Trig',
49  'suffix' : suffix,
50  'RegSelTool' : regSelTools,
51  'RDOKey' : 'SCT_RDOs',
52  'RoIs' : RoIs,
53  'isRoI_Seeded': True,
54  'RDOCacheKey' : flags.Trigger.InDetTracking.SCTRDOCacheKey,
55  'BSErrCacheKey' : flags.Trigger.InDetTracking.SCTBSErrCacheKey,
56  'StoreInDetTimeCollections' : False,
57  }
58 
59  dataPrepAcc = SCTRawDataProviderCfg(flags, **trigargs)
60  dataPrepAcc.merge(regSelAcc)
61  return dataPrepAcc
62 
63 def SCTOverlayRawDataProviderCfg(flags, prefix="InDet", suffix="", **kwargs):
64  """ Configures the main algorithm for SCT raw data decoding for data overlay """
65  kwargs.setdefault("RDOKey", flags.Overlay.BkgPrefix + "SCT_RDOs")
66  kwargs.setdefault("LVL1IDKey", flags.Overlay.BkgPrefix + "SCT_LVL1ID")
67  kwargs.setdefault("BCIDKey", flags.Overlay.BkgPrefix + "SCT_BCID")
68  return SCTRawDataProviderCfg(flags, prefix, suffix, **kwargs)
69 
70 
71 def SCTEventFlagWriterCfg(flags, prefix="InDet", suffix="", **kwargs):
72  acc = ComponentAccumulator()
73  acc.addEventAlgo(CompFactory.SCTEventFlagWriter(name=prefix+"SCTEventFlagWriter"+suffix,
74  **kwargs))
75  return acc
python.SCT_RawDataByteStreamCnvConfig.SCTRawDataProviderCfg
def SCTRawDataProviderCfg(flags, prefix="InDet", suffix="", **kwargs)
Definition: SCT_RawDataByteStreamCnvConfig.py:30
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
RegSelToolConfig.regSelTool_SCT_Cfg
def regSelTool_SCT_Cfg(flags)
Definition: RegSelToolConfig.py:108
python.SCT_RawDataByteStreamCnvConfig.TrigSCTRawDataProviderCfg
def TrigSCTRawDataProviderCfg(flags, suffix, RoIs)
Definition: SCT_RawDataByteStreamCnvConfig.py:40
python.SCT_RawDataByteStreamCnvConfig.SCTRawDataProviderToolCfg
def SCTRawDataProviderToolCfg(flags, prefix="InDet", suffix="", **kwargs)
Definition: SCT_RawDataByteStreamCnvConfig.py:22
python.SCT_RawDataByteStreamCnvConfig.SCT_RodDecoderCfg
def SCT_RodDecoderCfg(flags, prefix="InDet", suffix="", **kwargs)
Definition: SCT_RawDataByteStreamCnvConfig.py:12
SCT_GeoModelConfig.SCT_ReadoutGeometryCfg
def SCT_ReadoutGeometryCfg(flags)
Definition: SCT_GeoModelConfig.py:42
python.SCT_CablingConfig.SCT_CablingToolCfg
def SCT_CablingToolCfg(flags, name="SCT_CablingTool")
Definition: SCT_CablingConfig.py:35
python.SCT_ConditionsToolsConfig.SCT_ConfigurationConditionsToolCfg
def SCT_ConfigurationConditionsToolCfg(flags, name="InDetSCT_ConfigurationConditionsTool", **kwargs)
Definition: SCT_ConditionsToolsConfig.py:126
python.SCT_RawDataByteStreamCnvConfig.SCTEventFlagWriterCfg
def SCTEventFlagWriterCfg(flags, prefix="InDet", suffix="", **kwargs)
Definition: SCT_RawDataByteStreamCnvConfig.py:71
python.SCT_RawDataByteStreamCnvConfig.SCTOverlayRawDataProviderCfg
def SCTOverlayRawDataProviderCfg(flags, prefix="InDet", suffix="", **kwargs)
Definition: SCT_RawDataByteStreamCnvConfig.py:63