Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • athena athena
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Jira
    • Jira
  • Merge requests 167
    • Merge requests 167
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Issue
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • atlas
  • athenaathena
  • Merge requests
  • !42640

Define a separate scoped enumeration for the possible SurfaceTypes. And use it consistently

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Christos Anastopoulos requested to merge ATLAS-EGamma/athena:Parameter_surface_split_to_clean_up_include into master Apr 15, 2021
  • Overview 14
  • Commits 5
  • Pipelines 4
  • Changes 59

Define a separate scoped enumeration for the possible SurfaceTypes. And use it consistently.

The motivation is that there is a cross dependency creeping in from ParametersBase to Surface and Surface to ParametersBase due to that enum. e.g

  • "Tracking/TrkEvent/TrkParametersBase/TrkParametersBase/ParametersT.h" includes #include "TrkSurfaces/Surface.h"

  • and "/Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/Surface.h" includes #include "TrkParametersBase/ParametersBase.h"

  • and "Tracking/TrkDetDescr/TrkSurfaces/TrkSurfaces/ConeSurface.h" includes #include "TrkParametersBase/ParametersT.h"

  • etc etc, e.g we include headers from one package to the other.

For now this kind of works as we do not have a CMake dependency (we omit it) from the TrkParametersBase to the Surfaces although we have the includes. And at the end seems to do the right thing when we go to the TrkParameters (template instantiation of some concrete types which is a 3rd package depending on both), but is a bit brittle and one needs to be very careful as is not obvious.

So do a similar thing like we did for the SurfaceUniquePtr and move out the scoped enum in a different base package .

A single scoped enum allows to unify the usage syntax, as we seem to be using this a couple of different ways. Also avoids implicit conversions (to int), so we keep the type around, and seems to emit a bit better warnings in cases .

Mentioning @sroe

Edited Apr 18, 2021 by Christos Anastopoulos
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: Parameter_surface_split_to_clean_up_include