CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TrackAlgoPriorityOrder Class Reference

#include <TrackAlgoPriorityOrder.h>

Public Member Functions

unsigned int priority (reco::TrackBase::TrackAlgorithm algo) const
 
 TrackAlgoPriorityOrder (const std::vector< reco::TrackBase::TrackAlgorithm > &algoOrder)
 

Private Attributes

std::array< unsigned int, reco::TrackBase::algoSizepriority_
 

Detailed Description

Definition at line 6 of file TrackAlgoPriorityOrder.h.

Constructor & Destructor Documentation

◆ TrackAlgoPriorityOrder()

TrackAlgoPriorityOrder::TrackAlgoPriorityOrder ( const std::vector< reco::TrackBase::TrackAlgorithm > &  algoOrder)
explicit

Definition at line 8 of file TrackAlgoPriorityOrder.cc.

10  // with less than 1 element there is nothing to do
11  if (algoOrder.size() <= 1)
12  return;
13 
14  // Reordering the algo priorities is just a matter of taking the
15  // current priorities of the algos, sorting them, and inserting back
16  //
17  // iter0 2 2
18  // iter1 4 -> 3
19  // iter2 3 4
20  std::vector<unsigned int> priorities;
21  priorities.reserve(algoOrder.size());
22  for (const auto algo : algoOrder) {
24  }
25 
26  std::sort(priorities.begin(), priorities.end());
27 
28  for (size_t i = 0, end = priorities.size(); i != end; ++i) {
30  }
31 }

References HLT_FULL_cff::algoOrder, mps_fire::end, mps_fire::i, bookConverter::priorities(), priority_, and trackAlgoPriorityOrder.

Member Function Documentation

◆ priority()

unsigned int TrackAlgoPriorityOrder::priority ( reco::TrackBase::TrackAlgorithm  algo) const
inline

Definition at line 10 of file TrackAlgoPriorityOrder.h.

10 { return priority_[algo]; }

References priority_.

Member Data Documentation

◆ priority_

std::array<unsigned int, reco::TrackBase::algoSize> TrackAlgoPriorityOrder::priority_
private

Definition at line 13 of file TrackAlgoPriorityOrder.h.

Referenced by priority(), and TrackAlgoPriorityOrder().

trackAlgoPriorityOrder
constexpr std::array< unsigned int, reco::TrackBase::algoSize > trackAlgoPriorityOrder
Definition: trackAlgoPriorityOrder.h:157
mps_fire.i
i
Definition: mps_fire.py:428
TrackAlgoPriorityOrder::priority_
std::array< unsigned int, reco::TrackBase::algoSize > priority_
Definition: TrackAlgoPriorityOrder.h:13
cmsdt::algo
algo
Definition: constants.h:164
mps_fire.end
end
Definition: mps_fire.py:242
bookConverter.priorities
def priorities()
Definition: bookConverter.py:119
HLT_FULL_cff.algoOrder
algoOrder
Definition: HLT_FULL_cff.py:7990