CMS 3D CMS Logo

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 7 of file CaloNavigator.h.

Constructor & Destructor Documentation

◆ CaloNavigator()

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

Member Function Documentation

◆ down()

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

move the navigator west

Definition at line 60 of file CaloNavigator.h.

60  {
62  return currentPoint_;
63  };

References CaloNavigator< T, TOPO >::currentPoint_, and CaloNavigator< T, TOPO >::myTopology_.

◆ east()

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

◆ getTopology()

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

set the starting position

Definition at line 18 of file CaloNavigator.h.

18 { return myTopology_; }

References CaloNavigator< T, TOPO >::myTopology_.

◆ home()

template<class T , class TOPO >
void CaloNavigator< T, TOPO >::home ( ) const
inline

◆ north()

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

◆ offsetBy()

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 66 of file CaloNavigator.h.

66  {
67  for (int x = 0; x < abs(deltaX) && currentPoint_ != T(0); x++) {
68  if (deltaX > 0)
69  east();
70  else
71  west();
72  }
73 
74  for (int y = 0; y < abs(deltaY) && currentPoint_ != T(0); y++) {
75  if (deltaY > 0)
76  north();
77  else
78  south();
79  }
80 
81  return currentPoint_;
82  }

References funct::abs(), CaloNavigator< T, TOPO >::currentPoint_, CaloNavigator< T, TOPO >::east(), CaloNavigator< T, TOPO >::north(), CaloNavigator< T, TOPO >::south(), CaloNavigator< T, TOPO >::west(), x, and y.

Referenced by ClusterShapeAlgo::Create_Map(), EEBadScFilter::scan5x5(), EcalMipGraphs::selectHits(), and EcalDisplaysByEvent::selectHits().

◆ operator*()

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

get the current position

Definition at line 27 of file CaloNavigator.h.

27 { return currentPoint_; }

References CaloNavigator< T, TOPO >::currentPoint_.

◆ pos()

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

get the current position

Definition at line 24 of file CaloNavigator.h.

24 { return currentPoint_; }

References CaloNavigator< T, TOPO >::currentPoint_.

Referenced by EcalBoundaryInfoCalculator< EBDetId >::goBackOneCell().

◆ setHome()

template<class T , class TOPO >
void CaloNavigator< T, TOPO >::setHome ( const T startingPoint)
inline

◆ setTopology()

template<class T , class TOPO >
void CaloNavigator< T, TOPO >::setTopology ( const TOPO *  topology)
inline

set the starting position

Definition at line 101 of file CaloNavigator.h.

101  {
102  if (myTopology_ == 0)
104  else
105  return;
106 }

References ecaldqm::topology().

◆ south()

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

◆ up()

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

move the navigator west

Definition at line 54 of file CaloNavigator.h.

54  {
56  return currentPoint_;
57  };

References CaloNavigator< T, TOPO >::currentPoint_, and CaloNavigator< T, TOPO >::myTopology_.

◆ west()

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

Member Data Documentation

◆ currentPoint_

template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::currentPoint_
mutableprotected

◆ myTopology_

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

◆ startingPoint_

template<class T, class TOPO = CaloSubdetectorTopology>
T CaloNavigator< T, TOPO >::startingPoint_
mutableprotected

Definition at line 86 of file CaloNavigator.h.

DDAxes::y
CaloNavigator::north
T north() const
move the navigator north
Definition: CaloNavigator.h:30
CaloNavigator::east
T east() const
move the navigator east
Definition: CaloNavigator.h:42
DDAxes::x
CaloNavigator::myTopology_
const TOPO * myTopology_
Definition: CaloNavigator.h:85
ecaldqm::topology
const CaloTopology * topology(nullptr)
CaloNavigator::setHome
void setHome(const T &startingPoint)
set the starting position
Definition: CaloNavigator.h:90
CaloNavigator::currentPoint_
T currentPoint_
Definition: CaloNavigator.h:86
CaloNavigator::home
void home() const
move the navigator back to the starting point
Definition: CaloNavigator.h:96
CaloNavigator::west
T west() const
move the navigator west
Definition: CaloNavigator.h:48
CaloNavigator::south
T south() const
move the navigator south
Definition: CaloNavigator.h:36
CaloNavigator::startingPoint_
T startingPoint_
Definition: CaloNavigator.h:86
T
long double T
Definition: Basic3DVectorLD.h:48
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22