Jpp
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
JDETECTOR::JDetectorHeader Class Reference

Data structure for detector header. More...

#include <JDetectorHeader.hh>

Inheritance diagram for JDETECTOR::JDetectorHeader:
JUTC::JUTCTimeRange JUTM::JUTMGrid JUTM::JUTMPosition JTOOLS::JRange< T, JComparator_t > JMATH::JMath< JUTMPosition > JTOOLS::JPair< T, T > JLANG::JEquals< JFirst_t, JSecond_t > JMATH::JMath< JFirst_t, JSecond_t > JDETECTOR::JDetector JDETECTOR::JMonteCarloDetector

Classes

class  JDetectorHeaderHelper
 Auxiliary class for I/O of detector header. More...
 

Public Types

typedef JRange< T, JComparator_t > range_type
 
typedef JLANG::JClass< T >::argument_type argument_type
 
typedef T key_type
 
typedef T mapped_type
 

Public Member Functions

 JDetectorHeader ()
 Default constructor. More...
 
 JDetectorHeader (const JUTCTimeRange &range, const JUTMGrid &grid, const JUTMPosition &pos)
 Constructor. More...
 
JProperties getProperties (const JEquationParameters &equation=JDetectorHeader::getEquationParameters())
 Get properties of this class. More...
 
JProperties getProperties (const JEquationParameters &equation=JDetectorHeader::getEquationParameters()) const
 Get properties of this class. More...
 
const range_typegetRange () const
 Get range. More...
 
void setRange (const range_type &range)
 Set range. More...
 
void setRange (argument_type x, argument_type y)
 Set lower and upper limit. More...
 
template<class R >
void setRange (R first, R second)
 Set range. More...
 
template<class iterator_type , class value_type , class result_type >
void setRange (iterator_type __begin, iterator_type __end, result_type value_type::*member)
 Set lower and upper limit according to minimal and maximal value in input data, respectively. More...
 
template<class iterator_type , class value_type , class result_type >
void setRange (iterator_type __begin, iterator_type __end, result_type(value_type::*function)() const)
 Set lower and upper limit according to minimal and maximal value in input data, respectively. More...
 
getLowerLimit () const
 Get lower limit. More...
 
getUpperLimit () const
 Get upper limit. More...
 
void setLowerLimit (argument_type x)
 Set lower limit. More...
 
void setUpperLimit (argument_type y)
 Set upper limit. More...
 
void fixLowerLimit (argument_type x)
 Fix lower limit. More...
 
void fixUpperLimit (argument_type y)
 Fix upper limit. More...
 
bool equals (const range_type &range) const
 Equal method. More...
 
getLength () const
 Get length (difference between upper and lower limit). More...
 
bool is_valid () const
 Check validity of range. More...
 
bool operator() (argument_type x) const
 Test whether value is inside range. More...
 
constrain (argument_type x) const
 Constrain value to range. More...
 
mod (argument_type x) const
 Modulo value with respect to range. More...
 
bool overlap (const range_type &range) const
 Test overlap with given range. More...
 
range_type include (argument_type x)
 Include given value to range. More...
 
range_typejoin (const range_type &range)
 Join ranges. More...
 
range_typecombine (const range_type &range)
 Combine ranges. More...
 
range_typeadd (argument_type x)
 Add offset. More...
 
range_typeadd (const range_type &range)
 Add offsets. More...
 
range_typesub (argument_type x)
 Subtract offset. More...
 
range_typesub (const range_type &range)
 Subtract offsets. More...
 
range_typemul (const double factor)
 Multiply range. More...
 
JFirst_t & mul (const JSecond_t &object)
 Multiply with object. More...
 
range_typediv (const double factor)
 Divide range. More...
 
getN (const double R) const
 Get expected number of occurances of given rate within this interval. More...
 
const key_typegetKey () const
 
const mapped_typegetValue () const
 
mapped_typegetValue ()
 
const std::string & getKey () const
 Get key. More...
 
const std::string & getWGS () const
 Get WGS. More...
 
const std::string & getUTMZone () const
 Get UTM zone. More...
 
std::string toString () const
 Convert UTM grid. More...
 
const JUTMPositiongetUTMPosition () const
 Get UTM position. More...
 
JPosition3D getPosition () const
 Get position. 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 JSecond_t &object)
 Multiply with object. More...
 
JUTMPositiondiv (const double factor)
 Scale UTM position. More...
 

Static Public Member Functions

static JEquationParametersgetEquationParameters ()
 Get equation parameters. More...
 
static void setEquationParameters (const JEquationParameters &equation)
 Set equation parameters. More...
 
static T getMinimum ()
 Get minimum possible value. More...
 
static T getMaximum ()
 Get maximum possible value. More...
 
static JUTMGrid valueOf (const std::string &buffer)
 Extract UTM grid. More...
 

Public Attributes

JComparator_t compare
 Function object. More...
 
first
 
second
 

Static Public Attributes

static const JRange< T, JComparator_t > DEFAULT_RANGE
 Default range. More...
 

Protected Member Functions

template<class R >
void setRange (R first, R second, const JLANG::JBool< false > &option)
 Set range. More...
 
template<class R >
void setRange (R first, R second, const JLANG::JBool< true > &option)
 Set range. More...
 

Protected Attributes

std::string key
 
std::string wgs
 
std::string zone
 
double east
 
double north
 
double z
 

Friends

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

Detailed Description

Data structure for detector header.

Definition at line 35 of file JDetectorHeader.hh.

Member Typedef Documentation

◆ range_type

template<class T, class JComparator_t = std::less<T>>
typedef JRange<T, JComparator_t> JTOOLS::JRange< T, JComparator_t >::range_type
inherited

Definition at line 41 of file JRange.hh.

◆ argument_type

template<class T, class JComparator_t = std::less<T>>
typedef JLANG::JClass<T>::argument_type JTOOLS::JRange< T, JComparator_t >::argument_type
inherited

Definition at line 42 of file JRange.hh.

◆ key_type

typedef T JTOOLS::JPair< T , T >::key_type
inherited

Definition at line 32 of file JPair.hh.

◆ mapped_type

typedef T JTOOLS::JPair< T , T >::mapped_type
inherited

Definition at line 33 of file JPair.hh.

Constructor & Destructor Documentation

◆ JDetectorHeader() [1/2]

JDETECTOR::JDetectorHeader::JDetectorHeader ( )
inline

Default constructor.

Definition at line 44 of file JDetectorHeader.hh.

44  :
45  JUTCTimeRange(),
46  JUTMGrid (),
47  JUTMPosition ()
48  {}

◆ JDetectorHeader() [2/2]

JDETECTOR::JDetectorHeader::JDetectorHeader ( const JUTCTimeRange range,
const JUTMGrid grid,
const JUTMPosition pos 
)
inline

Constructor.

Parameters
rangeUTC time range
gridUTM grid
posUTM position

Definition at line 58 of file JDetectorHeader.hh.

60  :
61  JUTCTimeRange(range),
62  JUTMGrid (grid),
63  JUTMPosition (pos)
64  {}

Member Function Documentation

◆ getEquationParameters()

static JEquationParameters& JDETECTOR::JDetectorHeader::getEquationParameters ( )
inlinestatic

Get equation parameters.

Returns
equation parameters

Definition at line 144 of file JDetectorHeader.hh.

145  {
146  static JEquationParameters equation;
147 
148  return equation;
149  }

◆ setEquationParameters()

static void JDETECTOR::JDetectorHeader::setEquationParameters ( const JEquationParameters equation)
inlinestatic

Set equation parameters.

Parameters
equationequation parameters

Definition at line 158 of file JDetectorHeader.hh.

159  {
160  getEquationParameters() = equation;
161  }

◆ getProperties() [1/2]

JProperties JDETECTOR::JDetectorHeader::getProperties ( const JEquationParameters equation = JDetectorHeader::getEquationParameters())
inline

Get properties of this class.

Parameters
equationequation parameters

Definition at line 169 of file JDetectorHeader.hh.

170  {
171  return JDetectorHeaderHelper(*this, equation);
172  }

◆ getProperties() [2/2]

JProperties JDETECTOR::JDetectorHeader::getProperties ( const JEquationParameters equation = JDetectorHeader::getEquationParameters()) const
inline

Get properties of this class.

Parameters
equationequation parameters

Definition at line 180 of file JDetectorHeader.hh.

181  {
182  return JDetectorHeaderHelper(*this, equation);
183  }

◆ getRange()

template<class T, class JComparator_t = std::less<T>>
const range_type& JTOOLS::JRange< T, JComparator_t >::getRange ( ) const
inlineinherited

Get range.

Returns
range

Definition at line 128 of file JRange.hh.

129  {
130  return static_cast<const range_type&>(*this);
131  }

◆ setRange() [1/7]

template<class T, class JComparator_t = std::less<T>>
void JTOOLS::JRange< T, JComparator_t >::setRange ( const range_type range)
inlineinherited

Set range.

Parameters
rangerange

Definition at line 139 of file JRange.hh.

