CMS 3D CMS Logo

ESWeight.h
Go to the documentation of this file.
1 #ifndef CondFormats_ESObjects_ESWeight_H
2 #define CondFormats_ESObjects_ESWeight_H
3 
12 #include <iostream>
13 
14 class ESWeight {
15 public:
16  ESWeight();
17  ESWeight(const double& awgt);
18  ESWeight(const ESWeight& awgt);
19  ESWeight& operator=(const ESWeight& rhs);
20 
21  double value() const { return wgt_; }
22  double operator()() const { return wgt_; }
23 
24  void setValue(const double& awgt) { wgt_ = awgt; }
25  bool operator==(const ESWeight& rhs) const { return (wgt_ == rhs.wgt_); }
26  bool operator!=(const ESWeight& rhs) const { return (wgt_ != rhs.wgt_); }
27  bool operator<(const ESWeight& rhs) const { return (wgt_ < rhs.wgt_); }
28  bool operator>(const ESWeight& rhs) const { return (wgt_ > rhs.wgt_); }
29  bool operator<=(const ESWeight& rhs) const { return (wgt_ <= rhs.wgt_); }
30  bool operator>=(const ESWeight& rhs) const { return (wgt_ >= rhs.wgt_); }
31 
32 private:
33  double wgt_;
34 };
35 
36 //std::ostream& operator<<(std::ostream& os, const ESWeight& wg) {
37 // return os << wg.value();
38 //}
39 
40 #endif
ESWeight::value
double value() const
Definition: ESWeight.h:21
ESWeight::operator==
bool operator==(const ESWeight &rhs) const
Definition: ESWeight.h:25
ESWeight::operator<
bool operator<(const ESWeight &rhs) const
Definition: ESWeight.h:27
ESWeight::operator!=
bool operator!=(const ESWeight &rhs) const
Definition: ESWeight.h:26
ESWeight
Definition: ESWeight.h:14
ESWeight::operator>=
bool operator>=(const ESWeight &rhs) const
Definition: ESWeight.h:30
ESWeight::setValue
void setValue(const double &awgt)
Definition: ESWeight.h:24
ESWeight::operator()
double operator()() const
Definition: ESWeight.h:22
ESWeight::wgt_
double wgt_
Definition: ESWeight.h:33
ESWeight::operator=
ESWeight & operator=(const ESWeight &rhs)
Definition: ESWeight.cc:9
ESWeight::operator<=
bool operator<=(const ESWeight &rhs) const
Definition: ESWeight.h:29
ESWeight::operator>
bool operator>(const ESWeight &rhs) const
Definition: ESWeight.h:28
ESWeight::ESWeight
ESWeight()
Definition: ESWeight.cc:3