#services that need to be reinit
ServiceMgr.MultipleEventLoopMgr.ToBeReinitialized = ["StoreGateSvc", "DetectorStore"]

#
# I/O stuff
#
ServiceMgr.EventSelector.InputCollections = [
    "root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc10/mc10_7TeV.005008.CavernInput.merge.HITS.e4_e607_s951_s952_tid170551_00/HITS.170551._000011.pool.root.1" ]
# Set up for seeking.
ServiceMgr.EventSelector.CollectionType = "SeekableROOT"

include( "AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py" )
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
Stream1 = AthenaPoolOutputStream( "Stream1" )
Stream1.OutputFile = "MultiplePassFile.root"; # ** mandatory parameter ** // The output file name
Stream1.ForceRead=TRUE  #force read of output data objs
Stream1.ItemList=["EventInfo#*", "McEventCollection#*"]

#--------------------------------------------------------------
#--- Monitoring and Debug printouts
#--------------------------------------------------------------

MessageSvc.OutputLevel      = INFO
Stream1.OutputLevel = DEBUG
#StoreGateSvc.Dump=1
#StoreGateSvc.OutputLevel=DEBUG

from AthenaCommon.AppMgr import theAuditorSvc
from GaudiAud.GaudiAudConf import ChronoAuditor
theAuditorSvc += ChronoAuditor()
Example #2
0
if numThreads >= 2:
    InDetSiSPSeededTrackFinder.Cardinality = numThreads
topSequence += InDetSiSPSeededTrackFinder

# Print algorithms
if doPrint:
    printfunc(topSequence)

# Set the number of events to be processed
theApp.EvtMax = EvtMax

# Output file
if doDump:
    from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
    outStream = AthenaPoolOutputStream(
        "OutStream", "SiSPSeededTracksStandaloneFromESD.pool.root")
    outStream.ItemList = [
        "xAOD::EventInfo#EventInfo", "xAOD::EventAuxInfo#EventInfoAux."
    ]
    outStream.ItemList += ["TrackCollection#" + TracksLocation]

#--------------------------------------------------------------
# Set output lvl (VERBOSE, DEBUG, INFO, WARNING, ERROR, FATAL)
#--------------------------------------------------------------
ServiceMgr.MessageSvc.OutputLevel = INFO
ServiceMgr.MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M"

if numThreads >= 2:
    from SCT_ConditionsAlgorithms.SCTCondAlgCardinality import sctCondAlgCardinality
    sctCondAlgCardinality.set(numThreads)
Example #3
0
ServiceMgr.MultipleEventLoopMgr.ToBeReinitialized = [
    "StoreGateSvc", "DetectorStore"
]

#
# I/O stuff
#
ServiceMgr.EventSelector.InputCollections = [
    "root://eosatlas.cern.ch//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc10/mc10_7TeV.005008.CavernInput.merge.HITS.e4_e607_s951_s952_tid170551_00/HITS.170551._000011.pool.root.1"
]

include("AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py")
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
Stream1 = AthenaPoolOutputStream("Stream1")
Stream1.OutputFile = "MultiplePassFile.root"
# ** mandatory parameter ** // The output file name
Stream1.ItemList = ["EventInfo#*", "McEventCollection#*"]

#--------------------------------------------------------------
#--- Monitoring and Debug printouts
#--------------------------------------------------------------

MessageSvc.OutputLevel = INFO
Stream1.OutputLevel = DEBUG
#StoreGateSvc.Dump=1
#StoreGateSvc.OutputLevel=DEBUG

from AthenaCommon.AppMgr import theAuditorSvc
from GaudiAud.GaudiAudConf import ChronoAuditor
theAuditorSvc += ChronoAuditor()
    "root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc10/mc10_7TeV.105001.pythia_minbias.merge.HITS.e577_s932_s952_tid170554_00/HITS.170554._000034.pool.root.1",
    "root://eosatlas//eos/atlas/atlascerngroupdisk/proj-sit/digitization/RTT/mc10/mc10_7TeV.105001.pythia_minbias.merge.HITS.e577_s932_s952_tid170554_00/HITS.170554._000043.pool.root.1" ]
ServiceMgr.EventMixer.OutputRunNumber=54321
ServiceMgr.EventMixer.EventNumbers=[1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 47]

