21 trigNavThinningSvc = None ):
22 if trigNavThinningSvc is None:
23 trigNavThinningSvc = _trigNavThinningSvcs.get (streamName, None)
24
25
26
28 TopLevelContainerName = "",
29 SubLevelBranchName = "<type>/<key>")
31 streamName,
32 WritingTool = writingTool,
33 ItemList = [ "EventInfo#*" ]
34 )
35 outputStream.ExtraOutputs.add(("DataHeader", "StoreGateSvc+" + streamName))
36
37 outputStream.MetadataStore = svcMgr.MetaDataStore
38 outputStream.MetadataItemList = [
39 "EventStreamInfo#" + streamName,
40 "IOVMetaDataContainer#*",
41 ]
42
43
44 from AthenaCommon.AlgSequence import AlgSequence
45 topSequence = AlgSequence()
46 from AthenaCommon.AlgSequence import AthSequencer
48
49 doTag = not noTag
50 if doTag:
51 key = "SimpleTag"
52
53 outputStream.WritingTool.AttributeListKey=key
54 if ('EventInfoTagBuilder/EventInfoTagBuilder' not in topSequence.getProperties()['Members']):
55
56 from .OutputStreamAthenaPoolConf import EventInfoAttListTool, EventInfoTagBuilder
57 EventInfoTagBuilder =
EventInfoTagBuilder(AttributeList=key, EventInfoKey=eventInfoKey, FilterString=decisionFilter,
59 from AthenaCommon.GlobalFlags import globalflags
60 if globalflags.InputFormat() == 'bytestream':
61
62 EventInfoTagBuilder.PropagateInput=False
63 topSequence += EventInfoTagBuilder
64
65
66 if asAlg:
67 outSequence += outputStream
68 else:
69 outSequence += outputStream
70
71 if fileName != "":
72 outputStream.OutputFile = fileName
73 from .OutputStreamAthenaPoolConf import MakeEventStreamInfo
75 streamInfoTool.Key = streamName
76 streamInfoTool.EventInfoKey = eventInfoKey
77
78
79 event_format_key = 'EventFormat{}'.format(streamName)
80 event_format_tool = CfgMgr.xAODMaker__EventFormatStreamHelperTool(
81 "{}_MakeEventFormat".format(streamName),
82 Key=event_format_key,
83 )
84 outputStream.MetadataItemList += ["xAOD::EventFormat#{}".format(event_format_key)]
85
86
87 file_metadata_key = "FileMetaData"
88 file_metadata_creator_tool = CfgMgr.xAODMaker__FileMetaDataCreatorTool(
89 "FileMetaDataCreatorTool",
90 OutputKey=file_metadata_key,
91 StreamName=streamName,
92 )
93 outputStream.MetadataItemList += [
94 "xAOD::FileMetaData#{}".format(file_metadata_key),
95 "xAOD::FileMetaDataAuxInfo#{}Aux.".format(file_metadata_key),
96 ]
97
98 outputStream.HelperTools = [
99 streamInfoTool,
100 event_format_tool,
101 file_metadata_creator_tool,
102 ]
103
104
105
106 from AthenaServices.AthenaServicesConf import Athena__ThinningCacheTool
107 tct = Athena__ThinningCacheTool ('ThinningCacheTool_' + streamName,
108 StreamName = streamName)
109 if trigNavThinningSvc is not None:
110 tct.TrigNavigationThinningSvc = trigNavThinningSvc
111 outputStream.HelperTools += [tct]
112
113
114
115
116
117
118
119
120
121
122
123 try:
124 tlist = []
125 from RecExConfig.ObjKeyStore import objKeyStore
126 for typ, klist in objKeyStore['transient'].getProperties().items():
127 for k in klist:
128 tlist.append (typ + '#' + k)
129 outputStream.TransientItems += tlist
130 except ImportError:
131 pass
132
133 return outputStream
134
algorithm that marks for write data objects in SG
This class provides an algorithm to make the EventStreamInfo object and update it.