diff --git a/Event/ByteStreamCnvSvcLegacy/ByteStreamCnvSvcLegacy/offline_EventStorage/v5_DataWriter.h b/Event/ByteStreamCnvSvcLegacy/ByteStreamCnvSvcLegacy/offline_EventStorage/v5_DataWriter.h index 0d11bd1199cbfb093892309431a9f5ddabd875f7..a2224310305021995d74152e3a3991918c2987cb 100644 --- a/Event/ByteStreamCnvSvcLegacy/ByteStreamCnvSvcLegacy/offline_EventStorage/v5_DataWriter.h +++ b/Event/ByteStreamCnvSvcLegacy/ByteStreamCnvSvcLegacy/offline_EventStorage/v5_DataWriter.h @@ -56,39 +56,39 @@ public: \param compression Compression type \param compLevel Compression level */ - DataWriter(const std::string writingPath, - const std::string fileNameCore, - const run_parameters_record rPar, - const std::vector<std::string> fmdStrings, + DataWriter(const std::string& writingPath, + const std::string& fileNameCore, + const run_parameters_record& rPar, + const std::vector<std::string>& fmdStrings, const unsigned int startIndex = 1, const CompressionType compression = NONE, const unsigned int compLevel = 1); - DataWriter(const std::string writingPath, + DataWriter(const std::string& writingPath, boost::shared_ptr<EventStorage::FileNameCallback> theFNCB, - const run_parameters_record rPar, - const std::string project, - const std::string streamType, - const std::string streamName, - const std::string stream, + const run_parameters_record& rPar, + const std::string& project, + const std::string& streamType, + const std::string& streamName, + const std::string& stream, const unsigned int lumiBlockNumber, - const std::string applicationName, - const std::vector<std::string> fmdStrings, + const std::string& applicationName, + const std::vector<std::string>& fmdStrings, const CompressionType compression = NONE, const unsigned int compLevel = 1); - DataWriter(const std::string writingPath, - const std::string fileNameCore, - const run_parameters_record rPar, - const std::string project, - const std::string streamType, - const std::string streamName, - const std::string stream, + DataWriter(const std::string& writingPath, + const std::string& fileNameCore, + const run_parameters_record& rPar, + const std::string& project, + const std::string& streamType, + const std::string& streamName, + const std::string& stream, const unsigned int lumiBlockNumber, - const std::string applicationName, - const std::vector<std::string> fmdStrings, + const std::string& applicationName, + const std::vector<std::string>& fmdStrings, const CompressionType compression = NONE, const unsigned int compLevel = 1); @@ -97,16 +97,16 @@ private: DataWriter(); - void initDW(const std::string writingPath, + void initDW(const std::string& writingPath, boost::shared_ptr<EventStorage::FileNameCallback> theFNCB, - const run_parameters_record rPar, - const std::string project, - const std::string streamType, - const std::string streamName, - const std::string stream, + const run_parameters_record& rPar, + const std::string& project, + const std::string& streamType, + const std::string& streamName, + const std::string& stream, const unsigned int lumiBlockNumber, - const std::string applicationName, - const std::vector<std::string> fmdStrings, + const std::string& applicationName, + const std::vector<std::string>& fmdStrings, const CompressionType compression, const unsigned int compLevel); diff --git a/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_DataBuffer.cxx b/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_DataBuffer.cxx index 7ca884a85faec7f6aba65da183168cfdd5a7c9ea..371f8bec8dd727e65ece24ad5c8ff2a736ba60d8 100644 --- a/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_DataBuffer.cxx +++ b/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_DataBuffer.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ @@ -21,6 +21,9 @@ public: m_buffer = new char[size]; m_buffersize = size; } + + implementation (const implementation&) = delete; + implementation& operator= (const implementation&) = delete; ~implementation() { delete[] m_buffer; } diff --git a/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_DataWriter.cxx b/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_DataWriter.cxx index 7fbbf10362e668adc55fc4f74700a6da4f8368d1..3599b5dfffc963f3075c3d506585c070b0b0525a 100644 --- a/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_DataWriter.cxx +++ b/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_DataWriter.cxx @@ -32,16 +32,16 @@ using EventStorage::SimpleFileName; // constructors DataWriter:: -DataWriter(const string writingPath, +DataWriter(const string& writingPath, boost::shared_ptr<FileNameCallback> theFNCB, - const run_parameters_record rPar, - const std::string project, - const std::string streamType, - const std::string streamName, - const std::string stream, + const run_parameters_record& rPar, + const std::string& project, + const std::string& streamType, + const std::string& streamName, + const std::string& stream, const unsigned int lumiBlockNumber, - const std::string applicationName, - const std::vector<std::string> fmdStrings, + const std::string& applicationName, + const std::vector<std::string>& fmdStrings, const CompressionType compression, const unsigned int compLevel) { @@ -50,10 +50,10 @@ DataWriter(const string writingPath, } DataWriter:: -DataWriter(const string writingPath, - const string fileNameCore, - const run_parameters_record rPar, - const freeMetaDataStrings fmdStrings, +DataWriter(const string& writingPath, + const string& fileNameCore, + const run_parameters_record& rPar, + const freeMetaDataStrings& fmdStrings, const unsigned int startIndex, const CompressionType compression, const unsigned int compLevel) @@ -95,16 +95,16 @@ DataWriter(const string writingPath, DataWriter:: -DataWriter(const string writingPath, - const string fileNameCore, - const run_parameters_record rPar, - const std::string project, - const std::string streamType, - const std::string streamName, - const std::string stream, +DataWriter(const string& writingPath, + const string& fileNameCore, + const run_parameters_record& rPar, + const std::string& project, + const std::string& streamType, + const std::string& streamName, + const std::string& stream, const unsigned int lumiBlockNumber, - const std::string applicationName, - const std::vector<std::string> fmdStrings, + const std::string& applicationName, + const std::vector<std::string>& fmdStrings, const CompressionType compression, const unsigned int compLevel) { @@ -128,16 +128,16 @@ DataWriter::~DataWriter() void DataWriter:: -initDW(const string writingPath, +initDW(const string& writingPath, boost::shared_ptr<FileNameCallback> theFNCB, - const run_parameters_record rPar, - const std::string project, - const std::string streamType, - const std::string streamName, - const std::string stream, + const run_parameters_record& rPar, + const std::string& project, + const std::string& streamType, + const std::string& streamName, + const std::string& stream, const unsigned int lumiBlockNumber, - const std::string applicationName, - const std::vector<std::string> fmdStrings, + const std::string& applicationName, + const std::vector<std::string>& fmdStrings, const CompressionType compression, const unsigned int compLevel) { diff --git a/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_Guid.h b/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_Guid.h index 9a97b32fcc72774cd6681ebabc6e6533c9cd88ec..cecf5214ead3d25c5ad96823f7f734eff4017524 100644 --- a/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_Guid.h +++ b/Event/ByteStreamCnvSvcLegacy/src/offline_EventStorage/v5_Guid.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // This is a warapper class for uuid. @@ -53,10 +53,9 @@ namespace offline_poolCopy_v5 { Data1 = g.Data1; Data2 = g.Data2; Data3 = g.Data3; - unsigned int *p = (unsigned int*)&Data4[0]; - const unsigned int *q = (const unsigned int*)&g.Data4[0]; - *(p+1) = *(q+1); - *p = *q; + for (size_t i = 0; i < 8; i++) { + Data4[i] = g.Data4[i]; + } } return *this; } diff --git a/TileCalorimeter/TileDetDescr/TileDetDescr/TileDddbManager.h b/TileCalorimeter/TileDetDescr/TileDetDescr/TileDddbManager.h index 70be59020de72f183f70d360a1a2c54917aee066..d97fd52d725f04692e0305a42751e90a15697689 100755 --- a/TileCalorimeter/TileDetDescr/TileDetDescr/TileDddbManager.h +++ b/TileCalorimeter/TileDetDescr/TileDetDescr/TileDddbManager.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef TileDddbManager_H @@ -40,8 +40,11 @@ class TileDddbManager }; TileDddbManager(IRDBAccessSvc* access, - std::string version_tag, - std::string version_node); + const std::string& version_tag, + const std::string& version_node); + + TileDddbManager (const TileDddbManager&) = delete; + TileDddbManager& operator= (const TileDddbManager&) = delete; virtual ~TileDddbManager() {} diff --git a/TileCalorimeter/TileDetDescr/src/TileDddbManager.cxx b/TileCalorimeter/TileDetDescr/src/TileDddbManager.cxx index 490af351843d63cb23410f6bf75fb4845133e273..a1222249d04098ebcc63941875e0aacbb4cc92e5 100755 --- a/TileCalorimeter/TileDetDescr/src/TileDddbManager.cxx +++ b/TileCalorimeter/TileDetDescr/src/TileDddbManager.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "TileDetDescr/TileDddbManager.h" @@ -16,8 +16,8 @@ #define MLOG(x) if (m_log->level()<=MSG::x) *m_log << MSG::x TileDddbManager::TileDddbManager(IRDBAccessSvc* access, - std::string version_tag, - std::string version_node) + const std::string& version_tag, + const std::string& version_node) : m_n_cuts(0) , m_n_saddle(0) , m_currentTileGlob(0) diff --git a/TileCalorimeter/TileSimEvent/TileSimEvent/TileHit.h b/TileCalorimeter/TileSimEvent/TileSimEvent/TileHit.h index 9c1ff36d28f108bd1d7e6c3fb3281f8cad43688e..a0e606306aa7f055eee2b4464c4bf1dd9e0645a4 100755 --- a/TileCalorimeter/TileSimEvent/TileSimEvent/TileHit.h +++ b/TileCalorimeter/TileSimEvent/TileSimEvent/TileHit.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ //******************************************************************** @@ -102,7 +102,7 @@ public: operator std::string() const; /** @brief Print contents of one vector to output stream */ - static void print_to_stream ( const std::vector<float> val, + static void print_to_stream ( const std::vector<float>& val, const std::string & label, std::ostringstream & text); diff --git a/TileCalorimeter/TileSimEvent/src/TileHit.cxx b/TileCalorimeter/TileSimEvent/src/TileHit.cxx index 6dd6c3ad8047f8f03b82faf5edfd428a932a6166..44263853ff10ce9a598de02ffb3fe717d4f92462 100755 --- a/TileCalorimeter/TileSimEvent/src/TileHit.cxx +++ b/TileCalorimeter/TileSimEvent/src/TileHit.cxx @@ -157,7 +157,7 @@ TileHit::operator std::string() const return text.str(); } -void TileHit::print_to_stream ( const std::vector<float> val, +void TileHit::print_to_stream ( const std::vector<float>& val, const std::string & label, std::ostringstream & text) {