140  {
141  static_cast<range_type&>(*this) = range;
142  }

◆ setRange() [2/7]

template<class T, class JComparator_t = std::less<T>>
void JTOOLS::JRange< T, JComparator_t >::setRange ( argument_type  x,
argument_type  y 
)
inlineinherited

Set lower and upper limit.

Parameters
xlower limit
yupper limit

Definition at line 151 of file JRange.hh.

152  {
153  this->first = x;
154  this->second = y;
155  }

◆ setRange() [3/7]

template<class T, class JComparator_t = std::less<T>>
template<class R >
void JTOOLS::JRange< T, JComparator_t >::setRange ( first,
second 
)
inlineinherited

Set range.


The arguments could be values or iterators.

Parameters
firstfirst
secondsecond

Definition at line 166 of file JRange.hh.

167  {
168  using namespace JLANG;
169 
171  }

◆ setRange() [4/7]

template<class T, class JComparator_t = std::less<T>>
template<class iterator_type , class value_type , class result_type >
void JTOOLS::JRange< T, JComparator_t >::setRange ( iterator_type  __begin,
iterator_type  __end,
result_type value_type::*  member 
)
inlineinherited

Set lower and upper limit according to minimal and maximal value in input data, respectively.

Parameters
__beginbegin of data
__endend of data
memberpointer to data member

Definition at line 182 of file JRange.hh.

183  {
185 
186  for (iterator_type i = __begin; i != __end; ++i) {
187  include((*i).*member);
188  }
189  }

◆ setRange() [5/7]

template<class T, class JComparator_t = std::less<T>>
template<class iterator_type , class value_type , class result_type >
void JTOOLS::JRange< T, JComparator_t >::setRange ( iterator_type  __begin,
iterator_type  __end,
result_type(value_type::*)() const  function 
)
inlineinherited

Set lower and upper limit according to minimal and maximal value in input data, respectively.

Parameters
__beginbegin of data
__endend of data
functionpointer to member method

Definition at line 200 of file JRange.hh.

201  {
203 
204  for (iterator_type i = __begin; i != __end; ++i) {
205  include(((*i).*function)());
206  }
207  }

◆ setRange() [6/7]

template<class T, class JComparator_t = std::less<T>>
template<class R >
void JTOOLS::JRange< T, JComparator_t >::setRange ( first,
second,
const JLANG::JBool< false > &  option 
)
inlineprotectedinherited

Set range.

Parameters
firstfirst
secondsecond
optionfalse

Definition at line 579 of file JRange.hh.

580  {
582  }

◆ setRange() [7/7]

template<class T, class JComparator_t = std::less<T>>
template<class R >
void JTOOLS::JRange< T, JComparator_t >::setRange ( first,
second,
const JLANG::JBool< true > &  option 
)
inlineprotectedinherited

Set range.

Parameters
firstfirst
secondsecond
optiontrue

Definition at line 593 of file JRange.hh.

594  {
596 
597  for (R i = first; i != second; ++i) {
598  include(*i);
599  }
600  }

◆ getLowerLimit()

template<class T, class JComparator_t = std::less<T>>
T JTOOLS::JRange< T, JComparator_t >::getLowerLimit ( ) const
inlineinherited

Get lower limit.

Returns
lower limit

Definition at line 215 of file JRange.hh.

216  {
217  return this->first;
218  }

◆ getUpperLimit()

template<class T, class JComparator_t = std::less<T>>
T JTOOLS::JRange< T, JComparator_t >::getUpperLimit ( ) const
inlineinherited

Get upper limit.

Returns
upper limit

Definition at line 226 of file JRange.hh.

227  {
228  return this->second;
229  }

◆ setLowerLimit()

template<class T, class JComparator_t = std::less<T>>
void JTOOLS::JRange< T, JComparator_t >::setLowerLimit ( argument_type  x)
inlineinherited

Set lower limit.

Parameters
xlower limit

Definition at line 237 of file JRange.hh.

238  {
239  this->first = x;
240  }

◆ setUpperLimit()

template<class T, class JComparator_t = std::less<T>>
void JTOOLS::JRange< T, JComparator_t >::setUpperLimit ( argument_type  y)
inlineinherited

Set upper limit.

Parameters
yupper limit

Definition at line 248 of file JRange.hh.

249  {
250  this->second = y;
251  }

◆ fixLowerLimit()

template<class T, class JComparator_t = std::less<T>>
void JTOOLS::JRange< T, JComparator_t >::fixLowerLimit ( argument_type  x)
inlineinherited

Fix lower limit.

The range is shifted to the given lower limit.

Parameters
xlower limit

Definition at line 261 of file JRange.hh.

262  {
263  this->second += x - this->first;
264  this->first = x;
265  }

◆ fixUpperLimit()

template<class T, class JComparator_t = std::less<T>>
void JTOOLS::JRange< T, JComparator_t >::fixUpperLimit ( argument_type  y)
inlineinherited

Fix upper limit.

The range is shifted to the given upper limit.

Parameters
yupper limit

Definition at line 275 of file JRange.hh.

276  {
277  this->first += y - this->second;
278  this->second = y;
279  }

◆ equals()

template<class T, class JComparator_t = std::less<T>>
bool JTOOLS::JRange< T, JComparator_t >::equals ( const range_type range) const
inlineinherited

Equal method.

Parameters
rangerange
Returns
true if this module range equal to given module range; else false

Definition at line 288 of file JRange.hh.

289  {
290  return (!this->compare(this->getLowerLimit(), range.getLowerLimit()) &&
291  !this->compare(range.getLowerLimit(), this->getLowerLimit()) &&
292  !this->compare(this->getUpperLimit(), range.getUpperLimit()) &&
293  !this->compare(range.getUpperLimit(), this->getUpperLimit()));
294  }

◆ getLength()

template<class T, class JComparator_t = std::less<T>>
T JTOOLS::JRange< T, JComparator_t >::getLength ( ) const
inlineinherited

Get length (difference between upper and lower limit).

Returns
length

Definition at line 302 of file JRange.hh.

303  {
304  return getUpperLimit() - getLowerLimit();
305  }

◆ is_valid()

template<class T, class JComparator_t = std::less<T>>
bool JTOOLS::JRange< T, JComparator_t >::is_valid ( ) const
inlineinherited

Check validity of range.

Returns
true if lower limit less than or equal to upper limit; else false

Definition at line 313 of file JRange.hh.

314  {
315  return !compare(getUpperLimit(), getLowerLimit());
316  }

◆ operator()()

template<class T, class JComparator_t = std::less<T>>
bool JTOOLS::JRange< T, JComparator_t >::operator() ( argument_type  x) const
inlineinherited

Test whether value is inside range.

Parameters
xvalue
Returns
true if lower limit <= value <= upper limit; else false

Definition at line 325 of file JRange.hh.

326  {
327  return (!compare(x, getLowerLimit()) &&
328  !compare(getUpperLimit(), x));
329  }

◆ constrain()

template<class T, class JComparator_t = std::less<T>>
T JTOOLS::JRange< T, JComparator_t >::constrain ( argument_type  x) const
inlineinherited

Constrain value to range.


This method returns the original value if it is in this range, else lower limit if value < lower limit or upper limit if value > upper limit.

Parameters
xvalue
Returns
lower limit <= x <= upper limit

Definition at line 340 of file JRange.hh.

341  {
342  if (compare(x, getLowerLimit())) { return getLowerLimit(); }
343  if (compare(getUpperLimit(), x)) { return getUpperLimit(); }
344 
345  return x;
346  }

◆ mod()

template<class T, class JComparator_t = std::less<T>>
T JTOOLS::JRange< T, JComparator_t >::mod ( argument_type  x) const
inlineinherited

Modulo value with respect to range.


Parameters
xvalue
Returns
lower limit <= x <= upper limit

Definition at line 355 of file JRange.hh.

356  {
357  if (compare(x, getLowerLimit()))
358  return x + getLength() * floor((getUpperLimit() - x) / getLength());
359  else if (compare(getUpperLimit(), x))
360  return x - getLength() * floor((x - getLowerLimit()) / getLength());
361  else
362  return x;
363  }

◆ overlap()

template<class T, class JComparator_t = std::less<T>>
bool JTOOLS::JRange< T, JComparator_t >::overlap ( const range_type range) const
inlineinherited

Test overlap with given range.


The result is equivalent to join(range).is_valid().

Parameters
rangerange
Returns
true if there is a non-zero overlap; else false

Definition at line 373 of file JRange.hh.

374  {
375  return (compare(getLowerLimit(), range.getUpperLimit()) &&
376  compare(range.getLowerLimit(), getUpperLimit()));
377  }

◆ include()

template<class T, class JComparator_t = std::less<T>>
range_type JTOOLS::JRange< T, JComparator_t >::include ( argument_type  x)
inlineinherited

Include given value to range.


The new lower limit is the minimim of the original lower limit and given value and
the new upper limit is the maximum of the original upper limit and given value;

Parameters
xvalue
Returns
range

Definition at line 388 of file JRange.hh.

389  {
390  if (compare(x, getLowerLimit())) { setLowerLimit(x); }
391  if (compare(getUpperLimit(), x)) { setUpperLimit(x); }
392 
393  return *this;
394  }

◆ join()

template<class T, class JComparator_t = std::less<T>>
range_type& JTOOLS::JRange< T, JComparator_t >::join ( const range_type range)
inlineinherited

Join ranges.


The new lower limit is the maximim of the two lower limits and
the new upper limit is the minimum of the two upper limits.
This operation results in an equal or smaller range and may result in an unphysical range (i.e. lower limit > upper limit).

Parameters
rangerange

Definition at line 406 of file JRange.hh.

407  {
408  if (compare(getLowerLimit(), range.getLowerLimit())) { setLowerLimit(range.getLowerLimit()); }
409  if (compare(range.getUpperLimit(), getUpperLimit())) { setUpperLimit(range.getUpperLimit()); }
410 
411  return *this;
412  }

◆ combine()

template<class T, class JComparator_t = std::less<T>>
range_type& JTOOLS::JRange< T, JComparator_t >::combine ( const range_type range)
inlineinherited

Combine ranges.


The new lower limit is the minimim of the two lower limits and
the new upper limit is the maximum of the two upper limits.
This operation results in an equal or larger range.

Parameters
rangerange

Definition at line 423 of file JRange.hh.

424  {
425  if (compare(range.getLowerLimit(), getLowerLimit())) { setLowerLimit(range.getLowerLimit()); }
426  if (compare(getUpperLimit(), range.getUpperLimit())) { setUpperLimit(range.getUpperLimit()); }
427 
428  return *this;
429  }

◆ add() [1/3]

template<class T, class JComparator_t = std::less<T>>
range_type& JTOOLS::JRange< T, JComparator_t >::add ( argument_type  x)
inlineinherited

Add offset.

Parameters
xoffset

Definition at line 437 of file JRange.hh.

438  {
439  this->first += x;
440  this->second += x;
441 
442  return *this;
443  }

◆ add() [2/3]

template<class T, class JComparator_t = std::less<T>>
range_type& JTOOLS::JRange< T, JComparator_t >::add ( const range_type range)
inlineinherited

Add offsets.


The new lower limit is the sum of the two lower limits and
the new upper limit is the sum of the two upper limits.

Parameters
rangeoffset

Definition at line 467 of file JRange.hh.

468  {
469  this->first += range.getLowerLimit();
470  this->second += range.getUpperLimit();
471 
472  return *this;
473  }

◆ sub() [1/3]

template<class T, class JComparator_t = std::less<T>>
range_type& JTOOLS::JRange< T, JComparator_t >::sub ( argument_type  x)
inlineinherited

Subtract offset.

Parameters
xoffset

Definition at line 451 of file JRange.hh.

452  {
453  this->first -= x;
454  this->second -= x;
455 
456  return *this;
457  }

◆ sub() [2/3]

template<class T, class JComparator_t = std::less<T>>
range_type& JTOOLS::JRange< T, JComparator_t >::sub ( const range_type range)
inlineinherited

Subtract offsets.


The new lower limit is the difference of the two lower limits and
the new upper limit is the difference of the two upper limits.

Parameters
rangeoffset

Definition at line 483 of file JRange.hh.

484  {
485  this->first -= range.getLowerLimit();
486  this->second -= range.getUpperLimit();
487 
488  return *this;
489  }

◆ mul() [1/4]

template<class T, class JComparator_t = std::less<T>>
range_type& JTOOLS::JRange< T, JComparator_t >::mul ( const double  factor)
inlineinherited

Multiply range.

Parameters
factorfactor

Definition at line 497 of file JRange.hh.

498  {
499  this->first *= factor;
500  this->second *= factor;
501 
502  return *this;
503  }

◆ mul() [2/4]

template<class JFirst_t, class JSecond_t>
JFirst_t& JMATH::JMath< JFirst_t, JSecond_t >::mul ( const JSecond_t &  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  }

◆ div() [1/2]

template<class T, class JComparator_t = std::less<T>>
range_type& JTOOLS::JRange< T, JComparator_t >::div ( const double  factor)
inlineinherited

Divide range.

Parameters
factorfactor

Definition at line 511 of file JRange.hh.

512  {
513  this->first /= factor;
514  this->second /= factor;
515 
516  return *this;
517  }

◆ getN()

template<class T, class JComparator_t = std::less<T>>
T JTOOLS::JRange< T, JComparator_t >::getN ( const double  R) const
inlineinherited

