Skip to content
GitLab
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 183
    • Merge requests 183
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • atlasatlas
  • athenaathena
  • Merge requests
  • !60373

RobustTrackingGeometryBuilder : Move the common Svc/Cond part under Impl . Templated

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Christos Anastopoulos requested to merge ATLAS-EGamma/athena:RobustTrackingBuilder_unify into master Feb 05, 2023
  • Overview 22
  • Commits 2
  • Pipelines 2
  • Changes 7

Let me ping @jchapman ...

This is the last (or at least I could see) of the major factoring of code between Svc and Cond. This is a bit more special as the Layer/BeamPipe Cond/Svc were used in various places.

Basically we have a template where we have an enum/ tag Cond/Svc.

  enum ToolType {
    Cond = 0,
    Svc = 1,
  };
  template <ToolType type, typename LayerBuilders, typename PipeBuilder>
  std::unique_ptr<Trk::TrackingGeometry> trackingGeometryImpl(
      const LayerBuilders& layerHandles, const PipeBuilder& pipeHandle,
      const EventContext* ctx = nullptr,
      SG::WriteCondHandle<Trk::TrackingGeometry>* whandle = nullptr) const;

Ignoring the other 500 lines of code (the common ones that we move into one place) and some "shuffling".

The trick is in lines like these

if constexpr (type == Cond) {
      cylinderLayers = layerHandles[ilb]->cylindricalLayers(*ctx, *whandle);
    } else {
      cylinderLayers = layerHandles[ilb]->cylindricalLayers();
    }

The short idea I exchanged with @jchapman is this https://godbolt.org/z/66dsf51Ks

Edited Feb 06, 2023 by Christos Anastopoulos
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: RobustTrackingBuilder_unify