CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
EcalWeight.h
Go to the documentation of this file.
1 #ifndef CondFormats_EcalObjects_EcalWeight_H
2 #define CondFormats_EcalObjects_EcalWeight_H
3 
12 #include <iostream>
13 
14 class EcalWeight {
15 public:
16  EcalWeight();
17  EcalWeight(const double& awgt);
18  EcalWeight(const EcalWeight& awgt);
19  EcalWeight& operator=(const EcalWeight& 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 EcalWeight& rhs) const { return (wgt_ == rhs.wgt_); }
26  bool operator!=(const EcalWeight& rhs) const { return (wgt_ != rhs.wgt_); }
27  bool operator<(const EcalWeight& rhs) const { return (wgt_ < rhs.wgt_); }
28  bool operator>(const EcalWeight& rhs) const { return (wgt_ > rhs.wgt_); }
29  bool operator<=(const EcalWeight& rhs) const { return (wgt_ <= rhs.wgt_); }
30  bool operator>=(const EcalWeight& rhs) const { return (wgt_ >= rhs.wgt_); }
31 
32 private:
33  double wgt_;
34 };
35 
36 //std::ostream& operator<<(std::ostream& os, const EcalWeight& wg) {
37 // return os << wg.value();
38 //}
39 
40 #endif
bool operator>(const EcalWeight &rhs) const
Definition: EcalWeight.h:28
bool operator==(const EcalWeight &rhs) const
Definition: EcalWeight.h:25
bool operator!=(const EcalWeight &rhs) const
Definition: EcalWeight.h:26
bool operator>=(const EcalWeight &rhs) const
Definition: EcalWeight.h:30
double value() const
Definition: EcalWeight.h:21
void setValue(const double &awgt)
Definition: EcalWeight.h:24
double operator()() const
Definition: EcalWeight.h:22
bool operator<(const EcalWeight &rhs) const
Definition: EcalWeight.h:27
double wgt_
Definition: EcalWeight.h:33
EcalWeight & operator=(const EcalWeight &rhs)
Definition: EcalWeight.cc:15
bool operator<=(const EcalWeight &rhs) const
Definition: EcalWeight.h:29