From f9c1ab155d5ea5005684d48046b99dac1c2adf98 Mon Sep 17 00:00:00 2001
From: Dmitry Popov <Dmitry.Popov@cern.ch>
Date: Mon, 19 Mar 2018 13:30:29 +0100
Subject: [PATCH] Fixed override warnings

---
 .../include/DetectorConstruction.hh           | 42 +++++++++----------
 .../include/DetectorMessenger.hh              | 16 +++----
 .../include/PhysicsList.hh                    |  6 +--
 .../include/PhysicsListMessenger.hh           | 16 +++----
 .../include/PrimaryGeneratorAction.hh         | 10 ++---
 .../include/PrimaryGeneratorMessenger.hh      |  8 ++--
 .../include/ProcessesCount.hh                 |  6 +--
 .../include/RunAction.hh                      |  8 ++--
 .../include/StackingAction.hh                 |  6 +--
 .../include/StepMax.hh                        | 14 +++----
 .../include/StepMaxMessenger.hh               |  6 +--
 .../include/SteppingAction.hh                 |  4 +-
 .../include/SteppingVerbose.hh                | 10 ++---
 13 files changed, 75 insertions(+), 77 deletions(-)

diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorConstruction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorConstruction.hh
index 6343cc7..e89b2c9 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorConstruction.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorConstruction.hh
@@ -48,50 +48,50 @@ class DetectorMessenger;
 class DetectorConstruction : public G4VUserDetectorConstruction
 {
   public:
-  
+
     DetectorConstruction(G4float);
    ~DetectorConstruction();
 
   public:
-  
-     virtual G4VPhysicalVolume* Construct();
-     
+
+     G4VPhysicalVolume* Construct() override;
+
      void SetBoxDepth        (G4double);
-     void SetSizeXY       (G4double);       
-     void SetMaterial    (const G4String&);            
+     void SetSizeXY       (G4double);
+     void SetMaterial    (const G4String&);
      void SetMagField    (G4double);
-     void SetMaxStepSize (G4double);     
+     void SetMaxStepSize (G4double);
 
      void UpdateGeometry();
-     
+
   public:
-  
+
      const
-     G4VPhysicalVolume* GetWorld()      {return fP_Box;};           
-                    
-     G4double           GetXYSize()       {return fBoxXY;};      
-     G4double           GetBoxDepth()       {return fBoxDepth;};      
+     G4VPhysicalVolume* GetWorld()      {return fP_Box;};
+
+     G4double           GetXYSize()       {return fBoxXY;};
+     G4double           GetBoxDepth()       {return fBoxDepth;};
      G4Material*        GetMaterial()   {return fMaterial;};
-     
+
      void               PrintParameters();
-                       
+
   private:
-  
+
      G4VPhysicalVolume*    fP_Box;
      G4LogicalVolume*      fL_Box;
-     
+
      G4double              fBoxDepth;
      G4double              fBoxXY;
-     G4Material*           fMaterial;     
+     G4Material*           fMaterial;
      G4UniformMagField*    fMagField;
      G4UserLimits*         fUserLimits;
-     
+
      DetectorMessenger* fDetectorMessenger;
 
   private:
-    
+
      void               DefineMaterials();
-     G4VPhysicalVolume* ConstructVolumes();     
+     G4VPhysicalVolume* ConstructVolumes();
 };
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorMessenger.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorMessenger.hh
index 9086864..7bc1a6c 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorMessenger.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/DetectorMessenger.hh
@@ -48,22 +48,22 @@ class G4UIcmdWithoutParameter;
 class DetectorMessenger: public G4UImessenger
 {
   public:
-  
+
     DetectorMessenger(DetectorConstruction* );
    ~DetectorMessenger();
-    
-    virtual void SetNewValue(G4UIcommand*, G4String);
-    
+
+    void SetNewValue(G4UIcommand*, G4String) override;
+
   private:
-  
+
     DetectorConstruction*      fDetector;
-    
+
     G4UIdirectory*             fTestemDir;
-    G4UIdirectory*             fDetDir;    
+    G4UIdirectory*             fDetDir;
     G4UIcmdWithAString*        fMaterCmd;
     G4UIcmdWithADoubleAndUnit* fSizeCmd;
     G4UIcmdWithADoubleAndUnit* fMagFieldCmd;
-    G4UIcmdWithADoubleAndUnit* fMaxStepCmd;    
+    G4UIcmdWithADoubleAndUnit* fMaxStepCmd;
     G4UIcmdWithoutParameter*   fUpdateCmd;
 };
 
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsList.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsList.hh
index ff0c0ec..7520d00 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsList.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsList.hh
@@ -56,8 +56,8 @@ class PhysicsList: public G4VModularPhysicsList
     virtual ~PhysicsList();
 
     // Construct particles
