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: print "No accept algs indicated in VetoList" MessageSvc = ServiceMgr.MessageSvc MessageSvc.OutputLevel = INFO StreamHITS.ExtendProvenanceRecord = False ServiceMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "15000000000" ] #-------------------------------------------------------------- ## Post-include if hasattr(runArgs,"postInclude"): for fragment in runArgs.postInclude: include(fragment) ## Post-exec if hasattr(runArgs,"postExec"): merHitLog.info("transform post-exec") for cmd in runArgs.postExec: merHitLog.info(cmd)
print "No accept algs indicated in RequireList" try: StreamHITS.VetoAlgs = VetoList except: print "No accept algs indicated in VetoList" # Perfmon from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties pmon_properties.PerfMonFlags.doMonitoring = True pmon_properties.PerfMonFlags.doSemiDetailedMonitoring = True pmon_properties.PerfMonFlags.OutputFile = "ntuple_HITSMerge" MessageSvc = ServiceMgr.MessageSvc MessageSvc.OutputLevel = INFO StreamHITS.ExtendProvenanceRecord = False ServiceMgr.AthenaPoolCnvSvc.MaxFileSizes = ["15000000000"] #-------------------------------------------------------------- # Ensure IOVDbSvc.GlobalTag is configured # - protection against bad HITS file metadata #-------------------------------------------------------------- if not hasattr(ServiceMgr, 'IOVDbSvc'): from IOVDbSvc.IOVDbSvcConf import IOVDbSvc ServiceMgr += IOVDbSvc() if not hasattr(ServiceMgr.IOVDbSvc, 'GlobalTag') or not ServiceMgr.IOVDbSvc.GlobalTag: from AthenaCommon.GlobalFlags import globalflags ServiceMgr.IOVDbSvc.GlobalTag = globalflags.ConditionsTag.get_Value()
print("No accept algs indicated in RequireList") try: StreamRDO.VetoAlgs = VetoList except: print("No accept algs indicated in VetoList") # Perfmon from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties pmon_properties.PerfMonFlags.doMonitoring=True pmon_properties.PerfMonFlags.doSemiDetailedMonitoring=True pmon_properties.PerfMonFlags.OutputFile = "ntuple_RDOMerge" MessageSvc = ServiceMgr.MessageSvc MessageSvc.OutputLevel = INFO StreamRDO.ExtendProvenanceRecord = False ServiceMgr.AthenaPoolCnvSvc.MaxFileSizes = [ "15000000000" ] ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + outputFile + "'; COMPRESSION_ALGORITHM = '2'" ] ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '" + outputFile + "'; COMPRESSION_LEVEL = '1'" ] ## Post-include if hasattr(runArgs,"postInclude"): for fragment in runArgs.postInclude: include(fragment) ## Post-exec if hasattr(runArgs,"postExec"): merRDOLog.info("transform post-exec") for cmd in runArgs.postExec: merRDOLog.info(cmd)
svcMgr += PoolSvc() svcMgr.PoolSvc.WriteCatalog = "xmlcatalog_file:Catalog1.xml" from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc svcMgr += AthenaPoolCnvSvc() svcMgr.AthenaPoolCnvSvc.CommitInterval = 10; #-------------------------------------------------------------- # Private Application Configuration options #-------------------------------------------------------------- # Load "user algorithm" top algorithms to be run, and the libraries that house them from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream Stream1 = AthenaPoolOutputStream( "Stream1" , "SimplePoolReplica1.root" , True ) Stream1.ItemList += [ "ExampleHitContainer#MyHits" ] Stream1.ExtendProvenanceRecord = FALSE; Stream1.ForceRead = True #Stream1.PersToPers = True #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL) #-------------------------------------------------------------- svcMgr.MessageSvc.OutputLevel = 3 svcMgr.EventSelector.OutputLevel = 2 svcMgr.AthenaPoolAddressProviderSvc.OutputLevel = 2 svcMgr.PoolSvc.OutputLevel = 2 svcMgr.AthenaPoolCnvSvc.OutputLevel = 2 Stream1.OutputLevel = 2 #
print "No accept algs indicated in RequireList" try: StreamEVGEN.VetoAlgs = VetoList except: print "No accept algs indicated in VetoList" # Perfmon from PerfMonComps.PerfMonFlags import jobproperties as pmon_properties pmon_properties.PerfMonFlags.doMonitoring = True pmon_properties.PerfMonFlags.doSemiDetailedMonitoring = True pmon_properties.PerfMonFlags.OutputFile = "ntuple_EVNT_TRMerge" MessageSvc = ServiceMgr.MessageSvc MessageSvc.OutputLevel = INFO StreamEVGEN.ExtendProvenanceRecord = False ServiceMgr.AthenaPoolCnvSvc.MaxFileSizes = ["15000000000"] #-------------------------------------------------------------- # Ensure IOVDbSvc.GlobalTag is configured # - protection against bad EVNT_TR file metadata #-------------------------------------------------------------- if not hasattr(ServiceMgr, 'IOVDbSvc'): from IOVDbSvc.IOVDbSvcConf import IOVDbSvc ServiceMgr += IOVDbSvc() if not hasattr(ServiceMgr.IOVDbSvc, 'GlobalTag') or not ServiceMgr.IOVDbSvc.GlobalTag: from AthenaCommon.GlobalFlags import globalflags ServiceMgr.IOVDbSvc.GlobalTag = globalflags.ConditionsTag.get_Value()
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.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: ## For data, use the Good Run / Lumi Block List
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: ## For data, use the Good Run / Lumi Block List
# Must make sure that no OutStream's have been declared theApp.OutStream = [] # Stream's output file Stream1.WritingTool = "AthenaOutputStreamTool" Stream1.OutputFile = "SimplePoolFile2.root" Stream1.OutputLevel = DEBUG # Copy everything from the input and must force reading of all input # objects Stream1.TakeItemsFromInput = True # Turn off provenance - means that new copy does NOT point back to its # input file, but it DOES retain the possibility to navigate to the # files upstream of the input. Thus the output "replaces" the input in # terms of back-navigation. Stream1.ExtendProvenanceRecord = False print Stream1.ItemList #-------------------------------------------------------------- # Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) #-------------------------------------------------------------- svcMgr.MessageSvc = Service("MessageSvc") svcMgr.MessageSvc.OutputLevel = INFO svcMgr.MessageSvc.debugLimit = 100000 AthenaEventLoopMgr = Service("AthenaEventLoopMgr") #AthenaEventLoopMgr.OutputLevel = DEBUG # No stats printout include("AthenaPoolTest/NoStats_jobOptions.py")