#--------------------------------------------------------------
#---   Output stream configuration
#--------------------------------------------------------------
include( "AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py" )
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
Stream1 = AthenaPoolOutputStream( "Stream1" )
Stream1.OutputFile = "MixedFile.root"; # ** mandatory parameter ** // The output file name
Stream1.ForceRead=TRUE;  #force read of output data objs
Stream1.ItemList=["MergedEventInfo#*",
                  "EventInfo#*",
                  "McEventCollection#*",
		  "SiHitCollection#SCT_Hits",
		  "SiHitCollection/PixelHits"]; #SYNTAX ERROR: / not #

#--------------------------------------------------------------
#--- Monitoring and Debug printouts
#--------------------------------------------------------------

MessageSvc.OutputLevel      = INFO
ServiceMgr.EventMixer.OutputLevel      = VERBOSE
MessageSvc.setVerbose += [ "MixingEventSelector::TriggerList" ]
Stream1.OutputLevel = DEBUG
#StoreGateSvc.Dump=1
#StoreGateSvc.OutputLevel=DEBUG

from AthenaCommon.AppMgr import theAuditorSvc
Example #5
0
    def hits_persistency():
        """ HITS POOL file persistency
        """
        from G4AtlasApps.SimFlags import simFlags
        from AthenaCommon.DetFlags import DetFlags
        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
        from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream

        ## Not yet understood, but need to treat StreamHITS as alg in Hive.
        ## Seems to also work fine outside of Hive, but to be extra safe I'm
        ## only changing it in Hive.
        from AthenaCommon.ConcurrencyFlags import jobproperties as concurrencyProps
        if concurrencyProps.ConcurrencyFlags.NumThreads() > 0:
            as_alg = True
        else:
            as_alg = False
        ## NB. Two-arg constructor is needed, since otherwise metadata writing fails!
        stream1 = AthenaPoolOutputStream("StreamHITS",
                                         athenaCommonFlags.PoolHitsOutput(),
                                         asAlg=as_alg)

        ## Write geometry tag info - move to main method
        #import EventInfoMgt.EventInfoMgtInit

        ## EventInfo & TruthEvent always written by default
        stream1.ForceRead = True
        stream1.ItemList = [
            "EventInfo#*", "McEventCollection#TruthEvent", "JetCollection#*"
        ]

        ## If we are running quasi-stable particle simulation, include the original event record
        if hasattr(
                simFlags, 'IncludeParentsInG4Event'
        ) and simFlags.IncludeParentsInG4Event.statusOn and simFlags.IncludeParentsInG4Event(
        ):
            stream1.ItemList += ["McEventCollection#GEN_EVENT"]

        stream1.ItemList += ["xAOD::JetContainer#*", "xAOD::JetAuxContainer#*"]

        ## Make stream aware of aborted events
        stream1.AcceptAlgs = ["G4AtlasAlg"]

        ## Detectors

        ## Inner Detector
        if DetFlags.ID_on():
            stream1.ItemList += [
                "SiHitCollection#*", "TRTUncompressedHitCollection#*",
                "TrackRecordCollection#CaloEntryLayer"
            ]
        ## Calo
        if DetFlags.Calo_on():
            stream1.ItemList += [
                "CaloCalibrationHitContainer#*",
                "LArHitContainer#*",
                "TileHitVector#*",
                #"SimpleScintillatorHitCollection#*",
                "TrackRecordCollection#MuonEntryLayer"
            ]
        ## Muon
        if DetFlags.Muon_on():
            stream1.ItemList += [
                "RPCSimHitCollection#*", "TGCSimHitCollection#*",
                "CSCSimHitCollection#*", "MDTSimHitCollection#*",
                "TrackRecordCollection#MuonExitLayer"
            ]
            if hasattr(simFlags, 'SimulateNewSmallWheel'):
                if simFlags.SimulateNewSmallWheel():
                    stream1.ItemList += ["GenericMuonSimHitCollection#*"]
        ## Lucid
        if DetFlags.Lucid_on():
            stream1.ItemList += ["LUCID_SimHitCollection#*"]

        ## FwdRegion
        if DetFlags.FwdRegion_on():
            stream1.ItemList += ["SimulationHitCollection#*"]

        ## ZDC
        if DetFlags.ZDC_on():
            stream1.ItemList += [
                "ZDC_SimPixelHit_Collection#*", "ZDC_SimStripHit_Collection#*"
            ]
        ## ALFA
        if DetFlags.ALFA_on():
            stream1.ItemList += [
                "ALFA_HitCollection#*", "ALFA_ODHitCollection#*"
            ]

        ## AFP
        if DetFlags.AFP_on():
            stream1.ItemList += [
                "AFP_TDSimHitCollection#*", "AFP_SIDSimHitCollection#*"
            ]

        ### Ancillary scintillators
        #stream1.ItemList += ["ScintillatorHitCollection#*"]

        ## TimingAlg
        stream1.ItemList += ["RecoTimingObj#EVNTtoHITS_timings"]

        ## Add cosmics and test beam configuration hit persistency if required cf. geom tag
        layout = simFlags.SimLayout.get_Value()
        if "tb" not in layout:
            from AthenaCommon.BeamFlags import jobproperties
            if jobproperties.Beam.beamType() == 'cosmics' or \
                    (hasattr(simFlags, "WriteTR") and simFlags.WriteTR.statusOn) or \
                    (hasattr(simFlags, "ReadTR") and simFlags.ReadTR.statusOn):
                stream1.ItemList += [
                    "TrackRecordCollection#CosmicRecord",
                    "TrackRecordCollection#CosmicPerigee"
                ]
        else:
            ## CTB-specific
            if layout.startswith("ctb"):
                if simFlags.LArFarUpstreamMaterial.statusOn and simFlags.LArFarUpstreamMaterial.get_Value(
                ):
                    stream1.ItemList.append(
                        "TrackRecordCollection#LArFarUpstreamMaterialExitLayer"
                    )
            ## Persistency of test-beam layout
            if layout.startswith('ctb') or layout.startswith('tb_Tile2000_'):
                stream1.ItemList += ["TBElementContainer#*"]
Example #6
0
#--------------------------------------------------------------
# EventLoop
#--------------------------------------------------------------
from AthenaCommon.ConcurrencyFlags import jobproperties as jp
nThreads = jp.ConcurrencyFlags.NumThreads()
if nThreads > 0:
    EventLoop = Service("AthenaHiveEventLoopMgr")
else:
    EventLoop = Service("AthenaEventLoopMgr")
EventLoop.UseSecondaryEventNumber = True
svcMgr += EventLoop

#--------------------------------------------------------------
# Output options
#--------------------------------------------------------------
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
Stream = AthenaPoolOutputStream( "Stream" )
Stream.OutputFile  = "OutputRDO.root"
Stream.ItemList =  [ 'xAOD::EventInfo#EventInfo', 'xAOD::EventAuxInfo#EventInfoAux.' ]

#--------------------------------------------------------------
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
#--------------------------------------------------------------
svcMgr.MessageSvc = Service( "MessageSvc" )
svcMgr.MessageSvc.OutputLevel = WARNING
svcMgr.MessageSvc.debugLimit  = 100000

# No stats printout
include( "AthenaPoolTest/NoStats_jobOptions.py" )
Example #7
0
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration

include.block('EventOverlayJobTransforms/SignalOutputItemList_jobOptions.py')

from AthenaCommon.DetFlags import DetFlags
from OverlayCommonAlgs.OverlayFlags import overlayFlags

# TODO: some event info update will be needed

# The output - signal
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
signalStream = AthenaPoolOutputStream('StreamRDO_SGNL',
                                      overlayFlags.PoolSignalRDOOutput(),
                                      asAlg=True)
signalStream.ItemList = []

# Event info
signalStream.ItemList += [
    'xAOD::EventInfo#' + overlayFlags.sigPrefix() + 'EventInfo',
    'xAOD::EventAuxInfo#' + overlayFlags.sigPrefix() + 'EventInfoAux.'
]

signalStream.ItemList += [
    'RecoTimingObj#' + overlayFlags.sigPrefix() + 'EVNTtoHITS_timings'
]

if DetFlags.overlay.Truth_on():
    signalStream.ItemList += [
        'McEventCollection#' + overlayFlags.sigPrefix() + 'TruthEvent'
    ]
Example #8
0
from Starlight_i.Starlight_iConf import Starlight_i
genSeq += Starlight_i("Starlight")
genSeq.Starlight.McEventKey = "GEN_EVENT"

evgenConfig.generators += ["Starlight"]

## Extra stream persistency
## 2101 == EventInfo, 133273 == MCTruth (HepMC)
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
_evgenstream = AthenaPoolOutputStream("StreamEVGEN")
_evgenstream.ItemList = ["2101#*", "133273#GEN_EVENT"]
del _evgenstream
Example #9
0
    raise RuntimeError("No outputHitsFile provided.")
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
try:
    Stream1 = AthenaPoolOutputStream( "StreamHITS", athenaCommonFlags.PoolHitsOutput() )
except:
    Stream1 = AthenaPoolOutputStream( "StreamHITS", "DidNotSetOutputName.root" )
# The next line is an example on how to exclude clid's if they are causing a  problem
#Stream1.ExcludeList = ['6421#*']

#--------------------------------------------------------------
# Specify collections for output HIT files, as not all are required.
#--------------------------------------------------------------

#Truth
Stream1.ItemList=["EventInfo#*",
                  "McEventCollection#TruthEvent", # mc truth (hepmc)
                  "JetCollection#*", # Truth jets reconstructed (optionally) during evgen
                  "TrackRecordCollection#MuonEntryLayer"] # others not used in pileup
#                  "TrackRecordCollection#MuonExitLayer", # not used in pileup
#                  "TrackRecordCollection#CaloEntryLayer"] # not used in pileup

# Deal with "new" truth jet collections properly
from PyJobTransforms.trfUtils import releaseIsOlderThan
if releaseIsOlderThan(20,0):
    #Hack to maintain compatibility of G4AtlasApps trunk with
    #19.2.X.Y after EDM changes in release 20.0.0.
    Stream1.ItemList += ["xAOD::JetContainer_v1#*",
                         "xAOD::JetAuxContainer_v1#*"]
else:
    Stream1.ItemList += ["xAOD::JetContainer#*",
                         "xAOD::JetAuxContainer#*"]
svcMgr.ProxyProviderSvc.OutputLevel = DEBUG
svcMgr.AthenaPoolAddressProviderSvcPrimary.OutputLevel = DEBUG
svcMgr.AthenaPoolAddressProviderSvcSecondary.OutputLevel = DEBUG
svcMgr.DoubleEventSelector.OutputLevel = DEBUG

#--------------------------------------------------------------
# Output options
#--------------------------------------------------------------
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
# TODO: noTag=True to avoid warning, needs EventInfo overlay implemented
Stream1 = AthenaPoolOutputStream("Stream1", asAlg=True, noTag=True)
Stream1.OutputLevel = INFO

Stream1.OutputFile = "OutputRDO.root"
# List of DO's to write out
Stream1.ItemList = []
Stream1.ItemList += ["McEventCollection#TruthEvent"]
Stream1.ItemList += ["RecoTimingObj#EVNTtoHITS_timings"]

#--------------------------------------------------------------
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
#--------------------------------------------------------------
svcMgr.MessageSvc.debugLimit = 100000

# No stats printout
include("AthenaPoolTest/NoStats_jobOptions.py")

#==============================================================
#
# End of job options file
#
Example #11
0
    fullItemList += [ "TBScintillatorRawCont#*" ]
    fullItemList += [ "TBTDC#*" ]
    fullItemList += [ "TBTDCRawCont#*" ]
    fullItemList += [ "TBTrack#*" ]
    fullItemList += [ "TBTriggerPatternUnit#*" ]
    fullItemList += [ "TBADCRawCont#*" ]
    if doTile:
       fullItemList += [ "TileBeamElemContainer#*" ]

    #adding digits for the moment
    fullItemList += [ "LArDigitContainer#*" ]
    fullItemList += [ "TileDigitsContainer#*" ] 


#    if not doSim:
    Stream1.ItemList = fullItemList
#    else:   
#       ToolSvc.Stream1.ItemList = fullItemList


#-----
# Tricks for conditions
#-----    
#conddb.iovdbsvc.dbConnection="impl=cool;techno=sqlite;schema=sqlite200/ALLP200.db;X:TBDP200"
#conddb.iovdbsvc.dbConnection=""
conddb.addFolder("LAR","/LAR/BadChannels/BadChannels<tag>LARBadChannelsBadChannels-MC-empty</tag>")
if not doSim:
   conddb.addFolder("LAR","/LAR/BadChannels/MissingFEBs<tag>LARBadChannelsMissingFEBs-empty</tag>")
