Skip to content

Commit

Permalink
Make PythiaDecays.h a standalone header.
Browse files Browse the repository at this point in the history
PythiaDecays.h currently doesn't compile on its own because we create
a std::vector of RawParticle, which is only a forward declared class.
This is already a border-case and *can* compile as long as we don't
touch the vector itself in the rest of the header code.

However, the destructor that is destroying the vector as part of
the header code and is therefore is accessing it, so we get in the
modules case compiler errors for this header.

This patch just moves the constructor to the cpp file so that we
generate the destruction code in the source file where we actually
have the definition of RawParticle available.
  • Loading branch information
Teemperor committed May 17, 2017
1 parent e0c1840 commit bc9a52e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FastSimulation/ParticleDecay/interface/PythiaDecays.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PythiaDecays
public:

PythiaDecays();
~PythiaDecays(){};
~PythiaDecays();
const DaughterParticleList & particleDaughters(ParticlePropagator& particle, CLHEP::HepRandomEngine*);

private:
Expand Down
4 changes: 4 additions & 0 deletions FastSimulation/ParticleDecay/src/PythiaDecays.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ PythiaDecays::PythiaDecays()
}
}


PythiaDecays::~PythiaDecays() {
}

const DaughterParticleList&
PythiaDecays::particleDaughters(ParticlePropagator& particle, CLHEP::HepRandomEngine* engine)
{
Expand Down

0 comments on commit bc9a52e

Please sign in to comment.