ATLAS Offline Software
Functions
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. More...
 
template<typename T >
bool vcmp (const std::vector< T > &a, const std::vector< T > &b)
 Compare vectors using cmp predicate. More...
 
template<typename T >
bool vvcmp (const std::vector< std::vector< T > > &a, const std::vector< std::vector< T > > &b)
 Compare vectors using vcmp predicate. More...
 

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  }

◆ 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  }

◆ 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  }
CxxUtils::fpcompare::equal
bool equal(double a, double b)
Compare two FP numbers, working around x87 precision issues.
Definition: fpcompare.h:114
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10