Bug #7058
Bug #6394: Verify that association query objects are created outside tight loops
FindManyP() usage in LineMerger module
Start date:
09/22/2014
Due date:
% Done:
100%
Estimated time:
1.00 h
Occurs In:
Experiment:
LArSoft
Co-Assignees:
Description
LineMerger
module shows non-optimal usage of associations.
larreco/ClusterFinder/LineMerger_module.cc
I notice dubious practise in LineMerger::produce()
.
The action I recommend:
- since you use it, #include "art/Framework/Core/FindManyP.h"
- bring the queries FindManyP()
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: Benjamin Carls (bcarls@fnal.gov).
History
#1 Updated by Gianluca Petrillo about 6 years ago
- Status changed from Assigned to Resolved
- Assignee changed from Ben Carls to Gianluca Petrillo
- % Done changed from 0 to 100
- Experiment LArSoft added
- Experiment deleted (
-)
Fixed, tested and pushed into develop
branch.
#2 Updated by Gianluca Petrillo about 6 years ago
- Status changed from Resolved to Closed