1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Robert Wagner 10/2002 <mailto:magicsoft@rwagner.de>
|
---|
19 | !
|
---|
20 | ! Copyright: MAGIC Software Development, 2002
|
---|
21 | !
|
---|
22 | !
|
---|
23 | \* ======================================================================== */
|
---|
24 |
|
---|
25 | /////////////////////////////////////////////////////////////////////////////
|
---|
26 | // //
|
---|
27 | // MObservatoryLocation //
|
---|
28 | // //
|
---|
29 | // //
|
---|
30 | /////////////////////////////////////////////////////////////////////////////
|
---|
31 | #include "MObservatoryLocation.h"
|
---|
32 |
|
---|
33 | #include <TMath.h>
|
---|
34 |
|
---|
35 | #include "MLog.h"
|
---|
36 | #include "MLogManip.h"
|
---|
37 |
|
---|
38 | ClassImp(MObservatoryLocation);
|
---|
39 |
|
---|
40 | MObservatoryLocation::MObservatoryLocation(const char *name, const char *title)
|
---|
41 | {
|
---|
42 | fName = name ? name : "MObservatoryLocation";
|
---|
43 | fTitle = title ? title : "Storage container for coordinates of an observatory";
|
---|
44 | // TH1F fHorizon=new TH1F;
|
---|
45 | fgDegToRad=2*TMath::Pi()/360;
|
---|
46 | fLatitude = 28.7594 * fgDegToRad; // rad; 28 45 34
|
---|
47 | fLongitude = 17.8761 * fgDegToRad; // rad; 17 52 34;
|
---|
48 | // slalib uses + for WEST !!!
|
---|
49 | fElevation = 2300; // m
|
---|
50 | fObsName = "Observatorio del Roque de los Muchachos";
|
---|
51 | }
|
---|
52 |
|
---|
53 | //Double_t GetHorizon(Double_t phi);
|
---|
54 | //TF1 SetHorizonLine() { return fHorizon; }
|
---|
55 | //TF1 GetHorizonLine() { return fHorizon; }
|
---|
56 |
|
---|
57 | MObservatoryLocation::~MObservatoryLocation()
|
---|
58 | {
|
---|
59 | // do nothing special.
|
---|
60 | }
|
---|
61 |
|
---|
62 | void MObservatoryLocation::Print(Option_t *) const
|
---|
63 | {
|
---|
64 | *fLog << all;
|
---|
65 | *fLog << fObsName << endl;
|
---|
66 | *fLog << "Latitude " << (fLatitude > 0 ? (fLatitude/fgDegToRad) : -(fLatitude/fgDegToRad)) << " deg " << (fLatitude > 0 ? "W" : "E") << endl;
|
---|
67 | *fLog << "Longitude " << (fLongitude > 0 ? (fLongitude/fgDegToRad) : -(fLongitude/fgDegToRad)) <<" deg " << (fLongitude < 0 ? "N" : "S") << endl;
|
---|
68 | *fLog << "Elevation " << fElevation << "m" << endl;
|
---|
69 | }
|
---|