Helper for nuisance I/O.
More...
#include <JNuisance.hh>
Helper for nuisance I/O.
Definition at line 347 of file JNuisance.hh.
◆ dictionary_type
◆ JNuisance_t()
| JASTRONOMY::JNuisance_t::JNuisance_t |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 355 of file JNuisance.hh.
355 :
358 {
360
361 dictionary[
"Gauss"] .reset(
new JNuisanceGauss());
362 dictionary[
"Formula"] .reset(
new JNuisanceTF1());
363 dictionary[
"Histogram"].reset(
new JNuisanceTH1());
364 }
std::shared_ptr< JNuisance > nuisance_type
Type definition of generic nuisance.
dictionary_type dictionary
◆ getDictionary()
Get dictionary.
- Returns
- dictionary
Definition at line 372 of file JNuisance.hh.
◆ operator>>
| std::istream & operator>> |
( |
std::istream & | in, |
|
|
JNuisance_t & | object ) |
|
friend |
Read nuisance from input stream.
- Parameters
-
| in | input stream |
| object | nuisance |
- Returns
- input stream
Definition at line 385 of file JNuisance.hh.
386 {
388
390
392
394
395 static_cast<nuisance_type&
>(object) =
object.
dictionary[
key];
396
398
399 object->read(in);
400
401 } else {
402
403 THROW(JParseError,
"Invalid key " <<
key);
404 }
405 }
406
407 return in;
408 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JNuisance_t & | object ) |
|
friend |
Write nuisance to output stream.
- Parameters
-
| out | output stream |
| object | nuisance |
- Returns
- output stream
Definition at line 418 of file JNuisance.hh.
419 {
420 out << object.key << ' ';
421
422 if (static_cast<const nuisance_type&>(object)) {
423 object->write(out);
424 }
425
426 return out;
427 }
◆ key
| std::string JASTRONOMY::JNuisance_t::key |
|
protected |
◆ dictionary
The documentation for this struct was generated from the following file: