RotationTraits.h

Go to the documentation of this file.
00001 #ifndef ROTATIONTRAITS_H
00002 #define ROTATIONTRAITS_H
00003 
00004 // $Id: RotationTraits.h,v 1.1 2005/08/11 14:18:00 fischler Exp $
00005 //
00006 // Rotation traits useful for testing purposes.
00007 //
00008 // For example, when reporting a problem, it is nice to be able
00009 // to present a human-readable name for the rotation.
00010 //
00011 // Created by: Mark Fischler  at Thu Aug 12  2005
00012 //
00013 
00014 #include <string>
00015 #include <typeinfo>
00016 #include "Math/GenVector/Rotation3D.h"
00017 #include "Math/GenVector/AxisAngle.h"
00018 #include "Math/GenVector/EulerAngles.h"
00019 #include "Math/GenVector/Quaternion.h"
00020 #include "Math/GenVector/RotationX.h"
00021 #include "Math/GenVector/RotationY.h"
00022 #include "Math/GenVector/RotationZ.h"
00023 #include "Math/GenVector/LorentzRotation.h"
00024 
00025 namespace ROOT {
00026 namespace Math {
00027 
00028 template <class C> 
00029 struct RotationTraits {
00030   static const std::string name() {return "NOT-A-ROTATION!";}
00031 };
00032 
00033 template <> 
00034 struct RotationTraits < Rotation3D >{
00035   static const std::string name() {
00036     std::string s = "Rotation3D";
00037    return s;
00038   }
00039 };
00040 
00041 template <> 
00042 struct RotationTraits < AxisAngle >{
00043   static const std::string name() {
00044     std::string s = "AxisAngle";
00045    return s;
00046   }
00047 };
00048 
00049 template <> 
00050 struct RotationTraits < EulerAngles >{
00051   static const std::string name() {
00052     std::string s = "EulerAngles";
00053    return s;
00054   }
00055 };
00056 
00057 template <> 
00058 struct RotationTraits < Quaternion >{
00059   static const std::string name() {
00060     std::string s = "Quaternion";
00061    return s;
00062   }
00063 };
00064 
00065 template <> 
00066 struct RotationTraits < RotationX >{
00067   static const std::string name() {
00068     std::string s = "RotationX";
00069    return s;
00070   }
00071 };
00072 
00073 template <> 
00074 struct RotationTraits < RotationY >{
00075   static const std::string name() {
00076     std::string s = "RotationY";
00077    return s;
00078   }
00079 };
00080 
00081 template <> 
00082 struct RotationTraits < RotationZ >{
00083   static const std::string name() {
00084     std::string s = "RotationZ";
00085    return s;
00086   }
00087 };
00088 
00089 template <> 
00090 struct RotationTraits < LorentzRotation >{
00091   static const std::string name() {
00092     std::string s = "LorentzRotation";
00093    return s;
00094   }
00095 };
00096 
00097 #ifdef TODO
00098 template <> 
00099 struct RotationTraits < Boost >{
00100   static const std::string name() {
00101     std::string s = "Boost";
00102    return s;
00103   }
00104 };
00105 
00106 template <> 
00107 struct RotationTraits < BoostX >{
00108   static const std::string name() {
00109     std::string s = "BoostX";
00110    return s;
00111   }
00112 };
00113 
00114 template <> 
00115 struct RotationTraits < BoostY >{
00116   static const std::string name() {
00117     std::string s = "BoostY";
00118    return s;
00119   }
00120 };
00121 
00122 template <> 
00123 struct RotationTraits < BoostZ >{
00124   static const std::string name() {
00125     std::string s = "BoostZ";
00126    return s;
00127   }
00128 };
00129 #endif // TODO
00130 
00131 
00132 
00133 } // namespace Math 
00134 } // namespace ROOT 
00135 
00136 #endif // COORDINATETRAITS_H

Generated on Tue Jul 5 14:33:10 2011 for ROOT_528-00b_version by  doxygen 1.5.1