Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Ast.cxx

Go to the documentation of this file.
00001 
00002 //
00003 // Ast
00004 //
00005 // Package: Ast (AstroUtil).
00006 //
00007 // S. Kasahara 04/03
00008 //
00009 // Purpose: Define data types and provide general purpose utility routines 
00010 //          to the AstroUtil package.
00011 //
00013 
00014 #include "MessageService/MsgService.h"
00015 #include "Conventions/Detector.h"
00016 #include "AstroUtil/Ast.h"
00017 
00018 CVSID("$Id: Ast.cxx,v 1.5 2005/12/13 15:57:30 rhatcher Exp $");
00019 
00020 // Definition of methods (alphabetical order)
00021 // ******************************************
00022 
00023 double AstUtil::GetDetLatitude(Detector::Detector_t detector) {
00024   // 
00025   // Return the latitudinal position of the detector of the requested type.
00026   //
00027 
00028   switch( detector ) {
00029 
00030   case Detector::kFar: 
00031     return kFarDetLatitude;
00032 
00033   case Detector::kNear: 
00034     return kNearDetLatitude;
00035 
00036   default:
00037     MSG("Ast",Msg::kWarning) << "Latitudinal position for detector "
00038         << Detector::AsString(detector) << " unavailable." << endl;
00039     return 0;
00040 
00041   }// end of switch
00042 
00043 }
00044 
00045 double AstUtil::GetDetLongitude(Detector::Detector_t detector) {
00046   //
00047   // Return the longitudinal position of the detector of the requested type.
00048   //
00049   switch( detector ) {
00050 
00051   case Detector::kFar: 
00052     return kFarDetLongitude;
00053 
00054   case Detector::kNear: 
00055     return kNearDetLongitude;
00056 
00057   default:
00058     MSG("Ast",Msg::kWarning) << "Longitudinal position for detector "
00059         << Detector::AsString(detector) << " unavailable." << endl;
00060     return 0;
00061 
00062   } // end of switch
00063 
00064 }
00065 
00066 const double*
00067   AstUtil::GetDetRotMatrixLocalToIdeal(Detector::Detector_t detector) {
00068   //
00069   // Return the rotation matrix from local to ideal detector coordinates for
00070   // the  requested type.
00071   //
00072   switch( detector ) {
00073 
00074   case Detector::kFar: 
00075     return kFarDetRotMatrixLocalToIdeal;
00076 
00077   case Detector::kNear: 
00078     return kNearDetRotMatrixLocalToIdeal;
00079 
00080   default:
00081     MSG("Ast",Msg::kWarning) 
00082         << "Rotation matrix from local to ideal coordinates for detector "
00083         << Detector::AsString(detector) << " unavailable." << endl;
00084     return 0;
00085 
00086   } // end of switch
00087 
00088 }
00089 
00090 const double*
00091   AstUtil::GetDetRotMatrixIdealToLocal(Detector::Detector_t detector) {
00092   //
00093   // Return the rotation matrix from ideal to local detector coordinates for
00094   // the  requested type.
00095   //
00096   switch( detector ) {
00097 
00098   case Detector::kFar: 
00099     return kFarDetRotMatrixIdealToLocal;
00100 
00101   case Detector::kNear: 
00102     return kNearDetRotMatrixIdealToLocal;
00103 
00104   default:
00105     MSG("Ast",Msg::kWarning) 
00106         << "Rotation matrix from ideal to local coordinates for detector "
00107         << Detector::AsString(detector) << " unavailable." << endl;
00108     return 0;
00109 
00110   } // end of switch
00111 
00112 }
00113 
00114 
00115 
00116 
00117 
00118 
00119 

Generated on Mon Feb 15 11:06:22 2010 for loon by  doxygen 1.3.9.1