Skip to content
Snippets Groups Projects

Remove thread unsafe, incident-dependent variable in MCReconstructible

Merged Ross John Hunter requested to merge rjhunter-make-MCReconstructible-Work into master

FYI @rmatev @sstahl @mvesteri

For the HltEfficiencyChecker tool (prints out/plots some efficiencies for the new HLT, see https://gitlab.cern.ch/lhcb/mooreanalysis/merge_requests/1) I use some tuple tools to write trigger decisions and basic kinematic information to a tuple. Out of the box, MCTupleToolReconstructed seg faults due to some old-school treatment of the m_TkInfo object of MCReconstructible. Before this MR, mc track info (in the m_tkInfo member variable) was populated once per event when you call the mcTkInfo() method here, then at the end of an event, in the olden days, this handle would be called that would reset the track info for the next event. But this incident handling has now gone, and so m_TkInfo just uses info from the first event, which probably contains reference to the first event which doesn't remain valid for subsequent events -> seg fault.

Also this is very thread unsafe.

I also fix a typo I spotted in Event/MCEvent/Event/MCTrackGeomCriteria.h.

TODO:

  • Remove the handle altogether?
  • Switch to non-deprecated MCTrackInfo constructor to remove the deprecation warnings in the builds.

Dependency of https://gitlab.cern.ch/lhcb/mooreanalysis/merge_requests/1, Analysis!576 (merged). Should also be merged with Moore!389 (merged), !2373 (merged), Phys!662 (merged) but could be merged before them all.

Edited by Ross John Hunter

Merge request reports

Pipeline #1393024 passed

Pipeline passed for 95b43030 on rjhunter-make-MCReconstructible-Work

Approved by

Merged by Rosen MatevRosen Matev 5 years ago (Feb 7, 2020 5:31pm UTC)

Merge details

  • Changes merged into master with 9db7838a (commits were squashed).
  • Deleted the source branch.

Pipeline #1399194 passed

Pipeline passed for 9db7838a on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ross John Hunter mentioned in merge request !2289 (merged)

    mentioned in merge request !2289 (merged)

  • added 1 commit

    Compare with previous version

  • mentioned in issue #72 (closed)

  • added 1 commit

    • 911c0487 - Removed any reference to IIncidentListener and smart pointers->local variables for track info

    Compare with previous version

  • Ross John Hunter resolved all threads

    resolved all threads

  • Thanks for your help @graven - I've addressed all the points you made and opened a follow-up issue for the deprecated MCTrackInfo constructor. Unless there are any further comments, I think this is ready to merge.

  • Ross John Hunter marked the checklist item Remove the handle altogether? as completed

    marked the checklist item Remove the handle altogether? as completed

  • added 1 commit

    Compare with previous version

  • Ross John Hunter unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Rosen Matev assigned to @rcurrie and unassigned @rjhunter

    assigned to @rcurrie and unassigned @rjhunter

  • removed Simulation label

  • Ross John Hunter added 7 commits

    added 7 commits

    Compare with previous version

  • Gerhard Raven approved this merge request

    approved this merge request

  • let's put this in lhcb-gaudi-head

  • Edited by Software for LHCb
  • Ross John Hunter added 29 commits

    added 29 commits

    • 6ba42938...bdea3692 - 16 commits from branch master
    • 2f37a199 - Reset m_tkInfo for each particle
    • d054a313 - Better index searching
    • 0886b20c - Fixed typo
    • 3109a7a3 - Fixing memory leak: removed MCTkInfo funk and added instance each place when needed.
    • 88f250ea - Revert change to MCProperty - wasnt causing the issue
    • 4c92e65c - Fixed formatting
    • ee327942 - remove incident handle
    • 10848ca9 - Removed any reference to IIncidentListener and smart pointers->local variables for track info
    • b00d58d8 - Fixed formatting
    • 288d397f - Suffix line names with Decision in DecReports writer
    • 050f39ac - Reverting because I want to check first if any chagnes to master
    • d1839f81 - Merge branch 'master' into rjhunter-make-MCReconstructible-Work
    • 1cb8be30 - Merge branch 'rjhunter-make-MCReconstructible-Work' of...

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • @rcurrie @rmatev I just merged in the latest changes to master. It seems that the nightly build went fine (just the warnings that were there previously and were expected). So is this ready to merge?

  • Rosen Matev assigned to @rmatev and unassigned @rcurrie

    assigned to @rmatev and unassigned @rcurrie

  • Rosen Matev assigned to @rjhunter and unassigned @rmatev

    assigned to @rjhunter and unassigned @rmatev

  • Ross John Hunter marked as a Work In Progress

    marked as a Work In Progress

  • Ross John Hunter changed the description

    changed the description

  • added 1 commit

    • 1872f265 - Stopped using deprecated constructor

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Arthur Marius Hennequin marked the checklist item Switch to non-deprecated MCTrackInfo constructor to remove the deprecation warnings in the builds. as completed

    marked the checklist item Switch to non-deprecated MCTrackInfo constructor to remove the deprecation warnings in the builds. as completed

  • Arthur Marius Hennequin marked the checklist item Switch to non-deprecated MCTrackInfo constructor to remove the deprecation warnings in the builds. as incomplete

    marked the checklist item Switch to non-deprecated MCTrackInfo constructor to remove the deprecation warnings in the builds. as incomplete

  • added 1 commit

    • f42a61e5 - Use dataobjectreadhandle to pass around the track info

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Ross John Hunter marked the checklist item Switch to non-deprecated MCTrackInfo constructor to remove the deprecation warnings in the builds. as completed

    marked the checklist item Switch to non-deprecated MCTrackInfo constructor to remove the deprecation warnings in the builds. as completed

  • Ross John Hunter resolved all threads

    resolved all threads

  • Ross John Hunter unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Gerhard Raven approved this merge request

    approved this merge request

  • added 1 commit

    • 7725aa92 - Make the mc track info names more meaningful

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • mentioned in merge request Analysis!576 (merged)

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading