# 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()
#--------------------------------------------------------------------- # Perfmon #-------------------------------------------------------------------- from PerfMonComps.PerfMonFlags import jobproperties jobproperties.PerfMonFlags.doMonitoring = True from PerfMonComps.JobOptCfg import PerfMonSvc svcMgr += PerfMonSvc() jobproperties.PerfMonFlags.doDetailedMonitoring = True #-------------------------------------------------------------- # Event related parameters #-------------------------------------------------------------- # Number of events to be processed (default is 10) theApp.EvtMax = 10 theApp.EvtSel = "EventSelector" #Create output StreamESD from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream StreamESD = AthenaPoolOutputStream("StreamESD", athenaCommonFlags.PoolESDOutput(), True) StreamESD.ForceRead = True # Put MetaData in ESD stream via StreamESD_FH. StreamESD.MetadataItemList += ["LumiBlockCollection#*"] include("EventAthenaPool/EventAthenaPoolItemList_joboptions.py") StreamESD.ItemList += fullItemList #David, instruction to get all the info in the DetectorStore ServiceMgr.DetectorStore.Dump = True
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" #StreamDPD.OutputFile = outFileName StreamDPD.ForceRead=TRUE; #force read of output data objs StreamDPD.AcceptAlgs=["ttbarFilter"] ChronoStatSvc = Service( "ChronoStatSvc" ) ChronoStatSvc.ChronoDestinationCout = True ChronoStatSvc.PrintUserTime = True ChronoStatSvc.PrintSystemTime = True ChronoStatSvc.PrintEllapsedTime = True AthenaPoolCnvSvc = Service( "AthenaPoolCnvSvc" ) AthenaPoolCnvSvc.UseDetailChronoStat = True MessageSvc = Service("MessageSvc") #MessageSvc.OutputLevel = DEBUG #MessageSvc.OutputLevel = ERROR
if doWriteESD: # --- create stream StreamESD = AthenaPoolOutputStream ( "StreamESD" ) StreamESD.OutputFile = "InDetRecESD.root" # --- save MC collection if truth turned on if InDetFlags.doTruth(): StreamESD.ItemList += ["McEventCollection#*"] # ---- load list of objects include ( "InDetRecExample/WriteInDetESD.py" ) if doWriteAOD: # --- create stream StreamAOD = AthenaPoolOutputStream ( "StreamAOD" ) StreamAOD.OutputFile = "InDetRecAOD.root" # --- save MC collection if truth turned on if InDetFlags.doTruth(): StreamAOD.ItemList += ["McEventCollection#*"] # --- load list of objects include ( "InDetRecExample/WriteInDetAOD.py" ) if 'doCopyRDO' in dir() and doCopyRDO: # --- create stream StreamRDO = AthenaPoolOutputStream ( "StreamRDO" ) StreamRDO.OutputFile = "InDetRecRDO.root" # --- add output to list StreamRDO.ItemList += ['TRT_RDO_Container#*','SCT_RDO_Container#*','PixelRDO_Container#*'] StreamRDO.ItemList += ['InDetSimDataCollection#*','McEventCollection#*'] # --- Force read StreamRDO.ForceRead = TRUE; #force read of output data objs
theApp.TopAlg = [ e for e in theApp.TopAlg if e not in ['JetTagNtupleBuilder/JTNtBuilder'] ] theApp.TopAlg += ['JetTagNtupleBuilder/JTNtBuilder'] if BTaggingFlags.doJetTagSlimNtuple: theApp.TopAlg = [ e for e in theApp.TopAlg if e not in ['JetTagNtupleBuilder/JTNtSlimBuilder'] ] theApp.TopAlg += ['JetTagNtupleBuilder/JTNtSlimBuilder'] # override DB: to have the worst case for pixel dead modules if OverridePixMapOverlay != "": print '#BTAG# Overriding PixMapOverlay with ',OverridePixMapOverlay conddb.addOverride('/PIXEL/PixMapOverlay', OverridePixMapOverlay) # --- output a new AOD file if requested (not fully validated ! strange behavior for re-tagged collections !) if WriteNewAODFile: from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream StreamAOD = AthenaPoolOutputStream( "StreamAOD", "newAOD.pool.root", True ) StreamAOD.ForceRead = True StreamAOD.ExtendProvenanceRecord = False StreamAOD.TakeItemsFromInput=True taggedJetList = [] for key in BTaggingFlags.Jets: if key in BTaggingFlags.RetagJets: # newJetColl = "JetCollection#"+key+"JetsAOD" newJetColl = "JetCollection#"+key+"JetsReTagged" else: newJetColl = "JetCollection#"+key+"Jets" print '#BTAG# jet collection: ',newJetColl taggedJetList += [ newJetColl ] StreamAOD.ItemList += taggedJetList print '#BTAG# writing out :',StreamAOD.ItemList # --- Filter on GRL first:
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#*"]
SkipEvents = 0 ServiceMgr.EventSelector.SkipEvents = SkipEvents #-------------------------------------------------------------- # Setup Output #-------------------------------------------------------------- if hasattr(runArgs, "outputRDO_MRGFile"): Out = runArgs.outputRDO_MRGFile from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream try: StreamRDO = AthenaPoolOutputStream("StreamRDO", Out, True) except: StreamRDO = AthenaPoolOutputStream("StreamRDO", "DidNotSetOutputName.root", True) StreamRDO.TakeItemsFromInput = TRUE StreamRDO.ForceRead = TRUE #force read of output data objs # The next line is an example on how to exclude clid's if they are causing a problem #StreamRDO.ExcludeList = ['6421#*'] # Look for lists of filter algorithms try: StreamRDO.AcceptAlgs = AcceptList except: print "No accept algs indicated in AcceptList" try: StreamRDO.RequireAlgs = RequireList except: print "No accept algs indicated in RequireList" try: StreamRDO.VetoAlgs = VetoList
#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()
#-------------------------------------------------------------- # Write Digitization MetaData #-------------------------------------------------------------- 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 += [
ServiceMgr.EventSelector.SkipEvents = SkipEvents #-------------------------------------------------------------- # Setup Output #-------------------------------------------------------------- if not hasattr(runArgs, "outputHitsFile"): raise RuntimeError("No outputHitsFile provided.") Out = runArgs.outputHitsFile from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream try: StreamHITS = AthenaPoolOutputStream("StreamHITS", Out, True) except: StreamHITS = AthenaPoolOutputStream("StreamHITS", "DidNotSetOutputName.root", True) StreamHITS.TakeItemsFromInput = TRUE StreamHITS.ForceRead = TRUE #force read of output data objs # The next line is an example on how to exclude clid's if they are causing a problem #StreamHITS.ExcludeList = ['6421#*'] # Look for lists of filter algorithms try: StreamHITS.AcceptAlgs = AcceptList except: print "No accept algs indicated in AcceptList" try: StreamHITS.RequireAlgs = RequireList except: print "No accept algs indicated in RequireList" try: StreamHITS.VetoAlgs = VetoList
InDetKeys.OutputESDFileName(), asAlg=True) # --- save MC collections if truth turned on if InDetFlags.doTruth(): StreamESD.ItemList += truthList # ---- load list of objects include("InDetRecExample/WriteInDetESD.py") StreamESD.ItemList += InDetESDList StreamESD.ItemList += [ 'xAOD::EventInfo#EventInfo', 'xAOD::EventAuxInfo#EventInfoAux.' ] # --- add trigger to IDRE standalone ESD StreamESD.ItemList += ["TrigDec::TrigDecision#TrigDecision"] StreamESD.ItemList += ["HLT::HLTResult#HLTResult_L2"] StreamESD.ItemList += ["HLT::HLTResult#HLTResult_EF"] StreamESD.ForceRead = True # otherwise unread stuff is not copied if InDetFlags.doDBMstandalone(): topSequence.StreamESD.ItemList += [ "TrackCollection#SiSPSeededTracks" ] if doWriteAOD: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr # --- create *augmented* stream; this makes ROOT happy StreamAOD_Augmented = MSMgr.NewPoolRootStream( "StreamAOD", InDetKeys.OutputAODFileName()) # --- here is the old, backward-compatible event stream StreamAOD = StreamAOD_Augmented.GetEventStream() # --- save MC collections if truth turned on if InDetFlags.doTruth(): StreamAOD.ItemList += truthList
StreamDPD = AthenaPoolOutputStream("StreamDPD") ## configure the thinning service from AthenaServices.Configurables import ThinningSvc svcMgr += ThinningSvc(Streams=['StreamDPD']) ######################Write Item List########################################## StreamDPD.ItemList = ['EventInfo#*', 'TrackRecordCollection#*'] StreamDPD.ItemList += ['ElectronContainer#ElectronAODCollection'] StreamDPD.ItemList += ['egDetailContainer#egDetailAOD'] StreamDPD.ItemList += ['Analysis::MuonContainer#StacoMuonCollection'] StreamDPD.ItemList += ['JetKeyDescriptor#JetKeyMap'] StreamDPD.ItemList += ['JetCollection#Cone4H1TowerJets'] StreamDPD.ItemList += ['JetCollection#Cone4TruthJets'] StreamDPD.ItemList += ['Rec::TrackParticleContainer#TrackParticleCandidate'] StreamDPD.ItemList += ['Rec::TrackParticleContainer#StacoTrackParticles'] StreamDPD.ItemList += ['VxContainer#*'] StreamDPD.ForceRead = TRUE #force read of output data objs #electron Filter StreamDPD.AcceptAlgs = ["ElectronFilter"] #============================================================= # # End of job options file # ###############################################################
from McParticleAlgs.McParticleAlgsConf import McAodTupleWriter topSequence += McAodTupleWriter(McWriter=McAodTupleWriterTool( TruthParticles="SpclMC", Output=TUPLEFILENAME), OutputLevel=DEBUG) pass #-------------------------------------------------------------- # Output options #-------------------------------------------------------------- from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream outStream = AthenaPoolOutputStream("StreamAOD") import os outStream.OutputFile = os.path.join( \ os.path.dirname(INPUT[0]), "reaccessed.%s" % os.path.basename(INPUT[0]) ) outStream.ForceRead = True outStream.ItemList += ["EventInfo#McEventInfo"] outStream.ItemList += ["McEventCollection#GEN_EVENT"] outStream.ItemList += ["McEventCollection#GEN_AOD"] outStream.ItemList += ["TruthParticleContainer#SpclMC"] outStream.ItemList += ["TruthEtIsolationsContainer#TruthEtIsol_GEN_EVENT"] outStream.ItemList += ["TruthEtIsolationsContainer#TruthEtIsol_GEN_AOD"] ## tweak the default commit interval svcMgr.AthenaPoolCnvSvc.CommitInterval = 100 svcMgr.MessageSvc.defaultLimit = 4000000 svcMgr.MessageSvc.OutputLevel = ERROR #==============================================================
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 # ###############################################################
#Stream1.ItemList += ["CaloCalibrationHitContainer#LArCalibrationHitActive", # "CaloCalibrationHitContainer#LArCalibrationHitDeadMaterial", # "CaloCalibrationHitContainer#LArCalibrationHitInactive", # "CaloCalibrationHitContainer#TileCalibHitActiveCell", # "CaloCalibrationHitContainer#TileCalibHitInactiveCell", # "CaloCalibrationHitContainer#TileCalibHitDeadMaterial" ] #CSC Stream1.ItemList+=["CSCSimHitCollection#CSC_Hits"] #MDT Stream1.ItemList+=["MDTSimHitCollection#MDT_Hits"] #RPC Stream1.ItemList+=["RPCSimHitCollection#RPC_Hits"] #TGC Stream1.ItemList+=["TGCSimHitCollection#TGC_Hits"] Stream1.ForceRead = True #-------------------------------------------------------------- # the Tile, LAr and Calo detector description package #-------------------------------------------------------------- from AtlasGeoModel import SetGeometryVersion from AtlasGeoModel import GeoModelInit include( "CaloIdCnv/CaloIdCnv_joboptions.py" ) include( "TileIdCnv/TileIdCnv_jobOptions.py" ) include( "LArDetDescr/LArDetDescr_joboptions.py" ) try: import MagFieldServices.SetupField except: filterHitLog.warning("C++ magnetic field not available in this release.") include( "BFieldAth/BFieldAth_jobOptions.py" )
#-------------------------------------------------------------- #RootHistSvc = Service( "RootHistSvc" ) #HbookHistSvc.NPAWC = 1500000 #HistogramPersistencySvc = Service( "HistogramPersistencySvc" ) #HistogramPersistencySvc.OutputFile = "histo.root" svcMgr.NTupleSvc.Output = [ "FILE1 DATAFILE='pythiaB.root' OPT='NEW' TYP='ROOT'" ] ############################################################### # Add POOL persistency from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream include("GeneratorObjectsAthenaPool/GeneratorObjectsAthenaPool_joboptions.py") Stream1 = AthenaPoolOutputStream("Stream1") Stream1.ForceRead = TRUE Stream1.OutputFile = "pythiaB.pool.root" # 2101 = EventInfo # 133273 = MCTruth (HepMC) Stream1.ItemList += ["2101#*", "133273#*"] include("AthenaSealSvc/AthenaSealSvc_joboptions.py") AthenaSealSvc.CheckDictionary = TRUE #============================================================== # # End of job options file # ###############################################################
elif hasattr(runArgs, "outputEVNT_PreFile"): poolFile = runArgs.outputEVNT_PreFile else: raise RuntimeError( "Output pool file, either EVNT or EVNT_Pre, is not known.") #StreamEVGEN = AthenaPoolOutputStream("StreamEVGEN", runArgs.outputEVNTFile) StreamEVGEN = AthenaPoolOutputStream("StreamEVGEN", poolFile) if hasattr(runArgs, "inputEVNT_PreFile"): # import AthenaPoolCnvSvc.ReadAthenaPool # from AthenaCommon.AthenaCommonFlags import athenaCommonFlags # athenaCommonFlags.PoolEvgenInput.set_Value_and_Lock( runArgs.inputEVNT_PreFile ) svcMgr.EventSelector.InputCollections = runArgs.inputEVNT_PreFile StreamEVGEN.TakeItemsFromInput = True StreamEVGEN.ForceRead = True StreamEVGEN.ItemList += ["EventInfo#*", "McEventCollection#*"] StreamEVGEN.RequireAlgs += ["EvgenFilterSeq"] ## Used for pile-up (remove dynamic variables except flavour labels) if evgenConfig.saveJets: StreamEVGEN.ItemList += ["xAOD::JetContainer_v1#*"] StreamEVGEN.ItemList += [ "xAOD::JetAuxContainer_v1#*.TruthLabelID.PartonTruthLabelID" ] ## Set the run numbers svcMgr.EventSelector.RunNumber = runArgs.runNumber # TODO: set EventType::mc_channel_number = runArgs.runNumber ## Handle beam info import EventInfoMgt.EventInfoMgtInit
SkipEvents = runArgs.skipEvents ServiceMgr.EventSelector.SkipEvents = SkipEvents #-------------------------------------------------------------- # Setup Output #-------------------------------------------------------------- if not hasattr(runArgs,"outputHitsFile"): raise RuntimeError("No outputHitsFile provided.") Out = runArgs.outputHitsFile from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream try: StreamHITS = AthenaPoolOutputStream( "StreamHITS", Out, True ) except: StreamHITS = AthenaPoolOutputStream( "StreamHITS", "DidNotSetOutputName.root", True ) StreamHITS.TakeItemsFromInput=TRUE; StreamHITS.ForceRead=TRUE; #force read of output data objs # The next line is an example on how to exclude clid's if they are causing a problem #StreamHITS.ExcludeList = ['6421#*'] # Look for lists of filter algorithms try: StreamHITS.AcceptAlgs = AcceptList except: print "No accept algs indicated in AcceptList" try: StreamHITS.RequireAlgs = RequireList except: print "No accept algs indicated in RequireList" try: StreamHITS.VetoAlgs = VetoList except:
if doWriteESD: # --- create stream StreamESD = AthenaPoolOutputStream ( "StreamESD", InDetKeys.OutputESDFileName(),asAlg=True) # --- save MC collections if truth turned on if InDetFlags.doTruth(): StreamESD.ItemList += truthList # ---- load list of objects include ( "InDetRecExample/WriteInDetESD.py" ) StreamESD.ItemList += InDetESDList StreamESD.ItemList += [ 'xAOD::EventInfo#EventInfo' , 'xAOD::EventAuxInfo#EventInfoAux.' ] # --- add trigger to IDRE standalone ESD StreamESD.ItemList += [ "TrigDec::TrigDecision#TrigDecision" ] StreamESD.ItemList += [ "HLT::HLTResult#HLTResult_L2" ] StreamESD.ItemList += [ "HLT::HLTResult#HLTResult_EF" ] StreamESD.ForceRead = True # otherwise unread stuff is not copied if InDetFlags.doDBMstandalone(): topSequence.StreamESD.ItemList+=["TrackCollection#SiSPSeededTracks"] if doWriteAOD: from OutputStreamAthenaPool.MultipleStreamManager import MSMgr # --- create *augmented* stream; this makes ROOT happy StreamAOD_Augmented = MSMgr.NewPoolRootStream ( "StreamAOD", InDetKeys.OutputAODFileName() ) # --- here is the old, backward-compatible event stream StreamAOD = StreamAOD_Augmented.GetEventStream() # --- save MC collections if truth turned on if InDetFlags.doTruth(): StreamAOD.ItemList += truthList # --- load list of objects include ( "InDetRecExample/WriteInDetAOD.py" )