/home/kolos/working/oh/oh/core/Histogram.h

00001 #ifndef HISTOGRAM_H
00002 #define HISTOGRAM_H
00003 
00004 #include <oh/core/Object.h>
00005 #include <oh/core/Axis.h>
00006 #include <string>
00007 #include <vector>
00008 
00009 
00010 // <<BeginUserCode>>
00011 
00012 // <<EndUserCode>>
00013 
00014 namespace oh
00015 {
00023 class Histogram : public Object {
00024 public:
00025     enum Dimension { D1 = 1, D2, D3 };
00026 
00027 
00031     Dimension                     dimension;
00032 
00036     std::string                   title;
00037 
00041     unsigned long                 entries;
00042 
00046     std::vector<double>           errors;
00047 
00051     std::vector<Axis>             axes;
00052 
00053 
00054     static const ISType & type() {
00055         static const ISType type_ = Histogram( ).ISInfo::type();
00056         return type_;
00057     }
00058 
00059     Histogram( )
00060       : Object( "Histogram" )
00061     {
00062         initialize();
00063     }
00064 
00065     ~Histogram(){
00066 
00067 // <<BeginUserCode>>
00068 
00069 // <<EndUserCode>>
00070     }
00071 
00072 protected:
00073     Histogram( const std::string & type )
00074       : Object( type )
00075     {
00076         initialize();
00077     }
00078 
00079     void publishGuts( ISostream & out ){
00080         Object::publishGuts( out );
00081         out << dimension << title << entries << errors << axes;
00082     }
00083 
00084     void refreshGuts( ISistream & in ){
00085         Object::refreshGuts( in );
00086         in >> dimension >> title >> entries >> errors >> axes;
00087     }
00088 
00089 private:
00090     void initialize()
00091     {
00092 
00093 // <<BeginUserCode>>
00094 
00095 // <<EndUserCode>>
00096     }
00097 
00098 
00099 // <<BeginUserCode>>
00100 
00101 // <<EndUserCode>>
00102 };
00103 
00104 // <<BeginUserCode>>
00105 
00106 // <<EndUserCode>>
00107 }
00108 
00109 #endif // HISTOGRAM_H

Generated on Thu Dec 21 16:26:02 2006 for OH User API by  doxygen 1.4.7