Newer
Older
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
def FaserEventSelectorByteStreamCfg(configFlags, **kwargs):
result = ComponentAccumulator()
# from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoSelectorTool
# infoTool = CompFactory.xAODMaker.EventInfoSelectorTool
# xconv = infoTool()
# Load ByteStreamCnvSvc
byteSvc = CompFactory.FaserByteStreamCnvSvc
byteSvcInstance = byteSvc(name = "FaserByteStreamCnvSvc")
byteSvcInstance.InitCnvs += [ "xAOD::FaserTriggerDataAux" , "xAOD::FaserTriggerData" ]
result.addService(byteSvcInstance)
# Load EventSelectorByteStream
bsSelector = CompFactory.FaserEventSelectorByteStream
selector = bsSelector("FaserEventSelector")
selector.ByteStreamInputSvc = "FaserByteStreamInputSvc"
# selector.HelperTools += [xconv]
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
selector.Input = configFlags.Input.Files
result.addService(selector)
result.setAppProperty("EvtSel",selector.getFullJobOptName())
EvtPersistencySvc=CompFactory.EvtPersistencySvc
result.addService(EvtPersistencySvc("EventPersistencySvc",CnvServices=[byteSvcInstance.getFullJobOptName(),]))
# Properties
# rn = configFlags.Input.RunNumber
# if isinstance(rn, type([])):
# rn = rn[0]
# selector.RunNumber = rn
# selector.InitialTimeStamp = configFlags.Input.InitialTimeStamp
for k, v in kwargs.items():
setattr (selector, k, v)
return result
def FaserByteStreamCnvSvcCfg(configFlags, **kwargs):
result=ComponentAccumulator()
from FaserByteStreamCnvSvcBase.FaserByteStreamCnvSvcBaseConfig import FaserByteStreamCnvSvcBaseCfg
result.merge(FaserByteStreamCnvSvcBaseCfg(configFlags))
# Load ByteStreamEventStorageInputSvc
bsInputSvc = CompFactory.FaserByteStreamInputSvc
result.addService(bsInputSvc(name = "FaserByteStreamInputSvc"))
# Load ROBDataProviderSvc
robProvider = CompFactory.FaserROBDataProviderSvc
result.addService(robProvider("FaserROBDataProviderSvc"))
# Event selector
result.merge(FaserEventSelectorByteStreamCfg(configFlags))
# Add in ByteStreamAddressProviderSvc
byteStreamAddress = CompFactory.FaserByteStreamAddressProviderSvc
result.addService(byteStreamAddress("FaserByteStreamAddressProviderSvc"))
# Load ProxyProviderSvc
proxyProvider = CompFactory.ProxyProviderSvc
result.addService(proxyProvider(ProviderNames = ["FaserByteStreamAddressProviderSvc"]))
return result