00001 // class rootAngleHist 00002 // Author: Theodore Hierath 00003 // This class contains a histogram and graphing class for 00004 // angles. 00005 // The bins are numbered from 0 to number of bins - 1; 00006 00007 #ifndef ROOT_ANGLE_HIST 00008 #define ROOT_ANGLE_HIST 00009 00010 #include "rootHist.h" 00011 #include <string> 00012 #include <iostream> 00013 00025 class rootAngleHist 00026 { 00027 public: 00029 rootAngleHist(int bins); 00030 ~rootAngleHist(void); 00031 rootAngleHist(const rootAngleHist& oldHist); 00032 00034 void setTitle(std::string title); 00035 00037 void setPhiXLabel(std::string label); 00038 00040 void setPhiYLabel(std::string label); 00041 00043 void setThetaXLabel(std::string label); 00044 00046 void setThetaYLabel(std::string label); 00047 00050 void setGraphType(const char *graph_type); 00051 00053 void storeTheta(double theta_value); 00054 00056 void storePhi(double phi_value); 00057 00059 double retrievePhiCount(int binNumber); 00060 00062 double retrievePhiFlux(int binNumber); 00063 00065 double retrievePhiFluxUncertainty(int binNumber); 00066 00068 double retrieveThetaCount(int binNumber); 00069 00071 double retrieveThetaFlux(int binNumber); 00072 00074 double retrieveThetaFluxUncertainty(int binNumber); 00075 00077 double retrievePhiAngle(int binNumber); 00078 00080 double retrieveThetaAngle(int binNumber); 00081 00088 void apply(double scale_factor); 00089 00091 void reset(void); 00092 00108 void draw(double scale_factor, std::string mode, int current_plot, int total_plots); 00109 00111 void writeFile(double scale_factor, std::ostream& out_file); 00112 private: 00113 rootHist *theta_hist; 00114 rootHist *theta_sigma_hist; 00115 rootHist *theta_raw_hist; 00116 rootHist *phi_hist; 00117 rootHist *phi_sigma_hist; 00118 rootHist *phi_raw_hist; 00119 const int num_bins; 00120 std::string graphTitle; 00121 std::string PhiXLabel; 00122 std::string PhiYLabel; 00123 std::string ThetaXLabel; 00124 std::string ThetaYLabel; 00125 enum graphType{linear,log} currentType; 00126 }; 00127 00128 #endif // ROOT_ANGLE_HIST
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001