Helper for detector resolution I/O.
More...
#include <JResolution.hh>
|
| std::istream & | operator>> (std::istream &in, JResolution_t &object) |
| | Read detector resolution from input stream.
|
| |
| std::ostream & | operator<< (std::ostream &out, const JResolution_t &object) |
| | Write detector resolution to output stream.
|
| |
Helper for detector resolution I/O.
Definition at line 361 of file JResolution.hh.
◆ dictionary_type
◆ JResolution_t()
| JASTRONOMY::JResolution_t::JResolution_t |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 370 of file JResolution.hh.
371 {
372 dictionary[
"Gauss"] .reset(
new JResolutionGauss());
373 dictionary[
"Formula"] .reset(
new JResolutionTF1());
374 dictionary[
"Histogram"] .reset(
new JResolutionTH1());
375 dictionary[
"Logarithmic"].reset(
new JResolutionLog());
376 }
dictionary_type dictionary
◆ getDictionary()
◆ getTitle()
| const std::string & JLANG::JTitle::getTitle |
( |
| ) |
const |
|
inlineinherited |
Get title.
- Returns
- title
Definition at line 55 of file JTitle.hh.
◆ setTitle()
| void JLANG::JTitle::setTitle |
( |
const std::string & | title | ) |
|
|
inlineinherited |
Set title.
- Parameters
-
Definition at line 66 of file JTitle.hh.
◆ operator>>
| std::istream & operator>> |
( |
std::istream & | in, |
|
|
JResolution_t & | object ) |
|
friend |
Read detector resolution from input stream.
- Parameters
-
| in | input stream |
| object | detector resolution |
- Returns
- input stream
Definition at line 397 of file JResolution.hh.
398 {
400
402
403 if (in >> key) {
404
406
407 static_cast<shared_ptr<JResolution>&
>(object) =
object.
dictionary[key];
408
409 object.setTitle(key);
410
411 object->read(in);
412
413 } else {
414
415 THROW(JParseError,
"Invalid key " << key);
416 }
417 }
418
419 return in;
420 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JResolution_t & | object ) |
|
friend |
Write detector resolution to output stream.
- Parameters
-
| out | output stream |
| object | detector resolution |
- Returns
- output stream
Definition at line 430 of file JResolution.hh.
431 {
432 out << object.getTitle() << ' ';
433
434 if (static_cast<const std::shared_ptr<JResolution>&>(object)) {
435 object->write(out);
436 }
437
438 return out;
439 }
◆ dictionary
◆ title
| std::string JLANG::JTitle::title |
|
protectedinherited |
The documentation for this struct was generated from the following file: