CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
CaloNavigator< T, TOPO > Class Template Referencefinal

#include <CaloNavigator.h>

Public Member Functions

 CaloNavigator (const T &home, const TOPO *topology)
 
T down () const
 move the navigator west More...
 
T east () const
 move the navigator east More...
 
const TOPO * getTopology () const
 set the starting position More...
 
void home () const
 move the navigator back to the starting point More...
 
T north () const
 move the navigator north More...
 
T offsetBy (int deltaX, int deltaY) const
 Free movement of arbitray steps. More...
 
T operator* () const
 get the current position More...
 
T pos () const
 get the current position More...
 
void setHome (const T &startingPoint)
 set the starting position More...
 
void setTopology (const TOPO *)
 set the starting position More...
 
T south () const
 move the navigator south More...
 
T up () const
 move the navigator west More...
 
T west () const
 move the navigator west More...
 

Protected Attributes

T currentPoint_
 
const TOPO * myTopology_
 
T startingPoint_
 

Detailed Description

template<class T, class TOPO = CaloSubdetectorTopology>
class CaloNavigator< T, TOPO >

Definition at line 8 of file CaloNavigator.h.

Constructor & Destructor Documentation

template<class T, class TOPO = CaloSubdetectorTopology>
CaloNavigator< T, TOPO >::CaloNavigator ( const T home,
const TOPO *  topology 
)
inline

Definition at line 11 of file CaloNavigator.h.

12  {
13  setHome(home);
14  }
CaloTopology const * topology(0)
void setHome(const T &startingPoint)
set the starting position
void home() const
move the navigator back to the starting point
const TOPO * myTopology_

Member Function Documentation

template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::down ( ) const
inline

move the navigator west

Definition at line 73 of file CaloNavigator.h.

74  {
76  return currentPoint_;
77  } ;
const TOPO * myTopology_
template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::east ( ) const
inline
template<class T, class TOPO = CaloSubdetectorTopology>
const TOPO* CaloNavigator< T, TOPO >::getTopology ( ) const
inline

set the starting position

Definition at line 23 of file CaloNavigator.h.

24  {
25  return myTopology_;
26  }
const TOPO * myTopology_
template<class T , class TOPO >
void CaloNavigator< T, TOPO >::home ( ) const
inline
template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::north ( ) const
inline
template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::offsetBy ( int  deltaX,
int  deltaY 
) const
inline

Free movement of arbitray steps.

Definition at line 80 of file CaloNavigator.h.

Referenced by spr::chargeIsolation(), EcalClusterToolsT< noZS >::covariances(), ClusterShapeAlgo::Create_Map(), HybridClusterAlgo::e2Et(), HybridClusterAlgo::et25(), PFClusterShapeAlgo::fill5x5Map(), EcalClusterToolsT< noZS >::localCovariances(), EcalClusterToolsT< noZS >::matrixDetId(), EcalClusterToolsT< noZS >::matrixEnergy(), EcalClusterToolsT< noZS >::matrixSize(), CosmicClusterAlgo::prepareCluster(), Multi5x5ClusterAlgo::prepareCluster(), EEBadScFilter::scan5x5(), EcalMipGraphs::selectHits(), and EcalDisplaysByEvent::selectHits().

81  {
82  for(int x=0; x < abs(deltaX) && currentPoint_ != T(0); x++)
83  {
84  if(deltaX > 0) east();
85  else west();
86  }
87 
88  for(int y=0; y < abs(deltaY) && currentPoint_ != T(0); y++)
89  {
90  if(deltaY > 0) north();
91  else south();
92  }
93 
94  return currentPoint_;
95 
96  }
T west() const
move the navigator west
Definition: CaloNavigator.h:59
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T south() const
move the navigator south
Definition: CaloNavigator.h:45
T east() const
move the navigator east
Definition: CaloNavigator.h:52
T north() const
move the navigator north
Definition: CaloNavigator.h:38
long double T
template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::operator* ( void  ) const
inline

get the current position

Definition at line 35 of file CaloNavigator.h.

35 { return currentPoint_; }
template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::pos ( ) const
inline
template<class T, class TOPO >
void CaloNavigator< T, TOPO >::setHome ( const T startingPoint)
inline
template<class T , class TOPO>
void CaloNavigator< T, TOPO >::setTopology ( const TOPO *  topology)
inline

set the starting position

Definition at line 121 of file CaloNavigator.h.

References ecaldqm::topology().

122 {
123  if (myTopology_ == 0)
125  else
126  return;
127 }
CaloTopology const * topology(0)
const TOPO * myTopology_
template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::south ( ) const
inline
template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::up ( ) const
inline

move the navigator west

Definition at line 66 of file CaloNavigator.h.

67  {
69  return currentPoint_;
70  } ;
const TOPO * myTopology_
template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::west ( ) const
inline

Member Data Documentation

template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::currentPoint_
mutableprotected
template<class T, class TOPO = CaloSubdetectorTopology>
const TOPO* CaloNavigator< T, TOPO >::myTopology_
protected
template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::startingPoint_
mutableprotected

Definition at line 101 of file CaloNavigator.h.