diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloCoolChannelId.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloCoolChannelId.h index f0fdadb3b9e9cea6c00341ae886e6a4dbf8eba7b..4aebc0e6a5eb08a632b90ed99c61fdd5ab691323 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloCoolChannelId.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloCoolChannelId.h @@ -7,7 +7,7 @@ #include "TrigT1CaloCalibConditions/L1CaloModuleType.h" -class L1CaloCoolChannelId { +class L1CaloCoolChannelId final { friend std::ostream& operator<<(std::ostream& output, const L1CaloCoolChannelId& r); public: @@ -20,7 +20,7 @@ public: unsigned int channel, bool logical = true); L1CaloCoolChannelId(unsigned int id); L1CaloCoolChannelId(const L1CaloCoolChannelId& id); - virtual ~L1CaloCoolChannelId() {} + ~L1CaloCoolChannelId() = default; unsigned int crate() const { return (m_id & 0xff000000) >> 24; } L1CaloModuleType moduleType() const; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloHVCorrections.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloHVCorrections.h index 42ffd4f4f6836bf6e5045ba6ecec1e5cd5a7331b..69c50d0b1fcf5e13f185932e9edf013da830ae06 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloHVCorrections.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloHVCorrections.h @@ -15,21 +15,21 @@ * @author Peter Faulkner */ -class L1CaloHVCorrections +class L1CaloHVCorrections final { public: L1CaloHVCorrections(); L1CaloHVCorrections(unsigned int channelId, float rxMean, - const std::vector<int>& affectedCells, - const std::vector<float>& layerMeans); + std::vector<int> &&affectedCells, + std::vector<float> &&layerMeans); L1CaloHVCorrections(const L1CaloRxCoolChannelId& channelId, float rxMean, - const std::vector<int>& affectedCells, - const std::vector<float>& layerMeans); + std::vector<int> &&affectedCells, + std::vector<float> &&layerMeans); - virtual ~L1CaloHVCorrections() {} + ~L1CaloHVCorrections() = default; const L1CaloRxCoolChannelId& channelId() const { return m_channelId; } float rxMean() const { return m_rxMean; } diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloHVCorrectionsContainer.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloHVCorrectionsContainer.h index 35c5d37583ca51a00b4f2e753fc365e1d9535c92..59ba4bb2886acb0a9599baff3cc6fb614fe087c8 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloHVCorrectionsContainer.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloHVCorrectionsContainer.h @@ -53,8 +53,8 @@ class L1CaloHVCorrectionsContainer: public DataObject, const L1CaloHVCorrections* hvCorrections(unsigned int channelId) const; const L1CaloHVCorrections* hvCorrections(const L1CaloRxCoolChannelId& channelId) const; - void addHVCorrections(unsigned int channelId, const L1CaloHVCorrections& hvCorrections); - void addHVCorrections(const L1CaloRxCoolChannelId& channelId, const L1CaloHVCorrections& hvCorrections); + void addHVCorrections(unsigned int channelId, L1CaloHVCorrections&& hvCorrections); + void addHVCorrections(const L1CaloRxCoolChannelId& channelId, L1CaloHVCorrections&& hvCorrections); inline const_iterator begin() const { return m_mHVCorrectionsMap.begin(); }; inline const_iterator end() const { return m_mHVCorrectionsMap.end(); }; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloModuleType.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloModuleType.h index 980334db1f9c1aad985f4ff8108d2c62162e3dea..156d1dedce261d61f8cb2fc5a7e0521772f0e28b 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloModuleType.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloModuleType.h @@ -8,7 +8,7 @@ #include <iostream> #include <string> -class L1CaloModuleType { +class L1CaloModuleType final { public: // Values: L1Calo trigger modules, common CERN modules and test modules. @@ -22,7 +22,7 @@ public: L1CaloModuleType(const std::string& mTypeName); L1CaloModuleType(const L1CaloModuleType& mType); L1CaloModuleType& operator=(const L1CaloModuleType& mType); - virtual ~L1CaloModuleType() {}; + ~L1CaloModuleType() = default; // Information const std::string toString() const; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprConditions.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprConditions.h index 275c7b2de90d5a3961a1c9db3d4458f8a2c50f38..93e68c5b4ccf64b7059fae9df8ebccad5e05c49d 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprConditions.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprConditions.h @@ -20,7 +20,7 @@ * @author Peter Faulkner */ -class L1CaloPprConditions { +class L1CaloPprConditions final { friend std::ostream& operator<<(std::ostream& output, const L1CaloPprConditions& r); public: @@ -32,7 +32,7 @@ public: unsigned short lutStrategy, unsigned short lutOffset, unsigned short lutSlope, unsigned short lutNoiseCut, unsigned int pedValue, float pedMean); - virtual ~L1CaloPprConditions() {}; + ~L1CaloPprConditions() = default; // getters inline unsigned short extBcidThreshold() const { return m_extBcidThreshold; } diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprConditionsRun2.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprConditionsRun2.h index 0253a6e51b8c29a88dff2a320bf54e685dc68279..dd124d23c950580fec93de053475406d57d175c4 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprConditionsRun2.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprConditionsRun2.h @@ -17,7 +17,7 @@ * @author Veit Scharf */ -class L1CaloPprConditionsRun2 +class L1CaloPprConditionsRun2 final { public: @@ -62,7 +62,7 @@ public: short int firCoeff5, unsigned short lutCpSlope, unsigned short lutCpNoiseCut, unsigned short lutJepSlope, unsigned short lutJepNoiseCut); - virtual ~L1CaloPprConditionsRun2() {}; + ~L1CaloPprConditionsRun2() =default; // getters unsigned short extBcidThreshold() const { return m_extBcidThreshold; } diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprDisabledChannel.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprDisabledChannel.h index 994c663369e1d2124eb169470e10e23379c9f7eb..e4cc8704905fb0ce52daacf36146aa7f124e8812 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprDisabledChannel.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprDisabledChannel.h @@ -22,7 +22,7 @@ * @author Damien Prieur <damien.prieur@cern.ch> */ -class L1CaloPprDisabledChannel { +class L1CaloPprDisabledChannel final { friend std::ostream& operator<<(std::ostream& output, const L1CaloPprDisabledChannel& r); public: @@ -33,7 +33,7 @@ class L1CaloPprDisabledChannel { L1CaloPprDisabledChannel( unsigned int channelId, ChanDeadErrorCode deadErrorCode, ChanCalibErrorCode calibErrorCode, bool isMasked, unsigned int noiseCut, unsigned int disabledBits); L1CaloPprDisabledChannel( const L1CaloCoolChannelId& channelId, ChanDeadErrorCode deadErrorCode, ChanCalibErrorCode calibErrorCode, bool isMasked, unsigned int noiseCut, unsigned int disabledBits); - virtual ~L1CaloPprDisabledChannel() {}; + ~L1CaloPprDisabledChannel() = default; // getters inline L1CaloCoolChannelId channelId(void) const { return m_channelId; }; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprLut.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprLut.h index 70522dac93d44cab75e64a396a7579ba93c3d634..541d5d94355812c866152d7ba00792995202c99b 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprLut.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloPprLut.h @@ -21,7 +21,7 @@ */ -class L1CaloPprLut{ +class L1CaloPprLut final{ friend std::ostream& operator<<(std::ostream& output, const L1CaloPprLut& ppmLut); public: @@ -29,7 +29,7 @@ public: L1CaloPprLut(unsigned int channelId, unsigned short lutStrategy, unsigned short lutOffset, unsigned short lutSlope, unsigned short lutNoiseCut, coral::Blob lutParameters, unsigned int pedValue, double pedMean, ChanCalibErrorCode errorCode); L1CaloPprLut(const L1CaloCoolChannelId& channelId, unsigned short lutStrategy, unsigned short lutOffset, unsigned short lutSlope, unsigned short lutNoiseCut, coral::Blob lutParameters, unsigned int pedValue, double pedMean, ChanCalibErrorCode errorCode); - virtual ~L1CaloPprLut() {}; + ~L1CaloPprLut() =default; // getters inline L1CaloCoolChannelId channelId(void) const { return m_channelId; }; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRampCumul.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRampCumul.h index e3b60be7b9d32e973affd89fec1303681c8f6c37..15009f7e9b4978ed347a00d026bb97ff3827dba5 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRampCumul.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRampCumul.h @@ -17,12 +17,12 @@ * @author Damien Prieur <damien.prieur@cern.ch> */ -class L1CaloRampCumul +class L1CaloRampCumul final { public: L1CaloRampCumul() {}; L1CaloRampCumul(L1CaloRampRunPlan* pRampRunPlan); - virtual ~L1CaloRampCumul() {}; + ~L1CaloRampCumul() = default; void addEvent(double step, int energy); diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRampData.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRampData.h index 04a0685fb84bc2e8a38b176b52ef645c63567565..0e158f3bba10f8effc1515dd1364a83b3dbe1f61 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRampData.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRampData.h @@ -38,14 +38,14 @@ class L1CaloRampStep * * @author Veit Scharf <veit.scharf@kip.uni-heidelberg.de> */ -class L1CaloRampData +class L1CaloRampData final { public: // first L1CaloRampStep is calorimeter data, second is level-1 trigger data typedef std::pair<L1CaloRampStep, L1CaloRampStep> L1CaloRampDataPoint; L1CaloRampData() : m_rampDataVector(1), m_iStep(0) {} - virtual ~L1CaloRampData() {} + ~L1CaloRampData() = default; // adds calorimeter and level-1 trigger energiy to energy step i void addData(unsigned int step, const std::pair<double, double>& energy); diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxCoolChannelId.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxCoolChannelId.h index a71e3aed70b2b0bc475a0a675b41fb7f4b1236aa..8037efa4b1a170397811c3639a8b6ae7cd45fc75 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxCoolChannelId.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxCoolChannelId.h @@ -7,7 +7,7 @@ #include <ostream> -class L1CaloRxCoolChannelId { +class L1CaloRxCoolChannelId final { friend std::ostream& operator<<(std::ostream& output, const L1CaloRxCoolChannelId& r); public: @@ -17,7 +17,7 @@ public: L1CaloRxCoolChannelId(unsigned int crate, unsigned int module, unsigned int inputConn, unsigned int inputPair, unsigned int outputConn, unsigned int outputPair); L1CaloRxCoolChannelId(unsigned int id); L1CaloRxCoolChannelId(const L1CaloRxCoolChannelId& id); - virtual ~L1CaloRxCoolChannelId() {}; + ~L1CaloRxCoolChannelId() = default; unsigned int crate() const { return (unsigned int) m_id/1024; }; unsigned int module() const { return (unsigned int) m_id%1024/64; }; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxGain.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxGain.h index 77f7ff8529b76d3e9203899c11a4fc3f1bae56ce..54dc72997ed3b95fc88eb05bd955da18046ac126 100755 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxGain.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxGain.h @@ -21,7 +21,7 @@ * @author Damien Prieur <damien.prieur@cern.ch> */ -class L1CaloRxGain { +class L1CaloRxGain final { friend std::ostream& operator<<(std::ostream& output, const L1CaloRxGain& r); public: @@ -33,7 +33,7 @@ public: L1CaloRxGain( const L1CaloRxCoolChannelId& channelId, int gain, const std::string& comment ); - virtual ~L1CaloRxGain() {}; + ~L1CaloRxGain() =default; // getters inline L1CaloRxCoolChannelId channelId(void) const { return m_channelId; }; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxLayers.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxLayers.h index 258942701b3498fe19f020805a74de27d51cd318..f0155af5fa4eaf5a832249597aca47c3e5f52593 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxLayers.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxLayers.h @@ -15,19 +15,19 @@ * @author Peter Faulkner */ -class L1CaloRxLayers +class L1CaloRxLayers final { public: L1CaloRxLayers(); L1CaloRxLayers(unsigned int channelId, - const std::vector<int>& names, - const std::vector<int>& ncells); + std::vector<int>&& names, + std::vector<int>&& ncells); L1CaloRxLayers(const L1CaloRxCoolChannelId& channelId, - const std::vector<int>& names, - const std::vector<int>& ncells); + std::vector<int>&& names, + std::vector<int>&& ncells); - virtual ~L1CaloRxLayers() {} + ~L1CaloRxLayers() = default; const L1CaloRxCoolChannelId& channelId() const { return m_channelId; } const std::vector<int>& names() const { return m_names; } diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxLayersContainer.h b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxLayersContainer.h index fe9540d0cb4f3e31d1b26edd37ca906a664fb1d8..6a33c6152bb56288a2f07874dd992e28b9b6e11a 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxLayersContainer.h +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/TrigT1CaloCalibConditions/L1CaloRxLayersContainer.h @@ -52,8 +52,8 @@ class L1CaloRxLayersContainer: public DataObject, const L1CaloRxLayers* rxLayers(unsigned int channelId) const; const L1CaloRxLayers* rxLayers(const L1CaloRxCoolChannelId& channelId) const; - void addRxLayers(unsigned int channelId, const L1CaloRxLayers& rxLayers); - void addRxLayers(const L1CaloRxCoolChannelId& channelId, const L1CaloRxLayers& rxLayers); + void addRxLayers(unsigned int channelId, L1CaloRxLayers&& rxLayers); + void addRxLayers(const L1CaloRxCoolChannelId& channelId, L1CaloRxLayers&& rxLayers); inline const_iterator begin() const { return m_mRxLayersMap.begin(); }; inline const_iterator end() const { return m_mRxLayersMap.end(); }; diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrections.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrections.cxx index 555e9dab06e20625b422cc04c2c5da62f05e7723..dffdf27c084063f6cd2c676dec25bc374836a032 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrections.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrections.cxx @@ -11,20 +11,20 @@ L1CaloHVCorrections::L1CaloHVCorrections() : L1CaloHVCorrections::L1CaloHVCorrections(unsigned int channelId, float rxMean, - const std::vector<int>& affectedCells, - const std::vector<float>& layerMeans) : + std::vector<int> &&affectedCells, + std::vector<float> &&layerMeans) : m_channelId(channelId), m_rxMean(rxMean), - m_affectedCells(affectedCells), - m_layerMeans(layerMeans) + m_affectedCells(std::move(affectedCells)), + m_layerMeans(std::move(layerMeans)) {} L1CaloHVCorrections::L1CaloHVCorrections(const L1CaloRxCoolChannelId& channelId, float rxMean, - const std::vector<int>& affectedCells, - const std::vector<float>& layerMeans) : + std::vector<int> &&affectedCells, + std::vector<float> &&layerMeans) : m_channelId(channelId), m_rxMean(rxMean), - m_affectedCells(affectedCells), - m_layerMeans(layerMeans) + m_affectedCells(std::move(affectedCells)), + m_layerMeans(std::move(layerMeans)) {} diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrectionsContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrectionsContainer.cxx index d34e577f151f7959478e4451d593360928ede76e..332475abc1ab1fd3c654695c87329365e2044dc8 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrectionsContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloHVCorrectionsContainer.cxx @@ -153,8 +153,8 @@ void L1CaloHVCorrectionsContainer::makeTransient(const std::map<std::string, Con } } - L1CaloHVCorrections l1CaloHVCorrections(chanNum, rxMean, affectedCells, layerMeans); - m_mHVCorrectionsMap[chanNum] = l1CaloHVCorrections; + L1CaloHVCorrections l1CaloHVCorrections(chanNum, rxMean, std::move(affectedCells), std::move(layerMeans)); + m_mHVCorrectionsMap[chanNum] = std::move(l1CaloHVCorrections); } } else { std::cout << "L1CaloHVCorrectionsContainer : Could not find requested CondAttrListCollection " @@ -172,12 +172,12 @@ const L1CaloHVCorrections* L1CaloHVCorrectionsContainer::hvCorrections(const L1C return this->hvCorrections(channelId.id()); } -void L1CaloHVCorrectionsContainer::addHVCorrections(unsigned int channelId, const L1CaloHVCorrections& hvCorrections) { - m_mHVCorrectionsMap[channelId] = hvCorrections; +void L1CaloHVCorrectionsContainer::addHVCorrections(unsigned int channelId, L1CaloHVCorrections&& hvCorrections) { + m_mHVCorrectionsMap[channelId] = std::move(hvCorrections); } -void L1CaloHVCorrectionsContainer::addHVCorrections(const L1CaloRxCoolChannelId& channelId, const L1CaloHVCorrections& hvCorrections) { - this->addHVCorrections(channelId.id(), hvCorrections); +void L1CaloHVCorrectionsContainer::addHVCorrections(const L1CaloRxCoolChannelId& channelId, L1CaloHVCorrections&& hvCorrections) { + this->addHVCorrections(channelId.id(), std::move(hvCorrections)); } void L1CaloHVCorrectionsContainer::clear() { diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayers.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayers.cxx index c12f2023721eb463a54de86b8812b477a76cfba7..29595f211b550ef9e2029828813fe2309873effd 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayers.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayers.cxx @@ -9,17 +9,17 @@ L1CaloRxLayers::L1CaloRxLayers() : {} L1CaloRxLayers::L1CaloRxLayers(unsigned int channelId, - const std::vector<int>& names, - const std::vector<int>& ncells) : + std::vector<int>&& names, + std::vector<int>&& ncells) : m_channelId(channelId), - m_names(names), - m_ncells(ncells) + m_names(std::move(names)), + m_ncells(std::move(ncells)) {} L1CaloRxLayers::L1CaloRxLayers(const L1CaloRxCoolChannelId& channelId, - const std::vector<int>& names, - const std::vector<int>& ncells) : + std::vector<int>&& names, + std::vector<int>&& ncells) : m_channelId(channelId), - m_names(names), - m_ncells(ncells) + m_names(std::move(names)), + m_ncells(std::move(ncells)) {} diff --git a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayersContainer.cxx b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayersContainer.cxx index b8e86a87f40510c95f70c8719aa52a72dcc4c892..8e709133678d50e85741bd36f050bd429354a376 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayersContainer.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibConditions/src/L1CaloRxLayersContainer.cxx @@ -149,8 +149,8 @@ void L1CaloRxLayersContainer::makeTransient(const std::map<std::string, CondAttr ncells.push_back((int)attrList[ this->specificationName(eNCells4) ].data<unsigned char>()); } - L1CaloRxLayers l1CaloRxLayers(chanNum, names, ncells); - m_mRxLayersMap[chanNum] = l1CaloRxLayers; + L1CaloRxLayers l1CaloRxLayers(chanNum, std::move(names), std::move(ncells)); + m_mRxLayersMap[chanNum] = std::move(l1CaloRxLayers); } } else { std::cout << "L1CaloRxLayersContainer : Could not find requested CondAttrListCollection " @@ -168,12 +168,12 @@ const L1CaloRxLayers* L1CaloRxLayersContainer::rxLayers(const L1CaloRxCoolChanne return this->rxLayers(channelId.id()); } -void L1CaloRxLayersContainer::addRxLayers(unsigned int channelId, const L1CaloRxLayers& rxLayers) { - m_mRxLayersMap[channelId] = rxLayers; +void L1CaloRxLayersContainer::addRxLayers(unsigned int channelId, L1CaloRxLayers&& rxLayers) { + m_mRxLayersMap[channelId] = std::move(rxLayers); } -void L1CaloRxLayersContainer::addRxLayers(const L1CaloRxCoolChannelId& channelId, const L1CaloRxLayers& rxLayers) { - this->addRxLayers(channelId.id(), rxLayers); +void L1CaloRxLayersContainer::addRxLayers(const L1CaloRxCoolChannelId& channelId, L1CaloRxLayers&& rxLayers) { + this->addRxLayers(channelId.id(), std::move(rxLayers)); } void L1CaloRxLayersContainer::clear() { diff --git a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx index a2c61b95db6e063728a3680cf4baa1bf619c2447..b6390157d49b026201c42913f5b3344483f9fef6 100644 --- a/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx +++ b/Trigger/TrigT1/TrigT1CaloCalibUtils/src/L1CaloHVCorrectionsForDB.cxx @@ -161,8 +161,8 @@ StatusCode L1CaloHVCorrectionsForDB::execute() } } - L1CaloRxLayers l1caloRxLayersSample(coolId, layernames, layerNcells); - m_rxLayersContainer->addRxLayers(coolId, l1caloRxLayersSample); + L1CaloRxLayers l1caloRxLayersSample(coolId, std::vector<int>(layernames), std::vector<int>(layerNcells)); + m_rxLayersContainer->addRxLayers(coolId, std::move(l1caloRxLayersSample)); if (nLayers != affectedCellsF.size()) { msg(MSG::ERROR) << "layernames/affectedCellsF inconsistent size" << endmsg; @@ -197,8 +197,8 @@ StatusCode L1CaloHVCorrectionsForDB::execute() for (affIt = affectedCellsF.begin(); affIt != affectedCellsF.end(); ++affIt) { affectedCells.push_back((int)(*affIt)); } - L1CaloHVCorrections l1caloHVCorrectionsSample(coolId, meanScale, affectedCells, layerMeans); - m_hvCorrectionsContainer->addHVCorrections(coolId, l1caloHVCorrectionsSample); + L1CaloHVCorrections l1caloHVCorrectionsSample(coolId, meanScale, std::move(affectedCells), std::vector<float>(layerMeans)); + m_hvCorrectionsContainer->addHVCorrections(coolId, std::move(l1caloHVCorrectionsSample)); hvCount++; } }