CMS 3D CMS Logo

muonisolation::Range< T > Class Template Reference

Define a range [aMin,aMax]. More...

#include <RecoMuon/MuonIsolation/interface/Range.h>

List of all members.

Public Member Functions

bool empty () const
bool inside (const T &value) const
const T & max () const
mean () const
const T & min () const
 Range (const std::pair< T, T > &aPair)
 Range (const T &aMin, const T &aMax)
 Range ()
void sort ()


Detailed Description

template<class T>
class muonisolation::Range< T >

Define a range [aMin,aMax].

Definition at line 14 of file Range.h.


Constructor & Destructor Documentation

template<class T>
muonisolation::Range< T >::Range ( void   )  [inline]

Definition at line 17 of file Range.h.

00017 { }

template<class T>
muonisolation::Range< T >::Range ( const T &  aMin,
const T &  aMax 
) [inline]

Definition at line 19 of file Range.h.

00019 : std::pair<T,T> (aMin,aMax) { }

template<class T>
muonisolation::Range< T >::Range ( const std::pair< T, T > &  aPair  )  [inline]

Definition at line 21 of file Range.h.

00021 : std::pair<T,T> (aPair) { }  


Member Function Documentation

template<class T>
bool muonisolation::Range< T >::empty ( void   )  const [inline]

Definition at line 29 of file Range.h.

Referenced by muonisolation::Range< double >::sort().

00029 { return (this->second < this->first); }

template<class T>
bool muonisolation::Range< T >::inside ( const T &  value  )  const [inline]

Definition at line 31 of file Range.h.

00031                                      {
00032     if (value < this->first || this->second < value)  return false; else  return true;
00033   }

template<class T>
const T& muonisolation::Range< T >::max (  )  const [inline]

Definition at line 25 of file Range.h.

00025 { return this->second; }

template<class T>
T muonisolation::Range< T >::mean (  )  const [inline]

Definition at line 27 of file Range.h.

00027 { return (this->first+this->second)/2.; }

template<class T>
const T& muonisolation::Range< T >::min (  )  const [inline]

Definition at line 23 of file Range.h.

00023 { return this->first; }

template<class T>
void muonisolation::Range< T >::sort (  )  [inline]

Definition at line 35 of file Range.h.

00035 { if (empty() ) std::swap(this->first,this->second); }


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:49:14 2009 for CMSSW by  doxygen 1.5.4