else:
   conddb.iovdbsvc.Folders += ["<db>impl=cool;techno=logical;schema=COOLONL_LAR;X:TBDP200</db> /LAR/BadChannels/MissingFEBs<tag>LARBadChannelsMissingFEBs-empty</tag>"]
#conddb.addFolder("CALO","/CALO/Identifier/CaloTTOnOffIdMapAtlas")
Example #12
0
#--------------------------------------------------------------
from Digitization.DigitizationWriteMetaData import writeDigitizationMetadata

writeDigitizationMetadata()

#--------------------------------------------------------------
# Pool Output (Change this to use a different file)
#--------------------------------------------------------------
if DetFlags.writeRDOPool.any_on():
    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
    from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
    streamRDO = AthenaPoolOutputStream(
        "StreamRDO", athenaCommonFlags.PoolRDOOutput.get_Value(), asAlg=True)
    streamRDO.ForceRead = True
    from Digitization.DigiOutput import getStreamRDO_ItemList
    streamRDO.ItemList = getStreamRDO_ItemList(logDigitization_flags)
    streamRDO.AcceptAlgs += [digitizationFlags.digiSteeringConf.get_Value()]
    streamRDO.OutputFile = athenaCommonFlags.PoolRDOOutput()
    if athenaCommonFlags.UseLZMA():
        ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [
            "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() +
            "'; COMPRESSION_ALGORITHM = '2'"
        ]
        ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [
            "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() +
            "'; COMPRESSION_LEVEL = '1'"
        ]
    else:
        ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [
            "DatabaseName = '" + athenaCommonFlags.PoolRDOOutput() +
            "'; COMPRESSION_ALGORITHM = '1'"
Example #13
0
]
ServiceMgr.EventMixer.OutputRunNumber = 54321
ServiceMgr.EventMixer.EventNumbers = [
    1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 47
]

#--------------------------------------------------------------
#---   Output stream configuration
#--------------------------------------------------------------
include("AthenaPoolCnvSvc/WriteAthenaPool_jobOptions.py")
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
Stream1 = AthenaPoolOutputStream("Stream1")
Stream1.OutputFile = "MixedFile.root"
# ** mandatory parameter ** // The output file name
Stream1.ItemList = [
    "MergedEventInfo#*", "EventInfo#*", "McEventCollection#*",
    "SiHitCollection#SCT_Hits", "SiHitCollection/PixelHits"
]
#SYNTAX ERROR: / not #

#--------------------------------------------------------------
#--- Monitoring and Debug printouts
#--------------------------------------------------------------

MessageSvc.OutputLevel = INFO
ServiceMgr.EventMixer.OutputLevel = VERBOSE
MessageSvc.setVerbose += ["MixingEventSelector::TriggerList"]
Stream1.OutputLevel = DEBUG
#StoreGateSvc.Dump=1
#StoreGateSvc.OutputLevel=DEBUG

from AthenaCommon.AppMgr import theAuditorSvc
Example #14
0
topSequence.ttbarFilter.jetsName = 'Kt4LCTopoJets'  # use new LC topo jets
#topSequence.ttbarFilter.maxDeltaRcx = 100.4       # effectively switch off
# cluster thinning

print topSequence
#==============================================================
#
# End of job options file
#
###############################################################
#--------------------------------------------------------------
#---   Secondary Write portion  ----- Don't change it !!!
#--------------------------------------------------------------
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
StreamDPD = AthenaPoolOutputStream("StreamDPD")
StreamDPD.ItemList = ['EventInfo#*', 'TrackRecordCollection#*']
StreamDPD.ItemList += ['ElectronContainer#ElectronAODCollection']
StreamDPD.ItemList += ['egDetailContainer#egDetailAOD']
StreamDPD.ItemList += ['MissingET#MET_RefFinal']
StreamDPD.ItemList += ['MissingET#MET_LocHadObj']
StreamDPD.ItemList += ['CaloClusterContainer#CaloCalTopoCluster']
StreamDPD.ItemList += ['Analysis::MuonContainer#StacoMuonCollection']
StreamDPD.ItemList += ['JetCollection#Kt4LCTopoJets']
StreamDPD.ItemList += ['JetCollection#Kt4TruthJets']
#StreamDPD.ItemList += ['JetCollection#Cone4H1TowerJets']
StreamDPD.ItemList += ['JetKeyDescriptor#JetKeyMap']
StreamDPD.ItemList += ['Rec::TrackParticleContainer#TrackParticleCandidate']
StreamDPD.ItemList += ['Rec::TrackParticleContainer#StacoTrackParticles']
StreamDPD.ItemList += ['TruthParticleContainer#SpclMC']
StreamDPD.ItemList += ['McEventCollection#GEN_AOD']
Example #15
0
########
# Read the McEventCollection
#
if not 'DUMP' in dir():
    DUMP = True
    pass
