/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/Bes2DView.h

Go to the documentation of this file.
00001 //
00002 // Bes2DView.h
00003 //
00004 // $Author: maqm $
00005 // 2005-07-21
00006 // Modified from zevis ZView.h
00007 //
00008 
00009 #ifndef BESVIEW_H
00010 #define BESVIEW_H
00011 
00012 #ifndef BESSTATUS_H
00013 #include "BesStatus.h"
00014 #endif
00015 
00016 #include "BesTView.h"
00017 
00018 class TPaveLabel;
00019 class TGeometry;
00020 class TPad;
00021 class TROOT;
00022 //class TMath;
00023 class TCanvas;
00024 
00025 class Bes2DView : public BesTView {
00026 
00027  private:
00028   Bool_t       fFishEye;                    // variable needed for toggle in menu
00029   Int_t        f2DViewType;           // View type
00030   Float_t      fPhiRangeMin;          // Minimum of phi range for Z-R projection (in degrees)
00031   Float_t      fPhiRangeMax;          // Maximum of phi range for Z-R projection (in degrees)
00032   TPaveLabel  *fLabel;                // Label
00033   Float_t      fMarkerSize;           // size for marker
00034   BesStatus   *fStatus3D;             // 3D view status flags
00035   BesStatus   *fStatusXY;             // XY view status flags
00036   BesStatus   *fStatusZR;             // ZR view status flags
00037   BesStatus   *fStatusCurrent;        // current view status flags
00038   Double_t     fZoomFactor;           // zoom factor
00039 
00040  public:
00041   Bes2DView();
00042   virtual ~Bes2DView();
00043 
00044   virtual void ClearPad();
00045   virtual void DrawLabel();
00046   virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
00047   virtual Int_t GetRSign(Float_t Phi);
00048   virtual void UpdateView(Bool_t resetview = kFALSE );
00049   virtual void WCtoNDC(const Float_t *pw, Float_t *pn);
00050   virtual void WCtoNDC(const Double_t *pw, Double_t *pn);
00051   virtual void NDCtoWC(const Float_t* pn, Float_t* pw);
00052   virtual void NDCtoWC(const Double_t* pn, Double_t* pw);
00053   virtual char *GetObjectInfo(Int_t px, Int_t py) const;
00054   
00055   inline void    Set2DViewType(Int_t viewType) { f2DViewType = viewType; }
00056   inline Int_t   Get2DViewType() { return f2DViewType; }
00057   inline Float_t GetMarkerSize() { return fMarkerSize;}
00058 
00059   // menu
00060   /*
00061   inline void View3D() { SetViewType(k3DView,1); }                // *MENU*
00062   inline void ViewXY() { SetViewType(kXYView,1); }                // *MENU*
00063   inline void ViewZR() { SetViewType(kZRView,1); }                // *MENU*
00064   */
00065   void Zoom();                                                    // *MENU*
00066   void UnZoom();                                                  // *MENU*
00067   void Center();                                                  // *MENU*
00068   void Move(Int_t px, Int_t py);
00069   /*
00070   inline void Front3D() {
00071     this->View3D();
00072     this->Front(); }                                              // *MENU*
00073   void Side3D();                                                  // *MENU*
00074   inline void Top3D() {
00075     this->View3D();
00076     Int_t iret;
00077     this->SetView(-90,90,270,iret);
00078 
00079     //    this->Top();
00080   }                                                                // *MENU*
00081   void SetPhiRange(Float_t PhiMin = 0, Float_t PhiMax = 180);      // *MENU*
00082   */
00083   void Reset();                                                    // *MENU*
00084 //   void Plot_Et_Eta_Phi();                                          // *MENU*
00085   inline void SetMarkerSize(Float_t size) { fMarkerSize = size; }
00086 
00087   // access functions for fish eye
00088   inline Bool_t GetFishEyeStatus() { return fStatusCurrent->fFishEye; }
00089   inline Bool_t GetFishEye()   { return fFishEye; }
00090   inline void SetFishEye(Bool_t input = 0)   {
00091     /*
00092       if ( fViewType & k3DView ) {
00093       fFishEye = 0;
00094       fStatusCurrent->fFishEye = 0;
00095     } else {
00096     */
00097      fFishEye = input;
00098      fStatusCurrent->fFishEye = input;
00099   
00100   } // *TOGGLE*
00101 
00102 
00103   inline void PrintCurrent() { fStatusCurrent->Print(); }
00104 
00105   // clean up right mouse button menu
00106   inline virtual void Centered() { BesTView::Centered(); }
00107   inline virtual void Front() { BesTView::Top(); }
00108   inline virtual void Side() { BesTView::Side(); }
00109   inline virtual void Top() { BesTView::Front(); }
00110   //  inline virtual void ShowAxis() { BesTView::ShowAxis(); }
00111   inline virtual void ZoomMove() { BesTView::ZoomMove(); }
00112   inline virtual void AdjustScales(TVirtualPad* pad = 0) { BesTView::AdjustScales(pad); }
00113   inline virtual void Delete(Option_t* option) { BesTView::Delete(option); }
00114   inline virtual void DrawClass() { BesTView::DrawClass(); }
00115   inline virtual TObject* DrawClone(Option_t* option) { return BesTView::DrawClone(option); }
00116 
00117 #ifndef CL__DEBUG
00118   inline virtual void Dump() { BesTView::Dump(); }
00119   inline virtual void Inspect() { BesTView::Inspect(); }
00120 #endif
00121 
00122   inline virtual void SetDrawOption(Option_t* option) { BesTView::SetDrawOption(option); }
00123   inline virtual void SetLineAttributes() { BesTView::SetLineAttributes(); }
00124 
00125   inline virtual void SetZoomFactor(Double_t factor) { fZoomFactor = factor; };
00126   inline virtual Double_t GetZoomFactor() { return fZoomFactor; }
00127   inline BesStatus* GetStatusCurrent() { return fStatusCurrent; };
00128 
00129   ClassDef(Bes2DView,0) // Bes View
00130 };
00131 
00132 #endif

Generated on Tue Nov 29 23:12:01 2016 for BOSS_7.0.2 by  doxygen 1.4.7