00001 #ifndef AXIS_H
00002 #define AXIS_H
00003
00004 #include <is/info.h>
00005
00006 #include <string>
00007 #include <vector>
00008
00009
00010
00011
00012
00013
00014 namespace oh
00015 {
00023 class Axis : public ISInfo {
00024 public:
00025 enum Kind { NoAxis, Fixed, Variable };
00026
00027
00031 Kind kind;
00032
00036 long nbins;
00037
00041 std::string title;
00042
00046 std::vector<double> range;
00047
00051 std::vector<long> indices;
00052
00056 std::vector<std::string> labels;
00057
00058
00059 static const ISType & type() {
00060 static const ISType type_ = Axis( ).ISInfo::type();
00061 return type_;
00062 }
00063
00064 Axis( )
00065 : ISInfo( "Axis" )
00066 {
00067 initialize();
00068 }
00069
00070 ~Axis(){
00071
00072
00073
00074
00075 }
00076
00077 protected:
00078 Axis( const std::string & type )
00079 : ISInfo( type )
00080 {
00081 initialize();
00082 }
00083
00084 void publishGuts( ISostream & out ){
00085 out << kind << nbins << title << range << indices << labels;
00086 }
00087
00088 void refreshGuts( ISistream & in ){
00089 in >> kind >> nbins >> title >> range >> indices >> labels;
00090 }
00091
00092 private:
00093 void initialize()
00094 {
00095
00096
00097
00098
00099 }
00100
00101
00102
00103 public:
00104 enum ID { X, Y, Z };
00105
00106
00107 };
00108
00109
00110
00111
00112 }
00113
00114 #endif // AXIS_H