]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONManuPadPainter.h
mchview related changes.
[u/mrichter/AliRoot.git] / MUON / AliMUONManuPadPainter.h
1 #ifndef ALIMUONMANUPADPAINTER_H
2 #define ALIMUONMANUPADPAINTER_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 AliMUONManuPadPainter
11 /// \brief Painter for the pads of one manu
12 /// 
13 // Author Laurent Aphecetche, Subatech
14
15 #ifndef ALIMUONVPAINTER_H
16 #  include "AliMUONVPainter.h"
17 #endif
18 #ifndef ALI_MP_PAD_H
19 #  include "AliMpPad.h"
20 #endif
21
22 class AliMUONManuPadPainter : public AliMUONVPainter
23 {
24 public:
25   AliMUONManuPadPainter(TRootIOCtor* ioCtor);
26   AliMUONManuPadPainter();
27   AliMUONManuPadPainter(const AliMUONVPainter& mother,
28                         Int_t detElemId,
29                         Int_t manuId);
30   virtual ~AliMUONManuPadPainter();
31
32   /// Clone ourselves
33   virtual TObject* Clone(const char* = "") const { return new AliMUONManuPadPainter(*this); }
34   
35   virtual void ComputeDataRange(const AliMUONVTrackerData& data,
36                                 Int_t dataIndex,
37                                 Double_t& dataMin, Double_t& dataMax) const;
38     
39   virtual char* GetObjectInfo(Int_t px, Int_t py) const;
40   
41   /// We advertise that we do handle mouse movement
42   virtual Bool_t HandleMouseMotion() const { return kTRUE; }
43   
44   TString NameAtPosition(Double_t x, Double_t y) const;
45
46     virtual TString Describe(const AliMUONVTrackerData& data, Int_t dataIndex,
47                              Double_t x=FLT_MAX, Double_t y=FLT_MAX);
48
49     void PaintArea(const AliMUONVTrackerData& data,
50                    Int_t dataIndex,
51                    Double_t min,
52                    Double_t max);
53   
54   void PaintOutline(Int_t color=-1, Int_t width=-1, Double_t x=FLT_MAX, Double_t y=FLT_MAX);
55
56   /// Whether this painter can be detached from the current view.
57   Bool_t CanBeDetached() const { return kFALSE; }
58
59   virtual void DrawHistogramClone(Double_t* values=0x0) const;
60
61   virtual Bool_t IsIncluded() const;
62   
63 private:
64     
65   void BackupStyle();
66   void RestoreStyle();
67   void PaintPad(Int_t padId) const;
68   AliMpPad PadByPosition(Double_t x, Double_t y) const;
69   
70 private:
71   Int_t fDetElemId; ///< our detection element id
72   Int_t fManuId; ///< our manu id
73   Int_t fLineColorBck; ///< line color for backup
74   Int_t fLineWidthBck; ///< line width for backup
75   Int_t fFillColorBck; ///< fill color for backup
76   Int_t fFillStyleBck; ///< fill style for backup
77   
78   ClassDef(AliMUONManuPadPainter,1) // Painter for the pads of one manu
79 };
80
81 #endif