Get expected number of occurances of given rate within this interval.

Parameters
Rrate
Returns
expectation value

Definition at line 526 of file JRange.hh.

527  {
528  return R * (getUpperLimit() - getLowerLimit());
529  }

◆ getMinimum()

template<class T, class JComparator_t = std::less<T>>
static T JTOOLS::JRange< T, JComparator_t >::getMinimum ( )
inlinestaticinherited

Get minimum possible value.

Returns
minimum possible value

Definition at line 537 of file JRange.hh.

538  {
539  return JMATH::JLimits<T>::min();
540  }

◆ getMaximum()

template<class T, class JComparator_t = std::less<T>>
static T JTOOLS::JRange< T, JComparator_t >::getMaximum ( )
inlinestaticinherited

Get maximum possible value.

Returns
maximum possible value

Definition at line 548 of file JRange.hh.

549  {
550  return JMATH::JLimits<T>::max();
551  }

◆ getKey() [1/2]

const key_type& JTOOLS::JPair< T , T >::getKey ( ) const
inlineinherited

Definition at line 123 of file JPair.hh.

123 { return this->first; }

◆ getValue() [1/2]

const mapped_type& JTOOLS::JPair< T , T >::getValue ( ) const
inlineinherited

Definition at line 124 of file JPair.hh.

124 { return this->second; }

◆ getValue() [2/2]

mapped_type& JTOOLS::JPair< T , T >::getValue ( )
inlineinherited

Definition at line 126 of file JPair.hh.

126 { return this->second; }

◆ getKey() [2/2]

const std::string& JUTM::JUTMGrid::getKey ( ) const
inlineinherited

Get key.

Returns
key

Definition at line 68 of file JUTMGrid.hh.

69  {
70  return key;
71  }

◆ getWGS()

const std::string& JUTM::JUTMGrid::getWGS ( ) const
inlineinherited

Get WGS.

Returns
WGS

Definition at line 79 of file JUTMGrid.hh.

80  {
81  return wgs;
82  }

◆ getUTMZone()

const std::string& JUTM::JUTMGrid::getUTMZone ( ) const
inlineinherited

Get UTM zone.

Returns
UTM zone

Definition at line 90 of file JUTMGrid.hh.

91  {
92  return zone;
93  }

◆ toString()

std::string JUTM::JUTMGrid::toString ( ) const
inlineinherited

Convert UTM grid.

Returns
UTM grid

Definition at line 101 of file JUTMGrid.hh.

102  {
103  return (key + " " + wgs + " " + zone);
104  }

◆ valueOf()

static JUTMGrid JUTM::JUTMGrid::valueOf ( const std::string &  buffer)
inlinestaticinherited

Extract UTM grid.

Parameters
bufferWGS and UTM zone
Returns
UTM grid

Definition at line 113 of file JUTMGrid.hh.

114  {
115  JUTMGrid grid;
116 
117  std::istringstream is(buffer);
118 
119  if (is >> grid)
120  return grid;
121  else
122  throw JParseError("JUTMGrid::valueOf()");
123  }

◆ getUTMPosition()

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  }

◆ getPosition()

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  }

◆ getUTMEast()

double JUTM::JUTMPosition::getUTMEast ( ) const
inlineinherited

Get UTM east.

Returns
UTM East

Definition at line 104 of file JUTMPosition.hh.

105  {
106  return this->east;
107  }

◆ getUTMNorth()

double JUTM::JUTMPosition::getUTMNorth ( ) const
inlineinherited

Get UTM north.

Returns
UTM North

Definition at line 115 of file JUTMPosition.hh.

116  {
117  return this->north;
118  }

◆ getUTMZ()

double JUTM::JUTMPosition::getUTMZ ( ) const
inlineinherited

Get UTM Z.

Returns
UTM Z

Definition at line 126 of file JUTMPosition.hh.

127  {
128  return this->z;
129  }

◆ negate()

JUTMPosition& JUTM::JUTMPosition::negate ( )
inlineinherited

Negate UTM position.

Returns
this UTM position

Definition at line 137 of file JUTMPosition.hh.

138  {
139  east = -east;
140  north = -north;
141  z = -z;
142 
143  return *this;
144  }

◆ add() [3/3]

JUTMPosition& JUTM::JUTMPosition::add ( const JUTMPosition pos)
inlineinherited

Add UTM position.

Parameters
posUTM position
Returns
this UTM position

Definition at line 153 of file JUTMPosition.hh.

154  {
155  east += pos.getUTMEast();
156  north += pos.getUTMNorth();
157  z += pos.getUTMZ();
158 
159  return *this;
160  }

