CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FKDPoint< TYPE, numberOfDimensions > Class Template Reference

#include <FKDPoint.h>

Public Member Functions

 FKDPoint ()
 
 FKDPoint (TYPE x, TYPE y, TYPE z, TYPE w, unsigned int id=0)
 
 FKDPoint (TYPE x, TYPE y, TYPE z, unsigned int id=0)
 
 FKDPoint (TYPE x, TYPE y, unsigned int id=0)
 
unsigned int getId () const
 
TYPE & operator[] (unsigned int const i)
 
TYPE const & operator[] (unsigned int const i) const
 
void setDimension (unsigned int i, const TYPE &value)
 
void setId (const unsigned int id)
 

Private Attributes

std::array< TYPE, numberOfDimensions > theElements
 
unsigned int theId
 

Detailed Description

template<class TYPE, int numberOfDimensions>
class FKDPoint< TYPE, numberOfDimensions >

Definition at line 8 of file FKDPoint.h.

Constructor & Destructor Documentation

◆ FKDPoint() [1/4]

template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( )
inline

Definition at line 10 of file FKDPoint.h.

10 : theElements(), theId(0) {}

◆ FKDPoint() [2/4]

template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( TYPE  x,
TYPE  y,
unsigned int  id = 0 
)
inline

Definition at line 12 of file FKDPoint.h.

12  {
13  static_assert(numberOfDimensions == 2, "FKDPoint number of arguments does not match the number of dimensions");
14 
15  theId = id;
16  theElements[0] = x;
17  theElements[1] = y;
18  }

References triggerObjects_cff::id, FKDPoint< TYPE, numberOfDimensions >::theElements, FKDPoint< TYPE, numberOfDimensions >::theId, x, and y.

◆ FKDPoint() [3/4]

template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( TYPE  x,
TYPE  y,
TYPE  z,
unsigned int  id = 0 
)
inline

Definition at line 20 of file FKDPoint.h.

20  {
21  static_assert(numberOfDimensions == 3, "FKDPoint number of arguments does not match the number of dimensions");
22 
23  theId = id;
24  theElements[0] = x;
25  theElements[1] = y;
26  theElements[2] = z;
27  }

References triggerObjects_cff::id, FKDPoint< TYPE, numberOfDimensions >::theElements, FKDPoint< TYPE, numberOfDimensions >::theId, x, y, and z.

◆ FKDPoint() [4/4]

template<class TYPE, int numberOfDimensions>
FKDPoint< TYPE, numberOfDimensions >::FKDPoint ( TYPE  x,
TYPE  y,
TYPE  z,
TYPE  w,
unsigned int  id = 0 
)
inline

Definition at line 29 of file FKDPoint.h.

29  {
30  static_assert(numberOfDimensions == 4, "FKDPoint number of arguments does not match the number of dimensions");
31  theId = id;
32  theElements[0] = x;
33  theElements[1] = y;
34  theElements[2] = z;
35  theElements[3] = w;
36  }

References triggerObjects_cff::id, FKDPoint< TYPE, numberOfDimensions >::theElements, FKDPoint< TYPE, numberOfDimensions >::theId, w, x, y, and z.

Member Function Documentation

◆ getId()

template<class TYPE, int numberOfDimensions>
unsigned int FKDPoint< TYPE, numberOfDimensions >::getId ( ) const
inline

Definition at line 47 of file FKDPoint.h.

47 { return theId; }

References FKDPoint< TYPE, numberOfDimensions >::theId.

◆ operator[]() [1/2]

template<class TYPE, int numberOfDimensions>
TYPE& FKDPoint< TYPE, numberOfDimensions >::operator[] ( unsigned int const  i)
inline

Definition at line 39 of file FKDPoint.h.

39 { return theElements[i]; }

References mps_fire::i, and FKDPoint< TYPE, numberOfDimensions >::theElements.

◆ operator[]() [2/2]

template<class TYPE, int numberOfDimensions>
TYPE const& FKDPoint< TYPE, numberOfDimensions >::operator[] ( unsigned int const  i) const
inline

Definition at line 41 of file FKDPoint.h.

41 { return theElements[i]; }

References mps_fire::i, and FKDPoint< TYPE, numberOfDimensions >::theElements.

◆ setDimension()

template<class TYPE, int numberOfDimensions>
void FKDPoint< TYPE, numberOfDimensions >::setDimension ( unsigned int  i,
const TYPE &  value 
)
inline

◆ setId()

template<class TYPE, int numberOfDimensions>
void FKDPoint< TYPE, numberOfDimensions >::setId ( const unsigned int  id)
inline

Definition at line 45 of file FKDPoint.h.

45 { theId = id; }

References triggerObjects_cff::id, and FKDPoint< TYPE, numberOfDimensions >::theId.

Member Data Documentation

◆ theElements

template<class TYPE, int numberOfDimensions>
std::array<TYPE, numberOfDimensions> FKDPoint< TYPE, numberOfDimensions >::theElements
private

◆ theId

template<class TYPE, int numberOfDimensions>
unsigned int FKDPoint< TYPE, numberOfDimensions >::theId
private
DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:428
DDAxes::x
w
const double w
Definition: UKUtility.cc:23
DDAxes::z
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
relativeConstraints.value
value
Definition: relativeConstraints.py:53
FKDPoint::theElements
std::array< TYPE, numberOfDimensions > theElements
Definition: FKDPoint.h:50
FKDPoint::theId
unsigned int theId
Definition: FKDPoint.h:51