if DUMP:
    job += CfgMgr.DumpMC("ReadGenEvent", McEventKey=MCEVENTKEY)

#---------------------------------------------------------------
# Pool Persistency
#---------------------------------------------------------------
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
outStream = AthenaPoolOutputStream("OutStream")
outStream.ItemList = [
    "EventInfo#McEventInfo", "McEventCollection#" + MCEVENTKEY
]

if not "OUTPUT" in dir():
    OUTPUT = "mc.event.pool"
outStream.OutputFile = OUTPUT

#--------------------------------------------------------------
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
#--------------------------------------------------------------
#svcMgr.MessageSvc.OutputLevel = DEBUG

#==============================================================
#
# End of job options file
#
Example #16
0
    theApp.CreateSvc += [svcMgr.THistSvc.getFullName()]
if not 'TUPLEFILENAME' in dir():
    TUPLEFILENAME = 'mcaod.ttbar.root'
    pass
svcMgr.THistSvc.Output += [
    "mcaod DATAFILE='%s' OPT='RECREATE'" % TUPLEFILENAME
]

#--------------------------------------------------------------
# Output options
#--------------------------------------------------------------
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
outStream = AthenaPoolOutputStream("StreamEvGen")
outStream.ItemList = [
    "EventInfo#*",
    "McEventCollection#MyGEN_EVENT",
    "TruthParticleContainer#*",
]

OUTPUT = os.path.join(os.path.dirname(INPUT[0]),
                      "filtered.%s" % os.path.basename(INPUT[0]))
import os
outStream.OutputFile = OUTPUT

#--------------------------------------------------------------
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
#--------------------------------------------------------------
svcMgr.MessageSvc.defaultLimit = 4000000
#svcMgr.MessageSvc.OutputLevel  = ERROR

#==============================================================
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream

# Stream1
Stream1 = AthenaPoolOutputStream( "Stream1", noTag=True )
Stream1.OutputFile =   "SimplePoolFile1.root"
# List of DO's to write out
Stream1.ItemList   += fullItemList

# Stream2
Stream2 = AthenaPoolOutputStream( "Stream2", noTag=True )
Stream2.OutputFile =   "SimplePoolFile2.root"
# List of DO's to write out
Stream2.ItemList   += fullItemList

# Remove dumm_A from Stream1
Stream1.ItemList = [ o for o in Stream1.ItemList if not o in 'dummy_A#*' ]
Stream1.ItemList = [ o for o in Stream1.ItemList if not o in 'IAthenaPoolTestCollection#*' ]

# Remove dumm_E from Stream2
Stream2.ItemList = [ o for o in Stream2.ItemList if not o in 'dummy_E#*' ]
Stream2.ItemList = [ o for o in Stream2.ItemList if not o in 'AthenaPoolTestMatrix#*' ]

printfunc ("Stream1.ItemList ",Stream1.ItemList)
printfunc ("Stream2.ItemList ",Stream2.ItemList)

#--------------------------------------------------------------
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
#--------------------------------------------------------------
svcMgr.MessageSvc.OutputLevel = WARNING
svcMgr.MessageSvc.debugLimit  = 100000
Example #18
0
#Explicitly specify the output file catalog
from PoolSvc.PoolSvcConf import PoolSvc
svcMgr += PoolSvc()
svcMgr.PoolSvc.WriteCatalog = "xmlcatalog_file:SplittableData.xml"

from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc
svcMgr += AthenaPoolCnvSvc()
svcMgr.AthenaPoolCnvSvc.CommitInterval = 10

include("AthenaPoolMultiTest/ExampleStreamConfig.py")

