Skip to content

iPat Utils make it play nice with Athena MT

@rosati , @nkoehler , @wleight is what I kind of had in mind if we want to start understanding the iPat fitter in MT and try to make it behave a bit better, in the sense of the full call chain passing ATLAS_CHECK_THREAD_SAFETY etc ...

  • Tier0 tests seem to fine (which is a bit of suprise in some sense ...) RunTier0Tests.log

  • Make iPatFitterUtils pass the ATLAS thread safety checker

  • Update iPatFitter.

The main ideas

  • remove mutable,

  • try to be const correct,

  • remove "global" state (fitMatrix was acting like a COMMON BLOCK in my best description )

  • remove "internal" state to a struct FitProcedure::Cache following the by now usual trick, at least the one used in Gx2 and GSF to avoid synchronisation.

  • In the process also add some more unique_ptr usage.

  • I had to touch / read a few place so had to also consistently format the code to be able to go through ...

If this goes in

    Trk::FitProcedure::Cache cache(m_fitProcedure->constrainedAlignmentEffects());

    //This lock should no be needed , leaving it for now
    // until we are sure all function pass thread safety
    // requirements
    std::scoped_lock lock(m_fitProcedureMutex);
    const FitProcedureQuality& quality = m_fitProcedure->execute

eventually this lock can even go. I would hope that it only guards the fitProcedure (not something else), which has its state removed so would not need one.

I was hoping for a smaller MR, but either the full package passes the MT checks or not, so had to go through more code than initially anticipated.

Edited by Christos Anastopoulos

Merge request reports