topSequence += AthPoolEx__WriteData("WriteData") from AthenaPoolExampleAlgorithms.AthenaPoolExampleAlgorithmsConf import AthPoolEx__WriteTag WriteTag = AthPoolEx__WriteTag( "WriteTag" ) WriteTag.Magic = 1 topSequence += WriteTag from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream Stream2 = AthenaPoolOutputStream ( "Stream2" , "SimplePoolFileB.root" , True ) Stream2.WritingTool.AttributeListKey = "RunEventTag" #-------------------------------------------------------------- # Event Collection Registration #-------------------------------------------------------------- from RegistrationServices.RegistrationServicesConf import RegistrationStreamTagTool TagTool = RegistrationStreamTagTool("TagTool") from RegistrationServices.RegistrationServicesConf import RegistrationStream RegStream2 = RegistrationStream( "RegStream2" , CollectionType="ExplicitROOT" , Tool=TagTool ) RegStream2.WriteInputDataHeader = False RegStream2.OutputCollection = "SimplePoolCollection2.root" RegStream2.CollectionOpenMode = "UPDATE" RegStream2.ItemList += [ "DataHeader#Stream2" ] RegStream2.ItemList += [ "TagAthenaAttributeList#RunEventTag" ] topSequence += RegStream2 #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) #-------------------------------------------------------------- svcMgr.MessageSvc.OutputLevel = 3 svcMgr.PoolSvc.OutputLevel = 2
# prov stage included if addProv: try: RegStream2.IncludeProvStages = ProvIncludes except: print "Prov in attributelist will be set based on first data header" # List of data object references to be added to collection: RegStream2.ItemList += ["DataHeader#*"] # List of attribute list objects to be added to collection: RegStream2.ItemList += ["AthenaAttributeList#SimpleTag"] topSequence += RegStream2 RegStreamTool3 = RegistrationStreamTagTool("TagTool") RegStreamTool3.Slave = False RegStreamTool3.OutputCollection = "TagTool.root" RegStream3 = RegistrationStream("RegStream3") RegStream3.OutputLevel = INFO RegStream3.Tool = RegStreamTool3 # Specifies whether collection references input or output data file: try: RegStream3.WriteInputDataHeader = WriteInputHeader except: RegStream3.WriteInputDataHeader = FALSE if inCollType == "MonteCarlo": RegStream3.WriteInputDataHeader = FALSE
athOutSeq += Stream1 athOutSeq += Stream2 athOutSeq += Stream3 athOutSeq += Others athOutSeq += Bad #-------------------------------------------------------------- # Now do collections #-------------------------------------------------------------- # Explicit (i.e. not just files) collections (ROOT) # from RegistrationServices.RegistrationServicesConf import RegistrationStream from RegistrationServices.RegistrationServicesConf import RegistrationStreamLCGTool from RegistrationServices.RegistrationServicesConf import RegistrationStreamTagTool TagTool = RegistrationStreamTagTool("TagTool") TagTool.OutputLevel = INFO # bit 1 CollBit1 = RegistrationStream("CollBit1") CollBit1.CollectionType = "ExplicitROOT" #CollBit1.OutputCollection = "AthenaPoolMultiTest_Split1"; # The output file name CollBit1.OutputCollection = "Collection_Split1.root" CollBit1.ItemList += ["DataHeader#*"] CollBit1.ItemList += ["AthenaAttributeList#SimpleTag"] CollBit1.ItemList += ["CollectionMetadataContainer#*"] CollBit1.OutputLevel = INFO CollBit1.AcceptAlgs = ["Splitter1"] #CollBit1.CollectionOpenMode = "UPDATE" # bit ( 2 | 3 )