CMS 3D CMS Logo

Public Member Functions | Private Attributes

reco::tau::RecoTauLexicographicalRanking< RankingList, Type > Class Template Reference

#include <RecoTauCleaningTools.h>

Inheritance diagram for reco::tau::RecoTauLexicographicalRanking< RankingList, Type >:
binary_function

List of all members.

Public Member Functions

bool operator() (const Type &a, const Type &b) const
 RecoTauLexicographicalRanking (const RankingList &rankers)

Private Attributes

const RankingList & rankers_

Detailed Description

template<typename RankingList, typename Type>
class reco::tau::RecoTauLexicographicalRanking< RankingList, Type >

Definition at line 9 of file RecoTauCleaningTools.h.


Constructor & Destructor Documentation

template<typename RankingList , typename Type >
reco::tau::RecoTauLexicographicalRanking< RankingList, Type >::RecoTauLexicographicalRanking ( const RankingList &  rankers) [inline, explicit]

Definition at line 14 of file RecoTauCleaningTools.h.

                                                                        :
        rankers_(rankers) {}

Member Function Documentation

template<typename RankingList , typename Type >
bool reco::tau::RecoTauLexicographicalRanking< RankingList, Type >::operator() ( const Type &  a,
const Type &  b 
) const [inline]

Definition at line 17 of file RecoTauCleaningTools.h.

References a, b, and reco::tau::RecoTauLexicographicalRanking< RankingList, Type >::rankers_.

                                                          {
        typename RankingList::const_iterator ranker = rankers_.begin();
        while (ranker != rankers_.end()) {
          double aResult = (*ranker)(a);
          double bResult = (*ranker)(b);
          if (aResult != bResult)
            return (aResult < bResult);
          ++ranker;
        }
        // If all aare equal return false
        return false;
      }

Member Data Documentation

template<typename RankingList , typename Type >
const RankingList& reco::tau::RecoTauLexicographicalRanking< RankingList, Type >::rankers_ [private]