◆ sub() [3/3]

JUTMPosition& JUTM::JUTMPosition::sub ( const JUTMPosition pos)
inlineinherited

Subtract UTM position.

Parameters
posUTM position
Returns
this UTM position

Definition at line 169 of file JUTMPosition.hh.

170  {
171  east -= pos.getUTMEast();
172  north -= pos.getUTMNorth();
173  z -= pos.getUTMZ();
174 
175  return *this;
176  }

◆ mul() [3/4]

JUTMPosition& JUTM::JUTMPosition::mul ( const double  factor)
inlineinherited

Scale UTM position.

Parameters
factormultiplication factor
Returns
this UTM position

Definition at line 185 of file JUTMPosition.hh.

186  {
187  east *= factor;
188  north *= factor;
189  z *= factor;
190 
191  return *this;
192  }

◆ mul() [4/4]

JUTMPosition & JMATH::JMath< JUTMPosition , JSecond_t >::mul ( const JSecond_t &  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  }

◆ div() [2/2]

JUTMPosition& JUTM::JUTMPosition::div ( const double  factor)
inlineinherited

Scale UTM position.

Parameters
factordivision factor
Returns
this UTM position

Definition at line 201 of file JUTMPosition.hh.

202  {
203  east /= factor;
204  north /= factor;
205  z /= factor;
206 
207  return *this;
208  }

Friends And Related Function Documentation

◆ operator>> [1/2]

std::istream& operator>> ( std::istream &  in,
JDetectorHeader header 
)
friend

Read detector header from input.

Parameters
ininput stream
headerheader
Returns
input stream

Definition at line 74 of file JDetectorHeader.hh.

75  {
76  in >> static_cast<JUTCTimeRange&>(header);
77  in >> static_cast<JUTMGrid&> (header);
78  in >> static_cast<JUTMPosition&> (header);
79 
80  return in;
81  }

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  out,
const JDetectorHeader header 
)
friend

Write detector header to output.

Parameters
outoutput stream
headerheader
Returns
output stream

Definition at line 91 of file JDetectorHeader.hh.

92  {
93  using namespace std;
94 
95  out << static_cast<const JUTCTimeRange&>(header);
96  out << endl;
97  out << static_cast<const JUTMGrid&> (header);
98  out << ' ';
99  out << static_cast<const JUTMPosition&> (header);
100 
101  return out;
102  }

◆ operator>> [2/2]

JReader& operator>> ( JReader in,
JDetectorHeader header 
)
friend

Read detector header from input.

Parameters
ininput stream
headerheader
Returns
input stream

Definition at line 112 of file JDetectorHeader.hh.

113  {
114  in >> static_cast<JUTCTimeRange&>(header);
115  in >> static_cast<JUTMGrid&> (header);
116  in >> static_cast<JUTMPosition&> (header);
117 
118  return in;
119  }

◆ operator<< [2/2]

JWriter& operator<< ( JWriter out,
const JDetectorHeader header 
)
friend

Write detector header to output.

Parameters
outoutput stream
headerheader
Returns
output stream

Definition at line 129 of file JDetectorHeader.hh.

130  {
131  out << static_cast<const JUTCTimeRange&>(header);
132  out << static_cast<const JUTMGrid&> (header);
133  out << static_cast<const JUTMPosition&> (header);
134 
135  return out;
136  }

Member Data Documentation

◆ DEFAULT_RANGE

template<class T, class JComparator_t = std::less<T>>
const JRange< T, JComparator_t > JTOOLS::JRange< T, JComparator_t >::DEFAULT_RANGE
staticinherited

Default range.

This range corresponds to an unphysical range.

Definition at line 558 of file JRange.hh.

◆ compare

template<class T, class JComparator_t = std::less<T>>
JComparator_t JTOOLS::JRange< T, JComparator_t >::compare
inherited

Function object.

Parameters
firstfirst argument
secondsecond argument
Returns
true if first < second; else false

Definition at line 568 of file JRange.hh.

◆ first

T JTOOLS::JPair< T , T >::first
inherited

Definition at line 128 of file JPair.hh.

◆ second

T JTOOLS::JPair< T , T >::second
inherited

Definition at line 129 of file JPair.hh.

◆ key

std::string JUTM::JUTMGrid::key
protectedinherited

Definition at line 183 of file JUTMGrid.hh.

◆ wgs

std::string JUTM::JUTMGrid::wgs
protectedinherited

Definition at line 184 of file JUTMGrid.hh.

◆ zone

std::string JUTM::JUTMGrid::zone
protectedinherited

