IAP GITLAB

Skip to content
Snippets Groups Projects
Commit f1e4c409 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

Merge branch 'pdxml_reader' into 'master'

hardened ParticleData.xml readout against double definition

See merge request AirShowerPhysics/corsika!170
parents 3deb039c 6ed5703b
No related branches found
No related tags found
No related merge requests found
......@@ -172,9 +172,10 @@ def read_pythia_db(filename, particle_db, classnames):
else:
c_id = c_identifier_camel(name) # the camel case names
hadron = False
if abs(pdg) > 100:
hadron = True
hadron =abs(pdg) > 100
if c_id in particle_db.keys():
raise RuntimeError("particle '{:s}' already known (new PDG id {:d}, stored PDG id: {:d})".format(c_id, pdg, particle_db[c_id]['pdg']))
particle_db[c_id] = {
"name" : name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment