CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/CondFormats/ESObjects/interface/ESWeight.h

Go to the documentation of this file.
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