# 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"

# Output collection type:
try:
    RegStream1.CollectionType = OutCollType
except:
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
svcMgr.AthenaPoolCnvSvc.OutputLevel = 2
topSequence.WriteData.OutputLevel = 2
Stream2.OutputLevel = 2
RegStream2.OutputLevel = 2
Exemplo n.º 3
0
CTTool = RegistrationStreamLCGTool("CollTrigTool")
CollTrig = RegistrationStream("CollTrig")
CollTrig.CollectionType = "ExplicitROOT"
CollTrig.OutputCollection = "Collection_SplitTrig.root"
CollTrig.ItemList += ["DataHeader#*"]
CollTrig.ItemList += ["AthenaAttributeList#SimpleTag"]
CollTrig.ItemList += ["CollectionMetadataContainer#Default"]
CollTrig.AcceptAlgs = ["Triggered"]
#CollTrig.OutputLevel = DEBUG
CollTrig.Tool = CTTool

# not Trigger, i.e. corrupted
CollBad = RegistrationStream("CollBad")
CollBad.CollectionType = "ExplicitROOT"
CollBad.OutputCollection = "Collection_SplitBad.root"
CollBad.WriteInputDataHeader = TRUE
CollBad.ItemList += ["DataHeader#EventSelector"]
CollBad.ItemList += ["AthenaAttributeList#SimpleTag"]
CollBad.ItemList += ["CollectionMetadataContainer#Default"]
CollBad.OutputLevel = INFO
CollBad.VetoAlgs = ["Triggered"]

athRegSeq += CollBit1
athRegSeq += Coll23
athRegSeq += Coll456
athRegSeq += CollBar
athRegSeq += Coll1and7
athRegSeq += Coll348
athRegSeq += CollTrig
athRegSeq += CollBad
Exemplo n.º 4
0
from AthenaPoolMultiTest.AthenaPoolMultiTestConf import *

RunEventTagWriter = RunEventTagWriter("RunEventTagWriter")
#RunEventTagWriter.OutputLevel = DEBUG

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
#==============================================================
Exemplo n.º 5
0
topSequence+=RunEventTagWriter

# Converters:
include( "EventAthenaPool/EventAthenaPool_joboptions.py" )

#--------------------------------------------------------------
# Event Collection Registration
#--------------------------------------------------------------
# Run OutputStream as an algorithm
from RegistrationServices.RegistrationServicesConf import RegistrationStream
from RegistrationServices.RegistrationServicesConf import RegistrationStreamLCGTool

TagTool = RegistrationStreamLCGTool("RegistrationStreamLCGTool")

RegStream1 = RegistrationStream( "RegStream1" )
RegStream1.WriteInputDataHeader = True
RegStream1.Tool = TagTool

# Full path name of output collection:
try:
  RegStream1.OutputCollection = Out
except:
  RegStream1.OutputCollection = "test.coll.root"

# Collection type (ExplicitROOT, ExplicitMySQL or ExplicitMySQLlt):
try:
  RegStream1.CollectionType = Type
except:
  RegStream1.CollectionType = "ExplicitROOT"

# Database connection string (Set to "" for ExplicitROOT collection):
RegStream1 = RegistrationStream( "RegStream1" )

# List of data object references to be added to collection:
RegStream1.ItemList += [ "DataHeader#*" ]
RegStream1.ItemList +=  [ "AthenaAttributeList#SimpleTag" ]
# Output collection type:
RegStream1.CollectionType = "ExplicitROOT"
# Output collection database connection string:
RegStream1.Connection = ""
# Output collection name:
RegStream1.OutputCollection = "OutputCollection"
# Output collection open mode:
RegStream1.CollectionOpenMode = "CREATE_AND_OVERWRITE"
# Specifies whether collection references input or output data file:
RegStream1.WriteInputDataHeader = FALSE
# Reference to input file
RegStream1.WriteAllProv = False
# prov stage included
RegStream1.IncludeProvStages = []
RegStream1.IncludeProvStages = ['test']
# prov stage excluded
RegStream1.ExcludeProvStages = []
RegStream1.ExcludeProvStages = ['test0']
RegStream1.ExcludeProvStages += ['nottest']
# Persistency service
RegStream1.PersistencySvc = 'EventPersistencySvc'
# Storename
RegStream1.StoreName = 'StoreGateSvc'
# Accept alg list
RegStream1.AcceptAlgs = []