Project

General

Profile

Bug #7059

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

FindManyP() usage in ClusterPCA 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:
-
Co-Assignees:
Duration:

Description

ClusterPCA module shows non-optimal usage of associations.

larreco/ClusterFinder/ClusterPCA_module.cc

I notice a dubious practise in ClusterPCA::analyze().

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: Benjamin Jones ().

History

#1 Updated by Gianluca Petrillo almost 5 years ago

  • Assignee changed from Benjamin Jones to Gianluca Petrillo

Ben has written me that he can't find the time to fix it, and that is ok to have me do it in his place.
Reassigning.

#2 Updated by Gianluca Petrillo almost 5 years ago

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

Fixed, tested, committed, pushed.

#3 Updated by Gianluca Petrillo almost 5 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF