Project

General

Profile

Bug #7054

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

FindManyP() usage in ShowerAngleCluster module

Added by Gianluca Petrillo over 6 years ago. Updated about 6 years ago.

Status:
Rejected
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

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 ().

History

#1 Updated by Gianluca Petrillo about 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.

Also available in: Atom PDF