Skip to content

Commit 0549de7

Browse files
committed
ddsim: use shared-access-if-MT for all generators with input file
1 parent cf8e470 commit 0549de7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

DDG4/python/DDSim/DD4hepSimulation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,17 +378,17 @@ def __setupGeneratorActions(self, kernel, geant4):
378378

379379
for index, inputFile in enumerate(self.inputFiles, start=start):
380380
if inputFile.endswith(".slcio"):
381-
gen = DDG4.GeneratorAction(kernel, "LCIOInputAction/LCIO%d" % index)
381+
gen = DDG4.GeneratorAction(kernel, "LCIOInputAction/LCIO%d" % index, shared=shared)
382382
gen.Parameters = self.lcio.getParameters()
383383
gen.Input = "LCIOFileReader|" + inputFile
384384
elif inputFile.endswith(".stdhep"):
385-
gen = DDG4.GeneratorAction(kernel, "LCIOInputAction/STDHEP%d" % index)
385+
gen = DDG4.GeneratorAction(kernel, "LCIOInputAction/STDHEP%d" % index, shared=shared)
386386
gen.Input = "LCIOStdHepReader|" + inputFile
387387
elif inputFile.endswith(".HEPEvt"):
388-
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/HEPEvt%d" % index)
388+
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/HEPEvt%d" % index, shared=shared)
389389
gen.Input = "Geant4EventReaderHepEvtShort|" + inputFile
390390
elif inputFile.endswith(".hepevt"):
391-
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/hepevt%d" % index)
391+
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/hepevt%d" % index, shared=shared)
392392
gen.Input = "Geant4EventReaderHepEvtLong|" + inputFile
393393
elif inputFile.endswith(tuple([".hepmc"] + HEPMC3_SUPPORTED_EXTENSIONS)):
394394
if self.hepmc3.useHepMC3:
@@ -399,12 +399,12 @@ def __setupGeneratorActions(self, kernel, geant4):
399399
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/hepmc%d" % index, shared=shared)
400400
gen.Input = "Geant4EventReaderHepMC|" + inputFile
401401
elif inputFile.endswith(".pairs"):
402-
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/GuineaPig%d" % index)
402+
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/GuineaPig%d" % index, shared=shared)
403403
gen.Input = "Geant4EventReaderGuineaPig|" + inputFile
404404
gen.Parameters = self.guineapig.getParameters()
405405
elif inputFile.endswith(tuple(EDM4HEP_INPUT_EXTENSIONS)):
406406
# EDM4HEP must come after HEPMC3 because of .root also part of hepmc3 extensions
407-
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/EDM4hep%d" % index)
407+
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/EDM4hep%d" % index, shared=shared)
408408
gen.Input = "EDM4hepFileReader|" + inputFile
409409
else:
410410
# this should never happen because we already check at the top, but in case of some LogicError...

0 commit comments

Comments
 (0)