120 double value_low = value-fError.
get_value();
121 if(fAsymError) value_low = value-fErrorLow.
get_value();
122 double value_high = value+fError.
get_value();
123 if(fAsymError) value_high = value+fErrorHigh.
get_value();
125 if(!fValue.
set_unit(_unit))
return false;
134 if(value_low>value_high) {
135 double tmp = value_high;
136 value_high = value_low;
139 value_low = fValue.
get_value() - value_low;
140 value_high = value_high-fValue.
get_value();
141 if(value_low != value_high) {
155 if(!fValue.
set_unit(_unit))
return false;
177 glog <<
warning_o <<
"The measure contains assymetric errors, the return value is the largest one" <<
do_endl;
Stores information on an experimental measure.
double get_error() const
returns the error on the measured value
double get_error_high() const
returns the high assymetric error on the measured value
tkunit_manager::units_keys get_unit_key() const
returns the unit key
double get_value() const
returns the measure value
bool set_unit(const tkstring &_unit_name)
set the measured data unit (value and errors)
double get_error_low() const
returns the low assymetric error on the measured value
void set(const double &_val, const tkstring &_unit="")
set the measured value and unit. No given units keeps the current one
void set_info_tag(const tkstring &_tag)
define the info tag (calculation, systematic, approx value...)
void set_info(tkproperty::data_info _info)
to set some information about this data
void set_converted(bool _val=true)
to define the value as a converted one
std::string with usefull tricks from TString (ROOT) and KVString (KaliVeda) and more....
tkstring & remove_all(const tkstring &_s1)
bool contains(const char *_pat, ECaseCompare _cmp=kExact) const
units_keys
units identifiers
tkunit_manager::units_keys get_unit_key() const
returns the unit key
double get_value() const
get the value in the current unit
void set_value(const double &_val, const tkstring &_unit="")
set the value and unit from string, if _unit not defined, let in the current unit
bool set_unit(const tkstring &_unit)
set the unit from a string
tklog & warning_o(tklog &log)
tklog & do_endl(tklog &log)