CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
egammaisolation::EgammaRange< T > Class Template Reference

#include <EgammaRange.h>

Inheritance diagram for egammaisolation::EgammaRange< T >:

Public Member Functions

 EgammaRange ()
 
 EgammaRange (const T &aMin, const T &aMax)
 
 EgammaRange (const std::pair< T, T > &aPair)
 
bool empty () const
 
bool inside (const T &value) const
 
const Tmax () const
 
T mean () const
 
const Tmin () const
 
void sort ()
 

Detailed Description

template<class T>
class egammaisolation::EgammaRange< T >

Define a range [aMin,aMax]

Definition at line 14 of file EgammaRange.h.

Constructor & Destructor Documentation

template<class T>
egammaisolation::EgammaRange< T >::EgammaRange ( )
inline

Definition at line 17 of file EgammaRange.h.

17 { }
template<class T>
egammaisolation::EgammaRange< T >::EgammaRange ( const T aMin,
const T aMax 
)
inline

Definition at line 19 of file EgammaRange.h.

19 : std::pair<T,T> (aMin,aMax) { }
template<class T>
egammaisolation::EgammaRange< T >::EgammaRange ( const std::pair< T, T > &  aPair)
inline

Definition at line 21 of file EgammaRange.h.

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

Member Function Documentation

template<class T>
bool egammaisolation::EgammaRange< T >::empty ( void  ) const
inline

Definition at line 29 of file EgammaRange.h.

Referenced by egammaisolation::EgammaRange< float >::sort().

29 { return (this->second < this->first); }
bool first
Definition: L1TdeRCT.cc:75
template<class T>
bool egammaisolation::EgammaRange< T >::inside ( const T value) const
inline

Definition at line 31 of file EgammaRange.h.

31  {
32  if (value < this->first || this->second < value) return false; else return true;
33  }
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:75
template<class T>
const T& egammaisolation::EgammaRange< T >::max ( ) const
inline

Definition at line 25 of file EgammaRange.h.

25 { return this->second; }
U second(std::pair< T, U > const &p)
template<class T>
T egammaisolation::EgammaRange< T >::mean ( ) const
inline

Definition at line 27 of file EgammaRange.h.

27 { return (this->first+this->second)/2.; }
U second(std::pair< T, U > const &p)
bool first
Definition: L1TdeRCT.cc:75
template<class T>
const T& egammaisolation::EgammaRange< T >::min ( ) const
inline

Definition at line 23 of file EgammaRange.h.

23 { return this->first; }
bool first
Definition: L1TdeRCT.cc:75
template<class T>
void egammaisolation::EgammaRange< T >::sort ( )
inline

Definition at line 35 of file EgammaRange.h.

35 { if (empty() ) std::swap(this->first,this->second); }
U second(std::pair< T, U > const &p)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
bool first
Definition: L1TdeRCT.cc:75