]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONManuPadPainter.h
Copy of event header for delta-AOD on demand.
[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();
26   AliMUONManuPadPainter(const AliMUONVPainter& mother,
27                         Int_t detElemId,
28                         Int_t manuId);
29   virtual ~AliMUONManuPadPainter();
30
31   /// Clone ourselves
32   virtual TObject* Clone(const char* = "") const { return new AliMUONManuPadPainter(*this); }
33   
34   virtual void ComputeDataRange(const AliMUONVTrackerData& data,
35                                 Int_t dataIndex,
36                                 Double_t& dataMin, Double_t& dataMax) const;
37     
38   virtual char* GetObjectInfo(Int_t px, Int_t py) const;
39   
40   /// We advertise that we do handle mouse movement
41   virtual Bool_t HandleMouseMotion() const { return kTRUE; }
42   
43   TString NameAtPosition(Double_t x, Double_t y) const;
44
45     virtual TString Describe(const AliMUONVTrackerData& data, Int_t dataIndex,
46                              Double_t x=FLT_MAX, Double_t y=FLT_MAX);
47
48     void PaintArea(const AliMUONVTrackerData& data,
49                    Int_t dataIndex,
50                    Double_t min,
51                    Double_t max);
52   
53   void PaintOutline(Int_t color=-1, Int_t width=-1, Double_t x=FLT_MAX, Double_t y=FLT_MAX);
54
55   /// Whether this painter can be detached from the current view.
56   Bool_t CanBeDetached() const { return kFALSE; }
57
58   virtual void DrawHistogramClone(Double_t* values=0x0) const;
59
60 private:
61     
62   void BackupStyle();
63   void RestoreStyle();
64   void PaintPad(Int_t padId) const;
65   AliMpPad PadByPosition(Double_t x, Double_t y) const;
66   
67 private:
68   Int_t fDetElemId; ///< our detection element id
69   Int_t fManuId; ///< our manu id
70   Int_t fLineColorBck; ///< line color for backup
71   Int_t fLineWidthBck; ///< line width for backup
72   Int_t fFillColorBck; ///< fill color for backup
73   Int_t fFillStyleBck; ///< fill style for backup
74   
75   ClassDef(AliMUONManuPadPainter,1) // Painter for the pads of one manu
76 };
77
78 #endif