Skip to content

Commit

Permalink
Merge pull request #18926 from gartung/SimCalo-gcc700-dtor-warning-fix
Browse files Browse the repository at this point in the history
SimCalorimetry : fix gcc700 warning: class  has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
  • Loading branch information
cmsbuild committed May 27, 2017
2 parents d9d4e78 + 7e7c165 commit 82967c7
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SimCalorimetry/CaloSimAlgos/interface/CaloShapes.h
Expand Up @@ -13,7 +13,7 @@ class CaloShapes
// doesn't take ownership of the pointer
CaloShapes(const CaloVShape * shape) : theShape(shape) {}
virtual const CaloVShape * shape(const DetId & detId) const {return theShape;}

virtual ~CaloShapes() = default;
private:
const CaloVShape * theShape;
};
Expand Down
1 change: 1 addition & 0 deletions SimCalorimetry/CaloSimAlgos/interface/CaloVHitCorrection.h
Expand Up @@ -9,6 +9,7 @@ namespace CLHEP {

class CaloVHitCorrection {
public:
virtual ~CaloVHitCorrection() = default;
virtual double delay(const PCaloHit & hit, CLHEP::HepRandomEngine*) const = 0;
};

Expand Down
1 change: 1 addition & 0 deletions SimCalorimetry/CaloSimAlgos/interface/CaloVHitFilter.h
Expand Up @@ -6,6 +6,7 @@

class CaloVHitFilter {
public:
virtual ~CaloVHitFilter() = default;
virtual bool accepts(const PCaloHit & hit) const = 0;
};

Expand Down
Expand Up @@ -7,6 +7,7 @@ class CaloSimParameters;
class CaloVSimParameterMap
{
public:
virtual ~CaloVSimParameterMap() = default;
virtual const CaloSimParameters & simParameters(const DetId & id) const = 0;
};

Expand Down
Expand Up @@ -33,7 +33,6 @@ class HGCDigitizerBase {
@short CTOR
*/
HGCDigitizerBase(const edm::ParameterSet &ps);

/**
@short steer digitization mode
*/
Expand Down Expand Up @@ -73,7 +72,7 @@ class HGCDigitizerBase {
/**
@short DTOR
*/
~HGCDigitizerBase()
virtual ~HGCDigitizerBase()
{ };


Expand Down
Expand Up @@ -16,6 +16,7 @@
class HcalZSAlgoEnergy : public HcalZeroSuppressionAlgo {
public:
HcalZSAlgoEnergy(bool markAndPass, int level, int start, int samples, bool twosided);
virtual ~HcalZSAlgoEnergy() = default;
void prepare(const HcalDbService* db);
void done();
protected:
Expand Down
Expand Up @@ -15,7 +15,7 @@ class HcalZSAlgoRealistic : public HcalZeroSuppressionAlgo {
public:
HcalZSAlgoRealistic(bool markAndPass, std::pair<int,int> HBsearchTS, std::pair<int,int> HEsearchTS, std::pair<int,int> HOsearchTS, std::pair<int,int> HFsearchTS);
HcalZSAlgoRealistic(bool markAndPass, int levelHB, int levelHE, int levelHO, int levelHF, std::pair<int,int> HBsearchTS, std::pair<int,int> HEsearchTS, std::pair<int,int> HOsearchTS, std::pair<int,int> HFsearchTS);

virtual ~HcalZSAlgoRealistic() = default;
protected:
//these need to be overloads instead of templates to avoid linking issues when calling private member function templates
virtual bool shouldKeep(const HBHEDataFrame& digi) const;
Expand Down
Expand Up @@ -14,6 +14,7 @@ class HcalDbService;

class HcalZeroSuppressionAlgo {
public:
virtual ~HcalZeroSuppressionAlgo() = default;
void suppress(const HBHEDigiCollection& input, HBHEDigiCollection& output);
void suppress(const HODigiCollection& input, HODigiCollection& output);
void suppress(const HFDigiCollection& input, HFDigiCollection& output);
Expand Down

0 comments on commit 82967c7

Please sign in to comment.