Skip to content
Snippets Groups Projects
Commit 637f2e58 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'Layer_unneeded_virtual' into 'master'

TrkGeometry Layers: Remove unneeded virtual methods/ mark methods as final.

See merge request !38410
parents 8f66687d e808b76e
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!38410TrkGeometry Layers: Remove unneeded virtual methods/ mark methods as final.
......@@ -95,27 +95,35 @@ namespace Trk {
/** getting the MaterialProperties back - for post-update*/
virtual double postUpdateMaterialFactor(const Trk::TrackParameters& par, Trk::PropDirection dir) const override;
/** move the Layer */
virtual void moveLayer(Amg::Transform3D& shift) override;
virtual void moveLayer(Amg::Transform3D& shift) override final;
/** move the Layer */
virtual void moveLayer ATLAS_NOT_THREAD_SAFE (Amg::Transform3D& shift) const override{
const_cast<ConeLayer*>(this)->moveLayer(shift);
virtual void moveLayer
ATLAS_NOT_THREAD_SAFE(Amg::Transform3D& shift) const override final
{
const_cast<ConeLayer*>(this)->moveLayer(shift);
};
private:
/** Resize the layer to the tracking volume - not (yet) supported for ConeLayer */
void resize(const VolumeBounds&, double) const {}
/** Resize the layer to the tracking volume - not supported since this an entry layer method*/
virtual void resizeAndRepositionLayer(const VolumeBounds&, const Amg::Vector3D&, double) override {}
/** Resize the layer to the tracking volume - not supported since this an entry layer method*/
virtual void resizeAndRepositionLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&, double) const override {}
/** Resize the layer to the tracking volume - not supported since this an
* entry layer method*/
virtual void resizeAndRepositionLayer(const VolumeBounds&,
const Amg::Vector3D&,
double) override final
{}
/** Resize the layer to the tracking volume - not supported since this an
* entry layer method*/
virtual void resizeAndRepositionLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&,
double) const override final
{}
};
} // end of namespace
......
......@@ -135,47 +135,57 @@ class OverlapDescriptor;
const BoundaryCheck& bcheck,
bool resolveSubSurfaces = 0,
const ICompatibilityEstimator* ice = nullptr) const override;
/** move the Layer */
virtual void moveLayer ( Amg::Transform3D& shift ) override;
/** move the Layer */
virtual void moveLayer ATLAS_NOT_THREAD_SAFE ( Amg::Transform3D& shift ) const override{
const_cast<CylinderLayer*>(this)->moveLayer(shift);
}
private:
/** Resize the layer to the tracking volume - only works for CylinderVolumeBouns */
virtual void resizeLayer(const VolumeBounds& vBounds, double envelope) override;
/** Resize the layer to the tracking volume - only works for CylinderVolumeBouns */
virtual void resizeLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds& vBounds,
double envelope) const override
/** move the Layer */
virtual void moveLayer(Amg::Transform3D& shift) override final;
/** move the Layer */
virtual void moveLayer
ATLAS_NOT_THREAD_SAFE(Amg::Transform3D& shift) const override final
{
const_cast<CylinderLayer*>(this)->moveLayer(shift);
}
private:
/** Resize the layer to the tracking volume - only works for
* CylinderVolumeBouns */
virtual void resizeLayer(const VolumeBounds& vBounds,
double envelope) override final;
/** Resize the layer to the tracking volume - only works for
* CylinderVolumeBouns */
virtual void resizeLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds& vBounds,
double envelope) const override final
{
const_cast<CylinderLayer*>(this)->resizeLayer(vBounds,envelope);
const_cast<CylinderLayer*>(this)->resizeLayer(vBounds, envelope);
}
/** Resize the layer to the tracking volume */
virtual void resizeAndRepositionLayer(const VolumeBounds& vBounds,
const Amg::Vector3D& cCenter,
double envelope) override;
double envelope) override final;
/** Resize the layer to the tracking volume */
virtual void resizeAndRepositionLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds& vBounds,
const Amg::Vector3D& cCenter,
double envelope) const override
double envelope) const override final
{
const_cast<CylinderLayer*>(this)->resizeAndRepositionLayer(vBounds,cCenter,envelope);
const_cast<CylinderLayer*>(this)->resizeAndRepositionLayer(
vBounds, cCenter, envelope);
}
/** Surface seen on approach - if not defined differently, it is the
* surfaceRepresentation() */
const Surface& approachSurface(
const Amg::Vector3D& pos,
const Amg::Vector3D& dir,
const BoundaryCheck& bcheck) const;
/** build approach surfaces */
void buildApproachDescriptor();
/** Surface seen on approach - if not defined differently, it is the surfaceRepresentation() */
const Surface& approachSurface(const Amg::Vector3D& pos,
const Amg::Vector3D& dir,
const BoundaryCheck& bcheck) const;
protected:
/** surfaces on approach to the layer */
......
......@@ -112,38 +112,46 @@ namespace Trk {
virtual double postUpdateMaterialFactor(const Trk::TrackParameters& par,
Trk::PropDirection dir) const override;
/** move the Layer non-const*/
virtual void moveLayer( Amg::Transform3D& shift ) override;
/** move the Layer const , performas const_cast */
virtual void moveLayer ATLAS_NOT_THREAD_SAFE ( Amg::Transform3D& shift ) const override{
const_cast<DiscLayer*> (this)->moveLayer(shift);
}
private:
/** Resize the layer to the tracking volume - only works for CylinderVolumeBouns */
virtual void resizeLayer(const VolumeBounds& vBounds, double envelope) override;
/** move the Layer non-const*/
virtual void moveLayer(Amg::Transform3D& shift) override final;
/** move the Layer const , performas const_cast */
virtual void moveLayer
ATLAS_NOT_THREAD_SAFE(Amg::Transform3D& shift) const override final
{
const_cast<DiscLayer*>(this)->moveLayer(shift);
}
private:
/** Resize the layer to the tracking volume - only works for
* CylinderVolumeBouns */
virtual void resizeLayer(const VolumeBounds& vBounds,
double envelope) override final;
/** Resize the layer to the tracking volume - only works for
* CylinderVolumeBouns . performs const cast */
virtual void resizeLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds& vBounds,
double envelope) const override
virtual void resizeLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds& vBounds,
double envelope) const override final
{
const_cast<DiscLayer*> (this)->resizeLayer(vBounds,envelope);
const_cast<DiscLayer*>(this)->resizeLayer(vBounds, envelope);
}
/** Resize the layer to the tracking volume - not implemented.*/
virtual void resizeAndRepositionLayer(const VolumeBounds& vBounds,
const Amg::Vector3D& cCenter,
double envelop) override;
/** Resize the layer to the tracking volume - not implemented . Performs const cast*/
virtual void resizeAndRepositionLayer ATLAS_NOT_THREAD_SAFE (const VolumeBounds& vBounds,
const Amg::Vector3D& cCenter,
double envelop) const override{
const_cast<DiscLayer*> (this)->resizeAndRepositionLayer(vBounds,cCenter,envelop);
double envelop) override final;
/** Resize the layer to the tracking volume - not implemented . Performs
* const cast*/
virtual void resizeAndRepositionLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds& vBounds,
const Amg::Vector3D& cCenter,
double envelop) const override final
{
const_cast<DiscLayer*>(this)->resizeAndRepositionLayer(
vBounds, cCenter, envelop);
}
/** build approach surfaces */
void buildApproachDescriptor();
......
......@@ -181,24 +181,26 @@ namespace Trk {
const ICompatibilityEstimator* ice = nullptr) const;
/** get compatible surfaces starting from charged parameters */
virtual size_t compatibleSurfaces(std::vector<SurfaceIntersection>& cSurfaces,
const TrackParameters& pars,
PropDirection pdir,
const BoundaryCheck& bcheck,
bool materialSurfacesOnly = true,
const Surface* startSurface = nullptr,
const Surface* endSurface = nullptr,
const ICompatibilityEstimator* ice = nullptr) const;
size_t compatibleSurfaces(
std::vector<SurfaceIntersection>& cSurfaces,
const TrackParameters& pars,
PropDirection pdir,
const BoundaryCheck& bcheck,
bool materialSurfacesOnly = true,
const Surface* startSurface = nullptr,
const Surface* endSurface = nullptr,
const ICompatibilityEstimator* ice = nullptr) const;
/** get compatible surfaces starting from neutral parameters */
virtual size_t compatibleSurfaces(std::vector<SurfaceIntersection>& cSurfaces,
const NeutralParameters& pars,
PropDirection pdir,
const BoundaryCheck& bcheck,
bool materialSurfacesOnly = true,
const Surface* startSurface = nullptr,
const Surface* endSurface = nullptr,
const ICompatibilityEstimator* ice = nullptr) const;
size_t compatibleSurfaces(
std::vector<SurfaceIntersection>& cSurfaces,
const NeutralParameters& pars,
PropDirection pdir,
const BoundaryCheck& bcheck,
bool materialSurfacesOnly = true,
const Surface* startSurface = nullptr,
const Surface* endSurface = nullptr,
const ICompatibilityEstimator* ice = nullptr) const;
/** Has sub-structure method:
- sub-structure depending on :
......
......@@ -78,36 +78,39 @@ namespace Trk {
/** getting the next/overlapping Surface */
const Surface* overlapSurface(const TrackParameters& tp, const Surface* sf = nullptr) const;
/** move the Layer */
virtual void moveLayer( Amg::Transform3D& ) override;
virtual void moveLayer(Amg::Transform3D&) override final;
/** move the Layer */
virtual void moveLayer ATLAS_NOT_THREAD_SAFE ( Amg::Transform3D& ) const override;
protected:
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeLayer(const VolumeBounds&, double) override {}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
double) const override
{}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer(const VolumeBounds&,
const Amg::Vector3D&,
double) override
{}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&,
double) const override
{}
Surface*
m_surfaceRepresentation; //!< for the navigation Volume the surface is a private member */
private:
/**Default Constructor*/
NavigationLayer() {}
virtual void moveLayer
ATLAS_NOT_THREAD_SAFE(Amg::Transform3D&) const override final;
protected:
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeLayer(const VolumeBounds&, double) override final {}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds&, double) const override final
{}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer(const VolumeBounds&,
const Amg::Vector3D&,
double) override final
{}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&,
double) const override final
{}
Surface* m_surfaceRepresentation; //!< for the navigation Volume the
//!< surface is a private member */
private:
/**Default Constructor*/
NavigationLayer() {}
};
......
......@@ -187,28 +187,33 @@ class LayerMaterialProperties;
virtual double postUpdateMaterialFactor(const Trk::TrackParameters& par,
Trk::PropDirection dir) const override;
/** move the Layer */
virtual void moveLayer( Amg::Transform3D& shift ) override;
/** move the Layer */
virtual void moveLayer ATLAS_NOT_THREAD_SAFE(Amg::Transform3D& shift) const override
virtual void moveLayer(Amg::Transform3D& shift) override final;
/** move the Layer */
virtual void moveLayer
ATLAS_NOT_THREAD_SAFE(Amg::Transform3D& shift) const override final
{
const_cast<PlaneLayer*>(this)->moveLayer(shift);
}
private:
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeLayer(const VolumeBounds&, double) override{}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
double) const override
virtual void resizeLayer(const VolumeBounds&, double) override final {}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds&, double) const override final
{}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer(const VolumeBounds&, const Amg::Vector3D&, double) override {}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&,
double) const override
virtual void resizeAndRepositionLayer(const VolumeBounds&,
const Amg::Vector3D&,
double) override final
{}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&,
double) const override final
{}
};
......
......@@ -71,30 +71,37 @@ class OverlapDescriptor;
using CylinderSurface::insideBounds;
/** move the Layer */
virtual void moveLayer( Amg::Transform3D& shift ) override;
virtual void moveLayer(Amg::Transform3D& shift) override final;
/** move the Layer */
virtual void moveLayer ATLAS_NOT_THREAD_SAFE ( Amg::Transform3D& shift ) const override{
const_cast<SubtractedCylinderLayer*> (this)->moveLayer(shift);
virtual void moveLayer
ATLAS_NOT_THREAD_SAFE(Amg::Transform3D& shift) const override final
{
const_cast<SubtractedCylinderLayer*>(this)->moveLayer(shift);
}
private:
/** Resize the layer to the tracking volume - not implemented*/
virtual void resizeLayer(const VolumeBounds&, double) override {}
/** Resize the layer to the tracking volume - not implemented*/
virtual void resizeLayer ATLAS_NOT_THREAD_SAFE (const VolumeBounds&, double) const override {}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer(const VolumeBounds&, const Amg::Vector3D&, double) override {}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&,
double) const override
{}
/** Resize the layer to the tracking volume - not implemented*/
virtual void resizeLayer(const VolumeBounds&, double) override final {}
/** Resize the layer to the tracking volume - not implemented*/
virtual void resizeLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds&, double) const override final
{}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer(const VolumeBounds&,
const Amg::Vector3D&,
double) override final
{}
/** Resize the layer to the tracking volume - not implemented */
virtual void resizeAndRepositionLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&,
double) const override final
{}
};
} // end of namespace
#endif // TRKGEOMETRY_SUBTRACTEDCYLINDERLAYER_H
......
......@@ -66,31 +66,34 @@ namespace Trk {
double postUpdateMaterialFactor(const Trk::TrackParameters& par,
Trk::PropDirection dir) const override;
/** move the Layer */
void moveLayer( Amg::Transform3D& shift ) override;
virtual void moveLayer(Amg::Transform3D& shift) override final;
/** move the Layer */
void moveLayer ATLAS_NOT_THREAD_SAFE ( Amg::Transform3D& shift ) const override{
const_cast<SubtractedPlaneLayer*> (this)->moveLayer(shift);
virtual void moveLayer
ATLAS_NOT_THREAD_SAFE(Amg::Transform3D& shift) const override final
{
const_cast<SubtractedPlaneLayer*>(this)->moveLayer(shift);
}
private:
/** Resize the layer to the tracking volume - not implemented*/
void resizeLayer(const VolumeBounds&, double) override {}
virtual void resizeLayer(const VolumeBounds&, double) override final {}
/** Resize the layer to the tracking volume - not implemented*/
void resizeLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
double) const override
virtual void resizeLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds&, double) const override final
{}
/** Resize the layer to the tracking volume - not implemented */
void resizeAndRepositionLayer(const VolumeBounds&,
virtual void resizeAndRepositionLayer(const VolumeBounds&,
const Amg::Vector3D&,
double) override
double) override final
{}
/** Resize the layer to the tracking volume - not implemented */
void resizeAndRepositionLayer ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&,
double) const override
virtual void resizeAndRepositionLayer
ATLAS_NOT_THREAD_SAFE(const VolumeBounds&,
const Amg::Vector3D&,
double) const override final
{}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment