MINT2
Phase.h
Go to the documentation of this file.
1 #ifndef PHASE_HH
2 #define PHASE_HH
3 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
4 // status: Mon 9 Feb 2009 19:17:57 GMT
5 
6 #include <iostream>
7 
8 namespace MINT{
9 class Phase{
10  protected:
11  double _ph;
12  const static double _minPh;
13  void toRange();
14  public:
15  Phase(const Phase& other);
16  Phase(double ph_in=0);
17  operator double() const{
18  return _ph;
19  }
20 
21  static double rangeMax();
22  static double rangeMin();
23 
24  Phase& operator*=(double rhs);
25  Phase& operator/=(double rhs);
26  Phase& operator+=(const Phase& rhs);
27  Phase operator+ (const Phase& rhs) const;
28  const Phase& operator+ () const;
29  Phase& operator-=(const Phase& rhs);
30  Phase operator- (const Phase& rhs) const;
31  Phase operator- () const;
32 
33  double inDegrees() const;
34  void testPhase(std::ostream& os = std::cout) const;
35 };
36 }//namespace MINT
37 
38 #endif
static double rangeMax()
Definition: Phase.cpp:13
Phase & operator/=(double rhs)
Definition: Phase.cpp:36
double _ph
Definition: Phase.h:11
static double rangeMin()
Definition: Phase.cpp:16
Phase operator-() const
Definition: Phase.cpp:64
void testPhase(std::ostream &os=std::cout) const
Definition: Phase.cpp:73
void toRange()
Definition: Phase.cpp:19
double inDegrees() const
Definition: Phase.cpp:69
const Phase & operator+() const
Definition: Phase.cpp:51
Phase(const Phase &other)
Definition: Phase.cpp:23
Phase & operator+=(const Phase &rhs)
Definition: Phase.cpp:41
Phase & operator-=(const Phase &rhs)
Definition: Phase.cpp:54
static const double _minPh
Definition: Phase.h:12
Phase & operator *=(double rhs)
Definition: Phase.cpp:31