Commit e4b37e8b authored by Rosen Matev's avatar Rosen Matev
Browse files

Lock entire AlignAlgorithm operator

parent ca586c4a
Pipeline #4818304 failed with stages
in 41 seconds
......@@ -39,6 +39,8 @@ namespace LHCb::Alignment {
bool accumulate( Equations& equations, const Residuals<TNode>& residuals ) const;
bool testTrackNodes( const Track& track ) const;
bool testNodes( const TFitResult* fr ) const;
mutable std::mutex m_lock;
};
using AlignAlgo = AlignAlgorithm<LHCb::KalmanFitResult, LHCb::FitNode>;
......@@ -51,6 +53,7 @@ namespace LHCb::Alignment {
//=============================================================================
template <typename TFitResult, typename TNode>
void AlignAlgorithm<TFitResult, TNode>::operator()( const EventContext&, const GenericDetElem& lhcb ) const {
auto lock = std::scoped_lock{m_lock};
// FIXME XXX : we should check that the ConditionContext does not change
// If it does, we should throw an exception and stop processing
// The risk is to mix data from different runs by mistake and screw the alignment procedure
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment