Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
JDETECTOR::JTripod Class Reference

Data structure for tripod. More...

#include <JTripod.hh>

Inheritance diagram for JDETECTOR::JTripod:
JLANG::JObjectID JUTM::JUTMPosition JLANG::JComparable< JObjectID > JLANG::JComparable< JObjectID, int > JMATH::JMath< JUTMPosition >

Public Member Functions

 JTripod ()
 Default constructor. More...
 
 JTripod (const int id, const JUTMPosition &position)
 Constructor. More...
 
int getID () const
 Get identifier. More...
 
void setID (const int id)
 Set identifier. More...
 
bool less (const JObjectID &object) const
 Less than method. More...
 
bool less (const int id) const
 Less than method. More...
 
bool more (const int id) const
 More than method. More...
 
const JUTMPositiongetUTMPosition () const
 Get UTM position. More...
 
JPosition3D getPosition () const
 Get position. More...
 
 operator JPosition3D () const
 Type conversion operator. More...
 
double getUTMEast () const
 Get UTM east. More...
 
double getUTMNorth () const
 Get UTM north. More...
 
double getUTMZ () const
 Get UTM Z. More...
 
JUTMPositionnegate ()
 Negate UTM position. More...
 
JUTMPositionadd (const JUTMPosition &pos)
 Add UTM position. More...
 
JUTMPositionsub (const JUTMPosition &pos)
 Subtract UTM position. More...
 
JUTMPositionmul (const double factor)
 Scale UTM position. More...
 
JUTMPositionmul (const JNullType &object)
 Multiply with object. More...
 
JUTMPositiondiv (const double factor)
 Scale UTM position. More...
 

Protected Attributes

int __id
 
double east
 
double north
 
double z
 

Friends

std::istream & operator>> (std::istream &in, JTripod &tripod)
 Read tripod from input. More...
 
std::ostream & operator<< (std::ostream &out, const JTripod &tripod)
 Write tripod to output. More...
 
JReaderoperator>> (JReader &in, JTripod &tripod)
 Read tripod from input. More...
 
JWriteroperator<< (JWriter &out, const JTripod &tripod)
 Write tripod to output. More...
 

Detailed Description

Data structure for tripod.

Definition at line 32 of file JTripod.hh.

Constructor & Destructor Documentation

JDETECTOR::JTripod::JTripod ( )
inline

Default constructor.

Definition at line 40 of file JTripod.hh.

41  {}
JDETECTOR::JTripod::JTripod ( const int  id,
const JUTMPosition position 
)
inline

Constructor.

Parameters
ididentifier
positionUTM positiom

Definition at line 50 of file JTripod.hh.

51  :
52  JObjectID(id),
53  JUTMPosition(position)
54  {}
JUTMPosition()
Default constructor.
Definition: JUTMPosition.hh:41
JObjectID()
Default constructor.
Definition: JObjectID.hh:35

Member Function Documentation

int JLANG::JObjectID::getID ( ) const
inlineinherited

Get identifier.

Returns
identifier

Definition at line 55 of file JObjectID.hh.

56  {
57  return __id;
58  }
void JLANG::JObjectID::setID ( const int  id)
inlineinherited

Set identifier.

Parameters
ididentifier

Definition at line 66 of file JObjectID.hh.

67  {
68  this->__id = id;
69  }
bool JLANG::JObjectID::less ( const JObjectID object) const
inlineinherited

Less than method.

Parameters
objectobject identifier
Returns
true if this identifier less than given identifier; else false

Definition at line 78 of file JObjectID.hh.

79  {
80  return this->getID() < object.getID();
81  }
int getID() const
Get identifier.
Definition: JObjectID.hh:55
bool JLANG::JObjectID::less ( const int  id) const
inlineinherited

Less than method.

Parameters
ididentifier
Returns
true if this identifier less than given identifier; else false

Definition at line 90 of file JObjectID.hh.

91  {
92  return this->getID() < id;
93  }
int getID() const
Get identifier.
Definition: JObjectID.hh:55
bool JLANG::JObjectID::more ( const int  id) const
inlineinherited

More than method.

Parameters
ididentifier
Returns
true if this identifier greater than given identifier; else false

Definition at line 102 of file JObjectID.hh.

103  {
104  return this->getID() > id;
105  }
int getID() const
Get identifier.
Definition: JObjectID.hh:55
const JUTMPosition& JUTM::JUTMPosition::getUTMPosition ( ) const
inlineinherited

Get UTM position.

Returns
position

Definition at line 82 of file JUTMPosition.hh.

83  {
84  return static_cast<const JUTMPosition&>(*this);
85  }
Data structure for UTM position.
Definition: JUTMPosition.hh:34
JPosition3D JUTM::JUTMPosition::getPosition ( ) const
inlineinherited

Get position.

Returns
position

Definition at line 93 of file JUTMPosition.hh.

94  {
95  return JPosition3D(east, north, z);
96  }
JUTM::JUTMPosition::operator JPosition3D ( ) const
inlineinherited

Type conversion operator.

Returns
position

Definition at line 104 of file JUTMPosition.hh.

105  {
106  return getPosition();
107  }
JPosition3D getPosition() const
Get position.
Definition: JUTMPosition.hh:93
double JUTM::JUTMPosition::getUTMEast ( ) const
inlineinherited

Get UTM east.

Returns
UTM East

