diff --git a/core/detectors/sts/CbmStsParAsic.cxx b/core/detectors/sts/CbmStsParAsic.cxx index 99fb1d292ef8e017ac4b3bf52c7c4e963ac00a1d..b41bd64ffa1ecc0e359f189eb643e0ad545ff36d 100644 --- a/core/detectors/sts/CbmStsParAsic.cxx +++ b/core/detectors/sts/CbmStsParAsic.cxx @@ -37,6 +37,17 @@ CbmStsParAsic::CbmStsParAsic(const CbmStsParAsic& other) // ------------------------------------------------------------------------- +// ----- Move constructor ---------------------------------------------- +CbmStsParAsic::CbmStsParAsic(CbmStsParAsic&& other) +{ + Set(other.fNofChannels, other.fNofAdc, other.fDynRange, other.fThreshold, other.fTimeResolution, other.fDeadTime, + other.fNoise, other.fZeroNoiseRate); + SetTimeOffset(other.fTimeOffset); + SetWalkCoef(other.fWalkCoef); +} +// ------------------------------------------------------------------------- + + // ----- Copy assignment operator -------------------------------------- CbmStsParAsic& CbmStsParAsic::operator=(const CbmStsParAsic& other) { @@ -49,6 +60,18 @@ CbmStsParAsic& CbmStsParAsic::operator=(const CbmStsParAsic& other) // ------------------------------------------------------------------------- +// ----- Move assignment operator -------------------------------------- +CbmStsParAsic& CbmStsParAsic::operator=(CbmStsParAsic&& other) +{ + Set(other.fNofChannels, other.fNofAdc, other.fDynRange, other.fThreshold, other.fTimeResolution, other.fDeadTime, + other.fNoise, other.fZeroNoiseRate); + SetTimeOffset(other.fTimeOffset); + SetWalkCoef(other.fWalkCoef); + return *this; +} +// ------------------------------------------------------------------------- + + // ----- Destructor ---------------------------------------------------- CbmStsParAsic::~CbmStsParAsic() { diff --git a/core/detectors/sts/CbmStsParAsic.h b/core/detectors/sts/CbmStsParAsic.h index 7721d226aef202597cf8d9f1b593c7b7a4ec19b4..af6f65191e993f8dfa0b889bedf2491b82a0dc7a 100644 --- a/core/detectors/sts/CbmStsParAsic.h +++ b/core/detectors/sts/CbmStsParAsic.h @@ -41,12 +41,12 @@ public: double noise, double znr); - /** @brief Copy constructor (disabled) **/ + /** @brief Copy constructor **/ CbmStsParAsic(const CbmStsParAsic&); /** @brief Move constructor (disabled) **/ - CbmStsParAsic(CbmStsParAsic&&) = default; + CbmStsParAsic(CbmStsParAsic&&); /** @brief Copy assignment operator **/ @@ -54,7 +54,7 @@ public: /** @brief Move assignment operator (disabled) **/ - CbmStsParAsic& operator=(CbmStsParAsic&&) = default; + CbmStsParAsic& operator=(CbmStsParAsic&&); /** @brief Destructor **/