ATLAS Offline Software
Loading...
Searching...
No Matches
Analysis::TauCmp Namespace Reference

Functions

template<>
bool cmp (const double &a, const double &b)
template<>
bool cmp< ElementLink< CaloCellContainer > > (const ElementLink< CaloCellContainer > &a, const ElementLink< CaloCellContainer > &b)
template<>
bool cmp< std::pair< TauJetParameters::TauID, double > > (const std::pair< TauJetParameters::TauID, double > &a, const std::pair< TauJetParameters::TauID, double > &b)
template<typename T>
bool cmp (const T &a, const T &b)
 Comparison predicate.
template<typename T>
bool vcmp (const std::vector< T > &a, const std::vector< T > &b)
 Compare vectors using cmp predicate.
template<typename T>
bool vvcmp (const std::vector< std::vector< T > > &a, const std::vector< std::vector< T > > &b)
 Compare vectors using vcmp predicate.

Function Documentation

◆ cmp() [1/2]

template<>
bool Analysis::TauCmp::cmp ( const double & a,
const double & b )

Definition at line 34 of file TauCmp.cxx.

34 {
35 return (std::fabs(a-b)<std::numeric_limits<float>::epsilon());
36 }
static Double_t a

◆ cmp() [2/2]

template<typename T>
bool Analysis::TauCmp::cmp ( const T & a,
const T & b )

Comparison predicate.

Note: put specialisations for all types using cmp in TauCmp.cxx

Parameters
aleft hand side argument
bright hand side argument
Returns
true if equal

◆ cmp< ElementLink< CaloCellContainer > >()

Definition at line 38 of file TauCmp.cxx.

40 {
41 return (a==b);
42 }

◆ cmp< std::pair< TauJetParameters::TauID, double > >()

template<>
bool Analysis::TauCmp::cmp< std::pair< TauJetParameters::TauID, double > > ( const std::pair< TauJetParameters::TauID, double > & a,
const std::pair< TauJetParameters::TauID, double > & b )

Definition at line 44 of file TauCmp.cxx.

47 {
48 return ((a.first==b.first)&&(a.second==b.second));
49 }

◆ vcmp()

template<typename T>
bool Analysis::TauCmp::vcmp ( const std::vector< T > & a,
const std::vector< T > & b )

Compare vectors using cmp predicate.

Parameters
aleft hand side argument
bright hand side argument
Returns
true if equal

Definition at line 36 of file TauCmp.h.

38 {
39 return equal(a.begin(),a.end(),b.begin(),cmp<T>);
40 }
bool cmp(const double &a, const double &b)
Definition TauCmp.cxx:34

◆ vvcmp()

template<typename T>
bool Analysis::TauCmp::vvcmp ( const std::vector< std::vector< T > > & a,
const std::vector< std::vector< T > > & b )

Compare vectors using vcmp predicate.

Parameters
aleft hand side argument
bright hand side argument
Returns
true if equal

Definition at line 46 of file TauCmp.h.

49 {
50 return equal(a.begin(),a.end(),b.begin(),vcmp<T>);
51 }
bool vcmp(const std::vector< T > &a, const std::vector< T > &b)
Compare vectors using cmp predicate.
Definition TauCmp.h:36