00001 #ifndef CondFormats_ESObjects_ESWeight_H 00002 #define CondFormats_ESObjects_ESWeight_H 00003 00012 #include <iostream> 00013 00014 class ESWeight { 00015 public: 00016 ESWeight(); 00017 ESWeight(const double& awgt); 00018 ESWeight(const ESWeight& awgt); 00019 ESWeight& operator=(const ESWeight&rhs); 00020 00021 double value() const { return wgt_; } 00022 double operator()() const { return wgt_; } 00023 00024 void setValue(const double& awgt) { wgt_ = awgt; } 00025 bool operator ==(const ESWeight&rhs) const { return (wgt_ == rhs.wgt_); } 00026 bool operator !=(const ESWeight&rhs) const { return (wgt_ != rhs.wgt_); } 00027 bool operator <(const ESWeight&rhs) const { return (wgt_ < rhs.wgt_); } 00028 bool operator >(const ESWeight&rhs) const { return (wgt_ > rhs.wgt_); } 00029 bool operator <=(const ESWeight&rhs) const { return (wgt_ <= rhs.wgt_); } 00030 bool operator >=(const ESWeight&rhs) const { return (wgt_ >= rhs.wgt_); } 00031 00032 private: 00033 double wgt_; 00034 }; 00035 00036 //std::ostream& operator<<(std::ostream& os, const ESWeight& wg) { 00037 // return os << wg.value(); 00038 //} 00039 00040 #endif