Bug #7060
Bug #6394: Verify that association query objects are created outside tight loops
FindManyP() usage in CosmicTracker module
Start date:
09/22/2014
Due date:
% Done:
100%
Estimated time:
1.00 h
Occurs In:
Experiment:
LArSoft
Co-Assignees:
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 (brebel@fnal.gov).
History
#1 Updated by Gianluca Petrillo over 6 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Fixed, tested, committed and pushed.
#2 Updated by Gianluca Petrillo over 6 years ago
- Status changed from Resolved to Closed