-    virtual void ConstructParticle();
-    virtual void ConstructProcess();
+    void ConstructParticle() override;
+    void ConstructProcess() override;
 
     void AddPhysicsList(const G4String& name);
     void ConstructHighEnergy();
@@ -71,7 +71,7 @@ class PhysicsList: public G4VModularPhysicsList
     void SetAnnihiToHadronFac(G4double);
 
   private:
- 
+
     G4VPhysicsConstructor* fEmPhysicsList;
     G4VPhysicsConstructor* fDecayPhysicsList;
     G4String fEmName;
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsListMessenger.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsListMessenger.hh
index 8b866cb..473e0fb 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsListMessenger.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PhysicsListMessenger.hh
@@ -48,21 +48,21 @@ class G4UIcmdWithAString;
 class PhysicsListMessenger: public G4UImessenger
 {
   public:
-  
+
     PhysicsListMessenger(PhysicsList*);
    ~PhysicsListMessenger();
-    
-    virtual void SetNewValue(G4UIcommand*, G4String);
-    
+
+    void SetNewValue(G4UIcommand*, G4String) override;
+
   private:
-  
+
     PhysicsList*        fPhysList;
-    
-    G4UIdirectory*      fPhysDir;    
+
+    G4UIdirectory*      fPhysDir;
     G4UIcmdWithADouble* fGammaToMuPairFacCmd;
     G4UIcmdWithADouble* fGammaToEPairFacCmd;
     G4UIcmdWithADouble* fAnnihiToMuPairFacCmd;
-    G4UIcmdWithADouble* fAnnihiToHadronFacCmd;    
+    G4UIcmdWithADouble* fAnnihiToHadronFacCmd;
     G4UIcmdWithAString* fListCmd;
 
 };
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorAction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorAction.hh
index 3177e91..45b3517 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorAction.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorAction.hh
@@ -47,18 +47,18 @@ class PrimaryGeneratorMessenger;
 class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
 {
   public:
-    PrimaryGeneratorAction(DetectorConstruction*, G4double, G4int);    
+    PrimaryGeneratorAction(DetectorConstruction*, G4double, G4int);
    ~PrimaryGeneratorAction();
 
   public:
-    void SetRndmBeam(G4double val)  {fRndmBeam = val;}   
-    virtual void GeneratePrimaries(G4Event*);
+    void SetRndmBeam(G4double val)  {fRndmBeam = val;}
+    void GeneratePrimaries(G4Event*) override;
 
   private:
     G4ParticleGun*             fParticleGun;
     DetectorConstruction*      fDetector;
-    G4double                   fRndmBeam;       
-    PrimaryGeneratorMessenger* fGunMessenger;     
+    G4double                   fRndmBeam;
+    PrimaryGeneratorMessenger* fGunMessenger;
 };
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorMessenger.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorMessenger.hh
index 453752a..0e08a95 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorMessenger.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/PrimaryGeneratorMessenger.hh
@@ -48,12 +48,12 @@ class PrimaryGeneratorMessenger: public G4UImessenger
   public:
     PrimaryGeneratorMessenger(PrimaryGeneratorAction*);
    ~PrimaryGeneratorMessenger();
-    
-    virtual void SetNewValue(G4UIcommand*, G4String);
-    
+
+    void SetNewValue(G4UIcommand*, G4String) override;
+
   private:
     PrimaryGeneratorAction*    fAction;
-    G4UIdirectory*             fGunDir;     
+    G4UIdirectory*             fGunDir;
     G4UIcmdWithADouble*        fRndmCmd;
 };
 
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/ProcessesCount.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/ProcessesCount.hh
index c9c5841..bf1c904 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/ProcessesCount.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/ProcessesCount.hh
@@ -44,12 +44,12 @@ class OneProcessCount
 public:
     OneProcessCount(G4String name) {fName=name; fCounter=0;};
    ~OneProcessCount() {};
