diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/RobustTrackingGeometryBuilder.h b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/RobustTrackingGeometryBuilder.h index a52a48bd942ef504c33361e3c3776ea057db95ad..260234bbb4cec4845b47dd121ce0ad069a028041 100644 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/RobustTrackingGeometryBuilder.h +++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/RobustTrackingGeometryBuilder.h @@ -62,10 +62,11 @@ namespace InDet { */ - class RobustTrackingGeometryBuilder : public AthAlgTool, - public Trk::TrackingVolumeManipulator, - virtual public Trk::IGeometryBuilder { - + class RobustTrackingGeometryBuilder + : public AthAlgTool + , public Trk::TrackingVolumeManipulator + , virtual public Trk::IGeometryBuilder + { public: /** Constructor */ @@ -85,23 +86,27 @@ namespace InDet { Trk::GeometrySignature geometrySignature() const { return Trk::ID; } private: - - /** Private method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap layers */ - const Trk::TrackingVolume* packVolumeTriple ATLAS_NOT_THREAD_SAFE - (const std::vector<const Trk::Layer*>& negLayers, - const std::vector<const Trk::Layer*>& centralLayers, - const std::vector<const Trk::Layer*>& posLayers, - double rMin, double rMax, - double zMin, double zPosCentral, - const std::string& baseName="UndefinedVolume", - int colorCode = 21, - Trk::BinningType bintype=Trk::arbitrary) const; - - /** Private method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap volumes */ - const Trk::TrackingVolume* packVolumeTriple(const std::vector<const Trk::TrackingVolume*>& negVolumes, - const std::vector<const Trk::TrackingVolume*>& centralVolumes, - const std::vector<const Trk::TrackingVolume*>& posVolumes, - const std::string& baseName="UndefinedVolume") const; + /** Private method, creates and packs a triple containing of + * NegEndcap-Barrel-PosEndcap layers */ + const Trk::TrackingVolume* packVolumeTriple + ATLAS_NOT_THREAD_SAFE(const std::vector<const Trk::Layer*>& negLayers, + const std::vector<const Trk::Layer*>& centralLayers, + const std::vector<const Trk::Layer*>& posLayers, + double rMin, + double rMax, + double zMin, + double zPosCentral, + const std::string& baseName = "UndefinedVolume", + int colorCode = 21, + Trk::BinningType bintype = Trk::arbitrary) const; + + /** Private method, creates and packs a triple containing of + * NegEndcap-Barrel-PosEndcap volumes */ + const Trk::TrackingVolume* packVolumeTriple ATLAS_NOT_THREAD_SAFE( + const std::vector<const Trk::TrackingVolume*>& negVolumes, + const std::vector<const Trk::TrackingVolume*>& centralVolumes, + const std::vector<const Trk::TrackingVolume*>& posVolumes, + const std::string& baseName = "UndefinedVolume") const; // helper tools for the geometry building ToolHandle<Trk::ILayerBuilder> m_beamPipeBuilder; //!< BeamPipe builder (is different from layers) diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/RobustTrackingGeometryBuilderCond.h b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/RobustTrackingGeometryBuilderCond.h index 8f168cfc228199f31bbb96da179c649d0ae94ae3..c2602090ff7516dfc001354f90273a9a8ccc7cf4 100644 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/RobustTrackingGeometryBuilderCond.h +++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/RobustTrackingGeometryBuilderCond.h @@ -24,6 +24,8 @@ #include <vector> #include <string> +#include "CxxUtils/checker_macros.h" + #ifndef TRKDETDESCR_TAKESMALLERBIGGER #define TRKDETDESCR_TAKESMALLERBIGGER #define takeSmaller(current,test) current = current < test ? current : test @@ -59,12 +61,12 @@ namespace InDet { @author Andreas.Salzburger@cern.ch */ - - class RobustTrackingGeometryBuilderCond : public AthAlgTool, - public Trk::TrackingVolumeManipulator, - virtual public Trk::IGeometryBuilderCond { - - + class RobustTrackingGeometryBuilderCond + : public AthAlgTool + , public Trk::TrackingVolumeManipulator + , virtual public Trk::IGeometryBuilderCond + { + public: /** Constructor */ RobustTrackingGeometryBuilderCond(const std::string&,const std::string&,const IInterface*); @@ -77,29 +79,36 @@ namespace InDet { /** AlgTool finalize method */ StatusCode finalize(); /** TrackingGeometry Interface methode */ - std::pair<EventIDRange, const Trk::TrackingGeometry*> trackingGeometry ATLAS_NOT_THREAD_SAFE (const EventContext& ctx, std::pair<EventIDRange, const Trk::TrackingVolume*> tVolPair) const; + std::pair<EventIDRange, const Trk::TrackingGeometry*> trackingGeometry + ATLAS_NOT_THREAD_SAFE( + const EventContext& ctx, + std::pair<EventIDRange, const Trk::TrackingVolume*> tVolPair) const; /** The unique signature */ Trk::GeometrySignature geometrySignature() const { return Trk::ID; } private: - - /** Private method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap layers */ - const Trk::TrackingVolume* packVolumeTriple ATLAS_NOT_THREAD_SAFE - (const std::vector<const Trk::Layer*>& negLayers, - const std::vector<const Trk::Layer*>& centralLayers, - const std::vector<const Trk::Layer*>& posLayers, - double rMin, double rMax, - double zMin, double zPosCentral, - const std::string& baseName="UndefinedVolume", - int colorCode = 21, - Trk::BinningType bintype=Trk::arbitrary) const; - - /** Private method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap volumes */ - const Trk::TrackingVolume* packVolumeTriple(const std::vector<const Trk::TrackingVolume*>& negVolumes, - const std::vector<const Trk::TrackingVolume*>& centralVolumes, - const std::vector<const Trk::TrackingVolume*>& posVolumes, - const std::string& baseName="UndefinedVolume") const; + /** Private method, creates and packs a triple containing of + * NegEndcap-Barrel-PosEndcap layers */ + const Trk::TrackingVolume* packVolumeTriple + ATLAS_NOT_THREAD_SAFE(const std::vector<const Trk::Layer*>& negLayers, + const std::vector<const Trk::Layer*>& centralLayers, + const std::vector<const Trk::Layer*>& posLayers, + double rMin, + double rMax, + double zMin, + double zPosCentral, + const std::string& baseName = "UndefinedVolume", + int colorCode = 21, + Trk::BinningType bintype = Trk::arbitrary) const; + + /** Private method, creates and packs a triple containing of + * NegEndcap-Barrel-PosEndcap volumes */ + const Trk::TrackingVolume* packVolumeTriple ATLAS_NOT_THREAD_SAFE( + const std::vector<const Trk::TrackingVolume*>& negVolumes, + const std::vector<const Trk::TrackingVolume*>& centralVolumes, + const std::vector<const Trk::TrackingVolume*>& posVolumes, + const std::string& baseName = "UndefinedVolume") const; // helper tools for the geometry building ToolHandle<Trk::ILayerBuilderCond> m_beamPipeBuilder; //!< BeamPipe builder (is different from layers) diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/StagedTrackingGeometryBuilder.h b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/StagedTrackingGeometryBuilder.h index e24b76dfe7cc3b83b0df6c762f78bf45b260eed4..11ba120faf493c68e6b91c2d3a62481aafa8c350 100644 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/StagedTrackingGeometryBuilder.h +++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/StagedTrackingGeometryBuilder.h @@ -162,37 +162,49 @@ namespace InDet { /** Private helper method to check if a sector is compatible with the cache */ bool setupFitsCache(LayerSetup& layerSetup, std::vector<InDet::LayerSetup>& layerSetupCache) const; - - - /** Private helper method to flush the cache into the id volumes - return volume is the one to be provided */ - const Trk::TrackingVolume* createFlushVolume ATLAS_NOT_THREAD_SAFE - (std::vector<InDet::LayerSetup>& layerSetupCache, - double innerRadius, double& outerRadius, double extendZ) const; - - /** Private helper method, creates a TrackingVolume - and checks if configured - for Ring Layout - - in case a ring layout is given, it creates the corresponding sub-volumes and updates the radius + + /** Private helper method to flush the cache into the id volumes - return + * volume is the one to be provided */ + const Trk::TrackingVolume* createFlushVolume + ATLAS_NOT_THREAD_SAFE(std::vector<InDet::LayerSetup>& layerSetupCache, + double innerRadius, + double& outerRadius, + double extendZ) const; + + /** Private helper method, creates a TrackingVolume - and checks if + configured - for Ring Layout + - in case a ring layout is given, it creates the corresponding + sub-volumes and updates the radius */ - const Trk::TrackingVolume* createTrackingVolume(const std::vector<const Trk::Layer*>& layers, - double innerRadius, double& outerRadius, - double zMin, double zMax, - const std::string& volumeName, - Trk::BinningType btype, - bool doAdjustOuterRadius = true) const; - - /** Private helper method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap layers - - in case of a ring layout the subvolumes are created and the rMax is adapted + const Trk::TrackingVolume* createTrackingVolume + ATLAS_NOT_THREAD_SAFE(const std::vector<const Trk::Layer*>& layers, + double innerRadius, + double& outerRadius, + double zMin, + double zMax, + const std::string& volumeName, + Trk::BinningType btype, + bool doAdjustOuterRadius = true) const; + + /** Private helper method, creates and packs a triple containing of + NegEndcap-Barrel-PosEndcap layers + - in case of a ring layout the subvolumes are created and the rMax is + adapted */ - const Trk::TrackingVolume* packVolumeTriple ATLAS_NOT_THREAD_SAFE - (const LayerSetup& layerSetup, - double rMin, double& rMax, - double zMin, double zPosCentral) const; - + const Trk::TrackingVolume* packVolumeTriple + ATLAS_NOT_THREAD_SAFE(const LayerSetup& layerSetup, + double rMin, + double& rMax, + double zMin, + double zPosCentral) const; + /** Private helper method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap volumes */ - const Trk::TrackingVolume* packVolumeTriple(const std::vector<const Trk::TrackingVolume*>& negVolumes, - const std::vector<const Trk::TrackingVolume*>& centralVolumes, - const std::vector<const Trk::TrackingVolume*>& posVolumes, - const std::string& baseName="UndefinedVolume") const; - + const Trk::TrackingVolume* packVolumeTriple ATLAS_NOT_THREAD_SAFE( + const std::vector<const Trk::TrackingVolume*>& negVolumes, + const std::vector<const Trk::TrackingVolume*>& centralVolumes, + const std::vector<const Trk::TrackingVolume*>& posVolumes, + const std::string& baseName = "UndefinedVolume") const; + /** Private helper method for detection of Ring layout */ bool ringLayout(const std::vector<const Trk::Layer*>& layers, std::vector<double>& rmins, std::vector<double>& rmaxs) const; diff --git a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/StagedTrackingGeometryBuilderCond.h b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/StagedTrackingGeometryBuilderCond.h index fcf44258dd049e17718b3ebcc108043bc7554320..27695f6d4ae0b59294969550e61693c0e0c8c371 100644 --- a/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/StagedTrackingGeometryBuilderCond.h +++ b/InnerDetector/InDetDetDescr/InDetTrackingGeometry/InDetTrackingGeometry/StagedTrackingGeometryBuilderCond.h @@ -26,6 +26,8 @@ #include <vector> #include <string> +#include "CxxUtils/checker_macros.h" + #ifndef TRKDETDESCR_TAKESMALLERBIGGER #define TRKDETDESCR_TAKESMALLERBIGGER #define takeSmaller(current,test) current = current < test ? current : test @@ -145,7 +147,10 @@ namespace InDet { /** AlgTool finalize method */ StatusCode finalize(); /** TrackingGeometry Interface methode */ - std::pair<EventIDRange, const Trk::TrackingGeometry*> trackingGeometry ATLAS_NOT_THREAD_SAFE (const EventContext& ctx, std::pair<EventIDRange, const Trk::TrackingVolume*> tVolPair) const; + std::pair<EventIDRange, const Trk::TrackingGeometry*> trackingGeometry + ATLAS_NOT_THREAD_SAFE( + const EventContext& ctx, + std::pair<EventIDRange, const Trk::TrackingVolume*> tVolPair) const; /** The unique signature */ Trk::GeometrySignature geometrySignature() const { return Trk::ID; } @@ -164,23 +169,30 @@ namespace InDet { /** Private helper method to check if a sector is compatible with the cache */ bool setupFitsCache(LayerSetup& layerSetup, std::vector<InDet::LayerSetup>& layerSetupCache) const; - - - /** Private helper method to flush the cache into the id volumes - return volume is the one to be provided */ - const Trk::TrackingVolume* createFlushVolume ATLAS_NOT_THREAD_SAFE - (std::vector<InDet::LayerSetup>& layerSetupCache, - double innerRadius, double& outerRadius, double extendZ) const; - - /** Private helper method, creates a TrackingVolume - and checks if configured - for Ring Layout - - in case a ring layout is given, it creates the corresponding sub-volumes and updates the radius + + /** Private helper method to flush the cache into the id volumes - return + * volume is the one to be provided */ + const Trk::TrackingVolume* createFlushVolume + ATLAS_NOT_THREAD_SAFE(std::vector<InDet::LayerSetup>& layerSetupCache, + double innerRadius, + double& outerRadius, + double extendZ) const; + + /** Private helper method, creates a TrackingVolume - and checks if + configured - for Ring Layout + - in case a ring layout is given, it creates the corresponding + sub-volumes and updates the radius */ - const Trk::TrackingVolume* createTrackingVolume(const std::vector<const Trk::Layer*>& layers, - double innerRadius, double& outerRadius, - double zMin, double zMax, - const std::string& volumeName, - Trk::BinningType btype, - bool doAdjustOuterRadius = true) const; - + const Trk::TrackingVolume* createTrackingVolume + ATLAS_NOT_THREAD_SAFE(const std::vector<const Trk::Layer*>& layers, + double innerRadius, + double& outerRadius, + double zMin, + double zMax, + const std::string& volumeName, + Trk::BinningType btype, + bool doAdjustOuterRadius = true) const; + /** Private helper method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap layers - in case of a ring layout the subvolumes are created and the rMax is adapted */ @@ -190,11 +202,12 @@ namespace InDet { double zMin, double zPosCentral) const; /** Private helper method, creates and packs a triple containing of NegEndcap-Barrel-PosEndcap volumes */ - const Trk::TrackingVolume* packVolumeTriple(const std::vector<const Trk::TrackingVolume*>& negVolumes, - const std::vector<const Trk::TrackingVolume*>& centralVolumes, - const std::vector<const Trk::TrackingVolume*>& posVolumes, - const std::string& baseName="UndefinedVolume") const; - + const Trk::TrackingVolume* packVolumeTriple ATLAS_NOT_THREAD_SAFE( + const std::vector<const Trk::TrackingVolume*>& negVolumes, + const std::vector<const Trk::TrackingVolume*>& centralVolumes, + const std::vector<const Trk::TrackingVolume*>& posVolumes, + const std::string& baseName = "UndefinedVolume") const; + /** Private helper method for detection of Ring layout */ bool ringLayout(const std::vector<const Trk::Layer*>& layers, std::vector<double>& rmins, std::vector<double>& rmaxs) const; diff --git a/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/IGeometryProcessor.h b/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/IGeometryProcessor.h index 01b6bd5d76f92e305017f1125d3cb1a2d8139be0..88d24487df31cfc986ca7fd5fe3f7f2f419a4035 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/IGeometryProcessor.h +++ b/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/IGeometryProcessor.h @@ -14,6 +14,7 @@ //STL #include <string> +#include "CxxUtils/checker_macros.h" namespace Trk { class TrackingGeometry; @@ -40,13 +41,13 @@ namespace Trk { static const InterfaceID& interfaceID() { return IID_IGeometryProcessor; } /** Processor Action to work on TrackingGeometry& tgeo */ - virtual StatusCode process(const TrackingGeometry& tvol) const = 0; + virtual StatusCode process ATLAS_NOT_THREAD_SAFE (const TrackingGeometry& tvol) const = 0; /** Processor Action to work on TrackingVolumes - the level is for the hierachy tree*/ - virtual StatusCode process(const TrackingVolume& tvol, size_t level=0) const = 0; + virtual StatusCode process ATLAS_NOT_THREAD_SAFE (const TrackingVolume& tvol, size_t level=0) const = 0; /** Processor Action to work on Layers */ - virtual StatusCode process(const Layer& lay, size_t level=0) const = 0; + virtual StatusCode process ATLAS_NOT_THREAD_SAFE (const Layer& lay, size_t level=0) const = 0; /** Processor Action to work on Surfaces */ virtual StatusCode process(const Surface& surf, size_t level=0) const = 0; diff --git a/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/ITrackingVolumeCreator.h b/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/ITrackingVolumeCreator.h index e59bba235c416edde82414fbae7738829794dde9..8ebb0835ae36deecf177d9c72d0d5424aec7e903 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/ITrackingVolumeCreator.h +++ b/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/ITrackingVolumeCreator.h @@ -18,6 +18,7 @@ #include <vector> #include "GeoPrimitives/GeoPrimitives.h" +#include "CxxUtils/checker_macros.h" namespace Trk { @@ -131,14 +132,12 @@ namespace Trk { @param volumeName : volume name to be given */ - virtual const TrackingVolume* createContainerTrackingVolume( - const std::vector<const TrackingVolume*>& volumes, - Material& matprop, - const std::string& volumeName ="UndefinedVolume", - bool buildBoundaryLayers = false, - bool replaceBoundaryFace = false) const = 0; - - + virtual const TrackingVolume* createContainerTrackingVolume + ATLAS_NOT_THREAD_SAFE(const std::vector<const TrackingVolume*>& volumes, + Material& matprop, + const std::string& volumeName = "UndefinedVolume", + bool buildBoundaryLayers = false, + bool replaceBoundaryFace = false) const = 0; }; } // end of namespace diff --git a/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/ITrackingVolumeHelper.h b/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/ITrackingVolumeHelper.h index 186306281e1f22ff9e6955dd352b59893d3b5d9b..e5ba844d091136377e80ef5f7ad2f68c9cfade9c 100755 --- a/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/ITrackingVolumeHelper.h +++ b/Tracking/TrkDetDescr/TrkDetDescrInterfaces/TrkDetDescrInterfaces/ITrackingVolumeHelper.h @@ -21,6 +21,7 @@ // STL #include <string> +#include "CxxUtils/checker_macros.h" namespace Trk { class VolumeBounds; @@ -56,53 +57,54 @@ public: --- Neccessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - virtual void glueTrackingVolumes(const TrackingVolume& firstVol, - BoundarySurfaceFace firstFace, - const TrackingVolume& secondVol, - BoundarySurfaceFace secondFace, - bool buildBoundaryLayer = false) const = 0; + virtual void glueTrackingVolumes + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& firstVol, + BoundarySurfaceFace firstFace, + const TrackingVolume& secondVol, + BoundarySurfaceFace secondFace, + bool buildBoundaryLayer = false) const = 0; /** Glue Volume method: One to many --- Neccessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - virtual void glueTrackingVolumes( - const TrackingVolume& firstVol, - BoundarySurfaceFace firstFace, - const std::vector<const TrackingVolume*>& secondVolumes, - BoundarySurfaceFace secondFace, - bool buildBoundaryLayer = false, - bool boundaryFaceExchange = false) const = 0; + virtual void glueTrackingVolumes + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& firstVol, + BoundarySurfaceFace firstFace, + const std::vector<const TrackingVolume*>& secondVolumes, + BoundarySurfaceFace secondFace, + bool buildBoundaryLayer = false, + bool boundaryFaceExchange = false) const = 0; /** Method to glue two VolumeArrays together (at navigation level) - without output --- Necessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - virtual void glueTrackingVolumes( - const std::vector<const TrackingVolume*>& firstVolumes, - BoundarySurfaceFace firstFace, - const std::vector<const TrackingVolume*>& secondVolumes, - BoundarySurfaceFace secondFace, - bool buildBoundaryLayer = false, - bool boundaryFaceExchange = false) const = 0; + virtual void glueTrackingVolumes + ATLAS_NOT_THREAD_SAFE(const std::vector<const TrackingVolume*>& firstVolumes, + BoundarySurfaceFace firstFace, + const std::vector<const TrackingVolume*>& secondVolumes, + BoundarySurfaceFace secondFace, + bool buildBoundaryLayer = false, + bool boundaryFaceExchange = false) const = 0; /** Glue Volume method: many to many plus enveloping volume --- Neccessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - virtual Trk::TrackingVolume* glueTrackingVolumeArrays( - const TrackingVolume& firstVol, - BoundarySurfaceFace firstFace, - const TrackingVolume& secondVol, - BoundarySurfaceFace secondFace, - std::string name) const = 0; + virtual Trk::TrackingVolume* glueTrackingVolumeArrays + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& firstVol, + BoundarySurfaceFace firstFace, + const TrackingVolume& secondVol, + BoundarySurfaceFace secondFace, + std::string name) const = 0; /** Glue Volume method: set inside Volume --- Neccessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - virtual void setInsideTrackingVolume( + virtual void setInsideTrackingVolume ATLAS_NOT_THREAD_SAFE( const TrackingVolume& tvol, BoundarySurfaceFace face, const TrackingVolume* insidevol) const = 0; @@ -111,12 +113,12 @@ public: --- Neccessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - virtual void setInsideTrackingVolumeArray( + virtual void setInsideTrackingVolumeArray ATLAS_NOT_THREAD_SAFE( const TrackingVolume& tvol, BoundarySurfaceFace face, BinnedArray<TrackingVolume>* insidevolarray) const = 0; - virtual void setInsideTrackingVolumeArray( + virtual void setInsideTrackingVolumeArray ATLAS_NOT_THREAD_SAFE( const TrackingVolume& tvol, BoundarySurfaceFace face, SharedObject<BinnedArray<TrackingVolume>> insidevolarray) const = 0; @@ -125,21 +127,21 @@ public: --- Neccessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - virtual void setOutsideTrackingVolume( - const TrackingVolume& tvol, - BoundarySurfaceFace face, - const TrackingVolume* outsidevol) const = 0; + virtual void setOutsideTrackingVolume + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& tvol, + BoundarySurfaceFace face, + const TrackingVolume* outsidevol) const = 0; /** Glue Volume method: set outside Volume array --- Neccessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - virtual void setOutsideTrackingVolumeArray( - const TrackingVolume& tvol, - BoundarySurfaceFace face, - BinnedArray<TrackingVolume>* outsidevolarray) const = 0; + virtual void setOutsideTrackingVolumeArray + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& tvol, + BoundarySurfaceFace face, + BinnedArray<TrackingVolume>* outsidevolarray) const = 0; - virtual void setOutsideTrackingVolumeArray( + virtual void setOutsideTrackingVolumeArray ATLAS_NOT_THREAD_SAFE( const TrackingVolume& tvol, BoundarySurfaceFace face, SharedObject<BinnedArray<TrackingVolume>> outsidevolarray) const = 0; diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/CMakeLists.txt b/Tracking/TrkDetDescr/TrkDetDescrTools/CMakeLists.txt index 98e40a3fc130e53bb91df27fe7dead66cf03ccef..2dd12da8e2a77fb461e6bd48dd4b57058fdc6acc 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/CMakeLists.txt +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/CMakeLists.txt @@ -7,4 +7,6 @@ atlas_subdir( TrkDetDescrTools ) atlas_add_component( TrkDetDescrTools src/*.cxx src/components/*.cxx - LINK_LIBRARIES AthenaBaseComps EventPrimitives GaudiKernel GeoPrimitives SubDetectorEnvelopesLib TrkDetDescrInterfaces TrkDetDescrUtils TrkGeometry TrkSurfaces TrkVolumes ) + LINK_LIBRARIES AthenaBaseComps EventPrimitives GaudiKernel GeoPrimitives + SubDetectorEnvelopesLib TrkDetDescrInterfaces TrkDetDescrUtils + TrkGeometry TrkSurfaces TrkVolumes CxxUtils) diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/ATLAS_CHECK_THREAD_SAFETY b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/ATLAS_CHECK_THREAD_SAFETY new file mode 100644 index 0000000000000000000000000000000000000000..d055de287ec5f6a2868b15edf5a52264354792c4 --- /dev/null +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/ATLAS_CHECK_THREAD_SAFETY @@ -0,0 +1 @@ +Tracking/TrkDetDescr/TrkDetDescrTools diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/CylinderVolumeCreator.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/CylinderVolumeCreator.h index ff88f8c006246eadd2d2813ab95bf6761bfc07d7..3995a9f7873bce461db717da6efa213b8a64417e 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/CylinderVolumeCreator.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/CylinderVolumeCreator.h @@ -28,7 +28,7 @@ #include <string> #include <vector> - +#include "CxxUtils/checker_macros.h" namespace Trk { class ILayerArrayCreator; @@ -104,13 +104,12 @@ namespace Trk { const std::vector<const TrackingVolume*>, Material&, , const std::string&) const; */ - const TrackingVolume* createContainerTrackingVolume( - const std::vector<const TrackingVolume*>& volumes, - Material& matprop, - const std::string& volumeName ="UndefinedVolume", - bool buildBoundaryLayers = false, - bool replaceBoundaryFace = false) const; - + const TrackingVolume* createContainerTrackingVolume + ATLAS_NOT_THREAD_SAFE(const std::vector<const TrackingVolume*>& volumes, + Material& matprop, + const std::string& volumeName = "UndefinedVolume", + bool buildBoundaryLayers = false, + bool replaceBoundaryFace = false) const; private: /** Private method - it estimates the CylinderBounds and Translation of layers, @@ -127,23 +126,26 @@ namespace Trk { /** Private method - interglue all volumes contained by a TrackingVolume and set the outside glue volumes in the descriptor */ - StatusCode interGlueTrackingVolume(TrackingVolume& tVolume, - bool rBinned, - bool buildBoundaryLayers, - bool replaceBoundaryFace = false) const; + StatusCode interGlueTrackingVolume + ATLAS_NOT_THREAD_SAFE(TrackingVolume& tVolume, + bool rBinned, + bool buildBoundaryLayers, + bool replaceBoundaryFace = false) const; /** Private method - helper method not to duplicate code */ - void addFaceVolumes(const TrackingVolume& tvol, - Trk::BoundarySurfaceFace bsf, - std::vector<const Trk::TrackingVolume*>& vols) const; + void addFaceVolumes ATLAS_NOT_THREAD_SAFE( + const TrackingVolume& tvol, + Trk::BoundarySurfaceFace bsf, + std::vector<const Trk::TrackingVolume*>& vols) const; /** Private method - glue volume to the other -- use trackingVolume helper */ - void glueTrackingVolumes(const TrackingVolume& volumeOne, - BoundarySurfaceFace faceOne, - const TrackingVolume& volumeTwo, - BoundarySurfaceFace faceTwo, - bool buildBoundaryLayers, - bool replaceBoundaryFace = false) const; + void glueTrackingVolumes + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& volumeOne, + BoundarySurfaceFace faceOne, + const TrackingVolume& volumeTwo, + BoundarySurfaceFace faceTwo, + bool buildBoundaryLayers, + bool replaceBoundaryFace = false) const; /** Private method - helper method to save some code */ CylinderLayer* createCylinderLayer(double z, diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GenericGeometryBuilder.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GenericGeometryBuilder.h index 4c0739c4fd4949831c234f99452dc1a2a41f2298..b729868de6adfba61a683d0d8728e05e2306de07 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GenericGeometryBuilder.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GenericGeometryBuilder.h @@ -19,6 +19,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" +#include "CxxUtils/checker_macros.h" class IEnvelopeDefSvc; namespace Trk { @@ -35,8 +36,10 @@ namespace Trk { @author Andreas.Salzburger@cern.ch */ - - class GenericGeometryBuilder : public AthAlgTool, virtual public IGeometryBuilder { + class ATLAS_NOT_THREAD_SAFE GenericGeometryBuilder + : public AthAlgTool + , virtual public IGeometryBuilder + { public: /** Constructor */ diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GenericGeometryBuilderCond.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GenericGeometryBuilderCond.h index 6647b7ed702702eae3001da076266d1484cf8407..18a74aee4acf09d92da03839ca9e848d83c876e5 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GenericGeometryBuilderCond.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GenericGeometryBuilderCond.h @@ -19,6 +19,7 @@ #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" +#include "CxxUtils/checker_macros.h" class IEnvelopeDefSvc; namespace Trk { @@ -35,8 +36,10 @@ namespace Trk { @author Andreas.Salzburger@cern.ch */ - - class GenericGeometryBuilderCond : public AthAlgTool, virtual public IGeometryBuilderCond { + class ATLAS_NOT_THREAD_SAFE GenericGeometryBuilderCond + : public AthAlgTool + , virtual public IGeometryBuilderCond + { public: /** Constructor */ diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GeometryBuilder.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GeometryBuilder.h index ff53624cf04ee8951d58af9767d474128271e429..4933f7536517fb08457ed998a439ed24af88ded9 100755 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GeometryBuilder.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GeometryBuilder.h @@ -24,6 +24,8 @@ #include "TrkDetDescrUtils/MemoryLogger.h" #endif + +#include "CxxUtils/checker_macros.h" namespace Trk { class TrackingGeometry; @@ -58,7 +60,8 @@ namespace Trk { /** TrackingGeometry Interface method - optionally a pointer to Bounds */ - const TrackingGeometry* trackingGeometry(const TrackingVolume* tvol = 0) const; + const TrackingGeometry* trackingGeometry + ATLAS_NOT_THREAD_SAFE(const TrackingVolume* tvol = 0) const; /** The unique signature */ GeometrySignature geometrySignature() const { return Trk::Global; } @@ -66,7 +69,8 @@ namespace Trk { private: /** TrackingGeometry for ATLAS setup */ - const TrackingGeometry* atlasTrackingGeometry() const; + const TrackingGeometry* atlasTrackingGeometry + ATLAS_NOT_THREAD_SAFE() const; #ifdef TRKDETDESCR_MEMUSAGE MemoryLogger m_memoryLogger; //!< in case the memory is logged diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GeometryBuilderCond.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GeometryBuilderCond.h index a967a3c7910a0fa603f7bce348872f0235983b4f..56559db3bbe9d2c00161b950fa2deb920e73beb5 100755 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GeometryBuilderCond.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/GeometryBuilderCond.h @@ -24,6 +24,7 @@ #include "TrkDetDescrUtils/MemoryLogger.h" #endif +#include "CxxUtils/checker_macros.h" namespace Trk { class TrackingGeometry; @@ -56,9 +57,14 @@ namespace Trk { /** AlgTool initialize method */ StatusCode initialize(); - - /** TrackingGeometry Interface method - optionally a pointer to Bounds */ - std::pair<EventIDRange, const Trk::TrackingGeometry*> trackingGeometry(const EventContext& ctx, std::pair<EventIDRange, const Trk::TrackingVolume*> tVolPair) const; + /** + * TrackingGeometry Interface method - optionally a pointer to Bounds + * Interface marked as not thread safe + */ + std::pair<EventIDRange, const Trk::TrackingGeometry*> trackingGeometry + ATLAS_NOT_THREAD_SAFE( + const EventContext& ctx, + std::pair<EventIDRange, const Trk::TrackingVolume*> tVolPair) const; /** The unique signature */ GeometrySignature geometrySignature() const { return Trk::Global; } @@ -66,7 +72,8 @@ namespace Trk { private: /** TrackingGeometry for ATLAS setup */ - std::pair<EventIDRange, const Trk::TrackingGeometry*> atlasTrackingGeometry(const EventContext& ctx) const; + std::pair<EventIDRange, const Trk::TrackingGeometry*> + atlasTrackingGeometry ATLAS_NOT_THREAD_SAFE (const EventContext& ctx) const; #ifdef TRKDETDESCR_MEMUSAGE MemoryLogger m_memoryLogger; //!< in case the memory is logged diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/InputLayerMaterialProvider.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/InputLayerMaterialProvider.h index 12ee4de10dd34c627da6417f6a4295747c9d4979..9dac5e43f9d898c7a33a67fde4fd0cacbcfa4ccc 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/InputLayerMaterialProvider.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/InputLayerMaterialProvider.h @@ -15,7 +15,7 @@ // Gaudi & Athena #include "AthenaBaseComps/AthAlgTool.h" - +#include "CxxUtils/checker_macros.h" namespace Trk { class TrackingGeometry; @@ -45,14 +45,19 @@ namespace Trk { virtual StatusCode initialize(); /** Processor Action to work on TrackingGeometry& tgeo */ - virtual StatusCode process(const TrackingGeometry& tgeo) const; - - /** Processor Action to work on TrackingVolumes - the level is for the hierachy tree*/ - virtual StatusCode process(const TrackingVolume& tvol, size_t level = 0) const; - + virtual StatusCode process + ATLAS_NOT_THREAD_SAFE(const TrackingGeometry& tgeo) const; + + /** Processor Action to work on TrackingVolumes - the level is for the + * hierachy tree*/ + virtual StatusCode process + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& tvol, + size_t level = 0) const; + /** Processor Action to work on Layers */ - virtual StatusCode process(const Layer& lay, size_t level = 0) const; - + virtual StatusCode process + ATLAS_NOT_THREAD_SAFE(const Layer& lay, size_t level = 0) const; + /** Processor Action to work on Surfaces */ virtual StatusCode process(const Surface& surf, size_t level = 0) const; diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerMaterialProvider.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerMaterialProvider.h index 69f164d1feef58446b3680e19e900dd68df670cb..08660cc5a6e8a5d2d245f8f2a93eba54aabcf398 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerMaterialProvider.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerMaterialProvider.h @@ -15,6 +15,7 @@ #include "AthenaBaseComps/AthAlgTool.h" +#include "CxxUtils/checker_macros.h" namespace Trk { class TrackingGeometry; @@ -32,7 +33,8 @@ namespace Trk { @author Andreas.Salzburger@cern.ch */ - class LayerMaterialProvider : public AthAlgTool, virtual public IGeometryProcessor { + class LayerMaterialProvider //process methods call non-safe code + : public AthAlgTool, virtual public IGeometryProcessor { public: /** Constructor */ @@ -42,14 +44,19 @@ namespace Trk { virtual ~LayerMaterialProvider(); /** Processor Action to work on TrackingGeometry& tgeo */ - virtual StatusCode process(const TrackingGeometry& tgeo) const; - - /** Processor Action to work on TrackingVolumes - the level is for the hierachy tree*/ - virtual StatusCode process(const TrackingVolume& tvol, size_t level = 0) const; - + virtual StatusCode process + ATLAS_NOT_THREAD_SAFE(const TrackingGeometry& tgeo) const; + + /** Processor Action to work on TrackingVolumes - the level is for the + * hierachy tree*/ + virtual StatusCode process + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& tvol, + size_t level = 0) const; + /** Processor Action to work on Layers */ - virtual StatusCode process(const Layer& lay, size_t level = 0) const; - + virtual StatusCode process + ATLAS_NOT_THREAD_SAFE(const Layer& lay, size_t level = 0) const; + /** Processor Action to work on Surfaces */ virtual StatusCode process(const Surface& surf, size_t level = 0) const; diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerProvider.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerProvider.h index 29d08b8371024d12c2a8807f8c19c4b5cfc5dc2d..c504756fd3ba14084676eba10983f5c220d75a2a 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerProvider.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerProvider.h @@ -14,7 +14,7 @@ // Gaudi & Athena #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgTool.h" - +#include "CxxUtils/checker_macros.h" namespace Trk { @@ -28,9 +28,11 @@ namespace Trk { @author Andreas.Salzburger@cern.ch */ + class ATLAS_NOT_THREAD_SAFE LayerProvider + : public AthAlgTool + , virtual public ILayerProvider + { - class LayerProvider : public AthAlgTool, virtual public ILayerProvider { - public: /** Constructor */ LayerProvider(const std::string&,const std::string&,const IInterface*); diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerProviderCond.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerProviderCond.h index af3c4257e9bf5976c78ef3b579faf32e927dd34b..e10408e9338063e7dbb37e9ec134abd11aa4ebdf 100644 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerProviderCond.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/LayerProviderCond.h @@ -14,7 +14,7 @@ // Gaudi & Athena #include "GaudiKernel/ToolHandle.h" #include "AthenaBaseComps/AthAlgTool.h" - +#include "CxxUtils/checker_macros.h" namespace Trk { @@ -28,9 +28,11 @@ namespace Trk { @author Andreas.Salzburger@cern.ch */ - - class LayerProviderCond : public AthAlgTool, virtual public ILayerProviderCond { - + class ATLAS_NOT_THREAD_SAFE LayerProviderCond // mutable cache + : public AthAlgTool + , virtual public ILayerProviderCond + { + public: /** Constructor */ LayerProviderCond(const std::string&,const std::string&,const IInterface*); diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/TrackingVolumeHelper.h b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/TrackingVolumeHelper.h index 543a0763ed59b4929146d4b3d871910c418aa6bd..f7bfc07089bc028de001bf56426544d79b9290a0 100755 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/TrackingVolumeHelper.h +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/TrkDetDescrTools/TrackingVolumeHelper.h @@ -23,12 +23,13 @@ // Gaudi & Athena #include "AthenaBaseComps/AthAlgTool.h" #include "GaudiKernel/ToolHandle.h" +#include "GaudiKernel/SystemOfUnits.h" // STL #include <algorithm> #include <string> #include <fstream> - +#include "CxxUtils/checker_macros.h" namespace Trk { class ILayerArrayCreator; @@ -73,11 +74,12 @@ namespace Trk { --- Necessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - void glueTrackingVolumes(const TrackingVolume& firstVol, - BoundarySurfaceFace firstFace, - const TrackingVolume& secondVol, - BoundarySurfaceFace secondFace, - bool buildBoundaryLayer = false) const; + void glueTrackingVolumes + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& firstVol, + BoundarySurfaceFace firstFace, + const TrackingVolume& secondVol, + BoundarySurfaceFace secondFace, + bool buildBoundaryLayer = false) const; /** Method to glue two Volumes together input: @@ -88,12 +90,13 @@ namespace Trk { --- Necessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - void glueTrackingVolumes(const TrackingVolume& firstVol, - BoundarySurfaceFace firstFace, - const std::vector<const TrackingVolume*>& secondVolumes, - BoundarySurfaceFace secondFace, - bool buildBoundaryLayer = false, - bool boundaryFaceExchange = false) const; + void glueTrackingVolumes ATLAS_NOT_THREAD_SAFE( + const TrackingVolume& firstVol, + BoundarySurfaceFace firstFace, + const std::vector<const TrackingVolume*>& secondVolumes, + BoundarySurfaceFace secondFace, + bool buildBoundaryLayer = false, + bool boundaryFaceExchange = false) const; /** Method to glue two VolumeArrays together (at navigation level) - without output @@ -106,12 +109,13 @@ namespace Trk { --- Necessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - void glueTrackingVolumes(const std::vector<const TrackingVolume*>& firstVolumes, - BoundarySurfaceFace firstFace, - const std::vector<const TrackingVolume*>& secondVolumes, - BoundarySurfaceFace secondFace, - bool buildBoundaryLayer = false, - bool boundaryFaceExchange = false) const; + void glueTrackingVolumes ATLAS_NOT_THREAD_SAFE( + const std::vector<const TrackingVolume*>& firstVolumes, + BoundarySurfaceFace firstFace, + const std::vector<const TrackingVolume*>& secondVolumes, + BoundarySurfaceFace secondFace, + bool buildBoundaryLayer = false, + bool boundaryFaceExchange = false) const; /** Method to glue two VolumeArrays together (at navigation level) - relies on information from glueDescriptor @@ -125,10 +129,12 @@ namespace Trk { --- Necessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - Trk::TrackingVolume* glueTrackingVolumeArrays(const TrackingVolume& firstVol, - BoundarySurfaceFace firstFace, - const TrackingVolume& secondVol, - BoundarySurfaceFace secondFace, std::string name) const; + Trk::TrackingVolume* glueTrackingVolumeArrays + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& firstVol, + BoundarySurfaceFace firstFace, + const TrackingVolume& secondVol, + BoundarySurfaceFace secondFace, + std::string name) const; /** protected method to set inside Volume of a BoundarySurface: input: @@ -138,9 +144,10 @@ namespace Trk { --- Necessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - void setInsideTrackingVolume(const TrackingVolume& tvol, - BoundarySurfaceFace face, - const TrackingVolume* insidevol) const; + void setInsideTrackingVolume + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& tvol, + BoundarySurfaceFace face, + const TrackingVolume* insidevol) const; /** protected method to set inside VolumeArray of a BoundarySurface: input: @@ -150,13 +157,15 @@ namespace Trk { --- Necessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - void setInsideTrackingVolumeArray(const TrackingVolume& tvol, - BoundarySurfaceFace face, - BinnedArray<TrackingVolume>* insidevolarray) const; + void setInsideTrackingVolumeArray ATLAS_NOT_THREAD_SAFE( + const TrackingVolume& tvol, + BoundarySurfaceFace face, + BinnedArray<TrackingVolume>* insidevolarray) const; - void setInsideTrackingVolumeArray(const TrackingVolume& tvol, - BoundarySurfaceFace face, - SharedObject<BinnedArray<TrackingVolume> >insidevolarray) const; + void setInsideTrackingVolumeArray ATLAS_NOT_THREAD_SAFE( + const TrackingVolume& tvol, + BoundarySurfaceFace face, + SharedObject<BinnedArray<TrackingVolume>> insidevolarray) const; /** protected method to set outside Volume of a BoundarySurface: input: @@ -166,23 +175,25 @@ namespace Trk { --- Necessary as friendship cannot be inherited: your father's friend isn't necessary yours --- */ - void setOutsideTrackingVolume(const TrackingVolume& tvol, - BoundarySurfaceFace face, - const TrackingVolume* outsidevol) const; + void setOutsideTrackingVolume + ATLAS_NOT_THREAD_SAFE(const TrackingVolume& tvol, + BoundarySurfaceFace face, + const TrackingVolume* outsidevol) const; /** protected method to set outside VolumeArray of a BoundarySurface: input: - the volume that holds the BoundarySurface - the face type of the boundary to be set - the volume array to be set as outside volume array */ - void setOutsideTrackingVolumeArray(const TrackingVolume& tvol, - BoundarySurfaceFace face, - BinnedArray<TrackingVolume>* outsidevolarray) const; - - void setOutsideTrackingVolumeArray(const TrackingVolume& tvol, - BoundarySurfaceFace face, - SharedObject<BinnedArray<TrackingVolume> >outsidevolarray) const; + void setOutsideTrackingVolumeArray ATLAS_NOT_THREAD_SAFE( + const TrackingVolume& tvol, + BoundarySurfaceFace face, + BinnedArray<TrackingVolume>* outsidevolarray) const; + void setOutsideTrackingVolumeArray ATLAS_NOT_THREAD_SAFE( + const TrackingVolume& tvol, + BoundarySurfaceFace face, + SharedObject<BinnedArray<TrackingVolume>> outsidevolarray) const; private: @@ -194,16 +205,17 @@ namespace Trk { - it checks whether there is a sub-structure (i.e. GlueVolumeDescriptor exists) and adds either the volume itself or the associated subvolume - volumes on glueVols level are all on navigation level*/ - void fillGlueVolumes(const std::vector< const TrackingVolume*>& topLevelVolumes, - const std::vector< const TrackingVolume*>& envelopeFaceVolumes, - BoundarySurfaceFace glueFace, - std::vector<const Trk::TrackingVolume*>& glueVols) const; + void fillGlueVolumes ATLAS_NOT_THREAD_SAFE( + const std::vector<const TrackingVolume*>& topLevelVolumes, + const std::vector<const TrackingVolume*>& envelopeFaceVolumes, + BoundarySurfaceFace glueFace, + std::vector<const Trk::TrackingVolume*>& glueVols) const; /** Execute the glueing - the input volumes are all on navigation level */ - void glueTrackingVolumes(const std::vector<const Trk::TrackingVolume*>& glueVols, - BoundarySurfaceFace glueFace, - BoundarySurfaceFace secondFace) const; - + void glueTrackingVolumes ATLAS_NOT_THREAD_SAFE( + const std::vector<const Trk::TrackingVolume*>& glueVols, + BoundarySurfaceFace glueFace, + BoundarySurfaceFace secondFace) const; ToolHandle<ILayerArrayCreator> m_layerArrayCreator; //!< A Tool for coherent LayerArray creation ToolHandle<ITrackingVolumeArrayCreator> m_trackingVolumeArrayCreator; //!< Helper Tool to create TrackingVolume Arrays @@ -214,7 +226,7 @@ namespace Trk { int m_endcapLayerBinsR; //!< material bins in R int m_endcapLayerBinsPhi; //!< material bins in Phi - static double s_layerThickness; //!< standard layer thickness + static constexpr double s_layerThickness = 1.*Gaudi::Units::mm; //!< standard layer thickness }; diff --git a/Tracking/TrkDetDescr/TrkDetDescrTools/src/TrackingVolumeHelper.cxx b/Tracking/TrkDetDescr/TrkDetDescrTools/src/TrackingVolumeHelper.cxx index 92331d81819e2465f48b55ba12f6aea367174f64..ff27aa5a271d7dda68d110f597f62a046402d01a 100755 --- a/Tracking/TrkDetDescr/TrkDetDescrTools/src/TrackingVolumeHelper.cxx +++ b/Tracking/TrkDetDescr/TrkDetDescrTools/src/TrackingVolumeHelper.cxx @@ -28,14 +28,10 @@ #include "TrkGeometry/GlueVolumesDescriptor.h" // Amg #include "GeoPrimitives/GeoPrimitives.h" -// Gaudi -#include "GaudiKernel/SystemOfUnits.h" #include <memory> - #include <stdexcept> -double Trk::TrackingVolumeHelper::s_layerThickness = 1.*Gaudi::Units::mm; // constructor Trk::TrackingVolumeHelper::TrackingVolumeHelper(const std::string& t, const std::string& n, const IInterface* p)