Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
VinInn committed Dec 4, 2015
1 parent 676ab7c commit c23a3fa
Show file tree
Hide file tree
Showing 23 changed files with 11 additions and 82 deletions.
2 changes: 0 additions & 2 deletions DataFormats/CaloTowers/interface/CaloTower.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ class CaloTower : public reco::LeafCandidate {
// setters
void addConstituent( DetId id ) { constituents_.push_back( id ); }
void addConstituents( const std::vector<DetId>& ids );
#if defined(__GXX_EXPERIMENTAL_CXX0X__)
void setConstituents( std::vector<DetId>&& ids ) { constituents_=std::move(ids);}
#endif

void setEcalTime(int t) { ecalTime_ = t; };
void setHcalTime(int t) { hcalTime_ = t; };
Expand Down
4 changes: 0 additions & 4 deletions DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,14 @@ class DeepCopyPointer {
return *this;
}

#if defined( __GXX_EXPERIMENTAL_CXX0X__)
// straight from http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2027.html

DeepCopyPointer( DeepCopyPointer&& other) : theData(other.theData) {
other.theData=0;
}

DeepCopyPointer& operator=( DeepCopyPointer&& other) {
std::swap(theData,other.theData);
return *this;
}
#endif


/// Assing a new bare pointer to this DeepCopyPointer, taking ownership of it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,14 @@ class DeepCopyPointerByClone {
return *this;
}

#if defined( __GXX_EXPERIMENTAL_CXX0X__)
// straight from http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2027.html

DeepCopyPointerByClone( DeepCopyPointerByClone&& other) : theData(other.theData) {
other.theData=0;
}

DeepCopyPointerByClone& operator=( DeepCopyPointerByClone&& other) {
std::swap(theData,other.theData);
return *this;
}
#endif


T& operator*() { return *theData;}
Expand Down
2 changes: 1 addition & 1 deletion RecoCaloTools/Navigation/interface/CaloNavigator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "FWCore/Utilities/interface/GCC11Compatibility.h"

