Skip to content

Commit

Permalink
Merge pull request #34691 from smuzaffar/Misc2-modernize-use-equals-d…
Browse files Browse the repository at this point in the history
…elete-fix

[Misc2][clang-tidy] make deleted function public
  • Loading branch information
cmsbuild authored Aug 3, 2021
2 parents 623b908 + 77f04ba commit 6a61ea3
Show file tree
Hide file tree
Showing 34 changed files with 105 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ namespace edm {
class ESTrivialConditionRetriever : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
public:
ESTrivialConditionRetriever(const edm::ParameterSet& pset);
ESTrivialConditionRetriever(const ESTrivialConditionRetriever&) = delete; // stop default
const ESTrivialConditionRetriever& operator=(const ESTrivialConditionRetriever&) = delete; // stop default
~ESTrivialConditionRetriever() override;

// ---------- member functions ---------------------------
Expand All @@ -64,9 +66,6 @@ class ESTrivialConditionRetriever : public edm::ESProducer, public edm::EventSet
edm::ValidityInterval&) override;

private:
ESTrivialConditionRetriever(const ESTrivialConditionRetriever&) = delete; // stop default
const ESTrivialConditionRetriever& operator=(const ESTrivialConditionRetriever&) = delete; // stop default

void getWeightsFromConfiguration(const edm::ParameterSet& ps);

// data members
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ namespace edm {
class EcalTrivialConditionRetriever : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
public:
EcalTrivialConditionRetriever(const edm::ParameterSet& pset);
EcalTrivialConditionRetriever(const EcalTrivialConditionRetriever&) = delete; // stop default
const EcalTrivialConditionRetriever& operator=(const EcalTrivialConditionRetriever&) = delete; // stop default
~EcalTrivialConditionRetriever() override;

// ---------- member functions ---------------------------
Expand Down Expand Up @@ -202,9 +204,6 @@ class EcalTrivialConditionRetriever : public edm::ESProducer, public edm::EventS
edm::ValidityInterval&) override;

private:
EcalTrivialConditionRetriever(const EcalTrivialConditionRetriever&) = delete; // stop default
const EcalTrivialConditionRetriever& operator=(const EcalTrivialConditionRetriever&) = delete; // stop default

void getWeightsFromConfiguration(const edm::ParameterSet& ps);

// data members
Expand Down
4 changes: 2 additions & 2 deletions CalibCalorimetry/HcalTPGAlgos/interface/XMLProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ class XMLProcessor {
return instance;
}

XMLProcessor(const XMLProcessor&) = delete; // stop default

// returns XML std::string if target == "string" otherwise NULL
XMLCh* serializeDOM(XERCES_CPP_NAMESPACE::DOMNode* node, std::string target = "stdout");

Expand All @@ -161,8 +163,6 @@ class XMLProcessor {
private:
XMLProcessor();

XMLProcessor(const XMLProcessor&) = delete; // stop default

//const XMLProcessor& operator=(const XMLProcessor&); // stop default

// ---------- member data --------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ class Phase2TrackerCablingRcd;
class Phase2TrackerCablingESProducer : public edm::ESProducer {
public:
Phase2TrackerCablingESProducer(const edm::ParameterSet&);
Phase2TrackerCablingESProducer(const Phase2TrackerCablingESProducer&) = delete;
const Phase2TrackerCablingESProducer& operator=(const Phase2TrackerCablingESProducer&) = delete;
~Phase2TrackerCablingESProducer() override;

virtual std::unique_ptr<Phase2TrackerCabling> produce(const Phase2TrackerCablingRcd&);

private:
Phase2TrackerCablingESProducer(const Phase2TrackerCablingESProducer&) = delete;
const Phase2TrackerCablingESProducer& operator=(const Phase2TrackerCablingESProducer&) = delete;

virtual Phase2TrackerCabling* make(const Phase2TrackerCablingRcd&) = 0;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class SiStripApvGainRcd;
class SiStripGainESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
public:
SiStripGainESSource(const edm::ParameterSet&);
SiStripGainESSource(const SiStripGainESSource&) = delete;
const SiStripGainESSource& operator=(const SiStripGainESSource&) = delete;
~SiStripGainESSource() override { ; }

virtual std::unique_ptr<SiStripApvGain> produce(const SiStripApvGainRcd&);
Expand All @@ -27,9 +29,6 @@ class SiStripGainESSource : public edm::ESProducer, public edm::EventSetupRecord
edm::ValidityInterval&) override;

private:
SiStripGainESSource(const SiStripGainESSource&) = delete;
const SiStripGainESSource& operator=(const SiStripGainESSource&) = delete;

virtual SiStripApvGain* makeGain() = 0;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class SiStripNoisesRcd;
class SiStripNoiseESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
public:
SiStripNoiseESSource(const edm::ParameterSet&);
SiStripNoiseESSource(const SiStripNoiseESSource&) = delete;
const SiStripNoiseESSource& operator=(const SiStripNoiseESSource&) = delete;
~SiStripNoiseESSource() override { ; }

virtual std::unique_ptr<SiStripNoises> produce(const SiStripNoisesRcd&);
Expand All @@ -27,9 +29,6 @@ class SiStripNoiseESSource : public edm::ESProducer, public edm::EventSetupRecor
edm::ValidityInterval&) override;

