CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
bool operator<(const ESWeight &rhs) const
Definition: ESWeight.h:27
ESWeight & operator=(const ESWeight &rhs)
Definition: ESWeight.cc:9
void setValue(const double &awgt)
Definition: ESWeight.h:24
bool operator!=(const ESWeight &rhs) const
Definition: ESWeight.h:26
bool operator==(const ESWeight &rhs) const
Definition: ESWeight.h:25
bool operator<=(const ESWeight &rhs) const
Definition: ESWeight.h:29
double wgt_
Definition: ESWeight.h:33
bool operator>=(const ESWeight &rhs) const
Definition: ESWeight.h:30
double value() const
Definition: ESWeight.h:21
bool operator>(const ESWeight &rhs) const
Definition: ESWeight.h:28
double operator()() const
Definition: ESWeight.h:22
ESWeight()
Definition: ESWeight.cc:3