From bc9a52ed032758bcae2b03492532218e1dba46c9 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Wed, 17 May 2017 08:38:05 +0200 Subject: [PATCH] Make PythiaDecays.h a standalone header. 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. --- FastSimulation/ParticleDecay/interface/PythiaDecays.h | 2 +- FastSimulation/ParticleDecay/src/PythiaDecays.cc | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/FastSimulation/ParticleDecay/interface/PythiaDecays.h b/FastSimulation/ParticleDecay/interface/PythiaDecays.h index 7bbf3f396919e..c10eb4aa01c46 100644 --- a/FastSimulation/ParticleDecay/interface/PythiaDecays.h +++ b/FastSimulation/ParticleDecay/interface/PythiaDecays.h @@ -30,7 +30,7 @@ class PythiaDecays public: PythiaDecays(); - ~PythiaDecays(){}; + ~PythiaDecays(); const DaughterParticleList & particleDaughters(ParticlePropagator& particle, CLHEP::HepRandomEngine*); private: diff --git a/FastSimulation/ParticleDecay/src/PythiaDecays.cc b/FastSimulation/ParticleDecay/src/PythiaDecays.cc index fe0063aaad6f9..7a459c31e9f06 100644 --- a/FastSimulation/ParticleDecay/src/PythiaDecays.cc +++ b/FastSimulation/ParticleDecay/src/PythiaDecays.cc @@ -26,6 +26,10 @@ PythiaDecays::PythiaDecays() } } + +PythiaDecays::~PythiaDecays() { +} + const DaughterParticleList& PythiaDecays::particleDaughters(ParticlePropagator& particle, CLHEP::HepRandomEngine* engine) {