private:
SiStripNoiseESSource(const SiStripNoiseESSource&) = delete;
const SiStripNoiseESSource& operator=(const SiStripNoiseESSource&) = delete;

virtual SiStripNoises* makeNoise() = 0;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class SiStripPedestalsRcd;
class SiStripPedestalsESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
public:
SiStripPedestalsESSource(const edm::ParameterSet&);
SiStripPedestalsESSource(const SiStripPedestalsESSource&) = delete;
const SiStripPedestalsESSource& operator=(const SiStripPedestalsESSource&) = delete;
~SiStripPedestalsESSource() override { ; }

virtual std::unique_ptr<SiStripPedestals> produce(const SiStripPedestalsRcd&);
Expand All @@ -27,9 +29,6 @@ class SiStripPedestalsESSource : public edm::ESProducer, public edm::EventSetupR
edm::ValidityInterval&) override;

private:
SiStripPedestalsESSource(const SiStripPedestalsESSource&) = delete;
const SiStripPedestalsESSource& operator=(const SiStripPedestalsESSource&) = delete;

virtual SiStripPedestals* makePedestals() = 0;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ template <typename TObject, typename TRecord>
class SiStripTemplateEmptyFakeESSource : public edm::ESProducer, public edm::EventSetupRecordIntervalFinder {
public:
SiStripTemplateEmptyFakeESSource(const edm::ParameterSet&);
SiStripTemplateEmptyFakeESSource(const SiStripTemplateEmptyFakeESSource&) = delete;
const SiStripTemplateEmptyFakeESSource& operator=(const SiStripTemplateEmptyFakeESSource&) = delete;
~SiStripTemplateEmptyFakeESSource() override{};

std::unique_ptr<TObject> produce(const TRecord&);
Expand All @@ -28,9 +30,6 @@ class SiStripTemplateEmptyFakeESSource : public edm::ESProducer, public edm::Eve
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey&,
const edm::IOVSyncValue& iov,
edm::ValidityInterval& iValidity) override;

SiStripTemplateEmptyFakeESSource(const SiStripTemplateEmptyFakeESSource&) = delete;
const SiStripTemplateEmptyFakeESSource& operator=(const SiStripTemplateEmptyFakeESSource&) = delete;
};

