Changeset 7179 for trunk/MagicSoft/Mars/mastro
- Timestamp:
- 07/11/05 10:34:49 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mastro
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MAstro.cc
r6277 r7179 36 36 37 37 #include "MTime.h" // MTime::GetGmst 38 #include "MString.h" 38 39 39 40 #include "MAstroCatalog.h" // FIXME: replace by MVector3! … … 191 192 { 192 193 Day2Hm(h/24, sgn, deg, min); 194 } 195 196 TString MAstro::GetStringDeg(Double_t deg, const char *fmt) 197 { 198 Char_t sgn; 199 UShort_t d, m, s; 200 Deg2Dms(deg, sgn, d, m, s); 201 202 MString str; 203 str.Print(fmt, sgn, d, m ,s); 204 return str; 205 } 206 207 TString MAstro::GetStringHor(Double_t deg, const char *fmt) 208 { 209 Char_t sgn; 210 UShort_t h, m, s; 211 Hor2Hms(deg, sgn, h, m, s); 212 213 MString str; 214 str.Print(fmt, sgn, h, m ,s); 215 return str; 193 216 } 194 217 -
trunk/MagicSoft/Mars/mastro/MAstro.h
r6277 r7179 45 45 static void Hor2Hm(Double_t rad, Char_t &sgn, UShort_t &hor, Double_t &min); 46 46 47 // Print funtions 48 static TString GetStringDeg(Double_t deg, const char *fmt="%c%d:%02d:%02d"); 49 static TString GetStringHor(Double_t deg, const char *fmt="%c%d:%02d:%02d"); 50 47 51 // Angle treatment functions 48 52 static Bool_t String2Angle(TString &str, Double_t &ret); -
trunk/MagicSoft/Mars/mastro/MAstroCatalog.cc
r4977 r7179 733 733 const Double_t mag = -2.5*log10(v.Mag()); 734 734 735 MString str; 736 str.Print("%s: Ra=%.2fh Dec=%.1fd Mag=%.1f", v.GetName(), ra, dec, mag); 735 TString str(v.GetName()); 736 if (!str.IsNull()) 737 str += ": "; 738 str += MString::Form("Ra=%.2fh Dec=%.1fd Mag=%.1f", ra, dec, mag); 737 739 if (txt) 738 740 {
Note:
See TracChangeset
for help on using the changeset viewer.