Helper data structure for nuisance I/O.
More...
#include <JNuisance.hh>
Helper data structure for nuisance I/O.
Definition at line 353 of file JNuisance.hh.
◆ JNuisanceHelper()
| JASTRONOMY::JNuisanceHelper::JNuisanceHelper |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 359 of file JNuisance.hh.
360 {
361 (*this)["fixed"] .reset(new JNuisanceFixed());
362 (*this)["Gauss"] .reset(new JNuisanceGauss());
363 (*this)["Formula"] .reset(new JNuisanceTF1());
364 (*this)["Histogram"].reset(new JNuisanceTH1());
365 }
◆ operator()()
| std::istream & JASTRONOMY::JNuisanceHelper::operator() |
( |
std::istream & | in, |
|
|
nuisance_type & | object ) const |
|
inline |
Parse nuisance from input stream.
- Parameters
-
| in | input stream |
| object | nuisance |
- Returns
- input stream
Definition at line 375 of file JNuisance.hh.
376 {
378
379 if (in >> key) {
380
381 const_iterator p = this->find(key);
382
383 if (p != this->end()) {
384
385 object.reset(p->second->clone());
386
387 object->setTitle(key);
388 object->read(in);
389
390 } else {
391
392 THROW(JParseError,
"Invalid key " << key);
393 }
394 }
395
396 return in;
397 }
#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: