Skip to content

Commit 0e25341

Browse files
committed
ddsim: use shared-access-if-MT for all generators with input file
1 parent f70fb63 commit 0e25341

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

DDG4/python/DDSim/DD4hepSimulation.py

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

380380
for index, inputFile in enumerate(self.inputFiles, start=start):
381381
if inputFile.endswith(".slcio"):
382-
gen = DDG4.GeneratorAction(kernel, "LCIOInputAction/LCIO%d" % index)
382+
gen = DDG4.GeneratorAction(kernel, "LCIOInputAction/LCIO%d" % index, shared=shared)
383383
gen.Parameters = self.lcio.getParameters()
384384
gen.Input = "LCIOFileReader|" + inputFile
385385
elif inputFile.endswith(".stdhep"):
386-
gen = DDG4.GeneratorAction(kernel, "LCIOInputAction/STDHEP%d" % index)
386+
gen = DDG4.GeneratorAction(kernel, "LCIOInputAction/STDHEP%d" % index, shared=shared)
387387
gen.Input = "LCIOStdHepReader|" + inputFile
388388
elif inputFile.endswith(".HEPEvt"):
389-
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/HEPEvt%d" % index)
389+
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/HEPEvt%d" % index, shared=shared)
390390
gen.Input = "Geant4EventReaderHepEvtShort|" + inputFile
391391
elif inputFile.endswith(".hepevt"):
392-
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/hepevt%d" % index)
392+
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/hepevt%d" % index, shared=shared)
393393
gen.Input = "Geant4EventReaderHepEvtLong|" + inputFile
394394
elif inputFile.endswith(tuple([".hepmc"] + HEPMC3_SUPPORTED_EXTENSIONS)):
395395
if self.hepmc3.useHepMC3:
@@ -400,12 +400,12 @@ def __setupGeneratorActions(self, kernel, geant4):
400400
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/hepmc%d" % index, shared=shared)
401401
gen.Input = "Geant4EventReaderHepMC|" + inputFile
402402
elif inputFile.endswith(".pairs"):
403-
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/GuineaPig%d" % index)
403+
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/GuineaPig%d" % index, shared=shared)
404404
gen.Input = "Geant4EventReaderGuineaPig|" + inputFile
405405
gen.Parameters = self.guineapig.getParameters()
406406
elif inputFile.endswith(tuple(EDM4HEP_INPUT_EXTENSIONS)):
407407
# EDM4HEP must come after HEPMC3 because of .root also part of hepmc3 extensions
408-
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/EDM4hep%d" % index)
408+
gen = DDG4.GeneratorAction(kernel, "Geant4InputAction/EDM4hep%d" % index, shared=shared)
409409
gen.Input = "EDM4hepFileReader|" + inputFile
410410
else:
411411
# this should never happen because we already check at the top, but in case of some LogicError...

0 commit comments

Comments
 (0)