Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add TransformRange helper #3060

Merged
merged 9 commits into from
Mar 27, 2024

Conversation

paulgessinger
Copy link
Member

This implements a transforming range adapter, similar to what will be available with the C++20+ ranges library, but much less powerful.

I'm planning to use this to gate mutable access to inner structures like child volumes in TrackingVolume, by using the ConstDereference policy for this range helper, which will always dereference and convert to const.

This implements a transforming range adapter, similar to what will be
available with the C++20+ ranges library, but much less powerful.
@paulgessinger paulgessinger added this to the next milestone Mar 26, 2024
@github-actions github-actions bot added the Component - Core Affects the Core module label Mar 26, 2024
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.98%. Comparing base (aefffb3) to head (2f6323a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3060      +/-   ##
==========================================
+ Coverage   48.93%   48.98%   +0.05%     
==========================================
  Files         488      489       +1     
  Lines       28918    28947      +29     
  Branches    13713    13713              
==========================================
+ Hits        14152    14181      +29     
  Misses       4951     4951              
  Partials     9815     9815              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Core/include/Acts/Utilities/TransformRange.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/TransformRange.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/TransformRange.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/TransformRange.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/TransformRange.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/TransformRange.hpp Outdated Show resolved Hide resolved
Core/include/Acts/Utilities/TransformRange.hpp Outdated Show resolved Hide resolved
@paulgessinger
Copy link
Member Author

@niermann999 I've simplified (I think) the typedefs, and straightened out (hopefully) the type deductions. Could you have another look?

@paulgessinger
Copy link
Member Author

Added doc comments now.

Copy link
Contributor

@niermann999 niermann999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just minor suggestions

@kodiakhq kodiakhq bot merged commit 2b51bcb into acts-project:main Mar 27, 2024
52 checks passed
@andiwand andiwand modified the milestones: next, v34.0.0 Apr 15, 2024
kodiakhq bot pushed a commit that referenced this pull request Apr 23, 2024
This PR:
- Marks all of the Gen1 interface of `TrackingVolume` as such, to indicate what we'll supersede in the future
- Makes a slight adjustment to [`TransformRange`](#3060), for
- Add internal vector of uniquely owned child `TrackingVolume`s in `TrackingVolume`, accessible in a const-preserving way through `TransformRange`.
- Updates the `TrackingVolume` constructors, eliminating one convenience one we don't need, and start adding ones we'll use for Gen3

Blocked by:
- #3060
EleniXoch pushed a commit to EleniXoch/acts that referenced this pull request May 6, 2024
This implements a transforming range adapter, similar to what will be available with the C++20+ ranges library, but much less powerful.

I'm planning to use this to gate mutable access to inner structures like child volumes in `TrackingVolume`, by using the `ConstDereference` policy for this range helper, which will always dereference and convert to const.
EleniXoch pushed a commit to EleniXoch/acts that referenced this pull request May 6, 2024
…roject#3064)

This PR:
- Marks all of the Gen1 interface of `TrackingVolume` as such, to indicate what we'll supersede in the future
- Makes a slight adjustment to [`TransformRange`](acts-project#3060), for
- Add internal vector of uniquely owned child `TrackingVolume`s in `TrackingVolume`, accessible in a const-preserving way through `TransformRange`.
- Updates the `TrackingVolume` constructors, eliminating one convenience one we don't need, and start adding ones we'll use for Gen3

Blocked by:
- acts-project#3060
asalzburger pushed a commit to asalzburger/acts that referenced this pull request May 21, 2024
This implements a transforming range adapter, similar to what will be available with the C++20+ ranges library, but much less powerful.

I'm planning to use this to gate mutable access to inner structures like child volumes in `TrackingVolume`, by using the `ConstDereference` policy for this range helper, which will always dereference and convert to const.
asalzburger pushed a commit to asalzburger/acts that referenced this pull request May 21, 2024
…roject#3064)

This PR:
- Marks all of the Gen1 interface of `TrackingVolume` as such, to indicate what we'll supersede in the future
- Makes a slight adjustment to [`TransformRange`](acts-project#3060), for
- Add internal vector of uniquely owned child `TrackingVolume`s in `TrackingVolume`, accessible in a const-preserving way through `TransformRange`.
- Updates the `TrackingVolume` constructors, eliminating one convenience one we don't need, and start adding ones we'll use for Gen3

Blocked by:
- acts-project#3060
@paulgessinger paulgessinger mentioned this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Core Affects the Core module
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants