Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CutController.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _CutController_H_
00015 #define _CutController_H_
00016 
00017 #include "graphics/Color.h"
00018 #include "axes/AxesType.h"
00019 
00020 #include <list>
00021 #include <map>
00022 #include <vector> 
00023 
00024 class DataRep;
00025 class DataSource;
00026 class PlotterBase;
00027 class CutPlotter;
00028 class Cut1DPlotter;
00029 class Cut2DPlotter;
00030 class NTupleProjector;
00031 class Range;
00032 class TupleCut;
00033 class ViewBase;
00034 
00039 class MDL_HIPPOPLOT_API CutController
00040 {
00041 
00042 private:
00043 
00047   typedef std::vector < PlotterBase * > PlotterList_t;
00048 
00050   static CutController * s_instance;
00051 
00053   CutController ( const CutController & );
00054 
00056   std:: list < std::pair< PlotterBase *, hippodraw::Axes::Type > > m_zoom_pan;
00057   
00062   mutable std::vector < PlotterBase * > m_cut_list;
00063 
00065   mutable std::vector < std::string > m_cut_strings;
00066 
00073   void connectDataRep ( DataRep * rep, 
00074                         const std::vector < const ViewBase * > & views );
00075 
00082   void connectDataRep ( const TupleCut * cut,
00083                         DataRep * rep,
00084                         const std::vector < const ViewBase * > & views );
00085 
00086 protected:
00087 
00090   CutController();
00091 
00092  public:
00093 
00095   static CutController  * instance ();
00096 
00104   Cut1DPlotter * addCut ( PlotterBase * plotter, const std::string & label );
00105 
00110   PlotterBase * addCut ( PlotterBase * plotter,
00111                          std::vector< std::string > & bindings );
00112   
00114   void addCut ( PlotterBase * cut_plotter,
00115                 PlotterBase * plotter );
00116 
00120   void CutController::linkCutAndRep ( PlotterBase * cut_plotter,
00121                                       DataRep * targetrep );
00122   
00127   void CutController::linkCutAndRep ( CutPlotter * cut_plotter,
00128                                       DataRep * targetrep );
00129 
00130   
00137   PlotterBase * 
00138   createCut ( const std::string & name, 
00139               const DataSource * ntuple,
00140               const std::vector < std::string > & bindings,
00141               const Color & color = Color::yellow ) const;
00142   
00145   void removeCut ( PlotterBase * cut_plotter, PlotterBase * plotter );
00146 
00150   void fillCutList ( const std::vector < PlotterBase * > & plotter_list,
00151                      std::vector < CutPlotter * > & cut_list );
00152 
00156   void fillCutList ( const DataRep * data_rep,
00157                      std::vector < PlotterBase * > & );
00158 
00161   const std::vector < const TupleCut * > & 
00162   getCutList ( const DataRep * rep  ) const; 
00163 
00167   const std::vector < PlotterBase * > & 
00168   getCutList ( const std::vector < PlotterBase * > &,
00169                const DataSource * rep  ) const; 
00170 
00176   void fillCutWeb ( const std::vector < PlotterBase * > & plotters,
00177                     std::vector < PlotterBase * > & web );
00178 
00182   void appendToWeb ( PlotterBase * plotter,  PlotterList_t & web );
00183 
00185   void appendToWeb ( CutPlotter * cutter,
00186                      PlotterList_t & web );
00187 
00189   void appendToWeb ( const std::vector < PlotterBase * > & cutters,
00190                      PlotterList_t & web );
00191 
00195   PlotterBase * findPlotter ( const DataRep * data_rep );
00196 
00201   void fillTupleCutList ( const std::vector < const ViewBase * > & views,
00202                           std::vector < const TupleCut * > & cut_list );
00203 
00210   void connectDataRep ( const std::list < ViewBase * > & targets,
00211                         const std::vector < const ViewBase * > & views );
00212 
00216   void setAxisBinding ( PlotterBase * display,
00217                         const std::string & axis,
00218                         const std::string & label );
00219 
00224   void setZoomPan ( PlotterBase * plotter,
00225                     hippodraw::Axes::Type axis,
00226                     bool yes );
00227 
00230   bool isZoomPan ( const PlotterBase * cut_plotter,
00231                    hippodraw::Axes::Type axis ) const;
00232 
00233 };
00234 
00235 #endif // _CutController_H_

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3