Skip to content

Draft: Reproducer for ParticleGun merge issue in CA

During the process of migrating Generators configuration to ComponentAccumulator it was noticed that currently it is not possible to merge/de-duplicate two PyAthena components with the same name. This merge request contains a simple reproducer using the ParticleGun PyAthena Algorithm.

Example error message from running ParticleGunConfig_test.py

Traceback (most recent call last):
  File "/home/jchapman/athena/Generators/ParticleGun/test/ParticleGunConfig_test.py", line 29, in <module>
    cfg.merge(ParticleGunBaseCfg(flags))
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-02-07T2101/Athena/24.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/ComponentAccumulator.py", line 895, in merge
    mergeSequences(ourSeq, otherSeq)
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-02-07T2101/Athena/24.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/ComponentAccumulator.py", line 864, in mergeSequences
    deduplicateOne(self._algorithms[c.name], c)
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-02-07T2101/Athena/24.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/Deduplication.py", line 56, in deduplicateOne
    raiseWithCurrentContext(exception)
  File "/cvmfs/atlas-nightlies.cern.ch/repo/sw/main_Athena_x86_64-el9-gcc13-opt/2024-02-07T2101/Athena/24.0.23/InstallArea/x86_64-el9-gcc13-opt/python/AthenaConfiguration/DebuggingContext.py", line 48, in raiseWithCurrentContext
    raise type(exception)(str(exception) + '\nWith the context:\n{}'.format(Context.complete()) )
AttributeError: '<class 'ParticleGun.ParticleGun'>' object has no attribute 'merge'
With the context:
While merging sequences adding incoming algorithm : ParticleGun : Unknown context (enable it with ComponentAccumulator.debugMode = "trackCA trackEventAlgo etc. see ComponentAccumulator documentation")
While merging sequences adding to existing algorithm : ParticleGun : Unknown context (enable it with ComponentAccumulator.debugMode = "trackCA trackEventAlgo etc. see ComponentAccumulator documentation")
Edited by John Derek Chapman

Merge request reports

Loading