Helper data structure for source morphology I/O.
More...
#include <JMorphology.hh>
Helper data structure for source morphology I/O.
Definition at line 495 of file JMorphology.hh.
◆ JMorphologyHelper()
| JASTRONOMY::JMorphologyHelper::JMorphologyHelper |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 501 of file JMorphology.hh.
502 {
503 (*this)["Point"] .reset(new JMorphologyPoint());
504 (*this)["Gauss"] .reset(new JMorphologyGauss());
505 (*this)["Gauss2D"] .reset(new JMorphologyGauss2D());
506 (*this)["Binary"] .reset(new JMorphologyBinary());
507 (*this)["Histogram"].reset(new JMorphologyHistogram());
508 }
◆ operator()()
| std::istream & JASTRONOMY::JMorphologyHelper::operator() |
( |
std::istream & | in, |
|
|
morphology_type & | object ) const |
|
inline |
Parse source morphology from input stream.
- Parameters
-
| in | input stream |
| object | source morphology |
- Returns
- input stream
Definition at line 518 of file JMorphology.hh.
519 {
521
522 if (in >> key) {
523
524 const_iterator p = this->find(key);
525
526 if (p != this->end()) {
527
528 object.reset(p->second->clone());
529
530 object->setTitle(key);
531 object->read(in);
532
533 } else {
534
535 THROW(JParseError,
"Invalid key " << key);
536 }
537 }
538
539 return in;
540 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
The documentation for this struct was generated from the following file: