From cd547b81bb99dfc5ec69b7e31fb95c685255b04b Mon Sep 17 00:00:00 2001 From: Dmitry Popov <Dmitry.Popov@cern.ch> Date: Tue, 23 Jan 2018 14:38:31 +0100 Subject: [PATCH] Fix warnings in G4HadronicXSectionsTest --- LHCbG4Tests/G4HadronicXSectionsTest/CMakeLists.txt | 5 +---- .../G4HadronicXSectionsTest/include/ActionInitialization.hh | 4 ++-- .../G4HadronicXSectionsTest/include/DetectorConstruction.hh | 2 +- .../G4HadronicXSectionsTest/include/DetectorMessenger.hh | 2 +- LHCbG4Tests/G4HadronicXSectionsTest/include/EventAction.hh | 4 ++-- .../G4HadronicXSectionsTest/include/EventActionMessenger.hh | 2 +- .../G4HadronicXSectionsTest/include/HistoManagerMessenger.hh | 2 +- .../include/PrimaryGeneratorAction.hh | 2 +- LHCbG4Tests/G4HadronicXSectionsTest/include/RunAction.hh | 4 ++-- 9 files changed, 12 insertions(+), 15 deletions(-) diff --git a/LHCbG4Tests/G4HadronicXSectionsTest/CMakeLists.txt b/LHCbG4Tests/G4HadronicXSectionsTest/CMakeLists.txt index e347619..afccb78 100644 --- a/LHCbG4Tests/G4HadronicXSectionsTest/CMakeLists.txt +++ b/LHCbG4Tests/G4HadronicXSectionsTest/CMakeLists.txt @@ -5,7 +5,7 @@ gaudi_depends_on_subdirs(LHCbG4PhysLists) find_package(CLHEP REQUIRED) -include_directories(${CMAKE_INSTALL_PREFIX}/include) +include_directories(SYSTEM ${CMAKE_INSTALL_PREFIX}/include ${CLHEP_INCLUDE_DIRS}) link_directories(${CMAKE_INSTALL_PREFIX}/lib) set(Geant4_LIBRARIES @@ -28,7 +28,4 @@ gaudi_add_executable(G4HadronicXSectionsTest add_dependencies(G4HadronicXSectionsTest Geant4) -# Dirty fix to disable the pesky warning -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override") - gaudi_install_scripts() diff --git a/LHCbG4Tests/G4HadronicXSectionsTest/include/ActionInitialization.hh b/LHCbG4Tests/G4HadronicXSectionsTest/include/ActionInitialization.hh index c0a065d..a5fa549 100644 --- a/LHCbG4Tests/G4HadronicXSectionsTest/include/ActionInitialization.hh +++ b/LHCbG4Tests/G4HadronicXSectionsTest/include/ActionInitialization.hh @@ -49,9 +49,9 @@ public: virtual ~ActionInitialization(); - virtual void Build() const; + void Build() const override; - virtual void BuildForMaster() const; + void BuildForMaster() const override; private: diff --git a/LHCbG4Tests/G4HadronicXSectionsTest/include/DetectorConstruction.hh b/LHCbG4Tests/G4HadronicXSectionsTest/include/DetectorConstruction.hh index 1ae4773..fce940a 100644 --- a/LHCbG4Tests/G4HadronicXSectionsTest/include/DetectorConstruction.hh +++ b/LHCbG4Tests/G4HadronicXSectionsTest/include/DetectorConstruction.hh @@ -58,7 +58,7 @@ public: DetectorConstruction(); virtual ~DetectorConstruction(); - virtual G4VPhysicalVolume* Construct(); + G4VPhysicalVolume* Construct() override; void SetWorldMaterial(const G4String&); void SetTargetMaterial(const G4String&); diff --git a/LHCbG4Tests/G4HadronicXSectionsTest/include/DetectorMessenger.hh b/LHCbG4Tests/G4HadronicXSectionsTest/include/DetectorMessenger.hh index fd3034e..ee43577 100644 --- a/LHCbG4Tests/G4HadronicXSectionsTest/include/DetectorMessenger.hh +++ b/LHCbG4Tests/G4HadronicXSectionsTest/include/DetectorMessenger.hh @@ -63,7 +63,7 @@ public: DetectorMessenger(DetectorConstruction* ); virtual ~DetectorMessenger(); - virtual void SetNewValue(G4UIcommand*, G4String); + void SetNewValue(G4UIcommand*, G4String) override; private: diff --git a/LHCbG4Tests/G4HadronicXSectionsTest/include/EventAction.hh b/LHCbG4Tests/G4HadronicXSectionsTest/include/EventAction.hh index 3befacf..daa0383 100755 --- a/LHCbG4Tests/G4HadronicXSectionsTest/include/EventAction.hh +++ b/LHCbG4Tests/G4HadronicXSectionsTest/include/EventAction.hh @@ -59,8 +59,8 @@ public: // Without description EventAction(); virtual ~EventAction(); - virtual void BeginOfEventAction(const G4Event*); - virtual void EndOfEventAction(const G4Event*); + void BeginOfEventAction(const G4Event*) override; + void EndOfEventAction(const G4Event*) override; inline void SetPrintModulo(G4int val); inline void AddEventToDebug(G4int val); diff --git a/LHCbG4Tests/G4HadronicXSectionsTest/include/EventActionMessenger.hh b/LHCbG4Tests/G4HadronicXSectionsTest/include/EventActionMessenger.hh index b98b699..24f48df 100644 --- a/LHCbG4Tests/G4HadronicXSectionsTest/include/EventActionMessenger.hh +++ b/LHCbG4Tests/G4HadronicXSectionsTest/include/EventActionMessenger.hh @@ -59,7 +59,7 @@ public: EventActionMessenger(EventAction*); virtual ~EventActionMessenger(); - virtual void SetNewValue(G4UIcommand*, G4String); + void SetNewValue(G4UIcommand*, G4String) override; private: diff --git a/LHCbG4Tests/G4HadronicXSectionsTest/include/HistoManagerMessenger.hh b/LHCbG4Tests/G4HadronicXSectionsTest/include/HistoManagerMessenger.hh index 8ecc111..89bf051 100644 --- a/LHCbG4Tests/G4HadronicXSectionsTest/include/HistoManagerMessenger.hh +++ b/LHCbG4Tests/G4HadronicXSectionsTest/include/HistoManagerMessenger.hh @@ -63,7 +63,7 @@ public: HistoManagerMessenger(HistoManager* ); virtual ~HistoManagerMessenger(); - virtual void SetNewValue(G4UIcommand*, G4String); + void SetNewValue(G4UIcommand*, G4String) override; private: diff --git a/LHCbG4Tests/G4HadronicXSectionsTest/include/PrimaryGeneratorAction.hh b/LHCbG4Tests/G4HadronicXSectionsTest/include/PrimaryGeneratorAction.hh index 675a8d2..faf50d7 100644 --- a/LHCbG4Tests/G4HadronicXSectionsTest/include/PrimaryGeneratorAction.hh +++ b/LHCbG4Tests/G4HadronicXSectionsTest/include/PrimaryGeneratorAction.hh @@ -56,7 +56,7 @@ public: PrimaryGeneratorAction(); virtual ~PrimaryGeneratorAction(); - virtual void GeneratePrimaries(G4Event*); + void GeneratePrimaries(G4Event*) override; private: diff --git a/LHCbG4Tests/G4HadronicXSectionsTest/include/RunAction.hh b/LHCbG4Tests/G4HadronicXSectionsTest/include/RunAction.hh index 2dda11c..447c968 100755 --- a/LHCbG4Tests/G4HadronicXSectionsTest/include/RunAction.hh +++ b/LHCbG4Tests/G4HadronicXSectionsTest/include/RunAction.hh @@ -61,10 +61,10 @@ public: // Without description public: // With description - virtual void BeginOfRunAction(const G4Run*); + void BeginOfRunAction(const G4Run*) override; // In this method histogramms are booked - virtual void EndOfRunAction(const G4Run*); + void EndOfRunAction(const G4Run*) override; // In this method bookHisto method is called in which histogramms are filled private: -- GitLab