Definition at line 115 of file JUTMPosition.hh.

116  {
117  return this->east;
118  }
double JUTM::JUTMPosition::getUTMNorth ( ) const
inlineinherited

Get UTM north.

Returns
UTM North

Definition at line 126 of file JUTMPosition.hh.

127  {
128  return this->north;
129  }
double JUTM::JUTMPosition::getUTMZ ( ) const
inlineinherited

Get UTM Z.

Returns
UTM Z

Definition at line 137 of file JUTMPosition.hh.

138  {
139  return this->z;
140  }
JUTMPosition& JUTM::JUTMPosition::negate ( )
inlineinherited

Negate UTM position.

Returns
this UTM position

Definition at line 148 of file JUTMPosition.hh.

149  {
150  east = -east;
151  north = -north;
152  z = -z;
153 
154  return *this;
155  }
JUTMPosition& JUTM::JUTMPosition::add ( const JUTMPosition pos)
inlineinherited

Add UTM position.

Parameters
posUTM position
Returns
this UTM position

Definition at line 164 of file JUTMPosition.hh.

165  {
166  east += pos.getUTMEast();
167  north += pos.getUTMNorth();
168  z += pos.getUTMZ();
169 
170  return *this;
171  }
double getUTMEast() const
Get UTM east.
double getUTMZ() const
Get UTM Z.
double getUTMNorth() const
Get UTM north.
JUTMPosition& JUTM::JUTMPosition::sub ( const JUTMPosition pos)
inlineinherited

Subtract UTM position.

Parameters
posUTM position
Returns
this UTM position

Definition at line 180 of file JUTMPosition.hh.

181  {
182  east -= pos.getUTMEast();
183  north -= pos.getUTMNorth();
184  z -= pos.getUTMZ();
185 
186  return *this;
187  }
double getUTMEast() const
Get UTM east.
double getUTMZ() const
Get UTM Z.
double getUTMNorth() const
Get UTM north.
JUTMPosition& JUTM::JUTMPosition::mul ( const double  factor)
inlineinherited

Scale UTM position.

Parameters
factormultiplication factor
Returns
this UTM position

Definition at line 196 of file JUTMPosition.hh.

197  {
198  east *= factor;
199  north *= factor;
200  z *= factor;
201 
202  return *this;
203  }
JUTMPosition & JMATH::JMath< JUTMPosition , JNullType >::mul ( const JNullType object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 273 of file JMath.hh.

274  {
275  return static_cast<JFirst_t&>(*this) = JCalculator<JFirst_t>::calculator.mul(static_cast<const JFirst_t&>(*this), object);
276  }
Auxiliary class for arithmetic operations on objects.
Definition: JCalculator.hh:18
JUTMPosition& JUTM::JUTMPosition::div ( const double  factor)
inlineinherited

Scale UTM position.

Parameters
factordivision factor
Returns
this UTM position

Definition at line 212 of file JUTMPosition.hh.

213  {
214  east /= factor;
215  north /= factor;
216  z /= factor;
217 
218  return *this;
219  }

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  in,
JTripod tripod 
)
friend

Read tripod from input.

Parameters
ininput stream
tripodtripod
Returns
input stream

Definition at line 64 of file JTripod.hh.

65  {
66  in >> static_cast<JObjectID&> (tripod);
67  in >> static_cast<JUTMPosition&>(tripod);
68 
69  return in;
70  }
JUTMPosition()
Default constructor.
Definition: JUTMPosition.hh:41
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
JObjectID()
Default constructor.
Definition: JObjectID.hh:35
std::ostream& operator<< ( std::ostream &  out,
const JTripod tripod 
)
friend

Write tripod to output.

Parameters
outoutput stream
tripodtripod
Returns
output stream

Definition at line 80 of file JTripod.hh.

81  {
82  out << static_cast<const JObjectID&> (tripod);
83  out << ' ';
84  out << static_cast<const JUTMPosition&>(tripod);
85 
86  return out;
87  }
JReader& operator>> ( JReader in,
JTripod tripod 
)
friend

Read tripod from input.

Parameters
inreader
tripodtripod
Returns
reader

Definition at line 97 of file JTripod.hh.

98  {
99  in >> static_cast<JObjectID&> (tripod);
100  in >> static_cast<JUTMPosition&>(tripod);
101 
102  return in;
103  }
JUTMPosition()
Default constructor.
Definition: JUTMPosition.hh:41
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
JObjectID()
Default constructor.
Definition: JObjectID.hh:35
JWriter& operator<< ( JWriter out,
const JTripod tripod 
)
friend

Write tripod to output.

Parameters
outwriter
tripodtripod
Returns
writer

Definition at line 113 of file JTripod.hh.

114  {
115  out << static_cast<const JObjectID&> (tripod);
116  out << static_cast<const JUTMPosition&>(tripod);
117 
118  return out;
119  }

Member Data Documentation

int JLANG::JObjectID::__id
protectedinherited

Definition at line 160 of file JObjectID.hh.

double JUTM::JUTMPosition::east
protectedinherited

Definition at line 276 of file JUTMPosition.hh.

double JUTM::JUTMPosition::north
protectedinherited

Definition at line 277 of file JUTMPosition.hh.

double JUTM::JUTMPosition::z
protectedinherited

Definition at line 278 of file JUTMPosition.hh.


The documentation for this class was generated from the following file: