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.

References HLT_2024v12_cff::algoOrder, mps_fire::end, mps_fire::i, bookConverter::priorities(), priority_, jetUpdater_cfi::sort, and trackAlgoPriorityOrder.

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 }
std::array< unsigned int, reco::TrackBase::algoSize > priority_
constexpr std::array< unsigned int, reco::TrackBase::algoSize > trackAlgoPriorityOrder

Member Function Documentation

◆ priority()

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

Definition at line 10 of file TrackAlgoPriorityOrder.h.

References priority_.

10 { return priority_[algo]; }
std::array< unsigned int, reco::TrackBase::algoSize > 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().