Skip to content

Commit

Permalink
refactor!: Set calibratedSize only through allocateCalibrated (#1749)
Browse files Browse the repository at this point in the history
Closes #1743
  • Loading branch information
paulgessinger committed Dec 15, 2022
1 parent 0590e9d commit d590d8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 0 additions & 13 deletions Core/include/Acts/EventData/MultiTrajectory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -880,16 +880,6 @@ class TrackStateProxy {
return component<IndexType, hashString("measdim")>();
}

/// Return reference to the (dynamic) number of dimensions stored for this
/// measurement.
/// @note The underlying storage is overallocated to MeasurementSizeMax
/// regardless of this value
/// @return The number of dimensions
template <bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
IndexType& calibratedSize() {
return component<IndexType, hashString("measdim")>();
}

/// Overwrite existing measurement data.
///
/// @tparam kMeasurementSize Size of the calibrated measurement
Expand All @@ -907,8 +897,6 @@ class TrackStateProxy {
static_assert(kMeasurementSize <= M,
"Input measurement must be within the allowed size");

calibratedSize() = kMeasurementSize;

assert(has<hashString("calibratedSourceLink")>());

setCalibratedSourceLink(meas.sourceLink());
Expand All @@ -928,7 +916,6 @@ class TrackStateProxy {

void allocateCalibrated(size_t measdim) {
m_traj->allocateCalibrated(m_istate, measdim);
calibratedSize() = measdim;
}

/// Getter/setter for chi2 value associated with the track state
Expand Down
2 changes: 2 additions & 0 deletions Core/include/Acts/EventData/VectorMultiTrajectory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ class VectorMultiTrajectory final
return;
}

m_index[istate].measdim = measdim;

m_measOffset[istate] = static_cast<IndexType>(m_meas.size());
m_meas.resize(m_meas.size() + measdim);

Expand Down

0 comments on commit d590d8b

Please sign in to comment.