9 from AthenaCommon
import CfgMgr
10 from AthenaCommon.AppMgr
import ServiceMgr
as svcMgr
11 from AthenaServices.AthenaServicesConf
import AthenaOutputStream
12 from AthenaServices.AthenaServicesConf
import AthenaOutputStreamTool
14 _trigNavThinningSvcs = {}
16 _trigNavThinningSvcs[streamName] = svc
20 eventInfoKey = "EventInfo", decisionFilter="",
21 trigNavThinningSvc = None ):
22 if trigNavThinningSvc
is None:
23 trigNavThinningSvc = _trigNavThinningSvcs.get (streamName,
None)
30 WritingTool = writingTool,
31 ItemList = [
"EventInfo#*" ]
33 outputStream.ExtraOutputs.add((
"DataHeader",
"StoreGateSvc+" + streamName))
35 outputStream.MetadataStore = svcMgr.MetaDataStore
36 outputStream.MetadataItemList = [
37 "EventStreamInfo#" + streamName,
38 "IOVMetaDataContainer#*",
42 from AthenaCommon.AlgSequence
import AlgSequence
44 from AthenaCommon.AlgSequence
import AthSequencer
51 outputStream.WritingTool.AttributeListKey=key
52 if (
'EventInfoTagBuilder/EventInfoTagBuilder' not in topSequence.getProperties()[
'Members']):
54 from .OutputStreamAthenaPoolConf
import EventInfoAttListTool, EventInfoTagBuilder
55 EventInfoTagBuilder =
EventInfoTagBuilder(AttributeList=key, EventInfoKey=eventInfoKey, FilterString=decisionFilter,
57 from AthenaCommon.GlobalFlags
import globalflags
58 if globalflags.InputFormat() ==
'bytestream':
60 EventInfoTagBuilder.PropagateInput=
False
61 topSequence += EventInfoTagBuilder
65 outSequence += outputStream
67 outSequence += outputStream
70 outputStream.OutputFile = fileName
71 from .OutputStreamAthenaPoolConf
import MakeEventStreamInfo
73 streamInfoTool.Key = streamName
74 streamInfoTool.EventInfoKey = eventInfoKey
77 event_format_key =
'EventFormat{}'.
format(streamName)
78 event_format_tool = CfgMgr.xAODMaker__EventFormatStreamHelperTool(
79 "{}_MakeEventFormat".
format(streamName),
82 outputStream.MetadataItemList += [
"xAOD::EventFormat#{}".
format(event_format_key)]
85 file_metadata_key =
"FileMetaData"
86 file_metadata_creator_tool = CfgMgr.xAODMaker__FileMetaDataCreatorTool(
87 "FileMetaDataCreatorTool",
88 OutputKey=file_metadata_key,
89 StreamName=streamName,
91 outputStream.MetadataItemList += [
92 "xAOD::FileMetaData#{}".
format(file_metadata_key),
93 "xAOD::FileMetaDataAuxInfo#{}Aux.".
format(file_metadata_key),
96 outputStream.HelperTools = [
99 file_metadata_creator_tool,
104 from AthenaServices.AthenaServicesConf
import Athena__ThinningCacheTool
105 tct = Athena__ThinningCacheTool (
'ThinningCacheTool_' + streamName,
106 StreamName = streamName)
107 if trigNavThinningSvc
is not None:
108 tct.TrigNavigationThinningSvc = trigNavThinningSvc
109 outputStream.HelperTools += [tct]
123 from RecExConfig.ObjKeyStore
import objKeyStore
124 for typ, klist
in objKeyStore[
'transient'].getProperties().
items():
126 tlist.append (typ +
'#' + k)
127 outputStream.TransientItems += tlist
134 from RegistrationServices.OutputConditionsAlg
import OutputConditionsAlg
137 outputFile = fileName,
140 return conditionStream
143 AthenaPoolOutputStream = createOutputStream
144 AthenaPoolOutputConditionStream = createOutputConditionStream