Definition at line 185 of file JUTMGrid.hh.

◆ east

double JUTM::JUTMPosition::east
protectedinherited

Definition at line 265 of file JUTMPosition.hh.

◆ north

double JUTM::JUTMPosition::north
protectedinherited

Definition at line 266 of file JUTMPosition.hh.

◆ z

double JUTM::JUTMPosition::z
protectedinherited

Definition at line 267 of file JUTMPosition.hh.


The documentation for this class was generated from the following file:
JTOOLS::JRange::getLowerLimit
T getLowerLimit() const
Get lower limit.
Definition: JRange.hh:215
JTOOLS::JRange::include
range_type include(argument_type x)
Include given value to range.
Definition: JRange.hh:388
JTOOLS::JRange::getUpperLimit
T getUpperLimit() const
Get upper limit.
Definition: JRange.hh:226
JUTM::JUTMPosition::JUTMPosition
JUTMPosition()
Default constructor.
Definition: JUTMPosition.hh:41
JUTM::JUTMGrid
Data structure for UTM grid.
Definition: JUTMGrid.hh:34
JUTM::JUTMPosition::east
double east
Definition: JUTMPosition.hh:265
JTOOLS::JPair< T, T >::first
T first
Definition: JPair.hh:128
JUTC::JUTCTimeRange::JUTCTimeRange
JUTCTimeRange()
Default constructor.
Definition: JUTCTimeRange.hh:31
JUTM::JUTMPosition::getUTMZ
double getUTMZ() const
Get UTM Z.
Definition: JUTMPosition.hh:126
JLANG::is_iterator
Data structure to check whether given data type is an iterator.
Definition: JClass.hh:62
JTOOLS::JRange::setRange
void setRange(const range_type &range)
Set range.
Definition: JRange.hh:139
JTOOLS::JRange::getLength
T getLength() const
Get length (difference between upper and lower limit).
Definition: JRange.hh:302
JTOOLS::JRange::getMinimum
static T getMinimum()
Get minimum possible value.
Definition: JRange.hh:537
JTOOLS::JRange::setLowerLimit
void setLowerLimit(argument_type x)
Set lower limit.
Definition: JRange.hh:237
JTOOLS::JRange::getMaximum
static T getMaximum()
Get maximum possible value.
Definition: JRange.hh:548
JTOOLS::JRange::setUpperLimit
void setUpperLimit(argument_type y)
Set upper limit.
Definition: JRange.hh:248
JUTM::JUTMGrid::key
std::string key
Definition: JUTMGrid.hh:183
JUTM::JUTMGrid::wgs
std::string wgs
Definition: JUTMGrid.hh:184
JMATH::JLimits::max
TTimeStamp max()
Get maximum possible value.
Definition: JMathSupportkit.hh:33
JTOOLS::JRange::compare
JComparator_t compare
Function object.
Definition: JRange.hh:568
JLANG::JBool
Auxiliary template class for type bool.
Definition: JBool.hh:20
JUTM::JUTMGrid::zone
std::string zone
Definition: JUTMGrid.hh:185
JDETECTOR::JDetectorHeader::getEquationParameters
static JEquationParameters & getEquationParameters()
Get equation parameters.
Definition: JDetectorHeader.hh:144
JUTM::JUTMGrid::JUTMGrid
JUTMGrid()
Default constructor.
Definition: JUTMGrid.hh:39
JLANG::JEquationParameters
Simple data structure to support I/O of equations (see class JLANG::JEquation).
Definition: JEquationParameters.hh:20
JTOOLS::JRange::argument_type
JLANG::JClass< T >::argument_type argument_type
Definition: JRange.hh:42
std
Definition: jaanetDictionary.h:36
JUTM::JUTMPosition::getUTMNorth
double getUTMNorth() const
Get UTM north.
Definition: JUTMPosition.hh:115
JMATH::JCalculator
Auxiliary class for arithmetic operations on objects.
Definition: JCalculator.hh:18
JUTM::JUTMPosition::north
double north
Definition: JUTMPosition.hh:266
JTOOLS::JPair< T, T >::second
T second
Definition: JPair.hh:129
JLANG
Auxiliary classes and methods for language specific functionality.
Definition: JAbstractClass.hh:10
JUTM::JUTMPosition::z
double z
Definition: JUTMPosition.hh:267
JUTM::JUTMPosition::getUTMEast
double getUTMEast() const
Get UTM east.
Definition: JUTMPosition.hh:104
JMATH::JLimits::min
float min()
Get minimum possible value.
Definition: JLimits.hh:96