4 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
5 from AthenaConfiguration.ComponentFactory
import CompFactory
6 from AthenaCommon.Logging
import logging
12 '''Common config fragment for setting up
13 ByteStream for DRAW formats'''
14 if os.access(filename,os.F_OK):
15 msg=logging.getLogger(
'DRAWByteStreamCfg')
16 msg.warning(f
"Deleting pre-existing DRAW file {filename}")
22 CompFactory.AthSequencer(
26 bsesoSvc = CompFactory.ByteStreamEventStorageOutputSvc(
27 name=
"BSEventStorageOutputSvc"+formatName,
32 StreamName=
'Stream'+formatName,
33 SimpleFileName=filename)
34 outCA.addService(bsesoSvc)
36 bsIS = CompFactory.ByteStreamEventStorageInputSvc(
'ByteStreamInputSvc')
37 outCA.addService(bsIS)
39 bsCopyTool = CompFactory.ByteStreamOutputStreamCopyTool(
40 ByteStreamOutputSvc=bsesoSvc,
41 ByteStreamInputSvc=bsIS)
43 bsCnvSvc = CompFactory.ByteStreamCnvSvc(
44 ByteStreamOutputSvcList=[bsesoSvc.getName()])
45 outCA.addService(bsCnvSvc)
47 outCA.addEventAlgo(CompFactory.AthenaOutputStream(
48 name=
'BSOutputStreamAlg'+formatName,
49 WritingTool=bsCopyTool,
50 EvtConversionSvc=bsCnvSvc.name,
51 RequireAlgs=[formatName+
'Kernel'],
52 ExtraInputs={(
'xAOD::EventInfo',
'StoreGateSvc+EventInfo')}),
53 domain=
'IO', primary=
True)
55 from AthenaServices.MetaDataSvcConfig
import MetaDataSvcCfg
56 from IOVDbSvc.IOVDbSvcConfig
import IOVDbSvcCfg
59 [
"IOVDbMetaDataTool",
"ByteStreamMetadataTool"]))