ATLAS Offline Software
MuonCalibStreamCnvConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
4 from AthenaConfiguration.ComponentFactory import CompFactory
5 
6 
8  """Set up to read from a muon calibration stream bytestream file
9 
10  The function adds the components required to read events and metadata from
11  bytestream input. May be used to read events from a secondary input as well
12  primary input file.
13 
14  Args:
15  flags: Job configuration flags
16  Fix the type_names for MDT, TGC and RPC in this configuration
17 
18  Services:
19  MuonCalibStreamCnvSvcCfg
20  MuonCalibStreamDataProviderSvcCfg
21  MuonCalibStreamFileInputSvcCfg
22  MuonCalibStreamAddressProviderSvcCfg (comment out after changing from converter to alg)
23  EventSelectorMuonCalibStreamCfg
24  MuonCalibRunLumiBlockCoolSvcCfg (to be fixed)
25 
26  Returns:
27  A component accumulator fragment containing the components required to read
28  from Muon calibration stream bytestream data. Should be merged into main job configuration.
29  """
30  result = ComponentAccumulator()
31 
32  # import the basic fragment
33  from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg,MuonGeoModelCfg
34  result.merge(MuonIdHelperSvcCfg(flags))
35  result.merge(MuonGeoModelCfg(flags))
36 
37  from MuonCalibStreamCnvSvc.MuonCalibStreamCnvSvcConfig import MuonCalibStreamCnvSvcCfg,\
38  MuonCalibStreamDataProviderSvcCfg,\
39  MuonCalibStreamFileInputSvcCfg,\
40  EventSelectorMuonCalibStreamCfg,\
41  MuonCalibRunLumiBlockCoolSvcCfg
42  result.merge(MuonCalibStreamCnvSvcCfg(flags))
43 
44  # set MuonCalibStream EvtPersistencySvc
45  event_persistency = CompFactory.EvtPersistencySvc(name="EventPersistencySvc", CnvServices=["MuonCalibStreamCnvSvc"])
46  result.addService(event_persistency)
47 
48  # set MuonCalibrationStream event selector
49  result.merge(EventSelectorMuonCalibStreamCfg(flags, name = 'EventSelector'))
50  result.setAppProperty("EvtSel", "EventSelector")
51 
52  # import other MuonCalibStreamCnv Services
53  result.merge(MuonCalibStreamFileInputSvcCfg(flags))
54  result.merge(MuonCalibStreamDataProviderSvcCfg(flags))
55  result.merge(MuonCalibRunLumiBlockCoolSvcCfg(flags))
56 
57  return result
58 
59 
60 
61 def MuonCalibStreamTestAlgCfg(flags, name = "MuonCalibStreamTestAlg", **kwargs):
62  result = ComponentAccumulator()
63 
64  from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg,MuonGeoModelCfg
65  result.merge(MuonIdHelperSvcCfg(flags))
66  result.merge(MuonGeoModelCfg(flags))
67 
68  result.addEventAlgo(CompFactory.MuonCalibStreamTestAlg(name, **kwargs))
69 
70  return result
71 
72 def EventInfoCalibRawDataProviderCfg(flags, name = "EventInfoCalibRawDataProviderAlg", **kwargs):
73  result = ComponentAccumulator()
74 
75  result.addEventAlgo(CompFactory.EventInfoCalibRawDataProvider(name, lb_from_cool = False, **kwargs))
76 
77  return result
78 
79 
80 def MdtCalibRawDataProviderCfg(flags, name = "MdtCalibRawDataProviderAlg", **kwargs):
81  result = ComponentAccumulator()
82 
83  from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg,MuonGeoModelCfg
84  result.merge(MuonIdHelperSvcCfg(flags))
85  result.merge(MuonGeoModelCfg(flags))
86 
87  result.addEventAlgo(CompFactory.MdtCalibRawDataProvider(name,**kwargs))
88 
89  return result
90 
91 def RpcCalibRawDataProviderCfg(flags, name = "RpcCalibRawDataProviderAlg", **kwargs):
92  result = ComponentAccumulator()
93 
94  from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg,MuonGeoModelCfg
95  result.merge(MuonIdHelperSvcCfg(flags))
96  result.merge(MuonGeoModelCfg(flags))
97 
98  result.addEventAlgo(CompFactory.RpcCalibRawDataProvider(name,**kwargs))
99 
100  return result
101 
102 def TgcCalibRawDataProviderCfg(flags, name = "TgcCalibRawDataProviderAlg", **kwargs):
103  result = ComponentAccumulator()
104 
105  from MuonConfig.MuonGeometryConfig import MuonIdHelperSvcCfg,MuonGeoModelCfg
106  result.merge(MuonIdHelperSvcCfg(flags))
107  result.merge(MuonGeoModelCfg(flags))
108 
109  result.addEventAlgo(CompFactory.TgcCalibRawDataProvider(name,**kwargs))
110 
111  return result
112 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
MuonCalibStreamCnvConfig.MuonCalibStreamReadCfg
def MuonCalibStreamReadCfg(flags)
Definition: MuonCalibStreamCnvConfig.py:7
MuonCalibStreamCnvConfig.RpcCalibRawDataProviderCfg
def RpcCalibRawDataProviderCfg(flags, name="RpcCalibRawDataProviderAlg", **kwargs)
Definition: MuonCalibStreamCnvConfig.py:91
MuonCalibStreamCnvConfig.EventInfoCalibRawDataProviderCfg
def EventInfoCalibRawDataProviderCfg(flags, name="EventInfoCalibRawDataProviderAlg", **kwargs)
Definition: MuonCalibStreamCnvConfig.py:72
MuonCalibStreamCnvConfig.MdtCalibRawDataProviderCfg
def MdtCalibRawDataProviderCfg(flags, name="MdtCalibRawDataProviderAlg", **kwargs)
Definition: MuonCalibStreamCnvConfig.py:80
python.MuonGeometryConfig.MuonIdHelperSvcCfg
def MuonIdHelperSvcCfg(flags)
Definition: MuonGeometryConfig.py:15
MuonCalibStreamCnvSvcConfig.MuonCalibStreamFileInputSvcCfg
def MuonCalibStreamFileInputSvcCfg(flags, name='MuonCalibStreamFileInputSvc')
Definition: MuonCalibStreamCnvSvcConfig.py:6
MuonCalibStreamCnvSvcConfig.EventSelectorMuonCalibStreamCfg
def EventSelectorMuonCalibStreamCfg(flags, name='EventSelectorMuonCalibStream')
Definition: MuonCalibStreamCnvSvcConfig.py:37
MuonCalibStreamCnvConfig.MuonCalibStreamTestAlgCfg
def MuonCalibStreamTestAlgCfg(flags, name="MuonCalibStreamTestAlg", **kwargs)
Definition: MuonCalibStreamCnvConfig.py:61
MuonCalibStreamCnvConfig.TgcCalibRawDataProviderCfg
def TgcCalibRawDataProviderCfg(flags, name="TgcCalibRawDataProviderAlg", **kwargs)
Definition: MuonCalibStreamCnvConfig.py:102
python.MuonGeometryConfig.MuonGeoModelCfg
def MuonGeoModelCfg(flags)
Definition: MuonGeometryConfig.py:28
MuonCalibStreamCnvSvcConfig.MuonCalibStreamDataProviderSvcCfg
def MuonCalibStreamDataProviderSvcCfg(flags, name='MuonCalibStreamDataProviderSvc')
Definition: MuonCalibStreamCnvSvcConfig.py:30
MuonCalibStreamCnvSvcConfig.MuonCalibStreamCnvSvcCfg
def MuonCalibStreamCnvSvcCfg(flags, name='MuonCalibStreamCnvSvc')
Definition: MuonCalibStreamCnvSvcConfig.py:14
MuonCalibStreamCnvSvcConfig.MuonCalibRunLumiBlockCoolSvcCfg
def MuonCalibRunLumiBlockCoolSvcCfg(flags, name='MuonCalibRunLumiBlockCoolSvc')
Definition: MuonCalibStreamCnvSvcConfig.py:44