Skip to content

Commit

Permalink
chore: Rename Updator(s) to Updater(s) (#2740)
Browse files Browse the repository at this point in the history
In the past, we converged on using "updater", with an e instead of an o.
  • Loading branch information
paulgessinger authored Nov 29, 2023
1 parent 169fad4 commit 1bf0daf
Show file tree
Hide file tree
Showing 72 changed files with 412 additions and 412 deletions.
14 changes: 7 additions & 7 deletions Core/include/Acts/Detector/Detector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ class Detector : public std::enable_shared_from_this<Detector> {
///
/// @param name the detecor name
/// @param rootVolumes the volumes contained by this detector
/// @param detectorVolumeUpdator is a Delegate to find the associated volume
/// @param detectorVolumeUpdater is a Delegate to find the associated volume
///
/// @note will throw an exception if volumes vector is empty
/// @note will throw an exception if duplicate volume names exist
/// @note will throw an exception if the delegate is not connected
Detector(std::string name,
std::vector<std::shared_ptr<DetectorVolume>> rootVolumes,
DetectorVolumeUpdator detectorVolumeUpdator) noexcept(false);
DetectorVolumeUpdater detectorVolumeUpdater) noexcept(false);

public:
/// Factory for producing memory managed instances of Detector.
static std::shared_ptr<Detector> makeShared(
std::string name,
std::vector<std::shared_ptr<DetectorVolume>> rootVolumes,
DetectorVolumeUpdator detectorVolumeUpdator);
DetectorVolumeUpdater detectorVolumeUpdater);

/// Retrieve a @c std::shared_ptr for this surface (non-const version)
///
Expand Down Expand Up @@ -128,11 +128,11 @@ class Detector : public std::enable_shared_from_this<Detector> {

/// Update the volume finder
///
/// @param detectorVolumeUpdator the new volume finder
void updateDetectorVolumeFinder(DetectorVolumeUpdator detectorVolumeUpdator);
/// @param detectorVolumeUpdater the new volume finder
void updateDetectorVolumeFinder(DetectorVolumeUpdater detectorVolumeUpdater);

/// Const access to the volume finder
const DetectorVolumeUpdator& detectorVolumeFinder() const;
const DetectorVolumeUpdater& detectorVolumeFinder() const;

/// Return the name of the detector
const std::string& name() const;
Expand All @@ -148,7 +148,7 @@ class Detector : public std::enable_shared_from_this<Detector> {
DetectorVolume::ObjectStore<std::shared_ptr<DetectorVolume>> m_volumes;

/// A volume finder delegate
DetectorVolumeUpdator m_detectorVolumeUpdator;
DetectorVolumeUpdater m_detectorVolumeUpdater;

/// Name/index map to find volumes by name and detect duplicates
std::unordered_map<std::string, std::size_t> m_volumeNameIndex;
Expand Down
16 changes: 8 additions & 8 deletions Core/include/Acts/Detector/DetectorComponents.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Detector/PortalGenerators.hpp"
#include "Acts/Navigation/DetectorVolumeUpdators.hpp"
#include "Acts/Navigation/SurfaceCandidatesUpdators.hpp"
#include "Acts/Navigation/DetectorVolumeUpdaters.hpp"
#include "Acts/Navigation/SurfaceCandidatesUpdaters.hpp"

#include <map>
#include <memory>
Expand Down Expand Up @@ -39,7 +39,7 @@ struct RootDetectorVolumes {
/// The list of root volumes
std::vector<std::shared_ptr<DetectorVolume>> volumes = {};
/// The Root volumes finder
DetectorVolumeUpdator volumeFinder;
DetectorVolumeUpdater volumeFinder;
};

/// @brief The currently built detector components
Expand Down Expand Up @@ -74,17 +74,17 @@ struct ExternalStructure {

/// @brief Holder struct for the internal structure components of a DetectorVolume
///
/// @note the surface surfacesUpdator needs to handle also portal providing
/// @note the surface surfacesUpdater needs to handle also portal providing
/// of contained volumes.
struct InternalStructure {
/// Contained surfaces of this volume, handled by the surfacesUpdator
/// Contained surfaces of this volume, handled by the surfacesUpdater
std::vector<std::shared_ptr<Surface>> surfaces = {};
/// Contained volumes of this volume, handled by the volumeUpdator
/// Contained volumes of this volume, handled by the volumeUpdater
std::vector<std::shared_ptr<DetectorVolume>> volumes = {};
/// Navigation delegate for surfaces
SurfaceCandidatesUpdator surfacesUpdator;
SurfaceCandidatesUpdater surfacesUpdater;
// Navigation delegate for volumes
DetectorVolumeUpdator volumeUpdator;
DetectorVolumeUpdater volumeUpdater;
};

} // namespace Experimental
Expand Down
42 changes: 21 additions & 21 deletions Core/include/Acts/Detector/DetectorVolume.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ class DetectorVolume : public std::enable_shared_from_this<DetectorVolume> {
/// @param bounds the volume bounds
/// @param surfaces are the contained surfaces of this volume
/// @param volumes are the contains volumes of this volume
/// @param detectorVolumeUpdator is a Delegate to find the associated volume
/// @param surfaceCandidateUpdator the navigation state updator for surfaces/portals
/// @param detectorVolumeUpdater is a Delegate to find the associated volume
/// @param surfaceCandidateUpdater the navigation state updator for surfaces/portals
///
/// @note throws exception if misconfigured: no bounds
/// @note throws exception if ghe portal general or navigation
Expand All @@ -110,24 +110,24 @@ class DetectorVolume : public std::enable_shared_from_this<DetectorVolume> {
const Transform3& transform, std::shared_ptr<VolumeBounds> bounds,
std::vector<std::shared_ptr<Surface>> surfaces,
std::vector<std::shared_ptr<DetectorVolume>> volumes,
DetectorVolumeUpdator detectorVolumeUpdator,
SurfaceCandidatesUpdator surfaceCandidateUpdator) noexcept(false);
DetectorVolumeUpdater detectorVolumeUpdater,
SurfaceCandidatesUpdater surfaceCandidateUpdater) noexcept(false);

/// Create a detector volume - empty/gap volume constructor
///
/// @param gctx the geometry context while building - for future contextual store
/// @param name the volume name
/// @param transform the transform defining the volume position
/// @param bounds the volume bounds
/// @param surfaceCandidateUpdator the navigation state updator for surfaces/portals
/// @param surfaceCandidateUpdater the navigation state updator for surfaces/portals
///
/// @note throws exception if misconfigured: no bounds
/// @note throws exception if ghe portal general or navigation
/// state updator delegates are not connected
DetectorVolume(
const GeometryContext& gctx, std::string name,
const Transform3& transform, std::shared_ptr<VolumeBounds> bounds,
SurfaceCandidatesUpdator surfaceCandidateUpdator) noexcept(false);
SurfaceCandidatesUpdater surfaceCandidateUpdater) noexcept(false);

/// Factory method for producing memory managed instances of DetectorVolume.
///
Expand All @@ -137,16 +137,16 @@ class DetectorVolume : public std::enable_shared_from_this<DetectorVolume> {
const Transform3& transform, std::shared_ptr<VolumeBounds> bounds,
std::vector<std::shared_ptr<Surface>> surfaces,
std::vector<std::shared_ptr<DetectorVolume>> volumes,
DetectorVolumeUpdator detectorVolumeUpdator,
SurfaceCandidatesUpdator surfaceCandidateUpdator);
DetectorVolumeUpdater detectorVolumeUpdater,
SurfaceCandidatesUpdater surfaceCandidateUpdater);

/// Factory method for producing memory managed instances of DetectorVolume.
///
/// @note This is called by the @class DetectorVolumeFactory
static std::shared_ptr<DetectorVolume> makeShared(
const GeometryContext& gctx, std::string name,
const Transform3& transform, std::shared_ptr<VolumeBounds> bounds,
SurfaceCandidatesUpdator surfaceCandidateUpdator);
SurfaceCandidatesUpdater surfaceCandidateUpdater);

