diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolConverter.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolConverter.h index e17016d12e3a1e30cc36c56a9b344b5d84745531..dddaeb7b43356a4ffa44b69f8d01238ba0ef17c3 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolConverter.h +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolConverter.h @@ -124,7 +124,7 @@ protected: // data const Token* m_i_poolToken; typedef std::mutex CallMutex; - mutable CallMutex m_conv_mut; + CallMutex m_conv_mut; }; #endif diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustCnv.icc index ce08dc6147df618f732ceec86a765c9230ffe417..986176a84ed8f48775084efa8d700a835f0fcc3f 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustCnv.icc +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustCnv.icc @@ -169,8 +169,10 @@ T_AthenaPoolCustCnv<TRANS, PERS>::PoolToDataObject(DataObject*& pObj, // the object that will be read next. Required by compareClassGuid() template <class TRANS, class PERS> inline void T_AthenaPoolCustCnv<TRANS, PERS>::setToken(const std::string& token_str) { - if (this->m_i_poolToken == nullptr) this->m_i_poolToken = new Token; - const_cast<Token*>(this->m_i_poolToken)->fromString(token_str); + delete this->m_i_poolToken; this->m_i_poolToken = nullptr; + Token* token = new Token; + token->fromString(token_str); + this->m_i_poolToken = token; token = nullptr; m_classID = this->m_i_poolToken->classID(); } //__________________________________________________________________________ diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h index 20c0dcae5cda44f458f9916d73de92fa8240a533..b768d363ed9f420c6272ef576abf93d74fd7cce7 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.h @@ -214,7 +214,7 @@ private: // properties /// Output FileNames to be associated with Stream Clients StringArrayProperty m_streamClientFilesProp; - mutable std::vector<std::string> m_streamClientFiles; + std::vector<std::string> m_streamClientFiles; /// MaxFileSizes, vector with maximum file sizes for Athena POOL output files StringArrayProperty m_maxFileSizes; @@ -225,7 +225,7 @@ private: // properties /// default = false. BooleanProperty m_persSvcPerOutput; unsigned outputContextId(const std::string& outputConnection); - mutable std::mutex m_mutex; // mutable so const functions can lock + std::mutex m_mutex; /// SkipFirstChronoCommit, boolean property to skip the first commit in the chrono stats so the first /// container being committed to disk is not 'tainted' with the POOL overhead diff --git a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h index 4b203cf22e14fe8955db5ac976154d1e7773f06a..badf82c2f59ad098a015524db72bdc028ba1e7ec 100644 --- a/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h +++ b/Database/AthenaPOOL/PoolSvc/src/PoolSvc.h @@ -186,7 +186,7 @@ private: // data coral::Context* m_context{nullptr}; pool::IFileCatalog* m_catalog{nullptr}; std::vector<pool::IPersistencySvc*> m_persistencySvcVec; - mutable std::vector<CallMutex*> m_pers_mut; + std::vector<CallMutex*> m_pers_mut; std::map<std::string, unsigned int> m_contextLabel; std::string m_mainOutputLabel{}; std::map<unsigned int, unsigned int> m_contextMaxFile;