From f25e6dac201a3e8bea209f1626e9f14754a609b1 Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Sun, 30 Oct 2022 10:41:28 +0100 Subject: [PATCH] Add override statements to virtual override functions --- DDG4/include/DDG4/Geant4GeneratorAction.h | 8 ++++---- DDG4/include/DDG4/Geant4InputAction.h | 2 +- DDG4/include/DDG4/Geant4OutputAction.h | 6 +++--- DDG4/include/DDG4/Geant4SensDetAction.h | 2 +- DDG4/include/DDG4/Geant4SteppingAction.h | 8 ++++---- DDG4/include/DDG4/Geant4TrackingAction.h | 10 +++++----- DDG4/include/DDG4/Geant4TrackingPostAction.h | 7 ++++--- DDG4/include/DDG4/Geant4TrackingPreAction.h | 4 ++-- 8 files changed, 24 insertions(+), 23 deletions(-) diff --git a/DDG4/include/DDG4/Geant4GeneratorAction.h b/DDG4/include/DDG4/Geant4GeneratorAction.h index 8120a6e25..96b9f230d 100644 --- a/DDG4/include/DDG4/Geant4GeneratorAction.h +++ b/DDG4/include/DDG4/Geant4GeneratorAction.h @@ -88,11 +88,11 @@ namespace dd4hep { /// Default destructor virtual ~Geant4SharedGeneratorAction(); /// Set or update client for the use in a new thread fiber - virtual void configureFiber(Geant4Context* thread_context); + virtual void configureFiber(Geant4Context* thread_context) override; /// Underlying object to be used during the execution of this thread virtual void use(Geant4GeneratorAction* action); /// User generator callback - virtual void operator()(G4Event* event); + virtual void operator()(G4Event* event) override; }; /// Concrete implementation of the Geant4 generator action sequence @@ -127,9 +127,9 @@ namespace dd4hep { /// Default destructor virtual ~Geant4GeneratorActionSequence(); /// Set or update client context - virtual void updateContext(Geant4Context* ctxt); + virtual void updateContext(Geant4Context* ctxt) override; /// Set or update client for the use in a new thread fiber - virtual void configureFiber(Geant4Context* thread_context); + virtual void configureFiber(Geant4Context* thread_context) override; /// Get an action by name Geant4GeneratorAction* get(const std::string& name) const; /// Register primary particle generation callback. Types Q and T must be polymorph! diff --git a/DDG4/include/DDG4/Geant4InputAction.h b/DDG4/include/DDG4/Geant4InputAction.h index d894f6117..e6b07a045 100644 --- a/DDG4/include/DDG4/Geant4InputAction.h +++ b/DDG4/include/DDG4/Geant4InputAction.h @@ -189,7 +189,7 @@ namespace dd4hep { /// Create particle vector Particles* new_particles() const { return new Particles; } /// Callback to generate primary particles - virtual void operator()(G4Event* event); + virtual void operator()(G4Event* event) override; }; } /* End namespace sim */ } /* End namespace dd4hep */ diff --git a/DDG4/include/DDG4/Geant4OutputAction.h b/DDG4/include/DDG4/Geant4OutputAction.h index 78d3b7717..633cd9d9d 100644 --- a/DDG4/include/DDG4/Geant4OutputAction.h +++ b/DDG4/include/DDG4/Geant4OutputAction.h @@ -68,12 +68,12 @@ namespace dd4hep { /// Default destructor virtual ~Geant4OutputAction(); /// Set or update client for the use in a new thread fiber - virtual void configureFiber(Geant4Context* ctxt); + virtual void configureFiber(Geant4Context* ctxt) override; /// begin-of-event callback - virtual void begin(const G4Event* event); + virtual void begin(const G4Event* event) override; /// End-of-event callback - virtual void end(const G4Event* event); + virtual void end(const G4Event* event) override; /// Callback to initialize storing the Geant4 information virtual void beginRun(const G4Run* run); /// Callback to store the Geant4 run information diff --git a/DDG4/include/DDG4/Geant4SensDetAction.h b/DDG4/include/DDG4/Geant4SensDetAction.h index c70e714df..a192bc366 100644 --- a/DDG4/include/DDG4/Geant4SensDetAction.h +++ b/DDG4/include/DDG4/Geant4SensDetAction.h @@ -367,7 +367,7 @@ namespace dd4hep { } /// Set or update client context - virtual void updateContext(Geant4Context* ctxt); + virtual void updateContext(Geant4Context* ctxt) override; /// Called at construction time of the sensitive detector to declare all hit collections std::size_t defineCollections(Geant4ActionSD* sens_det); diff --git a/DDG4/include/DDG4/Geant4SteppingAction.h b/DDG4/include/DDG4/Geant4SteppingAction.h index 26f065423..199c85eff 100644 --- a/DDG4/include/DDG4/Geant4SteppingAction.h +++ b/DDG4/include/DDG4/Geant4SteppingAction.h @@ -79,11 +79,11 @@ namespace dd4hep { /// Default destructor virtual ~Geant4SharedSteppingAction(); /// Set or update client for the use in a new thread fiber - virtual void configureFiber(Geant4Context* thread_context); + virtual void configureFiber(Geant4Context* thread_context) override; /// Underlying object to be used during the execution of this thread virtual void use(Geant4SteppingAction* action); /// User stepping callback - virtual void operator()(const G4Step* step, G4SteppingManager* mgr); + virtual void operator()(const G4Step* step, G4SteppingManager* mgr) override; }; /// Concrete implementation of the Geant4 stepping action sequence @@ -117,9 +117,9 @@ namespace dd4hep { /// Default destructor virtual ~Geant4SteppingActionSequence(); /// Set or update client context - virtual void updateContext(Geant4Context* ctxt); + virtual void updateContext(Geant4Context* ctxt) override; /// Set or update client for the use in a new thread fiber - virtual void configureFiber(Geant4Context* thread_context); + virtual void configureFiber(Geant4Context* thread_context) override; /// Get an action by name Geant4SteppingAction* get(const std::string& name) const; /// Register stepping action callback. Types Q and T must be polymorph! diff --git a/DDG4/include/DDG4/Geant4TrackingAction.h b/DDG4/include/DDG4/Geant4TrackingAction.h index 4d1a7129f..34637d384 100644 --- a/DDG4/include/DDG4/Geant4TrackingAction.h +++ b/DDG4/include/DDG4/Geant4TrackingAction.h @@ -87,13 +87,13 @@ namespace dd4hep { /// Default destructor virtual ~Geant4SharedTrackingAction(); /// Set or update client for the use in a new thread fiber - virtual void configureFiber(Geant4Context* thread_context); + virtual void configureFiber(Geant4Context* thread_context) override; /// Underlying object to be used during the execution of this thread virtual void use(Geant4TrackingAction* action); /// Begin-of-track callback - virtual void begin(const G4Track* track); + virtual void begin(const G4Track* track) override; /// End-of-track callback - virtual void end(const G4Track* track); + virtual void end(const G4Track* track) override; }; /// Concrete implementation of the Geant4 tracking action sequence @@ -134,9 +134,9 @@ namespace dd4hep { /// Default destructor virtual ~Geant4TrackingActionSequence(); /// Set or update client context - virtual void updateContext(Geant4Context* ctxt); + virtual void updateContext(Geant4Context* ctxt) override; /// Set or update client for the use in a new thread fiber - virtual void configureFiber(Geant4Context* thread_context); + virtual void configureFiber(Geant4Context* thread_context) override; /// Get an action by name Geant4TrackingAction* get(const std::string& name) const; /// Register Pre-track action callback before anything else diff --git a/DDG4/include/DDG4/Geant4TrackingPostAction.h b/DDG4/include/DDG4/Geant4TrackingPostAction.h index c432868ff..e9ccac73b 100644 --- a/DDG4/include/DDG4/Geant4TrackingPostAction.h +++ b/DDG4/include/DDG4/Geant4TrackingPostAction.h @@ -34,7 +34,8 @@ namespace dd4hep { typedef std::vector<std::string> StringV; StringV m_requiredProcs; StringV m_ignoredProcs; - bool m_storeMarkedTracks; + bool m_storeMarkedTracks; + public: /// Standard constructor Geant4TrackingPostAction(Geant4Context* context, const std::string& name = ""); @@ -45,9 +46,9 @@ namespace dd4hep { void saveTrack(const G4Track* track); /// Begin-of-tracking callback - virtual void begin(const G4Track* track); + virtual void begin(const G4Track* track) override; /// End-of-tracking callback - virtual void end(const G4Track* track); + virtual void end(const G4Track* track) override; }; } // End namespace sim } // End namespace dd4hep diff --git a/DDG4/include/DDG4/Geant4TrackingPreAction.h b/DDG4/include/DDG4/Geant4TrackingPreAction.h index 1b6fb181e..ea2971013 100644 --- a/DDG4/include/DDG4/Geant4TrackingPreAction.h +++ b/DDG4/include/DDG4/Geant4TrackingPreAction.h @@ -35,9 +35,9 @@ namespace dd4hep { /// Default destructor virtual ~Geant4TrackingPreAction(); /// Begin-of-tracking callback - virtual void begin(const G4Track* track); + virtual void begin(const G4Track* track) override; /// End-of-tracking callback - virtual void end(const G4Track* track); + virtual void end(const G4Track* track) override; }; } // End namespace sim } // End namespace dd4hep -- GitLab