template <class T, class TOPO=CaloSubdetectorTopology>
class CaloNavigator GCC11_FINAL {
class CaloNavigator final {
public:

CaloNavigator(const T& home, const TOPO * topology) : myTopology_(topology)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

class MuonTransientTrackingRecHit final : public GenericTransientTrackingRecHit{
public:
#if defined( __GXX_EXPERIMENTAL_CXX0X__)
using MuonRecHitPointer = std::shared_ptr<MuonTransientTrackingRecHit>;
using ConstMuonRecHitPointer = std::shared_ptr<MuonTransientTrackingRecHit const>;

#else
typedef MuonTransientTrackingRecHit * MuonRecHitPointer;
typedef MuonTransientTrackingRecHit const * ConstMuonRecHitPointer;
#endif

// typedef ReferenceCountingPointer<MuonTransientTrackingRecHit> MuonRecHitPointer;
// typedef ConstReferenceCountingPointer<MuonTransientTrackingRecHit> ConstMuonRecHitPointer;
typedef std::vector<MuonRecHitPointer> MuonRecHitContainer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class SumX0AtEtaDataProvider;
class MSLayersKeeperX0Averaged;

class dso_hidden MSLayersKeeperX0AtEta GCC11_FINAL : public MSLayersKeeper {
class dso_hidden MSLayersKeeperX0AtEta final : public MSLayersKeeper {
public:
MSLayersKeeperX0AtEta() : isInitialised(false) { }
~MSLayersKeeperX0AtEta() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "MSLayersKeeper.h"
#include "FWCore/Framework/interface/EventSetup.h"
class dso_hidden MSLayersKeeperX0Averaged GCC11_FINAL : public MSLayersKeeper {
class dso_hidden MSLayersKeeperX0Averaged final : public MSLayersKeeper {
public:
MSLayersKeeperX0Averaged() : isInitialised(false) { }
virtual ~MSLayersKeeperX0Averaged() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "MSLayersKeeper.h"
#include "MultipleScatteringGeometry.h"
#include "FWCore/Framework/interface/EventSetup.h"
class dso_hidden MSLayersKeeperX0DetLayer GCC11_FINAL : public MSLayersKeeper {
class dso_hidden MSLayersKeeperX0DetLayer final : public MSLayersKeeper {
public:
MSLayersKeeperX0DetLayer() : isInitialised(false) { }
virtual ~MSLayersKeeperX0DetLayer() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
#include "RecoVertex/VertexPrimitives/interface/VertexException.h"

#if defined( __GXX_EXPERIMENTAL_CXX0X__)
// this is generic: to be moved elsewhere
#include<tuple>
#include<functional>
Expand Down Expand Up @@ -216,6 +215,4 @@ class CombinedKinematicConstraintT : public MultiTrackKinematicConstraintT<NTRK,

};

#endif // __GXX_EXPERIMENTAL_CXX0X__

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ PrimaryVertexProducer::PrimaryVertexProducer(const edm::ParameterSet& conf)
theTrackClusterizer = new DAClusterizerInZ(conf.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<edm::ParameterSet>("TkDAClusParameters"));
}
// provide the vectorized version of the clusterizer, if supported by the build
#ifdef __GXX_EXPERIMENTAL_CXX0X__
else if(clusteringAlgorithm == "DA_vect") {
theTrackClusterizer = new DAClusterizerInZ_vect(conf.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<edm::ParameterSet>("TkDAClusParameters"));
}
#endif


else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ PrimaryVertexProducerAlgorithm::PrimaryVertexProducerAlgorithm(const edm::Parame
theTrackClusterizer = new DAClusterizerInZ(conf.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<edm::ParameterSet>("TkDAClusParameters"));
}
// provide the vectorized version of the clusterizer, if supported by the build
#ifdef __GXX_EXPERIMENTAL_CXX0X__
else if(clusteringAlgorithm == "DA_vect") {
theTrackClusterizer = new DAClusterizerInZ_vect(conf.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<edm::ParameterSet>("TkDAClusParameters"));
}
#endif


else{
Expand Down
2 changes: 1 addition & 1 deletion TrackPropagation/RungeKutta/src/CartesianLorentzForce.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/// Derivative calculation for the 6D cartesian case.

class dso_internal CartesianLorentzForce GCC11_FINAL : public RKDerivative<double,6> {
class dso_internal CartesianLorentzForce final : public RKDerivative<double,6> {
public:

typedef RKDerivative< double,6> Base;
Expand Down
2 changes: 1 addition & 1 deletion TrackPropagation/RungeKutta/src/CurvilinearLorentzForce.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class RKLocalFieldProvider;

template <typename T, int N>
class dso_internal CurvilinearLorentzForce GCC11_FINAL : public RKDerivative<T,N> {
class dso_internal CurvilinearLorentzForce final : public RKDerivative<T,N> {
public:

typedef RKDerivative<T,N> Base;
Expand Down
2 changes: 1 addition & 1 deletion TrackPropagation/RungeKutta/src/CylindricalLorentzForce.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class RKLocalFieldProvider;

template <typename T, int N>
class dso_internal CylindricalLorentzForce GCC11_FINAL : public RKDerivative<T,N> {
class dso_internal CylindricalLorentzForce final : public RKDerivative<T,N> {
public:

typedef RKDerivative<T,N> Base;
Expand Down
2 changes: 1 addition & 1 deletion TrackPropagation/RungeKutta/src/RKAdaptiveSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
template <typename T,
template <typename,int> class StepWithPrec,
int N>
class dso_internal RKAdaptiveSolver GCC11_FINAL : public RKSolver<T,N> {
class dso_internal RKAdaptiveSolver final : public RKSolver<T,N> {
public:

typedef RKSolver<T,N> Base;
Expand Down
2 changes: 1 addition & 1 deletion TrackPropagation/RungeKutta/src/RKCartesianDistance.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/// Estimator of the distance between two state vectors, e.g. for convergence test

class dso_internal RKCartesianDistance GCC11_FINAL : public RKDistance<double,6> {
class dso_internal RKCartesianDistance final : public RKDistance<double,6> {
public:

typedef double Scalar;
Expand Down
2 changes: 1 addition & 1 deletion TrackPropagation/RungeKutta/src/RKCylindricalDistance.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "CylindricalState.h"

template <typename T, int N>
class dso_internal RKCylindricalDistance GCC11_FINAL : public RKDistance<T,N> {
class dso_internal RKCylindricalDistance final : public RKDistance<T,N> {
public:

typedef T Scalar;
Expand Down
5 changes: 0 additions & 5 deletions TrackingTools/DetLayers/interface/DetGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class DetGroupElement {
DetGroupElement( const Det* d, const TrajectoryStateOnSurface& s) :
det_(d), state_(s) {}

#if defined( __GXX_EXPERIMENTAL_CXX0X__)
DetGroupElement(DetGroupElement const & rhs) : det_(rhs.det_), state_(rhs.state_){}
DetGroupElement(DetGroupElement && rhs) noexcept : det_(rhs.det_), state_(std::move(rhs.state_)){}
DetGroupElement & operator=(DetGroupElement const & rhs) {
Expand All @@ -35,8 +34,6 @@ class DetGroupElement {
DetGroupElement( const Det* d, TrajectoryStateOnSurface&& s) noexcept :
det_(d), state_(std::move(s)) {}

#endif

const Det* det() const {return det_;}
const TrajectoryStateOnSurface& trajectoryState() const {return state_;}

Expand All @@ -55,7 +52,6 @@ class DetGroup : public std::vector< DetGroupElement> {
typedef DetGroupElement::DetWithState DetWithState;

DetGroup() {}
#if defined( __GXX_EXPERIMENTAL_CXX0X__)
DetGroup(DetGroup const & rhs) : Base(rhs), index_(rhs.index_), indexSize_(rhs.indexSize_) {}
DetGroup(DetGroup && rhs) noexcept : Base(std::forward<Base>(rhs)), index_(rhs.index_), indexSize_(rhs.indexSize_) {}
DetGroup & operator=(DetGroup const & rhs) {
Expand All @@ -70,7 +66,6 @@ class DetGroup : public std::vector< DetGroupElement> {
indexSize_ = rhs.indexSize_;
return *this;
}
#endif


DetGroup(int ind, int indSize) : index_(ind), indexSize_(indSize) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ class TrajectoryMeasurementGroup {
TrajectoryMeasurementGroup( const std::vector<TrajectoryMeasurement>& meas,
const DetGroup& dg) : measurements_(meas), detGroup_(dg) {}

#if defined( __GXX_EXPERIMENTAL_CXX0X__)
TrajectoryMeasurementGroup(std::vector<TrajectoryMeasurement>&& meas,
const DetGroup& dg) : measurements_(std::move(meas)), detGroup_(dg) {}
TrajectoryMeasurementGroup(std::vector<TrajectoryMeasurement>&& meas,
DetGroup&& dg) : measurements_(std::move(meas)), detGroup_(std::move(dg)) {}

#endif

const std::vector<TrajectoryMeasurement>& measurements() const {return measurements_;}
std::vector<TrajectoryMeasurement>& measurements() {return measurements_;}
const DetGroup& detGroup() const {return detGroup_;}
Expand Down
17 changes: 0 additions & 17 deletions TrackingTools/PatternTools/interface/Trajectory.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,8 @@ class Trajectory
public:

typedef std::vector<TrajectoryMeasurement> DataContainer;
#if defined( __GXX_EXPERIMENTAL_CXX0X__)
using ConstRecHitContainer = TrackingRecHit::ConstRecHitContainer;
using RecHitContainer = ConstRecHitContainer;
#else
typedef TrackingRecHit::ConstRecHitContainer ConstRecHitContainer;
typedef ConstRecHitContainer RecHitContainer;
#endif

/** Default constructor of an empty trajectory with undefined seed and
* undefined direction. This constructor is necessary in order to transiently
Expand Down Expand Up @@ -160,8 +155,6 @@ class Trajectory
{}


#if defined( __GXX_EXPERIMENTAL_CXX0X__)

Trajectory(Trajectory const & rh) = default;
Trajectory & operator=(Trajectory const & rh) = default;

Expand Down Expand Up @@ -205,12 +198,6 @@ class Trajectory

}

#else
// private:
// Trajectory(Trajectory const & rh){}
// Trajectory & operator=(Trajectory const & rh){ return *this;}
// public:
#endif

/** Reserves space in the vector to avoid lots of allocations when
push_back-ing measurements */
Expand All @@ -226,10 +213,8 @@ class Trajectory
*/
void push(const TrajectoryMeasurement & tm, double chi2Increment);

#if defined( __GXX_EXPERIMENTAL_CXX0X__)
void push(TrajectoryMeasurement&& tm);
void push(TrajectoryMeasurement&& tm, double chi2Increment);
#endif

/** Remove the last measurement from the trajectory.
*/
Expand Down Expand Up @@ -270,7 +255,6 @@ class Trajectory

/** Return all RecHits in a container.
*/
#if defined( __GXX_EXPERIMENTAL_CXX0X__)
ConstRecHitContainer recHits() const {
ConstRecHitContainer hits;
hits.reserve(theData.size());
Expand All @@ -285,7 +269,6 @@ class Trajectory
*
*/
void validRecHits(ConstRecHitContainer & cont) const;
#endif

/** Number of valid RecHits used to determine the trajectory.
* Can be less than the number of measurements in data() since
Expand Down
19 changes: 1 addition & 18 deletions TrackingTools/PatternTools/interface/TrajectoryMeasurement.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@ class DetLayer;
class TrajectoryMeasurement {
public:

#if defined( __GXX_EXPERIMENTAL_CXX0X__)
using RecHitPointer = TrackingRecHit::RecHitPointer;
using ConstRecHitPointer = TrackingRecHit::ConstRecHitPointer;
#else
typedef TrackingRecHit::RecHitPointer RecHitPointer;
typedef TrackingRecHit::ConstRecHitPointer ConstRecHitPointer;
#endif

TrajectoryMeasurement() {}

Expand All @@ -52,7 +47,7 @@ class TrajectoryMeasurement {
theRecHit(aRecHit),
theLayer(0),
theEstimate(aEstimate) {}
#if defined( __GXX_EXPERIMENTAL_CXX0X__)

TrajectoryMeasurement(TrajectoryStateOnSurface fwdTrajectoryStateOnSurface,
ConstRecHitPointer aRecHit, float aEstimate,
const DetLayer* layer) :
Expand Down Expand Up @@ -86,7 +81,6 @@ class TrajectoryMeasurement {
theUpdatedState(std::move(uTrajectoryStateOnSurface)),
theRecHit(std::move(aRecHit)), theLayer(layer),
theEstimate(aEstimate) {}
#endif
/** Constructor with forward predicted, backward predicted & updated state,
* RecHit
*/
Expand Down Expand Up @@ -144,8 +138,6 @@ class TrajectoryMeasurement {

}

#if defined( __GXX_EXPERIMENTAL_CXX0X__)

TrajectoryMeasurement( TrajectoryMeasurement && rh) noexcept:
theFwdPredictedState(std::move(rh.theFwdPredictedState)),
theBwdPredictedState(std::move(rh.theBwdPredictedState)),
Expand All @@ -166,8 +158,6 @@ class TrajectoryMeasurement {

}

#endif

/** Access to forward predicted state (from fitter or builder).
* To be replaced by forwardPredictedState.
*/
Expand All @@ -191,16 +181,9 @@ class TrajectoryMeasurement {
return theUpdatedState;
}

#if defined( __GXX_EXPERIMENTAL_CXX0X__)
ConstRecHitPointer::element_type const & recHitR() const {
return *theRecHit;
}
#else
TrackingRecHit const & recHitR() const {
return *theRecHit;
}

#endif

ConstRecHitPointer const & recHitP() const {
return theRecHit;
Expand Down
2 changes: 0 additions & 2 deletions TrackingTools/TrajectoryState/interface/ProxyBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class ProxyBase {
}


#if defined( __GXX_EXPERIMENTAL_CXX0X__)
ProxyBase(ProxyBase&& other) noexcept {
theData = other.theData;
other.theData=0;
Expand All @@ -62,7 +61,6 @@ class ProxyBase {
}
return *this;
}
#endif

const T& data() const { check(); return *theData;}

Expand Down
Loading

0 comments on commit c23a3fa

Please sign in to comment.