0145e89a |
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 | private: |
56 | |
57 | void BackupStyle(); |
58 | void RestoreStyle(); |
59 | void PaintPad(Int_t padId) const; |
60 | AliMpPad PadByPosition(Double_t x, Double_t y) const; |
61 | |
62 | private: |
63 | Int_t fDetElemId; ///< our detection element id |
64 | Int_t fManuId; ///< our manu id |
65 | Int_t fLineColorBck; ///< line color for backup |
66 | Int_t fLineWidthBck; ///< line width for backup |
67 | Int_t fFillColorBck; ///< fill color for backup |
68 | Int_t fFillStyleBck; ///< fill style for backup |
69 | |
70 | ClassDef(AliMUONManuPadPainter,1) // Painter for the pads of one manu |
71 | }; |
72 | |
73 | #endif |