Changeset 7264 for trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
- Timestamp:
- 08/05/05 18:13:49 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstroCatalog.h
r4977 r7264 7 7 #ifndef ROOT_TList 8 8 #include <TList.h> 9 #endif 10 #ifndef ROOT_TAttLine 11 #include <TAttLine.h> 12 #endif 13 #ifndef ROOT_TAttMarker 14 #include <TAttMarker.h> 9 15 #endif 10 16 #ifndef MARS_MGMap … … 17 23 class TGToolTip; 18 24 19 class MAstroCatalog : public TObject 25 class MAttLine : public TObject, public TAttLine 26 { 27 public: 28 MAttLine() { } 29 ClassDef(MAttLine, 1) // Helper class to have a TAttLine derving from TObject (for standalone GED editor) 30 }; 31 32 class MAstroCatalog : public TObject, public TAttMarker 20 33 { 21 34 private: 22 Double_t fLimMag; // [1] Limiting Magnitude23 Double_t fRadiusFOV; // [deg] Radius of Field of View35 Double_t fLimMag; // [1] Limiting Magnitude 36 Double_t fRadiusFOV; // [deg] Radius of Field of View 24 37 25 TGToolTip *fToolTip; //! The tooltip currently displayed 38 TGToolTip *fToolTip; //! The tooltip currently displayed 39 40 MAttLine fAttLineSky; // Line Style and color for sky coordinates 41 MAttLine fAttLineLocal; // Line Style and color for local coordinates 26 42 27 43 void ShowToolTip(Int_t px, Int_t py, const char *txt); 44 void SetLineAttributes(MAttLine &att); 28 45 29 46 TString FindToken(TString &line, Char_t tok=','); 30 47 31 Int_t atoi(const TSubString &sub);32 Float_t atof(const TSubString &sub);33 48 Int_t atoi(const TString &s); 34 49 Float_t atof(const TString &s); 35 50 36 51 //#if ROOT_VERSION_CODE < ROOT_VERSION(4,00,03) 37 Bool_t fPlainScreen; //! Just a dummy!!!! ([Set,Is]Freezed)38 Bool_t fNoToolTips; //! Just a dummy!!!! ([Set,Is]Freezed)52 // Bool_t fPlainScreen; //! Just a dummy!!!! ([Set,Is]Freezed) 53 // Bool_t fNoToolTips; //! Just a dummy!!!! ([Set,Is]Freezed) 39 54 //#endif 40 55 … … 84 99 ~MAstroCatalog(); 85 100 101 void ForceUpdate() { Update(kTRUE); } // Slot for marker handling 102 103 // Setter to control the sky position and behaviour 86 104 void SetTime(const MTime &time); 87 105 void SetObservatory(const MObservatory &obs); … … 109 127 } // Set Radius of FOV using the pixsize [arcsec/pix], width and height [pixel] of image 110 128 111 void SetRaDec(Double_t ra, Double_t dec) { fRaDec.SetRaDec(ra, dec, 1); Update(); }112 void SetRaDec(const TVector3 &v) { fRaDec=v; Update(); }113 void SetGuiActive(Bool_t b=kTRUE) { b ? SetBit(kGuiActive) : ResetBit(kGuiActive); }129 void SetRaDec(Double_t ra, Double_t dec) { fRaDec.SetRaDec(ra, dec, 1); Update(); } 130 void SetRaDec(const TVector3 &v) { fRaDec=v; Update(); } 131 void SetGuiActive(Bool_t b=kTRUE) { b ? SetBit(kGuiActive) : ResetBit(kGuiActive); } 114 132 115 void SetPlainScreen(Bool_t b=kTRUE) { b ? SetBit(kPlainScreen) : ResetBit(kPlainScreen); Update(); } // *TOGGLE* *GETTER=IsPlainScreen116 Bool_t IsPlainScreen() const { return TestBit(kPlainScreen); }133 void SetPlainScreen(Bool_t b=kTRUE) { b ? SetBit(kPlainScreen) : ResetBit(kPlainScreen); Update(); } // *TOGGLE* *GETTER=IsPlainScreen 134 Bool_t IsPlainScreen() const { return TestBit(kPlainScreen); } 117 135 118 void SetNoToolTips(Bool_t b=kTRUE) { b ? SetBit(kNoToolTips) : ResetBit(kNoToolTips); } // *TOGGLE* *GETTER=HasNoToolTips119 Bool_t HasNoToolTips() const { return TestBit(kNoToolTips); }136 void SetNoToolTips(Bool_t b=kTRUE) { b ? SetBit(kNoToolTips) : ResetBit(kNoToolTips); } // *TOGGLE* *GETTER=HasNoToolTips 137 Bool_t HasNoToolTips() const { return TestBit(kNoToolTips); } 120 138 121 139 Double_t GetLimMag() const { return fLimMag; } // Get Limiting Magnitude 122 140 Double_t GetRadiusFOV() const { return fRadiusFOV; } // Get maximum radius of Field Of View 123 141 124 void Delete(Option_t *o="") { fList.Delete(); fMapG.Delete(); } // Delete list of stars 125 126 Int_t ReadXephem(TString catalog = "/usr/X11R6/lib/xephem/catalogs/YBS.edb"); 127 Int_t ReadNGC2000(TString catalog = "ngc2000.dat"); 128 Int_t ReadBSC(TString catalog = "bsc5.dat"); 129 Int_t ReadHeasarcPPM(TString catalog = "heasarc_ppm.tdat", TString fout=""); 130 Int_t ReadCompressed(TString catalog); 142 // Interface to set stars 143 Int_t ReadXephem(TString catalog = "/usr/X11R6/lib/xephem/catalogs/YBS.edb"); 144 Int_t ReadNGC2000(TString catalog = "ngc2000.dat"); 145 Int_t ReadBSC(TString catalog = "bsc5.dat"); 146 Int_t ReadHeasarcPPM(TString catalog = "heasarc_ppm.tdat", TString fout=""); 147 Int_t ReadCompressed(TString catalog); 131 148 Bool_t AddObject(Float_t ra, Float_t dec, Float_t mag, TString name=""); 132 149 133 void Print(Option_t *o="") const { fList.Print(); } // Print all stars 134 150 // Interface to get stars 135 151 TList *GetList() { return &fList; } // Return list of stars 136 152 137 //void PaintImg(Int_t id=0, Option_t *o=""); 138 void PaintImg(unsigned char *buf, int w=768, int h=576, Option_t *o=0); 153 // TObject 154 void Delete(Option_t *o="") { fList.Delete(); fMapG.Delete(); } // Delete list of stars 155 void Print(Option_t *o="") const { fList.Print(); } // Print all stars 139 156 void Draw(Option_t *o=""); 140 157 void SetDrawOption(Option_t *option="") … … 144 161 } //*MENU* 145 162 163 // Interface to Cosy 164 void PaintImg(unsigned char *buf, int w=768, int h=576, Option_t *o=0); 165 166 // Interface to line styles 167 void SetLineAttributesLocal() { SetLineAttributes(fAttLineLocal); } //*MENU* 168 void SetLineAttributesSky() { SetLineAttributes(fAttLineSky); } //*MENU* 169 void SetMarkerAttributes(); //*MENU* 170 146 171 virtual void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected=0); 147 172 148 ClassDef(MAstroCatalog, 1) // Display class for star catalogs173 ClassDef(MAstroCatalog, 2) // Display class for star catalogs 149 174 }; 150 175
Note:
See TracChangeset
for help on using the changeset viewer.