7def MuonCalibStreamReadCfg(flags):
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
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
45 event_persistency = CompFactory.EvtPersistencySvc(name="EventPersistencySvc", CnvServices=["MuonCalibStreamCnvSvc"])
46 result.addService(event_persistency)
47
48
49 result.merge(EventSelectorMuonCalibStreamCfg(flags, name = 'EventSelector'))
50 result.setAppProperty("EvtSel", "EventSelector")
51
52
53 result.merge(MuonCalibStreamFileInputSvcCfg(flags))
54 result.merge(MuonCalibStreamDataProviderSvcCfg(flags))
55 result.merge(MuonCalibRunLumiBlockCoolSvcCfg(flags))
56
57 return result
58
59
60