#include <EvtValError.hh>
Definition at line 20 of file EvtValError.hh.
◆ EvtValError() [1/4]
EvtValError::EvtValError |
( |
| ) |
|
Definition at line 18 of file EvtValError.cc.
19 : _valKnown(0), _val(0.), _errKnown(0), _err(0.)
20{}
◆ EvtValError() [2/4]
EvtValError::EvtValError |
( |
double | val | ) |
|
Definition at line 22 of file EvtValError.cc.
23 : _valKnown(1), _val(val), _errKnown(0), _err(0.)
24{}
◆ EvtValError() [3/4]
EvtValError::EvtValError |
( |
double | val, |
|
|
double | err ) |
Definition at line 26 of file EvtValError.cc.
27 : _valKnown(1), _val(val), _errKnown(1), _err(err)
28{}
◆ EvtValError() [4/4]
Definition at line 30 of file EvtValError.cc.
31 : _valKnown(
other._valKnown), _val(
other._val),
33{}
Index other(Index i, Index j)
◆ ~EvtValError()
EvtValError::~EvtValError |
( |
| ) |
|
◆ error()
double EvtValError::error |
( |
| ) |
const |
|
inline |
Definition at line 33 of file EvtValError.hh.
33{ assert(_errKnown); return _err; }
◆ errorKnown()
int EvtValError::errorKnown |
( |
| ) |
const |
|
inline |
◆ operator*=() [1/2]
void EvtValError::operator*= |
( |
const EvtValError & | other | ) |
|
Definition at line 52 of file EvtValError.cc.
53{
54 assert(_valKnown &&
other._valKnown);
55
56
57 if(_errKnown &&
other._errKnown)
59 else _errKnown = 0;
60
61
63}
◆ operator*=() [2/2]
void EvtValError::operator*= |
( |
double | c | ) |
|
Definition at line 107 of file EvtValError.cc.
107 {
108
109 assert(_valKnown);
110 _val *= c;
111 if(_errKnown) _err*=c;
112}
◆ operator+=()
void EvtValError::operator+= |
( |
const EvtValError & | other | ) |
|
Definition at line 90 of file EvtValError.cc.
91{
92 assert(_valKnown); assert(
other._valKnown);
94
95
96
97 if(_errKnown &&
other._errKnown) {
98
99 _err = sqrt(_err*_err +
other._err*
other._err);
100 }
101 else {
102
103 _errKnown = 0;
104 }
105}
◆ operator/=()
void EvtValError::operator/= |
( |
const EvtValError & | other | ) |
|
Definition at line 65 of file EvtValError.cc.
66{
67 assert(_valKnown &&
other._valKnown &&
other._val != 0.);
68
69
70 if(_errKnown &&
other._errKnown)
72 else _errKnown = 0;
73
74
76}
◆ operator=()
void EvtValError::operator= |
( |
const EvtValError & | other | ) |
|
◆ prec()
double EvtValError::prec |
( |
| ) |
const |
◆ print()
void EvtValError::print |
( |
std::ostream & | | ) |
const |
Definition at line 79 of file EvtValError.cc.
80{
81 if(_valKnown) os << _val;
82 else os << "Undef";
83 os << " +/- ";
84 if(_errKnown) os << _err;
85 else os << "Undef";
86 os << endl;
87}
◆ value()
double EvtValError::value |
( |
| ) |
const |
|
inline |
Definition at line 31 of file EvtValError.hh.
31{ assert(_valKnown); return _val; }
◆ valueKnown()
int EvtValError::valueKnown |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: