From 5b17ed3974845c89768277294c7eb21d738e03ef Mon Sep 17 00:00:00 2001 From: "s.zharko@gsi.de" <s.zharko@gsi.de> Date: Fri, 5 May 2023 12:48:28 +0200 Subject: [PATCH] CA/KF: Warning fixes --- reco/KF/CbmKFTrackInterface.h | 4 ++-- reco/KF/Interface/CbmKFTrack.h | 20 ++++++++++---------- reco/L1/CbmL1TrackPar.h | 12 ++++++------ reco/L1/qa/CbmTofInteraction.cxx | 2 +- reco/L1/qa/CbmTofInteraction.h | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/reco/KF/CbmKFTrackInterface.h b/reco/KF/CbmKFTrackInterface.h index 6abf20dcb2..2e5c4956d2 100644 --- a/reco/KF/CbmKFTrackInterface.h +++ b/reco/KF/CbmKFTrackInterface.h @@ -35,8 +35,8 @@ public: /** Information not to be changed */ - virtual Double_t GetMass() { return 0.1396; } /// Mass hypothesis - virtual Bool_t IsElectron() { return 0; } /// Is it electron + virtual Double_t GetMass() const { return 0.1396; } /// Mass hypothesis + virtual Bool_t IsElectron() const { return 0; } /// Is it electron /** I/O parameters for extrapolation routines */ diff --git a/reco/KF/Interface/CbmKFTrack.h b/reco/KF/Interface/CbmKFTrack.h index fe3f4af26a..16dbac7f82 100644 --- a/reco/KF/Interface/CbmKFTrack.h +++ b/reco/KF/Interface/CbmKFTrack.h @@ -53,16 +53,16 @@ public: void SetPID(Int_t pidHypo); - Double_t* GetTrack() { return fT; } - Double_t* GetCovMatrix() { return fC; } - Double_t& GetRefChi2() { return fChi2; } - Int_t& GetRefNDF() { return fNDF; } - Double_t GetMass() { return fMass; } - Bool_t IsElectron() { return fIsElectron; } - Int_t GetNOfHits() { return fHits.size(); } - CbmKFHit* GetHit(Int_t i) { return fHits[i]; } - - ClassDef(CbmKFTrack, 1) + Double_t* GetTrack() override { return fT; } + Double_t* GetCovMatrix() override { return fC; } + Double_t& GetRefChi2() override { return fChi2; } + Int_t& GetRefNDF() override { return fNDF; } + Double_t GetMass() const override { return fMass; } + Bool_t IsElectron() const override { return fIsElectron; } + Int_t GetNOfHits() override { return fHits.size(); } + CbmKFHit* GetHit(Int_t i) override { return fHits[i]; } + + ClassDefOverride(CbmKFTrack, 1) }; #endif diff --git a/reco/L1/CbmL1TrackPar.h b/reco/L1/CbmL1TrackPar.h index 421d53e03c..6dd5cc7474 100644 --- a/reco/L1/CbmL1TrackPar.h +++ b/reco/L1/CbmL1TrackPar.h @@ -12,12 +12,12 @@ struct CbmL1TrackPar : public CbmKFTrackInterface { public: CbmL1TrackPar() : chi2(0), NDF(0), mass(0), is_electron(0) {} - double* GetTrack() { return T; } - double* GetCovMatrix() { return C; } - double& GetRefChi2() { return chi2; } - int& GetRefNDF() { return NDF; } - double GetMass() const { return mass; } - bool IsElectron() const { return is_electron; } + double* GetTrack() override { return T; } + double* GetCovMatrix() override { return C; } + double& GetRefChi2() override { return chi2; } + int& GetRefNDF() override { return NDF; } + double GetMass() const override { return mass; } + bool IsElectron() const override { return is_electron; } double T[L1TrackPar::kNparTr]; double C[L1TrackPar::kNparCov]; diff --git a/reco/L1/qa/CbmTofInteraction.cxx b/reco/L1/qa/CbmTofInteraction.cxx index f6ecac3db7..59624bb7ea 100644 --- a/reco/L1/qa/CbmTofInteraction.cxx +++ b/reco/L1/qa/CbmTofInteraction.cxx @@ -51,7 +51,7 @@ void CbmTofInteraction::AddPoint(const CbmTofPoint* pPoint) // --------------------------------------------------------------------------------------------------------------------- // -void CbmTofInteraction::Clear() +void CbmTofInteraction::Clear(Option_t*) { fTrackID = -1; fDetectorID = -1; diff --git a/reco/L1/qa/CbmTofInteraction.h b/reco/L1/qa/CbmTofInteraction.h index 33a65b8c6e..23259ed154 100644 --- a/reco/L1/qa/CbmTofInteraction.h +++ b/reco/L1/qa/CbmTofInteraction.h @@ -41,7 +41,7 @@ public: void AddPoint(const CbmTofPoint* pPoint); /// \brief Clears the instance - void Clear(); + void Clear(Option_t*); /// \brief Sets parameters from a particular TOF MC-point /// \param pPoint Pointer to TOF point -- GitLab