From cd02d5a260eb06392163971b92f25bae96dfa082 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Wed, 17 Apr 2019 19:26:20 +0000 Subject: [PATCH] Remove mutable from m_clusList of SpacePoint.h. Add ATLAS_CHECK_THREAD_SAFETY to InnerDetector/InDetRecEvent/SiSpacePoint. --- .../TrkSpacePoint/ATLAS_CHECK_THREAD_SAFETY | 1 + .../TrkSpacePoint/TrkSpacePoint/SpacePoint.h | 7 +------ .../TrkSpacePoint/SpacePointContainer.h | 2 +- .../TrkEvent/TrkSpacePoint/src/SpacePoint.cxx | 20 ------------------- 4 files changed, 3 insertions(+), 27 deletions(-) create mode 100644 Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/ATLAS_CHECK_THREAD_SAFETY diff --git a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/ATLAS_CHECK_THREAD_SAFETY b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 00000000000..2f999ff7e67 --- /dev/null +++ b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint diff --git a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h index b2478cee648..12dd8db8223 100755 --- a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h +++ b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h @@ -82,11 +82,8 @@ namespace Trk{ /**Interface method for output, to be overloaded by child classes* */ virtual std::ostream& dump( std::ostream& out ) const =0 ; - /**return number of parameters currently created*/ - static unsigned int numberOfInstantiations() ; - protected: - mutable const std::pair<const PrepRawData*, const PrepRawData*> *m_clusList; + const std::pair<const PrepRawData*, const PrepRawData*> *m_clusList; std::pair<IdentifierHash, IdentifierHash> m_elemIdList; Amg::Vector3D m_position; Amg::MatrixX m_globalCovariance; @@ -95,8 +92,6 @@ namespace Trk{ /** might not be performant enough, evaluate */ private: - /** number of objects of this type in memory */ - static unsigned int s_numberOfInstantiations; }; diff --git a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h index 199314e5cd6..1de95188362 100755 --- a/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h +++ b/Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h @@ -44,7 +44,7 @@ public: /** return class ID */ static const CLID& classID() { - static CLID id = 1273119430 ; + static const CLID id = 1273119430 ; return id; // we do not know why using the traits does not work //return ClassID_traits<SpacePointContainer>::ID(); diff --git a/Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx b/Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx index 78802bc1fff..0726a81742d 100755 --- a/Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx +++ b/Tracking/TrkEvent/TrkSpacePoint/src/SpacePoint.cxx @@ -23,16 +23,10 @@ namespace Trk { - unsigned int SpacePoint::s_numberOfInstantiations=0; - - // Destructor: SpacePoint::~SpacePoint() { delete m_clusList; -#ifndef NDEBUG - s_numberOfInstantiations--; // delete SpacePoint, so decrement total count -#endif } // ------------------------------------------------------------------ @@ -45,9 +39,6 @@ namespace Trk m_position(), m_globalCovariance() { -#ifndef NDEBUG - s_numberOfInstantiations++; // new SpacePoint, so increment total count -#endif } // ------------------------------------------------------------------ @@ -64,9 +55,6 @@ namespace Trk m_clusList=nullptr; } m_globalCovariance = SP.m_globalCovariance; -#ifndef NDEBUG - s_numberOfInstantiations++; // new SpacePoint, so increment total count -#endif } // ------------------------------------------------------------------ @@ -129,14 +117,6 @@ namespace Trk return m_clusList->first->detectorElement()->surface(); } - // ------------------------------------------------------------------ - - unsigned int SpacePoint::numberOfInstantiations() - { - return s_numberOfInstantiations; - } - - } // end of namespace -- GitLab