CMS 3D CMS Logo

List of all members | Static Public Member Functions
impl::MakeArray< T, N, I > Struct Template Reference

#include <trackAlgoPriorityOrder.h>

Static Public Member Functions

template<typename... Args>
static constexpr std::array< T, Nvalue (Args &&... args)
 

Detailed Description

template<typename T, size_t N, size_t I>
struct impl::MakeArray< T, N, I >

Helper template to initialize std::array compile-time.

Idea is that it "loops" over all reco::TrackBase::TrackAlgorithm enumerators from end to beginning. In each "iteration", the order priority is obtained from impl::algoPriorityOrder array, and the priority is added to a parameter pack. When the beginning is reached (termination condition is a partial specialization, see below), the std::array is initialized from the parameter pack. The "looping" is implemented as recursion.

Template Parameters
Tvalue_type of the std::array
NSize of the std::array
ICurrent index

Definition at line 119 of file trackAlgoPriorityOrder.h.

Member Function Documentation

◆ value()

template<typename T , size_t N, size_t I>
template<typename... Args>
static constexpr std::array<T, N> impl::MakeArray< T, N, I >::value ( Args &&...  args)
inlinestatic

Definition at line 121 of file trackAlgoPriorityOrder.h.

References writedatasetfile::args, Exhume::I, and impl::priorityForAlgo().

Referenced by impl::makeArray().

121  {
122  return MakeArray<T, N, I - 1>::value(priorityForAlgo(static_cast<reco::TrackBase::TrackAlgorithm>(I - 1)),
123  std::forward<Args>(args)...);
124  }
static constexpr std::array< T, N > value(Args &&... args)
const std::complex< double > I
Definition: I.h:8
constexpr unsigned int priorityForAlgo(const reco::TrackBase::TrackAlgorithm algo)