public:
/// Retrieve a @c std::shared_ptr for this surface (non-const version)
Expand Down Expand Up @@ -280,22 +280,22 @@ class DetectorVolume : public std::enable_shared_from_this<DetectorVolume> {
const std::vector<const DetectorVolume*>& volumes() const;

/// Const access to the detector volume updator
const DetectorVolumeUpdator& detectorVolumeUpdator() const;
const DetectorVolumeUpdater& detectorVolumeUpdater() const;

/// This method allows to udate the navigation state updator
/// module.
///
/// @param surfaceCandidateUpdator the new navigation state updator for surfaces
/// @param surfaceCandidateUpdater the new navigation state updator for surfaces
/// @param surfaces the surfaces the new navigation state updator points to
/// @param volumes the volumes the new navigation state updator points to
///
void assignSurfaceCandidatesUpdator(
SurfaceCandidatesUpdator surfaceCandidateUpdator,
void assignSurfaceCandidatesUpdater(
SurfaceCandidatesUpdater surfaceCandidateUpdater,
const std::vector<std::shared_ptr<Surface>>& surfaces = {},
const std::vector<std::shared_ptr<DetectorVolume>>& volumes = {});

/// Const access to the navigation state updator
const SurfaceCandidatesUpdator& surfaceCandidatesUpdator() const;
const SurfaceCandidatesUpdater& surfaceCandidatesUpdater() const;

/// Update a portal given a portal index
///
Expand Down Expand Up @@ -389,10 +389,10 @@ class DetectorVolume : public std::enable_shared_from_this<DetectorVolume> {
/// BoundingBox
std::shared_ptr<const BoundingBox> m_boundingBox;

DetectorVolumeUpdator m_detectorVolumeUpdator;
DetectorVolumeUpdater m_detectorVolumeUpdater;

/// The navigation state updator
SurfaceCandidatesUpdator m_surfaceCandidatesUpdator;
SurfaceCandidatesUpdater m_surfaceCandidatesUpdater;

/// Volume material (optional)
std::shared_ptr<IVolumeMaterial> m_volumeMaterial = nullptr;
Expand All @@ -416,11 +416,11 @@ class DetectorVolumeFactory {
std::shared_ptr<VolumeBounds> bounds,
const std::vector<std::shared_ptr<Surface>>& surfaces,
const std::vector<std::shared_ptr<DetectorVolume>>& volumes,
DetectorVolumeUpdator detectorVolumeUpdator,
SurfaceCandidatesUpdator surfaceCandidateUpdator) {
DetectorVolumeUpdater detectorVolumeUpdater,
SurfaceCandidatesUpdater surfaceCandidateUpdater) {
auto dVolume = DetectorVolume::makeShared(
gctx, name, transform, std::move(bounds), surfaces, volumes,
std::move(detectorVolumeUpdator), std::move(surfaceCandidateUpdator));
std::move(detectorVolumeUpdater), std::move(surfaceCandidateUpdater));
dVolume->construct(gctx, portalGenerator);
return dVolume;
}
Expand All @@ -430,10 +430,10 @@ class DetectorVolumeFactory {
const PortalGenerator& portalGenerator, const GeometryContext& gctx,
std::string name, const Transform3& transform,
std::shared_ptr<VolumeBounds> bounds,
SurfaceCandidatesUpdator surfaceCandidateUpdator) {
SurfaceCandidatesUpdater surfaceCandidateUpdater) {
auto dVolume = DetectorVolume::makeShared(
gctx, std::move(name), transform, std::move(bounds),
std::move(surfaceCandidateUpdator));
std::move(surfaceCandidateUpdater));
dVolume->construct(gctx, portalGenerator);
return dVolume;
}
Expand Down
4 changes: 2 additions & 2 deletions Core/include/Acts/Detector/IndexedRootVolumeFinderBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "Acts/Detector/interface/IRootVolumeFinderBuilder.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Navigation/DetectorVolumeUpdators.hpp"
#include "Acts/Navigation/DetectorVolumeUpdaters.hpp"
#include "Acts/Utilities/BinningData.hpp"

#include <memory>
Expand All @@ -36,7 +36,7 @@ class IndexedRootVolumeFinderBuilder final : public IRootVolumeFinderBuilder {
/// @param rootVolumes the root volumes to be used for the finder
///
/// @return a shared detector object
DetectorVolumeUpdator construct(
DetectorVolumeUpdater construct(
const GeometryContext& gctx,
const std::vector<std::shared_ptr<DetectorVolume>>& rootVolumes)
const final;
Expand Down
18 changes: 9 additions & 9 deletions Core/include/Acts/Detector/Portal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Portal : public std::enable_shared_from_this<Portal> {

public:
/// The volume links forward/backward with respect to the surface normal
using DetectorVolumeUpdators = std::array<DetectorVolumeUpdator, 2u>;
using DetectorVolumeUpdaters = std::array<DetectorVolumeUpdater, 2u>;

/// The vector of attached volumes forward/backward, this is useful in the
/// geometry building
Expand Down Expand Up @@ -126,27 +126,27 @@ class Portal : public std::enable_shared_from_this<Portal> {
/// Update the volume link
///
/// @param dir the direction of the link
/// @param dVolumeUpdator is the mangaged volume updator delegate
/// @param dVolumeUpdater is the mangaged volume updator delegate
/// @param attachedVolumes is the list of attached volumes for book keeping
///
/// @note this overwrites the existing link
void assignDetectorVolumeUpdator(
Direction dir, DetectorVolumeUpdator dVolumeUpdator,
void assignDetectorVolumeUpdater(
Direction dir, DetectorVolumeUpdater dVolumeUpdater,
std::vector<std::shared_ptr<DetectorVolume>> attachedVolumes);

/// Update the volume link, w/o directive, i.e. it relies that there's only
/// one remaining link to be set, throws an exception if that's not the case
///
/// @param dVolumeUpdator is the mangaged volume updator delegate
/// @param dVolumeUpdater is the mangaged volume updator delegate
/// @param attachedVolumes is the list of attached volumes for book keeping
///
/// @note this overwrites the existing link
void assignDetectorVolumeUpdator(DetectorVolumeUpdator dVolumeUpdator,
void assignDetectorVolumeUpdater(DetectorVolumeUpdater dVolumeUpdater,
std::vector<std::shared_ptr<DetectorVolume>>
attachedVolumes) noexcept(false);

// Access to the portal targets: opposite/along normal vector
const DetectorVolumeUpdators& detectorVolumeUpdators() const;
const DetectorVolumeUpdaters& detectorVolumeUpdaters() const;

// Access to the attached volumes - non-const access
AttachedDetectorVolumes& attachedDetectorVolumes();
Expand All @@ -156,8 +156,8 @@ class Portal : public std::enable_shared_from_this<Portal> {
std::shared_ptr<RegularSurface> m_surface;

/// The portal targets along/opposite the normal vector
DetectorVolumeUpdators m_volumeUpdators = {unconnectedUpdator(),
unconnectedUpdator()};
DetectorVolumeUpdaters m_volumeUpdaters = {unconnectedUpdater(),
unconnectedUpdater()};

/// The portal attaches to the following volumes
AttachedDetectorVolumes m_attachedVolumes;
Expand Down
2 changes: 1 addition & 1 deletion Core/include/Acts/Detector/detail/IndexedGridFiller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "Acts/Detector/detail/ReferenceGenerators.hpp"
#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Geometry/Polyhedron.hpp"
#include "Acts/Navigation/SurfaceCandidatesUpdators.hpp"
#include "Acts/Navigation/SurfaceCandidatesUpdaters.hpp"
#include "Acts/Utilities/Delegate.hpp"
#include "Acts/Utilities/Enumerate.hpp"
#include "Acts/Utilities/IAxis.hpp"
Expand Down
14 changes: 7 additions & 7 deletions Core/include/Acts/Detector/detail/IndexedSurfacesGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "Acts/Definitions/Algebra.hpp"
#include "Acts/Detector/detail/IndexedGridFiller.hpp"
#include "Acts/Navigation/SurfaceCandidatesUpdators.hpp"
#include "Acts/Navigation/SurfaceCandidatesUpdaters.hpp"
#include "Acts/Utilities/Enumerate.hpp"

#include <algorithm>
Expand All @@ -23,7 +23,7 @@ namespace detail {

/// @brief A templated indexed grid generator.
///
/// This Generator creates a SurfaceCandidatesUpdator delegate
/// This Generator creates a SurfaceCandidatesUpdater delegate
/// which can then be used in the DetectorVolume class for updating
/// given surface candidates based on an index grid.
///
Expand Down Expand Up @@ -58,9 +58,9 @@ struct IndexedSurfacesGenerator {
/// @param aGenerator the axis generator
/// @param rGenerator the reference generataor
///
/// @return a SurfaceCandidateUpdator delegate
/// @return a SurfaceCandidateUpdater delegate
template <typename axis_generator, typename reference_generator>
SurfaceCandidatesUpdator operator()(
SurfaceCandidatesUpdater operator()(
const GeometryContext& gctx, const axis_generator& aGenerator,
const reference_generator& rGenerator) const {
ACTS_DEBUG("Indexing " << surfaces.size() << " surface, "
Expand Down Expand Up @@ -92,10 +92,10 @@ struct IndexedSurfacesGenerator {
std::tie(allPortals, indexedSurfaces));

// Create the delegate and connect it
SurfaceCandidatesUpdator nStateUpdator;
nStateUpdator.connect<&DelegateType::update>(
SurfaceCandidatesUpdater nStateUpdater;
nStateUpdater.connect<&DelegateType::update>(
std::move(indexedSurfacesAllPortals));
return nStateUpdator;
return nStateUpdater;
}

/// Access to the logger
Expand Down
6 changes: 3 additions & 3 deletions Core/include/Acts/Detector/detail/PortalHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace PortalHelper {
/// @param volume is the volume that is attached to the portal
/// @param direction is the direction to which it is attached
///
void attachDetectorVolumeUpdator(Portal& portal,
void attachDetectorVolumeUpdater(Portal& portal,
const std::shared_ptr<DetectorVolume>& volume,
const Direction& direction);

Expand All @@ -59,7 +59,7 @@ void attachDetectorVolumeUpdator(Portal& portal,
/// @param boundaries are the value boundaries
/// @param binning is the binning type
///
void attachDetectorVolumesUpdator(
void attachDetectorVolumesUpdater(
const GeometryContext& gctx, Portal& portal,
const std::vector<std::shared_ptr<DetectorVolume>>& volumes,
const Direction& direction, const std::vector<ActsScalar>& boundaries,
Expand All @@ -73,7 +73,7 @@ void attachDetectorVolumesUpdator(
/// @param volumes are the volumes that are pointed to
/// @param pReplacements are the portal replacements that are newly connected
///
void attachDetectorVolumeUpdators(
void attachDetectorVolumeUpdaters(
const GeometryContext& gctx,
const std::vector<std::shared_ptr<DetectorVolume>>& volumes,
std::vector<PortalReplacement>& pReplacements);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#pragma once

#include "Acts/Geometry/GeometryContext.hpp"
#include "Acts/Navigation/DetectorVolumeUpdators.hpp"
#include "Acts/Navigation/DetectorVolumeUpdaters.hpp"

#include <memory>
#include <vector>
Expand All @@ -32,7 +32,7 @@ class IRootVolumeFinderBuilder {
/// @param rootVolumes the root volumes to be used for the search
///
/// @return a shared detector object
virtual DetectorVolumeUpdator construct(
virtual DetectorVolumeUpdater construct(
const GeometryContext& gctx,
const std::vector<std::shared_ptr<DetectorVolume>>& rootVolumes)
const = 0;
Expand Down
Loading

0 comments on commit 1bf0daf

Please sign in to comment.