Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

rootEnergyHist.h

Go to the documentation of this file.
00001 //  class rootEnergyHist
00002 //  Author:  Theodore Hierath
00003 //  This class contains a histogram and graphing class for
00004 //  energies.
00005 //  The bins are numbered from 0 to number of bins - 1;
00006 
00007 #ifndef ROOT_ENERGY_HIST
00008 #define ROOT_ENERGY_HIST
00009 
00010 #include "rootHist.h"
00011 #include <cmath>
00012 #include <string>
00013 #include <iostream>
00014 
00025 class rootEnergyHist 
00026 {
00027 public:
00032    rootEnergyHist(int bins, double min_energy, double max_energy);
00033    ~rootEnergyHist(void);
00034    rootEnergyHist(const rootEnergyHist& oldHist);
00035 
00037    void setTitle(std::string title);
00038 
00040    void setXLabel(std::string label);
00041 
00043    void setYLabel(std::string label);
00044 
00047    void setGraphType(const char *graph_type);
00048 
00050    void store(double energy);
00051 
00053    double retrieveCount(int binNumber);
00054 
00056    double retrieveFlux(int binNumber);
00057 
00059    double retrieveFluxUncertainty(int binNumber);
00060 
00062    double retrieveEnergy(int binNumber);
00063 
00065    double retrieveRange(void);
00066 
00068    void setFluxMode(void);
00069 
00071    void setFluxMin(double f);
00072 
00074    void setFluxMax(double f);
00075 
00082    void apply(double scale_factor);
00083 
00085    void reset(void);
00086 
00102    void draw(double scale_factor, std::string mode, int current_plot, int total_plots);
00103 
00110    void writeFile(double scale_factor, std::ostream& out_file);
00111 private:
00112    rootHist *flux_hist; 
00113    rootHist *flux_sigma_hist; 
00114    rootHist *raw_hist; 
00115    const int num_bins;  
00116    const double emin;   
00117    const double emax;   
00118    double range;        
00119    std::string graphTitle;    
00120    std::string xlabel;  
00121    std::string ylabel;  
00122 
00124    enum graphType
00125    {
00126       linear,     
00127       semilogx,   
00128       semilogy,   
00129       loglog      
00130    } currentType;
00131 
00132    bool fluxMode;  
00133    bool use_flux_min; 
00134    bool use_flux_max; 
00135    double flux_min; 
00136    double flux_max; 
00137 };
00138 
00139 #endif // ROOT_ENERGY_HIST

Generated on Wed Oct 16 14:01:30 2002 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001