template <typename TObject, typename TRecord>
Expand Down
7 changes: 2 additions & 5 deletions CaloOnlineTools/HcalOnlineDb/interface/XMLLUTLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class XMLLUTLoader : public XMLDOMBlock {
XMLLUTLoader();
XMLLUTLoader(XMLProcessor::loaderBaseConfig* config,
std::string templateBase = "HCAL_TRIG_PRIM_LOOKUP_TABLE.XMLloader.template");
XMLLUTLoader(const XMLLUTLoader&) = delete; // stop default
const XMLLUTLoader& operator=(const XMLLUTLoader&) = delete; // stop default
~XMLLUTLoader() override;

int addLUT(lutDBConfig* config, std::string templateFileName = "HCAL_TRIG_PRIM_LOOKUP_TABLE.dataset.template");
Expand All @@ -58,11 +60,6 @@ class XMLLUTLoader : public XMLDOMBlock {
std::string templateFileName = "HCAL_TRIG_PRIM_LOOKUP_TABLE.checksums.template");

int createLoader(const std::vector<int>& crate_number, const std::vector<std::string>& file_name);

private:
XMLLUTLoader(const XMLLUTLoader&) = delete; // stop default

const XMLLUTLoader& operator=(const XMLLUTLoader&) = delete; // stop default
};

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,17 @@ class SiStripCommissioningSource : public edm::EDAnalyzer {
typedef dqm::legacy::MonitorElement MonitorElement;

SiStripCommissioningSource(const edm::ParameterSet&);

/** Private default constructor. */
SiStripCommissioningSource() = delete;

~SiStripCommissioningSource() override;

void beginRun(edm::Run const&, const edm::EventSetup&) override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void endJob() override;

private: // ---------- Private methods ----------
/** Private default constructor. */
SiStripCommissioningSource() = delete;

/** */
DQMStore* const dqm(std::string method = "") const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ class SiStripFineDelayTOF {
static double timeOfFlight(bool cosmics, bool field, double* trackParameters, double* hit, double* phit, bool onDisk);
static void trackParameters(const reco::Track& tk, double* trackParameters);

private:
SiStripFineDelayTOF() = delete;
virtual ~SiStripFineDelayTOF() = delete;

private:
static double timeOfFlightCosmic(double* hit, double* phit);
static double timeOfFlightCosmicB(double* trackParameters, double* hit, double* phit, bool onDisk);
static double timeOfFlightBeam(double* hit, double* phit);
Expand Down
4 changes: 2 additions & 2 deletions DQM/SiStripCommon/interface/SiStripHistoId.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class TrackerTopology;
class SiStripHistoId {
public:
SiStripHistoId();
SiStripHistoId(const SiStripHistoId&) = delete; // stop default
const SiStripHistoId& operator=(const SiStripHistoId&) = delete; // stop default
virtual ~SiStripHistoId();
// generally: histoid = description + separator1 + id_type + separator2 + component_id
std::string createHistoId(std::string description, std::string id_type, uint32_t component_id);
Expand All @@ -36,8 +38,6 @@ class SiStripHistoId {
std::string getComponentType(std::string histoid);

private:
SiStripHistoId(const SiStripHistoId&) = delete; // stop default
const SiStripHistoId& operator=(const SiStripHistoId&) = delete; // stop default
std::string returnIdPart(std::string histoid, uint32_t whichpart);
};

Expand Down
6 changes: 2 additions & 4 deletions DQMOffline/Trigger/interface/EgHLTOffHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ namespace egHLT {

std::vector<edm::ParameterSet> trigCutParams_; //probably the least bad option

private: //disabling copy / assignment
OffHelper& operator=(const OffHelper&) = delete;
OffHelper(const OffHelper&) = delete;

public:
OffHelper()
: eleLooseCuts_(),
Expand All @@ -169,6 +165,8 @@ namespace egHLT {
phoCuts_(),
hltEleTrkIsolAlgo_(nullptr),
hltPhoTrkIsolAlgo_(nullptr) {}
OffHelper& operator=(const OffHelper&) = delete;
OffHelper(const OffHelper&) = delete;
~OffHelper();

void setup(const edm::ParameterSet& conf, edm::ConsumesCollector&& iC);
Expand Down
5 changes: 3 additions & 2 deletions DQMOffline/Trigger/interface/EgHLTOfflineSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ class EgHLTOfflineSource : public DQMEDAnalyzer {
bool filterInactiveTriggers_;
std::string hltTag_;

public:
explicit EgHLTOfflineSource(const edm::ParameterSet&);

//disabling copying/assignment (copying this class would be bad, mkay)
EgHLTOfflineSource(const EgHLTOfflineSource& rhs) = delete;
EgHLTOfflineSource& operator=(const EgHLTOfflineSource& rhs) = delete;

public:
explicit EgHLTOfflineSource(const edm::ParameterSet&);
~EgHLTOfflineSource() override;

void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
Expand Down
7 changes: 3 additions & 4 deletions DQMServices/FwkIO/plugins/DQMRootSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,18 +311,19 @@ struct DQMTTreeIO {
class DQMRootSource : public edm::PuttableSourceBase, DQMTTreeIO {
public:
DQMRootSource(edm::ParameterSet const&, const edm::InputSourceDescription&);
DQMRootSource(const DQMRootSource&) = delete;
~DQMRootSource() override;

// ---------- const member functions ---------------------

const DQMRootSource& operator=(const DQMRootSource&) = delete; // stop default

// ---------- static member functions --------------------

// ---------- member functions ---------------------------
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
DQMRootSource(const DQMRootSource&) = delete;

edm::InputSource::ItemType getNextItemType() override;

std::shared_ptr<edm::FileBlock> readFile_() override;
Expand Down Expand Up @@ -353,8 +354,6 @@ class DQMRootSource : public edm::PuttableSourceBase, DQMTTreeIO {
bool keepIt(edm::RunNumber_t, edm::LuminosityBlockNumber_t) const;
void logFileAction(char const* msg, char const* fileName) const;

const DQMRootSource& operator=(const DQMRootSource&) = delete; // stop default

// ---------- member data --------------------------------

// Properties from python config
Expand Down
8 changes: 4 additions & 4 deletions EventFilter/GctRawToDigi/src/GctUnpackCollections.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class GctUnpackCollections {
/// Construct with an event. The collections get put into the event when the object instance goes out of scope (i.e. in the destructor).
GctUnpackCollections(edm::Event& event);

/// deliberately not implemented!
GctUnpackCollections(const GctUnpackCollections&) = delete; ///< Copy ctor
GctUnpackCollections& operator=(const GctUnpackCollections&) = delete; ///< Assignment op

/// Destructor - the last action of this object is to put the gct collections into the event provided on construction.
~GctUnpackCollections();

Expand Down Expand Up @@ -84,10 +88,6 @@ class GctUnpackCollections {
L1TriggerErrorCollection* const errors() const { return m_errors.get(); } ///< Unpack error code collection.

private:
GctUnpackCollections(const GctUnpackCollections&) = delete; ///< Copy ctor - deliberately not implemented!
GctUnpackCollections& operator=(const GctUnpackCollections&) =
delete; ///< Assignment op - deliberately not implemented!

edm::Event&
m_event; ///< The event the collections will be put into on destruction of the GctUnpackCollections instance.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ class UCTCTP7RawData {
}
}

// No copy constructor and equality operator are needed
UCTCTP7RawData(const UCTCTP7RawData&) = delete;
const UCTCTP7RawData& operator=(const UCTCTP7RawData& i) = delete;

virtual ~UCTCTP7RawData() { ; }

// Access functions for convenience
Expand Down Expand Up @@ -333,11 +337,6 @@ class UCTCTP7RawData {
}

private:
// No copy constructor and equality operator are needed

UCTCTP7RawData(const UCTCTP7RawData&) = delete;
const UCTCTP7RawData& operator=(const UCTCTP7RawData& i) = delete;

// Pointer to contiguous array of 192 values
// We assume instantiator of this class will gurantee that fact
const uint32_t* myDataPtr;
Expand Down
9 changes: 4 additions & 5 deletions EventFilter/L1TXRawToDigi/interface/UCTAMCRawData.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ class UCTAMCRawData {
public:
UCTAMCRawData(const uint32_t *d) : myDataPtr(d) {}

// No copy constructor and equality operator are needed
UCTAMCRawData(const UCTAMCRawData &) = delete;
const UCTAMCRawData &operator=(const UCTAMCRawData &i) = delete;

virtual ~UCTAMCRawData() { ; }

// Access functions for convenience
Expand Down Expand Up @@ -45,11 +49,6 @@ class UCTAMCRawData {
}

private:
// No copy constructor and equality operator are needed

UCTAMCRawData(const UCTAMCRawData &) = delete;
const UCTAMCRawData &operator=(const UCTAMCRawData &i) = delete;

// RawData data

const uint32_t *myDataPtr;
Expand Down
9 changes: 4 additions & 5 deletions EventFilter/L1TXRawToDigi/interface/UCTCTP7RawData.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class UCTCTP7RawData {
}
}

// No copy constructor and equality operator are needed
UCTCTP7RawData(const UCTCTP7RawData&) = delete;
const UCTCTP7RawData& operator=(const UCTCTP7RawData& i) = delete;

virtual ~UCTCTP7RawData() { ; }

// Access functions for convenience
Expand Down Expand Up @@ -330,11 +334,6 @@ class UCTCTP7RawData {
}

private:
// No copy constructor and equality operator are needed

UCTCTP7RawData(const UCTCTP7RawData&) = delete;
const UCTCTP7RawData& operator=(const UCTCTP7RawData& i) = delete;

// RawData data

const uint32_t* myDataPtr;
Expand Down
Loading

0 comments on commit 6a61ea3

Please sign in to comment.