from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
DataStream = AthenaPoolOutputStream("DataStream",
                                    "AthenaPoolMultiTest_Splittable0.root",
                                    True)
DataStream.ItemList = exampleItemList  # comes from ExampleStreamConfig
DataStream.ItemList += ["FauxTriggerMap#*"]  # add item not in StreamConfig
DataStream.MetadataItemList += exampleMetadataList
DataStream.AcceptAlgs = ["PassAllFilter"]
DataStream.RequireAlgs = ["PassAllFilter"]
DataStream.VetoAlgs = ["PassNoneFilter"]

#--------------------------------------------------------------
# Consequently, should have 3 output files
#    Numbers 3, 4, from PassAll and 1 from Passnone
#--------------------------------------------------------------
#
#  Now configure output collection
#
#--------------------------------------------------------------
from RegistrationServices.RegistrationServicesConf import RegistrationStream
Example #19
0
filAlg=ttbarFilterAlgorithm("ttbarFilter")
# to change properties of the filter instantiate it like this:
# filAlg=ttbarFilterAlgorithm("ttbarFilter",JetMinEt=40*GeV)
topSequence  += ConfigurablePyAlgorithm("ttbarFilter")

#==============================================================
#
# End of job options file
#
###############################################################
#--------------------------------------------------------------
#---   Secondary Write portion  ----- Don't change it !!!
#--------------------------------------------------------------
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
StreamDPD = AthenaPoolOutputStream("StreamDPD")
StreamDPD.ItemList =  ['EventInfo#*', 'TrackRecordCollection#*']
StreamDPD.ItemList += ['ElectronContainer#ElectronAODCollection']
StreamDPD.ItemList += ['egDetailContainer#egDetailAOD']
StreamDPD.ItemList += ['MissingET#MET_RefFinal']
StreamDPD.ItemList += ['MissingET#MET_LocHadObj']
StreamDPD.ItemList += ['CaloClusterContainer#CaloCalTopoCluster']
StreamDPD.ItemList += ['Analysis::MuonContainer#StacoMuonCollection']
StreamDPD.ItemList += ['JetCollection#Kt4LCTopoJets']
StreamDPD.ItemList += ['JetKeyDescriptor#JetKeyMap']
StreamDPD.ItemList += ['JetCollection#Kt4TruthJets']
StreamDPD.ItemList += ['Rec::TrackParticleContainer#TrackParticleCandidate']
StreamDPD.ItemList += ['Rec::TrackParticleContainer#StacoTrackParticles']
StreamDPD.ItemList += ['TruthParticleContainer#SpclMC']
StreamDPD.ItemList += ['McEventCollection#GEN_AOD']

StreamDPD.OutputFile = "SkimmedThin.AOD.pool.root"
theApp.EvtMax = EVTMAX

#--------------------------------------------------------------
# Private Application Configuration options
#--------------------------------------------------------------

## schedule a noop algorithm: it just print where it is
from PerfMonTests.PerfMonTestsConf import PerfMonTest__NoopAlg
topSequence += PerfMonTest__NoopAlg("NoopAlg")

#---------------------------------------------------------------
# Pool Persistency
#---------------------------------------------------------------
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
outStream = AthenaPoolOutputStream("OutStream")
outStream.ItemList = ["EventInfo#McEventInfo"]

if not 'OUTPUT' in dir():
    OUTPUT = "my.data.pool"
    pass
outStream.OutputFile = OUTPUT

## somehow better configure the AthenaPoolCnvSvc for our small
## persistency output job
svcMgr.AthenaPoolCnvSvc.CommitInterval = 1000

svcMgr.MessageSvc.OutputLevel = ERROR
#==============================================================
#
# End of job options file
#
Example #21
0
esdList += CfgItemList("TrigEsd",
                       items=["JetCollection#HLT_AutoKey*"],
                       allowWildCard=True)
assert (esdList.TrigEsd() == ["JetCollection#HLT_AutoKey*"])

msg.info("Should see a warning about attempt at adding invalid element...")
foo = CfgItemList("Foo", items=["Bla#Blah*"])
assert (foo() == [])
del foo

## FIXME: AthenaPoolOutputStream is bringing theApp into our namespace...
msg.info("Creating an AthenaPoolOutputStream...")
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
StreamESD = AthenaPoolOutputStream("StreamESD")
StreamESD.ItemList = esdList()

