LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art::SortInvalidFirst< T > Class Template Reference

#include "SortInvalidFirst.h"

Inheritance diagram for art::SortInvalidFirst< T >:

Public Member Functions

 SortInvalidFirst ()
 
 SortInvalidFirst (T const &invalidValue)
 
bool operator() (T const &left, T const &right) const
 

Private Attributes

invalidValue_
 

Detailed Description

template<typename T>
class art::SortInvalidFirst< T >

Definition at line 8 of file SortInvalidFirst.h.

Constructor & Destructor Documentation

template<typename T>
art::SortInvalidFirst< T >::SortInvalidFirst ( )
inline

Definition at line 14 of file SortInvalidFirst.h.

template<typename T>
art::SortInvalidFirst< T >::SortInvalidFirst ( T const &  invalidValue)
inlineexplicit

Definition at line 15 of file SortInvalidFirst.h.

15  : invalidValue_(invalidValue)
16  {}

Member Function Documentation

template<typename T>
bool art::SortInvalidFirst< T >::operator() ( T const &  left,
T const &  right 
) const
inline

Definition at line 18 of file SortInvalidFirst.h.

References art::SortInvalidFirst< T >::invalidValue_, and art::right().

19  {
20  if (left == invalidValue_ && right != invalidValue_) {
21  return true;
22  } else if (right == invalidValue_ && left != invalidValue_) {
23  return false;
24  } else {
25  return left < right;
26  }
27  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:104

Member Data Documentation

template<typename T>
T art::SortInvalidFirst< T >::invalidValue_
private

Definition at line 30 of file SortInvalidFirst.h.

Referenced by art::SortInvalidFirst< T >::operator()().


The documentation for this class was generated from the following file: