|
[Rivet-svn] r2502 - in trunk: include/Rivet/Projections src/Coreblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Jun 22 13:43:24 BST 2010
Author: buckley Date: Tue Jun 22 13:43:25 2010 New Revision: 2502 Log: Fixing (Const)LossyFinalState bad_cast bug. Lovely, lovely C++... Modified: trunk/include/Rivet/Projections/ConstLossyFinalState.hh trunk/include/Rivet/Projections/LossyFinalState.hh trunk/src/Core/ProjectionHandler.cc Modified: trunk/include/Rivet/Projections/ConstLossyFinalState.hh ============================================================================== --- trunk/include/Rivet/Projections/ConstLossyFinalState.hh Tue Jun 22 10:35:14 2010 (r2501) +++ trunk/include/Rivet/Projections/ConstLossyFinalState.hh Tue Jun 22 13:43:25 2010 (r2502) @@ -65,7 +65,7 @@ } /// Clone on the heap. - virtual const Projection* clone() { + virtual const Projection* clone() const { return new ConstLossyFinalState(*this); } Modified: trunk/include/Rivet/Projections/LossyFinalState.hh ============================================================================== --- trunk/include/Rivet/Projections/LossyFinalState.hh Tue Jun 22 10:35:14 2010 (r2501) +++ trunk/include/Rivet/Projections/LossyFinalState.hh Tue Jun 22 13:43:25 2010 (r2502) @@ -21,7 +21,7 @@ //@{ /// Constructor from FinalState. - LossyFinalState(const FinalState& fsp, const FILTER& filter) + LossyFinalState(const FinalState& fsp, FILTER filter) : _filter(filter) { setName("LossyFinalState"); @@ -29,7 +29,7 @@ } /// Stand-alone constructor. Initialises the base FinalState projection. - LossyFinalState(const FILTER& filter, + LossyFinalState(FILTER filter, double mineta = -MAXRAPIDITY, double maxeta = MAXRAPIDITY, double minpt = 0.0) @@ -43,7 +43,7 @@ virtual ~LossyFinalState() { } /// Clone on the heap. - virtual const Projection* clone() { + virtual const Projection* clone() const { return new LossyFinalState<FILTER>(*this); } Modified: trunk/src/Core/ProjectionHandler.cc ============================================================================== --- trunk/src/Core/ProjectionHandler.cc Tue Jun 22 10:35:14 2010 (r2501) +++ trunk/src/Core/ProjectionHandler.cc Tue Jun 22 13:43:25 2010 (r2502) @@ -104,6 +104,7 @@ getLog() << Log::TRACE << "Cloning projection " << proj.name() << " from " << &proj << endl; const Projection* newproj = proj.clone(); getLog() << Log::TRACE << "Cloned projection " << proj.name() << " at " << newproj << endl; + getLog() << Log::TRACE << "Clone types " << typeid(proj).name() << " -> " << typeid(newproj).name() << endl; // Copy all the child ProjHandles when cloning, since otherwise links to "stack parents" // will be generated by their children, without any connection to the cloned parent
More information about the Rivet-svn mailing list |