msg.info("ESD item list: %r", esdList())

msg.info("removing TrigEsd item list")
del esdList.TrigEsd
StreamESD.ItemList = esdList()
msg.info("ESD item list: %r", StreamESD.ItemList)

caught = False
try:
    esdList += AthenaPoolOutputStream("FooFoo")
except TypeError as err:
    caught = True
    msg.info(err)
    msg.info("Error has been caught, good")
Example #22
0
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration

include.block('EventOverlayJobTransforms/OverlayOutput_jobOptions.py')

from AthenaCommon.DetFlags import DetFlags
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
from OverlayCommonAlgs.OverlayFlags import overlayFlags

outStream = AthenaPoolOutputStream('StreamRDO',
                                   athenaCommonFlags.PoolRDOOutput(),
                                   asAlg=True)
outStream.ItemList = []

# Event info
outStream.ItemList += [
    'xAOD::EventInfo#EventInfo', 'xAOD::EventAuxInfo#EventInfoAux.'
]

# Timings
outStream.ItemList += ['RecoTimingObj#EVNTtoHITS_timings']
if not overlayFlags.isDataOverlay():
    outStream.ItemList += ['RecoTimingObj#HITStoRDO_timings']

# Truth
if DetFlags.overlay.Truth_on():
    outStream.ItemList += ['McEventCollection#TruthEvent']

    if 'TrackRecordCollection' in overlayFlags.optionalContainerMap():
        for collection in overlayFlags.optionalContainerMap(
        )['TrackRecordCollection']:
Example #23
0
if not 'ALGMODE' in dir():
    ALGMODE = 'cpp'
    pass
if ALGMODE == 'py':
    from McParticleTests.Lib import PyMcAodSymLinkTests as McAodSymLinkTests
else:
    from McParticleTests.McParticleTestsConf import McAodSymLinkTests
topSequence += McAodSymLinkTests(OutputLevel=DEBUG)

#---------------------------------------------------------------
# Pool Persistency
#---------------------------------------------------------------
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
outStream = AthenaPoolOutputStream("OutStream")
outStream.ItemList = ["EventInfo#*"]
outStream.ItemList += ["McEventCollection#GEN_EVENT"]
outStream.ItemList += ["TruthParticleContainer#SpclMC"]

if 'OUTPUT' not in dir():
    OUTPUT = "mc.aod.symlinktests.pool"
    pass
outStream.OutputFile = OUTPUT
outStream.EvtConversionSvc = "AthenaPoolCnvSvc"
outStream.ForceRead = True  #force read of output data objs

svcMgr.MessageSvc.defaultLimit = 4000000
svcMgr.MessageSvc.OutputLevel = ERROR
#==============================================================
#
# End of job options file
from Starlight_i.Starlight_iConf import Starlight_i
genSeq += Starlight_i("Starlight")
genSeq.Starlight.McEventKey = "GEN_EVENT"

evgenConfig.generators += ["Starlight"]

## Extra stream persistency
## 2101 == EventInfo, 133273 == MCTruth (HepMC)
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
_evgenstream = AthenaPoolOutputStream("StreamEVGEN")
_evgenstream.ItemList = ["2101#*","133273#GEN_EVENT"]
del _evgenstream

Example #25
0
include( "GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py" )
include( "LArAthenaPool/LArAthenaPool_joboptions.py" )
include( "G4SimAthenaPOOL/G4SimAthenaPOOL_joboptions.py" )

# Get a handle to the ServiceManager
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
# Get a handle to the ApplicationManager
from AthenaCommon.AppMgr import theApp

#
# Pool output
#
from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
Stream1 = AthenaPoolOutputStream( "Stream1" )
Stream1.OutputFile = "PoolOutputFileName
Stream1.ItemList=["EventInfo#*",      
                  "McEventCollection#TruthEvent"] # mc truth (hepmc)
Stream1.ItemList+=["LArHitContainer#*"]
Stream1.ForceRead = True

#
# Pool input
#
svcMgr.EventSelector.InputCollections = PoolInputCollection

#
# the Tile, LAr and Calo detector description package
#
from AthenaCommon.GlobalFlags import jobproperties
jobproperties.Global.DetDescrVersion=Geometry

from AtlasGeoModel import SetGeometryVersion