Project

General

Profile

Bug #7049

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

FindManyP() usage in ShowerCheater, ShowerFinder and ShowerReco modules

Added by Gianluca Petrillo over 6 years ago. Updated almost 6 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

ShowerCheater, ShowerFinder and ShowerReco modules show non-optimal usage of associations:

larreco/ShowerFinder/ShowerCheater_module.cc
larreco/ShowerFinder/ShowerFinder_module.cc
larreco/ShowerFinder/ShowerReco_module.cc

I notice dubious practise in ShowerCheater::produce(), ShowerFinder::produce() and ShowerReco::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
- not clear to me what is the purpose of pcoll, copy of pclust, in ShowerReco

Contact person is Andrzej Szelc ().

History

#1 Updated by Brian Rebel over 6 years ago

  • % Done changed from 0 to 30

Fixes have been committed to ShowerCheater_module.cc

#2 Updated by Gianluca Petrillo about 6 years ago

  • Status changed from Assigned to Resolved
  • Assignee changed from Andrzej Szelc to Gianluca Petrillo
  • % Done changed from 30 to 100

ShowerFinder and ShowerReco modified to have their queries out of the loops.

#3 Updated by Lynn Garren almost 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF