diff --git a/RecCalorimeter/tests/options/geant_fullsim_ecalSimple_singleparticles.py b/RecCalorimeter/tests/options/geant_fullsim_ecalSimple_singleparticles.py index b386016c6..f46d1c9d5 100644 --- a/RecCalorimeter/tests/options/geant_fullsim_ecalSimple_singleparticles.py +++ b/RecCalorimeter/tests/options/geant_fullsim_ecalSimple_singleparticles.py @@ -6,9 +6,10 @@ from Gaudi.Configuration import * # Data service -from Configurables import k4DataSvc +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -podioevent = k4DataSvc("EventDataSvc") +podioevent = EventDataSvc("EventDataSvc") # DD4hep geometry service from Configurables import GeoSvc @@ -82,12 +83,9 @@ OutputLevel=DEBUG, ) -# PODIO algorithm -from Configurables import PodioOutput - -out = PodioOutput("out", OutputLevel=DEBUG) -out.outputCommands = ["keep *"] -out.filename = "output_ecalSim_e50GeV_" + str(num_events) + "events.root" +iosvc = IOSvc() +iosvc.Output = "output_ecalSim_e50GeV_" + str(num_events) + "events.root" +iosvc.outputCommands = ["keep *"] # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -97,11 +95,8 @@ audsvc.Auditors = [chra] geantsim.AuditExecute = True -# ApplicationMgr -from Configurables import ApplicationMgr - ApplicationMgr( - TopAlg=[geantsim, out], + TopAlg=[geantsim], EvtSel="NONE", EvtMax=num_events, # order is important, as GeoSvc is needed by G4SimSvc diff --git a/RecCalorimeter/tests/options/geant_fullsim_hcal_singleparticles.py b/RecCalorimeter/tests/options/geant_fullsim_hcal_singleparticles.py index 9e1910183..94989881a 100644 --- a/RecCalorimeter/tests/options/geant_fullsim_hcal_singleparticles.py +++ b/RecCalorimeter/tests/options/geant_fullsim_hcal_singleparticles.py @@ -6,9 +6,10 @@ from Gaudi.Configuration import * # Data service -from Configurables import k4DataSvc +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -podioevent = k4DataSvc("EventDataSvc") +podioevent = EventDataSvc("EventDataSvc") # DD4hep geometry service from Configurables import GeoSvc @@ -89,18 +90,15 @@ OutputLevel=DEBUG, ) -# PODIO algorithm -from Configurables import PodioOutput - -out = PodioOutput("out", OutputLevel=DEBUG) -out.outputCommands = ["keep *"] -out.filename = ( +iosvc = IOSvc() +iosvc.Output = ( "output_hcalSim_e" + str(int(energy / 1000)) + "GeV_eta036_" + str(num_events) + "events.root" ) +iosvc.outputCommands = ["keep *"] # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -110,11 +108,8 @@ audsvc.Auditors = [chra] geantsim.AuditExecute = True -# ApplicationMgr -from Configurables import ApplicationMgr - ApplicationMgr( - TopAlg=[geantsim, out], + TopAlg=[geantsim], EvtSel="NONE", EvtMax=num_events, # order is important, as GeoSvc is needed by G4SimSvc diff --git a/RecCalorimeter/tests/options/genJetClustering.py b/RecCalorimeter/tests/options/genJetClustering.py index b781fe851..65c908ad4 100644 --- a/RecCalorimeter/tests/options/genJetClustering.py +++ b/RecCalorimeter/tests/options/genJetClustering.py @@ -1,6 +1,7 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr, HepMCDumper, HepMCJetClustering +from Configurables import HepMCDumper, HepMCJetClustering from Configurables import HepMCHistograms, JetHistograms +from k4FWCore import ApplicationMgr # TODO: best to run pythia here? diff --git a/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise.py b/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise.py index 7b25f4cfe..31ef2446e 100644 --- a/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise.py +++ b/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise.py @@ -27,27 +27,20 @@ hcalFieldValues = [8] from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc + +iosvc = IOSvc() +iosvc.Input = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root" +iosvc.CollectionNames = [ + "ECalBarrelCells", + "HCalBarrelCells", + "HCalExtBarrelCells", + "GenParticles", + "GenVertices", +] -podioevent = k4DataSvc( - "EventDataSvc", - input="output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root", -) - -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput - -podioinput = PodioInput( - "PodioReader", - collections=[ - "ECalBarrelCells", - "HCalBarrelCells", - "HCalExtBarrelCells", - "GenParticles", - "GenVertices", - ], - OutputLevel=DEBUG, -) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -315,10 +308,8 @@ OutputLevel=INFO, ) -out = PodioOutput( - "out", filename="output_BarrelTopo_electrNoise_50GeVe_3ev.root", OutputLevel=DEBUG -) -out.outputCommands = [ +iosvc.Output = "output_BarrelTopo_electrNoise_50GeVe_3ev.root" +iosvc.outputCommands = [ "drop *", "keep GenParticles", "keep GenVertices", @@ -333,7 +324,6 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True createemptycells.AuditExecute = True createEcalBarrelCells.AuditExecute = True createHcalBarrelCells.AuditExecute = True @@ -342,14 +332,12 @@ ApplicationMgr( TopAlg=[ - podioinput, rewriteHCal, createEcalBarrelCells, createHcalBarrelCells, createemptycells, createTopoClusters, positionsClusterBarrel, - out, ], EvtSel="NONE", EvtMax=3, diff --git a/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise_coneSelection.py b/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise_coneSelection.py index f6c424203..da59cfb33 100644 --- a/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise_coneSelection.py +++ b/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise_coneSelection.py @@ -27,27 +27,20 @@ hcalFieldValues = [8] from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc + +iosvc = IOSvc() +iosvc.Input = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root" +iosvc.CollectionNames = [ + "ECalBarrelCells", + "HCalBarrelCells", + "HCalExtBarrelCells", + "GenParticles", + "GenVertices", +] -podioevent = k4DataSvc( - "EventDataSvc", - input="output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root", -) - -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput - -podioinput = PodioInput( - "PodioReader", - collections=[ - "ECalBarrelCells", - "HCalBarrelCells", - "HCalExtBarrelCells", - "GenParticles", - "GenVertices", - ], - OutputLevel=DEBUG, -) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -348,10 +341,8 @@ ) -out = PodioOutput( - "out", filename="output_BarrelTopo_electrNoise_100GeVpi_3ev.root", OutputLevel=DEBUG -) -out.outputCommands = [ +iosvc.Output = "output_BarrelTopo_electrNoise_100GeVpi_3ev.root" +iosvc.outputCommands = [ "drop *", "keep GenParticles", "keep GenVertices", @@ -368,7 +359,6 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True createemptycells.AuditExecute = True createEcalBarrelCells.AuditExecute = True createHcalBarrelCells.AuditExecute = True @@ -377,7 +367,6 @@ ApplicationMgr( TopAlg=[ - podioinput, smear, rewriteHCal, createHcalCells, @@ -389,7 +378,6 @@ createTopoClusters, splitClusters, # positionsClusterBarrel, - out, ], EvtSel="NONE", EvtMax=num_events, diff --git a/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise_fullGran_coneSelection.py b/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise_fullGran_coneSelection.py index c6a6c80af..9da809a3c 100644 --- a/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise_fullGran_coneSelection.py +++ b/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_electrNoise_fullGran_coneSelection.py @@ -27,27 +27,20 @@ hcalFieldValues = [8] from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput - -podioevent = k4DataSvc( - "EventDataSvc", - input="output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root", -) +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc + +iosvc = IOSvc() +iosvc.Input = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root" +iosvc.CollectionNames = [ + "ECalBarrelCells", + "HCalBarrelCells", + "HCalExtBarrelCells", + "GenParticles", + "GenVertices", +] -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput - -podioinput = PodioInput( - "PodioReader", - collections=[ - "ECalBarrelCells", - "HCalBarrelCells", - "HCalExtBarrelCells", - "GenParticles", - "GenVertices", - ], - OutputLevel=DEBUG, -) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -348,12 +341,8 @@ ) -out = PodioOutput( - "out", - filename="output_BarrelTopo_electrNoise_fullGran_100GeVpi_3ev.root", - OutputLevel=DEBUG, -) -out.outputCommands = ["keep *"] +iosvc.Output = "output_BarrelTopo_electrNoise_fullGran_100GeVpi_3ev.root" +iosvc.outputCommands = ["keep *"] # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -361,7 +350,6 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True createemptycells.AuditExecute = True createEcalBarrelCells.AuditExecute = True createHcalBarrelCells.AuditExecute = True @@ -370,7 +358,6 @@ ApplicationMgr( TopAlg=[ - podioinput, smear, # rewriteHCal, # createHcalCells, @@ -382,7 +369,6 @@ createTopoClusters, splitClusters, positionsClusterBarrel, - out, ], EvtSel="NONE", EvtMax=num_events, diff --git a/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_noNoise.py b/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_noNoise.py index c73297e1b..ea95a152f 100644 --- a/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_noNoise.py +++ b/RecCalorimeter/tests/options/runBarrelCaloSystem_ReconstructionTopoClusters_noNoise.py @@ -16,27 +16,20 @@ num_events = 3 from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc + +iosvc = IOSvc() +iosvc.Input = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root" +iosvc.CollectionNames = [ + "ECalBarrelCells", + "HCalBarrelCells", + "HCalExtBarrelCells", + "GenParticles", + "GenVertices", +] -podioevent = k4DataSvc( - "EventDataSvc", - input="output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root", -) - -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput - -podioinput = PodioInput( - "PodioReader", - collections=[ - "ECalBarrelCells", - "HCalBarrelCells", - "HCalExtBarrelCells", - "GenParticles", - "GenVertices", - ], - OutputLevel=DEBUG, -) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -164,10 +157,8 @@ OutputLevel=INFO, ) -out = PodioOutput( - "out", filename="output_BarrelTopo_50GeVe_3ev.root", OutputLevel=DEBUG -) -out.outputCommands = [ +iosvc.Output = "output_BarrelTopo_50GeVe_3ev.root" +iosvc.outputCommands = [ "drop *", "keep GenParticles", "keep GenVertices", @@ -182,19 +173,15 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True createemptycells.AuditExecute = True createTopoClusters.AuditExecute = True positionsClusterBarrel.AuditExecute = True -out.AuditExecute = True ApplicationMgr( TopAlg=[ - podioinput, createemptycells, createTopoClusters, positionsClusterBarrel, - out, ], EvtSel="NONE", EvtMax=3, diff --git a/RecCalorimeter/tests/options/runEcalSimple_ReconstructionSW_noiseFromFile.py b/RecCalorimeter/tests/options/runEcalSimple_ReconstructionSW_noiseFromFile.py index d410010ba..63e4cc1e6 100644 --- a/RecCalorimeter/tests/options/runEcalSimple_ReconstructionSW_noiseFromFile.py +++ b/RecCalorimeter/tests/options/runEcalSimple_ReconstructionSW_noiseFromFile.py @@ -1,15 +1,13 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -podioevent = k4DataSvc("EventDataSvc", input="output_ecalSim_e50GeV_1events.root") +iosvc = IOSvc() +iosvc.Input = "output_ecalSim_e50GeV_1events.root" +iosvc.CollectionNames = ["ECalHits", "ECalPositionedHits"] -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput - -podioinput = PodioInput( - "PodioReader", collections=["ECalHits", "ECalPositionedHits"], OutputLevel=DEBUG -) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -142,10 +140,8 @@ ) createclusters.clusters.Path = "caloClusters" -out = PodioOutput( - "output", filename="output_ecalReco_noiseFromFile_test.root", OutputLevel=DEBUG -) -out.outputCommands = ["keep *"] +iosvc.Output = "output_ecalReco_noiseFromFile_test.root" +iosvc.outputCommands = ["keep *"] # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -153,20 +149,16 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True createclusters.AuditExecute = True createcells.AuditExecute = True mergelayers.AuditExecute = True -out.AuditExecute = True ApplicationMgr( TopAlg=[ - podioinput, mergelayers, createcells, createemptycells, createclusters, - out, ], EvtSel="NONE", EvtMax=1, diff --git a/RecCalorimeter/tests/options/runFullCaloSystem_CorrectECalBarrelSliWinClusters.py b/RecCalorimeter/tests/options/runFullCaloSystem_CorrectECalBarrelSliWinClusters.py index d3f24be78..6e3e18954 100644 --- a/RecCalorimeter/tests/options/runFullCaloSystem_CorrectECalBarrelSliWinClusters.py +++ b/RecCalorimeter/tests/options/runFullCaloSystem_CorrectECalBarrelSliWinClusters.py @@ -21,27 +21,24 @@ num_events = 3 from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -podioevent = k4DataSvc("EventDataSvc", input="output_allCalo_reco.root") -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput +iosvc = IOSvc() +iosvc.Input = "output_allCalo_reco.root" +iosvc.CollectionNames = [ + "GenParticles", + "GenVertices", + ecalBarrelCellsName, + ecalEndcapCellsName, + ecalFwdCellsName, + "newHCalBarrelCells", + "newHCalExtBarrelCells", + hcalEndcapCellsName, + hcalFwdCellsName, +] -podioinput = PodioInput( - "PodioReader", - collections=[ - "GenParticles", - "GenVertices", - ecalBarrelCellsName, - ecalEndcapCellsName, - ecalFwdCellsName, - "newHCalBarrelCells", - "newHCalExtBarrelCells", - hcalEndcapCellsName, - hcalFwdCellsName, - ], - OutputLevel=DEBUG, -) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -139,7 +136,7 @@ audsvc.Auditors = [chra] ApplicationMgr( - TopAlg=[podioinput, createClusters, correct], + TopAlg=[createClusters, correct], EvtSel="NONE", EvtMax=num_events, ExtSvc=[podioevent, geoservice], diff --git a/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py b/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py index bc03d9971..458c0a2e6 100644 --- a/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py +++ b/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noNoise.py @@ -21,30 +21,24 @@ num_events = 3 from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput - -podioevent = k4DataSvc( - "EventDataSvc", - input="output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root", -) -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput - -podioinput = PodioInput( - "PodioReader", - collections=[ - "GenParticles", - "GenVertices", - ecalBarrelCellsName, - ecalEndcapCellsName, - ecalFwdCellsName, - hcalBarrelCellsName, - hcalExtBarrelCellsName, - hcalEndcapCellsName, - hcalFwdCellsName, - ], - OutputLevel=DEBUG, -) +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc + +iosvc = IOSvc() +iosvc.Input = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root" +iosvc.CollectionNames = [ + "GenParticles", + "GenVertices", + ecalBarrelCellsName, + ecalEndcapCellsName, + ecalFwdCellsName, + hcalBarrelCellsName, + hcalExtBarrelCellsName, + hcalEndcapCellsName, + hcalFwdCellsName, +] + +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -185,8 +179,8 @@ createClusters.clusters.Path = "CaloClusters" createClusters.clusterCells.Path = "CaloClusterCells" -out = PodioOutput("out", filename="output_allCalo_reco.root", OutputLevel=DEBUG) -out.outputCommands = ["keep *"] +iosvc.Output = "output_allCalo_reco.root" +iosvc.outputCommands = ["keep *"] # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -194,19 +188,15 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True createClusters.AuditExecute = True -out.AuditExecute = True ApplicationMgr( TopAlg=[ - podioinput, rewriteHcal, rewriteExtHcal, rewriteECalEC, rewriteHCalEC, createClusters, - out, ], EvtSel="NONE", EvtMax=num_events, diff --git a/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py b/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py index ed07e9d48..7d09c7a70 100644 --- a/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py +++ b/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py @@ -30,26 +30,17 @@ hcalFwdReadoutName = "HFwdPhiEta" from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc num_events = 3 ApplicationMgr().EvtSel = "NONE" ApplicationMgr().EvtMax = num_events ApplicationMgr().OutputLevel = DEBUG -from Configurables import k4DataSvc - -podioevent = k4DataSvc("EventDataSvc") -# produced with Reconstruction/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py -podioevent.input = "http://fccsw.web.cern.ch/fccsw/testsamples/output_fullCalo_SimAndDigi_e50GeV_3events.root" -ApplicationMgr().ExtSvc += [podioevent] - - -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput - -podioinput = PodioInput() -podioinput.collections = [ +iosvc = IOSvc() +iosvc.Input = "http://fccsw.web.cern.ch/fccsw/testsamples/output_fullCalo_SimAndDigi_e50GeV_3events.root" +iosvc.CollectionNames = [ ecalBarrelCellsName, ecalEndcapCellsName, ecalFwdCellsName, @@ -58,7 +49,9 @@ hcalEndcapCellsName, hcalFwdCellsName, ] -ApplicationMgr().TopAlg += [podioinput] + +podioevent = EventDataSvc("EventDataSvc") +ApplicationMgr().ExtSvc += [podioevent] from Configurables import GeoSvc @@ -323,11 +316,8 @@ createClusters.AuditExecute = True ApplicationMgr().TopAlg += [createClusters] -out = PodioOutput("out") -out.filename = "output_runFullCaloSystem_ReconstructionSW_noiseFromFile.root" -out.outputCommands = ["keep *"] -out.AuditExecute = True -ApplicationMgr().TopAlg += [out] +iosvc.Output = "output_runFullCaloSystem_ReconstructionSW_noiseFromFile.root" +iosvc.outputCommands = ["keep *"] # ApplicationMgr( diff --git a/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile_resegHCal.py b/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile_resegHCal.py index 2e6157e78..a9080b05d 100644 --- a/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile_resegHCal.py +++ b/RecCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile_resegHCal.py @@ -21,27 +21,22 @@ num_events = 3 from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -podioevent = k4DataSvc( - "EventDataSvc", - input="output_fullCalo_SimAndDigi_pi50GeV_" + str(num_events) + "events.root", -) -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput +iosvc = IOSvc() +iosvc.Input = "output_fullCalo_SimAndDigi_pi50GeV_" + str(num_events) + "events.root" +iosvc.CollectionNames = [ + ecalBarrelCellsName, + ecalEndcapCellsName, + ecalFwdCellsName, + hcalBarrelCellsName, + hcalExtBarrelCellsName, + hcalEndcapCellsName, + hcalFwdCellsName, +] -podioinput = PodioInput( - "PodioReader", - collections=[ - ecalBarrelCellsName, - ecalEndcapCellsName, - ecalFwdCellsName, - hcalBarrelCellsName, - hcalExtBarrelCellsName, - hcalEndcapCellsName, - hcalFwdCellsName, - ], -) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -270,8 +265,8 @@ createClusters.clusters.Path = "CaloClusters" createClusters.clusterCells.Path = "CaloClusterCells" -out = PodioOutput("out", filename="output_allCalo_reco_noise.root") -out.outputCommands = ["keep *"] +iosvc.Output = "output_allCalo_reco_noise.root" +iosvc.outputCommands = ["keep *"] # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -279,13 +274,10 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True createClusters.AuditExecute = True -out.AuditExecute = True ApplicationMgr( TopAlg=[ - podioinput, rewriteECalEC, rewriteHCalEC, positionsExtHcal, @@ -294,7 +286,6 @@ createHcalBarrelCells, createEcalEndcapCells, createClusters, - out, ], EvtSel="NONE", EvtMax=num_events, diff --git a/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py b/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py index 9666b44ce..fe89d45a7 100644 --- a/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py +++ b/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation.py @@ -10,10 +10,10 @@ from Gaudi.Configuration import * +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -from Configurables import k4DataSvc - -podioevent = k4DataSvc("EventDataSvc") +podioevent = EventDataSvc("EventDataSvc") ############################################### Particle Gun setup @@ -400,10 +400,9 @@ createHcalFwdCells.hits.Path = "mergedHCalFwdHits" createHcalFwdCells.cells.Path = "HCalFwdCells" -from Configurables import PodioOutput - -out = PodioOutput("out", OutputLevel=INFO) -out.outputCommands = [ +iosvc = IOSvc() +iosvc.Output = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root" +iosvc.outputCommands = [ "drop *", "keep ECalBarrelCells", "keep ECalEndcapCells", @@ -415,7 +414,6 @@ "keep GenParticles", "keep GenVertices", ] -out.filename = "output_fullCalo_SimAndDigi_e50GeV_" + str(num_events) + "events.root" # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -434,9 +432,6 @@ createExtHcalCells.AuditExecute = True createHcalEndcapCells.AuditExecute = True createHcalFwdCells.AuditExecute = True -out.AuditExecute = True - -from Configurables import ApplicationMgr ApplicationMgr( TopAlg=[ @@ -457,7 +452,6 @@ createHcalEndcapCells, mergelayersHcalFwd, createHcalFwdCells, - out, ], EvtSel="NONE", EvtMax=int(num_events), diff --git a/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation_resegHCal.py b/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation_resegHCal.py index 40993f496..911aeaff1 100644 --- a/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation_resegHCal.py +++ b/RecCalorimeter/tests/options/runFullCaloSystem_SimAndDigitisation_resegHCal.py @@ -10,9 +10,10 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -podioevent = k4DataSvc("EventDataSvc") +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -388,8 +389,9 @@ createHcalFwdCells.hits.Path = "mergedHCalFwdHits" createHcalFwdCells.cells.Path = "HCalFwdCells" -out = PodioOutput("out", OutputLevel=INFO) -out.outputCommands = [ +iosvc = IOSvc() +iosvc.Output = "output_fullCalo_SimAndDigi_pi50GeV_" + str(num_events) + "events.root" +iosvc.outputCommands = [ "drop *", "keep ECalBarrelCells", "keep ECalEndcapCells", @@ -402,7 +404,6 @@ "keep GenParticles", "keep GenVertices", ] -out.filename = "output_fullCalo_SimAndDigi_pi50GeV_" + str(num_events) + "events.root" # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -421,7 +422,6 @@ createExtHcalCells.AuditExecute = True createHcalEndcapCells.AuditExecute = True createHcalFwdCells.AuditExecute = True -out.AuditExecute = True ApplicationMgr( TopAlg=[ @@ -443,7 +443,6 @@ createHcalEndcapCells, mergelayersHcalFwd, createHcalFwdCells, - out, ], EvtSel="NONE", EvtMax=int(num_events), diff --git a/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py b/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py index f705f2c05..9eb0b04fa 100644 --- a/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py +++ b/RecCalorimeter/tests/options/runHcalDigitisationFlatNoise.py @@ -1,15 +1,13 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -podioevent = k4DataSvc( - "EventDataSvc", input="output_hcalSim_e50GeV_eta036_10events.root" -) - -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput +iosvc = IOSvc() +iosvc.Input = "output_hcalSim_e50GeV_eta036_10events.root" +iosvc.CollectionNames = ["HCalHits"] -podioinput = PodioInput("PodioReader", collections=["HCalHits"], OutputLevel=DEBUG) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -98,10 +96,8 @@ createcells.hits.Path = "HCalBarrelCellsStep1" createcells.cells.Path = "HCalCells" -out = PodioOutput( - "out", filename="output_HCalCells_digitisation_allCells.root", OutputLevel=DEBUG -) -out.outputCommands = ["keep *", "drop HCalBarrelCellsStep1"] +iosvc.Output = "output_HCalCells_digitisation_allCells.root" +iosvc.outputCommands = ["keep *", "drop HCalBarrelCellsStep1"] # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -109,13 +105,11 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True rewriteHCal.AuditExecute = True createcells.AuditExecute = True -out.AuditExecute = True ApplicationMgr( - TopAlg=[podioinput, rewriteHCal, createcells, out], + TopAlg=[rewriteHCal, createcells], EvtSel="NONE", EvtMax=1, ExtSvc=[podioevent, geoservice], diff --git a/RecCalorimeter/tests/options/runHcalDigitisationWithoutNoise.py b/RecCalorimeter/tests/options/runHcalDigitisationWithoutNoise.py index 4f8d971f8..6ea1892ca 100644 --- a/RecCalorimeter/tests/options/runHcalDigitisationWithoutNoise.py +++ b/RecCalorimeter/tests/options/runHcalDigitisationWithoutNoise.py @@ -1,17 +1,13 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -podioevent = k4DataSvc( - "EventDataSvc", input="output_hcalSim_e50GeV_eta036_10events.root" -) - -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput +iosvc = IOSvc() +iosvc.Input = "output_hcalSim_e50GeV_eta036_10events.root" +iosvc.CollectionNames = ["HCalHits", "ExtHCalHits"] -podioinput = PodioInput( - "PodioReader", collections=["HCalHits", "ExtHCalHits"], OutputLevel=DEBUG -) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -134,10 +130,8 @@ cells="ExtHCalCells", ) -out = PodioOutput( - "out", filename="output_HCalCells_digitisation_noNoise.root", OutputLevel=DEBUG -) -out.outputCommands = ["keep *"] +iosvc.Output = "output_HCalCells_digitisation_noNoise.root" +iosvc.outputCommands = ["keep *"] # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -145,13 +139,10 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True createHcalBarrelCells.AuditExecute = True -out.AuditExecute = True ApplicationMgr( TopAlg=[ - podioinput, resegmentHcalBarrel, resegmentHcalExtBarrel, rewriteHCal, @@ -160,7 +151,6 @@ createHcalExtBarrelTiles, createHcalBarrelCells, createHcalExtBarrelCells, - out, ], EvtSel="NONE", EvtMax=1, diff --git a/RecCalorimeter/tests/options/runJetReco.py b/RecCalorimeter/tests/options/runJetReco.py index a470522a4..d00b7e48a 100644 --- a/RecCalorimeter/tests/options/runJetReco.py +++ b/RecCalorimeter/tests/options/runJetReco.py @@ -4,7 +4,8 @@ from GaudiKernel import PhysicalConstants as constants from GaudiKernel.SystemOfUnits import MeV, GeV, tesla -from Configurables import ApplicationMgr +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc ApplicationMgr().EvtSel = "NONE" ApplicationMgr().EvtMax = 2 @@ -12,10 +13,8 @@ ApplicationMgr().StopOnSignal = True ApplicationMgr().ExtSvc += ["RndmGenSvc"] -from Configurables import k4DataSvc - ## Data service -podioevent = k4DataSvc("EventDataSvc") +podioevent = EventDataSvc("EventDataSvc") ApplicationMgr().ExtSvc += [podioevent] from Configurables import MomentumRangeParticleGun @@ -299,10 +298,9 @@ ################ Output -from Configurables import PodioOutput - -out = PodioOutput("out") -out.outputCommands = [ +iosvc = IOSvc() +iosvc.Output = "output_fullCalo_SimAndDigi.root" +iosvc.outputCommands = [ "keep *", "drop ECalBarrelHits", "drop HCal*", @@ -312,10 +310,6 @@ "drop emptyCaloCells", "drop CaloClusterCells", ] -import uuid - -out.filename = "output_fullCalo_SimAndDigi.root" -ApplicationMgr().TopAlg += [out] from Configurables import CreateCaloJet @@ -346,5 +340,4 @@ resegmentEcalBarrel.AuditExecute = True createEcalBarrelCells.AuditExecute = True # createHcalBarrelCells.AuditExecute = True -out.AuditExecute = True # ApplicationMgr().ExtSvc += [audsvc] diff --git a/RecCalorimeter/tests/options/runPreparePileup.py b/RecCalorimeter/tests/options/runPreparePileup.py index 2fdbe49f4..5cf4af435 100644 --- a/RecCalorimeter/tests/options/runPreparePileup.py +++ b/RecCalorimeter/tests/options/runPreparePileup.py @@ -1,17 +1,13 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -# v01 production - min. bias events -podioevent = k4DataSvc( - "EventDataSvc", - input="http://fccsw.web.cern.ch/fccsw/testsamples/caloCells_minBiasEvent.root", -) - -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput +iosvc = IOSvc() +iosvc.Input = "http://fccsw.web.cern.ch/fccsw/testsamples/caloCells_minBiasEvent.root" +iosvc.CollectionNames = ["ECalBarrelCells"] -podioinput = PodioInput("in", collections=["ECalBarrelCells"]) +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -94,7 +90,6 @@ ApplicationMgr( TopAlg=[ - podioinput, createemptycells, pileupEcalBarrel, ], diff --git a/RecCalorimeter/tests/options/runSiPMDualReadout.py b/RecCalorimeter/tests/options/runSiPMDualReadout.py index 2bcc49fb8..7c17ac0ba 100644 --- a/RecCalorimeter/tests/options/runSiPMDualReadout.py +++ b/RecCalorimeter/tests/options/runSiPMDualReadout.py @@ -1,23 +1,18 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -from Configurables import k4DataSvc - -dataservice = k4DataSvc("EventDataSvc", input="testIDEA_o1_v03.root") - -from Configurables import PodioInput +iosvc = IOSvc() +iosvc.Input = "testIDEA_o1_v03.root" +iosvc.CollectionNames = [ + "DRcaloSiPMreadout_scint", + "DRcaloSiPMreadout_scintContributions", + "DRcaloSiPMreadoutSimHit", + "DRcaloSiPMreadoutTimeStruct", + "DRcaloSiPMreadoutWaveLen", +] -podioinput = PodioInput( - "PodioInput", - collections=[ - "DRcaloSiPMreadout_scint", - "DRcaloSiPMreadout_scintContributions", - "DRcaloSiPMreadoutSimHit", - "DRcaloSiPMreadoutTimeStruct", - "DRcaloSiPMreadoutWaveLen", - ], - OutputLevel=DEBUG, -) +dataservice = EventDataSvc("EventDataSvc") from Configurables import GeoSvc import os @@ -298,12 +293,8 @@ scaleADC=0.00178, ) -from Configurables import PodioOutput - -podiooutput = PodioOutput( - "PodioOutput", filename="testIDEA_o1_v03_digi.root", OutputLevel=DEBUG -) -podiooutput.outputCommands = ["keep *"] +iosvc.Output = "testIDEA_o1_v03_digi.root" +iosvc.outputCommands = ["keep *"] from Configurables import HepRndm__Engine_CLHEP__RanluxEngine_ as RndmEngine @@ -318,7 +309,7 @@ rndmGenSvc = RndmGenSvc("RndmGenSvc", Engine=rndmEngine.name()) ApplicationMgr( - TopAlg=[podioinput, sipmEdep, sipmOptical, podiooutput], + TopAlg=[sipmEdep, sipmOptical], EvtSel="NONE", EvtMax=-1, ExtSvc=[rndmEngine, rndmGenSvc, dataservice, geoservice], diff --git a/RecCalorimeter/tests/options/runSiPMDualReadoutTubes.py b/RecCalorimeter/tests/options/runSiPMDualReadoutTubes.py index d02bf85d6..4084b06c6 100644 --- a/RecCalorimeter/tests/options/runSiPMDualReadoutTubes.py +++ b/RecCalorimeter/tests/options/runSiPMDualReadoutTubes.py @@ -1,30 +1,25 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr - -from Configurables import k4DataSvc - -dataservice = k4DataSvc("EventDataSvc", input="IDEA_o2_v01.root") - -from Configurables import PodioInput - -podioinput = PodioInput( - "PodioInput", - collections=[ - "DRBTScin", # collections from IDEA_o2 hadronic calo - "DRBTScinContributions", - "DRBTCher", - "DRBTCherContributions", - "DRETScinLeft", - "DRETScinLeftContributions", - "DRETScinRight", - "DRETScinRightContributions", - "DRETCherLeft", - "DRETCherLeftContributions", - "DRETCherRight", - "DRETCherRightContributions", - ], - OutputLevel=DEBUG, -) +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc + +iosvc = IOSvc() +iosvc.Input = "IDEA_o2_v01.root" +iosvc.CollectionNames = [ + "DRBTScin", # collections from IDEA_o2 hadronic calo + "DRBTScinContributions", + "DRBTCher", + "DRBTCherContributions", + "DRETScinLeft", + "DRETScinLeftContributions", + "DRETScinRight", + "DRETScinRightContributions", + "DRETCherLeft", + "DRETCherLeftContributions", + "DRETCherRight", + "DRETCherRightContributions", +] + +dataservice = EventDataSvc("EventDataSvc") # SimulateSiPMwithContrib applied sipm digitization # over the output format of the IDEA_o2 hadronic calorimeter. @@ -111,12 +106,8 @@ sipmEfficiency=[1.0, 1.0], ) -from Configurables import PodioOutput - -podiooutput = PodioOutput( - "PodioOutput", filename="IDEA_o2_v01_digi.root", OutputLevel=DEBUG -) -podiooutput.outputCommands = ["keep *"] +iosvc.Output = "IDEA_o2_v01_digi.root" +iosvc.outputCommands = ["keep *"] from Configurables import HepRndm__Engine_CLHEP__RanluxEngine_ as RndmEngine @@ -132,14 +123,12 @@ ApplicationMgr( TopAlg=[ - podioinput, sipmContribBTScin, sipmContribETScinLeft, sipmContribETScinRight, sipmContribBTCher, sipmContribETCherLeft, sipmContribETCherRight, - podiooutput, ], EvtSel="NONE", EvtMax=-1, diff --git a/RecCalorimeter/tests/options/runTruthJetReco.py b/RecCalorimeter/tests/options/runTruthJetReco.py index 367d4f5a5..810ff07ca 100644 --- a/RecCalorimeter/tests/options/runTruthJetReco.py +++ b/RecCalorimeter/tests/options/runTruthJetReco.py @@ -4,7 +4,8 @@ from GaudiKernel import PhysicalConstants as constants from GaudiKernel.SystemOfUnits import MeV, GeV, tesla -from Configurables import ApplicationMgr +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr ApplicationMgr().EvtSel = "NONE" ApplicationMgr().EvtMax = 2 @@ -12,10 +13,8 @@ ApplicationMgr().StopOnSignal = True ApplicationMgr().ExtSvc += ["RndmGenSvc"] -from Configurables import k4DataSvc - ## Data service -podioevent = k4DataSvc("EventDataSvc") +podioevent = EventDataSvc("EventDataSvc") ApplicationMgr().ExtSvc += [podioevent] from Configurables import MomentumRangeParticleGun diff --git a/RecFCCeeCalorimeter/tests/options/IDEA_o1_v03_reco.py b/RecFCCeeCalorimeter/tests/options/IDEA_o1_v03_reco.py index 58ff8611c..b468375ba 100644 --- a/RecFCCeeCalorimeter/tests/options/IDEA_o1_v03_reco.py +++ b/RecFCCeeCalorimeter/tests/options/IDEA_o1_v03_reco.py @@ -1,9 +1,11 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc -from Configurables import k4DataSvc +iosvc = IOSvc() +iosvc.Input = "testIDEA_o1_v03_digi.root" -dataservice = k4DataSvc("EventDataSvc", input="testIDEA_o1_v03_digi.root") +dataservice = EventDataSvc("EventDataSvc") # detector geometry # if K4GEO is empty, this should use relative path to working directory @@ -35,19 +37,13 @@ geoservice.OutputLevel = INFO -from Configurables import PodioInput - -podioinput = PodioInput( - "PodioInput", - collections=[ - "DRcaloSiPMreadout_scint", - "DRcaloSiPMreadout_scintContributions", - "DRcaloSiPMreadoutSimHit", - "DRcaloSiPMreadoutDigiHit_scint", - "DRcaloSiPMreadoutDigiHit", - ], - OutputLevel=DEBUG, -) +iosvc.CollectionNames = [ + "DRcaloSiPMreadout_scint", + "DRcaloSiPMreadout_scintContributions", + "DRcaloSiPMreadoutSimHit", + "DRcaloSiPMreadoutDigiHit_scint", + "DRcaloSiPMreadoutDigiHit", +] # use const noise tool for the moment from Configurables import ConstNoiseTool @@ -83,15 +79,11 @@ OutputLevel=INFO, ) -from Configurables import PodioOutput - -podiooutput = PodioOutput( - "PodioOutput", filename="testIDEA_o1_v03_reco.root", OutputLevel=DEBUG -) -podiooutput.outputCommands = ["keep *"] +iosvc.Output = "testIDEA_o1_v03_reco.root" +iosvc.outputCommands = ["keep *"] ApplicationMgr( - TopAlg=[podioinput, topoClusterAll, podiooutput], + TopAlg=[topoClusterAll], EvtSel="NONE", EvtMax=-1, ExtSvc=[dataservice, geoservice], diff --git a/RecFCCeeCalorimeter/tests/options/fcc_ee_caloBenchmarkCalibration.py b/RecFCCeeCalorimeter/tests/options/fcc_ee_caloBenchmarkCalibration.py index 0d96a82de..2adc7df26 100644 --- a/RecFCCeeCalorimeter/tests/options/fcc_ee_caloBenchmarkCalibration.py +++ b/RecFCCeeCalorimeter/tests/options/fcc_ee_caloBenchmarkCalibration.py @@ -4,7 +4,8 @@ from Gaudi.Configuration import INFO, WARNING # Application manager -from Configurables import ApplicationMgr +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr ApplicationMgr().EvtSel = "NONE" ApplicationMgr().EvtMax = 2 @@ -12,9 +13,7 @@ # Data service -from Configurables import k4DataSvc - -DATASERVICE = k4DataSvc("EventDataSvc") +DATASERVICE = EventDataSvc("EventDataSvc") ApplicationMgr().ExtSvc += [DATASERVICE] diff --git a/RecFCCeeCalorimeter/tests/options/runCaloSim.py b/RecFCCeeCalorimeter/tests/options/runCaloSim.py index 00eb536a7..711aab5ce 100644 --- a/RecFCCeeCalorimeter/tests/options/runCaloSim.py +++ b/RecFCCeeCalorimeter/tests/options/runCaloSim.py @@ -4,7 +4,8 @@ from GaudiKernel import PhysicalConstants as constants from GaudiKernel.SystemOfUnits import MeV, GeV, tesla -from Configurables import ApplicationMgr +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc ApplicationMgr().EvtSel = "NONE" ApplicationMgr().EvtMax = 2 @@ -12,10 +13,8 @@ ApplicationMgr().StopOnSignal = True ApplicationMgr().ExtSvc += ["RndmGenSvc"] -from Configurables import k4DataSvc - ## Data service -podioevent = k4DataSvc("EventDataSvc") +podioevent = EventDataSvc("EventDataSvc") ApplicationMgr().ExtSvc += [podioevent] from Configurables import MomentumRangeParticleGun @@ -348,10 +347,9 @@ ApplicationMgr().TopAlg += [correctCaloClusters] ################ Output -from Configurables import PodioOutput - -out = PodioOutput("out") -out.outputCommands = [ +iosvc = IOSvc() +iosvc.Output = "output_fullCalo_SimAndDigi.root" +iosvc.outputCommands = [ "keep *", "drop ECalBarrelHits", "drop HCal*", @@ -361,10 +359,6 @@ "drop emptyCaloCells", "drop CaloClusterCells", ] -import uuid - -out.filename = "output_fullCalo_SimAndDigi.root" -ApplicationMgr().TopAlg += [out] # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -379,5 +373,4 @@ resegmentEcalBarrel.AuditExecute = True createEcalBarrelCells.AuditExecute = True createHcalBarrelCells.AuditExecute = True -out.AuditExecute = True # ApplicationMgr().ExtSvc += [audsvc] diff --git a/RecFCCeeCalorimeter/tests/options/runCaloXTalkNeighbours.py b/RecFCCeeCalorimeter/tests/options/runCaloXTalkNeighbours.py index 1bf64d712..e9d487f7d 100644 --- a/RecFCCeeCalorimeter/tests/options/runCaloXTalkNeighbours.py +++ b/RecFCCeeCalorimeter/tests/options/runCaloXTalkNeighbours.py @@ -1,6 +1,6 @@ from Configurables import GeoSvc -from Configurables import ApplicationMgr from Configurables import CreateFCCeeCaloXTalkNeighbours +from k4FWCore import ApplicationMgr import os from Gaudi.Configuration import INFO, DEBUG diff --git a/RecFCCeeCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py b/RecFCCeeCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py index 5452c8439..01d3a64d8 100644 --- a/RecFCCeeCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py +++ b/RecFCCeeCalorimeter/tests/options/runFullCaloSystem_ReconstructionSW_noiseFromFile.py @@ -8,21 +8,18 @@ from Gaudi.Configuration import * -from Configurables import ApplicationMgr, k4DataSvc, PodioOutput +from Configurables import EventDataSvc +from k4FWCore import ApplicationMgr, IOSvc import sys -podioevent = k4DataSvc("EventDataSvc") -podioevent.input = "output_fullCalo_SimAndDigi.root" -# reads HepMC text file and write the HepMC::GenEvent to the data service -from Configurables import PodioInput - -podioinput = PodioInput( - "PodioReader", - collections=[ - ecalBarrelCellsName, - "GenParticles", - ], -) +iosvc = IOSvc() +iosvc.Input = "output_fullCalo_SimAndDigi.root" +iosvc.CollectionNames = [ + ecalBarrelCellsName, + "GenParticles", +] + +podioevent = EventDataSvc("EventDataSvc") from Configurables import GeoSvc @@ -139,11 +136,7 @@ createClusters.clusters.Path = "CaloClustersFinal" createClusters.clusterCells.Path = "CaloClusterCellsFinal" -import uuid - -out = PodioOutput( - "out", filename="output_allCalo_reco_noise_" + uuid.uuid4().hex + ".root" -) +iosvc.Output = "output_allCalo_reco_noise.root" # CPU information from Configurables import AuditorSvc, ChronoAuditor @@ -151,12 +144,10 @@ chra = ChronoAuditor() audsvc = AuditorSvc() audsvc.Auditors = [chra] -podioinput.AuditExecute = True createClusters.AuditExecute = True -out.AuditExecute = True ApplicationMgr( - TopAlg=[podioinput, createemptycells, createEcalBarrelCells, createClusters, out], + TopAlg=[createemptycells, createEcalBarrelCells, createClusters], EvtSel="NONE", EvtMax=2, ExtSvc=[podioevent, geoservice], diff --git a/RecFCChhCalorimeter/tests/options/neighbours.py b/RecFCChhCalorimeter/tests/options/neighbours.py index 68c697f4b..11dea0a44 100644 --- a/RecFCChhCalorimeter/tests/options/neighbours.py +++ b/RecFCChhCalorimeter/tests/options/neighbours.py @@ -43,7 +43,7 @@ ) # ApplicationMgr -from Configurables import ApplicationMgr +from k4FWCore import ApplicationMgr ApplicationMgr( TopAlg=[], diff --git a/RecFCChhCalorimeter/tests/options/noiseLevelPerCell.py b/RecFCChhCalorimeter/tests/options/noiseLevelPerCell.py index 924655fe0..fbadfbd50 100644 --- a/RecFCChhCalorimeter/tests/options/noiseLevelPerCell.py +++ b/RecFCChhCalorimeter/tests/options/noiseLevelPerCell.py @@ -106,7 +106,7 @@ ) # ApplicationMgr -from Configurables import ApplicationMgr +from k4FWCore import ApplicationMgr ApplicationMgr( TopAlg=[],