diff --git a/DDCore/src/Printout.cpp b/DDCore/src/Printout.cpp index 071b5138b31175d9b6e8f3385254dea912c1a2ee..59ce77b5d0d5f1bc97efedc533a4988cefe918f0 100644 --- a/DDCore/src/Printout.cpp +++ b/DDCore/src/Printout.cpp @@ -326,6 +326,7 @@ DD4hep::PrintLevel DD4hep::printLevel(const char* value) { if ( strcmp(value,"6") == 0 ) return DD4hep::FATAL; if ( strcmp(value,"7") == 0 ) return DD4hep::ALWAYS; except("Printout","Unknown printlevel requested:%s",value); + return DD4hep::ALWAYS; } /// Translate the printer level from string to value diff --git a/DDG4/include/DDG4/Geant4EventAction.h b/DDG4/include/DDG4/Geant4EventAction.h index 9788587a00f59d7c2c929413be8eb99489f1f5a2..b651e34ecaf148c760c1aaf4d3b1ad338af895ba 100644 --- a/DDG4/include/DDG4/Geant4EventAction.h +++ b/DDG4/include/DDG4/Geant4EventAction.h @@ -54,8 +54,6 @@ namespace DD4hep { public: typedef Geant4SharedEventAction shared_type; public: - /// Inhibit default constructor - Geant4EventAction() = delete; /// Inhibit copy constructor Geant4EventAction(const Geant4EventAction& copy) = delete; /// Standard constructor @@ -86,8 +84,6 @@ namespace DD4hep { /// Reference to the shared action Geant4EventAction* m_action; public: - /// Inhibit default constructor - Geant4SharedEventAction() = delete; /// Inhibit copy constructor Geant4SharedEventAction(const Geant4SharedEventAction& copy) = delete; /// Standard constructor @@ -131,8 +127,6 @@ namespace DD4hep { Actors<Geant4EventAction> m_actors; public: - /// Inhibit default constructor - Geant4EventActionSequence() = delete; /// Inhibit copy constructor Geant4EventActionSequence(const Geant4EventActionSequence& copy) = delete; /// Standard constructor diff --git a/DDG4/include/DDG4/Geant4Primary.h b/DDG4/include/DDG4/Geant4Primary.h index 549fd9556794267e0d8a940b31c415e779dd9d32..162e42ea64573b0b146e2a41b75a22ec10a0b0c1 100644 --- a/DDG4/include/DDG4/Geant4Primary.h +++ b/DDG4/include/DDG4/Geant4Primary.h @@ -96,9 +96,9 @@ namespace DD4hep { class Geant4PrimaryInteraction { private: /// Copy constructor - Geant4PrimaryInteraction(const Geant4PrimaryInteraction& c); + Geant4PrimaryInteraction(const Geant4PrimaryInteraction& c) = delete; /// Assignment operator - Geant4PrimaryInteraction& operator=(const Geant4PrimaryInteraction& c); + Geant4PrimaryInteraction& operator=(const Geant4PrimaryInteraction& c) = delete; public: typedef Geant4Particle Particle; @@ -114,15 +114,15 @@ namespace DD4hep { /// User data extension if required ExtensionHandle extension; /// User mask to flag the interaction. Also unique identifier - int mask; + int mask = 0; /// Flag that the event is locked for G4 native generators - int locked; + int locked = 0; /// Next PID indentifier - int next_particle_identifier; + int next_particle_identifier = -1; public: /// Default constructor - Geant4PrimaryInteraction(); + Geant4PrimaryInteraction() = default; /// Default destructor virtual ~Geant4PrimaryInteraction(); /// Access a new particle identifier within the interaction diff --git a/DDG4/include/DDG4/Geant4SensDetAction.h b/DDG4/include/DDG4/Geant4SensDetAction.h index ad0f82d44281a44c62748977749d274bbc97c7bc..6bbcd9e7ee05d13e7d518b4465f6715d7e0ff035 100644 --- a/DDG4/include/DDG4/Geant4SensDetAction.h +++ b/DDG4/include/DDG4/Geant4SensDetAction.h @@ -93,8 +93,6 @@ namespace DD4hep { */ class Geant4Filter: public Geant4Action { public: - /// Inhibit default constructor - Geant4Filter() = delete; /// Inhibit copy constructor Geant4Filter(const Geant4Filter& copy) = delete; /// Standard constructor @@ -152,9 +150,6 @@ namespace DD4hep { Actors<Geant4Filter> m_filters; public: - /// Inhibit default constructor - Geant4Sensitive() = delete; - /// Inhibit copy constructor Geant4Sensitive(const Geant4Sensitive& copy) = delete; @@ -328,9 +323,6 @@ namespace DD4hep { } public: - /// Inhibit default constructor - Geant4SensDetActionSequence() = delete; - /// Inhibit copy constructor Geant4SensDetActionSequence(const Geant4SensDetActionSequence& copy) = delete; @@ -361,10 +353,13 @@ namespace DD4hep { /// Access HitCollection container names const std::string& hitCollectionName(size_t which) const; + /// Retrieve the hits collection associated with this detector by its serial number Geant4HitCollection* collection(size_t which) const; + /// Retrieve the hits collection associated with this detector by its collection identifier Geant4HitCollection* collectionByID(size_t id) const; + /// Register begin-of-event callback template <typename T> void callAtBegin(T* p, void (T::*f)(G4HCofThisEvent*)) { m_begin.add(p, f); diff --git a/DDG4/include/DDG4/Geant4SensDetAction.inl b/DDG4/include/DDG4/Geant4SensDetAction.inl index cb78c8ac96b0213e140c5f0ee19d2c61c2dca1f9..57c9d516c076c92e85882431624a69862e4eb1d8 100644 --- a/DDG4/include/DDG4/Geant4SensDetAction.inl +++ b/DDG4/include/DDG4/Geant4SensDetAction.inl @@ -1,4 +1,3 @@ -// $Id: $ //========================================================================== // AIDA Detector description implementation for LCD //-------------------------------------------------------------------------- diff --git a/DDG4/include/DDG4/Geant4SteppingAction.h b/DDG4/include/DDG4/Geant4SteppingAction.h index e33778e6a33c4e37c491bfd2b9bd6d5a02dcd744..d4e7ecf1d9ae97f12ddc4a4ab9ab30f8e00dd920 100644 --- a/DDG4/include/DDG4/Geant4SteppingAction.h +++ b/DDG4/include/DDG4/Geant4SteppingAction.h @@ -41,8 +41,8 @@ namespace DD4hep { public: typedef Geant4SharedSteppingAction shared_type; public: - /// Inhibit default constructor - Geant4SteppingAction() = delete; + /// Inhibit copy constructor + Geant4SteppingAction(const Geant4SteppingAction& copy) = delete; /// Standard constructor Geant4SteppingAction(Geant4Context* context, const std::string& name); /// Default destructor @@ -69,6 +69,8 @@ namespace DD4hep { /// Reference to the shared action Geant4SteppingAction* m_action; public: + /// Inhibit copy constructor + Geant4SharedSteppingAction(const Geant4SteppingAction& copy) = delete; /// Standard constructor Geant4SharedSteppingAction(Geant4Context* context, const std::string& nam); /// Default destructor @@ -104,6 +106,8 @@ namespace DD4hep { Actors<Geant4SteppingAction> m_actors; public: + /// Inhibit copy constructor + Geant4SteppingActionSequence(const Geant4SteppingAction& copy) = delete; /// Standard constructor Geant4SteppingActionSequence(Geant4Context* context, const std::string& name); /// Default destructor diff --git a/DDG4/include/DDG4/Geant4TrackingAction.h b/DDG4/include/DDG4/Geant4TrackingAction.h index 2537b33da62f881869388f0922c8e532ddf4f9c2..c688bb901dd6fffb7d1b9c9d3b4c3ab9c0c1d0ec 100644 --- a/DDG4/include/DDG4/Geant4TrackingAction.h +++ b/DDG4/include/DDG4/Geant4TrackingAction.h @@ -43,6 +43,8 @@ namespace DD4hep { public: typedef Geant4SharedTrackingAction shared_type; public: + /// Inhibit copy constructor + Geant4TrackingAction(const Geant4TrackingAction& copy) = delete; /// Standard constructor Geant4TrackingAction(Geant4Context* context, const std::string& name = ""); /// Default destructor @@ -77,6 +79,8 @@ namespace DD4hep { /// Reference to the shared action Geant4TrackingAction* m_action; public: + /// Inhibit copy constructor + Geant4SharedTrackingAction(const Geant4TrackingAction& copy) = delete; /// Standard constructor Geant4SharedTrackingAction(Geant4Context* context, const std::string& nam); /// Default destructor @@ -119,6 +123,8 @@ namespace DD4hep { /// The list of action objects to be called Actors<Geant4TrackingAction> m_actors; public: + /// Inhibit copy constructor + Geant4TrackingActionSequence(const Geant4TrackingAction& copy) = delete; /// Standard constructor Geant4TrackingActionSequence(Geant4Context* context, const std::string& name); /// Default destructor @@ -163,5 +169,4 @@ namespace DD4hep { } // End namespace Simulation } // End namespace DD4hep - #endif // DD4HEP_DDG4_GEANT4TRACKINGACTION_H diff --git a/DDG4/src/Geant4Primary.cpp b/DDG4/src/Geant4Primary.cpp index c486eba0729483c8a9ed898f3a18dedf458e4bb1..64743bbbace1de2d91fbcdcbbb42f7ad93006cc9 100644 --- a/DDG4/src/Geant4Primary.cpp +++ b/DDG4/src/Geant4Primary.cpp @@ -53,24 +53,6 @@ const Geant4Particle* Geant4PrimaryMap::get(const G4PrimaryParticle* particle) c return i != m_primaryMap.end() ? (*i).second : 0; } -/// Default constructor -Geant4PrimaryInteraction::Geant4PrimaryInteraction() - : mask(0), locked(0), next_particle_identifier(-1) -{ -} - -/// Copy constructor -Geant4PrimaryInteraction::Geant4PrimaryInteraction(const Geant4PrimaryInteraction&) - : mask(0), locked(0), next_particle_identifier(-1) -{ -} - -/// Assignment operator -Geant4PrimaryInteraction& Geant4PrimaryInteraction::operator=(const Geant4PrimaryInteraction& c) { - if ( &c == this ) {} - return *this; -} - /// Default destructor Geant4PrimaryInteraction::~Geant4PrimaryInteraction() { releaseObjects(vertices);