From fb72f3221320dfd7f982284e9f60000bcc71e03e Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Wed, 28 Sep 2022 12:38:21 +0200 Subject: [PATCH] [ALCA] [GCC12] Fix build warnings --- .../interface/TEcnaParPaths.h | 12 ++++++------ .../interface/TEcnaRead.h | 10 +++++----- .../interface/TEcnaRun.h | 8 ++++---- .../interface/TEcnaWrite.h | 8 ++++---- .../src/TEcnaParPaths.cc | 12 ++++++------ .../src/TEcnaRead.cc | 10 +++++----- .../EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRun.cc | 8 ++++---- .../src/TEcnaWrite.cc | 8 ++++---- 8 files changed, 38 insertions(+), 38 deletions(-) diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h index 492290023c5bc..e809776f5f531 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h @@ -75,12 +75,12 @@ class TEcnaParPaths : public TObject { Bool_t GetPaths(); - TString ResultsRootFilePath(); - TString ResultsAsciiFilePath(); - TString HistoryRunListFilePath(); - TString CMSSWBase(); - TString CMSSWSubsystem(); - TString SCRAMArch(); + const TString &ResultsRootFilePath() const; + const TString &ResultsAsciiFilePath() const; + const TString &HistoryRunListFilePath() const; + const TString &CMSSWBase() const; + const TString &CMSSWSubsystem() const; + const TString &SCRAMArch() const; void SetResultsRootFilePath(const TString &); void SetResultsAsciiFilePath(const TString &); diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h index c4f755e93b78a..bc92c0622551b 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h @@ -531,7 +531,7 @@ class TEcnaRead : public TObject { TMatrixD ReadHighFrequencyMeanCorrelationsBetweenStins(const Int_t &); // 1 of (Stin,Stin) //------------------------------------------------------------------------------------------------ - TString GetAnalysisName(); + const TString &GetAnalysisName() const; Int_t GetNbOfSamples(); Int_t GetRunNumber(); Int_t GetFirstReqEvtNumber(); @@ -541,10 +541,10 @@ class TEcnaRead : public TObject { time_t GetStartTime(); time_t GetStopTime(); - TString GetStartDate(); - TString GetStopDate(); - TString GetRootFileName(); - TString GetRootFileNameShort(); + const TString &GetStartDate() const; + const TString &GetStopDate() const; + const TString &GetRootFileName() const; + const TString &GetRootFileNameShort() const; TString GetRunType(); diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRun.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRun.h index 3ae064d9cb7ad..bffa088fb942e 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRun.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRun.h @@ -614,10 +614,10 @@ class TEcnaRun : public TObject { void HighFrequencyMeanCorrelationsBetweenStins(); //...................................... ROOT file methods - TString GetRootFileName(); - TString GetRootFileNameShort(); - TString GetNewRootFileName(); - TString GetNewRootFileNameShort(); + const TString& GetRootFileName() const; + const TString& GetRootFileNameShort() const; + const TString& GetNewRootFileName() const; + const TString& GetNewRootFileNameShort() const; Bool_t WriteRootFile(); Bool_t WriteNewRootFile(const TString&); diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h index c983faecfea21..ce5528ce6720d 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h @@ -167,10 +167,10 @@ class TEcnaWrite : public TObject { void WriteAsciiHisto(const TString&, const Int_t&, const TVectorD&); //........................................................................... - TString GetAsciiFileName(); - TString GetRootFileName(); - TString GetRootFileNameShort(); - TString GetAnalysisName(); + const TString& GetAsciiFileName() const; + const TString& GetRootFileName() const; + const TString& GetRootFileNameShort() const; + const TString& GetAnalysisName() const; Int_t GetNbOfSamples(); Int_t GetRunNumber(); diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParPaths.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParPaths.cc index 83420558c47e5..a61a83e9bfa61 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParPaths.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaParPaths.cc @@ -349,12 +349,12 @@ void TEcnaParPaths::GetCMSSWParameters() { // M E T H O D S T O R E T U R N T H E P A R A M E T E R S // //======================================================================================= -TString TEcnaParPaths::ResultsRootFilePath() { return fCfgResultsRootFilePath; } -TString TEcnaParPaths::ResultsAsciiFilePath() { return fCfgResultsAsciiFilePath; } -TString TEcnaParPaths::HistoryRunListFilePath() { return fCfgHistoryRunListFilePath; } -TString TEcnaParPaths::CMSSWBase() { return fCfgCMSSWBase; } -TString TEcnaParPaths::CMSSWSubsystem() { return fCfgCMSSWSubsystem; } -TString TEcnaParPaths::SCRAMArch() { return fCfgSCRAMArch; } +const TString &TEcnaParPaths::ResultsRootFilePath() const { return fCfgResultsRootFilePath; } +const TString &TEcnaParPaths::ResultsAsciiFilePath() const { return fCfgResultsAsciiFilePath; } +const TString &TEcnaParPaths::HistoryRunListFilePath() const { return fCfgHistoryRunListFilePath; } +const TString &TEcnaParPaths::CMSSWBase() const { return fCfgCMSSWBase; } +const TString &TEcnaParPaths::CMSSWSubsystem() const { return fCfgCMSSWSubsystem; } +const TString &TEcnaParPaths::SCRAMArch() const { return fCfgSCRAMArch; } //..................................................................................... TString TEcnaParPaths::PathModulesData() { diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc index 13881d4d88b2d..85be149f9a152 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRead.cc @@ -815,7 +815,7 @@ void TEcnaRead::FileParameters(const TString &typ_ana, // GetLastReqEvtNumber, GetReqNbOfEvts, GetStexNumber // //========================================================================= -TString TEcnaRead::GetAnalysisName() { return fFileHeader->fTypAna; } +const TString &TEcnaRead::GetAnalysisName() const { return fFileHeader->fTypAna; } Int_t TEcnaRead::GetNbOfSamples() { return fFileHeader->fNbOfSamples; } Int_t TEcnaRead::GetRunNumber() { return fFileHeader->fRunNumber; } Int_t TEcnaRead::GetFirstReqEvtNumber() { return fFileHeader->fFirstReqEvtNumber; } @@ -829,8 +829,8 @@ Int_t TEcnaRead::GetStexNumber() { return fFileHeader->fStex; } //========================================================================= time_t TEcnaRead::GetStartTime() { return fFileHeader->fStartTime; } time_t TEcnaRead::GetStopTime() { return fFileHeader->fStopTime; } -TString TEcnaRead::GetStartDate() { return fFileHeader->fStartDate; } -TString TEcnaRead::GetStopDate() { return fFileHeader->fStopDate; } +const TString &TEcnaRead::GetStartDate() const { return fFileHeader->fStartDate; } +const TString &TEcnaRead::GetStopDate() const { return fFileHeader->fStopDate; } TString TEcnaRead::GetRunType() { TString cType = "run type not defined"; Int_t numtype = fFileHeader->fRunType; @@ -4209,8 +4209,8 @@ TString TEcnaRead::GetTypeOfQuantity(const CnaResultTyp arg_typ) { // Get the ROOT file name (long and short) // //------------------------------------------------------------------------- -TString TEcnaRead::GetRootFileName() { return fCnaWrite->GetRootFileName(); } -TString TEcnaRead::GetRootFileNameShort() { return fCnaWrite->GetRootFileNameShort(); } +const TString &TEcnaRead::GetRootFileName() const { return fCnaWrite->GetRootFileName(); } +const TString &TEcnaRead::GetRootFileNameShort() const { return fCnaWrite->GetRootFileNameShort(); } //------------------------------------------------------------------------- // // GetStexStinFromIndex diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRun.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRun.cc index 6a01070bcfb06..67e72405e3973 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRun.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaRun.cc @@ -1326,8 +1326,8 @@ Bool_t TEcnaRun::ReadSampleAdcValues(const Int_t& nb_samp_for_calc) { // Get the ROOT file name (long and short) // //------------------------------------------------------------------------- -TString TEcnaRun::GetRootFileName() { return fRootFileName; } -TString TEcnaRun::GetRootFileNameShort() { return fRootFileNameShort; } +const TString& TEcnaRun::GetRootFileName() const { return fRootFileName; } +const TString& TEcnaRun::GetRootFileNameShort() const { return fRootFileNameShort; } //################################################################################################### // @@ -3426,8 +3426,8 @@ Bool_t TEcnaRun::WriteNewRootFile(const TString& TypAna) { // (called by TEcnaGui in Calculations method) // //------------------------------------------------------------------------- -TString TEcnaRun::GetNewRootFileName() { return fNewRootFileName; } -TString TEcnaRun::GetNewRootFileNameShort() { return fNewRootFileNameShort; } +const TString& TEcnaRun::GetNewRootFileName() const { return fNewRootFileName; } +const TString& TEcnaRun::GetNewRootFileNameShort() const { return fNewRootFileNameShort; } //-------------------------------------------------------------------- // diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc index fb8b0915cc206..c5484a9d54565 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/src/TEcnaWrite.cc @@ -382,10 +382,10 @@ void TEcnaWrite::SetEcalSubDetector(const TString& SubDet, TEcnaParEcal* pEcal, // Int_t fStexNumber = super_module // //------------------------------------------------------------------------- -TString TEcnaWrite::GetAsciiFileName() { return fAsciiFileName; } -TString TEcnaWrite::GetRootFileName() { return fRootFileName; } -TString TEcnaWrite::GetRootFileNameShort() { return fRootFileNameShort; } -TString TEcnaWrite::GetAnalysisName() { return fAnaType; } +const TString& TEcnaWrite::GetAsciiFileName() const { return fAsciiFileName; } +const TString& TEcnaWrite::GetRootFileName() const { return fRootFileName; } +const TString& TEcnaWrite::GetRootFileNameShort() const { return fRootFileNameShort; } +const TString& TEcnaWrite::GetAnalysisName() const { return fAnaType; } Int_t TEcnaWrite::GetNbOfSamples() { return fNbOfSamples; } Int_t TEcnaWrite::GetRunNumber() { return fRunNumber; } Int_t TEcnaWrite::GetFirstReqEvtNumber() { return fFirstReqEvtNumber; }