#-------------------------------------------------------------- # 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 # # End of job options file # ###############################################################
topSequence += Stream1 #-------------------------------------------------------------- # Event tag collection registration #-------------------------------------------------------------- # Registration stream: from RegistrationServices.RegistrationServicesConf import RegistrationStream from RegistrationServices.RegistrationServicesConf import RegistrationStreamLCGTool from RegistrationServices.RegistrationServicesConf import RegistrationStreamTagTool RegStreamTool1 = RegistrationStreamLCGTool("LCGTool") RegStreamTool1.OutputCollection = "ToolSupremacy.root" RegStream1 = RegistrationStream("RegStream1") RegStream1.OutputLevel = INFO RegStream1.Tool = RegStreamTool1 # Specifies whether collection references input or output data file: try: RegStream1.WriteInputDataHeader = WriteInputHeader except: RegStream1.WriteInputDataHeader = FALSE if inCollType == "MonteCarlo": RegStream1.WriteInputDataHeader = FALSE # Output collection name: try: RegStream1.OutputCollection = OutColl except: RegStream1.OutputCollection = "OutputCollection"
svcMgr.MetaDataSvc.MetaDataTools += [copyTool] # Add algorithm to add default collection metadata DefaultCollMeta = RegistrationStreamDefMeta("DefaultCollMeta") DefaultCollMeta.Project = "TagCollectionTest" try: DefaultCollMeta.Stream = OutColl except: DefaultCollMeta.Stream = "TEST" topSequence += DefaultCollMeta from RegistrationServices.RegistrationServicesConf import RegistrationStream RegStream1 = RegistrationStream("RegStream1") RegStream1.OutputLevel = INFO # Specifies whether collection references input or output data file: try: RegStream1.WriteInputDataHeader = WriteInputHeader except: RegStream1.WriteInputDataHeader = FALSE if inCollType == "MonteCarlo": RegStream1.WriteInputDataHeader = FALSE # Output collection name: try: RegStream1.OutputCollection = OutColl except: RegStream1.OutputCollection = "OutputCollection"
FullColl = RegistrationStream("FullColl") FullColl.OutputCollection = "SplittableCollection.root" #FullColl.ItemList += [ "DataHeader#*" ] FullColl.ItemList += ["DataHeader#DataStream"] FullColl.ItemList += ["AthenaAttributeList#SimpleTag"] FullColl.ItemList += ["CollectionMetadataContainer#*"] FullColl.AcceptAlgs = ["PassAllFilter"] #FullColl.Tool = TagTool # Now put full veto to make sure vetos work on collections #topSequence += ["RegistrationStream/NullColl" ] NullColl = RegistrationStream("NullColl") NullColl.OutputCollection = "NullableCollection.root" NullColl.ItemList += ["DataHeader#DataStream"] NullColl.ItemList += ["AthenaAttributeList#SimpleTag"] NullColl.OutputLevel = INFO NullColl.RequireAlgs = ["PassNoneFilter"] #topSequence += DataStream topSequence += FullColl topSequence += NullColl #-------------------------------------------------------------- # Output options #-------------------------------------------------------------- include("AthenaPoolExampleConverter/AthenaPoolExampleConverter_jobOption.py") #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) #-------------------------------------------------------------- svcMgr.MessageSvc.OutputLevel = INFO
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 ) Coll23 = RegistrationStream("Coll23") Coll23.CollectionType = "ExplicitROOT" Coll23.OutputCollection = "Collection_Split23.root" Coll23.ItemList += ["DataHeader#*"] Coll23.ItemList += ["AthenaAttributeList#SimpleTag"] Coll23.ItemList += ["CollectionMetadataContainer#Default"] Coll23.OutputLevel = INFO Coll23.AcceptAlgs = ["Splitter2"] Coll23.AcceptAlgs += ["Splitter3"] Coll23.WriteAllProv = False Coll23.IncludeProvStages = ["NonExisting"]
topSequence += RunEventTagWriter from RegistrationServices.RegistrationServicesConf import RegistrationStream from RegistrationServices.RegistrationServicesConf import RegistrationStreamTagTool TagTool = RegistrationStreamTagTool("TagTool") #TagTool.PrimaryKey = ['RunNumber','EventNumber'] # output a collection to test multi input metadata copy FullColl = RegistrationStream("FullColl") FullColl.WriteInputDataHeader = TRUE FullColl.OutputCollection = "CheckCollections.root" FullColl.ItemList += ["DataHeader#*"] FullColl.ItemList += ["AthenaAttributeList#RunEventTag"] FullColl.Tool = TagTool FullColl.OutputLevel = DEBUG athRegSeq += FullColl #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) #-------------------------------------------------------------- svcMgr.MessageSvc.infoLimit = 5000 svcMgr.MessageSvc.debugLimit = 5000 svcMgr.MessageSvc.OutputLevel = INFO #============================================================== # # End of job options file # ###############################################################
RegStream2.ItemList += ["TagAthenaAttributeList#RunEventTag"] topSequence += RegStream2 RegStream3 = RegistrationStream("RegStream3", CollectionType="ExplicitROOT", Tool=TagTool) RegStream3.WriteInputDataHeader = False RegStream3.OutputCollection = "EmptyPoolCollection.root" RegStream3.ItemList += ["DataHeader#Stream2"] RegStream3.ItemList += ["TagAthenaAttributeList#" + MagicWriteTag.Key] RegStream3.RequireAlgs = ["PassNoneFilter"] topSequence += RegStream3 #-------------------------------------------------------------- # 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 Stream1.OutputLevel = 2 Stream2.OutputLevel = 2 RegStream1.OutputLevel = 2 RegStream2.OutputLevel = 2 RegStream3.OutputLevel = 2 # # End of job options file # ###############################################################