-   
+
 public:
     G4String  GetName()       {return fName;};
-    G4int     GetCounter()    {return fCounter;};        
+    G4int     GetCounter()    {return fCounter;};
     void      Count()         {fCounter++;};
-    
+
 private:
     G4String fName;            // process name
     G4int    fCounter;         // process counter
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/RunAction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/RunAction.hh
index 95d3ffc..6d942a4 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/RunAction.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/RunAction.hh
@@ -55,10 +55,10 @@ class RunAction : public G4UserRunAction
    ~RunAction();
 
   public:
-    virtual void BeginOfRunAction(const G4Run*);
-    virtual void   EndOfRunAction(const G4Run*);
-    void     CountProcesses(G4String);
-    
+    void BeginOfRunAction(const G4Run*) override;
+    void EndOfRunAction(const G4Run*) override;
+    void CountProcesses(G4String);
+
   private:
     DetectorConstruction* fDetector;
     ProcessesCount*       fProcCounter;
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StackingAction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StackingAction.hh
index 81a3f7a..b0b44d3 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StackingAction.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StackingAction.hh
@@ -27,7 +27,7 @@
 /// \brief Definition of the StackingAction class
 //
 // $Id: StackingAction.hh 66241 2012-12-13 18:34:42Z gunter $
-// 
+//
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
@@ -48,8 +48,8 @@ class StackingAction : public G4UserStackingAction
     StackingAction();
    ~StackingAction();
 
-    virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* );
-    
+    G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* ) override;
+
 };
 
 #endif
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMax.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMax.hh
index d3fe816..e4b0186 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMax.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMax.hh
@@ -54,17 +54,15 @@ public:
 
   inline G4double GetMaxStep() { return fMaxChargedStep; };
 
-  virtual G4bool IsApplicable(const G4ParticleDefinition&);
+  G4bool IsApplicable(const G4ParticleDefinition&) override;
 
-  virtual G4double 
-  PostStepGetPhysicalInteractionLength(const G4Track& track,
-                                       G4double previousStepSize,
-                                       G4ForceCondition* condition);
+  G4double PostStepGetPhysicalInteractionLength(const G4Track& track,
+                                                G4double previousStepSize,
+                                                G4ForceCondition* condition) override;
 
-  virtual G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&);
+  G4VParticleChange* PostStepDoIt(const G4Track&, const G4Step&) override;
 
-  virtual G4double 
-  GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*);
+  G4double GetMeanFreePath(const G4Track&, G4double, G4ForceCondition*) override;
 
 private:
 
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMaxMessenger.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMaxMessenger.hh
index 4b392de..ed1efaa 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMaxMessenger.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/StepMaxMessenger.hh
@@ -48,9 +48,9 @@ public:
 
   StepMaxMessenger(StepMax*);
   ~StepMaxMessenger();
-    
-  virtual void SetNewValue(G4UIcommand*, G4String);
-    
+
+  void SetNewValue(G4UIcommand*, G4String) override;
+
 private:
   StepMax* fStepMax;
   G4UIcmdWithADoubleAndUnit* fStepMaxCmd;
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingAction.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingAction.hh
index 0f0c8f1..bc835af 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingAction.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingAction.hh
@@ -47,8 +47,8 @@ public:
   SteppingAction(RunAction*);
  ~SteppingAction();
 
-  virtual void UserSteppingAction(const G4Step*);
-    
+  void UserSteppingAction(const G4Step*) override;
+
 private:
   RunAction* fRunAction;
   G4double   fMuonMass;
diff --git a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingVerbose.hh b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingVerbose.hh
index 07ef0a9..280d0de 100644
--- a/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingVerbose.hh
+++ b/LHCbG4Tests/G4GammaToDiLeptonConversionTest/include/SteppingVerbose.hh
@@ -28,7 +28,7 @@
 //
 //
 // $Id: SteppingVerbose.hh 98272 2016-07-04 17:56:04Z gcosmo $
-// 
+//
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 
@@ -41,13 +41,13 @@
 
 class SteppingVerbose : public G4SteppingVerbose {
 
-public:   
+public:
 
   SteppingVerbose();
  ~SteppingVerbose();
- 
-  virtual void TrackingStarted();
-  virtual void StepInfo();
+
+  void TrackingStarted() override;
+  void StepInfo() override;
 };
 
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
-- 
GitLab