Helper for detector resolution.
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.
Definition at line 353 of file JResolution.hh.
◆ JResolution_t()
JASTRONOMY::JResolution_t::JResolution_t |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 360 of file JResolution.hh.
361 {
362 dictionary[
"Gauss"] .reset(
new JResolutionGauss());
363 dictionary[
"Formula"] .reset(
new JResolutionTF1());
364 dictionary[
"Histogram"] .reset(
new JResolutionTH1());
365 dictionary[
"Logarithmic"].reset(
new JResolutionLog());
366 }
std::map< std::string, std::shared_ptr< JResolution > > dictionary
◆ 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 376 of file JResolution.hh.
377 {
379
381
382 if (in >> key) {
383
385
386 static_cast<std::shared_ptr<JResolution>&
>(object) =
object.
dictionary[key];
387
388 object.setTitle(key);
389
390 object->read(in);
391
392 } else {
393
394 THROW(JParseError,
"Invalid key " << key);
395 }
396 }
397
398 return in;
399 }
#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 409 of file JResolution.hh.
410 {
411 out << object.getTitle() << ' ';
412
413 if (static_cast<const std::shared_ptr<JResolution>&>(object)) {
414 object->write(out);
415 }
416
417 return out;
418 }
◆ dictionary
◆ title
std::string JLANG::JTitle::title |
|
protectedinherited |
The documentation for this struct was generated from the following file: