source: trunk/MagicSoft/Cosy/base/MStar.h@ 5138

Last change on this file since 5138 was 1810, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 796 bytes
Line 
1#ifndef COSY_MStar
2#define COSY_MStar
3
4#include <TObject.h>
5
6class MStar : public TObject
7{
8private:
9 Double_t fX;
10 Double_t fY;
11
12 Double_t fMag;
13
14public:
15 MStar(Double_t x=0, Double_t y=0, Int_t m=0) : fX(x), fY(y), fMag(m) {}
16 MStar(const MStar &p) { fX = p.fX; fY=p.fY; fMag=p.fMag; }
17 Double_t GetX() const { return fX; }
18 Double_t GetY() const { return fY; }
19 Double_t GetMag() const { return fMag; }
20
21 void Set(Double_t mx, Double_t my) { fX=mx; fY=my; }
22
23 Int_t Compare(const TObject *obj) const
24 {
25 const MStar *const s = (MStar*)obj;
26
27 if (fMag<s->fMag)
28 return -1;
29
30 if (fMag>s->fMag)
31 return 1;
32
33 return 0;
34 }
35
36 Bool_t IsSortable() const { return kTRUE; }
37
38
39 ClassDef(MStar, 1)
40};
41
42#endif
Note: See TracBrowser for help on using the repository browser.