Changeset 8337 for trunk/MagicSoft/Mars/mastro
- Timestamp:
- 02/28/07 13:34:10 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mastro
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mastro/MObservatory.cc
r8324 r8337 53 53 } 54 54 55 // -------------------------------------------------------------------------- 56 // 57 // Default constructor sets name and title of instace. 58 // Default location is kMagic1 59 // 55 60 MObservatory::MObservatory(const char *name, const char *title) 56 61 { … … 60 65 } 61 66 67 // -------------------------------------------------------------------------- 68 // 69 // For example "MObservator(MObservatory::kMagic1)" 70 // 62 71 MObservatory::MObservatory(LocationName_t key, const char *name, const char *title) 63 72 { … … 65 74 66 75 SetLocation(key); 76 } 77 78 // -------------------------------------------------------------------------- 79 // 80 // Calls SetLocation 81 // 82 MObservatory::MObservatory(Double_t lon, Double_t lat, const char *name) 83 { 84 Init(); 85 86 SetLocation(lon, lat, 0, name); 87 } 88 89 // -------------------------------------------------------------------------- 90 // 91 // Calls SetLocation 92 // 93 MObservatory::MObservatory(Double_t lon, Double_t lat, Double_t h, const char *name) 94 { 95 Init(); 96 97 SetLocation(lon, lat, h, name); 67 98 } 68 99 … … 106 137 } 107 138 139 // -------------------------------------------------------------------------- 140 // 141 // Longitude/Latitude [rad] 142 // Height [m] 143 // 144 void MObservatory::SetLocation(Double_t lon, Double_t lat, Double_t h, const char *name) 145 { 146 fLongitude = lon; 147 fLatitude = lat; 148 fHeight = h; 149 150 fSinLatitude = TMath::Sin(fLatitude); 151 fCosLatitude = TMath::Cos(fLatitude); 152 153 if (name) 154 fObservatoryName = name; 155 } 156 108 157 void MObservatory::Print(Option_t *) const 109 158 { -
trunk/MagicSoft/Mars/mastro/MObservatory.h
r8066 r8337 32 32 Double_t fHeight; //! [m] height of observatory 33 33 34 void Init(const char *name , const char *title);34 void Init(const char *name=NULL, const char *title=NULL); 35 35 36 36 public: 37 37 MObservatory(const char *name=NULL, const char *title=NULL); 38 38 MObservatory(LocationName_t key, const char *name=NULL, const char *title=NULL); 39 MObservatory(Double_t lon, Double_t lat, const char *name="<n/a>"); 40 MObservatory(Double_t lon, Double_t lat, Double_t h, const char *name="<n/a>"); 39 41 40 42 void Copy(TObject &obj) const … … 50 52 51 53 void SetLocation(LocationName_t name); 54 void SetLocation(Double_t lon, Double_t lat, Double_t h=0, const char *name=NULL); 52 55 53 56 void Print(Option_t *o=0) const;
Note:
See TracChangeset
for help on using the changeset viewer.