| Line |  | 
|---|
| 1 | #ifndef COSY_Led | 
|---|
| 2 | #define COSY_Led | 
|---|
| 3 |  | 
|---|
| 4 | #ifndef ROOT_TObject | 
|---|
| 5 | #include <TObject.h> | 
|---|
| 6 | #endif | 
|---|
| 7 |  | 
|---|
| 8 | class Ring; | 
|---|
| 9 |  | 
|---|
| 10 | class Led : public TObject | 
|---|
| 11 | { | 
|---|
| 12 | private: | 
|---|
| 13 | Double_t fX; | 
|---|
| 14 | Double_t fY; | 
|---|
| 15 | Double_t fPhi; | 
|---|
| 16 |  | 
|---|
| 17 | Double_t fDx; | 
|---|
| 18 | Double_t fDy; | 
|---|
| 19 | Double_t fDphi; | 
|---|
| 20 |  | 
|---|
| 21 | Double_t fMag; | 
|---|
| 22 |  | 
|---|
| 23 | public: | 
|---|
| 24 | Led(Double_t x=0, Double_t y=0, Double_t dx=0, Double_t dy=0, Double_t mag=0) : | 
|---|
| 25 | fX(x), fY(y), fDx(dx), fDy(dy), fMag(mag) | 
|---|
| 26 | { | 
|---|
| 27 | } | 
|---|
| 28 |  | 
|---|
| 29 | Int_t Compare(const TObject *obj) const | 
|---|
| 30 | { | 
|---|
| 31 | const Led *const l = (Led*)obj; | 
|---|
| 32 |  | 
|---|
| 33 | if (fPhi<l->fPhi) | 
|---|
| 34 | return -1; | 
|---|
| 35 |  | 
|---|
| 36 | if (fPhi>l->fPhi) | 
|---|
| 37 | return 1; | 
|---|
| 38 |  | 
|---|
| 39 | return 0; | 
|---|
| 40 | } | 
|---|
| 41 |  | 
|---|
| 42 | Double_t GetX() const    { return fX; } | 
|---|
| 43 | Double_t GetY() const    { return fY; } | 
|---|
| 44 | Double_t GetDx() const   { return fDx; } | 
|---|
| 45 | Double_t GetDy() const   { return fDy; } | 
|---|
| 46 | Double_t GetPhi() const  { return fPhi; } | 
|---|
| 47 | Double_t GetDphi() const { return fDphi; } | 
|---|
| 48 | Double_t GetMag() const  { return fMag; } | 
|---|
| 49 |  | 
|---|
| 50 | Bool_t IsSortable() const { return kTRUE; } | 
|---|
| 51 |  | 
|---|
| 52 | void CalcPhi(const Ring &ring); | 
|---|
| 53 |  | 
|---|
| 54 | void Print(Option_t *o=NULL) const; | 
|---|
| 55 |  | 
|---|
| 56 | ClassDef(Led, 1) | 
|---|
| 57 | }; | 
|---|
| 58 |  | 
|---|
| 59 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.