]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPainterMatrixFrame.h
AliMUONTrackerCalibratedDataMaker
[u/mrichter/AliRoot.git] / MUON / AliMUONPainterMatrixFrame.h
1 #ifndef ALIMUONPAINTERMATRIXFRAME_H
2 #define ALIMUONPAINTERMATRIXFRAME_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup graphics
10 /// \class AliMUONPainterMatrixFrame
11 /// \brief Widget to plot a matrix of painters
12 /// 
13 // Author Laurent Aphecetche, Subatech
14
15 #ifndef ROOT_TGFrame
16 #  include "TGFrame.h"
17 #endif
18 #ifndef ROOT_RQ_OBJECT
19 #   include <RQ_OBJECT.h>
20 #endif
21 #include <float.h>
22
23 class AliMUONPainterColorSlider;
24 class AliMUONPainterPlotSelector;
25 class AliMUONPainterMatrix;
26 class AliMUONPainterHighlighter;
27 class AliMUONVPainter;
28 class AliMUONVTrackerData;
29 class TGButtonGroup;
30 class TGToolTip;
31 class TList;
32 class TObjArray;
33 class TRootEmbeddedCanvas;
34
35 class AliMUONPainterMatrixFrame : public TGCompositeFrame
36 {
37   RQ_OBJECT("AliMUONPainterMatrixFrame")
38   
39 public:
40   AliMUONPainterMatrixFrame(const TGWindow* window, UInt_t w, UInt_t h);
41   virtual ~AliMUONPainterMatrixFrame();
42   
43   void Clear(Option_t* opt="");
44
45   void DataRangeAutoRequested();
46   
47   void DataRangeWasChanged(Double_t* range);
48     
49   void DataSourceWasChanged(const char* name, AliMUONVTrackerData* data, Int_t dataIndex);
50
51   void EventInfo(Int_t event, Int_t px, Int_t py, TObject* selected);
52
53   void MouseEnter(AliMUONVPainter* painter); // *SIGNAL*
54
55   void MouseMotion(AliMUONVPainter* painter, Double_t* position); // *SIGNAL*
56
57   void MouseLeave(AliMUONVPainter* painter); // *SIGNAL*
58   
59   void ResponderButtonWasClicked(Int_t id); 
60
61   void OutlineButtonWasClicked(Int_t id); 
62   
63   void Use(AliMUONPainterMatrix* group);
64   
65   void TitleHasChanged(const char* newTitle); // *SIGNAL*
66   
67   void Update(); 
68
69   /// Get the matrix pointer
70   AliMUONPainterMatrix* Matrix() const { return fPainterMatrix; }
71   
72   void SaveAs(const char* filename="", Option_t* option="") const;
73
74 private:
75   /// not implemented
76   AliMUONPainterMatrixFrame(const AliMUONPainterMatrixFrame& rhs);
77   /// not implemented
78   AliMUONPainterMatrixFrame& operator=(const AliMUONPainterMatrixFrame& rhs);
79
80   void ChangeTitle(const TString& title);
81   
82   void ChangeTitle(AliMUONVPainter* painter, const char* basename=0x0,
83                    Double_t x=FLT_MAX, Double_t y=FLT_MAX);
84   
85   void CreateButtons();
86   
87   void UpdateDataRange();
88   
89   void UpdateInterface(Bool_t fromScratch);
90
91   void ViewModified();
92   
93 private:
94   AliMUONPainterMatrix* fPainterMatrix; ///< the matrix we plot (not owner)
95   TRootEmbeddedCanvas* fView; ///< the canvas used to plot
96   TGHorizontalFrame* fInterface;  ///< the interface frame
97   TGButtonGroup* fResponderButtons; ///< the responder buttons
98   TGButtonGroup* fOutlineButtons; ///< the outline buttons
99   
100   AliMUONPainterPlotSelector* fPlotSelector; ///< the data source selection
101     
102   AliMUONPainterHighlighter* fPainterHighlighter; ///< the highlighter
103   
104   UInt_t fCanvasWidth; ///< canvas width
105   UInt_t fCanvasHeight; ///< canvas height
106   
107   TGCompositeFrame* fMainFrame; ///< our main frame
108   
109   AliMUONPainterColorSlider* fColorSlider; ///< color slider (for data)
110   
111   ClassDef(AliMUONPainterMatrixFrame,1) // Widget for drawing painter matrix
112 };
113
114 #endif