diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb2Sql.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb2Sql.h index 592dc485a46eccb60e36b402143bb470c8a8747f..9229d6be6606bae9361c076b2d5471348fc6da97 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb2Sql.h +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDb2Sql.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef AMDCDB_AMDCDB2SQL_H @@ -31,13 +31,13 @@ public: void SetUseKeysOn(int UseKeysOn); /**Production of sql files */ - void DoIt(std::string TagFileName,std::string tag,IRDBAccessSvc* pIRDBAccessSvc); + void DoIt(const std::string& TagFileName,const std::string& tag,IRDBAccessSvc* pIRDBAccessSvc); private: /////////////////////////////////// /**Base Production of sql files */ - void DoSql(std::string TagFileName,std::string NameOfTheSet,std::string tag, IRDBAccessSvc* pIRDBAccessSvc); + void DoSql(const std::string& TagFileName,const std::string& NameOfTheSet,std::string tag, IRDBAccessSvc* pIRDBAccessSvc); int m_AsNewTableOn ; //!< Control swl file prod int m_UseKeysOn ; //!< Control swl file prod diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbRecord.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbRecord.h index 8830b0b3e256af582ca35d33395e65e1e2ca3a49..111af6a8b30a12a9589127498ed59b366656aff1 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbRecord.h +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbRecord.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef AMDCDB_AMDCDBRECORD_H @@ -22,7 +22,7 @@ class AmdcDbRecord : public IRDBRecord{ public: - AmdcDbRecord(long UniversalId,std::string NameOfTheRecord); + AmdcDbRecord(long UniversalId,const std::string& NameOfTheRecord); virtual ~AmdcDbRecord(); public: diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h index 322fb11b52178d70f15d24003c66681bd240484e..146e63e14425763466379fa4016cf80bbe2918b1 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/AmdcDb/AmdcDbSvcMakerFromRDB.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #ifndef AMDCDB_AMDCDBSVCMAKERFROMRDB_H @@ -37,12 +37,12 @@ public: void SetEpsLengthMM(int EpsLengthMM); void SetEpsLengthCM(int EpsLengthCM); void SetEpsAngle (int EpsAngle ); - void SetEpsLengthMM(std::string NameOfTheSet, int EpsLengthMM); - void SetEpsLengthCM(std::string NameOfTheSet, int EpsLengthCM); - void SetEpsAngle (std::string NameOfTheSet, int EpsAngle ); + void SetEpsLengthMM(const std::string& NameOfTheSet, int EpsLengthMM); + void SetEpsLengthCM(const std::string& NameOfTheSet, int EpsLengthCM); + void SetEpsAngle (const std::string& NameOfTheSet, int EpsAngle ); void Set( - std::string detectorKey , - std::string detectorNode , + const std::string& detectorKey , + const std::string& detectorNode , IRDBAccessSvc* pIRDBAccessSvc, AmdcDbSvc* pAmdcDbSvc ); diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx index bec013addc0ebcce2741704b31d5ae336aa1a5c8..bef510fafb229d4ab33d12c433b809f16109b872 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "StoreGate/StoreGateSvc.h" @@ -27,7 +27,6 @@ AmdcDb::AmdcDb(const std::string& name,ISvcLocator* svc) m_AmdcDbSvcFromAmdc = 0 ; m_AmdcDbSvcFromRDB = 0 ; - m_AMDBtag = "" ; m_UglyCodeOn = 0 ; m_FromAmdcEpsLengthMM = 4 ; diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx index 5389b2f202a8ff7c2ed83ba8c93b2938602a2524..d18981ade24142b8741763897f072ff38fee3565 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDb2Sql.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "RDBAccessSvc/IRDBAccessSvc.h" @@ -26,7 +26,7 @@ AmdcDb2Sql::~AmdcDb2Sql(){} void AmdcDb2Sql::SetAsNewTableOn(int AsNewTableOn){ m_AsNewTableOn = AsNewTableOn ;} void AmdcDb2Sql::SetUseKeysOn(int UseKeysOn){ m_UseKeysOn = UseKeysOn ;} -void AmdcDb2Sql::DoIt(std::string TagFileName,std::string tag,IRDBAccessSvc* pIRDBAccessSvc){ +void AmdcDb2Sql::DoIt(const std::string& TagFileName,const std::string& tag,IRDBAccessSvc* pIRDBAccessSvc){ DoSql(TagFileName,"AMDC",tag,pIRDBAccessSvc); DoSql(TagFileName,"AGDD",tag,pIRDBAccessSvc); @@ -60,7 +60,7 @@ void AmdcDb2Sql::DoIt(std::string TagFileName,std::string tag,IRDBAccessSvc* pIR } -void AmdcDb2Sql::DoSql(std::string TagFileName,std::string NameOfTheSet,std::string tag, IRDBAccessSvc* pIRDBAccessSvc) { +void AmdcDb2Sql::DoSql(const std::string& TagFileName,const std::string& NameOfTheSet,std::string tag, IRDBAccessSvc* pIRDBAccessSvc) { std::ofstream OutFile; std::string FileName = TagFileName + "."; @@ -159,7 +159,7 @@ void AmdcDb2Sql::DoSql(std::string TagFileName,std::string NameOfTheSet,std::str int ElementKounter = -1; it = pIRDBRecordset->begin(); - for ( ; it<pIRDBRecordset->end(); it++){ + for ( ; it<pIRDBRecordset->end(); ++it){ pAmdcDbRecord = dynamic_cast<const AmdcDbRecord*>((*it)); if (pAmdcDbRecord == 0){ OutFile << "No way to cast in AmdcDbRecord for " << NameOfTheSet << std::endl; diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbRecord.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbRecord.cxx index 0e5b658bf2531d9ab80ad8068a60a6ee4f4e6f19..4c4cf5b61d989fa1f4ad208b754643216e01ee06 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbRecord.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbRecord.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "AmdcDb/AmdcDbRecord.h" @@ -8,7 +8,7 @@ #include <fstream> #include <iomanip> -AmdcDbRecord::AmdcDbRecord(long UniversalId,std::string NameOfTheRecord){ +AmdcDbRecord::AmdcDbRecord(long UniversalId,const std::string& NameOfTheRecord){ m_MapOfint["Dummy"] = 0 ; m_MapOfint.clear(); m_MapOfdouble["Dummy"] = 0. ; m_MapOfdouble.clear(); diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx index 55b09b2279dbed2625e844020763aacb65dc80a9..3efac076b372d4b41ec662afd5098bbf66700f4b 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromAmdc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "AmdcDb/AmdcDbSvcMakerFromAmdc.h" @@ -203,7 +203,7 @@ if (Ifound == 1 ){ DbVar = "JTYP" ; DbVarComment="AMDB STATION TYPE" ; iDbVal = DB_JTYP ; pAmdcDbRecord->addInt(DbVar,DbVarComment,iDbVal); - DbVar = "TYP" ; DbVarComment="AMDB STATION NAME" ; sDbVal = sDbVal = pAmdcsimrec->StationName(DB_JTYP) ; pAmdcDbRecord->addString(DbVar,DbVarComment,sDbVal); + DbVar = "TYP" ; DbVarComment="AMDB STATION NAME" ; sDbVal = pAmdcsimrec->StationName(DB_JTYP) ; pAmdcDbRecord->addString(DbVar,DbVarComment,sDbVal); //DRING: What is it? This a guess DbVar = "NSTA" ; DbVarComment="NUMBER OF STATIONS OF THIS TYPE" ; iDbVal = iDbVal_NSTA ; pAmdcDbRecord->addInt(DbVar,DbVarComment,iDbVal); diff --git a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx index 5d1aef2c40842cd14e61689c6f4ebf32c63a4e50..e87c4d87f77d4752ee5d1ef5d6fe6d872c5cdba0 100755 --- a/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx +++ b/MuonSpectrometer/Amdcsimrec/AmdcDb/src/AmdcDbSvcMakerFromRDB.cxx @@ -549,12 +549,12 @@ AmdcDbSvcMakerFromRDB::AmdcDbSvcMakerFromRDB(){ void AmdcDbSvcMakerFromRDB::SetEpsLengthMM(int EpsLengthMM){ m_EpsLengthMM = EpsLengthMM ;} void AmdcDbSvcMakerFromRDB::SetEpsLengthCM(int EpsLengthCM){ m_EpsLengthCM = EpsLengthCM ;} void AmdcDbSvcMakerFromRDB::SetEpsAngle(int EpsAngle){ m_EpsAngle = EpsAngle ;} -void AmdcDbSvcMakerFromRDB::SetEpsLengthMM(std::string NameOfTheSet, int EpsLengthMM) { m_Map_Set_EpsLengthMM[NameOfTheSet] = EpsLengthMM ; } -void AmdcDbSvcMakerFromRDB::SetEpsLengthCM(std::string NameOfTheSet, int EpsLengthCM) { m_Map_Set_EpsLengthCM[NameOfTheSet] = EpsLengthCM ; } -void AmdcDbSvcMakerFromRDB::SetEpsAngle (std::string NameOfTheSet, int EpsAngle ) { m_Map_Set_EpsAngle [NameOfTheSet] = EpsAngle ; } +void AmdcDbSvcMakerFromRDB::SetEpsLengthMM(const std::string& NameOfTheSet, int EpsLengthMM) { m_Map_Set_EpsLengthMM[NameOfTheSet] = EpsLengthMM ; } +void AmdcDbSvcMakerFromRDB::SetEpsLengthCM(const std::string& NameOfTheSet, int EpsLengthCM) { m_Map_Set_EpsLengthCM[NameOfTheSet] = EpsLengthCM ; } +void AmdcDbSvcMakerFromRDB::SetEpsAngle (const std::string& NameOfTheSet, int EpsAngle ) { m_Map_Set_EpsAngle [NameOfTheSet] = EpsAngle ; } void AmdcDbSvcMakerFromRDB::Set( - std::string detectorKey , - std::string detectorNode , + const std::string& detectorKey , + const std::string& detectorNode , IRDBAccessSvc* pIRDBAccessSvc, AmdcDbSvc* pAmdcDbSvc ){