From eeb9bdfee03fef2b9d48e1834b251aca07209e9e Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller Date: Tue, 19 May 2026 21:36:28 +0200 Subject: [PATCH] Use IOSvc instead of k4DataSvc and PodioOutput --- workflows/4/k4simdelphesalg_pythia.py | 15 +++++++-------- workflows/5/geant_fullsim_fccee_lar_pgun.py | 18 +++++++----------- .../geant_fullsim_fccee_lar_pgun.py | 18 +++++++----------- .../k4simdelphesalg_pythia.py | 15 +++++++-------- 4 files changed, 28 insertions(+), 38 deletions(-) diff --git a/workflows/4/k4simdelphesalg_pythia.py b/workflows/4/k4simdelphesalg_pythia.py index b703a32..6724c91 100644 --- a/workflows/4/k4simdelphesalg_pythia.py +++ b/workflows/4/k4simdelphesalg_pythia.py @@ -1,14 +1,14 @@ from Gaudi.Configuration import * from GaudiKernel import SystemOfUnits as units -from Configurables import ApplicationMgr +from Configurables import ApplicationMgr, EventDataSvc +from k4FWCore import IOSvc + app = ApplicationMgr() app.EvtMax = 100 app.EvtSel = "NONE" -from Configurables import k4DataSvc -podioevent = k4DataSvc("EventDataSvc") -app.ExtSvc += [podioevent] +podioevent = EventDataSvc("EventDataSvc") from Configurables import PythiaInterface @@ -46,9 +46,8 @@ ApplicationMgr().TopAlg += [delphesalg] -from Configurables import PodioOutput -out = PodioOutput("out", filename = "output_k4SimDelphes_pythia.root") -out.outputCommands = ["keep *"] -ApplicationMgr().TopAlg += [out] +iosvc = IOSvc() +iosvc.Output = "output_k4SimDelphes_pythia.root" +iosvc.outputCommands = ["keep *"] diff --git a/workflows/5/geant_fullsim_fccee_lar_pgun.py b/workflows/5/geant_fullsim_fccee_lar_pgun.py index 25b66c4..2beabc0 100644 --- a/workflows/5/geant_fullsim_fccee_lar_pgun.py +++ b/workflows/5/geant_fullsim_fccee_lar_pgun.py @@ -4,17 +4,17 @@ from GaudiKernel import PhysicalConstants as constants from GaudiKernel.SystemOfUnits import MeV, GeV, tesla -from Configurables import ApplicationMgr +from Configurables import ApplicationMgr, EventDataSvc +from k4FWCore import IOSvc + ApplicationMgr().EvtSel = 'NONE' ApplicationMgr().EvtMax = 2 ApplicationMgr().OutputLevel = INFO ApplicationMgr().StopOnSignal = True ApplicationMgr().ExtSvc += ['RndmGenSvc'] -from Configurables import FCCDataSvc ## Data service -podioevent = FCCDataSvc("EventDataSvc") -ApplicationMgr().ExtSvc += [podioevent] +podioevent = EventDataSvc("EventDataSvc") from Configurables import MomentumRangeParticleGun guntool = MomentumRangeParticleGun() @@ -251,12 +251,9 @@ ################ Output -from Configurables import PodioOutput -out = PodioOutput("out") -out.outputCommands = ["keep *", "drop ECalBarrelHits", "drop HCal*", "drop ECalBarrelCellsStep*", "drop ECalBarrelPositionedHits", "drop emptyCaloCells", "drop CaloClusterCells"] -import uuid -out.filename = "output_fullCalo_SimAndDigi.root" -ApplicationMgr().TopAlg += [out] +iosvc = IOSvc() +iosvc.Output = "output_fullCalo_SimAndDigi.root" +iosvc.outputCommands = ["keep *", "drop ECalBarrelHits", "drop HCal*", "drop ECalBarrelCellsStep*", "drop ECalBarrelPositionedHits", "drop emptyCaloCells", "drop CaloClusterCells"] #CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -270,7 +267,6 @@ resegmentEcalBarrel.AuditExecute = True createEcalBarrelCells.AuditExecute = True createHcalBarrelCells.AuditExecute = True -out.AuditExecute = True #ApplicationMgr().ExtSvc += [audsvc] from Configurables import EventCounter diff --git a/workflows/fccconfigkey4hep-devel-2/geant_fullsim_fccee_lar_pgun.py b/workflows/fccconfigkey4hep-devel-2/geant_fullsim_fccee_lar_pgun.py index 25b66c4..2beabc0 100644 --- a/workflows/fccconfigkey4hep-devel-2/geant_fullsim_fccee_lar_pgun.py +++ b/workflows/fccconfigkey4hep-devel-2/geant_fullsim_fccee_lar_pgun.py @@ -4,17 +4,17 @@ from GaudiKernel import PhysicalConstants as constants from GaudiKernel.SystemOfUnits import MeV, GeV, tesla -from Configurables import ApplicationMgr +from Configurables import ApplicationMgr, EventDataSvc +from k4FWCore import IOSvc + ApplicationMgr().EvtSel = 'NONE' ApplicationMgr().EvtMax = 2 ApplicationMgr().OutputLevel = INFO ApplicationMgr().StopOnSignal = True ApplicationMgr().ExtSvc += ['RndmGenSvc'] -from Configurables import FCCDataSvc ## Data service -podioevent = FCCDataSvc("EventDataSvc") -ApplicationMgr().ExtSvc += [podioevent] +podioevent = EventDataSvc("EventDataSvc") from Configurables import MomentumRangeParticleGun guntool = MomentumRangeParticleGun() @@ -251,12 +251,9 @@ ################ Output -from Configurables import PodioOutput -out = PodioOutput("out") -out.outputCommands = ["keep *", "drop ECalBarrelHits", "drop HCal*", "drop ECalBarrelCellsStep*", "drop ECalBarrelPositionedHits", "drop emptyCaloCells", "drop CaloClusterCells"] -import uuid -out.filename = "output_fullCalo_SimAndDigi.root" -ApplicationMgr().TopAlg += [out] +iosvc = IOSvc() +iosvc.Output = "output_fullCalo_SimAndDigi.root" +iosvc.outputCommands = ["keep *", "drop ECalBarrelHits", "drop HCal*", "drop ECalBarrelCellsStep*", "drop ECalBarrelPositionedHits", "drop emptyCaloCells", "drop CaloClusterCells"] #CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -270,7 +267,6 @@ resegmentEcalBarrel.AuditExecute = True createEcalBarrelCells.AuditExecute = True createHcalBarrelCells.AuditExecute = True -out.AuditExecute = True #ApplicationMgr().ExtSvc += [audsvc] from Configurables import EventCounter diff --git a/workflows/fccconfigkey4hep-devel-2/k4simdelphesalg_pythia.py b/workflows/fccconfigkey4hep-devel-2/k4simdelphesalg_pythia.py index 1a43df2..d810441 100644 --- a/workflows/fccconfigkey4hep-devel-2/k4simdelphesalg_pythia.py +++ b/workflows/fccconfigkey4hep-devel-2/k4simdelphesalg_pythia.py @@ -2,13 +2,13 @@ from Gaudi.Configuration import * from GaudiKernel import SystemOfUnits as units -from Configurables import ApplicationMgr +from Configurables import ApplicationMgr, EventDataSvc +from k4FWCore import IOSvc + ApplicationMgr().EvtSel = 'NONE' ApplicationMgr().EvtMax = 10 -from Configurables import k4DataSvc -podioevent = k4DataSvc("EventDataSvc") -ApplicationMgr().ExtSvc += [podioevent] +podioevent = EventDataSvc("EventDataSvc") from Configurables import PythiaInterface @@ -44,7 +44,6 @@ delphesalg.OutputLevel = VERBOSE ApplicationMgr().TopAlg += [delphesalg] -from Configurables import PodioOutput -out = PodioOutput("out", filename = "output_k4SimDelphes_pythia.root") -out.outputCommands = ["keep *"] -ApplicationMgr().TopAlg += [out] +iosvc = IOSvc() +iosvc.Output = "output_k4SimDelphes_pythia.root" +iosvc.outputCommands = ["keep *"]