Project

General

Profile

Bug #7060

Bug #6394: Verify that association query objects are created outside tight loops

FindManyP() usage in CosmicTracker module

Added by Gianluca Petrillo almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Reconstruction
Target version:
-
Start date:
09/22/2014
Due date:
% Done:

100%

Estimated time:
1.00 h
Occurs In:
Experiment:
LArSoft
Co-Assignees:
Duration:

Description

CosmicTracker module show non-optimal use of associations.

larreco/TrackFinder/CosmicTracker_module.cc

I notice dubious practise in CosmicTracker::produce().

The action I recommend:
- since you use it, #include "art/Framework/Core/FindManyP.h"
- bring the FindManyP instance out of the loops
- use const std::vector<art::Ptr<T>>& to store the result of FindManyP::at(), that returns a constant reference

Contact person: Brian Rebel ().

History

#1 Updated by Gianluca Petrillo almost 5 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Fixed, tested, committed and pushed.

#2 Updated by Gianluca Petrillo almost 5 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF