Bug #7054
Bug #6394: Verify that association query objects are created outside tight loops
FindManyP() usage in ShowerAngleCluster module
100%
Description
This is about ShowerAngleCluster
module:
larreco/ClusterFinder/ShowerAngleCluster_module.cc
The first instance is within a doubly-nested for loop. It seems to me it might as well live outside them.
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
- I am still not sure about this custom of using a temporary object as the first parameter of FindManyP
constructor; I have seen it a lot by now, so it might be it has its own motivation, that just escapes me
Contact person: Kazuhiro Terao (kterao@fnal.gov).
History
#1 Updated by Gianluca Petrillo over 6 years ago
- Status changed from Assigned to Rejected
- % Done changed from 0 to 100
From Kazuhiro communication:
ShowerAngleCluster will be probably gone. It’s Andrzej’s code but we have a whole replacement in LArLite which should make into LArSoft at some point...
We are waiting the natural death of this code.