# Output collection type: try: RegStream1.CollectionType = OutCollType except: RegStream1.CollectionType = "ExplicitROOT" # Output collection database connection string: try: RegStream1.Connection = OutCollConnect except: RegStream1.Connection = "" # Output collection open mode: try: RegStream1.CollectionOpenMode = OpenMode except: RegStream1.CollectionOpenMode = "CREATE_AND_OVERWRITE" # Reference to input file addProv = False try: addProv = ProvOn RegStream1.WriteAllProv = ProvOn except: print "Writing only primary token to collection" RegStream1.WriteAllProv = False # prov stage included if addProv: try:
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 svcMgr.AthenaPoolCnvSvc.OutputLevel = 2 topSequence.WriteData.OutputLevel = 2 Stream2.OutputLevel = 2 RegStream2.OutputLevel = 2 #