Anaphe Home Page Reference Documentation

Main Page     Namespaces     Classes     Source Code    

AIDAPlotter.h

Go to the documentation of this file.
00001 // 
00002 // Copyright (C) CERN, Geneva 
00003 // 
00004 // header file for class AIDAPlotter 
00005 // Created by: Andreas Pfeiffer  at Thu Sep  2 14:29:42 1999
00006 // 
00007 // Last update: 
00008 //              
00009 // 
00010 #ifndef INCLUDED_AIDAPLOTTER_H
00011 #define INCLUDED_AIDAPLOTTER_H
00012 
00013 #include "Interfaces/IPlotter.h"
00014 
00015 namespace Anaphe {
00016   class IVector;
00017   class IScatter2D;
00018 };
00019 
00020 class ITextStyle;
00021 class IViewer;
00022 class IPage;
00023 class IZone;
00024 
00025 #include <map>
00026 #ifdef __i386__
00027 # include <multimap.h>
00028 #endif
00029 #include <string>
00030 
00031 namespace Anaphe {
00032 
00033   class AIDAPlotter : virtual public IPlotter {
00034 
00035     typedef std::multimap < std::string, std::string > Property_t;
00036     typedef std::map < std::string, std::string >      Style_t   ;
00037 
00038   public:
00039     AIDAPlotter(int nX=1, int nY=1);
00040     virtual ~AIDAPlotter();
00041 
00042   public:
00043     void refresh();
00044     void reset();
00045 
00046     void plot(Anaphe::IVector *v1, Anaphe::IVector *v2=0);
00047     void plot(Anaphe::IScatter2D *scat);
00048     void overlay(Anaphe::IVector *v2, int selZone=-1);
00049 
00050 
00051     void makePicture(const char *file);
00052     void psPrint(const char *file=0);
00053 
00054     void createRegion(double x, double y, double w, double h);
00055     void zone(int, int, int iSel=0, const char *opt=0);
00056 
00057     void zoneOption(const char *opt=0, const  char *val=0);
00058     void dataOption(const char *opt=0, const  char *val=0);
00059 
00060     void xAxisOption(const char *opt=0, const  char *val=0);
00061     void yAxisOption(const char *opt=0, const  char *val=0);
00062 
00063     void dataStyle(const char *opt=0, const  char *val=0);
00064     void textStyle(const char *opt=0, const  char *val=0);
00065 
00066     void listOptions(std::ostream& os=std::cout);
00067 
00068     void setMinMaxX(double xMin, double xMax, int selZone=1);
00069     void setMinMaxY(double yMin, double yMax, int selZone=1);
00070 
00071     void pageTitle(const char *title);
00072     void zoneTitle(const char *title, int selZone=1);
00073 
00074     void pageText(double xC, double yC, const char *text);
00075     void zoneText(double xC, double yC, const char *text, int selZone=1);
00076 
00077     void resetMinMax();
00078 
00079     void interact();
00080 
00081   protected:
00082     virtual void init(int, int);
00083 
00084     // helper methods ...
00085     virtual void setAxisProperty(IZone *z, Anaphe::IVector *v1, const std::string ax, const std::string prop, Property_t &pList);
00086 
00087     void handleOption(Property_t &pList, const char *opt=0, const  char *val=0);
00088     void applyTextProperties(ITextStyle *itx);
00089     void resetZones(int, int);
00090 
00091   private:
00092     IViewer * myViewer;
00093     IPage   * myPage;
00094     IZone   * myZone;
00095 
00096     int nZonesX;
00097     int nZonesY;
00098 
00099     int whichZone;
00100 
00101     Property_t dataProperties;
00102     Property_t zoneProperties;
00103   
00104     Property_t xAxisProperties;
00105     Property_t yAxisProperties;
00106 
00107     Style_t dataStyles;
00108     Style_t textStyles;
00109 
00110     std::map < int, std::pair <double, double> > xMinMax, yMinMax;
00111 
00112   };
00113 
00114 }; // end namespace Anaphe
00115 
00116 #endif /* INCLUDED_PLOTTER_H */ 


Anaphe documentation generated by Doxygen (www.doxygen.org)